summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorMalte Timmermann <mt@openoffice.org>2001-08-16 09:12:33 +0000
committerMalte Timmermann <mt@openoffice.org>2001-08-16 09:12:33 +0000
commiteb23614b006aeda38278a0286c2deb9f198f90d7 (patch)
treeea936eec51d548d2de423a8791356c1ac7319793 /svx
parentcc694aca177c82768711d93ee4201e27bdf9ffc5 (diff)
#91099# ImpConvertEdtToOut - correctly check for MaxDepth
Diffstat (limited to 'svx')
-rw-r--r--svx/source/outliner/outliner.cxx23
1 files changed, 11 insertions, 12 deletions
diff --git a/svx/source/outliner/outliner.cxx b/svx/source/outliner/outliner.cxx
index 1f194a2033c7..043d9416a1c3 100644
--- a/svx/source/outliner/outliner.cxx
+++ b/svx/source/outliner/outliner.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: outliner.cxx,v $
*
- * $Revision: 1.25 $
+ * $Revision: 1.26 $
*
- * last change: $Author: mt $ $Date: 2001-08-15 15:52:50 $
+ * last change: $Author: mt $ $Date: 2001-08-16 10:12:33 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -613,16 +613,15 @@ BOOL Outliner::ImpConvertEdtToOut(Paragraph* pPara,ULONG nPara,EditView* pView)
// MT: OutlLevel wird beim RTF-Import von der EditEngine eingestellt,
// weil String-Vergleich vom Vorlagen-Namen unbrauchbar
- const SfxUInt16Item& rLevel = (const SfxUInt16Item&) pEditEngine->GetParaAttrib( nPara, EE_PARA_OUTLLEVEL );
- USHORT nOutlLevel = rLevel.GetValue();
-
- if ( !nPara )
- nOutlLevel = nMinDepth;
- else if( nOutlLevel < nMinDepth )
- nOutlLevel = nMinDepth;
- else if( nOutlLevel >= nMaxDepth )
- nOutlLevel = nMaxDepth-1;
-
+ // Und fr das Binaer-Format gilt der Level sowieso...
+ // => Einiges von oben kann bestimmt entfallen, oder?
+ USHORT nOutlLevel = nMinDepth;
+ if ( nPara )
+ {
+ const SfxUInt16Item& rLevel = (const SfxUInt16Item&) pEditEngine->GetParaAttrib( nPara, EE_PARA_OUTLLEVEL );
+ nOutlLevel = rLevel.GetValue();
+ }
+ ImplCheckDepth( nOutlLevel );
ImplInitDepth( nPara, nOutlLevel, FALSE );
return bConverted;