diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-07-28 11:28:52 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-07-28 17:22:52 +0200 |
commit | d407304544cdb2edc3cbdb4e56d49f3ceda79c38 (patch) | |
tree | 765668628540687b669d67b14d824adb893c1308 /dbaccess/source/ui/dlg/tablespage.cxx | |
parent | fa87224130a4ab6c4b79f993cc990adc4be0465b (diff) |
loplugin:stringloop cui,dbaccess
Change-Id: I32b63d2435d36b869823ea022ebd7f8347a46ea0
Reviewed-on: https://gerrit.libreoffice.org/58211
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'dbaccess/source/ui/dlg/tablespage.cxx')
-rw-r--r-- | dbaccess/source/ui/dlg/tablespage.cxx | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/dbaccess/source/ui/dlg/tablespage.cxx b/dbaccess/source/ui/dlg/tablespage.cxx index 431db3828481..ac348069c0e5 100644 --- a/dbaccess/source/ui/dlg/tablespage.cxx +++ b/dbaccess/source/ui/dlg/tablespage.cxx @@ -437,7 +437,6 @@ namespace dbaui Sequence< OUString > aTableFilter; static const char sWildcard[] = "%"; - OUString sComposedName; const SvTreeListEntry* pAllObjectsEntry = m_pTablesList->getAllObjectsEntry(); if (!pAllObjectsEntry) return aTableFilter; @@ -451,6 +450,7 @@ namespace dbaui if (m_pTablesList->GetCheckButtonState(pEntry) == SvButtonState::Checked && !m_pTablesList->GetModel()->HasChildren(pEntry)) { // checked and a leaf, which means it's no catalog, no schema, but a real table + OUStringBuffer sComposedName; OUString sCatalog; if(m_pTablesList->GetModel()->HasParent(pEntry)) { @@ -473,9 +473,9 @@ namespace dbaui bCatalogWildcard = OTableTreeListBox::isWildcardChecked(pCatalog); if (m_bCatalogAtStart) { - sComposedName += m_pTablesList->GetEntryText( pCatalog ) + m_sCatalogSeparator; + sComposedName.append(m_pTablesList->GetEntryText( pCatalog )).append(m_sCatalogSeparator); if (bCatalogWildcard) - sComposedName += sWildcard; + sComposedName.append(sWildcard); } else { @@ -488,26 +488,23 @@ namespace dbaui } } bSchemaWildcard = OTableTreeListBox::isWildcardChecked(pSchema); - sComposedName += m_pTablesList->GetEntryText( pSchema ) + "."; + sComposedName.append(m_pTablesList->GetEntryText( pSchema )).append("."); } if (bSchemaWildcard) - sComposedName += sWildcard; + sComposedName.append(sWildcard); } if (!bSchemaWildcard && !bCatalogWildcard) - sComposedName += m_pTablesList->GetEntryText( pEntry ); + sComposedName.append(m_pTablesList->GetEntryText( pEntry )); if (!m_bCatalogAtStart && !bCatalogWildcard) - sComposedName += sCatalog; + sComposedName.append(sCatalog); // need some space sal_Int32 nOldLen = aTableFilter.getLength(); aTableFilter.realloc(nOldLen + 1); // add the new name - aTableFilter[nOldLen] = sComposedName; - - // reset the composed name - sComposedName.clear(); + aTableFilter[nOldLen] = sComposedName.makeStringAndClear(); } if (bCatalogWildcard) |