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

Lionel Elie Mamane lionel at mamane.lu
Thu Aug 7 02:35:15 PDT 2014


 dbaccess/source/core/api/CRowSetDataColumn.cxx |   17 ++++++++++++-----
 1 file changed, 12 insertions(+), 5 deletions(-)

New commits:
commit 5be4407d0716f78acdcdf24de135af91f17e51be
Author: Lionel Elie Mamane <lionel at mamane.lu>
Date:   Thu Aug 7 11:16:18 2014 +0200

    fdo#82151 fixup
    
    The dbaccess unoapi test calls
    css::sdb::XSingleSelectQueryComposer::appendFilterByColumn
    in a state where there is no current row, and thus no column value.
    This does not make sense, but let's not break the build while I
    figure out how to fix the unoapi test.
    
    Change-Id: If813a1544ec9a5dac6f87197982d10576c91cd8c

diff --git a/dbaccess/source/core/api/CRowSetDataColumn.cxx b/dbaccess/source/core/api/CRowSetDataColumn.cxx
index 50ff4ad..e367828 100644
--- a/dbaccess/source/core/api/CRowSetDataColumn.cxx
+++ b/dbaccess/source/core/api/CRowSetDataColumn.cxx
@@ -25,6 +25,7 @@
 #include <cppuhelper/exc_hlp.hxx>
 #include <cppuhelper/typeprovider.hxx>
 #include <com/sun/star/beans/PropertyAttribute.hpp>
+#include <com/sun/star/lang/WrappedTargetRuntimeException.hpp>
 #include <tools/debug.hxx>
 
 using namespace dbaccess;
@@ -110,12 +111,18 @@ void SAL_CALL ORowSetDataColumn::getFastPropertyValue( Any& rValue, sal_Int32 nH
         {
             rValue = m_pGetValue(m_nPos).makeAny();
         }
-        catch (css::sdbc::SQLException & e)
+        catch(const SQLException &e)
         {
-            css::uno::Any a(cppu::getCaughtException());
-            throw css::lang::WrappedTargetException(
-                "wrapped css::sdbc::SQLException: " + e.Message,
-                css::uno::Reference<css::uno::XInterface>(), a);
+            // TODO: doing nothing matches the previous behaviour,
+            //       (and keeps dbaccess unoapi test working...)
+            //       but should be investigated... If the value could not be
+            //       fetched, that's a different result than "value is null",
+            //       which corresponds to an empty Any.
+            //throw WrappedTargetRuntimeException("Could not retrieve column value", *const_cast<ORowSetDataColumn*>(this), Any(e));
+            // css::uno::Any a(cppu::getCaughtException());
+            // throw css::lang::WrappedTargetException(
+            //     "wrapped css::sdbc::SQLException: " + e.Message,
+            //     css::uno::Reference<css::uno::XInterface>(), a);
         }
     }
     else if ( PROPERTY_ID_LABEL == nHandle && !m_sLabel.isEmpty() )


More information about the Libreoffice-commits mailing list