summaryrefslogtreecommitdiff
path: root/xmloff/source/style/xmlbahdl.cxx
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2007-08-03 11:54:42 +0000
committerJens-Heiner Rechtien <hr@openoffice.org>2007-08-03 11:54:42 +0000
commit2601ca94e5f8e888ea1f9c1d73ed5fbde39411a7 (patch)
tree1d8ec04e814e1345211874460a644eda922548a4 /xmloff/source/style/xmlbahdl.cxx
parent8c9cc3c0366db413111db0bba952002c26d1e076 (diff)
INTEGRATION: CWS oasisrng03 (1.24.120); FILE MERGED
2007/07/10 09:21:04 ama 1.24.120.2: RESYNC: (1.24-1.25); FILE MERGED 2007/07/05 13:41:02 ama 1.24.120.1: #i35851#: Page number 'auto' instead '0'
Diffstat (limited to 'xmloff/source/style/xmlbahdl.cxx')
-rw-r--r--xmloff/source/style/xmlbahdl.cxx47
1 files changed, 45 insertions, 2 deletions
diff --git a/xmloff/source/style/xmlbahdl.cxx b/xmloff/source/style/xmlbahdl.cxx
index 447626208b60..95183d1afbcc 100644
--- a/xmloff/source/style/xmlbahdl.cxx
+++ b/xmloff/source/style/xmlbahdl.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: xmlbahdl.cxx,v $
*
- * $Revision: 1.25 $
+ * $Revision: 1.26 $
*
- * last change: $Author: hr $ $Date: 2007-06-27 15:46:33 $
+ * last change: $Author: hr $ $Date: 2007-08-03 12:54:42 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -919,3 +919,46 @@ sal_Bool XMLNumberWithoutZeroPropHdl::exportXML( OUString& rStrExpValue, const A
return bRet;
}
+///////////////////////////////////////////////////////////////////////////////
+// class XMLNumberWithAutoInsteadZeroPropHdl
+//
+
+XMLNumberWithAutoInsteadZeroPropHdl::~XMLNumberWithAutoInsteadZeroPropHdl()
+{
+}
+
+sal_Bool XMLNumberWithAutoInsteadZeroPropHdl::importXML(
+ const OUString& rStrImpValue,
+ Any& rValue,
+ const SvXMLUnitConverter& ) const
+{
+ sal_Int32 nValue = 0;
+ sal_Bool bRet = SvXMLUnitConverter::convertNumber( nValue, rStrImpValue );
+ if( bRet )
+ lcl_xmloff_setAny( rValue, nValue, 2 );
+ else if( rStrImpValue == GetXMLToken( XML_AUTO ) )
+ {
+ rValue <<= (sal_Int16)nValue;
+ bRet = sal_True;
+ }
+ return bRet;
+}
+
+sal_Bool XMLNumberWithAutoInsteadZeroPropHdl::exportXML( OUString& rStrExpValue, const Any& rValue, const SvXMLUnitConverter& ) const
+{
+
+ sal_Int32 nValue = 0;
+ lcl_xmloff_getAny( rValue, nValue, 2 );
+
+ if( 0 == nValue )
+ rStrExpValue = GetXMLToken( XML_AUTO );
+ else
+ {
+ OUStringBuffer aBuffer;
+ SvXMLUnitConverter::convertNumber( aBuffer, nValue );
+ rStrExpValue = aBuffer.makeStringAndClear();
+ }
+
+ return sal_True;
+}
+