21#include <com/sun/star/uno/Any.hxx>
22#include <rtl/ustrbuf.hxx>
24#include <com/sun/star/text/GraphicCrop.hpp>
50 GraphicCrop aCrop1, aCrop2;
54 return aCrop1.Top == aCrop2.Top &&
55 aCrop1.Bottom == aCrop2.Bottom &&
56 aCrop1.Left == aCrop2.Left &&
57 aCrop1.Right == aCrop2.Right;
63 sal_Int32 nLen = rStrImpValue.getLength();
66 rStrImpValue[4] ==
'(' &&
67 rStrImpValue[nLen-1] ==
')' )
70 OUString sTmp( rStrImpValue.copy( 5, nLen-6 ) );
72 bool bHasComma = sTmp.indexOf(
',' ) != -1;
76 std::u16string_view aToken;
85 if (
abs(nVal) > 400000)
87 SAL_INFO(
"xmloff.style",
"ignoring excessive clip " << OUString(aToken));
93 case 0: aCrop.Top = nVal;
break;
94 case 1: aCrop.Right = nVal;
break;
95 case 2: aCrop.Bottom = nVal;
break;
96 case 3: aCrop.Left = nVal;
break;
112 OUStringBuffer aOut(30);
115 if( rValue >>= aCrop )
132 rStrExpValue = aOut.makeStringAndClear();
bool getNextToken(std::u16string_view &rToken)
the SvXMLTypeConverter converts values of various types from their internal representation to the tex...
bool convertMeasureToCore(sal_Int32 &rValue, std::u16string_view rString, sal_Int32 nMin=SAL_MIN_INT32, sal_Int32 nMax=SAL_MAX_INT32) const
convert string to measure with meCoreMeasureUnit, using optional min and max values
void convertMeasureToXML(OUStringBuffer &rBuffer, sal_Int32 nMeasure) const
convert measure to string: from meCoreMeasureUnit to meXMLMeasureUnit
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 ~XMLClipPropertyHandler() override
XMLClipPropertyHandler(bool bODF11)
virtual bool equals(const css::uno::Any &r1, const css::uno::Any &r2) const override
Compares two Any's in case of the given XML-data-type.
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.
#define SAL_INFO(area, stream)
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
SwNodeOffset abs(const SwNodeOffset &a)