summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJacobo Aragunde Pérez <jaragunde@igalia.com>2014-01-31 14:02:12 +0100
committerJacobo Aragunde Pérez <jaragunde@igalia.com>2014-02-05 02:00:03 +0100
commit2fcf3a871c94feeca11619ef5c8c0466ce61eb74 (patch)
treebe65c549156c3dea9c5b4d8ceadd7f3e43280c71 /include
parentfdo#39944: fallback for DOCUMENT_* roles in ATK < 2.1.0 (diff)
downloadcore-2fcf3a871c94feeca11619ef5c8c0466ce61eb74.tar.gz
core-2fcf3a871c94feeca11619ef5c8c0466ce61eb74.zip
ooxml: preserve gradient shape fill
LibreOffice is unable to properly import the custom gradient fills defined in ooxml documents. To prevent data loss, we save the original gradient fill definition in the shape interopgrabbag and we write it back to the document on export. In case the user has changed the fill properties of a shape, the original fill will be discarded in favor of the new fill. We have added a new ooxmlexport unit test to test this feature. We have also added some missing transformations to the methods getColorTransformationName and getColorTransformationToken in Color class, and refactored some code in class DrawingML to the method WriteColor( OUString, Sequence ). Change-Id: Ie71f89eaa20313561aa9180ea33b76f3fb5e5df6
Diffstat (limited to 'include')
-rw-r--r--include/oox/export/drawingml.hxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/oox/export/drawingml.hxx b/include/oox/export/drawingml.hxx
index f2ec9e750b2c..7a07f5ec62f2 100644
--- a/include/oox/export/drawingml.hxx
+++ b/include/oox/export/drawingml.hxx
@@ -24,6 +24,7 @@
#include <sax/fshelper.hxx>
#include <rtl/strbuf.hxx>
#include <com/sun/star/awt/FontDescriptor.hpp>
+#include <com/sun/star/awt/Gradient.hpp>
#include <com/sun/star/uno/XReference.hpp>
#include <tools/poly.hxx>
#include <filter/msfilter/escherex.hxx>
@@ -106,6 +107,8 @@ protected:
const char* GetComponentDir();
const char* GetRelationCompPrefix();
+ bool EqualGradients( ::com::sun::star::awt::Gradient aGradient1, ::com::sun::star::awt::Gradient aGradient2 );
+
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 ) {}
@@ -117,6 +120,8 @@ public:
OUString WriteImage( const Graphic &rGraphic );
void WriteColor( sal_uInt32 nColor, sal_Int32 nAlpha = MAX_PERCENT );
+ void WriteColor( OUString sColorSchemeName, ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > aTransformations );
+ void WriteColorTransformations( ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > aTransformations );
void WriteGradientStop( sal_uInt16 nStop, sal_uInt32 nColor );
void WriteLineArrow( ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > rXPropSet, sal_Bool bLineStart );
void WriteConnectorConnections( EscherConnectorListEntry& rConnectorEntry, sal_Int32 nStartID, sal_Int32 nEndID );