summaryrefslogtreecommitdiff
path: root/chart2
diff options
context:
space:
mode:
authorTünde Tóth <toth.tunde@nisz.hu>2020-10-29 14:47:09 +0100
committerLászló Németh <nemeth@numbertext.org>2020-10-30 19:08:29 +0100
commite64f9356df76c41e3c5c432984e11110ce1d25ca (patch)
tree81badada4b23ca04f380e27fa58315d7ac8a6350 /chart2
parenta0b860ece9cd7f8d7cb55a6dc6991691ea68545a (diff)
tdf#126133 Chart OOXML import: set default text rotation to 0°
for the horizontal axis title, even if the position of the axis is left or right. With this, OOXML charts generated by third-party tools imported without bad rotated title text (as previously in commit fdb6d6ccf45e679ff3e369a876482b6801e08e25 [tdf#137734 Chart OOXML import: fix variable color charts], without bad variable colors). Change-Id: Id348fe037e4f1eb2d7253957224298aa95db5b15 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105012 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.cxx12
1 files changed, 12 insertions, 0 deletions
diff --git a/chart2/qa/extras/chart2import.cxx b/chart2/qa/extras/chart2import.cxx
index 0cff3a8027be..62f9b85c1d76 100644
--- a/chart2/qa/extras/chart2import.cxx
+++ b/chart2/qa/extras/chart2import.cxx
@@ -2739,6 +2739,18 @@ void Chart2ImportTest::testTdf137734()
bool bVaryColor = true;
CPPUNIT_ASSERT(aAny >>= bVaryColor);
CPPUNIT_ASSERT(!bVaryColor);
+
+ // tdf#126133 Test primary X axis Rotation value
+ Reference<chart2::XAxis> xXAxis = getAxisFromDoc(xChartDoc, 0, 0, 0);
+ CPPUNIT_ASSERT(xXAxis.is());
+ Reference<chart2::XTitled> xTitled(xXAxis, uno::UNO_QUERY_THROW);
+ Reference<chart2::XTitle> xTitle = xTitled->getTitleObject();
+ CPPUNIT_ASSERT(xTitle.is());
+ Reference<beans::XPropertySet> xTitlePropSet(xTitle, uno::UNO_QUERY_THROW);
+ uno::Any aAny2 = xTitlePropSet->getPropertyValue("TextRotation");
+ double nRotation = -1;
+ CPPUNIT_ASSERT(aAny2 >>= nRotation);
+ CPPUNIT_ASSERT_EQUAL(0.0, nRotation);
}
CPPUNIT_TEST_SUITE_REGISTRATION(Chart2ImportTest);