[Libreoffice-commits] core.git: connectivity/source include/connectivity
Lionel Elie Mamane
lionel at mamane.lu
Fri Jun 28 05:26:16 PDT 2013
connectivity/source/commontools/CommonTools.cxx | 44 ------------------------
connectivity/source/commontools/FValue.cxx | 6 +--
include/connectivity/CommonTools.hxx | 5 --
3 files changed, 3 insertions(+), 52 deletions(-)
New commits:
commit d6bba47bcb3030163fffd0b8f01c03d038989dea
Author: Lionel Elie Mamane <lionel at mamane.lu>
Date: Thu Jun 27 09:28:48 2013 +0200
remove ::connectivity::to(Date)?(Time)?String; same as DBTypeConversion::*
Change-Id: I5f2ef1ecff7e2071b55c27b9dc60e7d92950435c
Reviewed-on: https://gerrit.libreoffice.org/4563
Reviewed-by: Fridrich Strba <fridrich at documentfoundation.org>
Tested-by: Fridrich Strba <fridrich at documentfoundation.org>
diff --git a/connectivity/source/commontools/CommonTools.cxx b/connectivity/source/commontools/CommonTools.cxx
index 48357f2..414987e 100644
--- a/connectivity/source/commontools/CommonTools.cxx
+++ b/connectivity/source/commontools/CommonTools.cxx
@@ -111,50 +111,6 @@ namespace connectivity
return ( *pStr == 0 ) && ( *pWild == 0 );
}
//------------------------------------------------------------------
- OUString toDateString(const ::com::sun::star::util::Date& rDate)
- {
- sal_Char s[11];
- snprintf(s,
- sizeof(s),
- "%04d-%02d-%02d",
- (int)rDate.Year,
- (int)rDate.Month,
- (int)rDate.Day);
- s[10] = 0;
- return OUString::createFromAscii(s);
- }
-
- //------------------------------------------------------------------
- OUString toTimeString(const ::com::sun::star::util::Time& rTime)
- {
- sal_Char s[9];
- snprintf(s,
- sizeof(s),
- "%02d:%02d:%02d",
- (int)rTime.Hours,
- (int)rTime.Minutes,
- (int)rTime.Seconds);
- s[8] = 0;
- return OUString::createFromAscii(s);
- }
-
- //------------------------------------------------------------------
- OUString toDateTimeString(const ::com::sun::star::util::DateTime& rDateTime)
- {
- sal_Char s[20];
- snprintf(s,
- sizeof(s),
- "%04d-%02d-%02d %02d:%02d:%02d",
- (int)rDateTime.Year,
- (int)rDateTime.Month,
- (int)rDateTime.Day,
- (int)rDateTime.Hours,
- (int)rDateTime.Minutes,
- (int)rDateTime.Seconds);
- s[19] = 0;
- return OUString::createFromAscii(s);
- }
-
#ifdef SOLAR_JAVA
::rtl::Reference< jvmaccess::VirtualMachine > getJavaVM(const Reference<XComponentContext >& _rxContext)
{
diff --git a/connectivity/source/commontools/FValue.cxx b/connectivity/source/commontools/FValue.cxx
index f3aaeeb..bf78289 100644
--- a/connectivity/source/commontools/FValue.cxx
+++ b/connectivity/source/commontools/FValue.cxx
@@ -983,13 +983,13 @@ OUString ORowSetValue::getString( ) const
aRet = OUString::number(static_cast<double>(*this));
break;
case DataType::DATE:
- aRet = connectivity::toDateString(*this);
+ aRet = DBTypeConversion::toDateString(*this);
break;
case DataType::TIME:
- aRet = connectivity::toTimeString(*this);
+ aRet = DBTypeConversion::toTimeString(*this);
break;
case DataType::TIMESTAMP:
- aRet = connectivity::toDateTimeString(*this);
+ aRet = DBTypeConversion::toDateTimeString(*this);
break;
case DataType::BINARY:
case DataType::VARBINARY:
diff --git a/include/connectivity/CommonTools.hxx b/include/connectivity/CommonTools.hxx
index c13b97d..294ec3f 100644
--- a/include/connectivity/CommonTools.hxx
+++ b/include/connectivity/CommonTools.hxx
@@ -53,11 +53,6 @@ namespace connectivity
{
return match(rWild.getStr(), rStr.getStr(), cEscape);
}
- //------------------------------------------------------------------------------
- OOO_DLLPUBLIC_DBTOOLS OUString toDateString(const ::com::sun::star::util::Date& rDate);
- OOO_DLLPUBLIC_DBTOOLS OUString toTimeString(const ::com::sun::star::util::Time& rTime);
- OOO_DLLPUBLIC_DBTOOLS OUString toDateTimeString(const ::com::sun::star::util::DateTime& rDateTime);
-
// typedefs
typedef std::vector< ::com::sun::star::uno::WeakReferenceHelper > OWeakRefArray;
typedef ::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XColumnsSupplier> OSQLTable;
More information about the Libreoffice-commits
mailing list