summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2010-12-05 12:57:30 +0000
committerCaolán McNamara <caolanm@redhat.com>2010-12-05 12:57:30 +0000
commit825b2fc2bbe6a3a34b81e680081e47325361faf3 (patch)
tree6497e14c1f976953d20191acc9c5df6373147ea1
parentc6321192e6968c424218236d069a342c2686b427 (diff)
cppcheck: the scope of these variables can be reduced
-rw-r--r--sfx2/source/view/viewfrm.cxx3
1 files changed, 1 insertions, 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 );