summaryrefslogtreecommitdiff
path: root/chart2
diff options
context:
space:
mode:
authorSamuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>2023-08-14 15:59:18 +0200
committerAndras Timar <andras.timar@collabora.com>2024-01-23 15:42:25 +0100
commit8c832149558632e4b7b2abd6d9a8a33a23103677 (patch)
tree395e931622dc6d15f03d5be99f41d81fe708dc15 /chart2
parent70466aef8f07ac7b4c73687964f714c13aeab2c0 (diff)
tdf#146487 Don't show generic diagram title when there is an empty title given
Bugdoc has autoTitleDeleted set to false (so title should be visible), but then an empty title is given. In this case no default string should be added to the title, only in case of Pie Charts. Any other Chart types show the default title in MS-Office. Co-authored-by: Balazs Varga <balazs.varga.extern@allotropia.de> Change-Id: Ib445099a4a3d113cff6b1ffdfd093fe41c34716b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155681 Tested-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de> Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de> (cherry picked from commit c205194b8c54011af4b2cd34fbc00f4885883643) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162270 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
Diffstat (limited to 'chart2')
-rw-r--r--chart2/qa/extras/chart2import.cxx11
-rw-r--r--chart2/qa/extras/data/pptx/tdf146487.pptxbin0 -> 33891 bytes
2 files changed, 11 insertions, 0 deletions
diff --git a/chart2/qa/extras/chart2import.cxx b/chart2/qa/extras/chart2import.cxx
index f7324c94754f..7c24ff6110ba 100644
--- a/chart2/qa/extras/chart2import.cxx
+++ b/chart2/qa/extras/chart2import.cxx
@@ -1979,6 +1979,17 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testTdf121205)
CPPUNIT_ASSERT_EQUAL(OUString("Firstline\nSecondline\nThirdline"), aTitle);
}
+CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testTdf146487)
+{
+ loadFromFile(u"pptx/tdf146487.pptx");
+ Reference<chart2::XChartDocument> xChartDoc(getChartDocFromDrawImpress(0, 0), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is());
+
+ Reference<chart2::XTitled> xTitled(xChartDoc, uno::UNO_QUERY_THROW);
+ uno::Reference<chart2::XTitle> xTitle = xTitled->getTitleObject();
+ CPPUNIT_ASSERT_MESSAGE("chart doc should not have a title", !xTitle.is());
+}
+
CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testFixedSizeBarChartVeryLongLabel)
{
// Bar chart area size is fixed (not automatic) so we can't resize
diff --git a/chart2/qa/extras/data/pptx/tdf146487.pptx b/chart2/qa/extras/data/pptx/tdf146487.pptx
new file mode 100644
index 000000000000..2a78ae5d859b
--- /dev/null
+++ b/chart2/qa/extras/data/pptx/tdf146487.pptx
Binary files differ