[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.0' - chart2/qa oox/source
Tamás Zolnai (via logerrit)
logerrit at kemper.freedesktop.org
Fri May 31 05:35:08 UTC 2019
chart2/qa/extras/chart2import.cxx | 23 +++++++++++++++++++++++
chart2/qa/extras/data/pptx/tdf122765.pptx |binary
oox/source/drawingml/chart/titleconverter.cxx | 1 -
3 files changed, 23 insertions(+), 1 deletion(-)
New commits:
commit 771f2c368d85e7e46c6bd2a0f9d764954781416b
Author: Tamás Zolnai <tamas.zolnai at collabora.com>
AuthorDate: Tue May 21 12:50:31 2019 +0200
Commit: Andras Timar <andras.timar at collabora.com>
CommitDate: Fri May 31 07:34:37 2019 +0200
tdf#122765: Legend interferes with pie chart after pptx import
Revert the commit caused this regression:
0fc41c53dfbd21e526fb0ad68a6651693c4a2ecd
The original issue does not come back with
reverting this commit.
Reviewed-on: https://gerrit.libreoffice.org/72679
Tested-by: Jenkins
Reviewed-by: Tamás Zolnai <tamas.zolnai at collabora.com>
(cherry picked from commit 10609749126ca76eaf12904d4cce9cc5a16d8405)
Change-Id: I666c4f92e3b70b416ec6da7a704298d207451649
Reviewed-on: https://gerrit.libreoffice.org/72767
Reviewed-by: Andras Timar <andras.timar at collabora.com>
Tested-by: Andras Timar <andras.timar at collabora.com>
diff --git a/chart2/qa/extras/chart2import.cxx b/chart2/qa/extras/chart2import.cxx
index 428f3f801a53..1de330ec62dc 100644
--- a/chart2/qa/extras/chart2import.cxx
+++ b/chart2/qa/extras/chart2import.cxx
@@ -110,6 +110,7 @@ public:
void testTdf115107(); // import complex data point labels
void testTdf115107_2(); // import complex data point labels in cobo charts with multiple data series
void testTdf121205();
+ void testTdf122765();
CPPUNIT_TEST_SUITE(Chart2ImportTest);
CPPUNIT_TEST(Fdo60083);
@@ -174,6 +175,7 @@ public:
CPPUNIT_TEST(testTdf115107);
CPPUNIT_TEST(testTdf115107_2);
CPPUNIT_TEST(testTdf121205);
+ CPPUNIT_TEST(testTdf122765);
CPPUNIT_TEST_SUITE_END();
@@ -1583,6 +1585,27 @@ void Chart2ImportTest::testTdf121205()
}
+void Chart2ImportTest::testTdf122765()
+{
+ // The horizontal position of the slices was wrong.
+ load("/chart2/qa/extras/data/pptx/", "tdf122765.pptx");
+ Reference<chart::XChartDocument> xChartDoc(getChartDocFromDrawImpress(0, 0), UNO_QUERY);
+ Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(xChartDoc, UNO_QUERY_THROW);
+ Reference<drawing::XDrawPage> xDrawPage(xDrawPageSupplier->getDrawPage(), UNO_SET_THROW);
+ Reference<drawing::XShapes> xShapes(xDrawPage->getByIndex(0), UNO_QUERY_THROW);
+ Reference<drawing::XShape> xSeriesSlices(getShapeByName(xShapes, "CID/D=0:CS=0:CT=0:Series=0"),
+ UNO_SET_THROW);
+
+ Reference<container::XIndexAccess> xIndexAccess(xSeriesSlices, UNO_QUERY_THROW);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(9), xIndexAccess->getCount());
+ Reference<drawing::XShape> xSlice(xIndexAccess->getByIndex(0), UNO_QUERY_THROW);
+
+ // Check position of the first slice, all slices move together, so enough to check only one.
+ // Wrong poisition was around 5856.
+ awt::Point aSlicePosition = xSlice->getPosition();
+ CPPUNIT_ASSERT_GREATER(sal_Int32(7000), aSlicePosition.X);
+}
+
CPPUNIT_TEST_SUITE_REGISTRATION(Chart2ImportTest);
CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/chart2/qa/extras/data/pptx/tdf122765.pptx b/chart2/qa/extras/data/pptx/tdf122765.pptx
new file mode 100644
index 000000000000..948190c30b55
Binary files /dev/null and b/chart2/qa/extras/data/pptx/tdf122765.pptx differ
diff --git a/oox/source/drawingml/chart/titleconverter.cxx b/oox/source/drawingml/chart/titleconverter.cxx
index a4bb1ec70944..8109ca8a3235 100644
--- a/oox/source/drawingml/chart/titleconverter.cxx
+++ b/oox/source/drawingml/chart/titleconverter.cxx
@@ -238,7 +238,6 @@ void LegendConverter::convertFromModel( const Reference< XDiagram >& rxDiagram )
// manual size needs ChartLegendExpansion_CUSTOM and LegendPosition_CUSTOM (tdf#118150)
if( aLayoutConv.convertFromModel( aPropSet ) )
{
- eLegendPos = cssc2::LegendPosition_CUSTOM;
eLegendExpand = cssc::ChartLegendExpansion_CUSTOM;
}
bManualLayout = !aLayoutConv.getAutoLayout();
More information about the Libreoffice-commits
mailing list