Kaydet (Commit) 6c2d9f51 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

loplugin:oncevar: empty strings: dbaccess

Change-Id: I242ef3d2d91dee97e47aab209160e6e7fa566a6d
üst dd0bece8
......@@ -705,7 +705,6 @@ void OApplicationController::doAction(sal_uInt16 _nId, const ElementOpenMode _eO
std::vector< std::pair< OUString ,Reference< XModel > > >::const_iterator componentIter = aComponents.begin();
std::vector< std::pair< OUString ,Reference< XModel > > >::const_iterator componentEnd = aComponents.end();
OUString aDocTypeString;
SfxMailModel aSendMail;
SfxMailModel::SendMailResult eResult = SfxMailModel::SEND_MAIL_OK;
for (; componentIter != componentEnd && SfxMailModel::SEND_MAIL_OK == eResult; ++componentIter)
......@@ -715,7 +714,7 @@ void OApplicationController::doAction(sal_uInt16 _nId, const ElementOpenMode _eO
Reference< XModel > xModel(componentIter->second,UNO_QUERY);
// Send document as e-Mail using stored/default type
eResult = aSendMail.AttachDocument(aDocTypeString,xModel,componentIter->first);
eResult = aSendMail.AttachDocument(OUString(),xModel,componentIter->first);
::comphelper::disposeComponent(xModel);
}
catch(const Exception&)
......
......@@ -417,10 +417,10 @@ namespace dbaui
if ( m_pCollection->isFileSystemBased( m_eType ) )
{
// get the two parts: prefix and file URL
OUString sTypePrefix, sFileURLDecoded;
OUString sFileURLDecoded;
sFileURLDecoded = sURL;
sURL = sTypePrefix;
sURL = OUString();
if ( !sFileURLDecoded.isEmpty() )
{
OFileNotation aFileNotation( sFileURLDecoded, OFileNotation::N_SYSTEM );
......
......@@ -194,8 +194,7 @@ namespace dbaui
{
OUString sText = m_pFT_Connection->GetText();
sText = sText.replaceAll("%test",m_pTestConnection->GetText());
OUString sTemp;
sText = sText.replaceAll("~",sTemp);
sText = sText.replaceAll("~","");
m_pFT_Connection->SetText(sText);
}
m_pConnectionURL->Hide();
......
......@@ -1197,9 +1197,8 @@ TOTypeInfoSP queryTypeInfoByType(sal_Int32 _nDataType,const OTypeInfoMap& _rType
}
if ( !pTypeInfo )
{
OUString sTypeName;
bool bForce = true;
pTypeInfo = ::dbaui::getTypeInfoFromType(_rTypeInfo,DataType::VARCHAR,sTypeName,"x",50,0,false,bForce);
pTypeInfo = ::dbaui::getTypeInfoFromType(_rTypeInfo,DataType::VARCHAR,OUString(),"x",50,0,false,bForce);
}
OSL_ENSURE(pTypeInfo,"Wrong DataType supplied!");
return pTypeInfo;
......
......@@ -310,8 +310,7 @@ namespace dbaui
Indexes::iterator OIndexCollection::insert(const OUString& _rName)
{
OSL_ENSURE(end() == find(_rName), "OIndexCollection::insert: invalid new name!");
OUString tmpName;
OIndex aNewIndex(tmpName); // the empty string indicates the index is a new one
OIndex aNewIndex((OUString())); // the empty string indicates the index is a new one
aNewIndex.sName = _rName;
m_aIndexes.push_back(aNewIndex);
return m_aIndexes.end() - 1; // the last element is the new one ...
......
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