20#ifndef INCLUDED_OOX_DRAWINGML_DRAWINGMLTYPES_HXX
21#define INCLUDED_OOX_DRAWINGML_DRAWINGMLTYPES_HXX
27#include <com/sun/star/awt/Point.hpp>
28#include <com/sun/star/awt/Size.hpp>
29#include <com/sun/star/drawing/TextVerticalAdjust.hpp>
30#include <com/sun/star/geometry/IntegerRectangle2D.hpp>
31#include <com/sun/star/style/ParagraphAdjust.hpp>
32#include <com/sun/star/style/TabAlign.hpp>
33#include <com/sun/star/uno/Reference.hxx>
37#include <rtl/ustring.hxx>
41 namespace drawing {
struct Hatch; }
42 namespace xml::sax {
class XFastAttributeList; }
96css::awt::Point
GetPointPercent(
const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttribs );
100css::awt::Size
GetSize2D(
const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttributes );
103css::geometry::IntegerRectangle2D
GetRelativeRect(
const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttributes );
106 const css::uno::Reference<css::xml::sax::XFastAttributeList>& xAttributes);
118sal_Int32
GetPercent( std::u16string_view sValue );
142css::style::ParagraphAdjust
GetParaAdjust( sal_Int32 nAlign );
173 if (nRotation > 18000)
178 return OString::number(nRotation);
190 return o3tl::convertNarrowing<sal_Int32, o3tl::Length::emu, o3tl::Length::mm100>(
nValue);
212 explicit EmuPoint( sal_Int64 nX, sal_Int64 nY ) :
X( nX ),
Y( nY ) {}
constexpr Point convert(const Point &rPoint, o3tl::Length eFrom, o3tl::Length eTo)
std::shared_ptr< TableProperties > TablePropertiesPtr
IndexRange GetIndexRange(const Reference< XFastAttributeList > &xAttributes)
TextVerticalAdjust GetTextVerticalAdjust(sal_Int32 nToken)
float GetFontHeight(sal_Int32 nHeight)
sal_Int16 GetCaseMap(sal_Int32 nToken)
awt::Point GetPointPercent(const Reference< XFastAttributeList > &xAttribs)
converts the attributes from a CT_TLPoint into an awt Point with 1/1000%
TabAlign GetTabAlign(sal_Int32 aToken)
sal_Int32 GetCoordinate(sal_Int32 nValue)
converts EMUs into 1/100th mmm
sal_Int16 GetFontUnderline(sal_Int32 nToken)
OString calcRotationValue(sal_Int32 nRotation)
nRotation is a 100th of a degree and the return value is in a 60,000th of a degree
std::shared_ptr< Shape3DProperties > Shape3DPropertiesPtr
double convertPointToMms(double fValue)
Converts the passed double value from points to mm.
std::shared_ptr< Shape > ShapePtr
float convertEmuToPoints(sal_Int64 nValue)
Converts the passed 64-bit integer value from EMUs to Points.
sal_Int32 convertEmuToHmm(sal_Int64 nValue)
Converts the passed 64-bit integer value from EMUs to 1/100 mm.
awt::Size GetSize2D(const Reference< XFastAttributeList > &xAttribs)
converts the attributes from a CT_Size2D into an awt Size with 1/100thmm
model::RectangleAlignment convertToRectangleAlignment(sal_Int32 nToken)
std::optional< OString > GetTextVerticalType(sal_Int32 nRotateAngle)
Converts nRotate angle to TextVerticalType string appearing in ooxml.
std::shared_ptr< TextCharacterProperties > TextCharacterPropertiesPtr
sal_Int32 GetPointFromCoordinate(sal_Int32 nValue)
converts 1/100mm to EMU
ParagraphAdjust GetParaAdjust(sal_Int32 nAlign)
converts a paragraph align to a ParaAdjust
IntegerRectangle2D GetRelativeRect(const Reference< XFastAttributeList > &xAttribs)
converts the attributes from a CT_RelativeRect to an IntegerRectangle2D
std::shared_ptr< Theme > ThemePtr
double GetPositiveFixedPercentage(const OUString &sValue)
Converts a ST_PositiveFixedPercentage to a float.
std::weak_ptr< Shape > WeakShapePtr
void fillRelativeRectangle(model::RelativeRectangle &rRelativeRectangle, const Reference< XFastAttributeList > &xAttribs)
const sal_Int32 MAX_DEGREE
const sal_Int32 MAX_PERCENT
sal_Int32 GetTextSpacingPoint(std::u16string_view sValue)
converts the ST_TextSpacingPoint to 1/100mm
const sal_Int32 PER_DEGREE
sal_Int32 GetPercent(std::u16string_view sValue)
converts a ST_Percentage % string into 1/1000th of %
const sal_Int32 PER_PERCENT
sal_Int16 GetFontStrikeout(sal_Int32 nToken)
std::shared_ptr< FillProperties > FillPropertiesPtr
std::shared_ptr< TextListStyle > TextListStylePtr
float GetTextSize(std::u16string_view sValue)
converts the ST_TextFontSize to point
std::shared_ptr< GraphicProperties > GraphicPropertiesPtr
std::shared_ptr< TextBody > TextBodyPtr
std::shared_ptr< EffectProperties > EffectPropertiesPtr
const char * GetHatchPattern(const drawing::Hatch &rHatch)
std::shared_ptr< LineProperties > LinePropertiesPtr
sal_Int64 convertHmmToEmu(sal_Int32 nValue)
Converts the passed 32-bit integer value from 1/100 mm to EMUs.
A structure for a point with 64-bit integer components.
EmuPoint(sal_Int64 nX, sal_Int64 nY)
A structure for a rectangle with 64-bit integer components.
EmuRectangle(sal_Int64 nX, sal_Int64 nY, sal_Int64 nWidth, sal_Int64 nHeight)
void setSize(const EmuSize &rSize)
void setPos(const EmuPoint &rPos)
A structure for a size with 64-bit integer components.
EmuSize(sal_Int64 nWidth, sal_Int64 nHeight)