LibreOffice Module filter (master) 1
svgwriter.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19
20#pragma once
21
23#include <rtl/ustring.hxx>
24#include <osl/diagnose.h>
25#include <vcl/gdimtf.hxx>
26#include <vcl/metaact.hxx>
27#include <vcl/virdev.hxx>
28#include <vcl/graphictools.hxx>
29#include <xmloff/xmlexp.hxx>
30
31#include <com/sun/star/uno/Reference.h>
32#include <com/sun/star/container/XEnumeration.hpp>
33#include <com/sun/star/xml/sax/XDocumentHandler.hpp>
34#include <com/sun/star/drawing/XShape.hpp>
35#include <com/sun/star/text/XText.hpp>
36#include <com/sun/star/text/XTextContent.hpp>
37#include <com/sun/star/text/XTextRange.hpp>
38#include <com/sun/star/svg/XSVGWriter.hpp>
39
40#include <memory>
41#include <stack>
42#include <unordered_map>
43
44namespace basegfx { class BColorStops; }
45
46using namespace ::com::sun::star::uno;
47using namespace ::com::sun::star::container;
48using namespace ::com::sun::star::lang;
49using namespace ::com::sun::star::text;
50using namespace ::com::sun::star::style;
51using namespace ::com::sun::star::svg;
52using namespace ::com::sun::star::xml::sax;
53
54inline 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\">";
55
56#define SVGWRITER_WRITE_FILL 0x00000001
57#define SVGWRITER_WRITE_TEXT 0x00000002
58#define SVGWRITER_NO_SHAPE_COMMENTS 0x01000000
59
60// This must match the same type definition in svgexport.hxx
61typedef std::unordered_map< BitmapChecksum, std::unique_ptr< GDIMetaFile > > MetaBitmapActionMap;
62
64{
66// Color aLineColor;
67// Color aFillColor;
68// basegfx::B2DLineJoin aLineJoin;
69// com::sun::star::drawing::LineCap aLineCap;
71
73 : aFont()
75 {}
76};
77// - PartialState -
78
80{
82 ::std::optional<vcl::Font> mupFont;
84
85 const vcl::Font& getFont( const vcl::Font& rDefaultFont ) const
86 { return mupFont ? *mupFont : rDefaultFont; }
87
88 void setFont( const vcl::Font& rFont )
89 { mupFont = rFont; }
90
93 , mupFont()
95 {}
96
97 PartialState(PartialState&& aPartialState) noexcept
98 : meFlags( aPartialState.meFlags )
99 , mupFont( std::move( aPartialState.mupFont ) )
100 , mnRegionClipPathId( aPartialState.mnRegionClipPathId )
101 {
102 aPartialState.meFlags = vcl::PushFlags::NONE;
103 aPartialState.mnRegionClipPathId = 0;
104 }
105};
106
107
108// - SVGContextHandler -
109
111{
112private:
113 ::std::stack<PartialState> maStateStack;
115
116public:
119 void pushState( vcl::PushFlags eFlags );
120 void popState();
121};
122
123
124// - SVGAttributeWriter -
125
126class SVGActionWriter;
127class SVGExport;
128class SVGFontExport;
129
130
132{
133private:
134
138 std::unique_ptr<SvXMLElementExport> mpElemFont;
139
140
141 static double ImplRound( double fVal );
142
143public:
144
145 SVGAttributeWriter( SVGExport& rExport, SVGFontExport& rFontExport, SVGState& rCurState );
147
148 void AddColorAttr( const OUString& pColorAttrName, const OUString& pColorOpacityAttrName, const Color& rColor );
149 void AddGradientDef( const tools::Rectangle& rObjRect,const Gradient& rGradient, OUString& rGradientId );
150 void AddPaintAttr( const Color& rLineColor, const Color& rFillColor,
151 const tools::Rectangle* pObjBoundRect = nullptr, const Gradient* pFillGradient = nullptr );
152
153 void SetFontAttr( const vcl::Font& rFont );
154 void startFontSettings();
155 void endFontSettings();
156 void setFontFamily();
157
158 static void ImplGetColorStr( const Color& rColor, OUString& rColorStr );
159};
160
162{
166 sal_Int32 mnStrokeWidth;
168 ::std::optional< Gradient > moShapeGradient;
169 OUString maId;
171 css::drawing::LineCap maLineCap;
172
173
177 mnStrokeWidth( 0 ),
178 maLineJoin(basegfx::B2DLineJoin::Miter), // miter is Svg 'stroke-linejoin' default
179 maLineCap(css::drawing::LineCap_BUTT) // butt is Svg 'stroke-linecap' default
180 {
181 }
182};
183
184
186class SVGExport;
187class GDIMetaFile;
188
189
191{
196};
197
198
199class SVGTextWriter final
200{
201 private:
207 Reference<XText> mrTextShape;
208 OUString msShapeId;
209 Reference<XEnumeration> mrParagraphEnumeration;
210 Reference<XTextContent> mrCurrentTextParagraph;
211 Reference<XEnumeration> mrTextPortionEnumeration;
212 Reference<XTextRange> mrCurrentTextPortion;
215 std::unique_ptr<SvXMLElementExport> mpTextShapeElem;
216 std::unique_ptr<SvXMLElementExport> mpTextParagraphElem;
217 std::unique_ptr<SvXMLElementExport> mpTextPositionElem;
226 std::unordered_map< OUString, BulletListItemInfo > maBulletListItemMap;
230 OUString msUrl;
232 OUString msPageCount;
236 static const bool mbIWS = false;
239
240 public:
241 explicit SVGTextWriter(SVGExport& rExport, SVGAttributeWriter& rAttributeWriter,
244
245 sal_Int32 setTextPosition(const GDIMetaFile& rMtf, size_t& nCurAction,
246 sal_uInt32 nWriteFlags);
247 void setTextProperties( const GDIMetaFile& rMtf, size_t nCurAction );
248 void addFontAttributes( bool bIsTextContainer );
249
251 bool nextParagraph();
252 bool nextTextPortion();
253
255 void startTextShape();
256 void endTextShape();
257 void startTextParagraph();
258 void endTextParagraph();
259 void startTextPosition( bool bExportX = true, bool bExportY = true);
260 void endTextPosition();
261 bool hasTextOpacity() const;
264 template< typename MetaBitmapActionType >
265 void writeBitmapPlaceholder( const MetaBitmapActionType* pAction );
267 void writeTextPortion( const Point& rPos, const OUString& rText );
268 void implWriteTextPortion( const Point& rPos, const OUString& rText,
269 Color aTextColor );
270
271 void setVirtualDevice( VirtualDevice* pVDev, MapMode& rTargetMapMode )
272 {
273 if( !pVDev )
274 OSL_FAIL( "SVGTextWriter::setVirtualDevice: invalid virtual device." );
275 mpVDev = pVDev;
276 mpTargetMapMode = &rTargetMapMode;
277 }
278
279 void setTextShape( const Reference<XText>& rxText,
280 const GDIMetaFile* pTextEmbeddedBitmapMtf )
281 {
282 mrTextShape.set( rxText );
283 mpTextEmbeddedBitmapMtf = pTextEmbeddedBitmapMtf;
284 }
285
286 private:
287 void implMap( const Size& rSz, Size& rDstSz ) const;
288 void implMap( const Point& rPt, Point& rDstPt ) const;
289 void implSetCurrentFont();
290 void implSetFontFamily();
291
292 template< typename SubType >
293 bool implGetTextPosition( const MetaAction* pAction, Point& raPos, bool& bEmpty );
294 template< typename SubType >
295 bool implGetTextPositionFromBitmap( const MetaAction* pAction, Point& raPos, bool& rbEmpty );
296
297 void implRegisterInterface( const Reference< XInterface >& rxIf );
298 const OUString & implGetValidIDFromInterface( const Reference< XInterface >& rxIf );
299};
300
301
303{
304private:
305
307 sal_Int32 mnCurMaskId;
308 sal_Int32 mnCurPatternId;
310 ::std::unique_ptr< SvXMLElementExport > mpCurrentClipRegionElem;
311 ::std::unique_ptr< SVGShapeDescriptor > mapCurShape;
323
324
325 tools::Long ImplMap( sal_Int32 nVal ) const;
326 Point& ImplMap( const Point& rPt, Point& rDstPt ) const;
327 Size& ImplMap( const Size& rSz, Size& rDstSz ) const;
328 void ImplMap( const tools::Rectangle& rRect, tools::Rectangle& rDstRect ) const;
329 tools::Polygon& ImplMap( const tools::Polygon& rPoly, tools::Polygon& rDstPoly ) const;
330 tools::PolyPolygon& ImplMap( const tools::PolyPolygon& rPolyPoly, tools::PolyPolygon& rDstPolyPoly ) const;
331
332 void ImplWriteLine( const Point& rPt1, const Point& rPt2, const Color* pLineColor = nullptr );
333 void ImplWriteRect( const tools::Rectangle& rRect, tools::Long nRadX = 0, tools::Long nRadY = 0 );
334 void ImplWriteEllipse( const Point& rCenter, tools::Long nRadX, tools::Long nRadY );
335 void ImplWritePattern( const tools::PolyPolygon& rPolyPoly, const Hatch* pHatch, const Gradient* pGradient, sal_uInt32 nWriteFlags );
336 void ImplAddLineAttr( const LineInfo &rAttrs );
337 void ImplWritePolyPolygon( const tools::PolyPolygon& rPolyPoly, bool bLineOnly,
338 bool bApplyMapping = true );
339 void ImplWriteShape( const SVGShapeDescriptor& rShape );
340 void ImplCreateClipPathDef( const tools::PolyPolygon& rPolyPoly );
341 void ImplStartClipRegion(sal_Int32 nClipPathId);
342 void ImplEndClipRegion();
343 void ImplWriteClipPath( const tools::PolyPolygon& rPolyPoly );
344 void ImplWriteGradientEx( const tools::PolyPolygon& rPolyPoly, const Gradient& rGradient, sal_uInt32 nWriteFlags, const basegfx::BColorStops* pColorStops);
345 void ImplWriteGradientLinear( const tools::PolyPolygon& rPolyPoly, const Gradient& rGradient, const basegfx::BColorStops* pColorStops );
346 void ImplWriteGradientStop( const Color& rColor, double fOffset );
347 static Color ImplGetColorWithIntensity( const Color& rColor, sal_uInt16 nIntensity );
348 void ImplWriteMask( GDIMetaFile& rMtf, const Point& rDestPt, const Size& rDestSize, const Gradient& rGradient, sal_uInt32 nWriteFlags, const basegfx::BColorStops* pColorStops);
349 void ImplWriteText( const Point& rPos, const OUString& rText, KernArraySpan pDXArray, tools::Long nWidth );
350 void ImplWriteText( const Point& rPos, const OUString& rText, KernArraySpan pDXArray, tools::Long nWidth, Color aTextColor );
351 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);
352
353 void ImplWriteActions( const GDIMetaFile& rMtf,
354 sal_uInt32 nWriteFlags,
355 const OUString& aElementId,
356 const Reference< css::drawing::XShape >* pXShape = nullptr,
357 const GDIMetaFile* pTextEmbeddedBitmapMtf = nullptr );
358
360
361public:
362
363 static OUString GetPathString( const tools::PolyPolygon& rPolyPoly, bool bLine );
364 static BitmapChecksum GetChecksum( const MetaAction* pAction );
365
366public:
367 SVGActionWriter( SVGExport& rExport, SVGFontExport& rFontExport );
369
370 void WriteMetaFile( const Point& rPos100thmm,
371 const Size& rSize100thmm,
372 const GDIMetaFile& rMtf,
373 sal_uInt32 nWriteFlags,
374 const OUString& aElementId = "",
375 const Reference< css::drawing::XShape >* pXShape = nullptr,
376 const GDIMetaFile* pTextEmbeddedBitmapMtf = nullptr );
377
378 void SetEmbeddedBitmapRefs( const MetaBitmapActionMap* pEmbeddedBitmapsMap );
379 void StartMask(const Point& rDestPt, const Size& rDestSize, const Gradient& rGradient,
380 sal_uInt32 nWriteFlags, const basegfx::BColorStops* pColorStops, OUString* pTextStyle = nullptr);
381 void SetPreviewMode(bool bState = true) { mbIsPreview = bState; }
382};
383
384
385class SVGWriter : public cppu::WeakImplHelper< XSVGWriter, XServiceInfo >
386{
387private:
388 Reference< XComponentContext > mxContext;
389 Sequence< css::beans::PropertyValue > maFilterData;
390
391public:
392 explicit SVGWriter( const Sequence<Any>& args,
393 const Reference< XComponentContext >& rxCtx );
394 virtual ~SVGWriter() override;
395
396 // XSVGWriter
397 virtual void SAL_CALL write( const Reference<XDocumentHandler>& rxDocHandler,
398 const Sequence<sal_Int8>& rMtfSeq ) override;
399
400 // XServiceInfo
401 virtual sal_Bool SAL_CALL supportsService(const OUString& sServiceName) override;
402 virtual OUString SAL_CALL getImplementationName() override;
403 virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
404};
405
406/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
sal_uInt64 BitmapChecksum
const MetaBitmapActionMap * mpEmbeddedBitmapsMap
Definition: svgwriter.hxx:321
sal_Int32 mnCurClipPathId
Definition: svgwriter.hxx:309
tools::Long ImplMap(sal_Int32 nVal) const
Definition: svgwriter.cxx:1834
void ImplWritePattern(const tools::PolyPolygon &rPolyPoly, const Hatch *pHatch, const Gradient *pGradient, sal_uInt32 nWriteFlags)
Definition: svgwriter.cxx:2253
void ImplCreateClipPathDef(const tools::PolyPolygon &rPolyPoly)
Definition: svgwriter.cxx:2206
static Color ImplGetColorWithIntensity(const Color &rColor, sal_uInt16 nIntensity)
Definition: svgwriter.cxx:2450
sal_Int32 mnCurMaskId
Definition: svgwriter.hxx:307
::std::unique_ptr< SvXMLElementExport > mpCurrentClipRegionElem
Definition: svgwriter.hxx:310
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)
Definition: svgwriter.cxx:2854
SVGTextWriter maTextWriter
Definition: svgwriter.hxx:316
void ImplWriteGradientLinear(const tools::PolyPolygon &rPolyPoly, const Gradient &rGradient, const basegfx::BColorStops *pColorStops)
Definition: svgwriter.cxx:2332
void ImplWriteText(const Point &rPos, const OUString &rText, KernArraySpan pDXArray, tools::Long nWidth)
Definition: svgwriter.cxx:2564
void ImplWriteActions(const GDIMetaFile &rMtf, sal_uInt32 nWriteFlags, const OUString &aElementId, const Reference< css::drawing::XShape > *pXShape=nullptr, const GDIMetaFile *pTextEmbeddedBitmapMtf=nullptr)
Definition: svgwriter.cxx:3032
void ImplWriteShape(const SVGShapeDescriptor &rShape)
Definition: svgwriter.cxx:2117
MapMode maTargetMapMode
Definition: svgwriter.hxx:318
void ImplWriteGradientStop(const Color &rColor, double fOffset)
Definition: svgwriter.cxx:2434
void ImplWriteLine(const Point &rPt1, const Point &rPt2, const Color *pLineColor=nullptr)
Definition: svgwriter.cxx:1980
void ImplStartClipRegion(sal_Int32 nClipPathId)
Definition: svgwriter.cxx:2221
bool mbClipAttrChanged
Definition: svgwriter.hxx:319
void WriteMetaFile(const Point &rPos100thmm, const Size &rSize100thmm, const GDIMetaFile &rMtf, sal_uInt32 nWriteFlags, const OUString &aElementId="", const Reference< css::drawing::XShape > *pXShape=nullptr, const GDIMetaFile *pTextEmbeddedBitmapMtf=nullptr)
Definition: svgwriter.cxx:4077
void ImplAddLineAttr(const LineInfo &rAttrs)
Definition: svgwriter.cxx:2043
void SetEmbeddedBitmapRefs(const MetaBitmapActionMap *pEmbeddedBitmapsMap)
Definition: svgwriter.cxx:1972
sal_Int32 mnCurGradientId
Definition: svgwriter.hxx:306
void ImplWriteGradientEx(const tools::PolyPolygon &rPolyPoly, const Gradient &rGradient, sal_uInt32 nWriteFlags, const basegfx::BColorStops *pColorStops)
Definition: svgwriter.cxx:2317
sal_Int32 mnCurPatternId
Definition: svgwriter.hxx:308
SVGContextHandler maContextHandler
Definition: svgwriter.hxx:313
static OUString GetPathString(const tools::PolyPolygon &rPolyPoly, bool bLine)
Definition: svgwriter.cxx:1894
void ImplWritePolyPolygon(const tools::PolyPolygon &rPolyPoly, bool bLineOnly, bool bApplyMapping=true)
Definition: svgwriter.cxx:2097
::std::unique_ptr< SVGShapeDescriptor > mapCurShape
Definition: svgwriter.hxx:311
void ImplWriteRect(const tools::Rectangle &rRect, tools::Long nRadX=0, tools::Long nRadY=0)
Definition: svgwriter.cxx:2005
void ImplWriteMask(GDIMetaFile &rMtf, const Point &rDestPt, const Size &rDestSize, const Gradient &rGradient, sal_uInt32 nWriteFlags, const basegfx::BColorStops *pColorStops)
Definition: svgwriter.cxx:2524
SVGExport & mrExport
Definition: svgwriter.hxx:312
SVGActionWriter(SVGExport &rExport, SVGFontExport &rFontExport)
Definition: svgwriter.cxx:1806
void SetPreviewMode(bool bState=true)
Definition: svgwriter.hxx:381
void StartMask(const Point &rDestPt, const Size &rDestSize, const Gradient &rGradient, sal_uInt32 nWriteFlags, const basegfx::BColorStops *pColorStops, OUString *pTextStyle=nullptr)
Definition: svgwriter.cxx:2460
VclPtr< VirtualDevice > mpVDev
Definition: svgwriter.hxx:317
void ImplWriteEllipse(const Point &rCenter, tools::Long nRadX, tools::Long nRadY)
Definition: svgwriter.cxx:2026
bool mbIsPlaceholderShape
Definition: svgwriter.hxx:320
SVGAttributeWriter maAttributeWriter
Definition: svgwriter.hxx:315
static BitmapChecksum GetChecksum(const MetaAction *pAction)
Definition: svgwriter.cxx:1964
vcl::Font ImplSetCorrectFontHeight() const
Definition: svgwriter.cxx:4064
void ImplEndClipRegion()
Definition: svgwriter.cxx:2233
SVGState & mrCurrentState
Definition: svgwriter.hxx:314
void ImplWriteClipPath(const tools::PolyPolygon &rPolyPoly)
Definition: svgwriter.cxx:2241
static void ImplGetColorStr(const Color &rColor, OUString &rColorStr)
Definition: svgwriter.cxx:167
SVGAttributeWriter(SVGExport &rExport, SVGFontExport &rFontExport, SVGState &rCurState)
Definition: svgwriter.cxx:148
void SetFontAttr(const vcl::Font &rFont)
Definition: svgwriter.cxx:342
SVGExport & mrExport
Definition: svgwriter.hxx:135
void startFontSettings()
Definition: svgwriter.cxx:413
void AddPaintAttr(const Color &rLineColor, const Color &rFillColor, const tools::Rectangle *pObjBoundRect=nullptr, const Gradient *pFillGradient=nullptr)
Definition: svgwriter.cxx:197
void AddGradientDef(const tools::Rectangle &rObjRect, const Gradient &rGradient, OUString &rGradientId)
Definition: svgwriter.cxx:221
SVGFontExport & mrFontExport
Definition: svgwriter.hxx:136
void AddColorAttr(const OUString &pColorAttrName, const OUString &pColorOpacityAttrName, const Color &rColor)
Definition: svgwriter.cxx:179
SVGState & mrCurrentState
Definition: svgwriter.hxx:137
std::unique_ptr< SvXMLElementExport > mpElemFont
Definition: svgwriter.hxx:138
static double ImplRound(double fVal)
Definition: svgwriter.cxx:161
SVGState maCurrentState
Definition: svgwriter.hxx:114
::std::stack< PartialState > maStateStack
Definition: svgwriter.hxx:113
SVGState & getCurrentState()
Definition: svgwriter.cxx:104
void pushState(vcl::PushFlags eFlags)
Definition: svgwriter.cxx:109
vcl::PushFlags getPushFlags() const
Definition: svgwriter.cxx:95
bool mbIsPlaceholderShape
Definition: svgwriter.hxx:235
vcl::Font maParentFont
Definition: svgwriter.hxx:238
std::unique_ptr< SvXMLElementExport > mpTextShapeElem
Definition: svgwriter.hxx:215
void setVirtualDevice(VirtualDevice *pVDev, MapMode &rTargetMapMode)
Definition: svgwriter.hxx:271
OUString msUrl
Definition: svgwriter.hxx:230
void implWriteTextPortion(const Point &rPos, const OUString &rText, Color aTextColor)
Definition: svgwriter.cxx:1672
sal_Int32 mnLeftTextPortionLength
Definition: svgwriter.hxx:219
sal_Unicode mcBulletChar
Definition: svgwriter.hxx:225
Reference< XEnumeration > mrTextPortionEnumeration
Definition: svgwriter.hxx:211
bool implGetTextPositionFromBitmap(const MetaAction *pAction, Point &raPos, bool &rbEmpty)
Definition: svgwriter.cxx:572
std::unique_ptr< SvXMLElementExport > mpTextParagraphElem
Definition: svgwriter.hxx:216
bool mbIsTextShapeStarted
Definition: svgwriter.hxx:206
const OUString & implGetValidIDFromInterface(const Reference< XInterface > &rxIf)
Definition: svgwriter.cxx:499
sal_Int32 setTextPosition(const GDIMetaFile &rMtf, size_t &nCurAction, sal_uInt32 nWriteFlags)
setTextPosition Set the start position of the next line of text.
Definition: svgwriter.cxx:592
OUString msTextFieldType
Definition: svgwriter.hxx:234
void endTextPosition()
Definition: svgwriter.cxx:1387
bool hasTextOpacity() const
Definition: svgwriter.cxx:1392
std::unique_ptr< SvXMLElementExport > mpTextPositionElem
Definition: svgwriter.hxx:217
void setTextShape(const Reference< XText > &rxText, const GDIMetaFile *pTextEmbeddedBitmapMtf)
Definition: svgwriter.hxx:279
bool mbIsNewListItem
Definition: svgwriter.hxx:223
bool mbIsListLevelStyleImage
Definition: svgwriter.hxx:227
void startTextPosition(bool bExportX=true, bool bExportY=true)
Definition: svgwriter.cxx:1373
bool nextParagraph()
Definition: svgwriter.cxx:965
OUString maTextOpacity
Definition: svgwriter.hxx:218
Reference< XTextContent > mrCurrentTextParagraph
Definition: svgwriter.hxx:210
SVGTextWriter(SVGExport &rExport, SVGAttributeWriter &rAttributeWriter, SVGActionWriter &mrActionWriter)
Definition: svgwriter.cxx:462
sal_Int16 meNumberingType
Definition: svgwriter.hxx:224
Reference< XText > mrTextShape
Definition: svgwriter.hxx:207
bool implGetTextPosition(const MetaAction *pAction, Point &raPos, bool &bEmpty)
Definition: svgwriter.cxx:542
tools::Long mnTextWidth
Definition: svgwriter.hxx:221
OUString msHyperlinkIdList
Definition: svgwriter.hxx:231
void implWriteBulletChars()
Definition: svgwriter.cxx:1406
SVGExport & mrExport
Definition: svgwriter.hxx:202
bool mbPositioningNeeded
Definition: svgwriter.hxx:222
void writeBitmapPlaceholder(const MetaBitmapActionType *pAction)
Definition: svgwriter.cxx:1478
bool isTextShapeStarted() const
Definition: svgwriter.hxx:254
const GDIMetaFile * mpTextEmbeddedBitmapMtf
Definition: svgwriter.hxx:213
bool nextTextPortion()
Definition: svgwriter.cxx:1128
void startTextParagraph()
Definition: svgwriter.cxx:1325
void implSetCurrentFont()
Definition: svgwriter.cxx:523
vcl::Font maCurrentFont
Definition: svgwriter.hxx:237
void writeTextPortion(const Point &rPos, const OUString &rText)
Definition: svgwriter.cxx:1582
OUString msPageCount
Definition: svgwriter.hxx:232
OUString msDateTimeType
Definition: svgwriter.hxx:233
MapMode * mpTargetMapMode
Definition: svgwriter.hxx:214
Reference< XTextRange > mrCurrentTextPortion
Definition: svgwriter.hxx:212
void endTextParagraph()
Definition: svgwriter.cxx:1362
VclPtr< VirtualDevice > mpVDev
Definition: svgwriter.hxx:205
void endTextShape()
Definition: svgwriter.cxx:1308
void implSetFontFamily()
Definition: svgwriter.cxx:920
void implWriteEmbeddedBitmaps()
Definition: svgwriter.cxx:1505
void implRegisterInterface(const Reference< XInterface > &rxIf)
Definition: svgwriter.cxx:492
void implMap(const Size &rSz, Size &rDstSz) const
Definition: svgwriter.cxx:505
SVGActionWriter & mrActionWriter
Definition: svgwriter.hxx:204
void createParagraphEnumeration()
Definition: svgwriter.cxx:941
SVGAttributeWriter & mrAttributeWriter
Definition: svgwriter.hxx:203
static const bool mbIWS
Definition: svgwriter.hxx:236
void setTextProperties(const GDIMetaFile &rMtf, size_t nCurAction)
Definition: svgwriter.cxx:737
OUString msShapeId
Definition: svgwriter.hxx:208
std::unordered_map< OUString, BulletListItemInfo > maBulletListItemMap
Definition: svgwriter.hxx:226
void implExportHyperlinkIds()
Definition: svgwriter.cxx:1394
void startTextShape()
Definition: svgwriter.cxx:1278
Reference< XEnumeration > mrParagraphEnumeration
Definition: svgwriter.hxx:209
void addFontAttributes(bool bIsTextContainer)
Definition: svgwriter.cxx:806
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
Definition: svgwriter.cxx:4156
virtual sal_Bool SAL_CALL supportsService(const OUString &sServiceName) override
Definition: svgwriter.cxx:4148
Sequence< css::beans::PropertyValue > maFilterData
Definition: svgwriter.hxx:389
SVGWriter(const Sequence< Any > &args, const Reference< XComponentContext > &rxCtx)
Definition: svgwriter.cxx:4121
virtual OUString SAL_CALL getImplementationName() override
Definition: svgwriter.cxx:4152
Reference< XComponentContext > mxContext
Definition: svgwriter.hxx:388
virtual ~SVGWriter() override
Definition: svgwriter.cxx:4129
virtual void SAL_CALL write(const Reference< XDocumentHandler > &rxDocHandler, const Sequence< sal_Int8 > &rMtfSeq) override
Definition: svgwriter.cxx:4134
::std::vector< double > DashArray
constexpr ::Color COL_TRANSPARENT(ColorTransparency, 0xFF, 0xFF, 0xFF, 0xFF)
float u
NONE
long Long
sal_Unicode cBulletChar
Definition: svgwriter.hxx:195
vcl::PushFlags meFlags
Definition: svgwriter.hxx:81
const vcl::Font & getFont(const vcl::Font &rDefaultFont) const
Definition: svgwriter.hxx:85
PartialState(PartialState &&aPartialState) noexcept
Definition: svgwriter.hxx:97
void setFont(const vcl::Font &rFont)
Definition: svgwriter.hxx:88
sal_Int32 mnRegionClipPathId
Definition: svgwriter.hxx:83
::std::optional< vcl::Font > mupFont
Definition: svgwriter.hxx:82
SvtGraphicStroke::DashArray maDashArray
Definition: svgwriter.hxx:167
::std::optional< Gradient > moShapeGradient
Definition: svgwriter.hxx:168
css::drawing::LineCap maLineCap
Definition: svgwriter.hxx:171
tools::PolyPolygon maShapePolyPoly
Definition: svgwriter.hxx:163
basegfx::B2DLineJoin maLineJoin
Definition: svgwriter.hxx:170
sal_Int32 mnStrokeWidth
Definition: svgwriter.hxx:166
sal_Int32 nRegionClipPathId
Definition: svgwriter.hxx:70
vcl::Font aFont
Definition: svgwriter.hxx:65
std::unordered_map< BitmapChecksum, std::unique_ptr< GDIMetaFile > > MetaBitmapActionMap
Definition: svgfilter.hxx:162
std::unordered_map< BitmapChecksum, std::unique_ptr< GDIMetaFile > > MetaBitmapActionMap
Definition: svgwriter.hxx:61
constexpr OUStringLiteral SVG_DTD_STRING
Definition: svgwriter.hxx:54
unsigned char sal_Bool
sal_uInt16 sal_Unicode