summaryrefslogtreecommitdiff
path: root/dbaccess/source/ui/misc
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-06-07 13:03:58 +0200
committerMike Kaganski <mike.kaganski@collabora.com>2018-06-08 01:29:32 +0200
commit5708534b942c1d0ce384f6a8473da6bb569410e7 (patch)
tree2ec4fe87624541c15bf89c8b839e8f8dba8a89f4 /dbaccess/source/ui/misc
parent1e55a47e89a9d9d6cf9cb3993484022aaf2c097b (diff)
look for unnecessary calls to Reference::is() after an UNO_QUERY_THROW
Since the previous call would throw if there was nothing to be assigned to the value. Idea from tml. Used the following script to find places: git grep -A3 -n UNO_QUERY_THROW | grep -B3 -F 'is()' Change-Id: I36ba7b00bcd014bdf16c0455ab91056f82194969 Reviewed-on: https://gerrit.libreoffice.org/55417 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tor Lillqvist <tml@collabora.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'dbaccess/source/ui/misc')
-rw-r--r--dbaccess/source/ui/misc/databaseobjectview.cxx13
1 files changed, 3 insertions, 10 deletions
diff --git a/dbaccess/source/ui/misc/databaseobjectview.cxx b/dbaccess/source/ui/misc/databaseobjectview.cxx
index 676b26cbf92f..e68f17ffd3ca 100644
--- a/dbaccess/source/ui/misc/databaseobjectview.cxx
+++ b/dbaccess/source/ui/misc/databaseobjectview.cxx
@@ -232,16 +232,9 @@ namespace dbaui
// try whether the designer is a dialog
Reference< XExecutableDialog > xDialog( xDesigner, UNO_QUERY_THROW );
- if ( xDialog.is() )
- {
- try { AsyncDialogExecutor::executeModalDialogAsync( xDialog ); }
- catch( const Exception& ) { DBG_UNHANDLED_EXCEPTION("dbaccess"); }
- return nullptr;
- }
-
- Reference< XComponent > xDesignerComponent( xDesigner, UNO_QUERY );
- OSL_ENSURE( xDesignerComponent.is(), "TableDesigner::doCreateView: a designer which is no dialog and no component?" );
- return xDesignerComponent;
+ try { AsyncDialogExecutor::executeModalDialogAsync( xDialog ); }
+ catch( const Exception& ) { DBG_UNHANDLED_EXCEPTION("dbaccess"); }
+ return nullptr;
}
Reference< XInterface > TableDesigner::impl_getConnectionProvidedDesigner_nothrow( const OUString& _rTableName )