22#include <com/sun/star/util/MeasureUnit.hpp>
23#include <com/sun/star/awt/TextAlign.hpp>
24#include <com/sun/star/awt/FontEmphasisMark.hpp>
33#include <rtl/ustrbuf.hxx>
120 bool bSuccess =
false;
121 sal_Int16 nFontEmphasis = sal_Int16();
122 if (_rValue >>= nFontEmphasis)
125 sal_uInt16
nType = nFontEmphasis & ~(awt::FontEmphasisMark::ABOVE | awt::FontEmphasisMark::BELOW);
127 bool bBelow = 0 != (nFontEmphasis & awt::FontEmphasisMark::BELOW);
130 OUStringBuffer aReturn;
134 aReturn.append(
' ' );
137 _rStrExpValue = aReturn.makeStringAndClear();
146 bool bSuccess =
true;
147 sal_uInt16 nEmphasis = awt::FontEmphasisMark::NONE;
150 bool bHasPos =
false, bHasType =
false;
152 std::u16string_view sToken;
185 nEmphasis |= bBelow ? awt::FontEmphasisMark::BELOW : awt::FontEmphasisMark::ABOVE;
186 _rValue <<= nEmphasis;
200 std::u16string_view sToken;
203 sal_uInt16 nStyle = 1;
237 bool bSuccess =
false;
245 bSuccess = (_rValue >>=
nBorder)
251 sal_Int32 nBorderColor = 0;
252 if ( _rValue >>= nBorderColor )
264 if ( !_rStrExpValue.isEmpty() )
265 _rStrExpValue +=
" ";
266 _rStrExpValue += aOut;
278 sal_Int32 nWidth = 0;
280 nWidth, _rStrImpValue, util::MeasureUnit::POINT);
282 _rValue <<= static_cast<sal_Int16>(nWidth);
289 sal_Int16 nWidth = 0;
290 OUStringBuffer aResult;
291 if (_rValue >>= nWidth)
294 util::MeasureUnit::POINT, util::MeasureUnit::POINT);
296 _rStrExpValue = aResult.makeStringAndClear();
298 return !_rStrExpValue.isEmpty();
314 _rValue <<= static_cast<float>(fValue);
323 bool bSuccess = (_rValue >>= fAngle);
327 OUStringBuffer sValue;
329 _rStrExpValue = sValue.makeStringAndClear();
bool getNextToken(std::u16string_view &rToken)
the SvXMLTypeConverter converts values of various types from their internal representation to the tex...
static bool convertEnum(EnumT &rEnum, std::u16string_view rValue, const SvXMLEnumMapEntry< EnumT > *pMap)
convert string to enum using given enum map, if the enum is not found in the map, this method will re...
Abstract base-class for different XML-types.
virtual const XMLPropertyHandler * GetPropertyHandler(sal_Int32 nType) const
This method retrieves a PropertyHandler for the given XML-type.
Abstract base-class for different XML-types.
static void convertDouble(OUStringBuffer &rBuffer, double fNumber, bool bWriteUnits, sal_Int16 nSourceUnit, sal_Int16 nTargetUnit)
static bool convertMeasure(sal_Int32 &rValue, std::u16string_view rString, sal_Int16 nTargetUnit=css::util::MeasureUnit::MM_100TH, sal_Int32 nMin=SAL_MIN_INT32, sal_Int32 nMax=SAL_MAX_INT32)
static bool convertColor(sal_Int32 &rColor, std::u16string_view rValue)
SAL_DLLPRIVATE OControlBorderHandler(const BorderFacet _eFacet)
virtual SAL_DLLPRIVATE bool exportXML(OUString &_rStrExpValue, const css::uno::Any &_rValue, const SvXMLUnitConverter &_rUnitConverter) const override
Exports the given value according to the XML-data-type corresponding to the derived class.
virtual SAL_DLLPRIVATE bool importXML(const OUString &_rStrImpValue, css::uno::Any &_rValue, const SvXMLUnitConverter &_rUnitConverter) const override
Imports the given value according to the XML-data-type corresponding to the derived class.
std::unique_ptr< XMLConstantsPropertyHandler > m_pFontEmphasisHandler
std::unique_ptr< OControlBorderHandler > m_pControlBorderColorHandler
std::unique_ptr< XMLNamedBoolPropertyHdl > m_pTextLineModeHandler
std::unique_ptr< XMLConstantsPropertyHandler > m_pFontReliefHandler
std::unique_ptr< OFontWidthHandler > m_pFontWidthHandler
std::unique_ptr< XMLConstantsPropertyHandler > m_pTextAlignHandler
std::unique_ptr< OControlBorderHandler > m_pControlBorderStyleHandler
virtual const XMLPropertyHandler * GetPropertyHandler(sal_Int32 _nType) const override
This method retrieves a PropertyHandler for the given XML-type.
OControlPropertyHandlerFactory()
std::unique_ptr< ORotationAngleHandler > m_pRotationAngleHandler
virtual bool exportXML(OUString &_rStrExpValue, const css::uno::Any &_rValue, const SvXMLUnitConverter &_rUnitConverter) const override
Exports the given value according to the XML-data-type corresponding to the derived class.
OControlTextEmphasisHandler()
virtual bool importXML(const OUString &_rStrImpValue, css::uno::Any &_rValue, const SvXMLUnitConverter &_rUnitConverter) const override
Imports the given value according to the XML-data-type corresponding to the derived class.
virtual SAL_DLLPRIVATE bool importXML(const OUString &_rStrImpValue, css::uno::Any &_rValue, const SvXMLUnitConverter &_rUnitConverter) const override
Imports the given value according to the XML-data-type corresponding to the derived class.
virtual SAL_DLLPRIVATE bool exportXML(OUString &_rStrExpValue, const css::uno::Any &_rValue, const SvXMLUnitConverter &_rUnitConverter) const override
Exports the given value according to the XML-data-type corresponding to the derived class.
SAL_DLLPRIVATE OFontWidthHandler()
SAL_DLLPRIVATE ORotationAngleHandler()
virtual SAL_DLLPRIVATE bool exportXML(OUString &_rStrExpValue, const css::uno::Any &_rValue, const SvXMLUnitConverter &_rUnitConverter) const override
Exports the given value according to the XML-data-type corresponding to the derived class.
virtual SAL_DLLPRIVATE bool importXML(const OUString &_rStrImpValue, css::uno::Any &_rValue, const SvXMLUnitConverter &_rUnitConverter) const override
Imports the given value according to the XML-data-type corresponding to the derived class.
tools::Long const nBorder
Handling of tokens in XML:
bool IsXMLToken(std::u16string_view rString, enum XMLTokenEnum eToken)
compare eToken to the string
const OUString & GetXMLToken(enum XMLTokenEnum eToken)
return the OUString representation for eToken
const SvXMLEnumMapEntry< sal_Int16 > aTextAlignMap[]
const SvXMLEnumMapEntry< sal_uInt16 > aFontEmphasisMap[]
const SvXMLEnumMapEntry< sal_uInt16 > aScaleModeMap[]
const SvXMLEnumMapEntry< sal_uInt16 > aFontReliefMap[]
const SvXMLEnumMapEntry< sal_uInt16 > aBorderTypeMap[]
#define XML_TYPE_CONTROL_TEXT_EMPHASIZE
#define XML_TYPE_CONTROL_BORDER
#define XML_TYPE_ROTATION_ANGLE
#define XML_TYPE_FONT_WIDTH
#define XML_TYPE_TEXT_LINE_MODE
#define XML_TYPE_TEXT_ALIGN
#define XML_TYPE_CONTROL_BORDER_COLOR
#define XML_TYPE_TEXT_FONT_RELIEF