From a5a875940b231b3da5ea23378aa61fefa0a4ac79 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Tue, 6 Sep 2016 14:49:31 +0100 Subject: if we throw in sw on HoriOrientation::NONE then don't pass it in from rtf MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Ie01cca9b7cc432fc1fe14bb600af5083d6ca6a0d Reviewed-on: https://gerrit.libreoffice.org/28687 Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara --- sw/source/core/unocore/unosett.cxx | 2 +- 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 04e7321b4a0c..7fc5d1eaaa20 100644 --- a/sw/source/core/unocore/unosett.cxx +++ b/sw/source/core/unocore/unosett.cxx @@ -1675,7 +1675,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 a56c98a5825f..560762122d42 100644 --- a/writerfilter/source/dmapper/NumberingManager.cxx +++ b/writerfilter/source/dmapper/NumberingManager.cxx @@ -986,7 +986,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: @@ -1001,9 +1001,12 @@ void ListsManager::lcl_sprm( Sprm& rSprm ) nValue = text::HoriOrientation::RIGHT; break; } - m_pCurrentDefinition->GetCurrentLevel( )->Insert( - PROP_ADJUST, uno::makeAny( nValue ) ); - writerfilter::Reference::Pointer_t pProperties = rSprm.getProps(); + if (nValue != text::HoriOrientation::NONE) + { + m_pCurrentDefinition->GetCurrentLevel( )->Insert( + PROP_ADJUST, uno::makeAny( nValue ) ); + writerfilter::Reference::Pointer_t pProperties = rSprm.getProps(); + } } break; case NS_ooxml::LN_CT_Lvl_pPr: -- cgit