summaryrefslogtreecommitdiff
path: root/dbaccess
diff options
context:
space:
mode:
authorAndrzej J.R. Hunt <andrzej@ahunt.org>2013-09-11 21:40:41 +0100
committerFridrich Strba <fridrich@documentfoundation.org>2013-09-12 17:26:12 +0000
commit42165189826367937737861116e969a22e9db787 (patch)
tree69d8ec60869aee5981ecc4e5edbc1e3a89a625d7 /dbaccess
parenta042cdd7eff15ed5f6cbd613588b3fca9509a85e (diff)
Update implementations of ColumnLocate::findColumn to throw on invalid column.
Change-Id: I7a9354ecd35a70a005c6c50e38d27de9b33332bd Reviewed-on: https://gerrit.libreoffice.org/5922 Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org> Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
Diffstat (limited to 'dbaccess')
-rw-r--r--dbaccess/source/ui/browser/formadapter.cxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/dbaccess/source/ui/browser/formadapter.cxx b/dbaccess/source/ui/browser/formadapter.cxx
index cb8a74a4c8cd..befc96c4c60b 100644
--- a/dbaccess/source/ui/browser/formadapter.cxx
+++ b/dbaccess/source/ui/browser/formadapter.cxx
@@ -25,6 +25,7 @@
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include "dbu_brw.hrc"
#include "dbustrings.hrc"
+#include <connectivity/dbexception.hxx>
#include <cppuhelper/typeprovider.hxx>
#include <comphelper/sequence.hxx>
@@ -231,7 +232,10 @@ sal_Int32 SAL_CALL SbaXFormAdapter::findColumn(const OUString& columnName) throw
Reference< ::com::sun::star::sdbc::XColumnLocate > xIface(m_xMainForm, UNO_QUERY);
if (xIface.is())
return xIface->findColumn(columnName);
- return 0;
+
+ ::dbtools::throwInvalidColumnException( columnName, *this );
+ assert(false);
+ return 0; // Never reached
}
// ::com::sun::star::sdbcx::XColumnsSupplier