diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2022-02-11 19:41:37 +0900 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2022-03-09 09:17:15 +0100 |
commit | 71e3f7fd397b8976878c7650fa44ec9289479dad (patch) | |
tree | 79860c8d1b04a484bab66dfd3e2e6027b51962e5 /sw/qa/extras/layout | |
parent | c904aab20ff0ce64a589a691e580e02473597306 (diff) |
chart2: Break labels text and limit the size to the axis size
Previously a long label wouldn't be broken into multiple lines
and be limited to the axis size if the chart sizing was automatic.
This would cause the label to distort the whole chart and make the
chart area very narrow. With this change the label text is limited
to the axis width and gets broken into multiple lines if this is
necessary.
BarChartVeryLongLabel.odp provides a test document which includes
automatic size and fixed size chart are. We make sure the area
that the label text occupies is not larger than the chart wall
size.
Change-Id: If58bfa3e51ab68f720f22df5416ae305401bcd34
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129814
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
(cherry picked from commit ca22f1ce703c1d03fc1b1ed1f5ac1fc903b09e6f)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129900
Reviewed-by: Dennis Francis <dennis.francis@collabora.com>
Diffstat (limited to 'sw/qa/extras/layout')
-rw-r--r-- | sw/qa/extras/layout/layout2.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sw/qa/extras/layout/layout2.cxx b/sw/qa/extras/layout/layout2.cxx index 48957b22a103..466f640beeee 100644 --- a/sw/qa/extras/layout/layout2.cxx +++ b/sw/qa/extras/layout/layout2.cxx @@ -948,7 +948,7 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter2, testHorizontal_multilevel) sal_Int32 nYposition = getXPath(pXmlDoc, "/metafile/push[1]/push[1]/push[1]/push[3]/push[1]/textarray[7]", "y") .toInt32(); - CPPUNIT_ASSERT_DOUBLES_EQUAL(7945, nYposition, 20); + CPPUNIT_ASSERT_DOUBLES_EQUAL(8057, nYposition, 20); } CPPUNIT_TEST_FIXTURE(SwLayoutWriter2, testTdf138194) |