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