diff options
-rw-r--r-- | sw/source/core/unocore/unosett.cxx | 2 | ||||
-rw-r--r-- | writerfilter/source/dmapper/NumberingManager.cxx | 11 |
2 files changed, 8 insertions, 5 deletions
diff --git a/sw/source/core/unocore/unosett.cxx b/sw/source/core/unocore/unosett.cxx index b3a55713c4e4..da269dc1ebc7 100644 --- a/sw/source/core/unocore/unosett.cxx +++ b/sw/source/core/unocore/unosett.cxx @@ -1678,7 +1678,7 @@ void SwXNumberingRules::SetPropertiesToNumFormat( { case 0: //"Adjust" { - sal_Int16 nValue = 0; + sal_Int16 nValue = text::HoriOrientation::NONE; pProp->Value >>= nValue; if(nValue > 0 && nValue <= text::HoriOrientation::LEFT && diff --git a/writerfilter/source/dmapper/NumberingManager.cxx b/writerfilter/source/dmapper/NumberingManager.cxx index c9275755f41e..66485131886a 100644 --- a/writerfilter/source/dmapper/NumberingManager.cxx +++ b/writerfilter/source/dmapper/NumberingManager.cxx @@ -989,7 +989,7 @@ void ListsManager::lcl_sprm( Sprm& rSprm ) break; case NS_ooxml::LN_CT_Lvl_lvlJc: { - sal_Int16 nValue = 0; + sal_Int16 nValue = text::HoriOrientation::NONE; switch (nIntValue) { case NS_ooxml::LN_Value_ST_Jc_left: @@ -1004,9 +1004,12 @@ void ListsManager::lcl_sprm( Sprm& rSprm ) nValue = text::HoriOrientation::RIGHT; break; } - m_pCurrentDefinition->GetCurrentLevel( )->Insert( - PROP_ADJUST, uno::makeAny( nValue ) ); - writerfilter::Reference<Properties>::Pointer_t pProperties = rSprm.getProps(); + if (nValue != text::HoriOrientation::NONE) + { + m_pCurrentDefinition->GetCurrentLevel( )->Insert( + PROP_ADJUST, uno::makeAny( nValue ) ); + writerfilter::Reference<Properties>::Pointer_t pProperties = rSprm.getProps(); + } } break; case NS_ooxml::LN_CT_Lvl_pPr: |