summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--chart2/qa/extras/chart2import.cxx16
-rw-r--r--chart2/qa/extras/data/pptx/tdf150176.pptxbin0 -> 52342 bytes
-rw-r--r--oox/source/drawingml/chart/objectformatter.cxx4
3 files changed, 18 insertions, 2 deletions
diff --git a/chart2/qa/extras/chart2import.cxx b/chart2/qa/extras/chart2import.cxx
index 316520fb5197..4e5b3a83130e 100644
--- a/chart2/qa/extras/chart2import.cxx
+++ b/chart2/qa/extras/chart2import.cxx
@@ -85,6 +85,7 @@ public:
void testTdf126033();
void testAutoBackgroundXLSX();
void testAutoChartAreaBorderPropXLSX();
+ void testAutoChartAreaBorderPropPPTX();
void testChartAreaStyleBackgroundXLSX();
void testChartHatchFillXLSX();
void testAxisTextRotationXLSX();
@@ -178,6 +179,7 @@ public:
CPPUNIT_TEST(testTdf126033);
CPPUNIT_TEST(testAutoBackgroundXLSX);
CPPUNIT_TEST(testAutoChartAreaBorderPropXLSX);
+ CPPUNIT_TEST(testAutoChartAreaBorderPropPPTX);
CPPUNIT_TEST(testChartAreaStyleBackgroundXLSX);
CPPUNIT_TEST(testChartHatchFillXLSX);
CPPUNIT_TEST(testAxisTextRotationXLSX);
@@ -1106,6 +1108,20 @@ void Chart2ImportTest::testAutoChartAreaBorderPropXLSX()
sal_Int32(26), nWidth);
}
+void Chart2ImportTest::testAutoChartAreaBorderPropPPTX()
+{
+ load(u"/chart2/qa/extras/data/pptx/", u"tdf150176.pptx");
+ Reference<chart2::XChartDocument> xChartDoc(getChartDocFromDrawImpress(0, 0), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is());
+
+ // Test "Automatic" chartarea border style/color/width.
+ Reference<beans::XPropertySet> xPropSet = xChartDoc->getPageBackground();
+ CPPUNIT_ASSERT(xPropSet.is());
+ drawing::LineStyle eStyle = xPropSet->getPropertyValue("LineStyle").get<drawing::LineStyle>();
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("'Automatic' chartarea border should be loaded as none style for pptx.",
+ drawing::LineStyle_NONE, eStyle);
+}
+
void Chart2ImportTest::testChartAreaStyleBackgroundXLSX()
{
load(u"/chart2/qa/extras/data/xlsx/", u"chart-area-style-background.xlsx");
diff --git a/chart2/qa/extras/data/pptx/tdf150176.pptx b/chart2/qa/extras/data/pptx/tdf150176.pptx
new file mode 100644
index 000000000000..fa217f92c822
--- /dev/null
+++ b/chart2/qa/extras/data/pptx/tdf150176.pptx
Binary files differ
diff --git a/oox/source/drawingml/chart/objectformatter.cxx b/oox/source/drawingml/chart/objectformatter.cxx
index 14c96d166a03..5644b9eedf09 100644
--- a/oox/source/drawingml/chart/objectformatter.cxx
+++ b/oox/source/drawingml/chart/objectformatter.cxx
@@ -829,8 +829,8 @@ LineFormatter::LineFormatter( ObjectFormatterData& rData, const AutoFormatEntry*
if( const Theme* pTheme = mrData.mrFilter.getCurrentTheme() )
if( const LineProperties* pLineProps = pTheme->getLineStyle( pAutoFormatEntry->mnThemedIdx ) )
*mxAutoLine = *pLineProps;
- // set automatic border property for chartarea, because of tdf#81437 and tdf#82217
- if ( eObjType == OBJECTTYPE_CHARTSPACE )
+ // set automatic border property for chartarea, because of tdf#81437 and tdf#82217, except for pptx (tdf#150176)
+ if ( eObjType == OBJECTTYPE_CHARTSPACE && !rData.mrFilter.getFileUrl().endsWithIgnoreAsciiCase(".pptx") )
{
mxAutoLine->maLineFill.moFillType = oox::GraphicHelper::getDefaultChartAreaLineStyle();
mxAutoLine->moLineWidth = oox::GraphicHelper::getDefaultChartAreaLineWidth();