LibreOffice Module drawinglayer (master) 1
EnhancedShapeDumper.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#pragma once
10
11#include <sal/config.h>
12
13#include <string_view>
14
15#include <libxml/xmlwriter.h>
16
17#include <com/sun/star/beans/XPropertySet.hpp>
18#include <com/sun/star/drawing/EnhancedCustomShapeParameterPair.hpp>
19#include <com/sun/star/drawing/Direction3D.hpp>
20#include <com/sun/star/drawing/ShadeMode.hpp>
21#include <com/sun/star/drawing/ProjectionMode.hpp>
22#include <com/sun/star/drawing/Position3D.hpp>
23
24#include <com/sun/star/awt/Rectangle.hpp>
25#include <com/sun/star/drawing/EnhancedCustomShapeAdjustmentValue.hpp>
26#include <com/sun/star/beans/PropertyValue.hpp>
27#include <com/sun/star/beans/PropertyValues.hpp>
28#include <com/sun/star/drawing/EnhancedCustomShapeParameter.hpp>
29
30#include <com/sun/star/drawing/EnhancedCustomShapeSegment.hpp>
31#include <com/sun/star/drawing/EnhancedCustomShapeTextFrame.hpp>
32#include <com/sun/star/awt/Size.hpp>
33
34#include <com/sun/star/drawing/EnhancedCustomShapeTextPathMode.hpp>
35
37{
38public:
40 : xmlWriter(writer)
41 {
42 }
43
44 // auxiliary functions
46 const css::drawing::EnhancedCustomShapeParameterPair& aParameterPair);
47 void dumpDirection3D(css::drawing::Direction3D aDirection3D);
48 void dumpPropertyValueAsElement(const css::beans::PropertyValue& aPropertyValue);
49 void
50 dumpEnhancedCustomShapeParameter(const css::drawing::EnhancedCustomShapeParameter& aParameter);
51
52 // EnhancedCustomShapeExtrusion.idl
53 void dumpEnhancedCustomShapeExtrusionService(const css::uno::Reference< css::beans::XPropertySet >& xPropSet);
54 void dumpExtrusionAsAttribute(bool bExtrusion);
55 void dumpBrightnessAsAttribute(double aBrightness);
56 void dumpDepthAsElement(const css::drawing::EnhancedCustomShapeParameterPair& aDepth);
57 void dumpDiffusionAsAttribute(double aDiffusion);
58 void dumpNumberOfLineSegmentsAsAttribute(sal_Int32 aNumberOfLineSegments);
59 void dumpLightFaceAsAttribute(bool bLightFace);
60 void dumpFirstLightHarshAsAttribute(bool bFirstLightHarsh);
61 void dumpSecondLightHarshAsAttribute(bool bSecondLightHarsh);
62 void dumpFirstLightLevelAsAttribute(double aFirstLightLevel);
63 void dumpSecondLightLevelAsAttribute(double aSecondLightLevel);
64 void dumpFirstLightDirectionAsElement(css::drawing::Direction3D aFirstLightDirection);
65 void dumpSecondLightDirectionAsElement(css::drawing::Direction3D aSecondLightDirection);
66 void dumpMetalAsAttribute(bool bMetal);
67 void dumpShadeModeAsAttribute(css::drawing::ShadeMode eShadeMode);
68 void dumpRotateAngleAsElement(const css::drawing::EnhancedCustomShapeParameterPair& aRotateAngle);
69 void dumpRotationCenterAsElement(css::drawing::Direction3D aRotationCenter);
70 void dumpShininessAsAttribute(double aShininess);
71 void dumpSkewAsElement(const css::drawing::EnhancedCustomShapeParameterPair& aSkew);
72 void dumpSpecularityAsAttribute(double aSpecularity);
73 void dumpProjectionModeAsAttribute(css::drawing::ProjectionMode eProjectionMode);
74 void dumpViewPointAsElement(css::drawing::Position3D aViewPoint);
75 void dumpOriginAsElement(const css::drawing::EnhancedCustomShapeParameterPair& aOrigin);
76 void dumpExtrusionColorAsAttribute(bool bExtrusionColor);
77
78 // EnhancedCustomShapeGeometry.idl
79 void dumpEnhancedCustomShapeGeometryService(const css::uno::Reference< css::beans::XPropertySet >& xPropSet);
80 void dumpTypeAsAttribute(std::u16string_view sType);
81 void dumpViewBoxAsElement(css::awt::Rectangle aViewBox);
82 void dumpMirroredXAsAttribute(bool bMirroredX); // also used in EnhancedCustomShapeHandle
83 void dumpMirroredYAsAttribute(bool bMirroredY); // also used in EnhancedCustomShapeHandle
84 void dumpTextRotateAngleAsAttribute(double aTextRotateAngle);
85 void dumpAdjustmentValuesAsElement(const css::uno::Sequence< css::drawing::EnhancedCustomShapeAdjustmentValue>& aAdjustmentValues);
86 void dumpExtrusionAsElement(const css::uno::Sequence< css::beans::PropertyValue >& aExtrusion);
87 void dumpPathAsElement(const css::uno::Sequence< css::beans::PropertyValue >& aPath);
88 void dumpTextPathAsElement(const css::uno::Sequence< css::beans::PropertyValue >& aTextPath);
89 void dumpEquationsAsElement(const css::uno::Sequence< OUString >& aEquations);
90 void dumpHandlesAsElement(const css::uno::Sequence< css::beans::PropertyValues >& aHandles);
91
92 // EnhancedCustomShapeHandle.idl
93 void dumpEnhancedCustomShapeHandleService(const css::uno::Reference< css::beans::XPropertySet >& xPropSet);
94 void dumpSwitchedAsAttribute(bool bSwitched);
95 void dumpPositionAsElement(const css::drawing::EnhancedCustomShapeParameterPair& aPosition);
96 void dumpPolarAsElement(const css::drawing::EnhancedCustomShapeParameterPair& aPolar);
97 void dumpRefXAsAttribute(sal_Int32 aRefX);
98 void dumpRefYAsAttribute(sal_Int32 aRefY);
99 void dumpRefAngleAsAttribute(sal_Int32 aRefAngle);
100 void dumpRefRAsAttribute(sal_Int32 aRefR);
101 void dumpRangeXMinimumAsElement(const css::drawing::EnhancedCustomShapeParameter& aRangeXMinimum);
102 void dumpRangeXMaximumAsElement(const css::drawing::EnhancedCustomShapeParameter& aRangeXMaximum);
103 void dumpRangeYMinimumAsElement(const css::drawing::EnhancedCustomShapeParameter& aRangeYMinimum);
104 void dumpRangeYMaximumAsElement(const css::drawing::EnhancedCustomShapeParameter& aRangeXMaximum);
105 void dumpRadiusRangeMinimumAsElement(const css::drawing::EnhancedCustomShapeParameter& aRadiusRangeMinimum);
106 void dumpRadiusRangeMaximumAsElement(const css::drawing::EnhancedCustomShapeParameter& aRadiusRangeMaximum);
107
108 // EnhancedCustomShapePath.idl
109 void dumpEnhancedCustomShapePathService(const css::uno::Reference< css::beans::XPropertySet >& xPropSet);
110 void dumpCoordinatesAsElement(const css::uno::Sequence< css::drawing::EnhancedCustomShapeParameterPair >& aCoordinates);
111 void dumpSegmentsAsElement(const css::uno::Sequence< css::drawing::EnhancedCustomShapeSegment >& aSegments);
112 void dumpStretchXAsAttribute(sal_Int32 aStretchX);
113 void dumpStretchYAsAttribute(sal_Int32 aStretchY);
114 void dumpTextFramesAsElement(const css::uno::Sequence< css::drawing::EnhancedCustomShapeTextFrame >& aTextFrames);
115 void dumpGluePointsAsElement(const css::uno::Sequence< css::drawing::EnhancedCustomShapeParameterPair >& aGluePoints);
116 void dumpGluePointLeavingDirectionsAsElement(const css::uno::Sequence< double >& aGluePointLeavingDirections);
117 void dumpGluePointTypeAsAttribute(sal_Int32 aGluePointType);
118 void dumpExtrusionAllowedAsAttribute(bool bExtrusionAllowed);
119 void dumpConcentricGradientFillAllowedAsAttribute(bool bConcentricGradientFillAllowed);
120 void dumpTextPathAllowedAsAttribute(bool bTextPathAllowed);
121 void dumpSubViewSizeAsElement(const css::uno::Sequence< css::awt::Size >& aSubViewSize);
122
123 // EnhancedCustomShapePath.idl
124 void dumpEnhancedCustomShapeTextPathService(const css::uno::Reference< css::beans::XPropertySet >& xPropSet);
125 void dumpTextPathAsAttribute(bool bTextPath);
126 void dumpTextPathModeAsAttribute(css::drawing::EnhancedCustomShapeTextPathMode eTextPathMode);
127 void dumpScaleXAsAttribute(bool bScaleX);
128
129private:
131};
132
133/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
void dumpBrightnessAsAttribute(double aBrightness)
void dumpEnhancedCustomShapeHandleService(const css::uno::Reference< css::beans::XPropertySet > &xPropSet)
void dumpStretchXAsAttribute(sal_Int32 aStretchX)
void dumpEquationsAsElement(const css::uno::Sequence< OUString > &aEquations)
void dumpSubViewSizeAsElement(const css::uno::Sequence< css::awt::Size > &aSubViewSize)
void dumpFirstLightLevelAsAttribute(double aFirstLightLevel)
void dumpRefRAsAttribute(sal_Int32 aRefR)
void dumpGluePointsAsElement(const css::uno::Sequence< css::drawing::EnhancedCustomShapeParameterPair > &aGluePoints)
void dumpTextRotateAngleAsAttribute(double aTextRotateAngle)
void dumpTextPathAsElement(const css::uno::Sequence< css::beans::PropertyValue > &aTextPath)
void dumpPolarAsElement(const css::drawing::EnhancedCustomShapeParameterPair &aPolar)
void dumpExtrusionColorAsAttribute(bool bExtrusionColor)
void dumpRangeYMaximumAsElement(const css::drawing::EnhancedCustomShapeParameter &aRangeXMaximum)
void dumpAdjustmentValuesAsElement(const css::uno::Sequence< css::drawing::EnhancedCustomShapeAdjustmentValue > &aAdjustmentValues)
void dumpRangeXMaximumAsElement(const css::drawing::EnhancedCustomShapeParameter &aRangeXMaximum)
void dumpRotateAngleAsElement(const css::drawing::EnhancedCustomShapeParameterPair &aRotateAngle)
xmlTextWriterPtr xmlWriter
void dumpSkewAsElement(const css::drawing::EnhancedCustomShapeParameterPair &aSkew)
void dumpExtrusionAsAttribute(bool bExtrusion)
void dumpHandlesAsElement(const css::uno::Sequence< css::beans::PropertyValues > &aHandles)
void dumpRadiusRangeMaximumAsElement(const css::drawing::EnhancedCustomShapeParameter &aRadiusRangeMaximum)
EnhancedShapeDumper(xmlTextWriterPtr writer)
void dumpLightFaceAsAttribute(bool bLightFace)
void dumpFirstLightDirectionAsElement(css::drawing::Direction3D aFirstLightDirection)
void dumpCoordinatesAsElement(const css::uno::Sequence< css::drawing::EnhancedCustomShapeParameterPair > &aCoordinates)
void dumpScaleXAsAttribute(bool bScaleX)
void dumpTextPathAsAttribute(bool bTextPath)
void dumpTypeAsAttribute(std::u16string_view sType)
void dumpOriginAsElement(const css::drawing::EnhancedCustomShapeParameterPair &aOrigin)
void dumpSecondLightLevelAsAttribute(double aSecondLightLevel)
void dumpExtrusionAsElement(const css::uno::Sequence< css::beans::PropertyValue > &aExtrusion)
void dumpSegmentsAsElement(const css::uno::Sequence< css::drawing::EnhancedCustomShapeSegment > &aSegments)
void dumpGluePointLeavingDirectionsAsElement(const css::uno::Sequence< double > &aGluePointLeavingDirections)
void dumpSwitchedAsAttribute(bool bSwitched)
void dumpShadeModeAsAttribute(css::drawing::ShadeMode eShadeMode)
void dumpSecondLightHarshAsAttribute(bool bSecondLightHarsh)
void dumpEnhancedCustomShapePathService(const css::uno::Reference< css::beans::XPropertySet > &xPropSet)
void dumpEnhancedCustomShapeGeometryService(const css::uno::Reference< css::beans::XPropertySet > &xPropSet)
void dumpTextPathModeAsAttribute(css::drawing::EnhancedCustomShapeTextPathMode eTextPathMode)
void dumpPropertyValueAsElement(const css::beans::PropertyValue &aPropertyValue)
void dumpStretchYAsAttribute(sal_Int32 aStretchY)
void dumpDepthAsElement(const css::drawing::EnhancedCustomShapeParameterPair &aDepth)
void dumpRangeXMinimumAsElement(const css::drawing::EnhancedCustomShapeParameter &aRangeXMinimum)
void dumpViewPointAsElement(css::drawing::Position3D aViewPoint)
void dumpMirroredYAsAttribute(bool bMirroredY)
void dumpDiffusionAsAttribute(double aDiffusion)
void dumpTextFramesAsElement(const css::uno::Sequence< css::drawing::EnhancedCustomShapeTextFrame > &aTextFrames)
void dumpExtrusionAllowedAsAttribute(bool bExtrusionAllowed)
void dumpGluePointTypeAsAttribute(sal_Int32 aGluePointType)
void dumpRefAngleAsAttribute(sal_Int32 aRefAngle)
void dumpProjectionModeAsAttribute(css::drawing::ProjectionMode eProjectionMode)
void dumpShininessAsAttribute(double aShininess)
void dumpRefYAsAttribute(sal_Int32 aRefY)
void dumpMetalAsAttribute(bool bMetal)
void dumpRefXAsAttribute(sal_Int32 aRefX)
void dumpFirstLightHarshAsAttribute(bool bFirstLightHarsh)
void dumpPositionAsElement(const css::drawing::EnhancedCustomShapeParameterPair &aPosition)
void dumpRotationCenterAsElement(css::drawing::Direction3D aRotationCenter)
void dumpConcentricGradientFillAllowedAsAttribute(bool bConcentricGradientFillAllowed)
void dumpViewBoxAsElement(css::awt::Rectangle aViewBox)
void dumpEnhancedCustomShapeTextPathService(const css::uno::Reference< css::beans::XPropertySet > &xPropSet)
void dumpNumberOfLineSegmentsAsAttribute(sal_Int32 aNumberOfLineSegments)
void dumpRangeYMinimumAsElement(const css::drawing::EnhancedCustomShapeParameter &aRangeYMinimum)
void dumpEnhancedCustomShapeExtrusionService(const css::uno::Reference< css::beans::XPropertySet > &xPropSet)
void dumpRadiusRangeMinimumAsElement(const css::drawing::EnhancedCustomShapeParameter &aRadiusRangeMinimum)
void dumpSpecularityAsAttribute(double aSpecularity)
void dumpEnhancedCustomShapeParameterPair(const css::drawing::EnhancedCustomShapeParameterPair &aParameterPair)
void dumpTextPathAllowedAsAttribute(bool bTextPathAllowed)
void dumpDirection3D(css::drawing::Direction3D aDirection3D)
void dumpEnhancedCustomShapeParameter(const css::drawing::EnhancedCustomShapeParameter &aParameter)
void dumpSecondLightDirectionAsElement(css::drawing::Direction3D aSecondLightDirection)
void dumpPathAsElement(const css::uno::Sequence< css::beans::PropertyValue > &aPath)
void dumpMirroredXAsAttribute(bool bMirroredX)
struct _xmlTextWriter * xmlTextWriterPtr