Kaydet (Commit) 2601ca94 authored tarafından Jens-Heiner Rechtien's avatar Jens-Heiner Rechtien

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'
üst 8c9cc3c0
...@@ -4,9 +4,9 @@ ...@@ -4,9 +4,9 @@
* *
* $RCSfile: xmlbahdl.cxx,v $ * $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 Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1. * the terms of GNU Lesser General Public License Version 2.1.
...@@ -919,3 +919,46 @@ sal_Bool XMLNumberWithoutZeroPropHdl::exportXML( OUString& rStrExpValue, const A ...@@ -919,3 +919,46 @@ sal_Bool XMLNumberWithoutZeroPropHdl::exportXML( OUString& rStrExpValue, const A
return bRet; 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;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment