diff options
Diffstat (limited to 'dbaccess/source/ui/dlg/tablespage.cxx')
-rw-r--r-- | dbaccess/source/ui/dlg/tablespage.cxx | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/dbaccess/source/ui/dlg/tablespage.cxx b/dbaccess/source/ui/dlg/tablespage.cxx index 2fa719517a91..5b956558d15f 100644 --- a/dbaccess/source/ui/dlg/tablespage.cxx +++ b/dbaccess/source/ui/dlg/tablespage.cxx @@ -32,7 +32,7 @@ #include <UITools.hxx> #include <osl/diagnose.h> #include <TablesSingleDlg.hxx> -#include <tools/diagnose_ex.h> +#include <comphelper/diagnose_ex.hxx> #include <cppuhelper/exc_hlp.hxx> namespace dbaui @@ -40,11 +40,8 @@ namespace dbaui using namespace ::com::sun::star::uno; using namespace ::com::sun::star::sdbc; - using namespace ::com::sun::star::sdbcx; - using namespace ::com::sun::star::sdb; using namespace ::com::sun::star::beans; using namespace ::com::sun::star::lang; - using namespace ::com::sun::star::container; using namespace ::com::sun::star::util; using namespace ::dbtools; using namespace ::comphelper; @@ -55,7 +52,7 @@ namespace dbaui , m_bCatalogAtStart(true) , m_pTablesDlg(pTablesDlg) , m_xTables(m_xBuilder->weld_widget("TablesFilterPage")) - , m_xTablesList(new TableTreeListBox(m_xBuilder->weld_tree_view("treeview"))) + , m_xTablesList(new OTableTreeListBox(m_xBuilder->weld_tree_view("treeview"), true)) { m_xTablesList->init(); @@ -105,7 +102,7 @@ namespace dbaui for (const OUString& rIncludeTable : _rTables) { if (xMeta.is()) - qualifiedNameComponents(xMeta, rIncludeTable.getStr(), sCatalog, sSchema, sName,::dbtools::EComposeRule::InDataManipulation); + qualifiedNameComponents(xMeta, rIncludeTable, sCatalog, sSchema, sName,::dbtools::EComposeRule::InDataManipulation); else sName = rIncludeTable; @@ -205,9 +202,9 @@ namespace dbaui bool bModified = ( xModi.is() && xModi->isModified() ); Sequence< OUString > aNewTableFilter { "%" }; - xProp->setPropertyValue(PROPERTY_TABLEFILTER,makeAny(aNewTableFilter)); + xProp->setPropertyValue(PROPERTY_TABLEFILTER,Any(aNewTableFilter)); - xProp->setPropertyValue( PROPERTY_TABLETYPEFILTER, makeAny( Sequence< OUString >() ) ); + xProp->setPropertyValue( PROPERTY_TABLETYPEFILTER, Any( Sequence< OUString >() ) ); Reference< css::lang::XEventListener> xEvt; aErrorInfo = ::dbaui::createConnection(xProp, m_xORB, xEvt, m_xCurrentConnection); @@ -335,7 +332,7 @@ namespace dbaui Sequence< OUString > OTableSubscriptionPage::collectDetailedSelection() const { Sequence< OUString > aTableFilter; - static const char sWildcard[] = "%"; + constexpr OUString sWildcard = u"%"_ustr; std::unique_ptr<weld::TreeIter> xAllObjectsEntry(m_xTablesList->getAllObjectsEntry()); if (!xAllObjectsEntry) @@ -381,7 +378,7 @@ namespace dbaui bCatalogWildcard = m_xTablesList->isWildcardChecked(*xCatalog); if (m_bCatalogAtStart) { - sComposedName.append(m_xTablesList->GetWidget().get_text(*xCatalog)).append(m_sCatalogSeparator); + sComposedName.append(m_xTablesList->GetWidget().get_text(*xCatalog) + m_sCatalogSeparator); if (bCatalogWildcard) sComposedName.append(sWildcard); } @@ -396,7 +393,7 @@ namespace dbaui } } bSchemaWildcard = m_xTablesList->isWildcardChecked(*xSchema); - sComposedName.append(m_xTablesList->GetWidget().get_text(*xSchema)).append("."); + sComposedName.append(m_xTablesList->GetWidget().get_text(*xSchema) + "."); } if (bSchemaWildcard) @@ -412,7 +409,7 @@ namespace dbaui sal_Int32 nOldLen = aTableFilter.getLength(); aTableFilter.realloc(nOldLen + 1); // add the new name - aTableFilter[nOldLen] = sComposedName.makeStringAndClear(); + aTableFilter.getArray()[nOldLen] = sComposedName.makeStringAndClear(); } if (bCatalogWildcard) @@ -463,8 +460,7 @@ namespace dbaui auto xRoot = m_xTablesList->getAllObjectsEntry(); if (xRoot && m_xTablesList->isWildcardChecked(*xRoot)) { - aTableFilter.realloc(1); - aTableFilter[0] = "%"; + aTableFilter = { "%" }; } else { |