diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2019-11-02 19:52:33 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2019-11-02 21:47:38 +0100 |
commit | 7f305223fa6d6a1ad4a6f906b14f879cb01539be (patch) | |
tree | c48f2af6875094ab09853058323c804c6cb36d4c /sw | |
parent | ed94101d8c399f6de2e2b9b7cd31dd6b68d269a8 (diff) |
New loplugin:conditionalstring
Change-Id: I2eab990c15f845b44a3b598571aca361dadf9ff3
Reviewed-on: https://gerrit.libreoffice.org/81946
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/filter/html/css1atr.cxx | 8 | ||||
-rw-r--r-- | sw/source/filter/html/htmlftn.cxx | 2 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8par3.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/index/cnttab.cxx | 4 | ||||
-rw-r--r-- | sw/source/uibase/envelp/labelcfg.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/uiview/view.cxx | 2 |
6 files changed, 10 insertions, 10 deletions
diff --git a/sw/source/filter/html/css1atr.cxx b/sw/source/filter/html/css1atr.cxx index 8a894fe58701..62b0071e13c3 100644 --- a/sw/source/filter/html/css1atr.cxx +++ b/sw/source/filter/html/css1atr.cxx @@ -1742,8 +1742,8 @@ static Writer& OutCSS1_SwFootnoteInfo( Writer& rWrt, const SwEndNoteInfo& rInfo, if( bHasNotes ) { aSelector = OOO_STRING_SVTOOLS_HTML_anchor "." + - ( bEndNote ? OUString(OOO_STRING_SVTOOLS_HTML_sdendnote_anc) - : OUString(OOO_STRING_SVTOOLS_HTML_sdfootnote_anc) ); + ( bEndNote ? OUStringLiteral(OOO_STRING_SVTOOLS_HTML_sdendnote_anc) + : OUStringLiteral(OOO_STRING_SVTOOLS_HTML_sdfootnote_anc) ); SwCSS1OutMode aMode( rHTMLWrt, CSS1_OUTMODE_RULE|CSS1_OUTMODE_TEMPLATE, &aSelector ); rHTMLWrt.OutCSS1_PropertyAscii( sCSS1_P_font_size, @@ -1773,8 +1773,8 @@ static Writer& OutCSS1_SwFootnoteInfo( Writer& rWrt, const SwEndNoteInfo& rInfo, if( aItemSet.Count() ) { aSelector = OOO_STRING_SVTOOLS_HTML_anchor "." + - ( bEndNote ? OUString(OOO_STRING_SVTOOLS_HTML_sdendnote_sym) - : OUString(OOO_STRING_SVTOOLS_HTML_sdfootnote_sym)); + ( bEndNote ? OUStringLiteral(OOO_STRING_SVTOOLS_HTML_sdendnote_sym) + : OUStringLiteral(OOO_STRING_SVTOOLS_HTML_sdfootnote_sym)); if( OutCSS1Rule( rHTMLWrt, aSelector, aItemSet, true, false )) rHTMLWrt.m_aScriptTextStyles.insert( pSymCharFormat->GetName() ); } diff --git a/sw/source/filter/html/htmlftn.cxx b/sw/source/filter/html/htmlftn.cxx index 11bd6556e387..4e58dc4a3e27 100644 --- a/sw/source/filter/html/htmlftn.cxx +++ b/sw/source/filter/html/htmlftn.cxx @@ -534,7 +534,7 @@ void SwHTMLWriter::OutFootEndNoteInfo() int nParts = lcl_html_fillEndNoteInfo( rInfo, aParts, false ); if( rInfo.eNum != FTNNUM_DOC ) { - aParts[4] = rInfo.eNum == FTNNUM_CHAPTER ? OUString( "C" ) : OUString( "P" ); + aParts[4] = rInfo.eNum == FTNNUM_CHAPTER ? OUStringLiteral( "C" ) : OUStringLiteral( "P" ); nParts = 5; } if( rInfo.ePos != FTNPOS_PAGE) diff --git a/sw/source/filter/ww8/ww8par3.cxx b/sw/source/filter/ww8/ww8par3.cxx index e62e13f6572d..c07da7e81efb 100644 --- a/sw/source/filter/ww8/ww8par3.cxx +++ b/sw/source/filter/ww8/ww8par3.cxx @@ -2168,7 +2168,7 @@ void WW8FormulaControl::FormulaRead(SwWw8ControlType nWhich, { if ( iRes != 25 ) mnChecked = iRes; - msDefault = ( wDef == 0 ) ? OUString( "0" ) : OUString( "1" ); + msDefault = ( wDef == 0 ) ? OUStringLiteral( "0" ) : OUStringLiteral( "1" ); } } // xstzTextFormat diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx index 6873180815ea..0238c3138638 100644 --- a/sw/source/ui/index/cnttab.cxx +++ b/sw/source/ui/index/cnttab.cxx @@ -3852,8 +3852,8 @@ void SwEntryBrowseBox::WriteEntries(SvStream& rOutStr) pEntry->sAlternative + ";" + pEntry->sPrimKey + ";" + pEntry->sSecKey + ";" + - (pEntry->bCase ? OUString("1") : OUString("0")) + ";" + - (pEntry->bWord ? OUString("1") : OUString("0")) ); + (pEntry->bCase ? OUStringLiteral("1") : OUStringLiteral("0")) + ";" + + (pEntry->bWord ? OUStringLiteral("1") : OUStringLiteral("0")) ); if( sWrite.getLength() > 5 ) rOutStr.WriteByteStringLine( sWrite, eTEnc ); diff --git a/sw/source/uibase/envelp/labelcfg.cxx b/sw/source/uibase/envelp/labelcfg.cxx index 29585f463fda..b2b7d743a7da 100644 --- a/sw/source/uibase/envelp/labelcfg.cxx +++ b/sw/source/uibase/envelp/labelcfg.cxx @@ -227,7 +227,7 @@ static Sequence<PropertyValue> lcl_CreateProperties( case 1: { rMeasure.clear(); - rMeasure += rRec.m_bCont ? OUString( "C" ) : OUString( "S" ); rMeasure += sColon; + rMeasure += rRec.m_bCont ? OUStringLiteral( "C" ) : OUStringLiteral( "S" ); rMeasure += sColon; rMeasure += OUString::number( convertTwipToMm100( rRec.m_nHDist ) ); rMeasure += sColon; rMeasure += OUString::number( convertTwipToMm100( rRec.m_nVDist ) ); rMeasure += sColon; rMeasure += OUString::number( convertTwipToMm100( rRec.m_nWidth ) ); rMeasure += sColon; diff --git a/sw/source/uibase/uiview/view.cxx b/sw/source/uibase/uiview/view.cxx index 4f25d13563f4..ba17271dfd6d 100644 --- a/sw/source/uibase/uiview/view.cxx +++ b/sw/source/uibase/uiview/view.cxx @@ -1158,7 +1158,7 @@ void SwView::WriteUserData( OUString &rUserData, bool bBrowse ) rUserData += OUString::number( static_cast<sal_uInt16>(m_pWrtShell->GetViewOptions()->GetZoomType()));//eZoom; rUserData += ";"; - rUserData += FrameTypeFlags::NONE == m_pWrtShell->GetSelFrameType() ? OUString("0") : OUString("1"); + rUserData += FrameTypeFlags::NONE == m_pWrtShell->GetSelFrameType() ? OUStringLiteral("0") : OUStringLiteral("1"); } // Set CursorPos |