22#include <rtl/ustrbuf.hxx>
24#include <com/sun/star/uno/Any.hxx>
42 if( rStrImpValue.indexOf(
'%' ) == -1 )
46 rStrImpValue, util::MeasureUnit::POINT );
48 eSrcUnit, util::MeasureUnit::POINT))
50 fSize = ::std::max<double>(fSize, 1.0);
51 rValue <<= static_cast<float>(fSize);
64 if( rValue >>= fSize )
66 fSize = ::std::max<float>(fSize, 1.0f);
68 util::MeasureUnit::POINT, util::MeasureUnit::POINT);
72 rStrExpValue = aOut.makeStringAndClear();
73 return !rStrExpValue.isEmpty();
86 if( rStrImpValue.indexOf(
'%' ) != -1 )
91 rValue <<= static_cast<sal_Int16>(nPrc);
101 OUStringBuffer aOut( rStrExpValue );
103 sal_Int16
nValue = sal_Int16();
109 rStrExpValue = aOut.makeStringAndClear();
110 return !rStrExpValue.isEmpty();
126 util::MeasureUnit::POINT ))
128 rValue <<= static_cast<float>(nRel);
138 if( (rValue >>= nRel) && (nRel != 0) )
142 util::MeasureUnit::POINT, util::MeasureUnit::POINT );
143 rStrExpValue = aOut.makeStringAndClear();
146 return !rStrExpValue.isEmpty();
the SvXMLTypeConverter converts values of various types from their internal representation to the tex...
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 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 ~XMLCharHeightDiffHdl() override
virtual ~XMLCharHeightHdl() override
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 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 ~XMLCharHeightPropHdl() override
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 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.
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 convertPercent(sal_Int32 &rValue, std::u16string_view rString)
static sal_Int16 GetUnitFromString(std::u16string_view rString, sal_Int16 nDefaultUnit)