connectivity/Library_odbc.mk                |    1 +
 connectivity/source/drivers/odbc/OTools.cxx |   23 ++---------------------
 2 files changed, 3 insertions(+), 21 deletions(-)

New commits:
commit b3f6639495cfee011d6d6b4f7e62ba1d3c9e1136
Author: Stephan Bergmann <sberg...@redhat.com>
Date:   Fri Sep 19 11:41:17 2014 +0200

    Better -Werror,-Wunused-function workaround
    
    ...superseding 9de4f3b3fd7843f27ea69788b6e37c5022ac2ad3
    "-Werror,-Wunused-function, plus additional clean-up and fixes."
    
    Change-Id: I014ca289601a8195fb297ce335b3a52993284e8f

diff --git a/connectivity/Library_odbc.mk b/connectivity/Library_odbc.mk
index 181114a..8ff5fd0 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 8b459de..13a1410 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;
     }
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to