Files
loongoffice/chart2
Justin Luth 9833ac64c4 tdf#146756 pie chart2 import: use consistent outside-label max text len
This is a followup to commit 85f4395b6f40c0295a190cca09ecd51858fc3b31.

Although there is no pressing need for this patch in my opinion,
it DOES fix a 7.1 regression in importing MSO charts with long labels.
MSO wraps text at 1/5 the width of the chart.

7.1 Regression commit 75a8b367f2a06e0d485fc2b9f4472e8bb29d71e3
Author: Balazs Varga on Tue Aug 25 12:32:02 2020 +0200
    tdf#136105 tdf#134883 pie chart: improve data label position

Before Balazs' commit, the text width for everything was simply
fTextMaximumFrameWidth = 0.8 * fPieRadius.

I personally think Balazs' no wrapping looks better
(for outside labels, when there is enough space)
but in order to be consistent with how we handle
wrapping for bestFit-that-didn't-fit labels,
and to have our charts be as interoperable with OOXML as possible,
it makes good sense to use the same logic as the previous patch here.

Interestingly, Balazs broke some unit tests that specifically
were testing to make sure that text wrapping existed.

Fixed: // text wrap: wrap all text labels except Yellow one
make CppunitTest_chart2_xshape CPPUNIT_TEST_NAME=testPieChartLabels2

Fixed: // text wrap: wrap no text label except Yellow one
make CppunitTest_chart2_xshape CPPUNIT_TEST_NAME=testPieChartLabels3

Interestingly, I couldn't just copy/paste Ctrl-F12 dump to fix
make CppunitTest_chart2_xshape CPPUNIT_TEST_NAME=testPieChartLabels4
so I instead did a copy/paste of SAL_WARN("DUH",getXShapeDumpString());

Change-Id: I19f2ce2ce9c7653ae92dd596f0aaca1ed83f41bb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162764
Tested-by: Justin Luth <jluth@mail.com>
Reviewed-by: Justin Luth <jluth@mail.com>
2024-01-31 10:46:34 +01:00
..

Chart Implementation for LibreOffice Calc

The chart2 denotes a second generation re-write done to rid us of the foul and twisted legacy chart code.

Debugging

Shortcuts

CTRL + F12 creates a layout dump based on the XShapeDumper based on SAL_WARN("chart2", ...