diff options
author | Miklos Vajna <vmiklos@suse.cz> | 2012-06-15 15:09:53 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@suse.cz> | 2012-06-15 15:34:14 +0200 |
commit | 975e916421f46e913f0fec1b8a9372ac3dc57382 (patch) | |
tree | e73d99dca8b7c7c04b73cea02b6184b52fcf41cb /writerfilter | |
parent | fd9827e7353111563b91f66b3dfe3f54a61628e2 (diff) |
n#750935 fix docx import of w:evenAndOddHeaders
Change-Id: I172073bac10e8d0449c0f5c0a226dd7ace013376
Diffstat (limited to 'writerfilter')
-rw-r--r-- | writerfilter/source/dmapper/DomainMapper_Impl.cxx | 4 | ||||
-rw-r--r-- | writerfilter/source/dmapper/SettingsTable.cxx | 10 | ||||
-rw-r--r-- | writerfilter/source/dmapper/SettingsTable.hxx | 2 |
3 files changed, 14 insertions, 2 deletions
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx index 546613a97034..165fd2fb44f3 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -1271,7 +1271,7 @@ void DomainMapper_Impl::PushPageHeader(SectionPropertyMap::PageType eType) uno::makeAny(sal_True) ); // if a left header is available then header are not shared bool bLeft = eType == SectionPropertyMap::PAGE_LEFT; - if( bLeft ) + if( bLeft && m_pSettingsTable->GetEvenAndOddHeaders()) xPageStyle->setPropertyValue(rPropNameSupplier.GetName(PROP_HEADER_IS_SHARED), uno::makeAny( false )); //set the interface @@ -1310,7 +1310,7 @@ void DomainMapper_Impl::PushPageFooter(SectionPropertyMap::PageType eType) uno::makeAny(sal_True) ); // if a left header is available then footer is not shared bool bLeft = eType == SectionPropertyMap::PAGE_LEFT; - if( bLeft ) + if( bLeft && m_pSettingsTable->GetEvenAndOddHeaders()) xPageStyle->setPropertyValue(rPropNameSupplier.GetName(PROP_FOOTER_IS_SHARED), uno::makeAny( false )); //set the interface uno::Reference< text::XText > xFooterText; diff --git a/writerfilter/source/dmapper/SettingsTable.cxx b/writerfilter/source/dmapper/SettingsTable.cxx index ab89c6a3c143..2a69cc67ab5a 100644 --- a/writerfilter/source/dmapper/SettingsTable.cxx +++ b/writerfilter/source/dmapper/SettingsTable.cxx @@ -76,6 +76,7 @@ struct SettingsTable_Impl ::rtl::OUString m_sSalt; bool m_bLinkStyles; sal_Int16 m_nZoomFactor; + bool m_bEvenAndOddHeaders; SettingsTable_Impl( DomainMapper& rDMapper, const uno::Reference< lang::XMultiServiceFactory > xTextFactory ) : m_rDMapper( rDMapper ) @@ -94,6 +95,7 @@ struct SettingsTable_Impl , m_nCryptSpinCount(0) , m_bLinkStyles(false) , m_nZoomFactor(0) + , m_bEvenAndOddHeaders(false) {} }; @@ -165,6 +167,9 @@ void SettingsTable::lcl_sprm(Sprm& rSprm) case NS_ooxml::LN_CT_Settings_linkStyles: // 92663; m_pImpl->m_bLinkStyles = nIntValue; break; + case NS_ooxml::LN_CT_Settings_evenAndOddHeaders: + m_pImpl->m_bEvenAndOddHeaders = nIntValue; + break; case NS_ooxml::LN_CT_Settings_noPunctuationKerning: // 92526; m_pImpl->m_bNoPunctuationKerning = nIntValue ? true : false; break; @@ -230,6 +235,11 @@ sal_Int16 SettingsTable::GetZoomFactor() const return m_pImpl->m_nZoomFactor; } +bool SettingsTable::GetEvenAndOddHeaders() const +{ + return m_pImpl->m_bEvenAndOddHeaders; +} + void SettingsTable::ApplyProperties( uno::Reference< text::XTextDocument > xDoc ) { uno::Reference< beans::XPropertySet> xDocProps( xDoc, uno::UNO_QUERY ); diff --git a/writerfilter/source/dmapper/SettingsTable.hxx b/writerfilter/source/dmapper/SettingsTable.hxx index 3d9a5603f321..2c43ec68710e 100644 --- a/writerfilter/source/dmapper/SettingsTable.hxx +++ b/writerfilter/source/dmapper/SettingsTable.hxx @@ -70,6 +70,8 @@ class WRITERFILTER_DLLPRIVATE SettingsTable : public LoggedProperties, public Lo /// What's the zoom factor set in percents? sal_Int16 GetZoomFactor() const; + bool GetEvenAndOddHeaders() const; + void ApplyProperties( uno::Reference< text::XTextDocument > xDoc ); private: |