[Libreoffice-commits] core.git: 3 commits - chart2/qa oox/source xmloff/source
Markus Mohrhard
markus.mohrhard at googlemail.com
Sat May 2 12:11:31 PDT 2015
chart2/qa/extras/chart2import.cxx | 13 +++++++++++++
chart2/qa/extras/data/ods/tdf86624.ods |binary
oox/source/export/chartexport.cxx | 3 +++
xmloff/source/chart/SchXMLLegendContext.cxx | 6 +++---
4 files changed, 19 insertions(+), 3 deletions(-)
New commits:
commit bf52d1951587bea895902c8b030a19942dd0ba69
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date: Sat May 2 21:04:06 2015 +0200
add test for tdf#86624
Change-Id: Iaab521433d8573fb1184ec59e7d734b0e0c97f00
diff --git a/chart2/qa/extras/chart2import.cxx b/chart2/qa/extras/chart2import.cxx
index 445edf3..f7c7799 100644
--- a/chart2/qa/extras/chart2import.cxx
+++ b/chart2/qa/extras/chart2import.cxx
@@ -58,6 +58,7 @@ public:
void testFdo78080();
void testFdo54361();
void testFdo54361_1();
+ void testTdf86624(); // manualy placed legends
void testAutoBackgroundXLSX();
void testChartAreaStyleBackgroundXLSX();
void testAxisTextRotationXLSX();
@@ -109,6 +110,7 @@ public:
CPPUNIT_TEST(testFdo78080);
CPPUNIT_TEST(testFdo54361);
CPPUNIT_TEST(testFdo54361_1);
+ CPPUNIT_TEST(testTdf86624);
CPPUNIT_TEST(testAutoBackgroundXLSX);
CPPUNIT_TEST(testChartAreaStyleBackgroundXLSX);
CPPUNIT_TEST(testAxisTextRotationXLSX);
@@ -634,6 +636,17 @@ void Chart2ImportTest::testFdo78080()
CPPUNIT_ASSERT(!xTitle.is());
}
+void Chart2ImportTest::testTdf86624()
+{
+ load("/chart2/qa/extras/data/ods/", "tdf86624.ods");
+ uno::Reference< chart2::XChartDocument > xChart2Doc = getChartDocFromSheet(0, mxComponent);
+ uno::Reference< chart::XChartDocument > xChartDoc (xChart2Doc, uno::UNO_QUERY);
+ uno::Reference<drawing::XShape> xLegend = xChartDoc->getLegend();
+ awt::Point aPos = xLegend->getPosition();
+ CPPUNIT_ASSERT(aPos.X > 5000); // real value for me is above 8000 but before bug fix is below 1000
+ CPPUNIT_ASSERT(aPos.Y > 4000); // real value for ms is above 7000
+}
+
void Chart2ImportTest::testTransparentBackground(OUString const & filename)
{
load("/chart2/qa/extras/data/xlsx/", filename);
diff --git a/chart2/qa/extras/data/ods/tdf86624.ods b/chart2/qa/extras/data/ods/tdf86624.ods
new file mode 100644
index 0000000..0570237
Binary files /dev/null and b/chart2/qa/extras/data/ods/tdf86624.ods differ
commit 774257d6708ea059c108ac2831a583dafc385370
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date: Sat May 2 20:36:30 2015 +0200
it works if we first set the size and then the position, tdf#86624
Change-Id: I8ed98981ef3041839ab73b749a04febe369f66fe
diff --git a/xmloff/source/chart/SchXMLLegendContext.cxx b/xmloff/source/chart/SchXMLLegendContext.cxx
index 7bb30bf..80e829d 100644
--- a/xmloff/source/chart/SchXMLLegendContext.cxx
+++ b/xmloff/source/chart/SchXMLLegendContext.cxx
@@ -188,14 +188,14 @@ void SchXMLLegendContext::StartElement( const uno::Reference< xml::sax::XAttribu
}
}
- if( bHasXPosition && bHasYPosition )
- xLegendShape->setPosition( aLegendPos );
-
if( bHasExpansion && nLegendExpansion!= chart::ChartLegendExpansion_CUSTOM )
xLegendProps->setPropertyValue("Expansion", uno::makeAny(nLegendExpansion) );
else if( bHasHeight && bHasWidth )
xLegendShape->setSize( aLegendSize );
+ if( bHasXPosition && bHasYPosition )
+ xLegendShape->setPosition( aLegendPos );
+
// the fill style has the default "none" in XML, but "solid" in the model.
xLegendProps->setPropertyValue("FillStyle", uno::makeAny( drawing::FillStyle_NONE ));
commit cc8b8e84e8e8962f1c84bd41262effeebaec6e4e
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date: Sat May 2 19:56:16 2015 +0200
our values are related to the inner mode, tdf#90979
Change-Id: I5531bbb813f8ace9a9c3f35c6c79777755ff81b8
diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx
index 9dfe8ea..bca8efe 100644
--- a/oox/source/export/chartexport.cxx
+++ b/oox/source/export/chartexport.cxx
@@ -1319,6 +1319,9 @@ void ChartExport::exportManualLayout(const css::chart2::RelativePosition& rPos,
FSHelperPtr pFS = GetFS();
pFS->startElement(FSNS(XML_c, XML_layout), FSEND);
pFS->startElement(FSNS(XML_c, XML_manualLayout), FSEND);
+ pFS->singleElement(FSNS(XML_c, XML_layoutTarget),
+ XML_val, "inner",
+ FSEND);
pFS->singleElement(FSNS(XML_c, XML_xMode),
XML_val, "edge",
FSEND);
More information about the Libreoffice-commits
mailing list