loplugin:stringadd in sc
Change-Id: Idab16f785ca5e8954f8e50132938f6329106c927 Reviewed-on: https://gerrit.libreoffice.org/79891 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
parent
03516c505e
commit
6eb7870aa1
38 changed files with 147 additions and 205 deletions
|
@ -6793,9 +6793,9 @@ void Test::checkPrecisionAsShown( OUString& rCode, double fValue, double fExpect
|
|||
CPPUNIT_ASSERT_EQUAL( sal_Int32(0), nCheckPos );
|
||||
}
|
||||
double fRoundValue = m_pDoc->RoundValueAsShown( fValue, nFormat );
|
||||
OString aMessage = "Format \"";
|
||||
aMessage += OUStringToOString( rCode, RTL_TEXTENCODING_ASCII_US );
|
||||
aMessage += "\" is not correctly rounded";
|
||||
OString aMessage = "Format \"" +
|
||||
OUStringToOString( rCode, RTL_TEXTENCODING_ASCII_US ) +
|
||||
"\" is not correctly rounded";
|
||||
CPPUNIT_ASSERT_EQUAL_MESSAGE( aMessage.getStr(), fExpectedRoundVal, fRoundValue );
|
||||
}
|
||||
|
||||
|
|
|
@ -2111,9 +2111,7 @@ void Test::testFuncGETPIVOTDATA()
|
|||
sc::AutoCalcSwitch aSwitch(*m_pDoc, true); // turn autocalc on.
|
||||
|
||||
// First, get the grand total.
|
||||
OUString aFormula("=GETPIVOTDATA(\"Value\";");
|
||||
aFormula += aPivotPosStr;
|
||||
aFormula += ")";
|
||||
OUString aFormula = "=GETPIVOTDATA(\"Value\";" + aPivotPosStr + ")";
|
||||
m_pDoc->SetString(aPos, aFormula);
|
||||
double fVal = m_pDoc->GetValue(aPos);
|
||||
CPPUNIT_ASSERT_EQUAL(21.0, fVal);
|
||||
|
|
|
@ -1253,9 +1253,7 @@ OUString ScConditionEntry::GetExpression( const ScAddress& rCursor, sal_uInt16 n
|
|||
}
|
||||
else if (bIsStr1)
|
||||
{
|
||||
aRet = "\"";
|
||||
aRet += aStrVal1;
|
||||
aRet += "\"";
|
||||
aRet = "\"" + aStrVal1 + "\"";
|
||||
}
|
||||
else
|
||||
mpDoc->GetFormatTable()->GetInputLineString(nVal1, nNumFmt, aRet);
|
||||
|
@ -1271,9 +1269,7 @@ OUString ScConditionEntry::GetExpression( const ScAddress& rCursor, sal_uInt16 n
|
|||
}
|
||||
else if (bIsStr2)
|
||||
{
|
||||
aRet = "\"";
|
||||
aRet += aStrVal2;
|
||||
aRet += "\"";
|
||||
aRet = "\"" + aStrVal2 + "\"";
|
||||
}
|
||||
else
|
||||
mpDoc->GetFormatTable()->GetInputLineString(nVal2, nNumFmt, aRet);
|
||||
|
|
|
@ -438,10 +438,9 @@ static bool lcl_HFPresentation
|
|||
eCoreMetric, ePresentationMetric, &rIntl );
|
||||
aText += " " + EditResId(GetMetricId(ePresentationMetric));
|
||||
}
|
||||
aText += cpDelim;
|
||||
|
||||
// We don't have a nPropFirstLineOfst
|
||||
aText += EditResId(RID_SVXITEMS_LRSPACE_RIGHT);
|
||||
aText += cpDelim +
|
||||
// We don't have a nPropFirstLineOfst
|
||||
EditResId(RID_SVXITEMS_LRSPACE_RIGHT);
|
||||
if ( 100 != nPropRightMargin )
|
||||
{
|
||||
aText = aText + unicode::formatPercent(nPropLeftMargin,
|
||||
|
|
|
@ -321,8 +321,7 @@ OUString ScGlobal::GetAbsDocName( const OUString& rFileName,
|
|||
OUString ScGlobal::GetDocTabName( const OUString& rFileName,
|
||||
const OUString& rTabName )
|
||||
{
|
||||
OUString aDocTab('\'');
|
||||
aDocTab += rFileName;
|
||||
OUString aDocTab = "'" + rFileName;
|
||||
sal_Int32 nPos = 1;
|
||||
while( (nPos = aDocTab.indexOf( '\'', nPos )) != -1 )
|
||||
{ // escape Quotes
|
||||
|
|
|
@ -83,8 +83,7 @@ SfxStyleSheetBase& ScStyleSheetPool::Make( const OUString& rName,
|
|||
sal_uInt32 nCount = GetIndexedStyleSheets().GetNumberOfStyleSheets();
|
||||
for ( sal_uInt32 nAdd = 1; nAdd <= nCount; nAdd++ )
|
||||
{
|
||||
OUString aNewName = ScResId(STR_STYLENAME_STANDARD);
|
||||
aNewName += OUString::number( nAdd );
|
||||
OUString aNewName = ScResId(STR_STYLENAME_STANDARD) + OUString::number( nAdd );
|
||||
if ( Find( aNewName, eFam ) == nullptr )
|
||||
return SfxStyleSheetPool::Make(aNewName, eFam, mask);
|
||||
}
|
||||
|
|
|
@ -2133,8 +2133,7 @@ bool ScTable::DoSubTotals( ScSubTotalParam& rParam )
|
|||
DBShowRow(aRowEntry.nDestRow, true);
|
||||
|
||||
// insert label
|
||||
OUString label = ScResId(STR_TABLE_GRAND);
|
||||
label += " ";
|
||||
OUString label = ScResId(STR_TABLE_GRAND) + " ";
|
||||
label += ScResId(lcl_GetSubTotalStrId(pResFunc[0]));
|
||||
SetString(nGroupCol[aRowEntry.nGroupNo], aRowEntry.nDestRow, nTab, label);
|
||||
ApplyStyle(nGroupCol[aRowEntry.nGroupNo], aRowEntry.nDestRow, pStyle);
|
||||
|
|
|
@ -405,10 +405,7 @@ void ScUnoAddInCollection::ReadConfiguration()
|
|||
|
||||
// get direct information on the function
|
||||
|
||||
OUString aFuncPropPath = aFunctionsPath;
|
||||
aFuncPropPath += sSlash;
|
||||
aFuncPropPath += pFuncNameArray[nFuncPos];
|
||||
aFuncPropPath += sSlash;
|
||||
OUString aFuncPropPath = aFunctionsPath + sSlash + pFuncNameArray[nFuncPos] + sSlash;
|
||||
|
||||
uno::Sequence<OUString> aFuncPropNames{
|
||||
(aFuncPropPath + CFGSTR_DISPLAYNAME), // CFG_FUNCPROP_DISPLAYNAME
|
||||
|
@ -470,10 +467,7 @@ void ScUnoAddInCollection::ReadConfiguration()
|
|||
sal_Int32 nIndex = 0;
|
||||
for ( const OUString& rArgName : aArgumentNames )
|
||||
{
|
||||
OUString aOneArgPath = aArgumentsPath;
|
||||
aOneArgPath += sSlash;
|
||||
aOneArgPath += rArgName;
|
||||
aOneArgPath += sSlash;
|
||||
OUString aOneArgPath = aArgumentsPath + sSlash + rArgName + sSlash;
|
||||
|
||||
pPropNameArray[nIndex++] = aOneArgPath
|
||||
+ CFGSTR_DISPLAYNAME;
|
||||
|
@ -1229,8 +1223,7 @@ bool ScUnoAddInCollection::FillFunctionDescFromData( const ScUnoAddInFuncData& r
|
|||
// no empty names...
|
||||
if ( rDesc.maDefArgNames[nArg].isEmpty() )
|
||||
{
|
||||
OUString aDefName("arg");
|
||||
aDefName += OUString::number( nArg+1 );
|
||||
OUString aDefName = "arg" + OUString::number( nArg+1 );
|
||||
rDesc.maDefArgNames[nArg] = aDefName;
|
||||
}
|
||||
|
||||
|
|
|
@ -343,9 +343,8 @@ FormulaLogger::GroupScope FormulaLogger::enterGroup(
|
|||
if (aName.isEmpty())
|
||||
aName = "-"; // unsaved document.
|
||||
|
||||
OUString aGroupPrefix = aName;
|
||||
|
||||
aGroupPrefix += ": formula-group: ";
|
||||
OUString aGroupPrefix = aName +
|
||||
": formula-group: ";
|
||||
aGroupPrefix += rCell.aPos.Format(ScRefFlags::VALID | ScRefFlags::TAB_3D, &rDoc, rDoc.GetAddressConvention());
|
||||
aGroupPrefix += ": ";
|
||||
|
||||
|
|
|
@ -115,8 +115,7 @@ bool ScRangeUtil::IsAbsTabArea( const OUString& rAreaStr,
|
|||
|
||||
if ( -1 == aTempAreaStr.indexOf(':') )
|
||||
{
|
||||
aTempAreaStr += ":";
|
||||
aTempAreaStr += rAreaStr;
|
||||
aTempAreaStr += ":" + rAreaStr;
|
||||
}
|
||||
|
||||
sal_Int32 nColonPos = aTempAreaStr.indexOf(':');
|
||||
|
|
|
@ -1192,8 +1192,7 @@ void XclExpChText::ConvertTitle( Reference< XTitle > const & xTitle, sal_uInt16
|
|||
if (pSubTitle)
|
||||
{
|
||||
// append subtitle as the 2nd line of the title.
|
||||
OUString aSubTitle("\n");
|
||||
aSubTitle += *pSubTitle;
|
||||
OUString aSubTitle = "\n" + *pSubTitle;
|
||||
mxSrcLink->AppendString(aSubTitle);
|
||||
}
|
||||
|
||||
|
|
|
@ -566,8 +566,7 @@ void LotusToSc::Convert( std::unique_ptr<ScTokenArray>& rpErg, sal_Int32& rRest
|
|||
aStack << aPool.Store( nRngIndex );
|
||||
else
|
||||
{
|
||||
OUString aText( "NRREF ");
|
||||
aText += aTmp;
|
||||
OUString aText = "NRREF " + aTmp;
|
||||
aStack << aPool.Store( aText );
|
||||
}
|
||||
}
|
||||
|
@ -579,8 +578,7 @@ void LotusToSc::Convert( std::unique_ptr<ScTokenArray>& rpErg, sal_Int32& rRest
|
|||
aStack << aPool.Store( nRngIndex );
|
||||
else
|
||||
{
|
||||
OUString aText( "ABSNREF " );
|
||||
aText += aTmp;
|
||||
OUString aText = "ABSNREF " + aTmp;
|
||||
aStack << aPool.Store( aText );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -183,9 +183,7 @@ OUString ScMyValidationsContainer::GetCondition(ScXMLExport& rExport, const ScMy
|
|||
sCondition += "cell-content-is-decimal-number()";
|
||||
break;
|
||||
case sheet::ValidationType_LIST :
|
||||
sCondition += "cell-content-is-in-list(";
|
||||
sCondition += aValidation.sFormula1;
|
||||
sCondition += ")";
|
||||
sCondition += "cell-content-is-in-list(" + aValidation.sFormula1 + ")";
|
||||
break;
|
||||
case sheet::ValidationType_TEXT_LEN :
|
||||
if (aValidation.aOperator != sheet::ConditionOperator_BETWEEN &&
|
||||
|
@ -199,9 +197,7 @@ OUString ScMyValidationsContainer::GetCondition(ScXMLExport& rExport, const ScMy
|
|||
sCondition += "cell-content-is-whole-number()";
|
||||
break;
|
||||
case sheet::ValidationType_CUSTOM :
|
||||
sCondition += "is-true-formula(";
|
||||
sCondition += aValidation.sFormula1;
|
||||
sCondition += ")";
|
||||
sCondition += "is-true-formula(" + aValidation.sFormula1 + ")";
|
||||
break;
|
||||
default:
|
||||
{
|
||||
|
@ -265,10 +261,7 @@ OUString ScMyValidationsContainer::GetCondition(ScXMLExport& rExport, const ScMy
|
|||
else
|
||||
sCondition += "cell-content-is-not-between(";
|
||||
}
|
||||
sCondition += aValidation.sFormula1;
|
||||
sCondition += ",";
|
||||
sCondition += aValidation.sFormula2;
|
||||
sCondition += ")";
|
||||
sCondition += aValidation.sFormula1 + "," + aValidation.sFormula2 + ")";
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
|
@ -1170,10 +1170,9 @@ sal_Int32 ScXMLImport::SetCurrencySymbol(const sal_Int32 nKey, const OUString& r
|
|||
}
|
||||
catch ( const util::MalformedNumberFormatException& rException )
|
||||
{
|
||||
OUString sErrorMessage("Error in Formatstring ");
|
||||
sErrorMessage += sFormatString;
|
||||
sErrorMessage += " at position ";
|
||||
sErrorMessage += OUString::number(rException.CheckPos);
|
||||
OUString sErrorMessage ="Error in Formatstring " +
|
||||
sFormatString + " at position " +
|
||||
OUString::number(rException.CheckPos);
|
||||
uno::Sequence<OUString> aSeq { sErrorMessage };
|
||||
uno::Reference<xml::sax::XLocator> xLocator;
|
||||
SetError(XMLERROR_API | XMLERROR_FLAG_ERROR, aSeq, rException.Message, xLocator);
|
||||
|
|
|
@ -493,8 +493,8 @@ uno::Any SAL_CALL ScAccessibleCell::getExtendedAttributes()
|
|||
OUString strFor = mpViewShell->GetFormula(maCellAddress) ;
|
||||
strFor = strFor.replaceAt(0,1,"");
|
||||
strFor = ReplaceFourChar(strFor);
|
||||
strFor = "Formula:" + strFor;
|
||||
strFor += ";Note:";
|
||||
strFor = "Formula:" + strFor +
|
||||
";Note:";
|
||||
strFor += ReplaceFourChar(GetAllDisplayNote());
|
||||
strFor += ";";
|
||||
strFor += getShadowAttrs();//the string returned contains the spliter ";"
|
||||
|
|
|
@ -401,18 +401,18 @@ OUString ScAccessibleCellBase::getShadowAttrs() const
|
|||
return sShadowAttrs;
|
||||
}
|
||||
//else return all the shadow properties
|
||||
sShadowAttrs += "Location=";
|
||||
sShadowAttrs += OUString::number( nLocationVal );
|
||||
sShadowAttrs += sInnerSplit;
|
||||
sShadowAttrs += "ShadowWidth=";
|
||||
sShadowAttrs += OUString::number( static_cast<sal_Int32>(aShadowFmt.ShadowWidth) ) ;
|
||||
sShadowAttrs += sInnerSplit;
|
||||
sShadowAttrs += "IsTransparent=";
|
||||
sShadowAttrs += OUString::number( static_cast<int>(aShadowFmt.IsTransparent) ) ;
|
||||
sShadowAttrs += sInnerSplit;
|
||||
sShadowAttrs += "Color=";
|
||||
sShadowAttrs += OUString::number( static_cast<sal_Int32>(aShadowFmt.Color) );
|
||||
sShadowAttrs += sOuterSplit;
|
||||
sShadowAttrs += "Location=" +
|
||||
OUString::number( nLocationVal ) +
|
||||
sInnerSplit +
|
||||
"ShadowWidth=" +
|
||||
OUString::number( static_cast<sal_Int32>(aShadowFmt.ShadowWidth) ) +
|
||||
sInnerSplit +
|
||||
"IsTransparent=" +
|
||||
OUString::number( static_cast<int>(aShadowFmt.IsTransparent) ) +
|
||||
sInnerSplit +
|
||||
"Color=" +
|
||||
OUString::number( static_cast<sal_Int32>(aShadowFmt.Color) ) +
|
||||
sOuterSplit;
|
||||
return sShadowAttrs;
|
||||
}
|
||||
|
||||
|
@ -488,18 +488,18 @@ OUString ScAccessibleCellBase::getBorderAttrs()
|
|||
}
|
||||
else//add all the border properties to the return string.
|
||||
{
|
||||
sBorderAttrs += "TopBorder:Color=";
|
||||
sBorderAttrs += OUString::number( static_cast<sal_Int32>(aTopBorder.Color) );
|
||||
sBorderAttrs += sInnerSplit;
|
||||
sBorderAttrs += "InnerLineWidth=";
|
||||
sBorderAttrs += OUString::number( static_cast<sal_Int32>(aTopBorder.InnerLineWidth) );
|
||||
sBorderAttrs += sInnerSplit;
|
||||
sBorderAttrs += "OuterLineWidth=";
|
||||
sBorderAttrs += OUString::number( static_cast<sal_Int32>(aTopBorder.OuterLineWidth) );
|
||||
sBorderAttrs += sInnerSplit;
|
||||
sBorderAttrs += "LineDistance=";
|
||||
sBorderAttrs += OUString::number( static_cast<sal_Int32>(aTopBorder.LineDistance) );
|
||||
sBorderAttrs += sOuterSplit;
|
||||
sBorderAttrs += "TopBorder:Color=" +
|
||||
OUString::number( static_cast<sal_Int32>(aTopBorder.Color) ) +
|
||||
sInnerSplit +
|
||||
"InnerLineWidth=" +
|
||||
OUString::number( static_cast<sal_Int32>(aTopBorder.InnerLineWidth) ) +
|
||||
sInnerSplit +
|
||||
"OuterLineWidth=" +
|
||||
OUString::number( static_cast<sal_Int32>(aTopBorder.OuterLineWidth) ) +
|
||||
sInnerSplit +
|
||||
"LineDistance=" +
|
||||
OUString::number( static_cast<sal_Int32>(aTopBorder.LineDistance) ) +
|
||||
sOuterSplit;
|
||||
}
|
||||
//bottom border
|
||||
if ( aBottomBorder.InnerLineWidth == 0 && aBottomBorder.OuterLineWidth == 0 )
|
||||
|
@ -508,18 +508,18 @@ OUString ScAccessibleCellBase::getBorderAttrs()
|
|||
}
|
||||
else
|
||||
{
|
||||
sBorderAttrs += "BottomBorder:Color=";
|
||||
sBorderAttrs += OUString::number( static_cast<sal_Int32>(aBottomBorder.Color) );
|
||||
sBorderAttrs += sInnerSplit;
|
||||
sBorderAttrs += "InnerLineWidth=";
|
||||
sBorderAttrs += OUString::number( static_cast<sal_Int32>(aBottomBorder.InnerLineWidth) );
|
||||
sBorderAttrs += sInnerSplit;
|
||||
sBorderAttrs += "OuterLineWidth=";
|
||||
sBorderAttrs += OUString::number( static_cast<sal_Int32>(aBottomBorder.OuterLineWidth) );
|
||||
sBorderAttrs += sInnerSplit;
|
||||
sBorderAttrs += "LineDistance=";
|
||||
sBorderAttrs += OUString::number( static_cast<sal_Int32>(aBottomBorder.LineDistance) );
|
||||
sBorderAttrs += sOuterSplit;
|
||||
sBorderAttrs += "BottomBorder:Color=" +
|
||||
OUString::number( static_cast<sal_Int32>(aBottomBorder.Color) ) +
|
||||
sInnerSplit +
|
||||
"InnerLineWidth=" +
|
||||
OUString::number( static_cast<sal_Int32>(aBottomBorder.InnerLineWidth) ) +
|
||||
sInnerSplit +
|
||||
"OuterLineWidth=" +
|
||||
OUString::number( static_cast<sal_Int32>(aBottomBorder.OuterLineWidth) ) +
|
||||
sInnerSplit +
|
||||
"LineDistance=" +
|
||||
OUString::number( static_cast<sal_Int32>(aBottomBorder.LineDistance) ) +
|
||||
sOuterSplit;
|
||||
}
|
||||
//left border
|
||||
if ( aLeftBorder.InnerLineWidth == 0 && aLeftBorder.OuterLineWidth == 0 )
|
||||
|
@ -528,18 +528,18 @@ OUString ScAccessibleCellBase::getBorderAttrs()
|
|||
}
|
||||
else
|
||||
{
|
||||
sBorderAttrs += "LeftBorder:Color=";
|
||||
sBorderAttrs += OUString::number( static_cast<sal_Int32>(aLeftBorder.Color) );
|
||||
sBorderAttrs += sInnerSplit;
|
||||
sBorderAttrs += "InnerLineWidth=";
|
||||
sBorderAttrs += OUString::number( static_cast<sal_Int32>(aLeftBorder.InnerLineWidth) );
|
||||
sBorderAttrs += sInnerSplit;
|
||||
sBorderAttrs += "OuterLineWidth=";
|
||||
sBorderAttrs += OUString::number( static_cast<sal_Int32>(aLeftBorder.OuterLineWidth) );
|
||||
sBorderAttrs += sInnerSplit;
|
||||
sBorderAttrs += "LineDistance=";
|
||||
sBorderAttrs += OUString::number( static_cast<sal_Int32>(aLeftBorder.LineDistance) );
|
||||
sBorderAttrs += sOuterSplit;
|
||||
sBorderAttrs += "LeftBorder:Color=" +
|
||||
OUString::number( static_cast<sal_Int32>(aLeftBorder.Color) ) +
|
||||
sInnerSplit +
|
||||
"InnerLineWidth=" +
|
||||
OUString::number( static_cast<sal_Int32>(aLeftBorder.InnerLineWidth) ) +
|
||||
sInnerSplit +
|
||||
"OuterLineWidth=" +
|
||||
OUString::number( static_cast<sal_Int32>(aLeftBorder.OuterLineWidth) ) +
|
||||
sInnerSplit +
|
||||
"LineDistance=" +
|
||||
OUString::number( static_cast<sal_Int32>(aLeftBorder.LineDistance) ) +
|
||||
sOuterSplit;
|
||||
}
|
||||
//right border
|
||||
if ( aRightBorder.InnerLineWidth == 0 && aRightBorder.OuterLineWidth == 0 )
|
||||
|
@ -548,18 +548,18 @@ OUString ScAccessibleCellBase::getBorderAttrs()
|
|||
}
|
||||
else
|
||||
{
|
||||
sBorderAttrs += "RightBorder:Color=";
|
||||
sBorderAttrs += OUString::number( static_cast<sal_Int32>(aRightBorder.Color) );
|
||||
sBorderAttrs += sInnerSplit;
|
||||
sBorderAttrs += "InnerLineWidth=";
|
||||
sBorderAttrs += OUString::number( static_cast<sal_Int32>(aRightBorder.InnerLineWidth) );
|
||||
sBorderAttrs += sInnerSplit;
|
||||
sBorderAttrs += "OuterLineWidth=";
|
||||
sBorderAttrs += OUString::number( static_cast<sal_Int32>(aRightBorder.OuterLineWidth) );
|
||||
sBorderAttrs += sInnerSplit;
|
||||
sBorderAttrs += "LineDistance=";
|
||||
sBorderAttrs += OUString::number( static_cast<sal_Int32>(aRightBorder.LineDistance) );
|
||||
sBorderAttrs += sOuterSplit;
|
||||
sBorderAttrs += "RightBorder:Color=" +
|
||||
OUString::number( static_cast<sal_Int32>(aRightBorder.Color) ) +
|
||||
sInnerSplit +
|
||||
"InnerLineWidth=" +
|
||||
OUString::number( static_cast<sal_Int32>(aRightBorder.InnerLineWidth) ) +
|
||||
sInnerSplit +
|
||||
"OuterLineWidth=" +
|
||||
OUString::number( static_cast<sal_Int32>(aRightBorder.OuterLineWidth) ) +
|
||||
sInnerSplit +
|
||||
"LineDistance=" +
|
||||
OUString::number( static_cast<sal_Int32>(aRightBorder.LineDistance) ) +
|
||||
sOuterSplit;
|
||||
}
|
||||
return sBorderAttrs;
|
||||
}
|
||||
|
|
|
@ -2224,8 +2224,7 @@ uno::Any SAL_CALL ScAccessibleDocument::getExtendedAttributes()
|
|||
sName = "page-name:";
|
||||
sValue = sName + sSheetName ;
|
||||
sName = ";page-number:";
|
||||
sValue += sName;
|
||||
sValue += OUString::number(sheetIndex+1) ;
|
||||
sValue += sName + OUString::number(sheetIndex+1) ;
|
||||
sName = ";total-pages:";
|
||||
sValue += sName;
|
||||
sValue += OUString::number(GetDocument()->GetTableCount());
|
||||
|
|
|
@ -1502,8 +1502,7 @@ OUString ScAccessibleDocumentPagePreview::getAccessibleName()
|
|||
|
||||
if (!aFileName.isEmpty())
|
||||
{
|
||||
aName = aFileName + " - " + aName;
|
||||
aName += ScResId(STR_ACC_DOC_PREVIEW_SUFFIX);
|
||||
aName = aFileName + " - " + aName + ScResId(STR_ACC_DOC_PREVIEW_SUFFIX);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -364,11 +364,8 @@ void ScColRowNameRangesDlg::UpdateNames()
|
|||
OUString rString;
|
||||
const ScAddress::Details aDetails(pDoc->GetAddressConvention());
|
||||
|
||||
OUString aString;
|
||||
OUString strDelim(" --- ");
|
||||
aString = strDelim;
|
||||
aString += ScResId( STR_COLUMN );
|
||||
aString += strDelim;
|
||||
OUString aString = strDelim + ScResId( STR_COLUMN ) + strDelim;
|
||||
m_xLbRange->append(OUString::number(nEntryDataDelim), aString);
|
||||
if ( (nCount = xColNameRanges->size()) > 0 )
|
||||
{
|
||||
|
@ -407,9 +404,7 @@ void ScColRowNameRangesDlg::UpdateNames()
|
|||
m_xLbRange->append(OUString::number(nEntryDataDelim), aInsStr);
|
||||
}
|
||||
}
|
||||
aString = strDelim;
|
||||
aString += ScResId( STR_ROW );
|
||||
aString += strDelim;
|
||||
aString = strDelim + ScResId( STR_ROW ) + strDelim;
|
||||
m_xLbRange->append(OUString::number(nEntryDataDelim), aString);
|
||||
if ( (nCount = xRowNameRanges->size()) > 0 )
|
||||
{
|
||||
|
|
|
@ -215,8 +215,7 @@ void ScMoveTableDlg::InitDocListBox()
|
|||
if ( pScSh == SfxObjectShell::Current() )
|
||||
{
|
||||
mnCurrentDocPos = nSelPos = i;
|
||||
aEntryName += " ";
|
||||
aEntryName += msCurrentDoc;
|
||||
aEntryName += " " + msCurrentDoc;
|
||||
}
|
||||
|
||||
OUString sId(OUString::number(reinterpret_cast<sal_uInt64>(&pScSh->GetDocument())));
|
||||
|
|
|
@ -188,8 +188,7 @@ void ScShareDocumentDlg::UpdateView()
|
|||
// unknown user name
|
||||
aUser = m_aStrUnknownUser;
|
||||
}
|
||||
aUser += " ";
|
||||
aUser += m_aStrExclusiveAccess;
|
||||
aUser += " " + m_aStrExclusiveAccess;
|
||||
|
||||
uno::Reference<document::XDocumentPropertiesSupplier> xDPS(mpDocShell->GetModel(), uno::UNO_QUERY_THROW);
|
||||
uno::Reference<document::XDocumentProperties> xDocProps = xDPS->getDocumentProperties();
|
||||
|
|
|
@ -198,8 +198,7 @@ void ScSolverOptionsDialog::FillListBox()
|
|||
if (aValue >>= fDoubleValue)
|
||||
m_aOptions.back()->SetDoubleValue(fDoubleValue);
|
||||
|
||||
OUString sTxt(aVisName);
|
||||
sTxt += ": ";
|
||||
OUString sTxt = aVisName + ": ";
|
||||
sTxt += rtl::math::doubleToUString(fDoubleValue,
|
||||
rtl_math_StringFormat_Automatic, rtl_math_DecimalPlaces_Max,
|
||||
ScGlobal::GetpLocaleData()->getNumDecimalSep()[0], true );
|
||||
|
@ -212,9 +211,7 @@ void ScSolverOptionsDialog::FillListBox()
|
|||
if (aValue >>= nIntValue)
|
||||
m_aOptions.back()->SetIntValue(nIntValue);
|
||||
|
||||
OUString sTxt(aVisName);
|
||||
sTxt += ": ";
|
||||
sTxt += OUString::number(nIntValue);
|
||||
OUString sTxt = aVisName + ": " + OUString::number(nIntValue);
|
||||
|
||||
m_xLbSettings->set_text(nPos, sTxt, 1);
|
||||
}
|
||||
|
|
|
@ -981,8 +981,7 @@ void ScNavigatorDlg::GetDocNames( const OUString* pManualSel )
|
|||
OUString aHidden = aLbEntries->GetHiddenTitle();
|
||||
if (!aHidden.isEmpty())
|
||||
{
|
||||
OUString aEntry = aHidden;
|
||||
aEntry += aStrHidden;
|
||||
OUString aEntry = aHidden + aStrHidden;
|
||||
aLbDocuments->InsertEntry( aEntry );
|
||||
|
||||
if ( pManualSel && aHidden == *pManualSel )
|
||||
|
|
|
@ -226,8 +226,8 @@ void ScHFEditPage::InitPreDefinedList()
|
|||
OUString aUserNameEntry(aUserOpt.GetFirstName() + " " + aUserOpt.GetLastName() + ", " + aPageEntry + ", " + aDateFieldValue);
|
||||
m_xLbDefined->append_text( aUserNameEntry);
|
||||
|
||||
OUString aCreatedByEntry( m_xFtCreatedBy->get_label() + " " + aUserOpt.GetFirstName() + " " + aUserOpt.GetLastName() + ", ");
|
||||
aCreatedByEntry += aDateFieldValue + ", " + aPageEntry;
|
||||
OUString aCreatedByEntry = m_xFtCreatedBy->get_label() + " " + aUserOpt.GetFirstName() + " " + aUserOpt.GetLastName() + ", " +
|
||||
aDateFieldValue + ", " + aPageEntry;
|
||||
m_xLbDefined->append_text( aCreatedByEntry);
|
||||
}
|
||||
|
||||
|
|
|
@ -193,8 +193,8 @@ IMPL_LINK_NOARG(ScHFPage, BtnHdl, weld::Button&, void)
|
|||
SvxNumType eNumType = aDataSet.Get(ATTR_PAGE).GetNumType();
|
||||
static_cast<ScHFEditPage*>(aDlg.GetTabPage())->SetNumType(eNumType);
|
||||
|
||||
aText += " (" + ScResId( STR_PAGESTYLE );
|
||||
aText += ": " + aStrPageStyle + ")";
|
||||
aText += " (" + ScResId( STR_PAGESTYLE ) +
|
||||
": " + aStrPageStyle + ")";
|
||||
|
||||
aDlg.set_title(aText);
|
||||
|
||||
|
|
|
@ -140,14 +140,14 @@ IMPL_LINK_NOARG( NumberFormatPropertyPanel, NumFormatValueHdl, Edit&, void )
|
|||
OUString sPrecision = OUString::number(nPrecision);
|
||||
OUString sLeadZeroes = OUString::number(nLeadZeroes);
|
||||
|
||||
aFormat += sThousand;
|
||||
aFormat += sBreak;
|
||||
aFormat += sNegRed;
|
||||
aFormat += sBreak;
|
||||
aFormat += sPrecision;
|
||||
aFormat += sBreak;
|
||||
aFormat += sLeadZeroes;
|
||||
aFormat += sBreak;
|
||||
aFormat += sThousand +
|
||||
sBreak +
|
||||
sNegRed +
|
||||
sBreak +
|
||||
sPrecision +
|
||||
sBreak +
|
||||
sLeadZeroes +
|
||||
sBreak;
|
||||
|
||||
SfxStringItem aItem( SID_NUMBER_FORMAT, aFormat );
|
||||
GetBindings()->GetDispatcher()->ExecuteList(SID_NUMBER_FORMAT,
|
||||
|
|
|
@ -3019,8 +3019,7 @@ public:
|
|||
{
|
||||
if ( meOrigin != chart2::data::LabelOrigin_LONG_SIDE)
|
||||
{
|
||||
OUString aString = ScResId(STR_COLUMN);
|
||||
aString += " ";
|
||||
OUString aString = ScResId(STR_COLUMN) + " ";
|
||||
ScAddress aPos( nCol, 0, 0 );
|
||||
OUString aColStr(aPos.Format(ScRefFlags::COL_VALID));
|
||||
aString += aColStr;
|
||||
|
|
|
@ -544,17 +544,16 @@ int ScModelObj::getPart()
|
|||
|
||||
OUString ScModelObj::getPartInfo( int nPart )
|
||||
{
|
||||
OUString aPartInfo;
|
||||
ScViewData* pViewData = ScDocShell::GetViewData();
|
||||
const bool bIsVisible = pViewData->GetDocument()->IsVisible(nPart);
|
||||
//FIXME: Implement IsSelected().
|
||||
const bool bIsSelected = false; //pViewData->GetDocument()->IsSelected(nPart);
|
||||
|
||||
aPartInfo += "{ \"visible\": \"";
|
||||
aPartInfo += OUString::number(static_cast<unsigned int>(bIsVisible));
|
||||
aPartInfo += "\", \"selected\": \"";
|
||||
aPartInfo += OUString::number(static_cast<unsigned int>(bIsSelected));
|
||||
aPartInfo += "\" }";
|
||||
OUString aPartInfo = "{ \"visible\": \"" +
|
||||
OUString::number(static_cast<unsigned int>(bIsVisible)) +
|
||||
"\", \"selected\": \"" +
|
||||
OUString::number(static_cast<unsigned int>(bIsSelected)) +
|
||||
"\" }";
|
||||
return aPartInfo;
|
||||
}
|
||||
|
||||
|
|
|
@ -397,8 +397,7 @@ sal_Bool SAL_CALL ScTableConditionalFormat::hasElements()
|
|||
|
||||
static OUString lcl_GetEntryNameFromIndex( sal_Int32 nIndex )
|
||||
{
|
||||
OUString aRet( "Entry" );
|
||||
aRet += OUString::number( nIndex );
|
||||
OUString aRet = "Entry" + OUString::number( nIndex );
|
||||
return aRet;
|
||||
}
|
||||
|
||||
|
|
|
@ -2550,14 +2550,14 @@ void ScFormatShell::GetNumFormatState( SfxItemSet& rSet )
|
|||
const OUString sPrecision = OUString::number(nPrecision);
|
||||
const OUString sLeadZeroes = OUString::number(nLeadZeroes);
|
||||
|
||||
aFormat += sThousand;
|
||||
aFormat += sBreak;
|
||||
aFormat += sNegRed;
|
||||
aFormat += sBreak;
|
||||
aFormat += sPrecision;
|
||||
aFormat += sBreak;
|
||||
aFormat += sLeadZeroes;
|
||||
aFormat += sBreak;
|
||||
aFormat += sThousand +
|
||||
sBreak +
|
||||
sNegRed +
|
||||
sBreak +
|
||||
sPrecision +
|
||||
sBreak +
|
||||
sLeadZeroes +
|
||||
sBreak;
|
||||
|
||||
rSet.Put(SfxStringItem(nWhich, aFormat));
|
||||
}
|
||||
|
|
|
@ -2424,12 +2424,11 @@ void lcl_createGroupsData(
|
|||
|
||||
bool bGroupHidden = pEntry->IsHidden();
|
||||
|
||||
OUString aGroupData;
|
||||
aGroupData += "{ \"level\": \"" + OUString::number(nLevel + 1) + "\", ";
|
||||
aGroupData += "\"index\": \"" + OUString::number(nIndex) + "\", ";
|
||||
aGroupData += "\"startPos\": \"" + OUString::number(rGroupStartPositions[nLevel]) + "\", ";
|
||||
aGroupData += "\"endPos\": \"" + OUString::number(nTotalTwips) + "\", ";
|
||||
aGroupData += "\"hidden\": \"" + OUString::number(bGroupHidden ? 1 : 0) + "\" }";
|
||||
OUString aGroupData = "{ \"level\": \"" + OUString::number(nLevel + 1) + "\", "
|
||||
"\"index\": \"" + OUString::number(nIndex) + "\", "
|
||||
"\"startPos\": \"" + OUString::number(rGroupStartPositions[nLevel]) + "\", "
|
||||
"\"endPos\": \"" + OUString::number(nTotalTwips) + "\", "
|
||||
"\"hidden\": \"" + OUString::number(bGroupHidden ? 1 : 0) + "\" }";
|
||||
|
||||
rGroupsBuffer += aGroupData;
|
||||
|
||||
|
@ -2593,8 +2592,7 @@ OUString ScTabView::getRowColumnHeaders(const tools::Rectangle& rRectangle)
|
|||
aBuffer.append("\"groupLevels\": \"").append(OUString::number(nRowGroupDepth)).append("\" }");
|
||||
}
|
||||
|
||||
OUString aRowGroupsBuffer;
|
||||
aRowGroupsBuffer += "\"rowGroups\": [\n";
|
||||
OUString aRowGroupsBuffer = "\"rowGroups\": [\n";
|
||||
std::vector<long> aRowGroupStartPositions(nRowGroupDepth, -nTotalPixels);
|
||||
long nPrevSizePx = -1;
|
||||
for (SCROW nRow = nStartRow + 1; nRow <= nEndRow; ++nRow)
|
||||
|
@ -2737,8 +2735,7 @@ OUString ScTabView::getRowColumnHeaders(const tools::Rectangle& rRectangle)
|
|||
aBuffer.append("\"groupLevels\": \"").append(OUString::number(nColGroupDepth)).append("\" }");
|
||||
}
|
||||
|
||||
OUString aColGroupsBuffer;
|
||||
aColGroupsBuffer += "\"columnGroups\": [\n";
|
||||
OUString aColGroupsBuffer = "\"columnGroups\": [\n";
|
||||
std::vector<long> aColGroupStartPositions(nColGroupDepth, -nTotalPixels);
|
||||
nPrevSizePx = -1;
|
||||
for (SCCOL nCol = nStartCol + 1; nCol <= nEndCol; ++nCol)
|
||||
|
|
|
@ -111,8 +111,7 @@ bool ScTabViewShell::GetFunction( OUString& rFuncStr, FormulaError nErrCode )
|
|||
SCROW nPosY = rViewData.GetCurY();
|
||||
SCTAB nTab = rViewData.GetTabNo();
|
||||
|
||||
OUString aStr = ScResId(pGlobStrId);
|
||||
aStr += ": ";
|
||||
OUString aStr = ScResId(pGlobStrId) + ": ";
|
||||
|
||||
ScAddress aCursor( nPosX, nPosY, nTab );
|
||||
double nVal;
|
||||
|
|
|
@ -2138,16 +2138,16 @@ void ScViewFunc::Solve( const ScSolveParam& rParam )
|
|||
|
||||
if ( bExact )
|
||||
{
|
||||
aMsgStr += ScResId( STR_MSSG_SOLVE_0 );
|
||||
aMsgStr += aResStr;
|
||||
aMsgStr += ScResId( STR_MSSG_SOLVE_1 );
|
||||
aMsgStr += ScResId( STR_MSSG_SOLVE_0 ) +
|
||||
aResStr +
|
||||
ScResId( STR_MSSG_SOLVE_1 );
|
||||
}
|
||||
else
|
||||
{
|
||||
aMsgStr = ScResId( STR_MSSG_SOLVE_2 );
|
||||
aMsgStr += ScResId( STR_MSSG_SOLVE_3 );
|
||||
aMsgStr += aResStr ;
|
||||
aMsgStr += ScResId( STR_MSSG_SOLVE_4 );
|
||||
aMsgStr = ScResId( STR_MSSG_SOLVE_2 ) +
|
||||
ScResId( STR_MSSG_SOLVE_3 ) +
|
||||
aResStr +
|
||||
ScResId( STR_MSSG_SOLVE_4 );
|
||||
}
|
||||
|
||||
std::unique_ptr<weld::MessageDialog> xBox(Application::CreateMessageDialog(GetViewData().GetDialogParent(),
|
||||
|
|
|
@ -451,8 +451,7 @@ void ScViewFunc::EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab,
|
|||
nResult = RET_NO; // empty formula, just '='
|
||||
else
|
||||
{
|
||||
OUString aMessage( ScResId( SCSTR_FORMULA_AUTOCORRECTION ) );
|
||||
aMessage += aCorrectedFormula;
|
||||
OUString aMessage = ScResId( SCSTR_FORMULA_AUTOCORRECTION ) + aCorrectedFormula;
|
||||
|
||||
std::unique_ptr<weld::MessageDialog> xQueryBox(Application::CreateMessageDialog(GetViewData().GetDialogParent(),
|
||||
VclMessageType::Question, VclButtonsType::YesNo,
|
||||
|
|
|
@ -236,8 +236,7 @@ OUString SAL_CALL ScaDateAddIn::getDisplayFunctionName( const OUString& aProgram
|
|||
}
|
||||
else
|
||||
{
|
||||
aRet = "UNKNOWNFUNC_";
|
||||
aRet += aProgrammaticName;
|
||||
aRet = "UNKNOWNFUNC_" + aProgrammaticName;
|
||||
}
|
||||
|
||||
return aRet;
|
||||
|
|
|
@ -238,8 +238,7 @@ OUString SAL_CALL ScaPricingAddIn::getDisplayFunctionName( const OUString& aProg
|
|||
}
|
||||
else
|
||||
{
|
||||
aRet = "UNKNOWNFUNC_";
|
||||
aRet += aProgrammaticName;
|
||||
aRet = "UNKNOWNFUNC_" + aProgrammaticName;
|
||||
}
|
||||
|
||||
return aRet;
|
||||
|
|
|
@ -613,9 +613,7 @@ namespace dlgprov
|
|||
|
||||
OUString aOUFinal;
|
||||
aOUFinal += aRes.copy( 0, nIndex );
|
||||
aOUFinal += aQuoteChar;
|
||||
aOUFinal += aMethodName;
|
||||
aOUFinal += aQuoteChar;
|
||||
aOUFinal += aQuoteChar + aMethodName + aQuoteChar;
|
||||
aOUFinal += aRes.copy( nIndex + 2 );
|
||||
|
||||
std::unique_ptr<weld::MessageDialog> xBox(Application::CreateMessageDialog(nullptr,
|
||||
|
|
|
@ -1628,21 +1628,18 @@ static OUString implGetNameScemeForLocaleItem( const LocaleItem* pLocaleItem )
|
|||
"StringResourcePersistenceImpl::implGetNameScemeForLocaleItem(): pLocaleItem == NULL" );
|
||||
Locale aLocale = pLocaleItem->m_locale;
|
||||
|
||||
OUString aRetStr = aUnder;
|
||||
aRetStr += aLocale.Language;
|
||||
OUString aRetStr = aUnder + aLocale.Language;
|
||||
|
||||
OUString aCountry = aLocale.Country;
|
||||
if( !aCountry.isEmpty() )
|
||||
{
|
||||
aRetStr += aUnder;
|
||||
aRetStr += aCountry;
|
||||
aRetStr += aUnder + aCountry;
|
||||
}
|
||||
|
||||
OUString aVariant = aLocale.Variant;
|
||||
if( !aVariant.isEmpty() )
|
||||
{
|
||||
aRetStr += aUnder;
|
||||
aRetStr += aVariant;
|
||||
aRetStr += aUnder + aVariant;
|
||||
}
|
||||
return aRetStr;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue