20#ifndef INCLUDED_OOX_VML_VMLFORMATTING_HXX
21#define INCLUDED_OOX_VML_VMLFORMATTING_HXX
29#include <com/sun/star/drawing/PolygonFlags.hpp>
30#include <com/sun/star/uno/Reference.hxx>
33#include <rtl/ustring.hxx>
38 namespace awt {
struct Point; }
39 namespace drawing {
class XShape; }
44 namespace drawingml {
class Color; }
45 namespace drawingml {
class ShapePropertyMap; }
51typedef ::std::pair< sal_Int32, sal_Int32 >
Int32Pair;
55namespace ConversionHelper
60 std::u16string_view& orValue1, std::u16string_view& orValue2,
78 std::u16string_view rValue,
113 std::u16string_view rValue,
116 bool bDefaultAsPixel );
128 std::u16string_view rValue,
131 bool bDefaultAsPixel );
142 std::u16string_view rValue, sal_Int32 nRefValue,
143 bool bPixelX,
bool bDefaultAsPixel);
169 const std::optional< OUString >& roVmlColor,
170 const std::optional< double >& roVmlOpacity,
187 ::std::vector< ::std::vector< css::awt::Point > >& rPoints,
188 ::std::vector< ::std::vector< css::drawing::PolygonFlags > >& rFlags,
189 std::u16string_view rPath );
243 void assignUsed(
const FillModel& rSource );
Provides helper functions for colors, device measurement conversion, graphics, and graphic objects ha...
OOX_DLLPUBLIC bool separatePair(std::u16string_view &orValue1, std::u16string_view &orValue2, std::u16string_view rValue, sal_Unicode cSep)
Returns two values contained in rValue separated by cSep.
OOX_DLLPUBLIC::oox::drawingml::Color decodeColor(const GraphicHelper &rGraphicHelper, const std::optional< OUString > &roVmlColor, const std::optional< double > &roVmlOpacity, ::Color nDefaultRgb, ::Color nPrimaryRgb=API_RGB_TRANSPARENT)
Converts VML color attributes to a DrawingML color.
OOX_DLLPUBLIC void decodeVmlPath(::std::vector< ::std::vector< css::awt::Point > > &rPoints, ::std::vector< ::std::vector< css::drawing::PolygonFlags > > &rFlags, std::u16string_view rPath)
Converts VML path string into point and flag vectors.
OOX_DLLPUBLIC sal_Int64 decodeMeasureToEmu(const GraphicHelper &rGraphicHelper, std::u16string_view rValue, sal_Int32 nRefValue, bool bPixelX, bool bDefaultAsPixel)
Converts the passed VML measure string to EMU (English Metric Units).
OOX_DLLPUBLIC sal_Int32 decodeMeasureToTwip(const GraphicHelper &rGraphicHelper, std::u16string_view rValue, sal_Int32 nRefValue, bool bPixelX, bool bDefaultAsPixel)
Converts the passed VML measure string to Twip.
OOX_DLLPUBLIC double decodePercent(std::u16string_view rValue, double fDefValue)
Converts the passed VML percentage measure string to a normalized floating-point value.
OOX_DLLPUBLIC sal_Int32 decodeMeasureToHmm(const GraphicHelper &rGraphicHelper, std::u16string_view rValue, sal_Int32 nRefValue, bool bPixelX, bool bDefaultAsPixel)
Converts the passed VML measure string to 1/100 mm.
OOX_DLLPUBLIC bool decodeBool(std::u16string_view rValue)
Returns the boolean value from the passed string of a VML attribute.
OOX_DLLPUBLIC Degree100 decodeRotation(std::u16string_view rValue)
Converts the passed VML rotation value to degrees.
::std::pair< sal_Int32, sal_Int32 > Int32Pair
::std::pair< double, double > DoublePair
const ::Color API_RGB_TRANSPARENT(ColorTransparency, 0xffffffff)
Transparent color for API calls.
The fill model structure contains all shape fill properties.
std::optional< DoublePair > moFocusSize
Rectangular gradient focus size of second color.
std::optional< double > moOpacity
Solid fill color opacity.
std::optional< OUString > moColor2
End color of gradient.
std::optional< bool > moRotate
True = rotate gradient/bitmap with shape.
std::optional< DoublePair > moFocusPos
Rectangular gradient focus position of second color.
std::optional< sal_Int32 > moType
Fill type.
std::optional< double > moFocus
Linear gradient focus of second color.
std::optional< bool > moFilled
Shape fill on/off.
std::optional< OUString > moBitmapPath
Path to fill bitmap fragment.
std::optional< double > moOpacity2
End color opacity of gradient.
std::optional< sal_Int32 > moAngle
Gradient rotation angle.
std::optional< OUString > moColor
Solid fill color.
The shadow model structure contains all shape shadow properties.
bool mbHasShadow
Is a v:shadow element seen?
std::optional< double > moOpacity
Specifies the opacity of the shadow.
std::optional< OUString > moOffset
Specifies the shadow's offset from the shape's location.
std::optional< bool > moShadowOn
Is the element turned on?
std::optional< OUString > moColor
Specifies the color of the shadow.
The stroke arrow model structure contains all properties for a line end arrow.
std::optional< sal_Int32 > moArrowWidth
std::optional< sal_Int32 > moArrowType
void assignUsed(const StrokeArrowModel &rSource)
std::optional< sal_Int32 > moArrowLength
The stroke model structure contains all shape border properties.
void pushToPropMap(::oox::drawingml::ShapePropertyMap &rPropMap, const GraphicHelper &rGraphicHelper) const
Writes the properties to the passed property map.
void assignUsed(const StrokeModel &rSource)
StrokeArrowModel maStartArrow
Start line arrow style.
StrokeArrowModel maEndArrow
End line arrow style.
std::optional< sal_Int32 > moLineStyle
Line style (single, double, ...).
std::optional< sal_Int32 > moEndCap
Type of line end cap.
std::optional< OUString > moColor
Solid line color.
std::optional< bool > moStroked
Shape border line on/off.
std::optional< OUString > moDashStyle
Line dash (predefined or manually).
std::optional< sal_Int32 > moJoinStyle
Type of line join.
std::optional< double > moOpacity
Solid line color opacity.
std::optional< OUString > moWeight
Line width.
The shadow model structure contains all shape textpath properties.
std::optional< OUString > moStyle
Specifies the style of the textpath.
void pushToPropMap(oox::drawingml::ShapePropertyMap &rPropMap, const css::uno::Reference< css::drawing::XShape > &xShape, const GraphicHelper &rGraphicHelper) const
Writes the properties to the passed property map.
std::optional< bool > moTrim
Specifies whether extra space is removed above and below the text.
std::optional< OUString > moString
Specifies the string of the textpath.