diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-09-22 10:42:41 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-09-22 11:07:21 +0200 |
commit | ce5dd8647083c944fb298c491fb526dad17a8a1a (patch) | |
tree | 55771d1ddadc5e9f86c4f97c274d64b42ba82c0d /writerfilter | |
parent | b9f187055394713fbc58d149c6ea98fe13dbadd5 (diff) |
DOCX import: ignore SDT as well in to-be-discarded header/footer
Change-Id: I53388e8b8ca71a3ad5d0b3e22dd60c642cb1f4b7
Diffstat (limited to 'writerfilter')
-rw-r--r-- | writerfilter/source/dmapper/DomainMapper.cxx | 6 | ||||
-rw-r--r-- | writerfilter/source/dmapper/DomainMapper_Impl.cxx | 5 | ||||
-rw-r--r-- | writerfilter/source/dmapper/DomainMapper_Impl.hxx | 2 |
3 files changed, 13 insertions, 0 deletions
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx index 5fd818c6eccc..6d07ca6bfd12 100644 --- a/writerfilter/source/dmapper/DomainMapper.cxx +++ b/writerfilter/source/dmapper/DomainMapper.cxx @@ -2976,6 +2976,12 @@ void DomainMapper::lcl_utext(const sal_uInt8 * data_, size_t len) { // there are unsupported SDT properties in the document // save them in the paragraph interop grab bag + if (m_pImpl->IsDiscardHeaderFooter()) + { + // Unless we're supposed to ignore this header/footer. + m_pImpl->m_pSdtHelper->getInteropGrabBagAndClear(); + return; + } if((m_pImpl->m_pSdtHelper->containedInInteropGrabBag("ooxml:CT_SdtPr_checkbox") || m_pImpl->m_pSdtHelper->containedInInteropGrabBag("ooxml:CT_SdtPr_text") || m_pImpl->m_pSdtHelper->containedInInteropGrabBag("ooxml:CT_SdtPr_dataBinding") || diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx index 657c279078e6..7e68473c4eaa 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -2034,6 +2034,11 @@ bool DomainMapper_Impl::IsSdtEndBefore() return bIsSdtEndBefore; } +bool DomainMapper_Impl::IsDiscardHeaderFooter() +{ + return m_bDiscardHeaderFooter; +} + sal_Int16 lcl_ParseNumberingType( const OUString& rCommand ) { sal_Int16 nRet = style::NumberingType::PAGE_DESCRIPTOR; diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.hxx b/writerfilter/source/dmapper/DomainMapper_Impl.hxx index 2376f3c5b2dd..2360a4644736 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.hxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.hxx @@ -827,6 +827,8 @@ public: /// Check if "SdtEndBefore" property is set bool IsSdtEndBefore(); + bool IsDiscardHeaderFooter(); + private: void PushPageHeaderFooter(bool bHeader, SectionPropertyMap::PageType eType); std::vector<css::uno::Reference< css::drawing::XShape > > m_vTextFramesForChaining ; |