summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2019-10-30 20:27:26 +0100
committerStephan Bergmann <sbergman@redhat.com>2019-10-31 09:14:39 +0100
commitd526bd7dd5b94be6fe5a823372da1facca3d43fa (patch)
tree656b49726096326e7832cde5c177f85fd8c8c454 /sc
parent7eeb484e7d1faf87fbb8774a8bda4328d047dde3 (diff)
Fix StringAdd::isCompileTimeConstant
...to find StringLiteral on the RHS of +=. Which revealed that the VisitCompoundStmt/checkForCompoundAssign logic needed to be fixed, too, so that s += side_effect(); s += "literal"; s += side_effect(); only gets combined to s += side_effect() + "literal"; s += side_effect(); and not all the way to s += side_effect() + "literal" + side_effect(); Change-Id: I432e3458b933a7d0ad6141c747b675cc8b0f0ba4 Reviewed-on: https://gerrit.libreoffice.org/81804 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/tool/formulalogger.cxx3
-rw-r--r--sc/source/ui/Accessibility/AccessibleCell.cxx3
-rw-r--r--sc/source/ui/Accessibility/AccessibleDocument.cxx3
-rw-r--r--sc/source/ui/docshell/docsh3.cxx3
-rw-r--r--sc/source/ui/formdlg/dwfunctr.cxx6
-rw-r--r--sc/source/ui/miscdlgs/conflictsdlg.cxx3
-rw-r--r--sc/source/ui/miscdlgs/redcom.cxx3
-rw-r--r--sc/source/ui/miscdlgs/sharedocdlg.cxx3
-rw-r--r--sc/source/ui/miscdlgs/solveroptions.cxx6
-rw-r--r--sc/source/ui/pagedlg/scuitphfedit.cxx3
-rw-r--r--sc/source/ui/view/printfun.cxx3
11 files changed, 13 insertions, 26 deletions
diff --git a/sc/source/core/tool/formulalogger.cxx b/sc/source/core/tool/formulalogger.cxx
index c1ea0d4d39ea..1de0eaa3fee0 100644
--- a/sc/source/core/tool/formulalogger.cxx
+++ b/sc/source/core/tool/formulalogger.cxx
@@ -345,8 +345,7 @@ FormulaLogger::GroupScope FormulaLogger::enterGroup(
OUString aGroupPrefix = aName +
": formula-group: ";
- aGroupPrefix += rCell.aPos.Format(ScRefFlags::VALID | ScRefFlags::TAB_3D, &rDoc, rDoc.GetAddressConvention());
- aGroupPrefix += ": ";
+ aGroupPrefix += rCell.aPos.Format(ScRefFlags::VALID | ScRefFlags::TAB_3D, &rDoc, rDoc.GetAddressConvention()) + ": ";
bool bOutputEnabled = mpLastGroup != rCell.GetCellGroup().get();
mpLastGroup = rCell.GetCellGroup().get();
diff --git a/sc/source/ui/Accessibility/AccessibleCell.cxx b/sc/source/ui/Accessibility/AccessibleCell.cxx
index 87cf50e9da2d..9042fe4676e4 100644
--- a/sc/source/ui/Accessibility/AccessibleCell.cxx
+++ b/sc/source/ui/Accessibility/AccessibleCell.cxx
@@ -495,8 +495,7 @@ uno::Any SAL_CALL ScAccessibleCell::getExtendedAttributes()
strFor = ReplaceFourChar(strFor);
strFor = "Formula:" + strFor +
";Note:";
- strFor += ReplaceFourChar(GetAllDisplayNote());
- strFor += ";";
+ strFor += ReplaceFourChar(GetAllDisplayNote()) + ";";
strFor += getShadowAttrs();//the string returned contains the spliter ";"
strFor += getBorderAttrs();//the string returned contains the spliter ";"
//end of cell attributes
diff --git a/sc/source/ui/Accessibility/AccessibleDocument.cxx b/sc/source/ui/Accessibility/AccessibleDocument.cxx
index d4ffbbaac88b..959112b2cd3a 100644
--- a/sc/source/ui/Accessibility/AccessibleDocument.cxx
+++ b/sc/source/ui/Accessibility/AccessibleDocument.cxx
@@ -2228,8 +2228,7 @@ uno::Any SAL_CALL ScAccessibleDocument::getExtendedAttributes()
sValue += sName + OUString::number(sheetIndex+1) ;
sName = ";total-pages:";
sValue += sName;
- sValue += OUString::number(GetDocument()->GetTableCount());
- sValue += ";";
+ sValue += OUString::number(GetDocument()->GetTableCount()) + ";";
anyAtrribute <<= sValue;
return anyAtrribute;
}
diff --git a/sc/source/ui/docshell/docsh3.cxx b/sc/source/ui/docshell/docsh3.cxx
index 44b36a9ce435..5defaf8c5c5f 100644
--- a/sc/source/ui/docshell/docsh3.cxx
+++ b/sc/source/ui/docshell/docsh3.cxx
@@ -637,8 +637,7 @@ void ScDocShell::ExecuteChangeCommentDialog( ScChangeAction* pAction, weld::Wind
OUString aAuthor = pAction->GetUser();
DateTime aDT = pAction->GetDateTime();
- OUString aDate = ScGlobal::pLocaleData->getDate( aDT );
- aDate += " ";
+ OUString aDate = ScGlobal::pLocaleData->getDate( aDT ) + " ";
aDate += ScGlobal::pLocaleData->getTime( aDT, false );
SfxItemSet aSet(
diff --git a/sc/source/ui/formdlg/dwfunctr.cxx b/sc/source/ui/formdlg/dwfunctr.cxx
index 76edb39ccd0d..f62eb242de05 100644
--- a/sc/source/ui/formdlg/dwfunctr.cxx
+++ b/sc/source/ui/formdlg/dwfunctr.cxx
@@ -293,8 +293,7 @@ void ScFunctionWin::DoEnter()
// the above call can result in us being disposed
if (OutputDevice::isDisposed())
return;
- aString = "=";
- aString += aFuncList->GetSelectedEntry();
+ aString = "=" + aFuncList->GetSelectedEntry();
if (pHdl)
pHdl->ClearText();
}
@@ -339,8 +338,7 @@ void ScFunctionWin::DoEnter()
{
if (pHdl->GetEditString().isEmpty())
{
- aString = "=";
- aString += aFuncList->GetSelectedEntry();
+ aString = "=" + aFuncList->GetSelectedEntry();
}
EditView *pEdView=pHdl->GetActiveView();
if(pEdView!=nullptr) // @ needed because of crash during setting a name
diff --git a/sc/source/ui/miscdlgs/conflictsdlg.cxx b/sc/source/ui/miscdlgs/conflictsdlg.cxx
index 809fecc3bb81..0d478d612ef0 100644
--- a/sc/source/ui/miscdlgs/conflictsdlg.cxx
+++ b/sc/source/ui/miscdlgs/conflictsdlg.cxx
@@ -421,8 +421,7 @@ void ScConflictsDlg::SetActionString(const ScChangeAction* pAction, ScDocument*
rTreeView.set_text(rEntry, aUser, 1);
DateTime aDateTime = pAction->GetDateTime();
- OUString aString = ScGlobal::pLocaleData->getDate( aDateTime );
- aString += " ";
+ OUString aString = ScGlobal::pLocaleData->getDate( aDateTime ) + " ";
aString += ScGlobal::pLocaleData->getTime( aDateTime, false );
rTreeView.set_text(rEntry, aString, 2);
}
diff --git a/sc/source/ui/miscdlgs/redcom.cxx b/sc/source/ui/miscdlgs/redcom.cxx
index d63b5a529091..abd37aad7b39 100644
--- a/sc/source/ui/miscdlgs/redcom.cxx
+++ b/sc/source/ui/miscdlgs/redcom.cxx
@@ -109,8 +109,7 @@ void ScRedComDialog::ReInit(ScChangeAction *pAction)
OUString aAuthor = pChangeAction->GetUser();
DateTime aDT = pChangeAction->GetDateTime();
- OUString aDate = ScGlobal::pLocaleData->getDate( aDT );
- aDate += " ";
+ OUString aDate = ScGlobal::pLocaleData->getDate( aDT ) + " ";
aDate += ScGlobal::pLocaleData->getTime( aDT, false );
pDlg->ShowLastAuthor(aAuthor, aDate);
diff --git a/sc/source/ui/miscdlgs/sharedocdlg.cxx b/sc/source/ui/miscdlgs/sharedocdlg.cxx
index 34d104f37c22..ad036ddd26e3 100644
--- a/sc/source/ui/miscdlgs/sharedocdlg.cxx
+++ b/sc/source/ui/miscdlgs/sharedocdlg.cxx
@@ -196,8 +196,7 @@ void ScShareDocumentDlg::UpdateView()
util::DateTime uDT(xDocProps->getModificationDate());
DateTime aDateTime(uDT);
- OUString aString = formatTime(aDateTime, *ScGlobal::pLocaleData);
- aString += " ";
+ OUString aString = formatTime(aDateTime, *ScGlobal::pLocaleData) + " ";
aString += ScGlobal::pLocaleData->getTime( aDateTime, false );
m_xLbUsers->append_text(aUser);
diff --git a/sc/source/ui/miscdlgs/solveroptions.cxx b/sc/source/ui/miscdlgs/solveroptions.cxx
index 40efcef60260..ce9f4f6d7c66 100644
--- a/sc/source/ui/miscdlgs/solveroptions.cxx
+++ b/sc/source/ui/miscdlgs/solveroptions.cxx
@@ -245,8 +245,7 @@ void ScSolverOptionsDialog::EditOption()
{
pStringItem->SetDoubleValue( aValDialog.GetValue() );
- OUString sTxt(pStringItem->GetText());
- sTxt += ": ";
+ OUString sTxt(pStringItem->GetText() + ": ");
sTxt += rtl::math::doubleToUString(pStringItem->GetDoubleValue(),
rtl_math_StringFormat_Automatic, rtl_math_DecimalPlaces_Max,
ScGlobal::GetpLocaleData()->getNumDecimalSep()[0], true );
@@ -263,8 +262,7 @@ void ScSolverOptionsDialog::EditOption()
{
pStringItem->SetIntValue(aIntDialog.GetValue());
- OUString sTxt(pStringItem->GetText());
- sTxt += ": ";
+ OUString sTxt(pStringItem->GetText() + ": ");
sTxt += OUString::number(pStringItem->GetIntValue());
m_xLbSettings->set_text(nEntry, sTxt, 1);
diff --git a/sc/source/ui/pagedlg/scuitphfedit.cxx b/sc/source/ui/pagedlg/scuitphfedit.cxx
index 2d22892668b9..b12592bcf29c 100644
--- a/sc/source/ui/pagedlg/scuitphfedit.cxx
+++ b/sc/source/ui/pagedlg/scuitphfedit.cxx
@@ -675,8 +675,7 @@ void ScHFEditPage::ProcessDefinedListSel(ScHFEntryId eSel, bool bTravelling)
OUString aCreatedByEntry( m_xFtCreatedBy->get_label() + " " + aUserOpt.GetFirstName() + " " + aUserOpt.GetLastName());
m_xWndLeft->GetEditEngine()->SetText(aCreatedByEntry);
m_xWndCenter->InsertField( SvxFieldItem(SvxDateField(Date( Date::SYSTEM ),SvxDateType::Var), EE_FEATURE_FIELD) );
- OUString aPageEntry( m_xFtPage->get_label() );
- aPageEntry += " ";
+ OUString aPageEntry( m_xFtPage->get_label() + " " );
m_xWndRight->GetEditEngine()->SetText(aPageEntry);
m_xWndRight->InsertField( SvxFieldItem(SvxPageField(), EE_FEATURE_FIELD) );
if(!bTravelling)
diff --git a/sc/source/ui/view/printfun.cxx b/sc/source/ui/view/printfun.cxx
index d117a2250ab7..18be8420c7ee 100644
--- a/sc/source/ui/view/printfun.cxx
+++ b/sc/source/ui/view/printfun.cxx
@@ -1914,8 +1914,7 @@ long ScPrintFunc::DoNotes( long nNoteStart, bool bDoPrint, ScPreviewLocationData
{
pEditEngine->Draw( pDev, Point( nPosX, nPosY ) );
- OUString aMarkStr(rPos.Format(ScRefFlags::VALID, pDoc, pDoc->GetAddressConvention()));
- aMarkStr += ":";
+ OUString aMarkStr(rPos.Format(ScRefFlags::VALID, pDoc, pDoc->GetAddressConvention()) + ":");
// cell position also via EditEngine, for correct positioning
pEditEngine->SetText(aMarkStr);