summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Heinisch <andreas.heinisch@yahoo.de>2022-10-27 08:46:46 +0200
committerXisco Fauli <xiscofauli@libreoffice.org>2022-11-02 10:20:53 +0100
commitfab66b3f912462527adfb06870cd52d087485c74 (patch)
treed630300c53eded50f08c460060a445bf21b1da8e
parent378d108b24be3e07c9d1f8cf0148ccf952ddfcb8 (diff)
tdf#151462 - Search for outline node containing the current node
Added unit test Change-Id: I9fcc26527ec2f7e036ee32a709f023fcc50d9e6e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141892 Tested-by: Jenkins Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de> Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142157
-rwxr-xr-xsw/qa/extras/uiwriter/data/tdf151462.odtbin0 -> 17719 bytes
-rw-r--r--sw/qa/extras/uiwriter/uiwriter6.cxx35
2 files changed, 35 insertions, 0 deletions
diff --git a/sw/qa/extras/uiwriter/data/tdf151462.odt b/sw/qa/extras/uiwriter/data/tdf151462.odt
new file mode 100755
index 000000000000..cdd250232e18
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf151462.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/uiwriter6.cxx b/sw/qa/extras/uiwriter/uiwriter6.cxx
index b47da8fb386b..fb3b53c179b8 100644
--- a/sw/qa/extras/uiwriter/uiwriter6.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter6.cxx
@@ -2171,6 +2171,41 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testCaptionShape)
CPPUNIT_ASSERT_EQUAL(1, getShapes());
}
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testTdf151462)
+{
+ createSwDoc(DATA_DIRECTORY, "tdf151462.odt");
+ // xmlDocUniquePtr pLayout = parseLayoutDump();
+ dispatchCommand(mxComponent, ".uno:UpdateAllIndexes", {});
+ Scheduler::ProcessEventsToIdle();
+ xmlDocUniquePtr pLayout = parseLayoutDump();
+ // tdf#151462 - without the fix in place, there would be just the first index entry
+ assertXPath(pLayout,
+ "/root/page[1]/body/txt[2]/anchored/fly/section/txt[1]/SwParaPortion/"
+ "SwLineLayout[1]/SwLinePortion[1]",
+ "portion", "sub one");
+ assertXPath(pLayout,
+ "/root/page[1]/body/txt[2]/anchored/fly/section/txt[2]/SwParaPortion/"
+ "SwLineLayout[1]/SwLinePortion[1]",
+ "portion", "sub two");
+ assertXPath(pLayout,
+ "/root/page[1]/body/txt[2]/anchored/fly/section/txt[3]/SwParaPortion/"
+ "SwLineLayout[1]/SwLinePortion[1]",
+ "portion", "sub three");
+ // tdf#151462 - without the fix in place, there would be just the first index entry
+ assertXPath(pLayout,
+ "/root/page[1]/body/txt[6]/anchored/fly/section/txt[1]/SwParaPortion/"
+ "SwLineLayout[1]/SwLinePortion[1]",
+ "portion", "another sub one");
+ assertXPath(pLayout,
+ "/root/page[1]/body/txt[6]/anchored/fly/section/txt[2]/SwParaPortion/"
+ "SwLineLayout[1]/SwLinePortion[1]",
+ "portion", "another sub two");
+ assertXPath(pLayout,
+ "/root/page[1]/body/txt[6]/anchored/fly/section/txt[3]/SwParaPortion/"
+ "SwLineLayout[1]/SwLinePortion[1]",
+ "portion", "another sub three");
+}
+
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */