summaryrefslogtreecommitdiff
path: root/dbaccess/source
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2016-04-21 09:42:57 +0200
committerStephan Bergmann <sbergman@redhat.com>2016-04-21 10:00:35 +0200
commit2ee765872f07f1cb0e2c99f22b48808476089cf5 (patch)
tree14c81885fd047a1e11b3dcb11d34562f948ac110 /dbaccess/source
parent9b8feec33d95f10642ee013ae1310320feb62067 (diff)
aColumns is only used as a set
(cf. 40d6b81b9ee0a878d0dadb40941c50aa394a7501 "Replace map to sal_Bool with map to bool") Change-Id: I04bdd6c33793e277182fa80d187f212ab23c252e
Diffstat (limited to 'dbaccess/source')
-rw-r--r--dbaccess/source/ui/tabledesign/TableController.cxx19
1 files changed, 11 insertions, 8 deletions
diff --git a/dbaccess/source/ui/tabledesign/TableController.cxx b/dbaccess/source/ui/tabledesign/TableController.cxx
index 1f0f3d1a9797..a56e787f6ce6 100644
--- a/dbaccess/source/ui/tabledesign/TableController.cxx
+++ b/dbaccess/source/ui/tabledesign/TableController.cxx
@@ -989,7 +989,10 @@ void OTableController::alterColumns()
// contains all columns names which are already handled those which are not in the list will be deleted
Reference< XDatabaseMetaData> xMetaData = getMetaData( );
- ::std::map< OUString,bool,::comphelper::UStringMixLess> aColumns(!xMetaData.is() || xMetaData->supportsMixedCaseQuotedIdentifiers());
+ std::set<OUString, comphelper::UStringMixLess> aColumns(
+ comphelper::UStringMixLess(
+ !xMetaData.is()
+ || xMetaData->supportsMixedCaseQuotedIdentifiers()));
::std::vector< std::shared_ptr<OTableRow> >::const_iterator aIter = m_vRowList.begin();
::std::vector< std::shared_ptr<OTableRow> >::const_iterator aEnd = m_vRowList.end();
// first look for columns where something other than the name changed
@@ -1002,14 +1005,14 @@ void OTableController::alterColumns()
continue;
if ( (*aIter)->IsReadOnly() )
{
- aColumns[pField->GetName()] = true;
+ aColumns.insert(pField->GetName());
continue;
}
Reference<XPropertySet> xColumn;
if ( xColumns->hasByName(pField->GetName()) )
{
- aColumns[pField->GetName()] = true;
+ aColumns.insert(pField->GetName());
xColumns->getByName(pField->GetName()) >>= xColumn;
OSL_ENSURE(xColumn.is(),"Column is null!");
@@ -1102,7 +1105,7 @@ void OTableController::alterColumns()
xAlter->alterColumnByIndex(nPos,xNewColumn);
if(xColumns->hasByName(pField->GetName()))
{ // ask for the append by name
- aColumns[pField->GetName()] = true;
+ aColumns.insert(pField->GetName());
xColumns->getByName(pField->GetName()) >>= xColumn;
if(xColumn.is())
pField->copyColumnSettingsTo(xColumn);
@@ -1125,8 +1128,8 @@ void OTableController::alterColumns()
Reference<XPropertySet> xNewColumn(xIdxColumns->getByIndex(nPos),UNO_QUERY_THROW);
OUString sName;
xNewColumn->getPropertyValue(PROPERTY_NAME) >>= sName;
- aColumns[sName] = true;
- aColumns[pField->GetName()] = true;
+ aColumns.insert(sName);
+ aColumns.insert(pField->GetName());
continue;
}
}
@@ -1149,7 +1152,7 @@ void OTableController::alterColumns()
continue;
if ( (*aIter)->IsReadOnly() )
{
- aColumns[pField->GetName()] = true;
+ aColumns.insert(pField->GetName());
continue;
}
@@ -1238,7 +1241,7 @@ void OTableController::alterColumns()
xAppend->appendByDescriptor(xColumn);
if(xColumns->hasByName(pField->GetName()))
{ // ask for the append by name
- aColumns[pField->GetName()] = true;
+ aColumns.insert(pField->GetName());
xColumns->getByName(pField->GetName()) >>= xColumn;
if(xColumn.is())
pField->copyColumnSettingsTo(xColumn);