summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOliver-Rainer Wittmann <orw@apache.org>2014-02-25 13:16:12 +0000
committerOliver-Rainer Wittmann <orw@apache.org>2014-02-25 13:16:12 +0000
commit5a15ef3da683566d7bd443f96eeec3a9a3f70aeb (patch)
tree761c6677970d70784a78a0103f0cf58cc7e81af5
parent6a1f34766f40bf697b8bb56951c5b3a3267afd97 (diff)
124106: correct handling of paragraph attributes, esp. whose which are providing the default value explicitly
Notes
-rw-r--r--writerfilter/source/dmapper/DomainMapper.cxx150
-rw-r--r--writerfilter/source/dmapper/PropertyMap.cxx2
-rw-r--r--writerfilter/source/dmapper/PropertyMap.hxx2
-rw-r--r--writerfilter/source/dmapper/StyleSheetTable.cxx2
4 files changed, 84 insertions, 72 deletions
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx
index 6f590f73b05c..f9ef6c5502f0 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -2215,7 +2215,7 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext, SprmType
// bExchangeLeftRight = true;
Value::Pointer_t pValue = rSprm.getValue();
sal_Int32 nIntValue = pValue->getInt();
- rtl::OUString sStringValue = pValue->getString();
+ const rtl::OUString sStringValue = pValue->getString();
// printf ( "DomainMapper::sprm(0x%.4x, 0x%.4x) [%s]\n", (unsigned int)nSprmId, (unsigned int)nIntValue, ::rtl::OUStringToOString(sStringValue, RTL_TEXTENCODING_DONTKNOW).getStr());
/* WRITERFILTERSTATUS: table: sprmdata */
@@ -2254,11 +2254,14 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext, SprmType
/* WRITERFILTERSTATUS: comment: */
rContext->Insert(PROP_PARA_KEEP_TOGETHER, true, uno::makeAny( nIntValue ? true : false) );
break;
+
case NS_sprm::LN_PFPageBreakBefore:
- /* WRITERFILTERSTATUS: done: 100, planned: 3, spent: 0 */
- /* WRITERFILTERSTATUS: comment: */
- rContext->Insert(PROP_BREAK_TYPE, true, uno::makeAny( com::sun::star::style::BreakType_PAGE_BEFORE ) );
+ if ( nIntValue == 1 )
+ {
+ rContext->Insert( PROP_BREAK_TYPE, true, uno::makeAny( com::sun::star::style::BreakType_PAGE_BEFORE ) );
+ }
break; // sprmPFPageBreakBefore
+
case NS_sprm::LN_PBrcl:
break; // sprmPBrcl
case NS_sprm::LN_PBrcp:
@@ -2327,10 +2330,9 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext, SprmType
break;
case NS_sprm::LN_PFNoLineNumb: // sprmPFNoLineNumb
- /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 1 */
- /* WRITERFILTERSTATUS: comment: */
- rContext->Insert(PROP_PARA_LINE_NUMBER_COUNT, true, uno::makeAny( nIntValue ? false : true) );
+ rContext->Insert(PROP_PARA_LINE_NUMBER_COUNT, true, uno::makeAny( nIntValue != 0 ? false : true) );
break;
+
case NS_sprm::LN_PChgTabsPapx: // sprmPChgTabsPapx
/* WRITERFILTERSTATUS: done: 90, planned: 8, spent: 8 */
/* WRITERFILTERSTATUS: comment: bar tab stops a unavailable */
@@ -2595,10 +2597,11 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext, SprmType
case NS_sprm::LN_PBrcBar:
/* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
break; // sprmPBrcBar
+
case NS_sprm::LN_PFNoAutoHyph: // sprmPFNoAutoHyph
- /* WRITERFILTERSTATUS: done: 100, planned: 1, spent: 0 */
- rContext->Insert(PROP_PARA_IS_HYPHENATION, true, uno::makeAny( nIntValue ? false : true ));
+ rContext->Insert(PROP_PARA_IS_HYPHENATION, true, uno::makeAny( nIntValue != 0 ? false : true ));
break;
+
case NS_sprm::LN_PWHeightAbs:
/* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
break; // sprmPWHeightAbs
@@ -2629,15 +2632,16 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext, SprmType
case NS_sprm::LN_PFLocked:
/* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
break; // sprmPFLocked
+
case NS_sprm::LN_PFWidowControl:
case NS_ooxml::LN_CT_PPrBase_widowControl:
- /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */
{
- uno::Any aVal( uno::makeAny( sal_Int8(nIntValue ? 2 : 0 )));
+ uno::Any aVal( uno::makeAny( sal_Int8(nIntValue != 0 ? 2 : 0 )));
rContext->Insert( PROP_PARA_WIDOWS, true, aVal );
rContext->Insert( PROP_PARA_ORPHANS, true, aVal );
}
break; // sprmPFWidowControl
+
case NS_sprm::LN_PRuler:
/* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
break; // sprmPRuler
@@ -2675,34 +2679,47 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext, SprmType
case NS_sprm::LN_PPropRMark:
/* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
break; // sprmPPropRMark
+
case NS_sprm::LN_POutLvl:
- /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
{
- sal_Int16 nLvl = static_cast< sal_Int16 >( nIntValue );
- if( m_pImpl->IsStyleSheetImport() )
+ // - nIntValue == WW_OUTLINE_MAX --> no outline level
+ // - WW_OUTLINE_MIN <= nIntValue < WW_OUTLINE_MAX --> outline level = nIntValue+1
+ // - nIntValue > WW_OUTLINE_MAX are treated as no outline level
+ const sal_Int16 nOutlineLevel = nIntValue >= WW_OUTLINE_MIN && nIntValue < WW_OUTLINE_MAX
+ ? static_cast< sal_Int16 >(nIntValue+1)
+ : 0;
+ StyleSheetPropertyMap* pStyleSheetPropertyMap = NULL;
+ if ( m_pImpl->IsStyleSheetImport() )
{
-
- StyleSheetPropertyMap* pStyleSheetPropertyMap = dynamic_cast< StyleSheetPropertyMap* >( rContext.get() );
- pStyleSheetPropertyMap->SetOutlineLevel( nLvl );
+ pStyleSheetPropertyMap = dynamic_cast< StyleSheetPropertyMap* >( rContext.get() );
+ }
+ if ( pStyleSheetPropertyMap != 0 )
+ {
+ pStyleSheetPropertyMap->SetOutlineLevel( nOutlineLevel );
}
else
{
- nLvl = nLvl >= WW_OUTLINE_MIN && nLvl < WW_OUTLINE_MAX? nLvl+1 : 0; //0 means no outline level set on
- rContext->Insert(PROP_OUTLINE_LEVEL, true, uno::makeAny ( nLvl ));
+ rContext->Insert(PROP_OUTLINE_LEVEL, true, uno::makeAny ( nOutlineLevel ));
}
}
break; // sprmPOutLvl
+
case NS_sprm::LN_PFBiDi:
- /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */
+ if ( nIntValue == 1 )
+ {
rContext->Insert(PROP_WRITING_MODE, false, uno::makeAny( text::WritingMode2::RL_TB ));
rContext->Insert(PROP_PARA_ADJUST, false, uno::makeAny( style::ParagraphAdjust_RIGHT ));
-
+ }
break; // sprmPFBiDi
+
case NS_ooxml::LN_EG_SectPrContents_bidi:
- /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */
- if (pSectionContext != NULL)
- pSectionContext->Insert(PROP_WRITING_MODE,false, uno::makeAny( text::WritingMode2::RL_TB));
+ if ( nIntValue == 1 )
+ {
+ if ( pSectionContext != NULL )
+ pSectionContext->Insert( PROP_WRITING_MODE, false, uno::makeAny( text::WritingMode2::RL_TB ) );
+ }
break;
+
case NS_sprm::LN_PFNumRMIns:
/* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
break; // sprmPFNumRMIns
@@ -2792,73 +2809,62 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext, SprmType
/* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */
rContext->Insert(PROP_CHAR_EMPHASIS, true, uno::makeAny ( getEmphasisValue (nIntValue)));
break; // sprmCKcd
+
case NS_sprm::LN_CFEmboss:// sprmCFEmboss
- /* WRITERFILTERSTATUS: done: 100, planned: , spent: 0.5 */
case 60:// sprmCFBold
case NS_sprm::LN_CFBoldBi:// sprmCFBoldBi (offset 0x27 to normal bold)
- /* WRITERFILTERSTATUS: done: 100, planned: , spent: 0.5 */
case NS_sprm::LN_CFItalicBi:// sprmCFItalicBi (offset 0x27 to normal italic)
- /* WRITERFILTERSTATUS: done: 100, planned: , spent: 0.5 */
case NS_sprm::LN_CFBold: //sprmCFBold
- /* WRITERFILTERSTATUS: done: 100, planned: , spent: 0.5 */
case 61: /*sprmCFItalic*/
- /* WRITERFILTERSTATUS: done: 100, planned: , spent: 0.5 */
case NS_sprm::LN_CFItalic: //sprmCFItalic
- /* WRITERFILTERSTATUS: done: 100, planned: , spent: 0.5 */
case NS_sprm::LN_CFStrike: //sprmCFStrike
- /* WRITERFILTERSTATUS: done: 100, planned: , spent: 0.5*/
case NS_sprm::LN_CFOutline: //sprmCFOutline
- /* WRITERFILTERSTATUS: done: 100, planned: , spent: 0.5 */
case NS_sprm::LN_CFShadow: //sprmCFShadow
- /* WRITERFILTERSTATUS: done: 100, planned: , spent: 0.5 */
case NS_sprm::LN_CFSmallCaps: //sprmCFSmallCaps
- /* WRITERFILTERSTATUS: done: 100, planned: , spent: 0.5 */
case NS_sprm::LN_CFCaps: //sprmCFCaps
- /* WRITERFILTERSTATUS: done: 100, planned: , spent: 0.5 */
case NS_sprm::LN_CFVanish: //sprmCFVanish
- /* WRITERFILTERSTATUS: done: 100, planned: , spent: 0.5 */
case NS_sprm::LN_CFDStrike: // sprmCFDStrike
- /* WRITERFILTERSTATUS: done: 100, planned: , spent: 0.5 */
{
PropertyIds ePropertyId = PROP_CHAR_WEIGHT; //initialized to prevent warning!
switch( nSprmId )
{
case 60:// sprmCFBold
- case NS_sprm::LN_CFBoldBi: // sprmCFBoldBi
case NS_sprm::LN_CFBold: /*sprmCFBold*/
- /* WRITERFILTERSTATUS: */
- ePropertyId = nSprmId != NS_sprm::LN_CFBoldBi ? PROP_CHAR_WEIGHT : PROP_CHAR_WEIGHT_COMPLEX;
+ ePropertyId = PROP_CHAR_WEIGHT;
+ break;
+ case NS_sprm::LN_CFBoldBi: // sprmCFBoldBi
+ ePropertyId = PROP_CHAR_WEIGHT_COMPLEX;
break;
+
case 61: /*sprmCFItalic*/
case NS_sprm::LN_CFItalicBi: // sprmCFItalicBi
case NS_sprm::LN_CFItalic: /*sprmCFItalic*/
- /* WRITERFILTERSTATUS: */
ePropertyId = nSprmId == 0x836 ? PROP_CHAR_POSTURE : PROP_CHAR_POSTURE_COMPLEX;
break;
+
case NS_sprm::LN_CFStrike: /*sprmCFStrike*/
case NS_sprm::LN_CFDStrike : /*sprmCFDStrike double strike through*/
- /* WRITERFILTERSTATUS: */
ePropertyId = PROP_CHAR_STRIKEOUT;
break;
+
case NS_sprm::LN_CFOutline: /*sprmCFOutline*/
- /* WRITERFILTERSTATUS: */
ePropertyId = PROP_CHAR_CONTOURED;
break;
+
case NS_sprm::LN_CFShadow: /*sprmCFShadow*/
- /* WRITERFILTERSTATUS: */
ePropertyId = PROP_CHAR_SHADOWED;
break;
+
case NS_sprm::LN_CFSmallCaps: /*sprmCFSmallCaps*/
case NS_sprm::LN_CFCaps: /*sprmCFCaps*/
- /* WRITERFILTERSTATUS: */
ePropertyId = PROP_CHAR_CASE_MAP;
break;
+
case NS_sprm::LN_CFVanish: /*sprmCFVanish*/
- /* WRITERFILTERSTATUS: */
ePropertyId = PROP_CHAR_HIDDEN;
break;
+
case NS_sprm::LN_CFEmboss: /*sprmCFEmboss*/
- /* WRITERFILTERSTATUS: */
ePropertyId = PROP_CHAR_RELIEF;
break;
}
@@ -2900,56 +2906,55 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext, SprmType
case 60:/*sprmCFBold*/
case NS_sprm::LN_CFBold: /*sprmCFBold*/
case NS_sprm::LN_CFBoldBi: // sprmCFBoldBi
- /* WRITERFILTERSTATUS: */
{
- uno::Any aBold( uno::makeAny( nIntValue ? awt::FontWeight::BOLD : awt::FontWeight::NORMAL ) );
+ uno::Any aBold( uno::makeAny( nIntValue != 0 ? awt::FontWeight::BOLD : awt::FontWeight::NORMAL ) );
rContext->Insert(ePropertyId, true, aBold );
if( nSprmId != NS_sprm::LN_CFBoldBi ) // sprmCFBoldBi
rContext->Insert(PROP_CHAR_WEIGHT_ASIAN, true, aBold );
}
break;
+
case 61: /*sprmCFItalic*/
case NS_sprm::LN_CFItalic: /*sprmCFItalic*/
case NS_sprm::LN_CFItalicBi: // sprmCFItalicBi
- /* WRITERFILTERSTATUS: */
{
- uno::Any aPosture( uno::makeAny( nIntValue ? awt::FontSlant_ITALIC : awt::FontSlant_NONE ) );
+ uno::Any aPosture( uno::makeAny( nIntValue != 0 ? awt::FontSlant_ITALIC : awt::FontSlant_NONE ) );
rContext->Insert( ePropertyId, true, aPosture );
if( nSprmId != NS_sprm::LN_CFItalicBi ) // sprmCFItalicBi
rContext->Insert(PROP_CHAR_POSTURE_ASIAN, true, aPosture );
}
break;
+
case NS_sprm::LN_CFStrike: /*sprmCFStrike*/
- /* WRITERFILTERSTATUS: */
rContext->Insert(ePropertyId, true,
- uno::makeAny( nIntValue ? awt::FontStrikeout::SINGLE : awt::FontStrikeout::NONE ) );
+ uno::makeAny( nIntValue != 0 ? awt::FontStrikeout::SINGLE : awt::FontStrikeout::NONE ) );
break;
+
case NS_sprm::LN_CFDStrike : /*sprmCFDStrike double strike through*/
- /* WRITERFILTERSTATUS: */
rContext->Insert(ePropertyId, true,
- uno::makeAny( awt::FontStrikeout::DOUBLE ) );
+ uno::makeAny( nIntValue != 0 ? awt::FontStrikeout::DOUBLE : awt::FontStrikeout::NONE ) );
break;
+
case NS_sprm::LN_CFOutline: /*sprmCFOutline*/
case NS_sprm::LN_CFShadow: /*sprmCFShadow*/
case NS_sprm::LN_CFVanish: /*sprmCFVanish*/
- /* WRITERFILTERSTATUS: */
- rContext->Insert(ePropertyId, true, uno::makeAny( nIntValue ? true : false ));
+ rContext->Insert(ePropertyId, true, uno::makeAny( nIntValue != 0 ? true : false ));
break;
+
case NS_sprm::LN_CFSmallCaps: /*sprmCFSmallCaps*/
- /* WRITERFILTERSTATUS: */
rContext->Insert(ePropertyId, true,
- uno::makeAny( nIntValue ? style::CaseMap::SMALLCAPS : style::CaseMap::NONE));
+ uno::makeAny( nIntValue != 0 ? style::CaseMap::SMALLCAPS : style::CaseMap::NONE));
break;
+
case NS_sprm::LN_CFCaps: /*sprmCFCaps*/
- /* WRITERFILTERSTATUS: */
rContext->Insert(ePropertyId, true,
- uno::makeAny( nIntValue ? style::CaseMap::UPPERCASE : style::CaseMap::NONE));
+ uno::makeAny( nIntValue != 0 ? style::CaseMap::UPPERCASE : style::CaseMap::NONE));
break;
+
case NS_sprm::LN_CFEmboss: /*sprmCFEmboss*/
- /* WRITERFILTERSTATUS: */
rContext->Insert(ePropertyId, true,
- uno::makeAny( nIntValue ? awt::FontRelief::EMBOSSED : awt::FontRelief::NONE ));
+ uno::makeAny( nIntValue != 0 ? awt::FontRelief::EMBOSSED : awt::FontRelief::NONE ));
break;
}
@@ -3003,6 +3008,7 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext, SprmType
case NS_sprm::LN_CHpsInc:
/* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
break; // sprmCHpsInc
+
case NS_sprm::LN_CHpsPos:
/* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
{
@@ -3021,6 +3027,7 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext, SprmType
rContext->Insert(PROP_CHAR_ESCAPEMENT_HEIGHT, true, uno::makeAny( nProp ) );
}
break; // sprmCHpsPos
+
case NS_sprm::LN_CHpsPosAdj:
/* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
break; // sprmCHpsPosAdj
@@ -3069,10 +3076,11 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext, SprmType
rContext->Insert(PROP_CHAR_CHAR_KERNING, true, uno::makeAny(nResult));
}
break;
+
case NS_sprm::LN_CHpsKern: // sprmCHpsKern auto kerning is bound to a minimum font size in Word - but not in Writer :-(
- /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */
rContext->Insert(PROP_CHAR_AUTO_KERNING, true, uno::makeAny( true ) );
break;
+
case NS_sprm::LN_CMajority50:
/* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
break; // sprmCMajority50
@@ -3129,17 +3137,17 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext, SprmType
}
}
break;
+
case NS_sprm::LN_CCharScale: // sprmCCharScale
- /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */
- rContext->Insert(PROP_CHAR_SCALE_WIDTH, true,
- uno::makeAny( sal_Int16(nIntValue) ));
+ rContext->Insert( PROP_CHAR_SCALE_WIDTH, true, uno::makeAny( sal_Int16(nIntValue) ));
break;
+
case NS_sprm::LN_CFImprint: // sprmCFImprint 1 or 0
- /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */
// FontRelief: NONE, EMBOSSED, ENGRAVED
rContext->Insert(PROP_CHAR_RELIEF, true,
- uno::makeAny( nIntValue ? awt::FontRelief::ENGRAVED : awt::FontRelief::NONE ));
+ uno::makeAny( nIntValue != 0 ? awt::FontRelief::ENGRAVED : awt::FontRelief::NONE ));
break;
+
case NS_sprm::LN_CFObj:
/* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
break; // sprmCFObj
@@ -3858,6 +3866,7 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext, SprmType
/* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
resolveSprmProps(*this, rSprm);
break;
+
case NS_ooxml::LN_EG_SectPrContents_footnotePr:
/* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
case NS_ooxml::LN_EG_SectPrContents_endnotePr:
@@ -3865,6 +3874,7 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext, SprmType
m_pImpl->SetInFootnoteProperties( NS_ooxml::LN_EG_SectPrContents_footnotePr == nSprmId );
resolveSprmProps(*this, rSprm);
break;
+
case NS_ooxml::LN_EG_SectPrContents_lnNumType:
/* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
{
@@ -4111,6 +4121,7 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext, SprmType
}
}
break;
+
case NS_ooxml::LN_EG_RPrBase_vertAlign:
/* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
{
@@ -4127,6 +4138,7 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext, SprmType
rContext->Insert(PROP_CHAR_ESCAPEMENT_HEIGHT, true, uno::makeAny( nProp ) );
}
break;
+
// case NS_ooxml::LN_CT_FtnEdn_type
/* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
// case NS_ooxml::LN_CT_FtnEdn_id
diff --git a/writerfilter/source/dmapper/PropertyMap.cxx b/writerfilter/source/dmapper/PropertyMap.cxx
index d3cb5ad2b5ee..933b77176929 100644
--- a/writerfilter/source/dmapper/PropertyMap.cxx
+++ b/writerfilter/source/dmapper/PropertyMap.cxx
@@ -1093,7 +1093,7 @@ StyleSheetPropertyMap::StyleSheetPropertyMap() :
mbCT_TblWidth_typeSet( false ),
mnListId( -1 ),
mnListLevel( -1 ),
- mnOutlineLevel( -1 )
+ mnOutlineLevel( 0 )
{
}
/*-- 14.06.2007 13:57:43---------------------------------------------------
diff --git a/writerfilter/source/dmapper/PropertyMap.hxx b/writerfilter/source/dmapper/PropertyMap.hxx
index 9f995ae16cd2..17571222630f 100644
--- a/writerfilter/source/dmapper/PropertyMap.hxx
+++ b/writerfilter/source/dmapper/PropertyMap.hxx
@@ -496,7 +496,7 @@ public:
sal_Int16 GetOutlineLevel() const { return mnOutlineLevel; }
void SetOutlineLevel(sal_Int16 nLevel)
{
- if ( nLevel < WW_OUTLINE_MAX )
+ if ( nLevel <= WW_OUTLINE_MAX )
mnOutlineLevel = nLevel;
}
diff --git a/writerfilter/source/dmapper/StyleSheetTable.cxx b/writerfilter/source/dmapper/StyleSheetTable.cxx
index 960b116ecc4b..acd230ee278c 100644
--- a/writerfilter/source/dmapper/StyleSheetTable.cxx
+++ b/writerfilter/source/dmapper/StyleSheetTable.cxx
@@ -866,7 +866,7 @@ void StyleSheetTable::ApplyStyleSheets( FontTablePtr rFontTable )
aPropValues.realloc( aPropValues.getLength( ) + 1 );
beans::PropertyValue aLvlVal( rPropNameSupplier.GetName( PROP_OUTLINE_LEVEL ), 0,
- uno::makeAny( sal_Int16( pStyleSheetProperties->GetOutlineLevel( ) + 1 ) ),
+ uno::makeAny( sal_Int16( pStyleSheetProperties->GetOutlineLevel( ) ) ),
beans::PropertyState_DIRECT_VALUE );
aPropValues[ aPropValues.getLength( ) - 1 ] = aLvlVal;