summaryrefslogtreecommitdiff
path: root/sc/source
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-07-01 15:45:52 +0200
committerStephan Bergmann <sbergman@redhat.com>2014-07-01 15:45:52 +0200
commite50ef195bc95f3f410119f623928382cb88b45d2 (patch)
tree0897c005806c84d7e2add9f4a2d407ff4fe911a5 /sc/source
parent363e39d63621b6c7017854ca5bb2f7668bb35846 (diff)
New loplugin:stringconcat
Change-Id: Id7c517fb37bc28797c45fc0dde83e866f2aa4aac
Diffstat (limited to 'sc/source')
-rw-r--r--sc/source/core/data/formulacell.cxx5
-rw-r--r--sc/source/core/opencl/op_addin.cxx6
-rw-r--r--sc/source/core/opencl/op_financial.cxx16
-rw-r--r--sc/source/core/opencl/op_math.cxx2
-rw-r--r--sc/source/core/opencl/op_spreadsheet.cxx4
-rw-r--r--sc/source/core/opencl/op_statistical.cxx34
-rw-r--r--sc/source/filter/xml/xmlexprt.cxx2
-rw-r--r--sc/source/ui/view/viewdata.cxx2
8 files changed, 35 insertions, 36 deletions
diff --git a/sc/source/core/data/formulacell.cxx b/sc/source/core/data/formulacell.cxx
index f36eea3c149a..5e051f6fe787 100644
--- a/sc/source/core/data/formulacell.cxx
+++ b/sc/source/core/data/formulacell.cxx
@@ -1207,9 +1207,8 @@ void ScFormulaCell::CompileXML( sc::CompileFormulaContext& rCxt, ScProgress& rPr
bSkipCompile = true;
pCode = pPreviousCell->pCode;
- SAL_INFO( "sc", "merged '" << aFormula << "' == "
- "'" << aShouldBe << "'" <<
- " extend group to " << xGroup->mnLength );
+ SAL_INFO( "sc", "merged '" << aFormula << "' == '" << aShouldBe
+ << "'extend group to " << xGroup->mnLength );
}
}
}
diff --git a/sc/source/core/opencl/op_addin.cxx b/sc/source/core/opencl/op_addin.cxx
index e3bc13e44064..e3e5787d8d3f 100644
--- a/sc/source/core/opencl/op_addin.cxx
+++ b/sc/source/core/opencl/op_addin.cxx
@@ -39,7 +39,7 @@ void OpBesselj::GenSlidingWindowFunction(std::stringstream &ss,
ss << " double N = 0.0;\n";
if(vSubArguments.size() != 2)
{
- ss << " return DBL_MAX;\n" << "}\n";
+ ss << " return DBL_MAX;\n}\n";
return ;
}
FormulaToken *tmpCur0 = vSubArguments[0]->GetFormulaToken();
@@ -68,7 +68,7 @@ void OpBesselj::GenSlidingWindowFunction(std::stringstream &ss,
}
else
{
- ss << " return DBL_MAX;\n" << "}\n";
+ ss << " return DBL_MAX;\n}\n";
return ;
}
}
@@ -104,7 +104,7 @@ void OpBesselj::GenSlidingWindowFunction(std::stringstream &ss,
}
else
{
- ss << " return DBL_MAX;\n" << "}\n";
+ ss << " return DBL_MAX;\n}\n";
return ;
}
}
diff --git a/sc/source/core/opencl/op_financial.cxx b/sc/source/core/opencl/op_financial.cxx
index cc4e757c671b..2c249faa6b67 100644
--- a/sc/source/core/opencl/op_financial.cxx
+++ b/sc/source/core/opencl/op_financial.cxx
@@ -1080,7 +1080,7 @@ void IRR::GenSlidingWindowFunction(std::stringstream &ss,
#endif
ss << " arg0 = ";
ss << vSubArguments[0]->GenSlidingWindowDeclRef() << ";\n";
- ss << " i++;" << ";\n";
+ ss << " i++;;\n";
ss << " arg1 = ";
ss << vSubArguments[0]->GenSlidingWindowDeclRef() << ";\n";
#ifdef ISNAN
@@ -1150,7 +1150,7 @@ void IRR::GenSlidingWindowFunction(std::stringstream &ss,
#endif
ss << " arg0 = ";
ss << vSubArguments[0]->GenSlidingWindowDeclRef() << ";\n";
- ss << " i++;" << ";\n";
+ ss << " i++;;\n";
ss << " arg1 = ";
ss << vSubArguments[0]->GenSlidingWindowDeclRef() << ";\n";
#ifdef ISNAN
@@ -1183,7 +1183,7 @@ void IRR::GenSlidingWindowFunction(std::stringstream &ss,
#endif
ss << " arg0 = ";
ss << vSubArguments[0]->GenSlidingWindowDeclRef() << ";\n";
- ss << " i++;" << ";\n";
+ ss << " i++;;\n";
ss << " arg1 = ";
ss << vSubArguments[0]->GenSlidingWindowDeclRef() << ";\n";
#ifdef ISNAN
@@ -2221,7 +2221,7 @@ void OpYield::GenSlidingWindowFunction(
vSubArguments[i]->GenSlidingWindowDecl(ss);
}
ss << ") {\n\t";
- ss << "double tmp = " <<"0"<<";\n\t";
+ ss << "double tmp = 0;\n\t";
ss << "int gid0 = get_global_id(0);\n\t";
ss << "double tmp000;\n\t";
ss << "double tmp001;\n\t";
@@ -2377,7 +2377,7 @@ void OpSLN::GenSlidingWindowFunction(std::stringstream &ss,
vSubArguments[i]->GenSlidingWindowDecl(ss);
}
ss << ") {\n";
- ss << " double tmp = " <<"0"<<";\n";
+ ss << " double tmp = 0;\n";
ss << " int gid0 = get_global_id(0);\n";
ss << " double wert;\n";
ss << " double rest;\n";
@@ -2461,7 +2461,7 @@ void OpYieldmat::GenSlidingWindowFunction(
vSubArguments[i]->GenSlidingWindowDecl(ss);
}
ss << ") {\n\t";
- ss << "double tmp = " <<"0"<<";\n\t";
+ ss << "double tmp = 0;\n\t";
ss << "int gid0 = get_global_id(0);\n\t";
ss << "double tmp000;\n\t";
ss << "double tmp001;\n\t";
@@ -4471,7 +4471,7 @@ void OpYielddisc::GenSlidingWindowFunction(
vSubArguments[i]->GenSlidingWindowDecl(ss);
}
ss << ") {\n\t";
- ss << "double tmp = " <<"0"<<";\n\t";
+ ss << "double tmp = 0;\n\t";
ss << "int gid0 = get_global_id(0);\n\t";
ss << "double tmp000;\n\t";
ss << "double tmp001;\n\t";
@@ -4978,7 +4978,7 @@ vSubArguments)
vSubArguments[i]->GenSlidingWindowDecl(ss);
}
ss << ") {\n";
- ss << " double result = " <<"0"<<";\n";
+ ss << " double result = 0;\n";
ss << " int gid0 = get_global_id(0);\n";
ss << " double zins;\n";
ss << " double zzr;\n";
diff --git a/sc/source/core/opencl/op_math.cxx b/sc/source/core/opencl/op_math.cxx
index f9a7785104e9..60f9438811ae 100644
--- a/sc/source/core/opencl/op_math.cxx
+++ b/sc/source/core/opencl/op_math.cxx
@@ -2457,7 +2457,7 @@ void OpBitLshift::GenSlidingWindowFunction(std::stringstream &ss,
#endif
ss << " shift_amount = floor(";
ss << vSubArguments[1]->GenSlidingWindowDeclRef() << ");\n";
- ss << " return floor(" << "shift_amount >= 0 ? ";
+ ss << " return floor(shift_amount >= 0 ? ";
ss << "num * pow(2.0, shift_amount) : ";
ss << "num / pow(2.0, fabs(shift_amount)));\n";
ss << "}";
diff --git a/sc/source/core/opencl/op_spreadsheet.cxx b/sc/source/core/opencl/op_spreadsheet.cxx
index a5823d49d981..221ee364bb2d 100644
--- a/sc/source/core/opencl/op_spreadsheet.cxx
+++ b/sc/source/core/opencl/op_spreadsheet.cxx
@@ -172,7 +172,7 @@ void OpVLookup::GenSlidingWindowFunction(std::stringstream &ss,
ss << " tmp = isNan(";
vSubArguments[1+j]->GenNumDeclRef(ss);
- ss << "[rowNum]"<<")?";
+ ss << "[rowNum])?";
vSubArguments[1+j]->GenNumDeclRef(ss);
ss << "[rowNum]:";
vSubArguments[1+j]->GenStringDeclRef(ss);
@@ -251,7 +251,7 @@ void OpVLookup::GenSlidingWindowFunction(std::stringstream &ss,
{
ss << " tmp = isNan(";
vSubArguments[1+j]->GenNumDeclRef(ss);
- ss << "[rowNum]"<<")?";
+ ss << "[rowNum])?";
vSubArguments[1+j]->GenNumDeclRef(ss);
ss << "[rowNum]:";
vSubArguments[1+j]->GenStringDeclRef(ss);
diff --git a/sc/source/core/opencl/op_statistical.cxx b/sc/source/core/opencl/op_statistical.cxx
index c378e562ef9a..d2ece0d82d27 100644
--- a/sc/source/core/opencl/op_statistical.cxx
+++ b/sc/source/core/opencl/op_statistical.cxx
@@ -1257,7 +1257,7 @@ void OpTDist::GenSlidingWindowFunction(std::stringstream &ss,
ss << " double fFlag = 0.0;\n";
if(vSubArguments.size() != 3)
{
- ss << " return DBL_MAX;\n" << "}\n";
+ ss << " return DBL_MAX;\n}\n";
return ;
}
FormulaToken *tmpCur0 = vSubArguments[0]->GetFormulaToken();
@@ -1287,7 +1287,7 @@ void OpTDist::GenSlidingWindowFunction(std::stringstream &ss,
}
else
{
- ss << " return DBL_MAX;\n" << "}\n";
+ ss << " return DBL_MAX;\n}\n";
return ;
}
}
@@ -1328,7 +1328,7 @@ void OpTDist::GenSlidingWindowFunction(std::stringstream &ss,
}
else
{
- ss << " return DBL_MAX;\n" << "}\n";
+ ss << " return DBL_MAX;\n}\n";
return ;
}
}
@@ -1371,7 +1371,7 @@ void OpTDist::GenSlidingWindowFunction(std::stringstream &ss,
}
else
{
- ss << " return DBL_MAX;\n" << "}\n";
+ ss << " return DBL_MAX;\n}\n";
return ;
}
}
@@ -1577,7 +1577,7 @@ void OpStandard::GenSlidingWindowFunction(std::stringstream &ss,
ss << " double sigma = 0.0;\n";
if(vSubArguments.size() != 3)
{
- ss << " return DBL_MAX;\n" << "}\n";
+ ss << " return DBL_MAX;\n}\n";
return ;
}
FormulaToken *tmpCur0 = vSubArguments[0]->GetFormulaToken();
@@ -1606,7 +1606,7 @@ void OpStandard::GenSlidingWindowFunction(std::stringstream &ss,
}
else
{
- ss << " return DBL_MAX;\n" << "}\n";
+ ss << " return DBL_MAX;\n}\n";
return ;
}
}
@@ -1642,7 +1642,7 @@ void OpStandard::GenSlidingWindowFunction(std::stringstream &ss,
}
else
{
- ss << " return DBL_MAX;\n" << "}\n";
+ ss << " return DBL_MAX;\n}\n";
return ;
}
}
@@ -1715,7 +1715,7 @@ void OpWeibull::GenSlidingWindowFunction(std::stringstream &ss,
ss << " double kum = 0.0;\n";
if(vSubArguments.size() != 4)
{
- ss << " return DBL_MAX;\n" << "}\n";
+ ss << " return DBL_MAX;\n}\n";
return ;
}
FormulaToken *tmpCur0 = vSubArguments[0]->GetFormulaToken();
@@ -1744,7 +1744,7 @@ void OpWeibull::GenSlidingWindowFunction(std::stringstream &ss,
}
else
{
- ss << " return DBL_MAX;\n" << "}\n";
+ ss << " return DBL_MAX;\n}\n";
return ;
}
}
@@ -1780,7 +1780,7 @@ void OpWeibull::GenSlidingWindowFunction(std::stringstream &ss,
}
else
{
- ss << " return DBL_MAX;\n" << "}\n";
+ ss << " return DBL_MAX;\n}\n";
return ;
}
}
@@ -1816,7 +1816,7 @@ void OpWeibull::GenSlidingWindowFunction(std::stringstream &ss,
}
else
{
- ss << " return DBL_MAX;\n" << "}\n";
+ ss << " return DBL_MAX;\n}\n";
return ;
}
}
@@ -1852,7 +1852,7 @@ void OpWeibull::GenSlidingWindowFunction(std::stringstream &ss,
}
else
{
- ss << " return DBL_MAX;\n" << "}\n";
+ ss << " return DBL_MAX;\n}\n";
return ;
}
}
@@ -2601,7 +2601,7 @@ void OpTInv::GenSlidingWindowFunction(std::stringstream &ss,
ss << " double fDF = 0.0;\n";
if(vSubArguments.size() != 2)
{
- ss << " return DBL_MAX;\n" << "}\n";
+ ss << " return DBL_MAX;\n}\n";
return ;
}
FormulaToken *tmpCur0 = vSubArguments[0]->GetFormulaToken();
@@ -2631,7 +2631,7 @@ void OpTInv::GenSlidingWindowFunction(std::stringstream &ss,
}
else
{
- ss << " return DBL_MAX;\n" << "}\n";
+ ss << " return DBL_MAX;\n}\n";
return ;
}
}
@@ -2672,7 +2672,7 @@ void OpTInv::GenSlidingWindowFunction(std::stringstream &ss,
}
else
{
- ss << " return DBL_MAX;\n" << "}\n";
+ ss << " return DBL_MAX;\n}\n";
return ;
}
}
@@ -2814,7 +2814,7 @@ void OpStDev::GenSlidingWindowFunction(std::stringstream &ss,
}
if (i == 0)
{
- ss << " fMean = fSum * pow(fCount,-1.0)" << ";\n";
+ ss << " fMean = fSum * pow(fCount,-1.0);\n";
}
}
i = vSubArguments.size();
@@ -3045,7 +3045,7 @@ void OpStDevP::GenSlidingWindowFunction(std::stringstream &ss,
}
if (i == 0)
{
- ss << " fMean = fSum * pow(fCount,-1.0)" << ";\n";
+ ss << " fMean = fSum * pow(fCount,-1.0);\n";
}
}
i = vSubArguments.size();
diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx
index 60630518b6da..32181cd6f7d9 100644
--- a/sc/source/filter/xml/xmlexprt.cxx
+++ b/sc/source/filter/xml/xmlexprt.cxx
@@ -4576,7 +4576,7 @@ void ScXMLExport::WriteExternalRefCaches()
if (!pTable.get() || !pTable->isReferenced())
continue;
- AddAttribute(XML_NAMESPACE_TABLE, XML_NAME, "'" + *pUrl + "'" + "#" + *itr);
+ AddAttribute(XML_NAMESPACE_TABLE, XML_NAME, "'" + *pUrl + "'#" + *itr);
AddAttribute(XML_NAMESPACE_TABLE, XML_PRINT, GetXMLToken(XML_FALSE));
AddAttribute(XML_NAMESPACE_TABLE, XML_STYLE_NAME, sExternalRefTabStyleName);
SvXMLElementExport aElemTable(*this, XML_NAMESPACE_TABLE, XML_TABLE, true, true);
diff --git a/sc/source/ui/view/viewdata.cxx b/sc/source/ui/view/viewdata.cxx
index 95fadbac6fad..a89b31ce4f9a 100644
--- a/sc/source/ui/view/viewdata.cxx
+++ b/sc/source/ui/view/viewdata.cxx
@@ -2201,7 +2201,7 @@ void ScViewData::WriteUserData(OUString& rData)
else
rData += "0";
- rData += ";" + OUString::number( nTabNo ) + ";" + TAG_TABBARWIDTH +
+ rData += ";" + OUString::number( nTabNo ) + ";" TAG_TABBARWIDTH +
OUString::number( pView->GetTabBarWidth() );
SCTAB nTabCount = pDoc->GetTableCount();