summaryrefslogtreecommitdiff
path: root/include/oox
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2018-02-01 15:28:53 +0900
committerTomaž Vajngerl <quikee@gmail.com>2018-02-01 11:54:22 +0100
commite02efb621fe672aa52e56caa916cf5c3fd0a9cb8 (patch)
tree725947b541b4774722d9d4a9d11a2ac58463a753 /include/oox
parenta61747c2c375d1fe404c976d2a03125e4dc78d8f (diff)
Change bitmap table to store XBitmap instead of GraphicObject URL
As we want to get rid of GraphicObject URLs for the more robust image life-cycle handling, it was necessary to change the way bitmap table stores and handles images, so that they always store a Graphic object (wrapped in UNO object that provides the XGraphic and XBitmap interface). In addition this changes loading and saving from ODF (xmloff) and OOXML (oox) filters so they don't depend on GraphicObject URL anymore, but load or save directly to / from XGraphic or XBitmap. Change-Id: I2b88e10056e7d6c920249d59188f86b1a5a32d21 Reviewed-on: https://gerrit.libreoffice.org/49074 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'include/oox')
-rw-r--r--include/oox/export/drawingml.hxx22
-rw-r--r--include/oox/helper/modelobjecthelper.hxx5
2 files changed, 27 insertions, 0 deletions
diff --git a/include/oox/export/drawingml.hxx b/include/oox/export/drawingml.hxx
index c8faa08001fd..2f02f783462c 100644
--- a/include/oox/export/drawingml.hxx
+++ b/include/oox/export/drawingml.hxx
@@ -63,6 +63,9 @@ namespace drawing {
struct EnhancedCustomShapeParameterPair;
struct EnhancedCustomShapeParameter;
}
+namespace graphic {
+ class XGraphic;
+}
namespace style {
struct LineSpacing;
}
@@ -187,18 +190,37 @@ public:
const OUString& sURLPropName );
void WriteBlipFill( const css::uno::Reference< css::beans::XPropertySet >& rXPropSet,
const OUString& sURLPropName, sal_Int32 nXmlNamespace );
+
+ void WriteXGraphicBlipFill(css::uno::Reference<css::beans::XPropertySet> const & rXPropSet,
+ css::uno::Reference<css::graphic::XGraphic> const & rxGraphic,
+ sal_Int32 nXmlNamespace, bool bWriteMode, bool bRelPathToMedia);
+
void WritePattFill( const css::uno::Reference< css::beans::XPropertySet >& rXPropSet );
void WritePattFill(const css::uno::Reference<css::beans::XPropertySet>& rXPropSet,
const css::drawing::Hatch& rHatch);
void WriteSrcRect( const css::uno::Reference< css::beans::XPropertySet >&, const OUString& );
void WriteOutline( const css::uno::Reference< css::beans::XPropertySet >& rXPropSet );
void WriteStretch( const css::uno::Reference< css::beans::XPropertySet >& rXPropSet, const OUString& rURL );
+
+ void WriteXGraphicStretch(css::uno::Reference<css::beans::XPropertySet> const & rXPropSet,
+ css::uno::Reference<css::graphic::XGraphic> const & rxGraphic);
+
void WriteLinespacing( const css::style::LineSpacing& rLineSpacing );
OUString WriteBlip( const css::uno::Reference< css::beans::XPropertySet >& rXPropSet,
const OUString& rURL, bool bRelPathToMedia, const Graphic *pGraphic=nullptr );
+
+ OUString WriteXGraphicBlip(css::uno::Reference<css::beans::XPropertySet> const & rXPropSet,
+ css::uno::Reference<css::graphic::XGraphic> const & rxGraphic,
+ bool bRelPathToMedia);
+
+ void WriteImageBrightnessContrastTransparence(css::uno::Reference<css::beans::XPropertySet> const & rXPropSet);
+
void WriteBlipMode( const css::uno::Reference< css::beans::XPropertySet >& rXPropSet, const OUString& rURL );
+ void WriteXGraphicBlipMode(css::uno::Reference<css::beans::XPropertySet> const & rXPropSet,
+ css::uno::Reference<css::graphic::XGraphic> const & rxGraphic);
+
void WriteShapeTransformation(const css::uno::Reference< css::drawing::XShape >& rXShape,
sal_Int32 nXmlNamespace, bool bFlipH = false, bool bFlipV = false, bool bSuppressRotation = false, bool bSuppressFlipping = false, bool bFlippedBeforeRotation = false);
void WriteTransformation(const tools::Rectangle& rRectangle,
diff --git a/include/oox/helper/modelobjecthelper.hxx b/include/oox/helper/modelobjecthelper.hxx
index 986e0c7c5945..67980b57f6c8 100644
--- a/include/oox/helper/modelobjecthelper.hxx
+++ b/include/oox/helper/modelobjecthelper.hxx
@@ -28,6 +28,7 @@
namespace com { namespace sun { namespace star {
namespace awt { struct Gradient; }
+ namespace graphic { class XGraphic; }
namespace container { class XNameContainer; }
namespace drawing { struct LineDash; }
namespace drawing { struct PolyPolygonBezierCoords; }
@@ -107,6 +108,10 @@ public:
an internal constant name with a new unused index appended. */
OUString insertFillBitmapUrl( const OUString& rGraphicUrl );
+ /** Inserts a new named fill graphic, returns the bitmap name, based on
+ an internal constant name with a new unused index appended. */
+ OUString insertFillBitmapXGraphic(css::uno::Reference<css::graphic::XGraphic> const & rxGraphic);
+
OUString getFillBitmapUrl( const OUString& rGraphicName );
private: