[Libreoffice-commits] .: 2 commits - framework/source sfx2/source

Caolán McNamara caolan at kemper.freedesktop.org
Sun Dec 5 04:58:22 PST 2010


 framework/source/uiconfiguration/uiconfigurationmanager.cxx |    2 --
 sfx2/source/view/viewfrm.cxx                                |    3 +--
 2 files changed, 1 insertion(+), 4 deletions(-)

New commits:
commit 7b1d32d57dad3a7a3c4557cb7bb3d310524b5c97
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sun Dec 5 12:58:16 2010 +0000

    cppcheck: unused variables

diff --git a/framework/source/uiconfiguration/uiconfigurationmanager.cxx b/framework/source/uiconfiguration/uiconfigurationmanager.cxx
index 62b8956..5ba910d 100644
--- a/framework/source/uiconfiguration/uiconfigurationmanager.cxx
+++ b/framework/source/uiconfiguration/uiconfigurationmanager.cxx
@@ -697,7 +697,6 @@ void SAL_CALL UIConfigurationManager::reset() throw (::com::sun::star::uno::Runt
     if ( isReadOnly() )
         return;
 
-    bool bResetStorage( false );
     if ( m_xDocConfigStorage.is() )
     {
         try
@@ -737,7 +736,6 @@ void SAL_CALL UIConfigurationManager::reset() throw (::com::sun::star::uno::Runt
                 if ( xTransactedObject.is() )
                     xTransactedObject->commit();
             }
-            bResetStorage = true;
 
             // remove settings from user defined layer and notify listener about removed settings data!
             // Try to access our module sub folder
commit 825b2fc2bbe6a3a34b81e680081e47325361faf3
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sun Dec 5 12:57:30 2010 +0000

    cppcheck: the scope of these variables can be reduced

diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index e4009e7..820b8d6 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 );
 


More information about the Libreoffice-commits mailing list