Fix typo in code
[LibreOffice.git] / include / oox / export / drawingml.hxx
blob2ea0fa616dac457b5c05ab13a538b984645fb4e9
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #ifndef INCLUDED_OOX_EXPORT_DRAWINGML_HXX
21 #define INCLUDED_OOX_EXPORT_DRAWINGML_HXX
23 #include <map>
24 #include <stack>
25 #include <string_view>
26 #include <unordered_map>
27 #include <utility>
28 #include <vector>
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>
38 #include <oox/drawingml/drawingmltypes.hxx>
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>
51 #include <svx/EnhancedCustomShape2d.hxx>
52 #include <basegfx/utils/bgradient.hxx>
54 class Graphic;
55 class SdrObjCustomShape;
56 enum class SvxDateFormat;
57 enum class SvxTimeFormat;
59 namespace com::sun::star {
60 namespace awt {
61 struct FontDescriptor;
62 struct Gradient2;
64 namespace beans {
65 struct PropertyValue;
66 class XPropertySet;
67 class XPropertyState;
69 namespace drawing {
70 class XShape;
71 struct EnhancedCustomShapeParameterPair;
72 struct EnhancedCustomShapeParameter;
74 namespace graphic {
75 class XGraphic;
77 namespace style {
78 struct LineSpacing;
80 namespace text {
81 class XTextContent;
82 class XTextRange;
83 class XTextFrame;
85 namespace io {
86 class XOutputStream;
88 namespace uno {
89 class XInterface;
91 namespace frame {
92 class XModel;
96 struct EscherConnectorListEntry;
97 class OutlinerParaObject;
98 namespace tools { class Rectangle; }
100 namespace tools {
101 class PolyPolygon;
104 namespace oox {
105 namespace core {
106 class XmlFilterBase;
109 namespace drawingml {
111 class OOX_DLLPUBLIC URLTransformer
113 public:
114 virtual ~URLTransformer();
116 virtual OUString getTransformedString(const OUString& rURL) const;
118 virtual bool isExternalURL(const OUString& rURL) const;
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.
123 inline sal_Int32 ExportRotateClockwisify(Degree100 input)
125 return ((21600000 - input.get() * 600) % 21600000);
128 /// Interface to be implemented by the parent exporter that knows how to handle shape text.
129 class OOX_DLLPUBLIC DMLTextExport
131 public:
132 virtual void WriteOutliner(const OutlinerParaObject& rParaObj) = 0;
133 /// Write the contents of the textbox that is associated to this shape.
134 virtual void WriteTextBox(css::uno::Reference<css::drawing::XShape> xShape) = 0;
135 /// Get textbox which belongs to the shape.
136 virtual css::uno::Reference<css::text::XTextFrame> GetUnoTextFrame(
137 css::uno::Reference<css::drawing::XShape> xShape) = 0;
138 protected:
139 DMLTextExport() {}
140 virtual ~DMLTextExport() {}
143 constexpr std::u16string_view getComponentDir(DocumentType eDocumentType)
145 switch (eDocumentType)
147 case DOCUMENT_DOCX: return u"word";
148 case DOCUMENT_PPTX: return u"ppt";
149 case DOCUMENT_XLSX: return u"xl";
152 return u"";
155 constexpr std::u16string_view getRelationCompPrefix(DocumentType eDocumentType)
157 switch (eDocumentType)
159 case DOCUMENT_DOCX: return u"";
160 case DOCUMENT_PPTX:
161 case DOCUMENT_XLSX: return u"../";
164 return u"";
167 class OOX_DLLPUBLIC GraphicExportCache
169 private:
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;
175 GraphicExportCache() = default;
176 public:
177 static GraphicExportCache& get();
179 void push()
181 mnImageCounter.push(1);
182 maExportGraphics.emplace();
183 mnWdpImageCounter.push(1);
184 maWdpCache.emplace();
187 void pop()
189 mnImageCounter.pop();
190 maExportGraphics.pop();
191 mnWdpImageCounter.pop();
192 maWdpCache.pop();
195 bool hasExportGraphics()
197 return !maExportGraphics.empty();
200 void addExportGraphics(BitmapChecksum aChecksum, OUString const& sPath)
202 maExportGraphics.top()[aChecksum] = sPath;
205 OUString findExportGraphics(BitmapChecksum aChecksum)
207 OUString sPath;
208 if (!hasExportGraphics())
209 return sPath;
211 auto aIterator = maExportGraphics.top().find(aChecksum);
212 if (aIterator != maExportGraphics.top().end())
213 sPath = aIterator->second;
214 return sPath;
217 sal_Int32 nextImageCount()
219 sal_Int32 nCount = mnImageCounter.top();
220 mnImageCounter.top()++;
221 return nCount;
224 bool hasWdpCache()
226 return !maWdpCache.empty();
229 OUString findWdpID(OUString const& rFileId)
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;
240 void addToWdpCache(OUString const& rFileId, OUString const& rId)
242 if (hasWdpCache())
243 maWdpCache.top()[rFileId] = rId;
246 sal_Int32 nextWdpImageCount()
248 sal_Int32 nCount = mnWdpImageCounter.top();
249 mnWdpImageCounter.top()++;
250 return nCount;
254 class OOX_DLLPUBLIC GraphicExport
256 private:
257 sax_fastparser::FSHelperPtr mpFS;
258 oox::core::XmlFilterBase* mpFilterBase;
259 DocumentType meDocumentType;
261 OUString writeNewEntryToStorage(const Graphic& rGraphic, bool bRelPathToMedia);
262 OUString writeNewSvgEntryToStorage(const Graphic& rGraphic, bool bRelPathToMedia);
264 public:
265 enum class TypeHint
267 Detect,
271 GraphicExport(sax_fastparser::FSHelperPtr pFS, ::oox::core::XmlFilterBase* pFilterBase, DocumentType eDocumentType)
272 : mpFS(std::move(pFS))
273 , mpFilterBase(pFilterBase)
274 , meDocumentType(eDocumentType)
277 OUString writeToStorage(Graphic const& rGraphic, bool bRelPathToMedia = false, TypeHint eHint = TypeHint::Detect);
279 void writeBlip(Graphic const& rGraphic, std::vector<model::BlipEffect> const& rEffects, bool bRelPathToMedia = false);
280 void writeSvgExtension(OUString const& rSvgRelId);
283 class DrawingML
286 private:
287 OOX_DLLPUBLIC static sal_Int32 mnDrawingMLCount;
288 OOX_DLLPUBLIC static sal_Int32 mnVmlCount;
290 /// To specify where write eg. the images to (like 'ppt', or 'word' - according to the OPC).
291 DocumentType meDocumentType;
292 /// Parent exporter, used for text callback.
293 DMLTextExport* mpTextExport;
296 protected:
297 css::uno::Any mAny;
298 ::sax_fastparser::FSHelperPtr mpFS;
299 ::oox::core::XmlFilterBase* mpFB;
300 /// If set, this is the parent of the currently handled shape.
301 css::uno::Reference<css::drawing::XShape> m_xParent;
302 bool mbIsBackgroundDark;
303 OOX_DLLPUBLIC static sal_Int32 mnChartCount;
305 /// True when exporting presentation placeholder shape.
306 bool mbPlaceholder;
308 bool GetProperty( const css::uno::Reference< css::beans::XPropertySet >& rXPropSet, const OUString& aName );
309 bool GetPropertyAndState( const css::uno::Reference< css::beans::XPropertySet >& rXPropSet,
310 const css::uno::Reference< css::beans::XPropertyState >& rXPropState,
311 const OUString& aName, css::beans::PropertyState& eState );
312 OUString GetFieldValue( const css::uno::Reference< css::text::XTextRange >& rRun, bool& bIsURLField );
313 /** Gets OOXML datetime field type from LO Date format
315 @param eDate LO Date format
317 static OUString GetDatetimeTypeFromDate(SvxDateFormat eDate);
318 /** Gets OOXML datetime field type from LO Time format
320 @param eTime LO Time format
322 static OUString GetDatetimeTypeFromTime(SvxTimeFormat eTime);
323 /** Gets OOXML datetime field type from combination of LO Time and Date formats
325 @param eDate LO Date format
326 @param eTime LO Time format
328 OOX_DLLPUBLIC static OUString GetDatetimeTypeFromDateTime(SvxDateFormat eDate, SvxTimeFormat eTime);
330 /// Output the media (including copying a video from vnd.sun.star.Package: to the output if necessary).
331 void WriteMediaNonVisualProperties(const css::uno::Reference<css::drawing::XShape>& xShape);
333 void WriteStyleProperties( sal_Int32 nTokenId, const css::uno::Sequence< css::beans::PropertyValue >& aProperties );
335 OUString GetComponentDir() const;
336 OUString GetRelationCompPrefix() const;
338 static bool EqualGradients( const css::awt::Gradient2& rGradient1, const css::awt::Gradient2& rGradient2 );
339 bool IsFontworkShape(const css::uno::Reference< css::beans::XPropertySet >& rXShapePropSet);
341 void WriteGlowEffect(const css::uno::Reference<css::beans::XPropertySet>& rXPropSet);
342 void WriteSoftEdgeEffect(const css::uno::Reference<css::beans::XPropertySet>& rXPropSet);
343 void WriteCustomGeometryPoint(const css::drawing::EnhancedCustomShapeParameterPair& rParamPair,
344 const EnhancedCustomShape2d& rCustomShape2d,
345 const bool bReplaceGeoWidth, const bool bReplaceGeoHeight);
346 bool WriteCustomGeometrySegment(
347 const sal_Int16 eCommand, const sal_Int32 nCount,
348 const css::uno::Sequence<css::drawing::EnhancedCustomShapeParameterPair>& rPairs,
349 sal_Int32& rnPairIndex, double& rfCurrentX, double& rfCurrentY, bool& rbCurrentValid,
350 const EnhancedCustomShape2d& rCustomShape2d,
351 const bool bReplaceGeoWidth, const bool bReplaceGeoHeight);
353 public:
354 DrawingML( ::sax_fastparser::FSHelperPtr pFS, ::oox::core::XmlFilterBase* pFB, DocumentType eDocumentType = DOCUMENT_PPTX, DMLTextExport* pTextExport = nullptr )
355 : meDocumentType( eDocumentType ), mpTextExport(pTextExport), mpFS(std::move( pFS )), mpFB( pFB ), mbIsBackgroundDark( false ), mbPlaceholder(false) {}
356 void SetFS(const ::sax_fastparser::FSHelperPtr& pFS) { mpFS = pFS; }
357 const ::sax_fastparser::FSHelperPtr& GetFS() const { return mpFS; }
358 ::oox::core::XmlFilterBase* GetFB() { return mpFB; }
359 DocumentType GetDocumentType() const { return meDocumentType; }
360 /// The application-specific text exporter callback, if there is one.
361 DMLTextExport* GetTextExport() { return mpTextExport; }
363 void SetBackgroundDark(bool bIsDark) { mbIsBackgroundDark = bIsDark; }
364 /// If bRelPathToMedia is true add "../" to image folder path while adding the image relationship
365 OOX_DLLPUBLIC OUString writeGraphicToStorage(const Graphic &rGraphic , bool bRelPathToMedia = false, GraphicExport::TypeHint eHint = GraphicExport::TypeHint::Detect);
367 void WriteColor( ::Color nColor, sal_Int32 nAlpha = MAX_PERCENT );
368 void WriteColor( const OUString& sColorSchemeName, const css::uno::Sequence< css::beans::PropertyValue >& aTransformations, sal_Int32 nAlpha = MAX_PERCENT );
369 void WriteColor( const ::Color nColor, const css::uno::Sequence< css::beans::PropertyValue >& aTransformations, sal_Int32 nAlpha = MAX_PERCENT );
370 void WriteColorTransformations( const css::uno::Sequence< css::beans::PropertyValue >& aTransformations, sal_Int32 nAlpha = MAX_PERCENT );
371 void WriteGradientStop(double fOffset, const basegfx::BColor& rColor, const basegfx::BColor& rAlpha);
372 void WriteLineArrow( const css::uno::Reference< css::beans::XPropertySet >& rXPropSet, bool bLineStart );
373 void WriteConnectorConnections( sal_Int32 nStartGlueId, sal_Int32 nEndGlueId, sal_Int32 nStartID, sal_Int32 nEndID );
375 bool WriteCharColor(const css::uno::Reference<css::beans::XPropertySet>& xPropertySet);
376 bool WriteSchemeColor(OUString const& rPropertyName, const css::uno::Reference<css::beans::XPropertySet>& xPropertySet);
378 void WriteSolidFill( ::Color nColor, sal_Int32 nAlpha = MAX_PERCENT );
379 void WriteSolidFill( const OUString& sSchemeName, const css::uno::Sequence< css::beans::PropertyValue >& aTransformations, sal_Int32 nAlpha = MAX_PERCENT );
380 void WriteSolidFill( const ::Color nColor, const css::uno::Sequence< css::beans::PropertyValue >& aTransformations, sal_Int32 nAlpha = MAX_PERCENT );
381 void WriteSolidFill( const css::uno::Reference< css::beans::XPropertySet >& rXPropSet );
382 OOX_DLLPUBLIC void WriteGradientFill( const css::uno::Reference< css::beans::XPropertySet >& rXPropSet );
384 /* New API for WriteGradientFill:
385 If a BGradient is given, it will be used. Else, the 'Fix' entry will be used for
386 Color or Transparency. That way, less Pseudo(Color|Transparency)Gradients have to be
387 created at caller side.
388 NOTE: Giving no Gradient at all (both nullptr) is an error.
390 void WriteGradientFill(
391 const basegfx::BGradient* pColorGradient, sal_Int32 nFixColor,
392 const basegfx::BGradient* pTransparenceGradient, double fFixTransparence = 0.0);
394 void WriteGrabBagGradientFill( const css::uno::Sequence< css::beans::PropertyValue >& aGradientStops, const basegfx::BGradient& rGradient);
396 void WriteBlipOrNormalFill(const css::uno::Reference<css::beans::XPropertySet>& rXPropSet,
397 const OUString& rURLPropName, const css::awt::Size& rSize = {});
398 OOX_DLLPUBLIC void WriteBlipFill(const css::uno::Reference<css::beans::XPropertySet>& rXPropSet,
399 const OUString& sURLPropName, const css::awt::Size& rSize = {});
400 void WriteBlipFill(const css::uno::Reference<css::beans::XPropertySet>& rXPropSet,
401 const css::awt::Size& rSize, const OUString& sURLPropName,
402 sal_Int32 nXmlNamespace);
404 void WriteXGraphicBlipFill(css::uno::Reference<css::beans::XPropertySet> const & rXPropSet,
405 css::uno::Reference<css::graphic::XGraphic> const & rxGraphic,
406 sal_Int32 nXmlNamespace, bool bWriteMode,
407 bool bRelPathToMedia = false, css::awt::Size const& rSize = {});
409 void WritePattFill( const css::uno::Reference< css::beans::XPropertySet >& rXPropSet );
410 void WritePattFill(const css::uno::Reference<css::beans::XPropertySet>& rXPropSet,
411 const css::drawing::Hatch& rHatch);
413 void WriteGraphicCropProperties(css::uno::Reference<css::beans::XPropertySet> const & rxPropertySet,
414 Size const & rOriginalSize, MapMode const & rMapMode);
416 void WriteSrcRectXGraphic(css::uno::Reference<css::beans::XPropertySet> const & rxPropertySet,
417 css::uno::Reference<css::graphic::XGraphic> const & rxGraphic);
419 OOX_DLLPUBLIC void WriteOutline( const css::uno::Reference< css::beans::XPropertySet >& rXPropSet,
420 css::uno::Reference< css::frame::XModel> const & xModel = nullptr );
422 void WriteXGraphicStretch(css::uno::Reference<css::beans::XPropertySet> const & rXPropSet,
423 css::uno::Reference<css::graphic::XGraphic> const & rxGraphic);
425 void WriteXGraphicTile(css::uno::Reference<css::beans::XPropertySet> const& rXPropSet,
426 css::uno::Reference<css::graphic::XGraphic> const& rxGraphic,
427 css::awt::Size const& rSize);
429 void WriteXGraphicCustomPosition(css::uno::Reference<css::beans::XPropertySet> const& rXPropSet,
430 css::uno::Reference<css::graphic::XGraphic> const& rxGraphic,
431 css::awt::Size const& rSize);
433 void WriteLinespacing(const css::style::LineSpacing& rLineSpacing, float fFirstCharHeight);
435 void WriteXGraphicBlip(css::uno::Reference<css::beans::XPropertySet> const & rXPropSet,
436 css::uno::Reference<css::graphic::XGraphic> const & rxGraphic,
437 bool bRelPathToMedia);
439 void WriteImageBrightnessContrastTransparence(css::uno::Reference<css::beans::XPropertySet> const & rXPropSet);
441 void WriteXGraphicBlipMode(css::uno::Reference<css::beans::XPropertySet> const& rXPropSet,
442 css::uno::Reference<css::graphic::XGraphic> const& rxGraphic,
443 css::awt::Size const& rSize);
445 OOX_DLLPUBLIC void WriteShapeTransformation(const css::uno::Reference< css::drawing::XShape >& rXShape,
446 sal_Int32 nXmlNamespace, bool bFlipH = false, bool bFlipV = false, bool bSuppressRotation = false, bool bSuppressFlipping = false, bool bFlippedBeforeRotation = false);
447 void WriteTransformation(const css::uno::Reference< css::drawing::XShape >& xShape, const tools::Rectangle& rRectangle,
448 sal_Int32 nXmlNamespace, bool bFlipH = false, bool bFlipV = false, sal_Int32 nRotation = 0, bool bIsGroupShape = false);
450 void WriteText( const css::uno::Reference< css::uno::XInterface >& rXIface, bool bBodyPr, bool bText = true, sal_Int32 nXmlNamespace = 0, bool bWritePropertiesAsLstStyles = false);
452 /** Populates the lstStyle with the shape's text run and paragraph properties */
453 void WriteLstStyles(const css::uno::Reference<css::text::XTextContent>& rParagraph,
454 bool& rbOverridingCharHeight, sal_Int32& rnCharHeight,
455 const css::uno::Reference<css::beans::XPropertySet>& rXShapePropSet);
456 void WriteParagraph( const css::uno::Reference< css::text::XTextContent >& rParagraph,
457 bool& rbOverridingCharHeight, sal_Int32& rnCharHeight, const css::uno::Reference< css::beans::XPropertySet >& rXShapePropSet);
458 /** Writes paragraph properties
460 @returns true if any paragraph properties were written
462 bool WriteParagraphProperties(const css::uno::Reference< css::text::XTextContent >& rParagraph, float fFirstCharHeight, sal_Int32 nElement);
463 void WriteParagraphNumbering(const css::uno::Reference< css::beans::XPropertySet >& rXPropSet, float fFirstCharHeight,
464 sal_Int16 nLevel );
465 void WriteParagraphTabStops(const css::uno::Reference<css::beans::XPropertySet>& rXPropSet);
466 void WriteRun( const css::uno::Reference< css::text::XTextRange >& rRun,
467 bool& rbOverridingCharHeight, sal_Int32& rnCharHeight,
468 const css::uno::Reference< css::beans::XPropertySet >& rXShapePropSet);
469 void WriteRunProperties( const css::uno::Reference< css::beans::XPropertySet >& rRun, bool bIsField, sal_Int32 nElement, bool bCheckDirect,
470 bool& rbOverridingCharHeight, sal_Int32& rnCharHeight,
471 sal_Int16 nScriptType = css::i18n::ScriptType::LATIN,
472 const css::uno::Reference< css::beans::XPropertySet >& rXShapePropSet = {});
474 void WritePresetShape( const OString& pShape , std::vector< std::pair<sal_Int32,sal_Int32>> & rAvList );
475 OOX_DLLPUBLIC void WritePresetShape( const OString& pShape );
476 void WritePresetShape( const OString& pShape, MSO_SPT eShapeType, bool bPredefinedHandlesUsed, const css::beans::PropertyValue& rProp );
477 bool WriteCustomGeometry(
478 const css::uno::Reference<css::drawing::XShape>& rXShape,
479 const SdrObjCustomShape& rSdrObjCustomShape);
480 void WriteEmptyCustomGeometry();
481 void WritePolyPolygon(const css::uno::Reference<css::drawing::XShape>& rXShape,
482 const bool bClosed);
483 OOX_DLLPUBLIC void WriteFill(const css::uno::Reference<css::beans::XPropertySet>& xPropSet,
484 const css::awt::Size& rSize = {});
485 void WriteShapeStyle( const css::uno::Reference< css::beans::XPropertySet >& rXPropSet );
486 OOX_DLLPUBLIC void WriteShapeEffects( const css::uno::Reference< css::beans::XPropertySet >& rXPropSet );
487 void WriteShapeEffect( std::u16string_view sName, const css::uno::Sequence< css::beans::PropertyValue >& aEffectProps );
488 /** Populates scene3d tag
489 @param rXPropSet Prop set
490 @param bIsText True if the 3D effects are for a text body, false if it is for a shape
492 OOX_DLLPUBLIC void Write3DEffects(const css::uno::Reference<css::beans::XPropertySet>& rXPropSet, bool bIsText);
493 void WriteArtisticEffect( const css::uno::Reference< css::beans::XPropertySet >& rXPropSet );
494 OString WriteWdpPicture( const OUString& rFileId, const css::uno::Sequence< sal_Int8 >& rPictureData );
495 OOX_DLLPUBLIC void WriteDiagram(const css::uno::Reference<css::drawing::XShape>& rXShape, int nDiagramId);
496 void writeDiagramRels(const css::uno::Sequence<css::uno::Sequence<css::uno::Any>>& xRelSeq,
497 const css::uno::Reference<css::io::XOutputStream>& xOutStream,
498 std::u16string_view sGrabBagProperyName, int nDiagramId);
499 static void WriteFromTo(const css::uno::Reference<css::drawing::XShape>& rXShape, const css::awt::Size& aPageSize,
500 const sax_fastparser::FSHelperPtr& pDrawing);
502 static bool IsGroupShape( const css::uno::Reference< css::drawing::XShape >& rXShape );
503 sal_Int32 getBulletMarginIndentation (const css::uno::Reference< css::beans::XPropertySet >& rXPropSet,sal_Int16 nLevel, std::u16string_view propName);
505 OOX_DLLPUBLIC static void ResetMlCounters();
507 static sal_Int32 getNewDrawingUniqueId() { return ++mnDrawingMLCount; }
508 static sal_Int32 getNewVMLUniqueId() { return ++mnVmlCount; }
509 static sal_Int32 getNewChartUniqueId() { return ++mnChartCount; }
511 // A Helper to decide the script type for given text in order to call WriteRunProperties.
512 static sal_Int16 GetScriptType(const OUString& rStr);
514 static sal_Unicode SubstituteBullet( sal_Unicode cBulletId, css::awt::FontDescriptor& rFontDesc );
516 static ::Color ColorWithIntensity( sal_uInt32 nColor, sal_uInt32 nIntensity );
518 static const char* GetAlignment( css::style::ParagraphAdjust nAlignment );
520 sax_fastparser::FSHelperPtr CreateOutputStream (
521 const OUString& sFullStream,
522 std::u16string_view sRelativeStream,
523 const css::uno::Reference< css::io::XOutputStream >& xParentRelation,
524 const OUString& sContentType,
525 const OUString& sRelationshipType,
526 OUString* pRelationshipId );
528 OOX_DLLPUBLIC std::shared_ptr<GraphicExport> createGraphicExport();
534 #endif
536 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */