summaryrefslogtreecommitdiffstats
path: root/sw/qa/extras/layout/layout.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/qa/extras/layout/layout.cxx')
-rw-r--r--sw/qa/extras/layout/layout.cxx66
1 files changed, 66 insertions, 0 deletions
diff --git a/sw/qa/extras/layout/layout.cxx b/sw/qa/extras/layout/layout.cxx
index 8f6ca8a92580..d7b936aa89e8 100644
--- a/sw/qa/extras/layout/layout.cxx
+++ b/sw/qa/extras/layout/layout.cxx
@@ -1197,6 +1197,72 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf138039)
assertXPath(pXmlDoc, "/root/page[3]/body/txt[1]/anchored", 0);
}
+CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf143239)
+{
+ SwDoc* pDoc = createDoc("tdf143239-1-min.odt");
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+
+ {
+ xmlDocPtr pXmlDoc = parseLayoutDump();
+ assertXPath(pXmlDoc, "/root/page[2]/body/txt[1]/anchored/fly", 1);
+ assertXPath(pXmlDoc, "/root/page[2]/body/txt[1]/anchored/fly[1]/infos/bounds", "top",
+ "18540");
+#ifndef MACOSX
+ assertXPath(pXmlDoc, "/root/page[2]/body/txt[1]/anchored/fly[1]/infos/bounds", "left",
+ "3559");
+#endif
+ assertXPath(pXmlDoc, "/root/page[2]/body/txt[2]/anchored/fly", 1);
+ assertXPath(pXmlDoc, "/root/page[2]/body/txt[2]/anchored/fly[1]/infos/bounds", "top",
+ "23894");
+#ifndef MACOSX
+ assertXPath(pXmlDoc, "/root/page[2]/body/txt[2]/anchored/fly[1]/infos/bounds", "left",
+ "1964");
+#endif
+ assertXPath(pXmlDoc, "/root/page[3]/body/txt[1]/anchored/fly", 1);
+ assertXPath(pXmlDoc, "/root/page[3]/body/txt[1]/anchored/fly[1]/infos/bounds", "top",
+ "35662");
+#ifndef MACOSX
+ assertXPath(pXmlDoc, "/root/page[3]/body/txt[1]/anchored/fly[1]/infos/bounds", "left",
+ "3129");
+#endif
+ assertXPath(pXmlDoc, "/root/page", 3);
+ discardDumpedLayout();
+ }
+
+ pWrtShell->SelAll();
+ pWrtShell->Delete();
+ pWrtShell->Undo();
+ Scheduler::ProcessEventsToIdle();
+
+ {
+ xmlDocPtr pXmlDoc = parseLayoutDump();
+ // now the 1st fly was on page 1, and the fly on page 2 was the 2nd one
+ assertXPath(pXmlDoc, "/root/page[2]/body/txt[1]/anchored/fly", 1);
+ assertXPath(pXmlDoc, "/root/page[2]/body/txt[1]/anchored/fly[1]/infos/bounds", "top",
+ "18540");
+#ifndef MACOSX
+ assertXPath(pXmlDoc, "/root/page[2]/body/txt[1]/anchored/fly[1]/infos/bounds", "left",
+ "3559");
+#endif
+ assertXPath(pXmlDoc, "/root/page[2]/body/txt[2]/anchored/fly", 1);
+ assertXPath(pXmlDoc, "/root/page[2]/body/txt[2]/anchored/fly[1]/infos/bounds", "top",
+ "23894");
+#ifndef MACOSX
+ assertXPath(pXmlDoc, "/root/page[2]/body/txt[2]/anchored/fly[1]/infos/bounds", "left",
+ "1964");
+#endif
+ assertXPath(pXmlDoc, "/root/page[3]/body/txt[1]/anchored/fly", 1);
+ assertXPath(pXmlDoc, "/root/page[3]/body/txt[1]/anchored/fly[1]/infos/bounds", "top",
+ "35662");
+#ifndef MACOSX
+ assertXPath(pXmlDoc, "/root/page[3]/body/txt[1]/anchored/fly[1]/infos/bounds", "left",
+ "3129");
+#endif
+ assertXPath(pXmlDoc, "/root/page", 3);
+ discardDumpedLayout();
+ }
+}
+
CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTableOverlapFooterFly)
{
// Load a document that has a fly anchored in the footer.