Kaydet (Commit) 37729618 authored tarafından Gökhan Gurbetoğlu's avatar Gökhan Gurbetoğlu 🇹🇷 Kaydeden (comit) Noel Grandin

tdf#100726 - Improve readability of OUString concatanations

Change-Id: I3ba75dbe6754b8138f61e223387832a6fb53c1c5
Reviewed-on: https://gerrit.libreoffice.org/52752Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 821371fb
......@@ -119,12 +119,10 @@ rtl_TextEncoding ScfTools::GetSystemTextEncoding()
OUString ScfTools::GetHexStr( sal_uInt16 nValue )
{
const sal_Char pHex[] = "0123456789ABCDEF";
OUString aStr;
aStr += OUString( pHex[ nValue >> 12 ] );
aStr += OUString( pHex[ (nValue >> 8) & 0x000F ] );
aStr += OUString( pHex[ (nValue >> 4) & 0x000F ] );
aStr += OUString( pHex[ nValue & 0x000F ] );
OUString aStr = OUString( pHex[ nValue >> 12 ] )
+ OUString( pHex[ (nValue >> 8) & 0x000F ] )
+ OUString( pHex[ (nValue >> 4) & 0x000F ] )
+ OUString( pHex[ nValue & 0x000F ] );
return aStr;
}
......
......@@ -2100,12 +2100,12 @@ bool ScImportExport::Doc2Sylk( SvStream& rStrm )
rtl_math_StringFormat_Automatic,
rtl_math_DecimalPlaces_Max, '.', true );
aBufStr = "C;X";
aBufStr += OUString::number( c );
aBufStr += ";Y";
aBufStr += OUString::number( r );
aBufStr += ";K";
aBufStr += aValStr;
aBufStr = "C;X"
+ OUString::number( c )
+ ";Y"
+ OUString::number( r )
+ ";K"
+ aValStr;
lcl_WriteSimpleString( rStrm, aBufStr );
goto checkformula;
......@@ -2115,11 +2115,11 @@ bool ScImportExport::Doc2Sylk( SvStream& rStrm )
aCellStr = pDoc->GetString(nCol, nRow, aRange.aStart.Tab());
aCellStr = aCellStr.replaceAll("\n", SYLK_LF);
aBufStr = "C;X";
aBufStr += OUString::number( c );
aBufStr += ";Y";
aBufStr += OUString::number( r );
aBufStr += ";K";
aBufStr = "C;X"
+ OUString::number( c )
+ ";Y"
+ OUString::number( r )
+ ";K";
lcl_WriteSimpleString( rStrm, aBufStr );
lcl_WriteString( rStrm, aCellStr, '"', ';' );
......@@ -2160,21 +2160,21 @@ bool ScImportExport::Doc2Sylk( SvStream& rStrm )
pFCell->GetMatColsRows( nC, nR );
nC += c - 1;
nR += r - 1;
aPrefix = ";R";
aPrefix += OUString::number( nR );
aPrefix += ";C";
aPrefix += OUString::number( nC );
aPrefix += ";M";
aPrefix = ";R"
+ OUString::number( nR )
+ ";C"
+ OUString::number( nC )
+ ";M";
}
break;
case ScMatrixMode::Reference :
{ // diff expression with 'I' M$-extension
ScAddress aPos;
(void)pFCell->GetMatrixOrigin( aPos );
aPrefix = ";I;R";
aPrefix += OUString::number( aPos.Row() - nStartRow + 1 );
aPrefix += ";C";
aPrefix += OUString::number( aPos.Col() - nStartCol + 1 );
aPrefix = ";I;R"
+ OUString::number( aPos.Row() - nStartRow + 1 )
+ ";C"
+ OUString::number( aPos.Col() - nStartCol + 1 );
}
break;
default:
......
......@@ -174,14 +174,12 @@ public:
// close all still open tags
OUString HtmlState::Flush()
{
OUString aStr;
aStr += SetWeight(false);
aStr += SetItalic(false);
aStr += SetUnderline(false);
aStr += SetStrikeout(false);
aStr += SetColor(maDefColor);
aStr += SetLink("","");
OUString aStr = SetWeight(false)
+ SetItalic(false)
+ SetUnderline(false)
+ SetStrikeout(false)
+ SetColor(maDefColor)
+ SetLink("","");
return aStr;
}
......
......@@ -143,14 +143,13 @@ OUString CreateSizeText( sal_Int64 nSize )
{
aSizeStr = ::rtl::math::doubleToUString( fSize,
rtl_math_StringFormat_F, nDec,
rLocaleWrapper.getNumDecimalSep()[0] );
aSizeStr += aUnitStr;
aSizeStr += " (";
aSizeStr += rLocaleWrapper.getNum( nSize2, 0 );
aSizeStr += " ";
aSizeStr += SfxResId(STR_BYTES);
aSizeStr += ")";
rLocaleWrapper.getNumDecimalSep()[0] )
+ aUnitStr
+ " ("
+ rLocaleWrapper.getNum( nSize2, 0 )
+ " "
+ SfxResId(STR_BYTES)
+ ")";
}
return aSizeStr;
}
......@@ -161,9 +160,9 @@ OUString ConvertDateTime_Impl( const OUString& rName,
Date aD(uDT);
tools::Time aT(uDT);
const OUString aDelim( ", " );
OUString aStr( rWrapper.getDate( aD ) );
aStr += aDelim;
aStr += rWrapper.getTime( aT );
OUString aStr = rWrapper.getDate( aD )
+ aDelim
+ rWrapper.getTime( aT );
OUString aAuthor = comphelper::string::stripStart(rName, ' ');
if (!aAuthor.isEmpty())
{
......@@ -726,9 +725,9 @@ namespace
Date aDate( _nDate );
tools::Time aTime( _nTime );
OUString aStr( rWrapper.getDate( aDate ) );
aStr += ", ";
aStr += rWrapper.getTime( aTime );
OUString aStr = rWrapper.getDate( aDate )
+ ", "
+ rWrapper.getTime( aTime );
return aStr;
}
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment