summaryrefslogtreecommitdiff
path: root/svx/qa
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2024-02-04 13:15:01 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2024-02-12 11:36:05 +0100
commit3b83c6ac804cf7adcea036d1fb7dda113a72f457 (patch)
tree8f1af5f06f236a1dcb9ca313f3dedd3aa8c16390 /svx/qa
parent582ef812702413dbe7fb0f132bca3e3e4c2e1d40 (diff)
make BufferedDecompositionPrimitive2D store a Primitive2DReference..
.. instead of a Primitive2DContainer. The container very frequently contains only a single item, since the decomposition method often sticks only a single top-level node in there, so it turns out to be a net loss overall, memory consumption-wise. Also, if we return a single Primitive2DReference from a BufferedDecomposition, that maximises the sharing of data between the BufferedDecomposition objects at the bottom of the decomposed tree, and objects higher up. Change-Id: Iaf272e60e2997299cc35a1bd209c51b6b79e9a8b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162976 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx/qa')
-rw-r--r--svx/qa/unit/svdraw.cxx10
-rw-r--r--svx/qa/unit/table.cxx4
2 files changed, 7 insertions, 7 deletions
diff --git a/svx/qa/unit/svdraw.cxx b/svx/qa/unit/svdraw.cxx
index fad66727e9fb..969f1256704f 100644
--- a/svx/qa/unit/svdraw.cxx
+++ b/svx/qa/unit/svdraw.cxx
@@ -288,7 +288,7 @@ CPPUNIT_TEST_FIXTURE(SvdrawTest, testRectangleObject)
assertXPath(pXmlDoc, "/primitive2D"_ostr, 1);
- OString aBasePath("/primitive2D/sdrrectangle/polypolygoncolor"_ostr);
+ OString aBasePath("/primitive2D/sdrrectangle/group/polypolygoncolor"_ostr);
assertXPath(pXmlDoc, aBasePath, "color"_ostr, "#729fcf");
assertXPath(pXmlDoc, aBasePath + "/polypolygon", "height"_ostr,
@@ -299,7 +299,7 @@ CPPUNIT_TEST_FIXTURE(SvdrawTest, testRectangleObject)
assertXPath(pXmlDoc, aBasePath + "/polypolygon", "maxx"_ostr, "99");
assertXPath(pXmlDoc, aBasePath + "/polypolygon", "maxy"_ostr, "99");
- aBasePath = "/primitive2D/sdrrectangle/polypolygoncolor/polypolygon/polygon"_ostr;
+ aBasePath = "/primitive2D/sdrrectangle/group/polypolygoncolor/polypolygon/polygon"_ostr;
assertXPath(pXmlDoc, aBasePath + "/point", 5);
assertXPath(pXmlDoc, aBasePath + "/point[1]", "x"_ostr, "49.5"); // hmm, weird, why?
@@ -313,7 +313,7 @@ CPPUNIT_TEST_FIXTURE(SvdrawTest, testRectangleObject)
assertXPath(pXmlDoc, aBasePath + "/point[5]", "x"_ostr, "99");
assertXPath(pXmlDoc, aBasePath + "/point[5]", "y"_ostr, "99");
- aBasePath = "/primitive2D/sdrrectangle/polygonstroke"_ostr;
+ aBasePath = "/primitive2D/sdrrectangle/group/polygonstroke"_ostr;
assertXPath(pXmlDoc, aBasePath, 1);
assertXPath(pXmlDoc, aBasePath + "/line", "color"_ostr, "#3465a4");
@@ -397,7 +397,7 @@ CPPUNIT_TEST_FIXTURE(SvdrawTest, testTdf148000_EOLinCurvedText)
xmlDocUniquePtr pXmlDoc = lcl_dumpAndParseFirstObjectWithAssert(pSdrPage);
// this is a group shape, hence 2 nested objectinfo
- OString aBasePath = "/primitive2D/objectinfo[4]/objectinfo/unhandled/unhandled/"
+ OString aBasePath = "/primitive2D/objectinfo[4]/objectinfo/unhandled/group/unhandled/group/"
"polypolygoncolor/polypolygon/"_ostr;
// The text is: "O" + eop + "O" + eol + "O"
@@ -439,7 +439,7 @@ CPPUNIT_TEST_FIXTURE(SvdrawTest, testTdf148000_CurvedTextWidth)
xmlDocUniquePtr pXmlDoc = lcl_dumpAndParseFirstObjectWithAssert(pSdrPage);
- OString aBasePath = "/primitive2D/objectinfo[4]/objectinfo/unhandled/unhandled/"
+ OString aBasePath = "/primitive2D/objectinfo[4]/objectinfo/unhandled/group/unhandled/group/"
"polypolygoncolor/polypolygon/"_ostr;
// The text is: 7 line od "OOOOOOO"
diff --git a/svx/qa/unit/table.cxx b/svx/qa/unit/table.cxx
index e5abaeb06e57..aa862e0e33a4 100644
--- a/svx/qa/unit/table.cxx
+++ b/svx/qa/unit/table.cxx
@@ -96,9 +96,9 @@ CPPUNIT_TEST_FIXTURE(Test, testTableShadowBlur)
assertXPath(pDocument, "//objectinfo/group/sdrCell[1]/unifiedtransparence"_ostr, 0);
assertXPath(pDocument, "//objectinfo/group/sdrCell[2]/unifiedtransparence"_ostr, 0);
- assertXPath(pDocument, "//objectinfo/group/sdrCell[3]/unifiedtransparence"_ostr,
+ assertXPath(pDocument, "//objectinfo/group/sdrCell[3]/group/unifiedtransparence"_ostr,
"transparence"_ostr, "80");
- assertXPath(pDocument, "//objectinfo/group/sdrCell[4]/unifiedtransparence"_ostr,
+ assertXPath(pDocument, "//objectinfo/group/sdrCell[4]/group/unifiedtransparence"_ostr,
"transparence"_ostr, "80");
}