[Libreoffice-commits] core.git: connectivity/source

Julien Nabet (via logerrit) logerrit at kemper.freedesktop.org
Sat Mar 14 20:18:05 UTC 2020


 connectivity/source/drivers/firebird/DatabaseMetaData.cxx |   15 ++------------
 1 file changed, 3 insertions(+), 12 deletions(-)

New commits:
commit 87c87b6f8a48bdbee49a50bea2aefa5b934a86f5
Author:     Julien Nabet <serval2412 at yahoo.fr>
AuthorDate: Sat Mar 14 17:59:21 2020 +0100
Commit:     Julien Nabet <serval2412 at yahoo.fr>
CommitDate: Sat Mar 14 21:17:30 2020 +0100

    Firebird: fix TODO use xClob instead of xBlob for REMARKS
    
    TODO added with:
    https://cgit.freedesktop.org/libreoffice/core/commit/?id=e6ae90b0723ed0cbf8c9c7dab65d235d0b78431a
    author  Andrzej J.R. Hunt <andrzej at ahunt.org>   2013-08-10 12:58:32 +0100
    committer       Andrzej J.R. Hunt <andrzej at ahunt.org>   2013-08-11 16:05:11 +0100
    commit  e6ae90b0723ed0cbf8c9c7dab65d235d0b78431a (patch)
    tree    b61ed29963dea3d6fd1c276ab6cc05a143e2058b
    parent  d12ddee812480595745b656113475468bddc4b1a (diff)
    Reduce verbosity of getTables. (firebird-sdbc)
    
    Change-Id: I14c46ab9d36bf40791004941684308011af81b61
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90494
    Tested-by: Jenkins
    Reviewed-by: Julien Nabet <serval2412 at yahoo.fr>

diff --git a/connectivity/source/drivers/firebird/DatabaseMetaData.cxx b/connectivity/source/drivers/firebird/DatabaseMetaData.cxx
index 32e397041d89..ec685086bb52 100644
--- a/connectivity/source/drivers/firebird/DatabaseMetaData.cxx
+++ b/connectivity/source/drivers/firebird/DatabaseMetaData.cxx
@@ -1407,20 +1407,11 @@ uno::Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTables(
         }
         // 5. REMARKS
         {
-            uno::Reference< XBlob > xBlob   = xRow->getBlob(4);
-            OUString sDescription;
-
-            if (xBlob.is())
+            uno::Reference< XClob > xClob = xRow->getClob(4);
+            if (xClob.is())
             {
-                // TODO: we should actually be using CLOB here instead.
-                // However we haven't implemented CLOB yet, so use BLOB.
-                sal_Int32 aBlobLength = static_cast<sal_Int32>(xBlob->length());
-                sDescription = OUString(reinterpret_cast<char*>(xBlob->getBytes(1, aBlobLength).getArray()),
-                                        aBlobLength,
-                                        RTL_TEXTENCODING_UTF8);
+                aCurrentRow[5] = new ORowSetValueDecorator(xClob->getSubString(0, xClob->length()));
             }
-
-            aCurrentRow[5] = new ORowSetValueDecorator(sDescription);
         }
 
         aResults.push_back(aCurrentRow);


More information about the Libreoffice-commits mailing list