summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMark Hung <marklh9@gmail.com>2015-08-02 14:40:18 +0800
committerAndras Timar <andras.timar@collabora.com>2015-11-28 14:15:48 +0100
commit61a1beb07b6be87c77004ebb6ecd34fe5f211cba (patch)
tree3f426b0c0c3d687b920ee6ef118e07b9d2fb16b4 /include
parentf7d9f59b282f136112fcbe61362e176cae53b633 (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> (cherry picked from commit 0b5e3885bc706ed02acac1c682c90171700b0cac)
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);