summaryrefslogtreecommitdiff
path: root/xmloff/source/style/xmlbahdl.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'xmloff/source/style/xmlbahdl.cxx')
-rw-r--r--xmloff/source/style/xmlbahdl.cxx42
1 files changed, 42 insertions, 0 deletions
diff --git a/xmloff/source/style/xmlbahdl.cxx b/xmloff/source/style/xmlbahdl.cxx
index a9f8b147c7f9..b34b37a166fd 100644
--- a/xmloff/source/style/xmlbahdl.cxx
+++ b/xmloff/source/style/xmlbahdl.cxx
@@ -545,6 +545,48 @@ sal_Bool XMLColorPropHdl::exportXML( OUString& rStrExpValue, const Any& rValue,
///////////////////////////////////////////////////////////////////////////////
//
+// class XMLHexPropHdl
+//
+
+XMLHexPropHdl::~XMLHexPropHdl()
+{
+ // Nothing to do
+}
+
+sal_Bool XMLHexPropHdl::importXML( const OUString& rStrImpValue, Any& rValue, const SvXMLUnitConverter& ) const
+{
+ sal_Bool bRet = sal_False;
+ sal_uInt32 nRsid;
+
+ bRet = SvXMLUnitConverter::convertHex( nRsid, rStrImpValue );
+ rValue <<= nRsid;
+
+ return bRet;
+}
+
+sal_Bool XMLHexPropHdl::exportXML( OUString& rStrExpValue, const Any& rValue, const SvXMLUnitConverter& ) const
+{
+ sal_Bool bRet = sal_False;
+ sal_uInt32 nRsid = 0;
+
+ OUStringBuffer aOut;
+ if( rValue >>= nRsid )
+ {
+ SvXMLUnitConverter::convertHex( aOut, nRsid );
+ rStrExpValue = aOut.makeStringAndClear();
+
+ bRet = sal_True;
+ }
+ else
+ {
+ bRet = sal_False;
+ }
+
+ return bRet;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+//
// class XMLStringPropHdl
//