summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2016-09-06 14:49:31 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2016-09-08 15:08:44 +0000
commit0ac170beb986997d57fd14c7dcdfff8f46820699 (patch)
tree50807e121f3e3b5991e92389fc18897d79c246b9
parent3c51f207747150933c6725fa22af1682cf066d8c (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/28690 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
-rw-r--r--sw/source/core/unocore/unosett.cxx2
-rw-r--r--writerfilter/source/dmapper/NumberingManager.cxx11
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: