diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-11-03 16:31:41 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-11-16 18:42:57 +0100 |
commit | 270e41adb0c7a5f3e25e0ea25933de0d5c32ef9c (patch) | |
tree | d56df4efd8e9345cf7f213e6149b9a71a49da458 /svtools | |
parent | 26caf1bc59c81704f11225e3e431e412deb8c475 (diff) |
loplugin:buriedassign in sd..writerfilter
Change-Id: I954c12d9e1c493be6ac8c7b15076077b5bff5b74
Reviewed-on: https://gerrit.libreoffice.org/62811
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/source/brwbox/brwbox1.cxx | 5 | ||||
-rw-r--r-- | svtools/source/config/printoptions.cxx | 6 | ||||
-rw-r--r-- | svtools/source/misc/templatefoldercache.cxx | 10 | ||||
-rw-r--r-- | svtools/source/svrtf/parrtf.cxx | 15 |
4 files changed, 22 insertions, 14 deletions
diff --git a/svtools/source/brwbox/brwbox1.cxx b/svtools/source/brwbox/brwbox1.cxx index 41d72eafa72b..561d1dbe1a30 100644 --- a/svtools/source/brwbox/brwbox1.cxx +++ b/svtools/source/brwbox/brwbox1.cxx @@ -1157,7 +1157,10 @@ void BrowseBox::RowInserted( long nRow, long nNumRows, bool bDoPaint, bool bKeep if ( nCurRow == BROWSER_ENDOFSELECTION ) GoToRow( 0, false, bKeepSelection ); else if ( nRow <= nCurRow ) - GoToRow( nCurRow += nNumRows, false, bKeepSelection ); + { + nCurRow += nNumRows; + GoToRow( nCurRow, false, bKeepSelection ); + } // adjust the vertical scrollbar if ( bDoPaint ) diff --git a/svtools/source/config/printoptions.cxx b/svtools/source/config/printoptions.cxx index af1101acd8cd..a0beda999bb0 100644 --- a/svtools/source/config/printoptions.cxx +++ b/svtools/source/config/printoptions.cxx @@ -701,7 +701,8 @@ SvtPrinterOptions::SvtPrinterOptions() if( m_pStaticDataContainer == nullptr ) { OUString aRootPath( ROOTNODE_START ); - m_pStaticDataContainer = new SvtPrintOptions_Impl( aRootPath += "/Printer" ); + aRootPath += "/Printer"; + m_pStaticDataContainer = new SvtPrintOptions_Impl( aRootPath ); pPrinterOptionsDataContainer = m_pStaticDataContainer; svtools::ItemHolder2::holdConfigItem(EItem::PrintOptions); } @@ -735,7 +736,8 @@ SvtPrintFileOptions::SvtPrintFileOptions() if( m_pStaticDataContainer == nullptr ) { OUString aRootPath( ROOTNODE_START ); - m_pStaticDataContainer = new SvtPrintOptions_Impl( aRootPath += "/File" ); + aRootPath += "/File"; + m_pStaticDataContainer = new SvtPrintOptions_Impl( aRootPath ); pPrintFileOptionsDataContainer = m_pStaticDataContainer; svtools::ItemHolder2::holdConfigItem(EItem::PrintFileOptions); diff --git a/svtools/source/misc/templatefoldercache.cxx b/svtools/source/misc/templatefoldercache.cxx index a2b0b09acbc9..586e85bacf9e 100644 --- a/svtools/source/misc/templatefoldercache.cxx +++ b/svtools/source/misc/templatefoldercache.cxx @@ -437,12 +437,10 @@ namespace svt sal_Int32 TemplateFolderCacheImpl::getMagicNumber() { - sal_Int32 nMagic = 0; - ( nMagic += sal_Int8('T') ) <<= 4; - ( nMagic += sal_Int8('D') ) <<= 4; - ( nMagic += sal_Int8('S') ) <<= 4; - ( nMagic += sal_Int8('C') ) <<= 0; - return nMagic; + return (sal_Int8('T') << 12) + | (sal_Int8('D') << 8) + | (sal_Int8('S') << 4) + | (sal_Int8('C')); } diff --git a/svtools/source/svrtf/parrtf.cxx b/svtools/source/svrtf/parrtf.cxx index 7360c77ede37..bd8568b1194c 100644 --- a/svtools/source/svrtf/parrtf.cxx +++ b/svtools/source/svrtf/parrtf.cxx @@ -583,7 +583,8 @@ SvParserState SvRTFParser::CallParser() rInput.ReadChar( cFirstCh ); nNextCh = cFirstCh; eState = SvParserState::Working; nOpenBrakets = 0; - SetSrcEncoding( eCodeSet = RTL_TEXTENCODING_MS_1252 ); + eCodeSet = RTL_TEXTENCODING_MS_1252; + SetSrcEncoding( eCodeSet ); // the first two tokens should be '{' and \\rtf !! if( '{' == GetNextToken() && RTF_RTF == GetNextToken() ) @@ -646,16 +647,20 @@ void SvRTFParser::Continue( int nToken ) break; // skip unknown token case RTF_NEXTTYPE: case RTF_ANSITYPE: - SetSrcEncoding( eCodeSet = RTL_TEXTENCODING_MS_1252 ); + eCodeSet = RTL_TEXTENCODING_MS_1252; + SetSrcEncoding( eCodeSet ); break; case RTF_MACTYPE: - SetSrcEncoding( eCodeSet = RTL_TEXTENCODING_APPLE_ROMAN ); + eCodeSet = RTL_TEXTENCODING_APPLE_ROMAN; + SetSrcEncoding( eCodeSet ); break; case RTF_PCTYPE: - SetSrcEncoding( eCodeSet = RTL_TEXTENCODING_IBM_437 ); + eCodeSet = RTL_TEXTENCODING_IBM_437; + SetSrcEncoding( eCodeSet ); break; case RTF_PCATYPE: - SetSrcEncoding( eCodeSet = RTL_TEXTENCODING_IBM_850 ); + eCodeSet = RTL_TEXTENCODING_IBM_850; + SetSrcEncoding( eCodeSet ); break; case RTF_ANSICPG: eCodeSet = rtl_getTextEncodingFromWindowsCodePage(nTokenValue); |