summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/qa/extras/layout/data/tdf104254.docxbin30961 -> 0 bytes
-rw-r--r--sw/qa/extras/layout/layout.cxx18
-rw-r--r--sw/qa/extras/odfexport/data/tdf104254_noHeaderWrapping.odtbin0 -> 63167 bytes
-rw-r--r--sw/qa/extras/odfexport/odfexport2.cxx10
-rw-r--r--sw/qa/extras/ww8export/data/tdf64997.docbin62464 -> 0 bytes
-rw-r--r--sw/qa/extras/ww8export/data/tdf96840.docbin133632 -> 0 bytes
-rw-r--r--sw/qa/extras/ww8export/ww8export3.cxx14
-rw-r--r--sw/source/core/text/txtfly.cxx8
8 files changed, 13 insertions, 37 deletions
diff --git a/sw/qa/extras/layout/data/tdf104254.docx b/sw/qa/extras/layout/data/tdf104254.docx
deleted file mode 100644
index a074db337024..000000000000
--- a/sw/qa/extras/layout/data/tdf104254.docx
+++ /dev/null
Binary files differ
diff --git a/sw/qa/extras/layout/layout.cxx b/sw/qa/extras/layout/layout.cxx
index 4940a37e41c4..12fb7c421967 100644
--- a/sw/qa/extras/layout/layout.cxx
+++ b/sw/qa/extras/layout/layout.cxx
@@ -3253,24 +3253,6 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf124770)
assertXPath(pXmlDoc, "/root/page/body/txt[1]/LineBreak", 1);
}
-CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTextWrappingInHeader)
-{
- SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf104254.docx");
-
- std::shared_ptr<GDIMetaFile> xMetaFile = pDoc->GetDocShell()->GetPreviewMetaFile();
- MetafileXmlDump dumper;
- xmlDocUniquePtr pXmlDoc = dumpAndParse(dumper, *xMetaFile);
- CPPUNIT_ASSERT(pXmlDoc);
- assertXPath(pXmlDoc, "/metafile/push[1]/push[1]/push[1]/textarray", 2);
-
- // Make sure the header image does not block any of the header text.
- // Without the accompanying fix in place, this test would have failed with:
- // - Expected: > 3000
- // - Actual : 2009
- OUString sTextArrayX = getXPath(pXmlDoc, "/metafile/push[1]/push[1]/push[1]/textarray[1]", "x");
- CPPUNIT_ASSERT(sTextArrayX.toUInt32() > 3000);
-}
-
CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testContinuousEndnotesInsertPageAtStart)
{
// Create a new document with CONTINUOUS_ENDNOTES enabled.
diff --git a/sw/qa/extras/odfexport/data/tdf104254_noHeaderWrapping.odt b/sw/qa/extras/odfexport/data/tdf104254_noHeaderWrapping.odt
new file mode 100644
index 000000000000..06dde4802b43
--- /dev/null
+++ b/sw/qa/extras/odfexport/data/tdf104254_noHeaderWrapping.odt
Binary files differ
diff --git a/sw/qa/extras/odfexport/odfexport2.cxx b/sw/qa/extras/odfexport/odfexport2.cxx
index bbe5d7f193e7..68571cd8b863 100644
--- a/sw/qa/extras/odfexport/odfexport2.cxx
+++ b/sw/qa/extras/odfexport/odfexport2.cxx
@@ -39,6 +39,16 @@ DECLARE_ODFEXPORT_TEST(testTdf52065_centerTabs, "testTdf52065_centerTabs.odt")
CPPUNIT_ASSERT_EQUAL(OUString(u"Pečiatka zamestnávateľa"), parseDump("//body/txt[4]/Text[4]", "Portion"));
}
+DECLARE_ODFEXPORT_TEST(testTdf104254_noHeaderWrapping, "tdf104254_noHeaderWrapping.odt")
+{
+ xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+
+ sal_Int32 nParaHeight = getXPath(pXmlDoc, "//header/txt[1]/infos/bounds", "height").toInt32();
+ // The wrapping on header images is supposed to be ignored (since OOo for MS compat reasons),
+ // thus making the text run underneath the image. Before, height was 1104. Now it is 552.
+ CPPUNIT_ASSERT_MESSAGE("Paragraph should fit on a single line", nParaHeight < 600);
+}
+
DECLARE_ODFEXPORT_TEST(testTdf137199, "tdf137199.docx")
{
CPPUNIT_ASSERT_EQUAL(OUString(">1<"), getProperty<OUString>(getParagraph(1), "ListLabelString"));
diff --git a/sw/qa/extras/ww8export/data/tdf64997.doc b/sw/qa/extras/ww8export/data/tdf64997.doc
deleted file mode 100644
index d17ef5b84e26..000000000000
--- a/sw/qa/extras/ww8export/data/tdf64997.doc
+++ /dev/null
Binary files differ
diff --git a/sw/qa/extras/ww8export/data/tdf96840.doc b/sw/qa/extras/ww8export/data/tdf96840.doc
deleted file mode 100644
index 02cc7559dd55..000000000000
--- a/sw/qa/extras/ww8export/data/tdf96840.doc
+++ /dev/null
Binary files differ
diff --git a/sw/qa/extras/ww8export/ww8export3.cxx b/sw/qa/extras/ww8export/ww8export3.cxx
index b153f8abee5d..0332e023c3ed 100644
--- a/sw/qa/extras/ww8export/ww8export3.cxx
+++ b/sw/qa/extras/ww8export/ww8export3.cxx
@@ -291,20 +291,6 @@ DECLARE_WW8EXPORT_TEST(testTdf122460_header, "tdf122460_header.odt")
CPPUNIT_ASSERT(headerIsOn);
}
-DECLARE_WW8EXPORT_TEST(testTdf96840, "tdf96840.doc")
-{
- // Without the fix in place, this test would have hung at import time
- CPPUNIT_ASSERT_EQUAL(3, getPages());
- CPPUNIT_ASSERT_EQUAL(4, getShapes());
-}
-
-DECLARE_WW8EXPORT_TEST(testTdf64997, "tdf64997.doc")
-{
- // Without the fix in place, this test would have hung at import time
- CPPUNIT_ASSERT_EQUAL(1, getPages());
- CPPUNIT_ASSERT_EQUAL(4, getShapes());
-}
-
DECLARE_WW8EXPORT_TEST(testTdf139495_tinyHeader, "tdf139495_tinyHeader.doc")
{
// In Word 2003, this is one page, but definitely not six pages.
diff --git a/sw/source/core/text/txtfly.cxx b/sw/source/core/text/txtfly.cxx
index d91d41ae4a01..2daaf4ac6d6c 100644
--- a/sw/source/core/text/txtfly.cxx
+++ b/sw/source/core/text/txtfly.cxx
@@ -843,8 +843,7 @@ SwAnchoredObjList* SwTextFly::InitAnchoredObjList()
const bool bAllowCompatWrap = m_pCurrFrame->IsInTab() && (bFooterHeader || m_pCurrFrame->IsInFootnote());
const bool bWrapAllowed = ( pIDSA->get(DocumentSettingId::USE_FORMER_TEXT_WRAPPING) ||
bAllowCompatWrap ||
- (!m_pCurrFrame->IsInFootnote() && !bFooterHeader) ||
- bFooterHeader );
+ (!m_pCurrFrame->IsInFootnote() && !bFooterHeader));
m_bOn = false;
@@ -886,14 +885,12 @@ SwAnchoredObjList* SwTextFly::InitAnchoredObjList()
// #i20505# Do not consider oversized objects
SwAnchoredObject* pAnchoredObj = (*pSorted)[ i ];
assert(pAnchoredObj);
- const SwFormatSurround &rFlyFormat = pAnchoredObj->GetFrameFormat().GetSurround();
if ( !pAnchoredObj ||
!rIDDMA.IsVisibleLayerId( pAnchoredObj->GetDrawObj()->GetLayer() ) ||
!pAnchoredObj->ConsiderForTextWrap() ||
( mbIgnoreObjsInHeaderFooter && !bFooterHeader &&
pAnchoredObj->GetAnchorFrame()->FindFooterOrHeader() ) ||
- ( bAllowCompatWrap && !pAnchoredObj->GetFrameFormat().GetFollowTextFlow().GetValue() ) ||
- ( !bAllowCompatWrap && bFooterHeader && com::sun::star::text::WrapTextMode_NONE == rFlyFormat.GetSurround() )
+ ( bAllowCompatWrap && !pAnchoredObj->GetFrameFormat().GetFollowTextFlow().GetValue() )
)
{
continue;
@@ -931,6 +928,7 @@ SwAnchoredObjList* SwTextFly::InitAnchoredObjList()
mpAnchoredObjList->insert( aInsPosIter, pAnchoredObj );
}
+ const SwFormatSurround &rFlyFormat = pAnchoredObj->GetFrameFormat().GetSurround();
// #i68520#
if ( rFlyFormat.IsAnchorOnly() &&
pAnchoredObj->GetAnchorFrame() == GetMaster() )