summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-09-19 11:41:17 +0200
committerStephan Bergmann <sbergman@redhat.com>2014-09-19 11:42:42 +0200
commitb3f6639495cfee011d6d6b4f7e62ba1d3c9e1136 (patch)
treed578dc833a74ef25f5f4d61efbbeb3db89945410
parent7797127f00cee6f4fffd53c99856decd126a8718 (diff)
Better -Werror,-Wunused-function workaround
...superseding 9de4f3b3fd7843f27ea69788b6e37c5022ac2ad3 "-Werror,-Wunused-function, plus additional clean-up and fixes." Change-Id: I014ca289601a8195fb297ce335b3a52993284e8f
-rw-r--r--connectivity/Library_odbc.mk1
-rw-r--r--connectivity/source/drivers/odbc/OTools.cxx23
2 files changed, 3 insertions, 21 deletions
diff --git a/connectivity/Library_odbc.mk b/connectivity/Library_odbc.mk
index 181114ad3be5..8ff5fd0daaed 100644
--- a/connectivity/Library_odbc.mk
+++ b/connectivity/Library_odbc.mk
@@ -45,6 +45,7 @@ $(eval $(call gb_Library_use_libraries,odbc,\
))
$(eval $(call gb_Library_add_exception_objects,odbc,\
+ connectivity/source/drivers/odbc/appendsqlwchars \
connectivity/source/drivers/odbc/oservices \
connectivity/source/drivers/odbc/ORealDriver \
connectivity/source/drivers/odbc/OFunctions \
diff --git a/connectivity/source/drivers/odbc/OTools.cxx b/connectivity/source/drivers/odbc/OTools.cxx
index 8b459de1bdd4..13a14104d232 100644
--- a/connectivity/source/drivers/odbc/OTools.cxx
+++ b/connectivity/source/drivers/odbc/OTools.cxx
@@ -26,6 +26,7 @@
#include <rtl/ustrbuf.hxx>
#include <boost/static_assert.hpp>
+#include <appendsqlwchars.hxx>
#include <string.h>
#include <string>
@@ -399,26 +400,6 @@ Sequence<sal_Int8> OTools::getBytesValue(const OConnection* _pConnection,
return aData;
}
-namespace
-{
-// Approximation of "#if sizeof (SQLWCHAR) == 4 && sizeof (wchar_t) == 4":
-#if defined SQL_WCHART_CONVERT && defined SAL_UNICODE_NOTEQUAL_WCHAR_T
- BOOST_STATIC_ASSERT(sizeof (wchar_t) == 4);
- void append(OUStringBuffer & s, wchar_t* d, sal_Int32 n)
- {
- for (sal_Int32 i = 0; i < n; ++i)
- {
- s.appendUtf32(d[i]);
- }
- }
-#else
- void append(OUStringBuffer & s, sal_Unicode* d, sal_Int32 n)
- {
- s.append(d, n);
- }
-#endif
-}
-
OUString OTools::getStringValue(OConnection* _pConnection,
SQLHANDLE _aStatementHandle,
sal_Int32 columnIndex,
@@ -477,7 +458,7 @@ OUString OTools::getStringValue(OConnection* _pConnection,
nReadChars = pcbValue/sizeof(SQLWCHAR);
}
- append(aData, waCharArray, nReadChars);
+ appendSQLWCHARs(aData, waCharArray, nReadChars);
}
break;
}