diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2023-06-03 10:01:47 +0200 |
---|---|---|
committer | Lionel Mamane <lionel@mamane.lu> | 2023-06-03 11:46:15 +0200 |
commit | c50e4b25b2eb278685698182e2a4b541739f2d42 (patch) | |
tree | 10e3673d66a17d4c03398371a6427539542c2d68 /dbaccess/source/ui/misc | |
parent | 7a5847b3716ac64ad422f24164c0b765610ffbd7 (diff) |
Simplify a bit DatabaseObjectView::fillDispatchArgs
Change-Id: Ic6d4c80813286d6b5dbe33dc0289d0f0d9cedfc9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152569
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Reviewed-by: Lionel Mamane <lionel@mamane.lu>
Tested-by: Lionel Mamane <lionel@mamane.lu>
Diffstat (limited to 'dbaccess/source/ui/misc')
-rw-r--r-- | dbaccess/source/ui/misc/databaseobjectview.cxx | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/dbaccess/source/ui/misc/databaseobjectview.cxx b/dbaccess/source/ui/misc/databaseobjectview.cxx index f10921d6fdb6..e84f36e7f58f 100644 --- a/dbaccess/source/ui/misc/databaseobjectview.cxx +++ b/dbaccess/source/ui/misc/databaseobjectview.cxx @@ -253,22 +253,22 @@ namespace dbaui { DatabaseObjectView::fillDispatchArgs( i_rDispatchArgs, _aDataSource, _rQualifiedName ); OSL_ENSURE( !_rQualifiedName.isEmpty(),"A Table name must be set"); - OUString sCatalog; - OUString sSchema; - OUString sTable; - if ( m_bTable ) - ::dbtools::qualifiedNameComponents( getConnection()->getMetaData(), _rQualifiedName, sCatalog, sSchema, sTable, ::dbtools::EComposeRule::InDataManipulation ); - - i_rDispatchArgs.put( PROPERTY_COMMAND_TYPE, (m_bTable ? CommandType::TABLE : CommandType::QUERY) ); i_rDispatchArgs.put( PROPERTY_COMMAND, _rQualifiedName ); i_rDispatchArgs.put( PROPERTY_ENABLE_BROWSER, false ); if ( m_bTable ) { + OUString sCatalog; + OUString sSchema; + OUString sTable; + ::dbtools::qualifiedNameComponents( getConnection()->getMetaData(), _rQualifiedName, sCatalog, sSchema, sTable, ::dbtools::EComposeRule::InDataManipulation ); i_rDispatchArgs.put( PROPERTY_UPDATE_CATALOGNAME, sCatalog ); i_rDispatchArgs.put( PROPERTY_UPDATE_SCHEMANAME, sSchema ); i_rDispatchArgs.put( PROPERTY_UPDATE_TABLENAME, sTable ); + i_rDispatchArgs.put( PROPERTY_COMMAND_TYPE, CommandType::TABLE ); } + else + i_rDispatchArgs.put( PROPERTY_COMMAND_TYPE, CommandType::QUERY ); } // RelationDesigner |