[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - chart2/qa oox/source
Tamás Zolnai (via logerrit)
logerrit at kemper.freedesktop.org
Fri May 31 05:32:56 UTC 2019
chart2/qa/extras/chart2dump/chart2dump.cxx | 1
chart2/qa/extras/chart2dump/data/tdf118150.xlsx |binary
chart2/qa/extras/chart2dump/reference/axislabeltest/tdf118150.txt | 216 ++++++++++
chart2/qa/extras/chart2import.cxx | 23 +
chart2/qa/extras/data/pptx/tdf122765.pptx |binary
oox/source/drawingml/chart/titleconverter.cxx | 3
6 files changed, 241 insertions(+), 2 deletions(-)
New commits:
commit 7ea8112e33761f947635c0ce8b93f583c88c1e8e
Author: Tamás Zolnai <tamas.zolnai at collabora.com>
AuthorDate: Tue May 21 12:05:33 2019 +0200
Commit: Andras Timar <andras.timar at collabora.com>
CommitDate: Fri May 31 07:32:24 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)
Add unit test for tdf#118150.
Reviewed-on: https://gerrit.libreoffice.org/72678
Tested-by: Jenkins
Reviewed-by: Tamás Zolnai <tamas.zolnai at collabora.com>
(cherry picked from commit a703b4d8842261f55f489c28352df1f53a9b070a)
Fix outdated comment.
Reviewed-on: https://gerrit.libreoffice.org/72697
Reviewed-by: Tamás Zolnai <tamas.zolnai at collabora.com>
Tested-by: Tamás Zolnai <tamas.zolnai at collabora.com>
(cherry picked from commit c43534d5e8d33f73ee4ba70867065be675302579)
Change-Id: I666c4f92e3b70b416ec6da7a704298d207451649
cea2c8aacb36e843dad67a056d07d6495fbbb17a
1be6e4cf52ccd385d59f85d9d5fa5b8a47caf4f1
Reviewed-on: https://gerrit.libreoffice.org/72761
Reviewed-by: Xisco Faulí <xiscofauli at libreoffice.org>
Tested-by: Xisco Faulí <xiscofauli at libreoffice.org>
Tested-by: Jenkins
Reviewed-by: Andras Timar <andras.timar at collabora.com>
diff --git a/chart2/qa/extras/chart2dump/chart2dump.cxx b/chart2/qa/extras/chart2dump/chart2dump.cxx
index e06ce2f76415..39495fa621e3 100644
--- a/chart2/qa/extras/chart2dump/chart2dump.cxx
+++ b/chart2/qa/extras/chart2dump/chart2dump.cxx
@@ -638,6 +638,7 @@ DECLARE_DUMP_TEST(AxisLabelTest, Chart2DumpTest, false)
"rotated_axis_labels.odp",
"formated_axis_labels.odp",
"percent_stacked_column_chart.odp",
+ "tdf118150.xlsx",
};
for (const OUString& sTestFile : aTestFiles)
diff --git a/chart2/qa/extras/chart2dump/data/tdf118150.xlsx b/chart2/qa/extras/chart2dump/data/tdf118150.xlsx
new file mode 100644
index 000000000000..f29b9a1c2e66
Binary files /dev/null and b/chart2/qa/extras/chart2dump/data/tdf118150.xlsx differ
diff --git a/chart2/qa/extras/chart2dump/reference/axislabeltest/tdf118150.txt b/chart2/qa/extras/chart2dump/reference/axislabeltest/tdf118150.txt
new file mode 100644
index 000000000000..fabf4acac67b
--- /dev/null
+++ b/chart2/qa/extras/chart2dump/reference/axislabeltest/tdf118150.txt
@@ -0,0 +1,216 @@
+/// CID/D=0:CS=0:Axis=0,0
+// nAxisLabelsCount
+28
+// xLabel->getString()
+Sep 2013
+// static_cast<sal_Int32>(aLabelFontColor)
+0
+// fLabelFontHeight
+10
+// xLabel->getString()
+Oct 2013
+// static_cast<sal_Int32>(aLabelFontColor)
+0
+// fLabelFontHeight
+10
+// xLabel->getString()
+Nov 2013
+// static_cast<sal_Int32>(aLabelFontColor)
+0
+// fLabelFontHeight
+10
+// xLabel->getString()
+Dec 2013
+// static_cast<sal_Int32>(aLabelFontColor)
+0
+// fLabelFontHeight
+10
+// xLabel->getString()
+Jan 2014
+// static_cast<sal_Int32>(aLabelFontColor)
+0
+// fLabelFontHeight
+10
+// xLabel->getString()
+Feb 2014
+// static_cast<sal_Int32>(aLabelFontColor)
+0
+// fLabelFontHeight
+10
+// xLabel->getString()
+Mar 2014
+// static_cast<sal_Int32>(aLabelFontColor)
+0
+// fLabelFontHeight
+10
+// xLabel->getString()
+Apr 2014
+// static_cast<sal_Int32>(aLabelFontColor)
+0
+// fLabelFontHeight
+10
+// xLabel->getString()
+May 2014
+// static_cast<sal_Int32>(aLabelFontColor)
+0
+// fLabelFontHeight
+10
+// xLabel->getString()
+Jun 2014
+// static_cast<sal_Int32>(aLabelFontColor)
+0
+// fLabelFontHeight
+10
+// xLabel->getString()
+Jul 2014
+// static_cast<sal_Int32>(aLabelFontColor)
+0
+// fLabelFontHeight
+10
+// xLabel->getString()
+Aug 2014
+// static_cast<sal_Int32>(aLabelFontColor)
+0
+// fLabelFontHeight
+10
+// xLabel->getString()
+Sep 2014
+// static_cast<sal_Int32>(aLabelFontColor)
+0
+// fLabelFontHeight
+10
+// xLabel->getString()
+Oct 2014
+// static_cast<sal_Int32>(aLabelFontColor)
+0
+// fLabelFontHeight
+10
+// xLabel->getString()
+Nov 2014
+// static_cast<sal_Int32>(aLabelFontColor)
+0
+// fLabelFontHeight
+10
+// xLabel->getString()
+Dec 2014
+// static_cast<sal_Int32>(aLabelFontColor)
+0
+// fLabelFontHeight
+10
+// xLabel->getString()
+Jan 2015
+// static_cast<sal_Int32>(aLabelFontColor)
+0
+// fLabelFontHeight
+10
+// xLabel->getString()
+Feb 2015
+// static_cast<sal_Int32>(aLabelFontColor)
+0
+// fLabelFontHeight
+10
+// xLabel->getString()
+Mar 2015
+// static_cast<sal_Int32>(aLabelFontColor)
+0
+// fLabelFontHeight
+10
+// xLabel->getString()
+Apr 2015
+// static_cast<sal_Int32>(aLabelFontColor)
+0
+// fLabelFontHeight
+10
+// xLabel->getString()
+May 2015
+// static_cast<sal_Int32>(aLabelFontColor)
+0
+// fLabelFontHeight
+10
+// xLabel->getString()
+Jun 2015
+// static_cast<sal_Int32>(aLabelFontColor)
+0
+// fLabelFontHeight
+10
+// xLabel->getString()
+Jul 2015
+// static_cast<sal_Int32>(aLabelFontColor)
+0
+// fLabelFontHeight
+10
+// xLabel->getString()
+Aug 2015
+// static_cast<sal_Int32>(aLabelFontColor)
+0
+// fLabelFontHeight
+10
+// xLabel->getString()
+Sep 2015
+// static_cast<sal_Int32>(aLabelFontColor)
+0
+// fLabelFontHeight
+10
+// xLabel->getString()
+Oct 2015
+// static_cast<sal_Int32>(aLabelFontColor)
+0
+// fLabelFontHeight
+10
+// xLabel->getString()
+Nov 2015
+// static_cast<sal_Int32>(aLabelFontColor)
+0
+// fLabelFontHeight
+10
+// xLabel->getString()
+Dec 2015
+// static_cast<sal_Int32>(aLabelFontColor)
+0
+// fLabelFontHeight
+10
+/// CID/D=0:CS=0:Axis=1,0
+// nAxisLabelsCount
+7
+// xLabel->getString()
+0.00
+// static_cast<sal_Int32>(aLabelFontColor)
+0
+// fLabelFontHeight
+10
+// xLabel->getString()
+2.00
+// static_cast<sal_Int32>(aLabelFontColor)
+0
+// fLabelFontHeight
+10
+// xLabel->getString()
+4.00
+// static_cast<sal_Int32>(aLabelFontColor)
+0
+// fLabelFontHeight
+10
+// xLabel->getString()
+6.00
+// static_cast<sal_Int32>(aLabelFontColor)
+0
+// fLabelFontHeight
+10
+// xLabel->getString()
+8.00
+// static_cast<sal_Int32>(aLabelFontColor)
+0
+// fLabelFontHeight
+10
+// xLabel->getString()
+10.00
+// static_cast<sal_Int32>(aLabelFontColor)
+0
+// fLabelFontHeight
+10
+// xLabel->getString()
+12.00
+// static_cast<sal_Int32>(aLabelFontColor)
+0
+// fLabelFontHeight
+10
diff --git a/chart2/qa/extras/chart2import.cxx b/chart2/qa/extras/chart2import.cxx
index 85d6a9e652eb..960d12b72a57 100644
--- a/chart2/qa/extras/chart2import.cxx
+++ b/chart2/qa/extras/chart2import.cxx
@@ -119,6 +119,7 @@ public:
void testTdf114179();
void testTdf123504();
+ void testTdf122765();
CPPUNIT_TEST_SUITE(Chart2ImportTest);
CPPUNIT_TEST(Fdo60083);
@@ -192,6 +193,7 @@ public:
CPPUNIT_TEST(testTdf114179);
CPPUNIT_TEST(testTdf123504);
+ CPPUNIT_TEST(testTdf122765);
CPPUNIT_TEST_SUITE_END();
@@ -1732,6 +1734,27 @@ void Chart2ImportTest::testTdf123504()
CPPUNIT_ASSERT_GREATER(sal_Int32(8500), aSliceSize.Width);
}
+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..4f700c32725a 100644
--- a/oox/source/drawingml/chart/titleconverter.cxx
+++ b/oox/source/drawingml/chart/titleconverter.cxx
@@ -235,10 +235,9 @@ void LegendConverter::convertFromModel( const Reference< XDiagram >& rxDiagram )
if( mrModel.mxLayout.get() )
{
LayoutConverter aLayoutConv( *this, *mrModel.mxLayout );
- // manual size needs ChartLegendExpansion_CUSTOM and LegendPosition_CUSTOM (tdf#118150)
+ // manual size needs ChartLegendExpansion_CUSTOM
if( aLayoutConv.convertFromModel( aPropSet ) )
{
- eLegendPos = cssc2::LegendPosition_CUSTOM;
eLegendExpand = cssc::ChartLegendExpansion_CUSTOM;
}
bManualLayout = !aLayoutConv.getAutoLayout();
More information about the Libreoffice-commits
mailing list