From 825b2fc2bbe6a3a34b81e680081e47325361faf3 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Sun, 5 Dec 2010 12:57:30 +0000 Subject: cppcheck: the scope of these variables can be reduced --- sfx2/source/view/viewfrm.cxx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx index e4009e7eca..820b8d6aff 100644 --- a/sfx2/source/view/viewfrm.cxx +++ b/sfx2/source/view/viewfrm.cxx @@ -2782,7 +2782,6 @@ void SfxViewFrame::Resize( BOOL bForce ) void CutLines( ::rtl::OUString& rStr, sal_Int32 nStartLine, sal_Int32 nLines, BOOL bEraseTrailingEmptyLines ) { sal_Int32 nStartPos = 0; - sal_Int32 nEndPos = 0; sal_Int32 nLine = 0; while ( nLine < nStartLine ) { @@ -2797,7 +2796,7 @@ void CutLines( ::rtl::OUString& rStr, sal_Int32 nStartLine, sal_Int32 nLines, BO if ( nStartPos != -1 ) { - nEndPos = nStartPos; + sal_Int32 nEndPos = nStartPos; for ( sal_Int32 i = 0; i < nLines; i++ ) nEndPos = rStr.indexOf( LINE_SEP, nEndPos+1 ); -- cgit v1.2.3