Kaydet (Commit) b3f66394 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Better -Werror,-Wunused-function workaround

...superseding 9de4f3b3
"-Werror,-Wunused-function, plus additional clean-up and fixes."

Change-Id: I014ca289601a8195fb297ce335b3a52993284e8f
üst 7797127f
......@@ -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 \
......
......@@ -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;
}
......
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