21#include <com/sun/star/drawing/BitmapMode.hpp>
22#include <com/sun/star/graphic/XGraphicTransformer.hpp>
25#include <oox/token/tokens.hxx>
39 case XML_legacyObliqueTopLeft:
return "legacyObliqueTopLeft";
40 case XML_legacyObliqueTop:
return "legacyObliqueTop";
41 case XML_legacyObliqueTopRight:
return "legacyObliqueTopRight";
42 case XML_legacyObliqueLeft:
return "legacyObliqueLeft";
43 case XML_legacyObliqueFront:
return "legacyObliqueFront";
44 case XML_legacyObliqueRight:
return "legacyObliqueRight";
45 case XML_legacyObliqueBottomLeft:
return "legacyObliqueBottomLeft";
46 case XML_legacyObliqueBottom:
return "legacyObliqueBottom";
47 case XML_legacyObliqueBottomRight:
return "legacyObliqueBottomRight";
48 case XML_legacyPerspectiveTopLeft:
return "legacyPerspectiveTopLeft";
49 case XML_legacyPerspectiveTop:
return "legacyPerspectiveTop";
50 case XML_legacyPerspectiveTopRight:
return "legacyPerspectiveTopRight";
51 case XML_legacyPerspectiveLeft:
return "legacyPerspectiveLeft";
52 case XML_legacyPerspectiveFront:
return "legacyPerspectiveFront";
53 case XML_legacyPerspectiveRight:
return "legacyPerspectiveRight";
54 case XML_legacyPerspectiveBottomLeft:
return "legacyPerspectiveBottomLeft";
55 case XML_legacyPerspectiveBottom:
return "legacyPerspectiveBottom";
56 case XML_legacyPerspectiveBottomRight:
return "legacyPerspectiveBottomRight";
57 case XML_orthographicFront:
return "orthographicFront";
58 case XML_isometricTopUp:
return "isometricTopUp";
59 case XML_isometricTopDown:
return "isometricTopDown";
60 case XML_isometricBottomUp:
return "isometricBottomUp";
61 case XML_isometricBottomDown:
return "isometricBottomDown";
62 case XML_isometricLeftUp:
return "isometricLeftUp";
63 case XML_isometricLeftDown:
return "isometricLeftDown";
64 case XML_isometricRightUp:
return "isometricRightUp";
65 case XML_isometricRightDown:
return "isometricRightDown";
66 case XML_isometricOffAxis1Left:
return "isometricOffAxis1Left";
67 case XML_isometricOffAxis1Right:
return "isometricOffAxis1Right";
68 case XML_isometricOffAxis1Top:
return "isometricOffAxis1Top";
69 case XML_isometricOffAxis2Left:
return "isometricOffAxis2Left";
70 case XML_isometricOffAxis2Right:
return "isometricOffAxis2Right";
71 case XML_isometricOffAxis2Top:
return "isometricOffAxis2Top";
72 case XML_isometricOffAxis3Left:
return "isometricOffAxis3Left";
73 case XML_isometricOffAxis3Right:
return "isometricOffAxis3Right";
74 case XML_isometricOffAxis3Bottom:
return "isometricOffAxis3Bottom";
75 case XML_isometricOffAxis4Left:
return "isometricOffAxis4Left";
76 case XML_isometricOffAxis4Right:
return "isometricOffAxis4Right";
77 case XML_isometricOffAxis4Bottom:
return "isometricOffAxis4Bottom";
78 case XML_obliqueTopLeft:
return "obliqueTopLeft";
79 case XML_obliqueTop:
return "obliqueTop";
80 case XML_obliqueTopRight:
return "obliqueTopRight";
81 case XML_obliqueLeft:
return "obliqueLeft";
82 case XML_obliqueRight:
return "obliqueRight";
83 case XML_obliqueBottomLeft:
return "obliqueBottomLeft";
84 case XML_obliqueBottom:
return "obliqueBottom";
85 case XML_obliqueBottomRight:
return "obliqueBottomRight";
86 case XML_perspectiveFront:
return "perspectiveFront";
87 case XML_perspectiveLeft:
return "perspectiveLeft";
88 case XML_perspectiveRight:
return "perspectiveRight";
89 case XML_perspectiveAbove:
return "perspectiveAbove";
90 case XML_perspectiveBelow:
return "perspectiveBelow";
91 case XML_perspectiveAboveLeftFacing:
return "perspectiveAboveLeftFacing";
92 case XML_perspectiveAboveRightFacing:
return "perspectiveAboveRightFacing";
93 case XML_perspectiveContrastingLeftFacing:
return "perspectiveContrastingLeftFacing";
94 case XML_perspectiveContrastingRightFacing:
return "perspectiveContrastingRightFacing";
95 case XML_perspectiveHeroicLeftFacing:
return "perspectiveHeroicLeftFacing";
96 case XML_perspectiveHeroicRightFacing:
return "perspectiveHeroicRightFacing";
97 case XML_perspectiveHeroicExtremeLeftFacing:
return "perspectiveHeroicExtremeLeftFacing";
98 case XML_perspectiveHeroicExtremeRightFacing:
return "perspectiveHeroicExtremeRightFacing";
99 case XML_perspectiveRelaxed:
return "perspectiveRelaxed";
100 case XML_perspectiveRelaxedModerately:
return "perspectiveRelaxedModerately";
102 SAL_WARN(
"oox.drawingml",
"Generic3DProperties::getCameraPrstName - unexpected prst type" );
110 case XML_legacyFlat1:
return "legacyFlat1";
111 case XML_legacyFlat2:
return "legacyFlat2";
112 case XML_legacyFlat3:
return "legacyFlat3";
113 case XML_legacyFlat4:
return "legacyFlat4";
114 case XML_legacyNormal1:
return "legacyNormal1";
115 case XML_legacyNormal2:
return "legacyNormal2";
116 case XML_legacyNormal3:
return "legacyNormal3";
117 case XML_legacyNormal4:
return "legacyNormal4";
118 case XML_legacyHarsh1:
return "legacyHarsh1";
119 case XML_legacyHarsh2:
return "legacyHarsh2";
120 case XML_legacyHarsh3:
return "legacyHarsh3";
121 case XML_legacyHarsh4:
return "legacyHarsh4";
122 case XML_threePt:
return "threePt";
123 case XML_balanced:
return "balanced";
124 case XML_soft:
return "soft";
125 case XML_harsh:
return "harsh";
126 case XML_flood:
return "flood";
127 case XML_contrasting:
return "contrasting";
128 case XML_morning:
return "morning";
129 case XML_sunrise:
return "sunrise";
130 case XML_sunset:
return "sunset";
131 case XML_chilly:
return "chilly";
132 case XML_freezing:
return "freezing";
133 case XML_flat:
return "flat";
134 case XML_twoPt:
return "twoPt";
135 case XML_glow:
return "glow";
136 case XML_brightRoom:
return "brightRoom";
138 SAL_WARN(
"oox.drawingml",
"Generic3DProperties::getLightRigName - unexpected token" );
146 case XML_tl:
return "tl";
147 case XML_t:
return "t";
148 case XML_tr:
return "tr";
149 case XML_l:
return "l";
150 case XML_r:
return "r";
151 case XML_bl:
return "bl";
152 case XML_b:
return "b";
153 case XML_br:
return "br";
155 SAL_WARN(
"oox.drawingml",
"Generic3DProperties::getLightRigDirName - unexpected token" );
163 case XML_relaxedInset:
return "relaxedInset";
164 case XML_circle:
return "circle";
165 case XML_slope:
return "slope";
166 case XML_cross:
return "cross";
167 case XML_angle:
return "angle";
168 case XML_softRound:
return "softRound";
169 case XML_convex:
return "convex";
170 case XML_coolSlant:
return "coolSlant";
171 case XML_divot:
return "divot";
172 case XML_riblet:
return "riblet";
173 case XML_hardEdge:
return "hardEdge";
174 case XML_artDeco:
return "artDeco";
176 SAL_WARN(
"oox.drawingml",
"Generic3DProperties::getBevelPresetTypeString - unexpected token" );
184 case XML_legacyMatte:
return "legacyMatte";
185 case XML_legacyPlastic:
return "legacyPlastic";
186 case XML_legacyMetal:
return "legacyMetal";
187 case XML_legacyWireframe:
return "legacyWireframe";
188 case XML_matte:
return "matte";
189 case XML_plastic:
return "plastic";
190 case XML_metal:
return "metal";
191 case XML_warmMatte:
return "warmMatte";
192 case XML_translucentPowder:
return "translucentPowder";
193 case XML_powder:
return "powder";
194 case XML_dkEdge:
return "dkEdge";
195 case XML_softEdge:
return "softEdge";
196 case XML_clear:
return "clear";
197 case XML_flat:
return "flat";
198 case XML_softmetal:
return "softmetal";
201 SAL_WARN(
"oox.drawingml",
"Generic3DProperties::getPresetMaterialTypeString - unexpected token" );
207 css::uno::Sequence<css::beans::PropertyValue>
aSeq(6);
208 auto pSeq =
aSeq.getArray();
212 pSeq[nSize].Name =
"fov";
218 pSeq[nSize].Name =
"zoom";
219 pSeq[nSize].Value <<= *
mfZoom;
224 pSeq[nSize].Name =
"prst";
230 pSeq[nSize].Name =
"rotLat";
236 pSeq[nSize].Name =
"rotLon";
242 pSeq[nSize].Name =
"rotRev";
246 aSeq.realloc( nSize );
252 css::uno::Sequence<css::beans::PropertyValue>
aSeq(5);
253 auto pSeq =
aSeq.getArray();
257 pSeq[nSize].Name =
"dir";
263 pSeq[nSize].Name =
"rig";
269 pSeq[nSize].Name =
"rotLat";
275 pSeq[nSize].Name =
"rotLon";
281 pSeq[nSize].Name =
"rotRev";
285 aSeq.realloc( nSize );
291 css::uno::Sequence<css::beans::PropertyValue>
aSeq(3);
292 auto pSeq =
aSeq.getArray();
296 pSeq[nSize].Name =
"prst";
300 if( rProps.
mnWidth.has_value() )
302 pSeq[nSize].Name =
"w";
303 pSeq[nSize].Value <<= *rProps.
mnWidth;
308 pSeq[nSize].Name =
"h";
309 pSeq[nSize].Value <<= *rProps.
mnHeight;
312 aSeq.realloc( nSize );
320 if( sColorScheme.isEmpty() )
335 css::uno::Sequence<css::beans::PropertyValue>
aSeq(8);
336 auto pSeq =
aSeq.getArray();
340 pSeq[nSize].Name =
"extrusionH";
346 pSeq[nSize].Name =
"contourW";
352 pSeq[nSize].Name =
"z";
358 pSeq[nSize].Name =
"prstMaterial";
364 pSeq[nSize].Name =
"bevelT";
370 pSeq[nSize].Name =
"bevelB";
376 pSeq[nSize].Name =
"extrusionClr";
382 pSeq[nSize].Name =
"contourClr";
386 aSeq.realloc( nSize );
Provides helper functions for colors, device measurement conversion, graphics, and graphic objects ha...
const OUString & getSchemeColorName() const
Returns the scheme name from the a:schemeClr element for interoperability purposes.
sal_Int16 getTransparency() const
Returns the transparency of the color (0 = opaque, 100 = full transparent).
bool isUsed() const
Returns true, if the color is initialized.
const css::uno::Sequence< css::beans::PropertyValue > & getTransformations() const
Returns the unaltered list of transformations for interoperability purposes.
::Color getColor(const GraphicHelper &rGraphicHelper, ::Color nPhClr=API_RGB_TRANSPARENT) const
Returns the final RGB color value.
Sequence< sal_Int8 > aSeq
#define SAL_WARN(area, stream)
css::beans::PropertyValue makePropertyValue(const OUString &rName, T &&rValue)
std::optional< sal_Int32 > mnHeight
std::optional< sal_Int32 > mnPreset
std::optional< sal_Int32 > mnWidth
css::uno::Sequence< css::beans::PropertyValue > getLightRigAttributes()
std::optional< BevelProperties > maBottomBevelProperties
std::optional< sal_Int32 > mnLightRigDirection
std::optional< sal_Int32 > mnPreset
std::optional< sal_Int32 > mnMaterial
std::optional< sal_Int32 > mnLightRigType
static OUString getCameraPrstName(sal_Int32 nElement)
RotationProperties maLightRigRotation
static css::uno::Sequence< css::beans::PropertyValue > getBevelAttributes(BevelProperties rProps)
static OUString getLightRigDirName(sal_Int32 nElement)
css::uno::Sequence< css::beans::PropertyValue > getShape3DAttributes(const GraphicHelper &rGraphicHelper, ::Color rPhClr)
static css::uno::Sequence< css::beans::PropertyValue > getColorAttributes(const Color &rColor, const GraphicHelper &rGraphicHelper, ::Color rPhClr)
RotationProperties maCameraRotation
std::optional< sal_Int32 > mnContourW
std::optional< float > mfFieldOfVision
static OUString getPresetMaterialTypeString(sal_Int32 nType)
std::optional< BevelProperties > maTopBevelProperties
std::optional< sal_Int32 > mnShapeZ
css::uno::Sequence< css::beans::PropertyValue > getCameraAttributes()
std::optional< float > mfZoom
static OUString getLightRigName(sal_Int32 nElement)
static OUString getBevelPresetTypeString(sal_Int32 nType)
std::optional< sal_Int32 > mnExtrusionH
std::optional< sal_Int32 > mnLongitude
std::optional< sal_Int32 > mnLatitude
std::optional< sal_Int32 > mnRevolution