diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2017-05-19 17:18:33 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2017-05-19 17:18:33 +0200 |
commit | 5de6294a94d2acd6b4cdf57c55dcbdbbf9e5e522 (patch) | |
tree | 3fdce48d1f136d17db0163e034ad10998605f416 /dbaccess | |
parent | d2846c46624d3996b98a3810b083452f49400cb4 (diff) |
loplugin:stringcopy: dbaccess
Change-Id: I7d9c876a57b4390d1f5d86ae4d9a3f703c56f0c8
Diffstat (limited to 'dbaccess')
-rw-r--r-- | dbaccess/source/ui/browser/unodatbr.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/control/FieldDescControl.cxx | 4 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/DbAdminImpl.cxx | 6 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/UserAdmin.cxx | 4 | ||||
-rw-r--r-- | dbaccess/source/ui/misc/WTypeSelect.cxx | 4 | ||||
-rw-r--r-- | dbaccess/source/ui/misc/indexcollection.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/querydesign/QTableWindow.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx | 6 | ||||
-rw-r--r-- | dbaccess/source/ui/relationdesign/RTableConnectionData.cxx | 2 |
9 files changed, 16 insertions, 16 deletions
diff --git a/dbaccess/source/ui/browser/unodatbr.cxx b/dbaccess/source/ui/browser/unodatbr.cxx index c57cea8ab205..46f0fd82c972 100644 --- a/dbaccess/source/ui/browser/unodatbr.cxx +++ b/dbaccess/source/ui/browser/unodatbr.cxx @@ -1114,7 +1114,7 @@ OUString SbaTableQueryBrowser::getDataSourceAccessor( SvTreeListEntry* _pDataSou DBTreeListUserData* pData = static_cast< DBTreeListUserData* >( _pDataSourceEntry->GetUserData() ); OSL_ENSURE( pData, "SbaTableQueryBrowser::getDataSourceAccessor: invalid entry data!" ); OSL_ENSURE( pData->eType == etDatasource, "SbaTableQueryBrowser::getDataSourceAccessor: entry does not denote a data source!" ); - return !pData->sAccessor.isEmpty() ? OUString(pData->sAccessor) : GetEntryText( _pDataSourceEntry ); + return !pData->sAccessor.isEmpty() ? pData->sAccessor : GetEntryText( _pDataSourceEntry ); } SvTreeListEntry* SbaTableQueryBrowser::getObjectEntry(const OUString& _rDataSource, const OUString& _rCommand, sal_Int32 _nCommandType, diff --git a/dbaccess/source/ui/control/FieldDescControl.cxx b/dbaccess/source/ui/control/FieldDescControl.cxx index 545d491c30fa..f8ef35fb9650 100644 --- a/dbaccess/source/ui/control/FieldDescControl.cxx +++ b/dbaccess/source/ui/control/FieldDescControl.cxx @@ -1302,7 +1302,7 @@ void OFieldDescControl::DisplayData(OFieldDescription* pFieldDescr ) else pBoolDefault->SelectEntry(sDef); - pFieldDescr->SetControlDefault(makeAny(OUString(BoolStringPersistent(pBoolDefault->GetSelectEntry())))); + pFieldDescr->SetControlDefault(makeAny(BoolStringPersistent(pBoolDefault->GetSelectEntry()))); } else if(pBoolDefault->GetEntryCount() < 3) { @@ -1346,7 +1346,7 @@ void OFieldDescControl::DisplayData(OFieldDescription* pFieldDescr ) if(m_pType) { - sal_Int32 nPos = pFieldType.get() ? m_pType->GetEntryPos(OUString(pFieldDescr->getTypeInfo()->aUIName)) : LISTBOX_ENTRY_NOTFOUND; + sal_Int32 nPos = pFieldType.get() ? m_pType->GetEntryPos(pFieldDescr->getTypeInfo()->aUIName) : LISTBOX_ENTRY_NOTFOUND; if(nPos == LISTBOX_ENTRY_NOTFOUND) { const OTypeInfoMap* pMap = getTypeInfo(); diff --git a/dbaccess/source/ui/dlg/DbAdminImpl.cxx b/dbaccess/source/ui/dlg/DbAdminImpl.cxx index 744e5afb3269..0f4016b8883a 100644 --- a/dbaccess/source/ui/dlg/DbAdminImpl.cxx +++ b/dbaccess/source/ui/dlg/DbAdminImpl.cxx @@ -225,7 +225,7 @@ bool ODbDataSourceAdministrationHelper::getCurrentSettings(Sequence< PropertyVal if (pUser && pUser->GetValue().getLength()) aReturn.push_back( PropertyValue( "user", 0, - makeAny(OUString(pUser->GetValue())), PropertyState_DIRECT_VALUE)); + makeAny(pUser->GetValue()), PropertyState_DIRECT_VALUE)); // check if the connection type requires a password if (hasAuthentication(*m_pItemSetHelper->getOutputSet())) @@ -269,7 +269,7 @@ bool ODbDataSourceAdministrationHelper::getCurrentSettings(Sequence< PropertyVal aRequest.HasRealm = aRequest.HasAccount = false; // aRequest.Realm aRequest.HasUserName = pUser != nullptr; - aRequest.UserName = pUser ? OUString(pUser->GetValue()) : OUString(); + aRequest.UserName = pUser ? pUser->GetValue() : OUString(); aRequest.HasPassword = true; //aRequest.Password aRequest.HasAccount = false; @@ -675,7 +675,7 @@ void ODbDataSourceAdministrationHelper::translateProperties(const SfxItemSet& _r { if ( sUrlProp == aDirect->second ) { - Any aValue(makeAny(OUString(getConnectionURL()))); + Any aValue(makeAny(getConnectionURL())); // aValue <<= OUString(); lcl_putProperty(_rxDest, aDirect->second,aValue); } diff --git a/dbaccess/source/ui/dlg/UserAdmin.cxx b/dbaccess/source/ui/dlg/UserAdmin.cxx index 1a3d791364a4..0ebc917a1db7 100644 --- a/dbaccess/source/ui/dlg/UserAdmin.cxx +++ b/dbaccess/source/ui/dlg/UserAdmin.cxx @@ -218,8 +218,8 @@ IMPL_LINK( OUserAdmin, UserHdl, Button *, pButton, void ) Reference<XPropertySet> xNewUser = xUserFactory->createDataDescriptor(); if(xNewUser.is()) { - xNewUser->setPropertyValue(PROPERTY_NAME,makeAny(OUString(aPwdDlg->GetUser()))); - xNewUser->setPropertyValue(PROPERTY_PASSWORD,makeAny(OUString(aPwdDlg->GetPassword()))); + xNewUser->setPropertyValue(PROPERTY_NAME,makeAny(aPwdDlg->GetUser())); + xNewUser->setPropertyValue(PROPERTY_PASSWORD,makeAny(aPwdDlg->GetPassword())); Reference<XAppend> xAppend(m_xUsers,UNO_QUERY); if(xAppend.is()) xAppend->appendByDescriptor(xNewUser); diff --git a/dbaccess/source/ui/misc/WTypeSelect.cxx b/dbaccess/source/ui/misc/WTypeSelect.cxx index b0512911f518..b8dbea3c9fcc 100644 --- a/dbaccess/source/ui/misc/WTypeSelect.cxx +++ b/dbaccess/source/ui/misc/WTypeSelect.cxx @@ -98,7 +98,7 @@ void OWizTypeSelectControl::CellModified(long nRow, sal_uInt16 nColId ) OFieldDescription* pCurFieldDescr = getCurrentFieldDescData(); - const sal_Int32 nPos = pListBox->GetEntryPos( OUString( pCurFieldDescr->GetName() ) ); + const sal_Int32 nPos = pListBox->GetEntryPos( pCurFieldDescr->GetName() ); pCurFieldDescr = static_cast< OFieldDescription* >( pListBox->GetEntryData( nPos ) ); OSL_ENSURE( pCurFieldDescr, "OWizTypeSelectControl::CellModified: Columnname/type not found in the listbox!" ); if ( !pCurFieldDescr ) @@ -133,7 +133,7 @@ void OWizTypeSelectControl::CellModified(long nRow, sal_uInt16 nColId ) } else - bDoubleName = ((pListBox->GetEntryPos(OUString(sNewName)) != LISTBOX_ENTRY_NOTFOUND) + bDoubleName = ((pListBox->GetEntryPos(sNewName) != LISTBOX_ENTRY_NOTFOUND) || ( pWiz->shouldCreatePrimaryKey() && pWiz->getPrimaryKeyName() == sNewName) ); diff --git a/dbaccess/source/ui/misc/indexcollection.cxx b/dbaccess/source/ui/misc/indexcollection.cxx index 96e70108a69c..27d08b99903b 100644 --- a/dbaccess/source/ui/misc/indexcollection.cxx +++ b/dbaccess/source/ui/misc/indexcollection.cxx @@ -160,7 +160,7 @@ namespace dbaui if (xColDescriptor.is()) { xColDescriptor->setPropertyValue("IsAscending", css::uno::makeAny(aFieldLoop->bSortAscending)); - xColDescriptor->setPropertyValue(s_sNamePropertyName, makeAny(OUString(aFieldLoop->sFieldName))); + xColDescriptor->setPropertyValue(s_sNamePropertyName, makeAny(aFieldLoop->sFieldName)); xAppendCols->appendByDescriptor(xColDescriptor); } } diff --git a/dbaccess/source/ui/querydesign/QTableWindow.cxx b/dbaccess/source/ui/querydesign/QTableWindow.cxx index c56735f87538..c45b2f11a33a 100644 --- a/dbaccess/source/ui/querydesign/QTableWindow.cxx +++ b/dbaccess/source/ui/querydesign/QTableWindow.cxx @@ -153,7 +153,7 @@ bool OQueryTableWindow::ExistsField(const OUString& strFieldName, OTableFieldDes while (pEntry) { - if (bCase(strFieldName,OUString(m_xListBox->GetEntryText(pEntry)))) + if (bCase(strFieldName,m_xListBox->GetEntryText(pEntry))) { OTableFieldInfo* pInf = static_cast<OTableFieldInfo*>(pEntry->GetUserData()); assert(pInf && "OQueryTableWindow::ExistsField : field doesn't have FieldInfo !"); diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx index 7058f2d7caf2..b89c7f585ed1 100644 --- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx +++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx @@ -2627,8 +2627,8 @@ void OSelectionBrowseBox::setFunctionCell(OTableFieldDescRef& _pEntry) OSL_ENSURE(!_pEntry->isNumeric(),"Not allowed to combine group by and numeric values!"); m_pFunctionCell->SelectEntry(m_pFunctionCell->GetEntry(m_pFunctionCell->GetEntryCount() - 1)); } - else if ( m_pFunctionCell->GetEntryPos(OUString(_pEntry->GetFunction())) != COMBOBOX_ENTRY_NOTFOUND ) - m_pFunctionCell->SelectEntry(OUString(_pEntry->GetFunction())); + else if ( m_pFunctionCell->GetEntryPos(_pEntry->GetFunction()) != COMBOBOX_ENTRY_NOTFOUND ) + m_pFunctionCell->SelectEntry(_pEntry->GetFunction()); else m_pFunctionCell->SelectEntryPos(0); @@ -2644,7 +2644,7 @@ void OSelectionBrowseBox::setFunctionCell(OTableFieldDescRef& _pEntry) if ( !bCountRemoved && m_pFunctionCell->GetEntryCount() < 2) m_pFunctionCell->InsertEntry(m_aFunctionStrings.getToken(2, ';')); // 2 -> COUNT - if(m_pFunctionCell->GetEntryPos(OUString(_pEntry->GetFunction())) != COMBOBOX_ENTRY_NOTFOUND) + if(m_pFunctionCell->GetEntryPos(_pEntry->GetFunction()) != COMBOBOX_ENTRY_NOTFOUND) m_pFunctionCell->SelectEntry(_pEntry->GetFunction()); else m_pFunctionCell->SelectEntryPos(0); diff --git a/dbaccess/source/ui/relationdesign/RTableConnectionData.cxx b/dbaccess/source/ui/relationdesign/RTableConnectionData.cxx index ac94df09495e..1cdcc075e11d 100644 --- a/dbaccess/source/ui/relationdesign/RTableConnectionData.cxx +++ b/dbaccess/source/ui/relationdesign/RTableConnectionData.cxx @@ -272,7 +272,7 @@ bool ORelationTableConnectionData::Update() xKey->setPropertyValue(PROPERTY_NAME,makeAny(sKeyName)); xKey->setPropertyValue(PROPERTY_TYPE,makeAny(KeyType::FOREIGN)); - xKey->setPropertyValue(PROPERTY_REFERENCEDTABLE,makeAny(OUString(getReferencedTable()->GetTableName()))); + xKey->setPropertyValue(PROPERTY_REFERENCEDTABLE,makeAny(getReferencedTable()->GetTableName())); xKey->setPropertyValue(PROPERTY_UPDATERULE, makeAny(GetUpdateRules())); xKey->setPropertyValue(PROPERTY_DELETERULE, makeAny(GetDeleteRules())); } |