diff options
author | Noel Grandin <noel@peralex.com> | 2013-10-25 17:35:42 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-11-04 10:11:08 +0200 |
commit | 5285beeaa49f6678b471d472868c305c7d9da5f9 (patch) | |
tree | a3dbd28995142ab16b448f28e95821115ef5408f /dbaccess | |
parent | aeb41c9b9b7559c6d87bf92807acdc0df9e104cc (diff) |
remove redundant calls to OUString constructor in if expression
Convert code like:
if( aStr == OUString("xxxx") )
to this:
if( aStr == "xxxx" )
Change-Id: I8d201f048477731eff590fb988259ef0935c080c
Diffstat (limited to 'dbaccess')
5 files changed, 7 insertions, 7 deletions
diff --git a/dbaccess/source/core/api/viewcontainer.cxx b/dbaccess/source/core/api/viewcontainer.cxx index 9e66780750cc..23af3b0b31e9 100644 --- a/dbaccess/source/core/api/viewcontainer.cxx +++ b/dbaccess/source/core/api/viewcontainer.cxx @@ -217,7 +217,7 @@ void SAL_CALL OViewContainer::elementInserted( const ContainerEvent& Event ) thr Reference<XPropertySet> xProp(Event.Element,UNO_QUERY); OUString sType; xProp->getPropertyValue(PROPERTY_TYPE) >>= sType; - if ( sType == OUString("VIEW") ) + if ( sType == "VIEW" ) insertElement(sName,createObject(sName)); } } diff --git a/dbaccess/source/ui/browser/sbagrid.cxx b/dbaccess/source/ui/browser/sbagrid.cxx index 8543942cfed9..31d990b6425c 100644 --- a/dbaccess/source/ui/browser/sbagrid.cxx +++ b/dbaccess/source/ui/browser/sbagrid.cxx @@ -446,17 +446,17 @@ void SAL_CALL SbaXGridPeer::dispatch(const URL& aURL, const Sequence< PropertyVa const PropertyValue* pArgs = aArgs.getConstArray(); for (sal_uInt16 i=0; i<aArgs.getLength(); ++i, ++pArgs) { - if (pArgs->Name == OUString("ColumnViewPos")) + if (pArgs->Name == "ColumnViewPos") { nColId = pGrid->GetColumnIdFromViewPos(::comphelper::getINT16(pArgs->Value)); break; } - if (pArgs->Name == OUString("ColumnModelPos")) + if (pArgs->Name == "ColumnModelPos") { nColId = pGrid->GetColumnIdFromModelPos(::comphelper::getINT16(pArgs->Value)); break; } - if (pArgs->Name == OUString("ColumnId")) + if (pArgs->Name == "ColumnId") { nColId = ::comphelper::getINT16(pArgs->Value); break; diff --git a/dbaccess/source/ui/relationdesign/RTableConnectionData.cxx b/dbaccess/source/ui/relationdesign/RTableConnectionData.cxx index 709500697923..fce8d4afe2db 100644 --- a/dbaccess/source/ui/relationdesign/RTableConnectionData.cxx +++ b/dbaccess/source/ui/relationdesign/RTableConnectionData.cxx @@ -341,7 +341,7 @@ xKey.clear(); xKey->getPropertyValue(PROPERTY_TYPE) >>= nType; OUString sReferencedTable; xKey->getPropertyValue(PROPERTY_REFERENCEDTABLE) >>= sReferencedTable; - if ( sReferencedTable == OUString(getReferencedTable()->GetTableName()) ) + if ( sReferencedTable == getReferencedTable()->GetTableName() ) { xColSup.set(xKey,UNO_QUERY_THROW); try diff --git a/dbaccess/source/ui/tabledesign/TEditControl.cxx b/dbaccess/source/ui/tabledesign/TEditControl.cxx index 218692c963d2..0e6822da4d25 100644 --- a/dbaccess/source/ui/tabledesign/TEditControl.cxx +++ b/dbaccess/source/ui/tabledesign/TEditControl.cxx @@ -348,7 +348,7 @@ CellController* OTableEditorCtrl::GetController(long nRow, sal_uInt16 nColumnId) Reference<XPropertySet> xTable = GetView()->getController().getTable(); if (IsReadOnly() || ( xTable.is() && xTable->getPropertySetInfo()->hasPropertyByName(PROPERTY_TYPE) && - ::comphelper::getString(xTable->getPropertyValue(PROPERTY_TYPE)) == OUString("VIEW"))) + ::comphelper::getString(xTable->getPropertyValue(PROPERTY_TYPE)) == "VIEW")) return NULL; // If the row is ReadOnly, editing is forbidden diff --git a/dbaccess/source/ui/tabledesign/TableFieldControl.cxx b/dbaccess/source/ui/tabledesign/TableFieldControl.cxx index e7aa7aa67957..86726ba3867c 100644 --- a/dbaccess/source/ui/tabledesign/TableFieldControl.cxx +++ b/dbaccess/source/ui/tabledesign/TableFieldControl.cxx @@ -58,7 +58,7 @@ sal_Bool OTableFieldControl::IsReadOnly() { // The columns of a ::com::sun::star::sdbcx::View could not be locked Reference<XPropertySet> xTable = GetCtrl()->GetView()->getController().getTable(); - if(xTable.is() && ::comphelper::getString(xTable->getPropertyValue(PROPERTY_TYPE)) == OUString("VIEW")) + if(xTable.is() && ::comphelper::getString(xTable->getPropertyValue(PROPERTY_TYPE)) == "VIEW") bRead = sal_True; else { |