From a965e98848948253279caf6ea90049df9daaf864 Mon Sep 17 00:00:00 2001 From: Julien Nabet Date: Sun, 10 Sep 2017 13:16:29 +0200 Subject: cppcheck: oppositeInnerCondition in htmlatr (sw) Change-Id: Iee259bfd53177925217836d4e416bf97c8f53893 Reviewed-on: https://gerrit.libreoffice.org/42136 Tested-by: Jenkins Reviewed-by: Julien Nabet --- sw/source/filter/html/htmlatr.cxx | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/sw/source/filter/html/htmlatr.cxx b/sw/source/filter/html/htmlatr.cxx index a7390832ad27..2a09be851359 100644 --- a/sw/source/filter/html/htmlatr.cxx +++ b/sw/source/filter/html/htmlatr.cxx @@ -2340,7 +2340,6 @@ Writer& OutHTML_SwTextNode( Writer& rWrt, const SwContentNode& rNode ) { HTMLOutContext aContext( rHTMLWrt.m_eDestEnc ); - sal_Int32 nPreSplitPos = 0; for( ; nStrPos < nEnd; nStrPos++ ) { // output the frames that are anchored to the current position @@ -2442,10 +2441,7 @@ Writer& OutHTML_SwTextNode( Writer& rWrt, const SwContentNode& rNode ) if( ' ' == c && rHTMLWrt.m_nLastParaToken == HtmlTokenId::NONE ) { sal_Int32 nLineLen; - if( rHTMLWrt.m_nLastParaToken != HtmlTokenId::NONE ) - nLineLen = nStrPos - nPreSplitPos; - else - nLineLen = rHTMLWrt.GetLineLen(); + nLineLen = rHTMLWrt.GetLineLen(); sal_Int32 nWordLen = rStr.indexOf( ' ', nStrPos+1 ); if( nWordLen == -1 ) @@ -2458,8 +2454,6 @@ Writer& OutHTML_SwTextNode( Writer& rWrt, const SwContentNode& rNode ) HTMLOutFuncs::FlushToAscii( rWrt.Strm(), aContext ); rHTMLWrt.OutNewLine(); bOutChar = false; - if( rHTMLWrt.m_nLastParaToken != HtmlTokenId::NONE ) - nPreSplitPos = nStrPos+1; } } -- cgit