diff options
author | Balazs Varga <balazs.varga991@gmail.com> | 2018-07-23 21:13:09 +0200 |
---|---|---|
committer | Bartosz Kosiorek <gang65@poczta.onet.pl> | 2018-07-30 23:53:35 +0200 |
commit | 051399740e41c6495ed362e78c63e0868bcd180c (patch) | |
tree | c1c0568d55c52e77fb90a1dbce8447f5c9e1b049 /oox | |
parent | 83d8331581ab43cf35325ca674cf62d4ba5dc5ad (diff) |
tdf#108078 OOXML Export Chart shapes area fill properties
Verified with color, gradient, bitmap for:
Chart Title in DOCX, XLSX and PPTX.
Also verified with gradient, bitmap for
Chart Legend, Plot Area, Dataseries and Background
in DOCX, XLSX and PPTX.
Change-Id: I15d29f3ca2d75f45f612766b635d50a29d8551ae
Reviewed-on: https://gerrit.libreoffice.org/57880
Tested-by: Jenkins
Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl>
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/export/chartexport.cxx | 22 | ||||
-rw-r--r-- | oox/source/export/drawingml.cxx | 9 |
2 files changed, 14 insertions, 17 deletions
diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx index f39756d94b19..2a2223c813ca 100644 --- a/oox/source/export/chartexport.cxx +++ b/oox/source/export/chartexport.cxx @@ -1038,6 +1038,12 @@ void ChartExport::exportTitle( const Reference< XShape >& xShape ) XML_val, "0", FSEND); + // shape properties + if( xPropSet.is() ) + { + exportShapeProps( xPropSet ); + } + pFS->endElement( FSNS( XML_c, XML_title ) ); } @@ -1171,7 +1177,7 @@ void ChartExport::exportPlotArea( const Reference< css::chart::XChartDocument >& Reference< beans::XPropertySet > xWallPropSet( xWallFloorSupplier->getWall(), uno::UNO_QUERY ); if( xWallPropSet.is() ) { - exportPlotAreaShapeProps( xWallPropSet ); + exportShapeProps( xWallPropSet ); } } @@ -1261,18 +1267,6 @@ void ChartExport::exportManualLayout(const css::chart2::RelativePosition& rPos, pFS->endElement(FSNS(XML_c, XML_layout)); } -void ChartExport::exportPlotAreaShapeProps( const Reference< XPropertySet >& xPropSet ) -{ - FSHelperPtr pFS = GetFS(); - pFS->startElement( FSNS( XML_c, XML_spPr ), - FSEND ); - - exportFill( xPropSet ); - WriteOutline( xPropSet ); - - pFS->endElement( FSNS( XML_c, XML_spPr ) ); -} - void ChartExport::exportFill( const Reference< XPropertySet >& xPropSet ) { if ( !GetProperty( xPropSet, "FillStyle" ) ) @@ -2312,7 +2306,7 @@ void ChartExport::exportShapeProps( const Reference< XPropertySet >& xPropSet ) pFS->startElement( FSNS( XML_c, XML_spPr ), FSEND ); - WriteFill( xPropSet ); + exportFill( xPropSet ); WriteOutline( xPropSet ); pFS->endElement( FSNS( XML_c, XML_spPr ) ); diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx index b42ddf8ab901..b5d681dd1a13 100644 --- a/oox/source/export/drawingml.cxx +++ b/oox/source/export/drawingml.cxx @@ -917,13 +917,16 @@ OUString DrawingML::WriteImage( const Graphic& rGraphic , bool bRelPathToMedia ) xOutStream->writeBytes( Sequence< sal_Int8 >( static_cast<const sal_Int8*>(aData), nDataSize ) ); xOutStream->closeOutput(); - OString sRelPathToMedia = "media/image"; + const OString sRelPathToMedia = "media/image"; + OString sRelationCompPrefix; if ( bRelPathToMedia ) - sRelPathToMedia = "../" + sRelPathToMedia; + sRelationCompPrefix = "../"; + else + sRelationCompPrefix = GetRelationCompPrefix(); sRelId = mpFB->addRelation( mpFS->getOutputStream(), oox::getRelationship(Relationship::IMAGE), OUStringBuffer() - .appendAscii( GetRelationCompPrefix() ) + .appendAscii( sRelationCompPrefix.getStr() ) .appendAscii( sRelPathToMedia.getStr() ) .append( static_cast<sal_Int32>(mnImageCounter ++) ) .appendAscii( pExtension ) |