diff options
author | Fakabbir Amin <fakabbir@gmail.com> | 2017-02-15 12:09:13 +0530 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2017-02-15 14:47:01 +0000 |
commit | 445a3d0a8d891b872b7fb0611e98de508d4fa1ae (patch) | |
tree | 2ae8086b94e3cf19fbc1ac310cfe32569d8705de /sc | |
parent | 878a8ff3f0b6b7f956e8ed40932ff47e0e56a0cd (diff) |
tdf#100726 Improved readability in sc directory
cleaning concatenation in sc directory.
Change-Id: I137eb0eaf161edece272b084980e622831200803
Reviewed-on: https://gerrit.libreoffice.org/34288
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/filter/xml/xmlstyle.cxx | 14 | ||||
-rw-r--r-- | sc/source/ui/app/inputhdl.cxx | 8 | ||||
-rw-r--r-- | sc/source/ui/formdlg/formula.cxx | 5 | ||||
-rw-r--r-- | sc/source/ui/miscdlgs/acredlin.cxx | 27 | ||||
-rw-r--r-- | sc/source/ui/view/cellsh3.cxx | 5 | ||||
-rw-r--r-- | sc/source/ui/view/colrowba.cxx | 9 | ||||
-rw-r--r-- | sc/source/ui/view/dbfunc3.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/view/gridwin5.cxx | 15 |
8 files changed, 32 insertions, 55 deletions
diff --git a/sc/source/filter/xml/xmlstyle.cxx b/sc/source/filter/xml/xmlstyle.cxx index 3d38967ad818..1777058a5e6b 100644 --- a/sc/source/filter/xml/xmlstyle.cxx +++ b/sc/source/filter/xml/xmlstyle.cxx @@ -715,9 +715,9 @@ void ScXMLAutoStylePoolP::exportStyleContent( { if (aOperator == sheet::ConditionOperator_FORMULA) { - OUString sCondition("is-true-formula("); - sCondition += xSheetCondition->getFormula1(); - sCondition += ")"; + OUString sCondition = "is-true-formula(" + + xSheetCondition->getFormula1() + + ")"; rScXMLExport.AddAttribute(XML_NAMESPACE_STYLE, XML_CONDITION, sCondition); rScXMLExport.AddAttribute(XML_NAMESPACE_STYLE, XML_APPLY_STYLE_NAME, rScXMLExport.EncodeStyleName( sStyleName )); OUString sOUBaseAddress; @@ -737,10 +737,10 @@ void ScXMLAutoStylePoolP::exportStyleContent( sCondition = "cell-content-is-between("; else sCondition = "cell-content-is-not-between("; - sCondition += xSheetCondition->getFormula1(); - sCondition += ","; - sCondition += xSheetCondition->getFormula2(); - sCondition += ")"; + sCondition += xSheetCondition->getFormula1() + + "," + + xSheetCondition->getFormula2() + + ")"; } else { diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx index 7e3c8a7e6130..7d6e6edc5d50 100644 --- a/sc/source/ui/app/inputhdl.cxx +++ b/sc/source/ui/app/inputhdl.cxx @@ -3082,15 +3082,11 @@ void ScInputHandler::SetReference( const ScRange& rRef, ScDocument* pDoc ) case formula::FormulaGrammar::CONV_XL_A1 : case formula::FormulaGrammar::CONV_XL_OOX : case formula::FormulaGrammar::CONV_XL_R1C1 : - aRefStr = "[\'"; - aRefStr += aFileName; - aRefStr += "']"; + aRefStr = "[\'" + aFileName + "']"; break; case formula::FormulaGrammar::CONV_OOO : default: - aRefStr = "\'"; - aRefStr += aFileName; - aRefStr += "'#"; + aRefStr = "\'" + aFileName + "'#"; break; } aRefStr += aTmp; diff --git a/sc/source/ui/formdlg/formula.cxx b/sc/source/ui/formdlg/formula.cxx index 22faa17f9cbc..36d9a0e3730a 100644 --- a/sc/source/ui/formdlg/formula.cxx +++ b/sc/source/ui/formdlg/formula.cxx @@ -408,10 +408,7 @@ void ScFormulaDlg::SetReference( const ScRange& rRef, ScDocument* pRefDoc ) // OUString aFileName = pObjSh->GetMedium()->GetName(); OUString aFileName = pObjSh->GetMedium()->GetURLObject().GetMainURL( INetURLObject::DecodeMechanism::Unambiguous ); - aRefStr = "'"; - aRefStr += aFileName; - aRefStr += "'#"; - aRefStr += aTmp; + aRefStr = "'" + aFileName + "'#" + aTmp; } else { diff --git a/sc/source/ui/miscdlgs/acredlin.cxx b/sc/source/ui/miscdlgs/acredlin.cxx index 04e8a80757fc..a0568a5d54db 100644 --- a/sc/source/ui/miscdlgs/acredlin.cxx +++ b/sc/source/ui/miscdlgs/acredlin.cxx @@ -336,9 +336,7 @@ bool ScAcceptChgDlg::IsValidAction(const ScChangeAction* pScChangeAction) if (!aDesc.isEmpty()) { - aComment += " ("; - aComment += aDesc; - aComment += ")"; + aComment += " (" + aDesc + ")"; } if (pTheView->IsValidEntry(aUser, aDateTime, aComment)) @@ -453,9 +451,7 @@ SvTreeListEntry* ScAcceptChgDlg::InsertChangeAction( if (!aDesc.isEmpty()) { - aComment += " ("; - aComment += aDesc; - aComment += ")"; + aComment += " (" + aDesc + ")"; } aBuf.append(aComment); @@ -602,17 +598,16 @@ SvTreeListEntry* ScAcceptChgDlg::InsertFilteredAction( 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 { @@ -624,9 +619,7 @@ SvTreeListEntry* ScAcceptChgDlg::InsertFilteredAction( if (!aDesc.isEmpty()) { - aComment += " (" ; - aComment += aDesc; - aComment += ")"; + aComment += " (" + aDesc + ")"; } if (pTheView->IsValidComment(aComment)) { diff --git a/sc/source/ui/view/cellsh3.cxx b/sc/source/ui/view/cellsh3.cxx index a9f4c2abab38..8d46afaffc40 100644 --- a/sc/source/ui/view/cellsh3.cxx +++ b/sc/source/ui/view/cellsh3.cxx @@ -460,10 +460,7 @@ void ScCellShell::Execute( SfxRequest& rReq ) OUString aTmp; pDoc->GetName(nTab, aTmp); - aBaseName = aTmp; - aBaseName += "_"; - aBaseName += ScGlobal::GetRscString(STR_SCENARIO); - aBaseName += "_"; + aBaseName = aTmp + "_" + ScGlobal::GetRscString(STR_SCENARIO) + "_"; // first test, if the prefix is recognised as valid, // else avoid only doubles diff --git a/sc/source/ui/view/colrowba.cxx b/sc/source/ui/view/colrowba.cxx index 8ab6a41b3ce1..70c40c466754 100644 --- a/sc/source/ui/view/colrowba.cxx +++ b/sc/source/ui/view/colrowba.cxx @@ -40,12 +40,9 @@ static OUString lcl_MetricString( long nTwips, const OUString& rText ) sal_Int64 nUserVal = MetricField::ConvertValue( nTwips*100, 1, 2, FUNIT_TWIP, eUserMet ); - OUString aStr = rText; - aStr += " "; - aStr += ScGlobal::pLocaleData->getNum( nUserVal, 2 ); - aStr += " "; - aStr += SdrFormatter::GetUnitStr(eUserMet); - + OUString aStr = rText + " " + + ScGlobal::pLocaleData->getNum( nUserVal, 2 ) + + " " + SdrFormatter::GetUnitStr(eUserMet); return aStr; } } diff --git a/sc/source/ui/view/dbfunc3.cxx b/sc/source/ui/view/dbfunc3.cxx index d298d390ee8b..ff4d34fd7543 100644 --- a/sc/source/ui/view/dbfunc3.cxx +++ b/sc/source/ui/view/dbfunc3.cxx @@ -570,9 +570,7 @@ bool ScDBFunc::MakePivotTable( OUString aStr; pDoc->GetName( nSrcTab, aStr ); - aName += "_"; - aName += aStr; - aName += "_"; + aName += "_" + aStr + "_"; SCTAB nNewTab = nSrcTab+1; diff --git a/sc/source/ui/view/gridwin5.cxx b/sc/source/ui/view/gridwin5.cxx index 928c98d8c486..c6d0af8a4c42 100644 --- a/sc/source/ui/view/gridwin5.cxx +++ b/sc/source/ui/view/gridwin5.cxx @@ -140,17 +140,16 @@ bool ScGridWindow::ShowNoteMarker( SCsCOL nPosX, SCsROW nPosY, bool bKeyboard ) bLeftEdge = true; DateTime aDT = pFound->GetDateTime(); - aTrackText = pFound->GetUser(); - aTrackText += ", "; - aTrackText += ScGlobal::pLocaleData->getDate(aDT); - aTrackText += " "; - aTrackText += ScGlobal::pLocaleData->getTime(aDT); - aTrackText += ":\n"; + aTrackText = pFound->GetUser() + + ", " + + ScGlobal::pLocaleData->getDate(aDT) + + " " + + ScGlobal::pLocaleData->getTime(aDT) + + ":\n"; OUString aComStr=pFound->GetComment(); if(!aComStr.isEmpty()) { - aTrackText += aComStr; - aTrackText += "\n( "; + aTrackText += aComStr + "\n( "; } OUString aTmp; pFound->GetDescription(aTmp, pDoc); |