summaryrefslogtreecommitdiff
path: root/include/oox
diff options
context:
space:
mode:
authorMark Hung <marklh9@gmail.com>2015-08-02 14:40:18 +0800
committerNorbert Thiebaud <nthiebaud@gmail.com>2015-08-25 11:55:05 +0000
commit43679f94b45f4d9e120c64a3fb5cc3ee77f12b11 (patch)
tree400bd571b72053f05ff51af05508ce799b87ca1c /include/oox
parent3ac03b3f2747e723efc93a5a4ca82d72445eecf0 (diff)
Fix tdf#80224 Custom text color changed to black on .PPTX export
1) Indirect property values were ignored, now they are used. 2) Write endParaRPr so that PowerPoint display them. 3) Automatic colors are written as white or black based on whether background is dark. Change-Id: I255c16f35149b738be2daf2800b1c90389f2c7cf Reviewed-on: https://gerrit.libreoffice.org/17472 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
Diffstat (limited to 'include/oox')
-rw-r--r--include/oox/export/drawingml.hxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/oox/export/drawingml.hxx b/include/oox/export/drawingml.hxx
index bfd3c6c4bcba..55ef5c7ffe1f 100644
--- a/include/oox/export/drawingml.hxx
+++ b/include/oox/export/drawingml.hxx
@@ -99,6 +99,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,
@@ -118,7 +119,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; }
@@ -126,6 +127,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);
@@ -173,7 +175,7 @@ public:
void WriteParagraphNumbering( ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > rXPropSet,
sal_Int16 nLevel );
void WriteRun( ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > rRun );
- void WriteRunProperties( ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > rRun, bool bIsField, sal_Int32 nElement = XML_rPr );
+ void WriteRunProperties( ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > rRun, bool bIsField, sal_Int32 nElement = XML_rPr ,bool bCheckDirect = true);
void WritePresetShape( const char* pShape );
void WritePresetShape( const char* pShape, MSO_SPT eShapeType, bool bPredefinedHandlesUsed, sal_Int32 nAdjustmentsWhichNeedsToBeConverted, const ::com::sun::star::beans::PropertyValue& rProp );