diff options
author | Gökhan Gurbetoğlu <gokhan.gurbetoglu@pardus.org.tr> | 2016-08-24 09:24:14 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-08-25 06:55:10 +0000 |
commit | 5d5f1de548c1086dd3476e40bfe06aa4a5830a6d (patch) | |
tree | 1f83a858483cd3f5718c988a0d00a57c634b1bb9 /sc | |
parent | 89d3482b7a80c6fd508cf3954b7c52608445eae0 (diff) |
tdf#100726 - Improve readability of OUString concatanations
Change-Id: I9d729c5c135f556a0dab7bcb8274b940e3452140
Reviewed-on: https://gerrit.libreoffice.org/28362
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/core/data/drwlayer.cxx | 3 | ||||
-rw-r--r-- | sc/source/ui/miscdlgs/acredlin.cxx | 35 | ||||
-rw-r--r-- | sc/source/ui/miscdlgs/crnrdlg.cxx | 7 | ||||
-rw-r--r-- | sc/source/ui/miscdlgs/scuiautofmt.cxx | 7 | ||||
-rw-r--r-- | sc/source/ui/optdlg/tpusrlst.cxx | 13 |
5 files changed, 24 insertions, 41 deletions
diff --git a/sc/source/core/data/drwlayer.cxx b/sc/source/core/data/drwlayer.cxx index 781097d0424c..36f7aa7802cb 100644 --- a/sc/source/core/data/drwlayer.cxx +++ b/sc/source/core/data/drwlayer.cxx @@ -1797,8 +1797,7 @@ SdrObject* ScDrawLayer::GetNamedObject( const OUString& rName, sal_uInt16 nId, S OUString ScDrawLayer::GetNewGraphicName( long* pnCounter ) const { - OUString aBase = ScGlobal::GetRscString(STR_GRAPHICNAME); - aBase += " "; + OUString aBase = ScGlobal::GetRscString(STR_GRAPHICNAME) + " "; bool bThere = true; OUString aGraphicName; diff --git a/sc/source/ui/miscdlgs/acredlin.cxx b/sc/source/ui/miscdlgs/acredlin.cxx index 94fe85c7ed4a..b5f5b797d5ca 100644 --- a/sc/source/ui/miscdlgs/acredlin.cxx +++ b/sc/source/ui/miscdlgs/acredlin.cxx @@ -667,8 +667,7 @@ SvTreeListEntry* ScAcceptChgDlg::InsertChangeActionContent(const ScChangeActionC aString+=a2String; //aString+="\'"; - aDesc=aStrChildOrgContent; - aDesc += ": "; + aDesc = aStrChildOrgContent + ": "; } else { @@ -677,15 +676,13 @@ SvTreeListEntry* ScAcceptChgDlg::InsertChangeActionContent(const ScChangeActionC a2String = aTmp; if(a2String.isEmpty()) { - a2String=aStrEmpty; - aString+=a2String; + a2String = aStrEmpty; + aString += a2String; } else { - aString += "\'"; - aString += a2String; - aString += "\'"; - a2String =aString; + aString += "\'" + a2String + "\'"; + a2String = aString; } aDesc = aStrChildContent; @@ -694,35 +691,27 @@ SvTreeListEntry* ScAcceptChgDlg::InsertChangeActionContent(const ScChangeActionC aDesc += a2String; aString += "\t"; pScChangeAction->GetRefString(aRefStr, pDoc, true); - aString += aRefStr; - aString += "\t"; + aString += aRefStr + "\t"; if(!bIsGenerated) { - aString += aUser; - aString += "\t"; - - aString += ScGlobal::pLocaleData->getDate(aDateTime); - aString += " "; - aString += ScGlobal::pLocaleData->getTime(aDateTime); - aString += "\t"; + aString += aUser + "\t" + + ScGlobal::pLocaleData->getDate(aDateTime) + " " + + ScGlobal::pLocaleData->getTime(aDateTime) + "\t"; } else { - aString += "\t"; - aString += "\t"; + aString += "\t\t"; } OUString aComment = pScChangeAction->GetComment().replaceAll("\n", ""); if(!aDesc.isEmpty()) { - aComment += " (" ; - aComment += aDesc; - aComment += ")"; + aComment += " (" + aDesc + ")"; } - aString+=aComment; + aString += aComment; ScRedlinData* pNewData=new ScRedlinData; pNewData->nInfo=nSpecial; diff --git a/sc/source/ui/miscdlgs/crnrdlg.cxx b/sc/source/ui/miscdlgs/crnrdlg.cxx index 59df51a3cc46..39d3396c8e42 100644 --- a/sc/source/ui/miscdlgs/crnrdlg.cxx +++ b/sc/source/ui/miscdlgs/crnrdlg.cxx @@ -595,10 +595,9 @@ IMPL_LINK_NOARG_TYPED(ScColRowNameRangesDlg, RemoveBtnHdl, Button*, void) if ( bFound ) { OUString aStrDelMsg = ScGlobal::GetRscString( STR_QUERY_DELENTRY ); - OUString aMsg = aStrDelMsg.getToken( 0, '#' ); - - aMsg += aRangeStr; - aMsg += aStrDelMsg.getToken( 1, '#' ); + OUString aMsg = aStrDelMsg.getToken( 0, '#' ) + + aRangeStr + + aStrDelMsg.getToken( 1, '#' ); if ( RET_YES == QUERYBOX(aMsg) ) { diff --git a/sc/source/ui/miscdlgs/scuiautofmt.cxx b/sc/source/ui/miscdlgs/scuiautofmt.cxx index 19033d9cb463..8b9af01b3669 100644 --- a/sc/source/ui/miscdlgs/scuiautofmt.cxx +++ b/sc/source/ui/miscdlgs/scuiautofmt.cxx @@ -280,10 +280,9 @@ IMPL_LINK_NOARG_TYPED(ScAutoFormatDlg, RemoveHdl, Button*, void) { if ( (nIndex > 0) && (m_pLbFormat->GetEntryCount() > 0) ) { - OUString aMsg( aStrDelMsg.getToken( 0, '#' ) ); - - aMsg += m_pLbFormat->GetSelectEntry(); - aMsg += aStrDelMsg.getToken( 1, '#' ); + OUString aMsg = aStrDelMsg.getToken( 0, '#' ) + + m_pLbFormat->GetSelectEntry() + + aStrDelMsg.getToken( 1, '#' ); if ( RET_YES == ScopedVclPtrInstance<QueryBox>( this, WinBits( WB_YES_NO | WB_DEF_YES ), aMsg )->Execute() ) diff --git a/sc/source/ui/optdlg/tpusrlst.cxx b/sc/source/ui/optdlg/tpusrlst.cxx index 598d6f12b0d7..d601e28801fb 100644 --- a/sc/source/ui/optdlg/tpusrlst.cxx +++ b/sc/source/ui/optdlg/tpusrlst.cxx @@ -382,8 +382,7 @@ void ScTpUserLists::CopyListFromArea( const ScRefAddress& rStartPos, if ( !aStrField.isEmpty() ) { - aStrList += aStrField; - aStrList += "\n"; + aStrList += aStrField + "\n"; } } else @@ -406,8 +405,7 @@ void ScTpUserLists::CopyListFromArea( const ScRefAddress& rStartPos, if ( !aStrField.isEmpty() ) { - aStrList += aStrField; - aStrList += "\n"; + aStrList += aStrField + "\n"; } } else @@ -611,10 +609,9 @@ IMPL_LINK_TYPED( ScTpUserLists, BtnClickHdl, Button*, pBtn, void ) if ( mpLbLists->GetEntryCount() > 0 ) { sal_Int32 nRemovePos = mpLbLists->GetSelectEntryPos(); - OUString aMsg ( aStrQueryRemove.getToken( 0, '#' ) ); - - aMsg += mpLbLists->GetEntry( nRemovePos ); - aMsg += aStrQueryRemove.getToken( 1, '#' ); + OUString aMsg = aStrQueryRemove.getToken( 0, '#' ) + + mpLbLists->GetEntry( nRemovePos ) + + aStrQueryRemove.getToken( 1, '#' ); if ( RET_YES == ScopedVclPtrInstance<QueryBox>( this, WinBits( WB_YES_NO | WB_DEF_YES ), |