LibreOffice Module oox (master) 1
drawingml.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#ifndef INCLUDED_OOX_EXPORT_DRAWINGML_HXX
21#define INCLUDED_OOX_EXPORT_DRAWINGML_HXX
22
23#include <map>
24#include <stack>
25#include <string_view>
26#include <unordered_map>
27#include <utility>
28#include <vector>
29
30#include <com/sun/star/beans/PropertyState.hpp>
31#include <com/sun/star/uno/Any.hxx>
32#include <com/sun/star/uno/Reference.hxx>
33#include <com/sun/star/uno/Sequence.hxx>
34#include <com/sun/star/style/ParagraphAdjust.hpp>
35#include <com/sun/star/drawing/Hatch.hpp>
36#include <com/sun/star/i18n/ScriptType.hpp>
37#include <oox/dllapi.h>
39#include <oox/token/tokens.hxx>
40#include <oox/export/utils.hxx>
41#include <rtl/string.hxx>
42#include <rtl/ustring.hxx>
43#include <sal/types.h>
44#include <sax/fshelper.hxx>
45#include <svx/msdffdef.hxx>
46#include <vcl/checksum.hxx>
47#include <vcl/graph.hxx>
48#include <tools/gen.hxx>
49#include <tools/color.hxx>
50#include <vcl/mapmod.hxx>
53
54class Graphic;
56enum class SvxDateFormat;
57enum class SvxTimeFormat;
58
59namespace com::sun::star {
60namespace awt {
61 struct FontDescriptor;
62 struct Gradient2;
63}
64namespace beans {
65 struct PropertyValue;
66 class XPropertySet;
67 class XPropertyState;
68}
69namespace drawing {
70 class XShape;
71 struct EnhancedCustomShapeParameterPair;
72 struct EnhancedCustomShapeParameter;
73}
74namespace graphic {
75 class XGraphic;
76}
77namespace style {
78 struct LineSpacing;
79}
80namespace text {
81 class XTextContent;
82 class XTextRange;
83 class XTextFrame;
84}
85namespace io {
86 class XOutputStream;
87}
88namespace uno {
89 class XInterface;
90}
91namespace frame {
92 class XModel;
93}
94}
95
98namespace tools { class Rectangle; }
99
100namespace tools {
101 class PolyPolygon;
102}
103
104namespace oox {
105namespace core {
106 class XmlFilterBase;
107}
108
109namespace drawingml {
110
112{
113public:
114 virtual ~URLTransformer();
115
116 virtual OUString getTransformedString(const OUString& rURL) const;
117
118 virtual bool isExternalURL(const OUString& rURL) const;
119};
120
121// Our rotation is counter-clockwise and is in 100ths of a degree.
122// drawingML rotation is clockwise and is in 60000ths of a degree.
123inline sal_Int32 ExportRotateClockwisify(Degree100 input)
124{
125 return ((21600000 - input.get() * 600) % 21600000);
126}
127
130{
131public:
132 virtual void WriteOutliner(const OutlinerParaObject& rParaObj) = 0;
134 virtual void WriteTextBox(css::uno::Reference<css::drawing::XShape> xShape) = 0;
136 virtual css::uno::Reference<css::text::XTextFrame> GetUnoTextFrame(
137 css::uno::Reference<css::drawing::XShape> xShape) = 0;
138protected:
140 virtual ~DMLTextExport() {}
141};
142
143constexpr const char* getComponentDir(DocumentType eDocumentType)
144{
145 switch (eDocumentType)
146 {
147 case DOCUMENT_DOCX: return "word";
148 case DOCUMENT_PPTX: return "ppt";
149 case DOCUMENT_XLSX: return "xl";
150 }
151
152 return "";
153}
154
155constexpr const char* getRelationCompPrefix(DocumentType eDocumentType)
156{
157 switch (eDocumentType)
158 {
159 case DOCUMENT_DOCX: return "";
160 case DOCUMENT_PPTX:
161 case DOCUMENT_XLSX: return "../";
162 }
163
164 return "";
165}
166
168{
169private:
170 std::stack<sal_Int32> mnImageCounter;
171 std::stack<std::unordered_map<BitmapChecksum, OUString>> maExportGraphics;
172 std::stack<sal_Int32> mnWdpImageCounter;
173 std::stack<std::map<OUString, OUString>> maWdpCache;
174
176public:
177 static GraphicExportCache& get();
178
179 void push()
180 {
181 mnImageCounter.push(1);
182 maExportGraphics.emplace();
183 mnWdpImageCounter.push(1);
184 maWdpCache.emplace();
185 }
186
187 void pop()
188 {
189 mnImageCounter.pop();
190 maExportGraphics.pop();
191 mnWdpImageCounter.pop();
192 maWdpCache.pop();
193 }
194
196 {
197 return !maExportGraphics.empty();
198 }
199
200 void addExportGraphics(BitmapChecksum aChecksum, OUString const& sPath)
201 {
202 maExportGraphics.top()[aChecksum] = sPath;
203 }
204
206 {
207 OUString sPath;
208 if (!hasExportGraphics())
209 return sPath;
210
211 auto aIterator = maExportGraphics.top().find(aChecksum);
212 if (aIterator != maExportGraphics.top().end())
213 sPath = aIterator->second;
214 return sPath;
215 }
216
217 sal_Int32 nextImageCount()
218 {
219 sal_Int32 nCount = mnImageCounter.top();
220 mnImageCounter.top()++;
221 return nCount;
222 }
223
225 {
226 return !maWdpCache.empty();
227 }
228
229 OUString findWdpID(OUString const& rFileId)
230 {
231 OUString aPath;
232 if (!hasWdpCache())
233 return aPath;
234 auto aCachedItem = maWdpCache.top().find(rFileId);
235 if (aCachedItem != maWdpCache.top().end())
236 aPath = aCachedItem->second;
237 return aPath;
238 }
239
240 void addToWdpCache(OUString const& rFileId, OUString const& rId)
241 {
242 if (hasWdpCache())
243 maWdpCache.top()[rFileId] = rId;
244 }
245
247 {
248 sal_Int32 nCount = mnWdpImageCounter.top();
249 mnWdpImageCounter.top()++;
250 return nCount;
251 }
252};
253
255{
259
260public:
262 : mpFS(pFS)
263 , mpFilterBase(pFilterBase)
264 , meDocumentType(eDocumentType)
265 {}
266
267 OUString writeToStorage(Graphic const& rGraphic, bool bRelPathToMedia = false);
268 OUString writeBlip(Graphic const& rGraphic, std::vector<model::BlipEffect> const& rEffects, bool bRelPathToMedia = false);
269};
270
272{
273
274private:
275 static sal_Int32 mnDrawingMLCount;
276 static sal_Int32 mnVmlCount;
277
282
283
284protected:
285 css::uno::Any mAny;
289 css::uno::Reference<css::drawing::XShape> m_xParent;
291 static sal_Int32 mnChartCount;
292
295
296 bool GetProperty( const css::uno::Reference< css::beans::XPropertySet >& rXPropSet, const OUString& aName );
297 bool GetPropertyAndState( const css::uno::Reference< css::beans::XPropertySet >& rXPropSet,
298 const css::uno::Reference< css::beans::XPropertyState >& rXPropState,
299 const OUString& aName, css::beans::PropertyState& eState );
300 OUString GetFieldValue( const css::uno::Reference< css::text::XTextRange >& rRun, bool& bIsURLField );
305 static OUString GetDatetimeTypeFromDate(SvxDateFormat eDate);
310 static OUString GetDatetimeTypeFromTime(SvxTimeFormat eTime);
316 static OUString GetDatetimeTypeFromDateTime(SvxDateFormat eDate, SvxTimeFormat eTime);
317
319 void WriteMediaNonVisualProperties(const css::uno::Reference<css::drawing::XShape>& xShape);
320
321 void WriteStyleProperties( sal_Int32 nTokenId, const css::uno::Sequence< css::beans::PropertyValue >& aProperties );
322
323 const char* GetComponentDir() const;
324 const char* GetRelationCompPrefix() const;
325
326 static bool EqualGradients( const css::awt::Gradient2& rGradient1, const css::awt::Gradient2& rGradient2 );
327 bool IsFontworkShape(const css::uno::Reference< css::beans::XPropertySet >& rXShapePropSet);
328
329 void WriteGlowEffect(const css::uno::Reference<css::beans::XPropertySet>& rXPropSet);
330 void WriteSoftEdgeEffect(const css::uno::Reference<css::beans::XPropertySet>& rXPropSet);
331 void WriteCustomGeometryPoint(const css::drawing::EnhancedCustomShapeParameterPair& rParamPair,
332 const EnhancedCustomShape2d& rCustomShape2d,
333 const bool bReplaceGeoWidth, const bool bReplaceGeoHeight);
334 bool WriteCustomGeometrySegment(
335 const sal_Int16 eCommand, const sal_Int32 nCount,
336 const css::uno::Sequence<css::drawing::EnhancedCustomShapeParameterPair>& rPairs,
337 sal_Int32& rnPairIndex, double& rfCurrentX, double& rfCurrentY, bool& rbCurrentValid,
338 const EnhancedCustomShape2d& rCustomShape2d,
339 const bool bReplaceGeoWidth, const bool bReplaceGeoHeight);
340
341public:
343 : meDocumentType( eDocumentType ), mpTextExport(pTextExport), mpFS(std::move( pFS )), mpFB( pFB ), mbIsBackgroundDark( false ), mbPlaceholder(false) {}
344 void SetFS( ::sax_fastparser::FSHelperPtr pFS ) { mpFS = pFS; }
345 const ::sax_fastparser::FSHelperPtr& GetFS() const { return mpFS; }
347 DocumentType GetDocumentType() const { return meDocumentType; }
349 DMLTextExport* GetTextExport() { return mpTextExport; }
350
351 void SetBackgroundDark(bool bIsDark) { mbIsBackgroundDark = bIsDark; }
353 OUString WriteImage( const Graphic &rGraphic , bool bRelPathToMedia = false );
354
355 void WriteColor( ::Color nColor, sal_Int32 nAlpha = MAX_PERCENT );
356 void WriteColor( const OUString& sColorSchemeName, const css::uno::Sequence< css::beans::PropertyValue >& aTransformations, sal_Int32 nAlpha = MAX_PERCENT );
357 void WriteColor( const ::Color nColor, const css::uno::Sequence< css::beans::PropertyValue >& aTransformations, sal_Int32 nAlpha = MAX_PERCENT );
358 void WriteColorTransformations( const css::uno::Sequence< css::beans::PropertyValue >& aTransformations, sal_Int32 nAlpha = MAX_PERCENT );
359 void WriteGradientStop(double fOffset, const basegfx::BColor& rColor, const basegfx::BColor& rAlpha);
360 void WriteLineArrow( const css::uno::Reference< css::beans::XPropertySet >& rXPropSet, bool bLineStart );
361 void WriteConnectorConnections( sal_Int32 nStartGlueId, sal_Int32 nEndGlueId, sal_Int32 nStartID, sal_Int32 nEndID );
362
363 bool WriteCharColor(const css::uno::Reference<css::beans::XPropertySet>& xPropertySet);
364 bool WriteSchemeColor(OUString const& rPropertyName, const css::uno::Reference<css::beans::XPropertySet>& xPropertySet);
365
366 void WriteSolidFill( ::Color nColor, sal_Int32 nAlpha = MAX_PERCENT );
367 void WriteSolidFill( const OUString& sSchemeName, const css::uno::Sequence< css::beans::PropertyValue >& aTransformations, sal_Int32 nAlpha = MAX_PERCENT );
368 void WriteSolidFill( const ::Color nColor, const css::uno::Sequence< css::beans::PropertyValue >& aTransformations, sal_Int32 nAlpha = MAX_PERCENT );
369 void WriteSolidFill( const css::uno::Reference< css::beans::XPropertySet >& rXPropSet );
370 void WriteGradientFill( const css::uno::Reference< css::beans::XPropertySet >& rXPropSet );
371
372 /* New API for WriteGradientFill:
373 If a BGradient is given, it will be used. Else, the 'Fix' entry will be used for
374 Color or Transparency. That way, less Pseudo(Color|Transparency)Gradients have to be
375 created at caller side.
376 NOTE: Giving no Gradient at all (both nullptr) is an error.
377 */
378 void WriteGradientFill(
379 const basegfx::BGradient* pColorGradient, sal_Int32 nFixColor,
380 const basegfx::BGradient* pTransparenceGradient, double fFixTransparence = 0.0);
381
382 void WriteGrabBagGradientFill( const css::uno::Sequence< css::beans::PropertyValue >& aGradientStops, const basegfx::BGradient& rGradient);
383
384 void WriteBlipOrNormalFill(const css::uno::Reference<css::beans::XPropertySet>& rXPropSet,
385 const OUString& rURLPropName, const css::awt::Size& rSize = {});
386 void WriteBlipFill(const css::uno::Reference<css::beans::XPropertySet>& rXPropSet,
387 const OUString& sURLPropName, const css::awt::Size& rSize = {});
388 void WriteBlipFill(const css::uno::Reference<css::beans::XPropertySet>& rXPropSet,
389 const css::awt::Size& rSize, const OUString& sURLPropName,
390 sal_Int32 nXmlNamespace);
391
392 void WriteXGraphicBlipFill(css::uno::Reference<css::beans::XPropertySet> const & rXPropSet,
393 css::uno::Reference<css::graphic::XGraphic> const & rxGraphic,
394 sal_Int32 nXmlNamespace, bool bWriteMode,
395 bool bRelPathToMedia = false, css::awt::Size const& rSize = {});
396
397 void WritePattFill( const css::uno::Reference< css::beans::XPropertySet >& rXPropSet );
398 void WritePattFill(const css::uno::Reference<css::beans::XPropertySet>& rXPropSet,
399 const css::drawing::Hatch& rHatch);
400
401 void WriteGraphicCropProperties(css::uno::Reference<css::beans::XPropertySet> const & rxPropertySet,
402 Size const & rOriginalSize, MapMode const & rMapMode);
403
404 void WriteSrcRectXGraphic(css::uno::Reference<css::beans::XPropertySet> const & rxPropertySet,
405 css::uno::Reference<css::graphic::XGraphic> const & rxGraphic);
406
407 void WriteOutline( const css::uno::Reference< css::beans::XPropertySet >& rXPropSet,
408 css::uno::Reference< css::frame::XModel> const & xModel = nullptr );
409
410 void WriteXGraphicStretch(css::uno::Reference<css::beans::XPropertySet> const & rXPropSet,
411 css::uno::Reference<css::graphic::XGraphic> const & rxGraphic);
412
413 void WriteXGraphicTile(css::uno::Reference<css::beans::XPropertySet> const& rXPropSet,
414 css::uno::Reference<css::graphic::XGraphic> const& rxGraphic,
415 css::awt::Size const& rSize);
416
417 void WriteXGraphicCustomPosition(css::uno::Reference<css::beans::XPropertySet> const& rXPropSet,
418 css::uno::Reference<css::graphic::XGraphic> const& rxGraphic,
419 css::awt::Size const& rSize);
420
421 void WriteLinespacing(const css::style::LineSpacing& rLineSpacing, float fFirstCharHeight);
422
423 OUString WriteXGraphicBlip(css::uno::Reference<css::beans::XPropertySet> const & rXPropSet,
424 css::uno::Reference<css::graphic::XGraphic> const & rxGraphic,
425 bool bRelPathToMedia);
426
427 void WriteImageBrightnessContrastTransparence(css::uno::Reference<css::beans::XPropertySet> const & rXPropSet);
428
429 void WriteXGraphicBlipMode(css::uno::Reference<css::beans::XPropertySet> const& rXPropSet,
430 css::uno::Reference<css::graphic::XGraphic> const& rxGraphic,
431 css::awt::Size const& rSize);
432
433 void WriteShapeTransformation(const css::uno::Reference< css::drawing::XShape >& rXShape,
434 sal_Int32 nXmlNamespace, bool bFlipH = false, bool bFlipV = false, bool bSuppressRotation = false, bool bSuppressFlipping = false, bool bFlippedBeforeRotation = false);
435 void WriteTransformation(const css::uno::Reference< css::drawing::XShape >& xShape, const tools::Rectangle& rRectangle,
436 sal_Int32 nXmlNamespace, bool bFlipH = false, bool bFlipV = false, sal_Int32 nRotation = 0, bool bIsGroupShape = false);
437
438 void WriteText( const css::uno::Reference< css::uno::XInterface >& rXIface, bool bBodyPr, bool bText = true, sal_Int32 nXmlNamespace = 0, bool bWritePropertiesAsLstStyles = false);
439
441 void WriteLstStyles(const css::uno::Reference<css::text::XTextContent>& rParagraph,
442 bool& rbOverridingCharHeight, sal_Int32& rnCharHeight,
443 const css::uno::Reference<css::beans::XPropertySet>& rXShapePropSet);
444 void WriteParagraph( const css::uno::Reference< css::text::XTextContent >& rParagraph,
445 bool& rbOverridingCharHeight, sal_Int32& rnCharHeight, const css::uno::Reference< css::beans::XPropertySet >& rXShapePropSet);
450 bool WriteParagraphProperties(const css::uno::Reference< css::text::XTextContent >& rParagraph, float fFirstCharHeight, sal_Int32 nElement);
451 void WriteParagraphNumbering(const css::uno::Reference< css::beans::XPropertySet >& rXPropSet, float fFirstCharHeight,
452 sal_Int16 nLevel );
453 void WriteParagraphTabStops(const css::uno::Reference<css::beans::XPropertySet>& rXPropSet);
454 void WriteRun( const css::uno::Reference< css::text::XTextRange >& rRun,
455 bool& rbOverridingCharHeight, sal_Int32& rnCharHeight,
456 const css::uno::Reference< css::beans::XPropertySet >& rXShapePropSet);
457 void WriteRunProperties( const css::uno::Reference< css::beans::XPropertySet >& rRun, bool bIsField, sal_Int32 nElement, bool bCheckDirect,
458 bool& rbOverridingCharHeight, sal_Int32& rnCharHeight,
459 sal_Int16 nScriptType = css::i18n::ScriptType::LATIN,
460 const css::uno::Reference< css::beans::XPropertySet >& rXShapePropSet = {});
461
462 void WritePresetShape( const OString& pShape , std::vector< std::pair<sal_Int32,sal_Int32>> & rAvList );
463 void WritePresetShape( const OString& pShape );
464 void WritePresetShape( const OString& pShape, MSO_SPT eShapeType, bool bPredefinedHandlesUsed, const css::beans::PropertyValue& rProp );
465 bool WriteCustomGeometry(
466 const css::uno::Reference<css::drawing::XShape>& rXShape,
467 const SdrObjCustomShape& rSdrObjCustomShape);
468 void WriteEmptyCustomGeometry();
469 void WritePolyPolygon(const css::uno::Reference<css::drawing::XShape>& rXShape,
470 const bool bClosed);
471 void WriteFill(const css::uno::Reference<css::beans::XPropertySet>& xPropSet,
472 const css::awt::Size& rSize = {});
473 void WriteShapeStyle( const css::uno::Reference< css::beans::XPropertySet >& rXPropSet );
474 void WriteShapeEffects( const css::uno::Reference< css::beans::XPropertySet >& rXPropSet );
475 void WriteShapeEffect( std::u16string_view sName, const css::uno::Sequence< css::beans::PropertyValue >& aEffectProps );
480 void Write3DEffects(const css::uno::Reference<css::beans::XPropertySet>& rXPropSet, bool bIsText);
481 void WriteArtisticEffect( const css::uno::Reference< css::beans::XPropertySet >& rXPropSet );
482 OString WriteWdpPicture( const OUString& rFileId, const css::uno::Sequence< sal_Int8 >& rPictureData );
483 void WriteDiagram(const css::uno::Reference<css::drawing::XShape>& rXShape, int nDiagramId);
484 void writeDiagramRels(const css::uno::Sequence<css::uno::Sequence<css::uno::Any>>& xRelSeq,
485 const css::uno::Reference<css::io::XOutputStream>& xOutStream,
486 std::u16string_view sGrabBagProperyName, int nDiagramId);
487 static void WriteFromTo(const css::uno::Reference<css::drawing::XShape>& rXShape, const css::awt::Size& aPageSize,
488 const sax_fastparser::FSHelperPtr& pDrawing);
489
490 static bool IsGroupShape( const css::uno::Reference< css::drawing::XShape >& rXShape );
491 sal_Int32 getBulletMarginIndentation (const css::uno::Reference< css::beans::XPropertySet >& rXPropSet,sal_Int16 nLevel, std::u16string_view propName);
492
493 static void ResetMlCounters();
494
495 static sal_Int32 getNewDrawingUniqueId() { return ++mnDrawingMLCount; }
496 static sal_Int32 getNewVMLUniqueId() { return ++mnVmlCount; }
497 static sal_Int32 getNewChartUniqueId() { return ++mnChartCount; }
498
499 // A Helper to decide the script type for given text in order to call WriteRunProperties.
500 static sal_Int16 GetScriptType(const OUString& rStr);
501
502 static sal_Unicode SubstituteBullet( sal_Unicode cBulletId, css::awt::FontDescriptor& rFontDesc );
503
504 static ::Color ColorWithIntensity( sal_uInt32 nColor, sal_uInt32 nIntensity );
505
506 static const char* GetAlignment( css::style::ParagraphAdjust nAlignment );
507
508 sax_fastparser::FSHelperPtr CreateOutputStream (
509 const OUString& sFullStream,
510 std::u16string_view sRelativeStream,
511 const css::uno::Reference< css::io::XOutputStream >& xParentRelation,
512 const OUString& sContentType,
513 const OUString& sRelationshipType,
514 OUString* pRelationshipId );
515
516};
517
518}
519}
520
521#endif
522
523/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
sal_uInt64 BitmapChecksum
Interface to be implemented by the parent exporter that knows how to handle shape text.
Definition: drawingml.hxx:130
virtual void WriteTextBox(css::uno::Reference< css::drawing::XShape > xShape)=0
Write the contents of the textbox that is associated to this shape.
virtual css::uno::Reference< css::text::XTextFrame > GetUnoTextFrame(css::uno::Reference< css::drawing::XShape > xShape)=0
Get textbox which belongs to the shape.
virtual void WriteOutliner(const OutlinerParaObject &rParaObj)=0
DrawingML(::sax_fastparser::FSHelperPtr pFS, ::oox::core::XmlFilterBase *pFB, DocumentType eDocumentType=DOCUMENT_PPTX, DMLTextExport *pTextExport=nullptr)
Definition: drawingml.hxx:342
static sal_Int32 getNewDrawingUniqueId()
Definition: drawingml.hxx:495
::oox::core::XmlFilterBase * mpFB
Definition: drawingml.hxx:287
bool WriteCharColor(const css::uno::Reference< css::beans::XPropertySet > &xPropertySet)
static sal_Int32 mnDrawingMLCount
Definition: drawingml.hxx:275
static sal_Int32 mnChartCount
Definition: drawingml.hxx:291
void WriteGradientFill(const css::uno::Reference< css::beans::XPropertySet > &rXPropSet)
void WriteSolidFill(const css::uno::Reference< css::beans::XPropertySet > &rXPropSet)
DMLTextExport * GetTextExport()
The application-specific text exporter callback, if there is one.
Definition: drawingml.hxx:349
void WritePresetShape(const OString &pShape, MSO_SPT eShapeType, bool bPredefinedHandlesUsed, const css::beans::PropertyValue &rProp)
::sax_fastparser::FSHelperPtr mpFS
Definition: drawingml.hxx:286
static sal_Int32 mnVmlCount
Definition: drawingml.hxx:276
DocumentType meDocumentType
To specify where write eg. the images to (like 'ppt', or 'word' - according to the OPC).
Definition: drawingml.hxx:279
static bool EqualGradients(const css::awt::Gradient2 &rGradient1, const css::awt::Gradient2 &rGradient2)
void SetFS(::sax_fastparser::FSHelperPtr pFS)
Definition: drawingml.hxx:344
void WriteBlipFill(const css::uno::Reference< css::beans::XPropertySet > &rXPropSet, const OUString &sURLPropName, const css::awt::Size &rSize={})
const ::sax_fastparser::FSHelperPtr & GetFS() const
Definition: drawingml.hxx:345
::oox::core::XmlFilterBase * GetFB()
Definition: drawingml.hxx:346
DocumentType GetDocumentType() const
Definition: drawingml.hxx:347
void WriteColor(const ::Color nColor, const css::uno::Sequence< css::beans::PropertyValue > &aTransformations, sal_Int32 nAlpha=MAX_PERCENT)
static sal_Int32 getNewVMLUniqueId()
Definition: drawingml.hxx:496
css::uno::Reference< css::drawing::XShape > m_xParent
If set, this is the parent of the currently handled shape.
Definition: drawingml.hxx:289
void WriteSolidFill(const ::Color nColor, const css::uno::Sequence< css::beans::PropertyValue > &aTransformations, sal_Int32 nAlpha=MAX_PERCENT)
void WriteBlipFill(const css::uno::Reference< css::beans::XPropertySet > &rXPropSet, const css::awt::Size &rSize, const OUString &sURLPropName, sal_Int32 nXmlNamespace)
void WriteColor(const OUString &sColorSchemeName, const css::uno::Sequence< css::beans::PropertyValue > &aTransformations, sal_Int32 nAlpha=MAX_PERCENT)
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)
static sal_Int32 getNewChartUniqueId()
Definition: drawingml.hxx:497
bool mbPlaceholder
True when exporting presentation placeholder shape.
Definition: drawingml.hxx:294
void SetBackgroundDark(bool bIsDark)
Definition: drawingml.hxx:351
void WriteSolidFill(const OUString &sSchemeName, const css::uno::Sequence< css::beans::PropertyValue > &aTransformations, sal_Int32 nAlpha=MAX_PERCENT)
DMLTextExport * mpTextExport
Parent exporter, used for text callback.
Definition: drawingml.hxx:281
std::stack< std::map< OUString, OUString > > maWdpCache
Definition: drawingml.hxx:173
OUString findExportGraphics(BitmapChecksum aChecksum)
Definition: drawingml.hxx:205
void addToWdpCache(OUString const &rFileId, OUString const &rId)
Definition: drawingml.hxx:240
std::stack< sal_Int32 > mnWdpImageCounter
Definition: drawingml.hxx:172
std::stack< std::unordered_map< BitmapChecksum, OUString > > maExportGraphics
Definition: drawingml.hxx:171
OUString findWdpID(OUString const &rFileId)
Definition: drawingml.hxx:229
void addExportGraphics(BitmapChecksum aChecksum, OUString const &sPath)
Definition: drawingml.hxx:200
std::stack< sal_Int32 > mnImageCounter
Definition: drawingml.hxx:170
OUString writeBlip(Graphic const &rGraphic, std::vector< model::BlipEffect > const &rEffects, bool bRelPathToMedia=false)
Definition: drawingml.cxx:1286
sax_fastparser::FSHelperPtr mpFS
Definition: drawingml.hxx:256
GraphicExport(sax_fastparser::FSHelperPtr pFS, ::oox::core::XmlFilterBase *pFilterBase, DocumentType eDocumentType)
Definition: drawingml.hxx:261
oox::core::XmlFilterBase * mpFilterBase
Definition: drawingml.hxx:257
OUString writeToStorage(Graphic const &rGraphic, bool bRelPathToMedia=false)
Definition: drawingml.cxx:1408
int nCount
#define OOX_DLLPUBLIC
Definition: dllapi.h:28
OString sName
Definition: drawingml.cxx:4451
SvxTimeFormat
SvxDateFormat
MSO_SPT
def text(shape, orig_st)
class SAL_NO_VTABLE XPropertySet
constexpr const char * getComponentDir(DocumentType eDocumentType)
Definition: drawingml.hxx:143
sal_Int32 ExportRotateClockwisify(Degree100 input)
Definition: drawingml.hxx:123
constexpr const char * getRelationCompPrefix(DocumentType eDocumentType)
Definition: drawingml.hxx:155
const sal_Int32 MAX_PERCENT
std::shared_ptr< FastSerializerHelper > FSHelperPtr
css::uno::Reference< css::linguistic2::XProofreadingIterator > get(css::uno::Reference< css::uno::XComponentContext > const &context)
SvStream & WritePolyPolygon(SvStream &rOStream, const tools::PolyPolygon &rPolyPoly)
UNOTOOLS_DLLPUBLIC css::uno::Any GetProperty(OUString const &url, OUString const &property)
UNDERLYING_TYPE get() const
sal_uInt16 sal_Unicode