summaryrefslogtreecommitdiff
path: root/writerfilter
diff options
context:
space:
mode:
authorOliver-Rainer Wittmann <orw@apache.org>2014-02-25 13:16:12 +0000
committerCaolán McNamara <caolanm@redhat.com>2014-02-25 16:12:24 +0000
commitc30fb7d7269b5bdd1853ac22120f57aa2bfd13a5 (patch)
tree3c26bdd39db65c69a4eced2197c3735edc02779e /writerfilter
parent011df3eeee8bb218af4a6e3b1df40a7f03202fbc (diff)
Related: #i124106# correct handling of page break attributes
i.e. those which are providing the default value explicitly (cherry picked from commit 5a15ef3da683566d7bd443f96eeec3a9a3f70aeb) Conflicts: writerfilter/source/dmapper/DomainMapper.cxx writerfilter/source/dmapper/PropertyMap.cxx Change-Id: Ib8721f2fce060d26ee75b0515b3bf62a603fd40c
Diffstat (limited to 'writerfilter')
-rw-r--r--writerfilter/source/dmapper/DomainMapper.cxx7
1 files changed, 5 insertions, 2 deletions
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx
index f110e83b2328..87c87619c866 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -984,7 +984,7 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext, SprmType
SectionPropertyMap * pSectionContext = m_pImpl->GetSectionContext();
Value::Pointer_t pValue = rSprm.getValue();
sal_Int32 nIntValue = pValue->getInt();
- OUString sStringValue = pValue->getString();
+ const OUString sStringValue = pValue->getString();
PropertyNameSupplier& rPropNameSupplier = PropertyNameSupplier::GetPropertyNameSupplier();
switch(nSprmId)
@@ -1002,7 +1002,10 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext, SprmType
rContext->Insert(PROP_PARA_KEEP_TOGETHER, uno::makeAny( nIntValue ? true : false) );
break;
case NS_ooxml::LN_CT_PPrBase_pageBreakBefore:
- rContext->Insert(PROP_BREAK_TYPE, uno::makeAny( com::sun::star::style::BreakType_PAGE_BEFORE ) );
+ if ( nIntValue == 1 )
+ {
+ rContext->Insert(PROP_BREAK_TYPE, uno::makeAny( com::sun::star::style::BreakType_PAGE_BEFORE ) );
+ }
break;
case NS_ooxml::LN_CT_NumPr_ilvl:
if (nIntValue < 0 || 10 <= nIntValue) // Writer can't do everything