Kaydet (Commit) 5de6294a authored tarafından Stephan Bergmann's avatar Stephan Bergmann

loplugin:stringcopy: dbaccess

Change-Id: I7d9c876a57b4390d1f5d86ae4d9a3f703c56f0c8
üst d2846c46
......@@ -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,
......
......@@ -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();
......
......@@ -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);
}
......
......@@ -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);
......
......@@ -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) );
......
......@@ -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);
}
}
......
......@@ -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 !");
......
......@@ -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);
......
......@@ -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()));
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment