diff options
4 files changed, 38 insertions, 10 deletions
diff --git a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx index c3c99f948c88..fbc803101a61 100644 --- a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx +++ b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx @@ -425,13 +425,13 @@ Sequence< Sequence< PropertyValue > > SAL_CALL OSingleSelectQueryComposer::getSt return getStructuredCondition(F_tmp); } -void SAL_CALL OSingleSelectQueryComposer::appendHavingClauseByColumn( const Reference< XPropertySet >& column, sal_Bool andCriteria,sal_Int32 filterOperator ) throw (SQLException, RuntimeException, std::exception) +void SAL_CALL OSingleSelectQueryComposer::appendHavingClauseByColumn( const Reference< XPropertySet >& column, sal_Bool andCriteria,sal_Int32 filterOperator ) throw (SQLException, WrappedTargetException, RuntimeException, std::exception) { ::std::mem_fun1_t<bool,OSingleSelectQueryComposer,const OUString&> F_tmp(&OSingleSelectQueryComposer::implSetHavingClause); setConditionByColumn(column,andCriteria,F_tmp,filterOperator); } -void SAL_CALL OSingleSelectQueryComposer::appendFilterByColumn( const Reference< XPropertySet >& column, sal_Bool andCriteria,sal_Int32 filterOperator ) throw(SQLException, RuntimeException, std::exception) +void SAL_CALL OSingleSelectQueryComposer::appendFilterByColumn( const Reference< XPropertySet >& column, sal_Bool andCriteria,sal_Int32 filterOperator ) throw(SQLException, WrappedTargetException, RuntimeException, std::exception) { ::std::mem_fun1_t<bool,OSingleSelectQueryComposer,const OUString&> F_tmp(&OSingleSelectQueryComposer::implSetFilter); setConditionByColumn(column,andCriteria,F_tmp,filterOperator); diff --git a/dbaccess/source/core/inc/SingleSelectQueryComposer.hxx b/dbaccess/source/core/inc/SingleSelectQueryComposer.hxx index d17199a84e96..f9d1d68afdd8 100644 --- a/dbaccess/source/core/inc/SingleSelectQueryComposer.hxx +++ b/dbaccess/source/core/inc/SingleSelectQueryComposer.hxx @@ -227,12 +227,12 @@ namespace dbaccess virtual void SAL_CALL setElementaryQuery( const OUString& _rElementary ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual void SAL_CALL setFilter( const OUString& filter ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual void SAL_CALL setStructuredFilter( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > >& filter ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; - virtual void SAL_CALL appendFilterByColumn( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& column, sal_Bool andCriteria,sal_Int32 filterOperator ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual void SAL_CALL appendFilterByColumn( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& column, sal_Bool andCriteria,sal_Int32 filterOperator ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual void SAL_CALL appendGroupByColumn( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& column ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual void SAL_CALL setGroup( const OUString& group ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual void SAL_CALL setHavingClause( const OUString& filter ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual void SAL_CALL setStructuredHavingClause( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > >& filter ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; - virtual void SAL_CALL appendHavingClauseByColumn( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& column, sal_Bool andCriteria,sal_Int32 filterOperator ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual void SAL_CALL appendHavingClauseByColumn( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& column, sal_Bool andCriteria,sal_Int32 filterOperator ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual void SAL_CALL appendOrderByColumn( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& column, sal_Bool ascending ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual void SAL_CALL setOrder( const OUString& order ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; diff --git a/offapi/com/sun/star/sdb/XSingleSelectQueryComposer.idl b/offapi/com/sun/star/sdb/XSingleSelectQueryComposer.idl index bfe62e56828d..5af91b6b5097 100644 --- a/offapi/com/sun/star/sdb/XSingleSelectQueryComposer.idl +++ b/offapi/com/sun/star/sdb/XSingleSelectQueryComposer.idl @@ -20,11 +20,9 @@ #define __com_sun_star_sdb_XSingleSelectQueryComposer_idl__ #include <com/sun/star/beans/XPropertySet.idl> - #include <com/sun/star/beans/PropertyValue.idl> - +#include <com/sun/star/lang/WrappedTargetException.idl> #include <com/sun/star/sdbc/SQLException.idl> - #include <com/sun/star/sdb/XSingleSelectQueryAnalyzer.idl> @@ -84,7 +82,7 @@ interface XSingleSelectQueryComposer: XSingleSelectQueryAnalyzer if a database access error occurs. */ void appendFilterByColumn([in] com::sun::star::beans::XPropertySet column,[in] boolean andCriteria,[in] long filterOperator) - raises (com::sun::star::sdbc::SQLException); + raises (com::sun::star::sdbc::SQLException, com::sun::star::lang::WrappedTargetException); // GROUP BY @@ -153,7 +151,7 @@ interface XSingleSelectQueryComposer: XSingleSelectQueryAnalyzer if a database access error occurs. */ void appendHavingClauseByColumn([in] com::sun::star::beans::XPropertySet column,[in] boolean andCriteria,[in] long filterOperator) - raises (com::sun::star::sdbc::SQLException); + raises (com::sun::star::sdbc::SQLException, com::sun::star::lang::WrappedTargetException); // ORDER BY diff --git a/qadevOOo/tests/java/ifc/sdb/_XSingleSelectQueryComposer.java b/qadevOOo/tests/java/ifc/sdb/_XSingleSelectQueryComposer.java index b79c2f509efa..08c027760008 100644 --- a/qadevOOo/tests/java/ifc/sdb/_XSingleSelectQueryComposer.java +++ b/qadevOOo/tests/java/ifc/sdb/_XSingleSelectQueryComposer.java @@ -198,6 +198,11 @@ public class _XSingleSelectQueryComposer extends MultiMethodTest { log.println("unexpected Exception: " + e.toString()); tRes.tested("appendFilterByColumn()", false); } + catch (com.sun.star.lang.WrappedTargetException e) + { + log.println("unexpected Exception: " + e.toString()); + tRes.tested("appendFilterByColumn()", false); + } try { @@ -218,6 +223,11 @@ public class _XSingleSelectQueryComposer extends MultiMethodTest { log.println("unexpected Exception: " + e.toString()); tRes.tested("appendFilterByColumn()", false); } + catch (com.sun.star.lang.WrappedTargetException e) + { + log.println("unexpected Exception: " + e.toString()); + tRes.tested("appendFilterByColumn()", false); + } try{ @@ -228,6 +238,10 @@ public class _XSingleSelectQueryComposer extends MultiMethodTest { } catch (SQLException e){ log.println("unexpected Exception: " + e.toString()); tRes.tested("appendFilterByColumn()", false); + } catch (com.sun.star.lang.WrappedTargetException e) + { + log.println("unexpected Exception: " + e.toString()); + tRes.tested("appendFilterByColumn()", false); } try{ @@ -239,7 +253,12 @@ public class _XSingleSelectQueryComposer extends MultiMethodTest { } catch (SQLException e){ log.println("expected Exception"); ok = ok && true; + } catch (com.sun.star.lang.WrappedTargetException e) + { + log.println("unexpected Exception: " + e.toString()); + tRes.tested("appendFilterByColumn()", false); } + try { xReSet.beforeFirst(); @@ -391,6 +410,10 @@ public class _XSingleSelectQueryComposer extends MultiMethodTest { { log.println("unexpected Exception: " + e.toString()); tRes.tested("appendHavingClauseByColumn()", false); + } catch (com.sun.star.lang.WrappedTargetException e) + { + log.println("unexpected Exception: " + e.toString()); + tRes.tested("appendHavingClauseByColumn()", false); } try @@ -411,9 +434,12 @@ public class _XSingleSelectQueryComposer extends MultiMethodTest { } catch (SQLException e){ log.println("unexpected Exception: " + e.toString()); tRes.tested("appendHavingClauseByColumn()", false); + } catch (com.sun.star.lang.WrappedTargetException e) + { + log.println("unexpected Exception: " + e.toString()); + tRes.tested("appendHavingClauseByColumn()", false); } - try{ XPropertySet dummy = null; oObj.appendHavingClauseByColumn(dummy, true,SQLFilterOperator.EQUAL); @@ -423,6 +449,10 @@ public class _XSingleSelectQueryComposer extends MultiMethodTest { } catch (SQLException e){ log.println("expected Exception"); ok = ok && true; + } catch (com.sun.star.lang.WrappedTargetException e) + { + log.println("unexpected Exception: " + e.toString()); + tRes.tested("appendHavingClauseByColumn()", false); } // cleanup |