diff options
author | Caolán McNamara <caolanm@redhat.com> | 2016-09-06 14:49:31 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2016-09-06 14:26:12 +0000 |
commit | a5a875940b231b3da5ea23378aa61fefa0a4ac79 (patch) | |
tree | 2f8176f737990afc2adb1fa7052b4cba5422c122 | |
parent | f7dd958ad383c31fe380273d4a59e24fe6fe8caf (diff) |
if we throw in sw on HoriOrientation::NONE then don't pass it in from rtf
Change-Id: Ie01cca9b7cc432fc1fe14bb600af5083d6ca6a0d
Reviewed-on: https://gerrit.libreoffice.org/28687
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
-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 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<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: |