writerfilter/source/dmapper/DomainMapper.cxx | 12 +++++------- writerfilter/source/dmapper/DomainMapper_Impl.cxx | 11 ----------- writerfilter/source/dmapper/DomainMapper_Impl.hxx | 3 --- 3 files changed, 5 insertions(+), 21 deletions(-)
New commits: commit fc74cf662ce4c50e9f9e65d843bc5ea85f4e8e4e Author: Andras Timar <andras.ti...@collabora.com> Date: Tue Oct 11 10:39:32 2016 +0200 Revert "tdf#75573 - docx don't remove frame anchor paragraph" This reverts commit a895a7051f2cca37595f755212399843116678c9. diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx index 5a1bcd9..ae201aa 100644 --- a/writerfilter/source/dmapper/DomainMapper.cxx +++ b/writerfilter/source/dmapper/DomainMapper.cxx @@ -3221,18 +3221,16 @@ void DomainMapper::lcl_utext(const sal_uInt8 * data_, size_t len) bool bSingleParagraph = m_pImpl->GetIsFirstParagraphInSection() && m_pImpl->GetIsLastParagraphInSection(); // If the paragraph contains only the section properties and it has // no runs, we should not create a paragraph for it in Writer, unless that would remove the whole section. - bool bRemove = !m_pImpl->GetParaChanged() && m_pImpl->GetParaSectpr() - && !bSingleParagraph - && !m_pImpl->GetIsDummyParaAddedForTableInSection() - && !m_pImpl->GetIsLastParagraphFramed(); - if (bRemove) + bool bRemove = !m_pImpl->GetParaChanged() && m_pImpl->GetParaSectpr() && !bSingleParagraph && !m_pImpl->GetIsDummyParaAddedForTableInSection(); + PropertyMapPtr xContext = bRemove ? m_pImpl->GetTopContextOfType(CONTEXT_PARAGRAPH) : PropertyMapPtr(); + if (xContext) { // tdf#97417 delete numbering of the paragraph // it will be deleted anyway, and the numbering would be copied // to the next paragraph in sw SplitNode and then be applied to // every following paragraph - m_pImpl->GetTopContextOfType(CONTEXT_PARAGRAPH)->Erase(PROP_NUMBERING_RULES); - m_pImpl->GetTopContextOfType(CONTEXT_PARAGRAPH)->Erase(PROP_NUMBERING_LEVEL); + xContext->Erase(PROP_NUMBERING_RULES); + xContext->Erase(PROP_NUMBERING_LEVEL); } m_pImpl->SetParaSectpr(false); m_pImpl->finishParagraph(m_pImpl->GetTopContextOfType(CONTEXT_PARAGRAPH)); diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx index 6ccbb83..40c2e18 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -216,7 +216,6 @@ DomainMapper_Impl::DomainMapper_Impl( m_bIsFirstParaInSection( true ), m_bDummyParaAddedForTableInSection( false ), m_bTextFrameInserted(false), - m_bIsLastParagraphFramed( false ), m_bIsLastParaInSection( false ), m_bIsLastSectionGroup( false ), m_bIsInComments( false ), @@ -1190,16 +1189,6 @@ void DomainMapper_Impl::finishParagraph( PropertyMapPtr pPropertyMap ) } } - if( (pParaContext && pParaContext->IsFrameMode()) - || (IsInHeaderFooter() && GetIsLastParagraphFramed()) ) - { - SetIsLastParagraphFramed(true); - } - else - { - SetIsLastParagraphFramed(false); - } - m_bParaChanged = false; if (!pParaContext || !pParaContext->IsFrameMode()) { // If the paragraph is in a frame, it's not a paragraph of the section itself. diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.hxx b/writerfilter/source/dmapper/DomainMapper_Impl.hxx index 7204c59..b602a70 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.hxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.hxx @@ -436,7 +436,6 @@ private: bool m_bIsFirstParaInSection; bool m_bDummyParaAddedForTableInSection; bool m_bTextFrameInserted; - bool m_bIsLastParagraphFramed; bool m_bIsLastParaInSection; bool m_bIsLastSectionGroup; bool m_bIsInComments; @@ -525,8 +524,6 @@ public: bool GetIsDummyParaAddedForTableInSection() { return m_bDummyParaAddedForTableInSection;} void SetIsTextFrameInserted( bool bIsInserted ); bool GetIsTextFrameInserted() { return m_bTextFrameInserted;} - void SetIsLastParagraphFramed( bool bIsFramed ) { m_bIsLastParagraphFramed = bIsFramed; } - bool GetIsLastParagraphFramed() { return m_bIsLastParagraphFramed; } void SetParaSectpr(bool bParaSectpr); bool GetParaSectpr() { return m_bParaSectpr;} _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits