diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-10-10 16:23:37 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-10-11 07:18:11 +0200 |
commit | cdbac696fb0cbb1d09645bc02799eed5504b192b (patch) | |
tree | 25ef63dbfb17fdafcd073cbc0c1d88bd5759e408 /sw/source | |
parent | cfd06eb99b8f366bfe96e4a6d3112e4c6057098b (diff) |
simplify "a = a +" to "a +="
mostly so that my stringadd loplugin can point out places to improve
Change-Id: I9920ee1c99cdb6b811ba67ff9d8e32aa261884b5
Reviewed-on: https://gerrit.libreoffice.org/80618
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source')
-rw-r--r-- | sw/source/core/access/acctable.cxx | 4 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8par5.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/utlui/attrdesc.cxx | 44 |
3 files changed, 24 insertions, 26 deletions
diff --git a/sw/source/core/access/acctable.cxx b/sw/source/core/access/acctable.cxx index 7094aeecbb01..6bb085d6a3bc 100644 --- a/sw/source/core/access/acctable.cxx +++ b/sw/source/core/access/acctable.cxx @@ -845,7 +845,7 @@ OUString SAL_CALL SwAccessibleTable::getAccessibleRowDescription( uno::Reference< XAccessibleText > xChildText( xChild, uno::UNO_QUERY ); if ( xChildText.is() ) { - sRowDesc = sRowDesc + xChildText->getText(); + sRowDesc += xChildText->getText(); } } } @@ -878,7 +878,7 @@ OUString SAL_CALL SwAccessibleTable::getAccessibleColumnDescription( uno::Reference< XAccessibleText > xChildText( xChild, uno::UNO_QUERY ); if ( xChildText.is() ) { - sColumnDesc = sColumnDesc + xChildText->getText(); + sColumnDesc += xChildText->getText(); } } } diff --git a/sw/source/filter/ww8/ww8par5.cxx b/sw/source/filter/ww8/ww8par5.cxx index e39d0416c431..89335622da0f 100644 --- a/sw/source/filter/ww8/ww8par5.cxx +++ b/sw/source/filter/ww8/ww8par5.cxx @@ -3521,7 +3521,7 @@ eF_ResT SwWW8ImplReader::Read_F_Hyperlink( WW8FieldDesc* /*pF*/, OUString& rStr OSL_ENSURE(!sURL.isEmpty() || !sMark.isEmpty(), "WW8: Empty URL"); if( !sMark.isEmpty() ) - sURL = sURL + "#" + sMark; + sURL += "#" + sMark; SwFormatINetFormat aURL(sURL, sTarget); // If on loading TOC field, change the default style into the "index link" diff --git a/sw/source/uibase/utlui/attrdesc.cxx b/sw/source/uibase/utlui/attrdesc.cxx index f6f88080bab2..7c5d9bee918e 100644 --- a/sw/source/uibase/utlui/attrdesc.cxx +++ b/sw/source/uibase/utlui/attrdesc.cxx @@ -99,9 +99,8 @@ bool SwFormatCharFormat::GetPresentation if ( pCharFormat ) { OUString aStr; - rText = SwResId( STR_CHARFMT ); pCharFormat->GetPresentation( ePres, eCoreUnit, ePresUnit, aStr ); - rText = rText + "(" + aStr + ")"; + rText = SwResId( STR_CHARFMT ) + "(" + aStr + ")"; } else rText = SwResId( STR_NO_CHARFMT ); @@ -158,8 +157,7 @@ bool SwFormatDrop::GetPresentation { rText = OUString::number( GetChars() ) + " "; } - rText = rText + - SwResId( STR_DROP_OVER ) + + rText += SwResId( STR_DROP_OVER ) + " " + OUString::number( GetLines() ) + " " + @@ -229,22 +227,22 @@ bool SwFormatFrameSize::GetPresentation rText = SwResId( STR_FRM_WIDTH ) + " "; if ( GetWidthPercent() ) { - rText = rText + unicode::formatPercent(GetWidthPercent(), + rText += unicode::formatPercent(GetWidthPercent(), Application::GetSettings().GetUILanguageTag()); } else { - rText = rText + ::GetMetricText( GetWidth(), eCoreUnit, ePresUnit, &rIntl ) + + rText += ::GetMetricText( GetWidth(), eCoreUnit, ePresUnit, &rIntl ) + " " + ::EditResId( ::GetMetricId( ePresUnit ) ); } if ( ATT_VAR_SIZE != GetHeightSizeType() ) { const char* pId = ATT_FIX_SIZE == m_eFrameHeightType ? STR_FRM_FIXEDHEIGHT : STR_FRM_MINHEIGHT; - rText = rText + ", " + SwResId(pId) + " "; + rText += ", " + SwResId(pId) + " "; if ( GetHeightPercent() ) { - rText = rText + unicode::formatPercent(GetHeightPercent(), + rText += unicode::formatPercent(GetHeightPercent(), Application::GetSettings().GetUILanguageTag()); } else @@ -327,7 +325,7 @@ bool SwFormatSurround::GetPresentation if ( IsAnchorOnly() ) { - rText = rText + " " + SwResId( STR_SURROUND_ANCHORONLY ); + rText += " " + SwResId( STR_SURROUND_ANCHORONLY ); } return true; } @@ -348,7 +346,7 @@ bool SwFormatVertOrient::GetPresentation { case text::VertOrientation::NONE: { - rText = rText + SwResId( STR_POS_Y ) + " " + + rText += SwResId( STR_POS_Y ) + " " + ::GetMetricText( GetPos(), eCoreUnit, ePresUnit, &rIntl ) + " " + EditResId( ::GetMetricId( ePresUnit ) ); } @@ -394,7 +392,7 @@ bool SwFormatHoriOrient::GetPresentation { case text::HoriOrientation::NONE: { - rText = rText + SwResId( STR_POS_X ) + " " + + rText += SwResId( STR_POS_X ) + " " + ::GetMetricText( GetPos(), eCoreUnit, ePresUnit, &rIntl ) + " " + EditResId( ::GetMetricId( ePresUnit ) ); } @@ -489,7 +487,7 @@ bool SwFormatCol::GetPresentation if ( COLADJ_NONE != GetLineAdj() ) { const long nWdth = static_cast<long>(GetLineWidth()); - rText = rText + " " + SwResId( STR_LINE_WIDTH ) + " " + + rText += " " + SwResId( STR_LINE_WIDTH ) + " " + ::GetMetricText( nWdth, eCoreUnit, MapUnit::MapPoint, &rIntl ); } @@ -517,13 +515,13 @@ bool SwFormatURL::GetPresentation { if ( m_pMap ) rText += " - "; - rText = rText + "URL: " + m_sURL; + rText += "URL: " + m_sURL; if ( m_bIsServerMap ) rText += " (Server-Map)"; } if ( !m_sTargetFrameName.isEmpty() ) { - rText = rText + ", Target: " + m_sTargetFrameName; + rText += ", Target: " + m_sTargetFrameName; } return true; } @@ -628,7 +626,7 @@ bool SwFormatLineNumber::GetPresentation rText += SwResId(STR_DONTLINECOUNT); if ( GetStartValue() ) { - rText = rText + " " + SwResId(STR_LINCOUNT_START) + + rText += " " + SwResId(STR_LINCOUNT_START) + OUString::number( GetStartValue() ); } return true; @@ -706,7 +704,7 @@ bool SwRotationGrf::GetPresentation( rText = SwResId( STR_ROTATION ); else if( rText.getLength() ) rText.clear(); - rText = rText + OUString::number( GetValue() ) + "\xB0"; + rText += OUString::number( GetValue() ) + "\xB0"; return true; } @@ -718,8 +716,8 @@ bool SwLuminanceGrf::GetPresentation( rText = SwResId( STR_LUMINANCE ); else if( rText.getLength() ) rText.clear(); - rText = rText + unicode::formatPercent(GetValue(), - Application::GetSettings().GetUILanguageTag()); + rText += unicode::formatPercent(GetValue(), + Application::GetSettings().GetUILanguageTag()); return true; } @@ -731,8 +729,8 @@ bool SwContrastGrf::GetPresentation( rText = SwResId( STR_CONTRAST ); else if( rText.getLength() ) rText.clear(); - rText = rText + unicode::formatPercent(GetValue(), - Application::GetSettings().GetUILanguageTag()); + rText += unicode::formatPercent(GetValue(), + Application::GetSettings().GetUILanguageTag()); return true; } @@ -757,8 +755,8 @@ bool SwChannelGrf::GetPresentation( } else if( rText.getLength() ) rText.clear(); - rText = rText + unicode::formatPercent(GetValue(), - Application::GetSettings().GetUILanguageTag()); + rText += unicode::formatPercent(GetValue(), + Application::GetSettings().GetUILanguageTag()); return true; } @@ -796,7 +794,7 @@ bool SwTransparencyGrf::GetPresentation( rText = SwResId( STR_TRANSPARENCY ); else if( rText.getLength() ) rText.clear(); - rText = rText + unicode::formatPercent(GetValue(), + rText += unicode::formatPercent(GetValue(), Application::GetSettings().GetUILanguageTag()); return true; } |