summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorBalazs Varga <balazs.varga991@gmail.com>2018-10-31 08:43:47 +0100
committerAndras Timar <andras.timar@collabora.com>2018-11-05 17:56:48 +0100
commitb77f4f69bb2f1d3ab740446799da2fd3db9094da (patch)
tree1a5057055ec7857b9dfe5a9057e07fdac19dc54d /include
parent502077fb9a9387a5aac85dabf445c10718309611 (diff)
tdf#108104 OOXML Import: Fix Hatch fill in Charts
Sets an explicit fill hatch, or creates a named fill hatch and stored in a global container. With this patch the SUPPORTED MS Office hatch styles by LibreOffice, or the custom LibreOffice hatches will be appeared correctly instead of the previous display as horizontal lines in LibreOffice. (The background color of the hatch styles are not imported correcty, but that is another BUG.) Change-Id: Ifda9dc805dd08f58db10b35f40d7f511a8614f77 Reviewed-on: https://gerrit.libreoffice.org/62681 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Reviewed-on: https://gerrit.libreoffice.org/62891 Reviewed-by: Andras Timar <andras.timar@collabora.com>
Diffstat (limited to 'include')
-rw-r--r--include/oox/drawingml/shapepropertymap.hxx7
-rw-r--r--include/oox/helper/modelobjecthelper.hxx5
2 files changed, 10 insertions, 2 deletions
diff --git a/include/oox/drawingml/shapepropertymap.hxx b/include/oox/drawingml/shapepropertymap.hxx
index 2fb237cd496f..dd2d0d49129a 100644
--- a/include/oox/drawingml/shapepropertymap.hxx
+++ b/include/oox/drawingml/shapepropertymap.hxx
@@ -71,7 +71,7 @@ enum class ShapeProperty
FillBitmapOffsetX,
FillBitmapOffsetY,
FillBitmapRectanglePoint,
- FillHatch,
+ FillHatch, /// Explicit fill hatch or name of a fill hatch stored in a global container.
ShadowXDistance,
FillBitmapName,
FillBackground,
@@ -87,12 +87,13 @@ struct OOX_DLLPUBLIC ShapePropertyInfo
bool mbNamedLineDash; /// True = use named line dash instead of explicit line dash.
bool mbNamedFillGradient; /// True = use named fill gradient instead of explicit fill gradient.
bool mbNamedFillBitmap; /// True = use named fill bitmap instead of explicit fill bitmap.
+ bool mbNamedFillHatch; /// True = use named fill hatch instead of explicit fill hatch.
static ShapePropertyInfo DEFAULT; /// Default property info (used as default parameter of other methods).
explicit ShapePropertyInfo(const ShapePropertyIds& rnPropertyIds,
bool bNamedLineMarker, bool bNamedLineDash,
- bool bNamedFillGradient, bool bNamedFillBitmap);
+ bool bNamedFillGradient, bool bNamedFillBitmap, bool bNamedFillHatch);
bool has(ShapeProperty ePropId) const
{
@@ -147,6 +148,8 @@ private:
bool setFillBitmap( sal_Int32 nPropId, const css::uno::Any& rValue );
/** Sets an explicit fill bitmap and pushes the name to FillBitmapName */
bool setFillBitmapName( const css::uno::Any& rValue );
+ /** Sets an explicit fill hatch, or creates a named fill hatch. */
+ bool setFillHatch( sal_Int32 nPropId, const css::uno::Any& rValue );
// not implemented, to prevent implicit conversion from enum to int
css::uno::Any& operator[]( ShapeProperty ePropId ) = delete;
diff --git a/include/oox/helper/modelobjecthelper.hxx b/include/oox/helper/modelobjecthelper.hxx
index eb9c7ba97228..016b963c8ea1 100644
--- a/include/oox/helper/modelobjecthelper.hxx
+++ b/include/oox/helper/modelobjecthelper.hxx
@@ -32,6 +32,7 @@ namespace com { namespace sun { namespace star {
namespace graphic { class XGraphic; }
namespace container { class XNameContainer; }
namespace drawing { struct LineDash; }
+ namespace drawing { struct Hatch; }
namespace drawing { struct PolyPolygonBezierCoords; }
namespace lang { class XMultiServiceFactory; }
} } }
@@ -105,6 +106,8 @@ public:
OUString insertTransGrandient( const css::awt::Gradient& rGradient );
+ OUString insertFillHatch( const css::drawing::Hatch& rHatch );
+
/** 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);
@@ -117,10 +120,12 @@ private:
ObjectContainer maGradientContainer; ///< Contains all named fill gradients.
ObjectContainer maTransGradContainer; ///< Contains all named transparency Gradients.
ObjectContainer maBitmapUrlContainer; ///< Contains all named fill bitmap URLs.
+ ObjectContainer maHatchContainer; ///< Contains all named fill hatches.
const OUString maDashNameBase; ///< Base name for all named line dashes.
const OUString maGradientNameBase; ///< Base name for all named fill gradients.
const OUString maTransGradNameBase; ///< Base name for all named fill gradients.
const OUString maBitmapUrlNameBase; ///< Base name for all named fill bitmap URLs.
+ const OUString maHatchNameBase; ///< Base name for all named fill hatch URLs.
};