diff options
author | Noel Grandin <noel@peralex.com> | 2015-11-06 09:23:33 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2015-11-09 08:34:40 +0000 |
commit | 6c80a8fe89fadf9a2c7260a09c037a09462f53d1 (patch) | |
tree | d36da9ee2a5fdc579d2a57ff6ba02deaddfa785a /dbaccess | |
parent | e1fc599eb764186e5d511ace9785463eebbc7028 (diff) |
new loplugin: oncevar
Change-Id: If57390510dde4d166be3141b9f658a7453755d3f
Reviewed-on: https://gerrit.libreoffice.org/19815
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'dbaccess')
-rw-r--r-- | dbaccess/source/ui/misc/UITools.cxx | 4 | ||||
-rw-r--r-- | dbaccess/source/ui/querydesign/QueryDesignView.cxx | 6 |
2 files changed, 4 insertions, 6 deletions
diff --git a/dbaccess/source/ui/misc/UITools.cxx b/dbaccess/source/ui/misc/UITools.cxx index e58a6f2ae6d7..0398b56afac4 100644 --- a/dbaccess/source/ui/misc/UITools.cxx +++ b/dbaccess/source/ui/misc/UITools.cxx @@ -1273,9 +1273,9 @@ TOTypeInfoSP queryTypeInfoByType(sal_Int32 _nDataType,const OTypeInfoMap& _rType } if ( !pTypeInfo ) { - OUString sCreate("x"),sTypeName; + OUString sTypeName; bool bForce = true; - pTypeInfo = ::dbaui::getTypeInfoFromType(_rTypeInfo,DataType::VARCHAR,sTypeName,sCreate,50,0,false,bForce); + pTypeInfo = ::dbaui::getTypeInfoFromType(_rTypeInfo,DataType::VARCHAR,sTypeName,"x",50,0,false,bForce); } OSL_ENSURE(pTypeInfo,"Wrong DataType supplied!"); return pTypeInfo; diff --git a/dbaccess/source/ui/querydesign/QueryDesignView.cxx b/dbaccess/source/ui/querydesign/QueryDesignView.cxx index d2606d9b2711..9312308a47ba 100644 --- a/dbaccess/source/ui/querydesign/QueryDesignView.cxx +++ b/dbaccess/source/ui/querydesign/QueryDesignView.cxx @@ -295,7 +295,6 @@ namespace { const Reference< XDatabaseMetaData > xMetaData = _xConnection->getMetaData(); const OUString aQuote = xMetaData->getIdentifierQuoteString(); - const OUString sEqual(" = "); for(;aIter != aEnd;++aIter) { @@ -304,7 +303,7 @@ namespace aCondition.append(C_AND); aCondition.append(quoteTableAlias(true,pData->GetAliasName(JTCS_FROM),aQuote)); aCondition.append(::dbtools::quoteName(aQuote, pLineData->GetFieldName(JTCS_FROM) )); - aCondition.append(sEqual); + aCondition.append(" = "); aCondition.append(quoteTableAlias(true,pData->GetAliasName(JTCS_TO),aQuote)); aCondition.append(::dbtools::quoteName(aQuote, pLineData->GetFieldName(JTCS_TO) )); } @@ -2100,14 +2099,13 @@ namespace { SqlParseError eErrorCode = eOk; bool bFirstField = true; - OUString sAsterisk("*"); OJoinTableView::OTableWindowMap::iterator aIter = _pTabList->begin(); OJoinTableView::OTableWindowMap::iterator aEnd = _pTabList->end(); for(;aIter != aEnd && eOk == eErrorCode ;++aIter) { OQueryTableWindow* pTabWin = static_cast<OQueryTableWindow*>(aIter->second.get()); OTableFieldDescRef aInfo = new OTableFieldDesc(); - if (pTabWin->ExistsField( sAsterisk, aInfo )) + if (pTabWin->ExistsField( "*", aInfo )) { eErrorCode = _pView->InsertField(aInfo, true, bFirstField); bFirstField = false; |