summaryrefslogtreecommitdiff
path: root/writerfilter
diff options
context:
space:
mode:
authorJustin Luth <justin.luth@collabora.com>2023-02-14 19:06:12 -0500
committerJustin Luth <jluth@mail.com>2023-03-08 20:18:00 +0000
commit33f2003de7788b68734a72f8e6253da66d50935e (patch)
treea7faa6bd9423f6d7e4c975168593b89844e988c5 /writerfilter
parentccdbe03850ba97476c51ed38f7ef100ad9cef5b6 (diff)
tdf#153613 writerfilter: anchors ignore prior run with page break
Although an image that is INLINE with the text DOES move to the following page when it is preceded by a w:br, an anchored image does not (when it is the last property in the paragraph). make CppunitTest_sw_ooxmlexport18 CPPUNIT_TEST_NAME=testTdf153613_anchoredAfterPgBreak make CppunitTest_sw_ooxmlexport18 CPPUNIT_TEST_NAME=testTdf153613_inlineAfterPgBreak I also tested with <w:t>x<</w:t> following the anchor and it already works correctly. make CppunitTest_sw_ooxmlexport18 CPPUNIT_TEST_NAME=testTdf153613_anchoredAfterPgBreak2 I also tested with <w:splitPgBreakAndParaMark/> and it already works correctly. make CppunitTest_sw_ooxmlexport18 CPPUNIT_TEST_NAME=testTdf153613_anchoredAfterPgBreak3 Change-Id: Ibf9c0d38c4dfe56db4e05416a40e3b7881693b17 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147032 Tested-by: Jenkins Reviewed-by: Justin Luth <jluth@mail.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147177 Tested-by: Justin Luth <jluth@mail.com>
Diffstat (limited to 'writerfilter')
-rw-r--r--writerfilter/source/dmapper/DomainMapper.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx
index 86753083a154..a9e35622a966 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -2550,7 +2550,8 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, const PropertyMapPtr& rContext )
if ( m_pImpl->IsDiscardHeaderFooter() )
break;
//tdf112342: Break before images as well, if there are page break
- if (m_pImpl->isBreakDeferred(BreakType::PAGE_BREAK))
+ if (m_pImpl->isBreakDeferred(BreakType::PAGE_BREAK)
+ && nSprmId == NS_ooxml::LN_inline_inline)
{
m_pImpl->GetTopContextOfType(CONTEXT_PARAGRAPH)
->Insert(PROP_BREAK_TYPE, uno::Any(style::BreakType_PAGE_BEFORE));