summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMark Hung <marklh9@gmail.com>2015-08-02 14:40:18 +0800
committerKatarina Behrens <Katarina.Behrens@cib.de>2015-11-26 10:39:56 +0000
commit0b5e3885bc706ed02acac1c682c90171700b0cac (patch)
tree53ad17067ea8d34ba417007ddeb462a782711f52 /include
parentd130afe6c04dd53b5500e3b9335ca2e615aa6bb6 (diff)
Fix tdf#80224 Custom text color changed to black on .PPTX export
1) Write endParaRPr so that PowerPoint display them properly. 2) Original design forbid properites with default value to be exprted, now fixed. 3) Automatic colors are written as white or black based on whether background is dark. Note that tdf#77881,tdf#80520,tdf#89525 depend on this. Change-Id: I255c16f35149b738be2daf2800b1c90389f2c7cf Reviewed-on: https://gerrit.libreoffice.org/17472 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/19862 Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de> Tested-by: Katarina Behrens <Katarina.Behrens@cib.de>
Diffstat (limited to 'include')
-rw-r--r--include/oox/export/drawingml.hxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/oox/export/drawingml.hxx b/include/oox/export/drawingml.hxx
index bf5669a71b83..fcfb638c6295 100644
--- a/include/oox/export/drawingml.hxx
+++ b/include/oox/export/drawingml.hxx
@@ -103,6 +103,7 @@ protected:
::oox::core::XmlFilterBase* mpFB;
/// If set, this is the parent of the currently handled shape.
com::sun::star::uno::Reference<com::sun::star::drawing::XShape> m_xParent;
+ bool mbIsBackgroundDark;
bool GetProperty( ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > rXPropSet, const OUString& aName );
bool GetPropertyAndState( ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > rXPropSet,
@@ -122,7 +123,7 @@ protected:
public:
DrawingML( ::sax_fastparser::FSHelperPtr pFS, ::oox::core::XmlFilterBase* pFB = NULL, DocumentType eDocumentType = DOCUMENT_PPTX, DMLTextExport* pTextExport = 0 )
- : meDocumentType( eDocumentType ), mpTextExport(pTextExport), mpFS( pFS ), mpFB( pFB ) {}
+ : meDocumentType( eDocumentType ), mpTextExport(pTextExport), mpFS( pFS ), mpFB( pFB ), mbIsBackgroundDark( false ) {}
void SetFS( ::sax_fastparser::FSHelperPtr pFS ) { mpFS = pFS; }
::sax_fastparser::FSHelperPtr GetFS() { return mpFS; }
::oox::core::XmlFilterBase* GetFB() { return mpFB; }
@@ -130,6 +131,7 @@ public:
/// The application-specific text exporter callback, if there is one.
DMLTextExport* GetTextExport() { return mpTextExport; }
+ void SetBackgroundDark(bool bIsDark) { mbIsBackgroundDark = bIsDark; }
/// If bRelPathToMedia is true add "../" to image folder path while adding the image relationship
OUString WriteImage( const Graphic &rGraphic , bool bRelPathToMedia = false);