summaryrefslogtreecommitdiffstats
path: root/filter/source/svg/svgwriter.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'filter/source/svg/svgwriter.hxx')
-rw-r--r--filter/source/svg/svgwriter.hxx21
1 files changed, 11 insertions, 10 deletions
diff --git a/filter/source/svg/svgwriter.hxx b/filter/source/svg/svgwriter.hxx
index fdfcd24d32b2..1bcf8a87b4c9 100644
--- a/filter/source/svg/svgwriter.hxx
+++ b/filter/source/svg/svgwriter.hxx
@@ -41,16 +41,16 @@
#include <stack>
#include <unordered_map>
+namespace basegfx { class BColorStops; }
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::container;
using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::text;
-using namespace ::com::sun::star::style;
using namespace ::com::sun::star::svg;
using namespace ::com::sun::star::xml::sax;
-inline constexpr OUStringLiteral SVG_DTD_STRING = u"<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">";
+inline constexpr OUString SVG_DTD_STRING = u"<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">"_ustr;
#define SVGWRITER_WRITE_FILL 0x00000001
#define SVGWRITER_WRITE_TEXT 0x00000002
@@ -164,7 +164,7 @@ struct SVGShapeDescriptor
Color maShapeLineColor;
sal_Int32 mnStrokeWidth;
SvtGraphicStroke::DashArray maDashArray;
- ::std::unique_ptr< Gradient > mapShapeGradient;
+ ::std::optional< Gradient > moShapeGradient;
OUString maId;
basegfx::B2DLineJoin maLineJoin;
css::drawing::LineCap maLineCap;
@@ -318,6 +318,7 @@ private:
bool mbClipAttrChanged;
bool mbIsPlaceholderShape;
const MetaBitmapActionMap* mpEmbeddedBitmapsMap;
+ bool mbIsPreview;
tools::Long ImplMap( sal_Int32 nVal ) const;
@@ -339,14 +340,13 @@ private:
void ImplStartClipRegion(sal_Int32 nClipPathId);
void ImplEndClipRegion();
void ImplWriteClipPath( const tools::PolyPolygon& rPolyPoly );
- void ImplWriteGradientEx( const tools::PolyPolygon& rPolyPoly, const Gradient& rGradient, sal_uInt32 nWriteFlags);
- void ImplWriteGradientLinear( const tools::PolyPolygon& rPolyPoly, const Gradient& rGradient );
+ void ImplWriteGradientEx( const tools::PolyPolygon& rPolyPoly, const Gradient& rGradient, sal_uInt32 nWriteFlags, const basegfx::BColorStops* pColorStops);
+ void ImplWriteGradientLinear( const tools::PolyPolygon& rPolyPoly, const Gradient& rGradient, const basegfx::BColorStops* pColorStops );
void ImplWriteGradientStop( const Color& rColor, double fOffset );
static Color ImplGetColorWithIntensity( const Color& rColor, sal_uInt16 nIntensity );
- static Color ImplGetGradientColor( const Color& rStartColor, const Color& rEndColor, double fOffset );
- void ImplWriteMask( GDIMetaFile& rMtf, const Point& rDestPt, const Size& rDestSize, const Gradient& rGradient, sal_uInt32 nWriteFlags );
- void ImplWriteText( const Point& rPos, const OUString& rText, o3tl::span<const sal_Int32> pDXArray, tools::Long nWidth );
- void ImplWriteText( const Point& rPos, const OUString& rText, o3tl::span<const sal_Int32> pDXArray, tools::Long nWidth, Color aTextColor );
+ void ImplWriteMask( GDIMetaFile& rMtf, const Point& rDestPt, const Size& rDestSize, const Gradient& rGradient, sal_uInt32 nWriteFlags, const basegfx::BColorStops* pColorStops);
+ void ImplWriteText( const Point& rPos, const OUString& rText, KernArraySpan pDXArray, tools::Long nWidth );
+ void ImplWriteText( const Point& rPos, const OUString& rText, KernArraySpan pDXArray, tools::Long nWidth, Color aTextColor );
void ImplWriteBmp( const BitmapEx& rBmpEx, const Point& rPt, const Size& rSz, const Point& rSrcPt, const Size& rSrcSz, const css::uno::Reference<css::drawing::XShape>* pShape);
void ImplWriteActions( const GDIMetaFile& rMtf,
@@ -376,7 +376,8 @@ public:
void SetEmbeddedBitmapRefs( const MetaBitmapActionMap* pEmbeddedBitmapsMap );
void StartMask(const Point& rDestPt, const Size& rDestSize, const Gradient& rGradient,
- sal_uInt32 nWriteFlags, OUString* pTextStyle = nullptr);
+ sal_uInt32 nWriteFlags, const basegfx::BColorStops* pColorStops, OUString* pTextStyle = nullptr);
+ void SetPreviewMode(bool bState = true) { mbIsPreview = bState; }
};