summaryrefslogtreecommitdiff
path: root/chart2
diff options
context:
space:
mode:
authorBalazs Varga <balazs.varga991@gmail.com>2019-11-06 15:50:32 +0100
committerLászló Németh <nemeth@numbertext.org>2019-11-08 13:19:47 +0100
commitf6437b3a98256cd2782164fedefbc109bf5ab114 (patch)
tree5b434a82578cc09d2ede9eb99a8c435f80d05b94 /chart2
parent37e3573bb5739c94890c18ed11b4f4cc8a4df67f (diff)
tdf#128618 OOXML chart export: deleted automatic title returns on save
If there is no main title and/or subtitle, write out autoTitleDeleted with a true value. Regression from the commit 96a29c12a9d8734c9d2a812f38fc6654b5df9c48 (tdf#101322 Chart OOXML Export: fix missing subtitle) Change-Id: I0094014fc4da4cb66d31e4249f916452d00758c7 Reviewed-on: https://gerrit.libreoffice.org/82142 Reviewed-by: László Németh <nemeth@numbertext.org> Tested-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'chart2')
-rw-r--r--chart2/qa/extras/chart2export.cxx10
-rw-r--r--chart2/qa/extras/data/xlsx/testAutoTitleDeleted.xlsxbin0 -> 15097 bytes
2 files changed, 10 insertions, 0 deletions
diff --git a/chart2/qa/extras/chart2export.cxx b/chart2/qa/extras/chart2export.cxx
index dd07808b1d05..4d14a1e96638 100644
--- a/chart2/qa/extras/chart2export.cxx
+++ b/chart2/qa/extras/chart2export.cxx
@@ -108,6 +108,7 @@ public:
void testLegendManualLayoutXLSX();
void testChartSubTitle();
void testChartMainWithSubTitle();
+ void testAutoTitleDeleted();
void testChartTitlePropertiesColorFillXLSX();
void testChartTitlePropertiesGradientFillXLSX();
void testChartTitlePropertiesBitmapFillXLSX();
@@ -217,6 +218,7 @@ public:
CPPUNIT_TEST(testLegendManualLayoutXLSX);
CPPUNIT_TEST(testChartSubTitle);
CPPUNIT_TEST(testChartMainWithSubTitle);
+ CPPUNIT_TEST(testAutoTitleDeleted);
CPPUNIT_TEST(testChartTitlePropertiesColorFillXLSX);
CPPUNIT_TEST(testChartTitlePropertiesGradientFillXLSX);
CPPUNIT_TEST(testChartTitlePropertiesBitmapFillXLSX);
@@ -1732,6 +1734,14 @@ void Chart2ExportTest::testChartMainWithSubTitle()
assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:spPr/a:solidFill/a:srgbClr", "val", "81d41a");
}
+void Chart2ExportTest::testAutoTitleDeleted()
+{
+ load("/chart2/qa/extras/data/xlsx/", "testAutoTitleDeleted.xlsx");
+ xmlDocPtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML");
+ CPPUNIT_ASSERT(pXmlDoc);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:autoTitleDeleted", "val", "1");
+}
+
void Chart2ExportTest::testChartTitlePropertiesColorFillXLSX()
{
load("/chart2/qa/extras/data/xlsx/", "testChartTitlePropertiesColorFill.xlsx");
diff --git a/chart2/qa/extras/data/xlsx/testAutoTitleDeleted.xlsx b/chart2/qa/extras/data/xlsx/testAutoTitleDeleted.xlsx
new file mode 100644
index 000000000000..409389e23beb
--- /dev/null
+++ b/chart2/qa/extras/data/xlsx/testAutoTitleDeleted.xlsx
Binary files differ