diff options
author | Thomas Arnhold <thomas@arnhold.org> | 2014-08-20 21:34:30 +0200 |
---|---|---|
committer | Thomas Arnhold <thomas@arnhold.org> | 2014-08-21 09:03:20 +0200 |
commit | f133857cc61dba9505fc2aae23dcac2f47f4ef50 (patch) | |
tree | 86e38fe77ca1dca56568bb8a79cc38e455b67d0e | |
parent | 32093237b3f41eca976a5018a7c8ef56e3f5fb3a (diff) |
comphelper: starutil -> css::util
Change-Id: If4c0d404b0f7027837dcc245b5b7d21b1f749347
-rw-r--r-- | comphelper/source/misc/numbers.cxx | 20 | ||||
-rw-r--r-- | include/comphelper/numbers.hxx | 11 | ||||
-rw-r--r-- | include/unotools/datetime.hxx | 20 |
3 files changed, 23 insertions, 28 deletions
diff --git a/comphelper/source/misc/numbers.cxx b/comphelper/source/misc/numbers.cxx index 4a2ccbe3af60..5dd15acc28de 100644 --- a/comphelper/source/misc/numbers.cxx +++ b/comphelper/source/misc/numbers.cxx @@ -32,9 +32,9 @@ namespace comphelper namespace starbeans = ::com::sun::star::beans; -sal_Int16 getNumberFormatType(const css::uno::Reference<starutil::XNumberFormats>& xFormats, sal_Int32 nKey) +sal_Int16 getNumberFormatType(const css::uno::Reference<css::util::XNumberFormats>& xFormats, sal_Int32 nKey) { - sal_Int16 nReturn(starutil::NumberFormat::UNDEFINED); + sal_Int16 nReturn(css::util::NumberFormat::UNDEFINED); if (xFormats.is()) { try @@ -52,17 +52,17 @@ sal_Int16 getNumberFormatType(const css::uno::Reference<starutil::XNumberFormats } -sal_Int16 getNumberFormatType(const css::uno::Reference<starutil::XNumberFormatter>& xFormatter, sal_Int32 nKey) +sal_Int16 getNumberFormatType(const css::uno::Reference<css::util::XNumberFormatter>& xFormatter, sal_Int32 nKey) { OSL_ENSURE(xFormatter.is(), "getNumberFormatType : the formatter isn't valid !"); - css::uno::Reference<starutil::XNumberFormatsSupplier> xSupplier( xFormatter->getNumberFormatsSupplier()); + css::uno::Reference<css::util::XNumberFormatsSupplier> xSupplier( xFormatter->getNumberFormatsSupplier()); OSL_ENSURE(xSupplier.is(), "getNumberFormatType : the formatter doesn't implement a supplier !"); - css::uno::Reference<starutil::XNumberFormats> xFormats( xSupplier->getNumberFormats()); + css::uno::Reference<css::util::XNumberFormats> xFormats( xSupplier->getNumberFormats()); return getNumberFormatType(xFormats, nKey); } -css::uno::Any getNumberFormatDecimals(const css::uno::Reference<starutil::XNumberFormats>& xFormats, sal_Int32 nKey) +css::uno::Any getNumberFormatDecimals(const css::uno::Reference<css::util::XNumberFormats>& xFormats, sal_Int32 nKey) { if (xFormats.is()) { @@ -86,13 +86,13 @@ css::uno::Any getNumberFormatDecimals(const css::uno::Reference<starutil::XNumbe sal_Int32 getStandardFormat( - const css::uno::Reference<starutil::XNumberFormatter>& xFormatter, + const css::uno::Reference<css::util::XNumberFormatter>& xFormatter, sal_Int16 nType, const css::lang::Locale& _rLocale) { - css::uno::Reference<starutil::XNumberFormatsSupplier> xSupplier( xFormatter.is() ? xFormatter->getNumberFormatsSupplier() : css::uno::Reference<starutil::XNumberFormatsSupplier>(NULL)); - css::uno::Reference<starutil::XNumberFormats> xFormats( xSupplier.is() ? xSupplier->getNumberFormats() : css::uno::Reference<starutil::XNumberFormats>(NULL)); - css::uno::Reference<starutil::XNumberFormatTypes> xTypes(xFormats, css::uno::UNO_QUERY); + css::uno::Reference<css::util::XNumberFormatsSupplier> xSupplier( xFormatter.is() ? xFormatter->getNumberFormatsSupplier() : css::uno::Reference<css::util::XNumberFormatsSupplier>(NULL)); + css::uno::Reference<css::util::XNumberFormats> xFormats( xSupplier.is() ? xSupplier->getNumberFormats() : css::uno::Reference<css::util::XNumberFormats>(NULL)); + css::uno::Reference<css::util::XNumberFormatTypes> xTypes(xFormats, css::uno::UNO_QUERY); OSL_ENSURE(xTypes.is(), "getStandardFormat : no format types !"); return xTypes.is() ? xTypes->getStandardFormat(nType, _rLocale) : 0; diff --git a/include/comphelper/numbers.hxx b/include/comphelper/numbers.hxx index e59820b5e481..7cb8840f18d3 100644 --- a/include/comphelper/numbers.hxx +++ b/include/comphelper/numbers.hxx @@ -29,22 +29,19 @@ namespace comphelper { - - namespace starutil = ::com::sun::star::util; - /// returns the ::com::sun::star::util::NumberFormat of the given key under the given formats - COMPHELPER_DLLPUBLIC sal_Int16 getNumberFormatType(const css::uno::Reference<starutil::XNumberFormats>& xFormats, sal_Int32 nKey); + COMPHELPER_DLLPUBLIC sal_Int16 getNumberFormatType(const css::uno::Reference<css::util::XNumberFormats>& xFormats, sal_Int32 nKey); /// returns the ::com::sun::star::util::NumberFormat of the given key under the given formatter - COMPHELPER_DLLPUBLIC sal_Int16 getNumberFormatType(const css::uno::Reference<starutil::XNumberFormatter>& xFormatter, sal_Int32 nKey); + COMPHELPER_DLLPUBLIC sal_Int16 getNumberFormatType(const css::uno::Reference<css::util::XNumberFormatter>& xFormatter, sal_Int32 nKey); /// returns the decimals of the given numeric number formatunder the given formats - COMPHELPER_DLLPUBLIC css::uno::Any getNumberFormatDecimals(const css::uno::Reference<starutil::XNumberFormats>& xFormats, sal_Int32 nKey); + COMPHELPER_DLLPUBLIC css::uno::Any getNumberFormatDecimals(const css::uno::Reference<css::util::XNumberFormats>& xFormats, sal_Int32 nKey); /** returns the standard format for the given type and the given _rLocale */ sal_Int32 getStandardFormat( - const css::uno::Reference<starutil::XNumberFormatter>& xFormatter, + const css::uno::Reference<css::util::XNumberFormatter>& xFormatter, sal_Int16 nType, const css::lang::Locale& _rLocale); diff --git a/include/unotools/datetime.hxx b/include/unotools/datetime.hxx index d07402be20b1..306db2805e67 100644 --- a/include/unotools/datetime.hxx +++ b/include/unotools/datetime.hxx @@ -34,20 +34,18 @@ class DateTime; namespace utl { - namespace starutil = ::com::sun::star::util; + UNOTOOLS_DLLPUBLIC void typeConvert(const Date& _rDate, css::util::Date& _rOut); + UNOTOOLS_DLLPUBLIC void typeConvert(const css::util::Date& _rDate, Date& _rOut); - UNOTOOLS_DLLPUBLIC void typeConvert(const Date& _rDate, starutil::Date& _rOut); - UNOTOOLS_DLLPUBLIC void typeConvert(const starutil::Date& _rDate, Date& _rOut); + UNOTOOLS_DLLPUBLIC void typeConvert(const DateTime& _rDateTime, css::util::DateTime& _rOut); + UNOTOOLS_DLLPUBLIC void typeConvert(const css::util::DateTime& _rDateTime, DateTime& _rOut); - UNOTOOLS_DLLPUBLIC void typeConvert(const DateTime& _rDateTime, starutil::DateTime& _rOut); - UNOTOOLS_DLLPUBLIC void typeConvert(const starutil::DateTime& _rDateTime, DateTime& _rOut); + UNOTOOLS_DLLPUBLIC void extractDate(const css::util::DateTime& _rDateTime, css::util::Date& _rOut); - UNOTOOLS_DLLPUBLIC void extractDate(const starutil::DateTime& _rDateTime, starutil::Date& _rOut); - - UNOTOOLS_DLLPUBLIC ::rtl::OUString toISO8601(const starutil::DateTime& _rDateTime); - UNOTOOLS_DLLPUBLIC bool ISO8601parseDateTime(const ::rtl::OUString &i_rIn, starutil::DateTime& o_rDateTime); - UNOTOOLS_DLLPUBLIC bool ISO8601parseDate(const ::rtl::OUString &i_rIn, starutil::Date& o_rDate); - UNOTOOLS_DLLPUBLIC bool ISO8601parseTime(const ::rtl::OUString &i_rIn, starutil::Time& o_Time); + UNOTOOLS_DLLPUBLIC ::rtl::OUString toISO8601(const css::util::DateTime& _rDateTime); + UNOTOOLS_DLLPUBLIC bool ISO8601parseDateTime(const ::rtl::OUString &i_rIn, css::util::DateTime& o_rDateTime); + UNOTOOLS_DLLPUBLIC bool ISO8601parseDate(const ::rtl::OUString &i_rIn, css::util::Date& o_rDate); + UNOTOOLS_DLLPUBLIC bool ISO8601parseTime(const ::rtl::OUString &i_rIn, css::util::Time& o_Time); } // namespace utl |