summaryrefslogtreecommitdiff
path: root/chart2
diff options
context:
space:
mode:
authorBalazs Varga <balazs.varga991@gmail.com>2020-06-19 11:07:04 +0200
committerLászló Németh <nemeth@numbertext.org>2020-07-15 16:36:23 +0200
commit6d1e9482cf1519e5b4d73331a5bcdfbbc9a15776 (patch)
tree832739447227bf71b769dca860f847af9b4a1ab9 /chart2
parent16a7f59b448cb57bfbcf5a951dbb614fb2ea3a49 (diff)
tdf#134111 Chart OOXML Import: set text break to true
of category axis labels, even if the XML do not contain Text Properties of category axis labels. Change-Id: Ia0b154b2dfbfb00ffa0762af771423196586a5ae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96683 Tested-by: Jenkins Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'chart2')
-rw-r--r--chart2/qa/extras/chart2import.cxx19
-rw-r--r--chart2/qa/extras/data/docx/tdf134111.docxbin0 -> 22831 bytes
2 files changed, 19 insertions, 0 deletions
diff --git a/chart2/qa/extras/chart2import.cxx b/chart2/qa/extras/chart2import.cxx
index 47aacb1af402..6c982238a5b3 100644
--- a/chart2/qa/extras/chart2import.cxx
+++ b/chart2/qa/extras/chart2import.cxx
@@ -163,6 +163,7 @@ public:
void testTdf133376();
void testTdf134225();
void testTdf91250();
+ void testTdf134111();
CPPUNIT_TEST_SUITE(Chart2ImportTest);
CPPUNIT_TEST(Fdo60083);
@@ -274,6 +275,7 @@ public:
CPPUNIT_TEST(testTdf133376);
CPPUNIT_TEST(testTdf134225);
CPPUNIT_TEST(testTdf91250);
+ CPPUNIT_TEST(testTdf134111);
CPPUNIT_TEST_SUITE_END();
@@ -2575,6 +2577,23 @@ void Chart2ImportTest::testTdf91250()
CPPUNIT_ASSERT_EQUAL(OUString("8.657"), aCategories[3]);
}
+void Chart2ImportTest::testTdf134111()
+{
+ // tdf134111 : To check TextBreak value is true
+ load("/chart2/qa/extras/data/docx/", "tdf134111.docx");
+ uno::Reference< chart::XChartDocument > xChartDoc = getChartDocFromWriter(0);
+ CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is());
+ uno::Reference< chart::XDiagram > mxDiagram(xChartDoc->getDiagram());
+ CPPUNIT_ASSERT(mxDiagram.is());
+ uno::Reference< chart::XAxisXSupplier > xAxisXSupp(mxDiagram, uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xAxisXSupp.is());
+ uno::Reference< beans::XPropertySet > xAxisProp(xAxisXSupp->getXAxis());
+ bool bTextBreak = false;
+ xAxisProp->getPropertyValue("TextBreak") >>= bTextBreak;
+ // Expected value of 'TextBreak' is true
+ CPPUNIT_ASSERT(bTextBreak);
+}
+
CPPUNIT_TEST_SUITE_REGISTRATION(Chart2ImportTest);
CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/chart2/qa/extras/data/docx/tdf134111.docx b/chart2/qa/extras/data/docx/tdf134111.docx
new file mode 100644
index 000000000000..26e3a03e0b6d
--- /dev/null
+++ b/chart2/qa/extras/data/docx/tdf134111.docx
Binary files differ