diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2017-07-13 11:46:54 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2017-07-13 11:46:54 +0200 |
commit | 6c2d9f51ff4356e2c4096c0da091eaac6ecac052 (patch) | |
tree | 72faf1adafd9ff556c1aed24b509702bdcfc64db /dbaccess | |
parent | dd0bece80712ce30736515e55e1f732ff1ab392e (diff) |
loplugin:oncevar: empty strings: dbaccess
Change-Id: I242ef3d2d91dee97e47aab209160e6e7fa566a6d
Diffstat (limited to 'dbaccess')
-rw-r--r-- | dbaccess/source/ui/app/AppControllerGen.cxx | 3 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/ConnectionHelper.cxx | 4 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/ConnectionPage.cxx | 3 | ||||
-rw-r--r-- | dbaccess/source/ui/misc/UITools.cxx | 3 | ||||
-rw-r--r-- | dbaccess/source/ui/misc/indexcollection.cxx | 3 |
5 files changed, 6 insertions, 10 deletions
diff --git a/dbaccess/source/ui/app/AppControllerGen.cxx b/dbaccess/source/ui/app/AppControllerGen.cxx index 96eee0c85e3b..f1100dbb1c0e 100644 --- a/dbaccess/source/ui/app/AppControllerGen.cxx +++ b/dbaccess/source/ui/app/AppControllerGen.cxx @@ -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&) diff --git a/dbaccess/source/ui/dlg/ConnectionHelper.cxx b/dbaccess/source/ui/dlg/ConnectionHelper.cxx index 6be976f1b402..b6fdb4b7eb7c 100644 --- a/dbaccess/source/ui/dlg/ConnectionHelper.cxx +++ b/dbaccess/source/ui/dlg/ConnectionHelper.cxx @@ -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 ); diff --git a/dbaccess/source/ui/dlg/ConnectionPage.cxx b/dbaccess/source/ui/dlg/ConnectionPage.cxx index fa8d31fbfcd3..2c44abfc0038 100644 --- a/dbaccess/source/ui/dlg/ConnectionPage.cxx +++ b/dbaccess/source/ui/dlg/ConnectionPage.cxx @@ -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(); diff --git a/dbaccess/source/ui/misc/UITools.cxx b/dbaccess/source/ui/misc/UITools.cxx index 8453b903d86c..7881de2c27df 100644 --- a/dbaccess/source/ui/misc/UITools.cxx +++ b/dbaccess/source/ui/misc/UITools.cxx @@ -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; diff --git a/dbaccess/source/ui/misc/indexcollection.cxx b/dbaccess/source/ui/misc/indexcollection.cxx index 27d08b99903b..1fe324e9b0dd 100644 --- a/dbaccess/source/ui/misc/indexcollection.cxx +++ b/dbaccess/source/ui/misc/indexcollection.cxx @@ -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 ... |