diff options
author | Alexander Bergmann <myaddons@gmx.de> | 2012-02-10 14:20:12 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-02-10 14:20:52 +0000 |
commit | 99b2adf721fa424e0a02c4458774b8829cd33bf2 (patch) | |
tree | eb577fbc332ce9767c4688a3cca639e456a287ed /sax | |
parent | 740cf4a5903dd7aaad4e60ab71a43b062e1d50d8 (diff) |
Removed unused code
Diffstat (limited to 'sax')
-rw-r--r-- | sax/inc/sax/tools/converter.hxx | 12 | ||||
-rw-r--r-- | sax/source/tools/converter.cxx | 76 |
2 files changed, 0 insertions, 88 deletions
diff --git a/sax/inc/sax/tools/converter.hxx b/sax/inc/sax/tools/converter.hxx index 1fed19eb3bb3..3f753babcba2 100644 --- a/sax/inc/sax/tools/converter.hxx +++ b/sax/inc/sax/tools/converter.hxx @@ -122,10 +122,6 @@ public: sal_Int32 nMin = SAL_MIN_INT32, sal_Int32 nMax = SAL_MAX_INT32 ); - /** convert number to string */ - static void convertNumber64(::rtl::OUStringBuffer& rBuffer, - sal_Int64 nNumber); - /** convert string to number with optional min and max values */ static bool convertNumber64(sal_Int64& rValue, const ::rtl::OUString& rString, @@ -153,9 +149,6 @@ public: /** convert string to double number (using ::rtl::math) without unit conversion */ static bool convertDouble(double& rValue, const ::rtl::OUString& rString); - /** convert string to double number (using ::rtl::math) with unit conversion */ - static bool convertDouble(double& rValue, const ::rtl::OUString& rString, sal_Int16 nTargetUnit ); - /** convert double to ISO "duration" string; negative durations allowed */ static void convertDuration(::rtl::OUStringBuffer& rBuffer, const double fTime); @@ -218,11 +211,6 @@ public: ::rtl::OUStringBuffer& rsType , const ::com::sun::star::uno::Any& rValue); - /** convert a string to Any (typesafe) */ - static bool convertAny(::com::sun::star::uno::Any& rValue, - const ::rtl::OUString& rsType, - const ::rtl::OUString& rsValue); - }; } diff --git a/sax/source/tools/converter.cxx b/sax/source/tools/converter.cxx index f71ea6253a88..eb8cc7435de0 100644 --- a/sax/source/tools/converter.cxx +++ b/sax/source/tools/converter.cxx @@ -543,13 +543,6 @@ bool Converter::convertNumber( sal_Int32& rValue, return bRet; } -/** convert 64-bit number to string */ -void Converter::convertNumber64( OUStringBuffer& rBuffer, - sal_Int64 nNumber ) -{ - rBuffer.append( nNumber ); -} - /** convert string to 64-bit number with optional min and max values */ bool Converter::convertNumber64( sal_Int64& rValue, const OUString& rString, @@ -627,15 +620,6 @@ void Converter::convertDouble( ::rtl::OUStringBuffer& rBuffer, double fNumber) /** convert string to double number (using ::rtl::math) */ bool Converter::convertDouble(double& rValue, - const ::rtl::OUString& rString, sal_Int16 nTargetUnit) -{ - sal_Int16 nSourceUnit = GetUnitFromString(rString, nTargetUnit); - - return convertDouble(rValue, rString, nSourceUnit, nTargetUnit ); -} - -/** convert string to double number (using ::rtl::math) */ -bool Converter::convertDouble(double& rValue, const ::rtl::OUString& rString, sal_Int16 nSourceUnit, sal_Int16 nTargetUnit) { rtl_math_ConversionStatus eStatus; @@ -2211,66 +2195,6 @@ bool Converter::convertAny(::rtl::OUStringBuffer& rsValue, return bConverted; } -bool Converter::convertAny(com::sun::star::uno::Any& rValue, - const ::rtl::OUString& rsType, - const ::rtl::OUString& rsValue) -{ - bool bConverted = false; - - if (rsType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("boolean"))) - { - bool bTempValue = false; - ::sax::Converter::convertBool(bTempValue, rsValue); - rValue <<= bTempValue; - bConverted = true; - } - else - if (rsType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("integer"))) - { - sal_Int32 nTempValue = 0; - ::sax::Converter::convertNumber(nTempValue, rsValue); - rValue <<= nTempValue; - bConverted = true; - } - else - if (rsType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("float"))) - { - double fTempValue = 0.0; - ::sax::Converter::convertDouble(fTempValue, rsValue); - rValue <<= fTempValue; - bConverted = true; - } - else - if (rsType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("string"))) - { - rValue <<= rsValue; - bConverted = true; - } - else - if (rsType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("date"))) - { - com::sun::star::util::DateTime aTempValue; - ::sax::Converter::convertDateTime(aTempValue, rsValue); - rValue <<= aTempValue; - bConverted = true; - } - else - if (rsType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("time"))) - { - com::sun::star::util::Duration aTempValue; - com::sun::star::util::Time aConvValue; - ::sax::Converter::convertDuration(aTempValue, rsValue); - aConvValue.HundredthSeconds = aTempValue.MilliSeconds / 10; - aConvValue.Seconds = aTempValue.Seconds; - aConvValue.Minutes = aTempValue.Minutes; - aConvValue.Hours = aTempValue.Hours; - rValue <<= aConvValue; - bConverted = true; - } - - return bConverted; -} - } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |