[Libreoffice-commits] .: vcl/source vcl/unx

Julien Nabet serval2412 at kemper.freedesktop.org
Sun May 8 08:14:57 PDT 2011


 vcl/source/gdi/pngread.cxx               |    2 +-
 vcl/source/gdi/print3.cxx                |    2 +-
 vcl/source/gdi/regband.cxx               |    2 +-
 vcl/source/glyphs/gcach_ftyp.cxx         |    4 ++--
 vcl/source/glyphs/graphite_layout.cxx    |    2 +-
 vcl/source/window/brdwin.cxx             |    2 +-
 vcl/source/window/dndlcon.cxx            |   12 ++++++------
 vcl/source/window/dockmgr.cxx            |    4 ++--
 vcl/source/window/printdlg.cxx           |    2 +-
 vcl/source/window/splitwin.cxx           |    2 +-
 vcl/source/window/taskpanelist.cxx       |    2 +-
 vcl/source/window/window.cxx             |   12 ++++++------
 vcl/unx/gtk/a11y/atkutil.cxx             |    2 +-
 vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx |    2 +-
 14 files changed, 26 insertions(+), 26 deletions(-)

New commits:
commit 6ad50c7309bbd5a1bbd00db7003a98d7e3169f9d
Author: Julien Nabet <serval2412 at yahoo.fr>
Date:   Sun May 8 17:04:25 2011 +0200

    Some cppcheck cleaning

diff --git a/vcl/source/gdi/pngread.cxx b/vcl/source/gdi/pngread.cxx
index 1858f76..4d6c746 100644
--- a/vcl/source/gdi/pngread.cxx
+++ b/vcl/source/gdi/pngread.cxx
@@ -404,7 +404,7 @@ BitmapEx PNGReaderImpl::GetBitmapEx( const Size& rPreviewSizeHint )
                     sal_uInt32 nYPixelPerMeter = ImplReadsal_uInt32();
 
                     sal_uInt8 nUnitSpecifier = *maDataIter++;
-                    if( (nUnitSpecifier == 1) && nXPixelPerMeter && nXPixelPerMeter )
+                    if( (nUnitSpecifier == 1) && nXPixelPerMeter && nYPixelPerMeter )
                     {
                         mbpHYs = sal_True;
 
diff --git a/vcl/source/gdi/print3.cxx b/vcl/source/gdi/print3.cxx
index aa345fe..c3fafdb 100644
--- a/vcl/source/gdi/print3.cxx
+++ b/vcl/source/gdi/print3.cxx
@@ -249,7 +249,7 @@ static rtl::OUString queryFile( Printer* pPrinter )
                 // add arbitrary files
                 xFilterMgr->appendFilter( String( VclResId( SV_STDTEXT_ALLFILETYPES ) ), ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "*.*" ) ) );
             }
-            catch( lang::IllegalArgumentException rExc )
+            catch( lang::IllegalArgumentException )
             {
                 DBG_ERRORFILE( "caught IllegalArgumentException when registering filter\n" );
             }
diff --git a/vcl/source/gdi/regband.cxx b/vcl/source/gdi/regband.cxx
index 78be232..677580f 100644
--- a/vcl/source/gdi/regband.cxx
+++ b/vcl/source/gdi/regband.cxx
@@ -166,7 +166,7 @@ void ImplRegionBand::ProcessPoints()
     while ( pRegionBandPoint )
     {
         // within list?
-        if ( pRegionBandPoint && pRegionBandPoint->mpNextBandPoint )
+        if ( pRegionBandPoint->mpNextBandPoint )
         {
             // start/stop?
             if ( pRegionBandPoint->mbEndPoint && pRegionBandPoint->mpNextBandPoint->mbEndPoint )
diff --git a/vcl/source/glyphs/gcach_ftyp.cxx b/vcl/source/glyphs/gcach_ftyp.cxx
index a8939a6..482a9c4 100644
--- a/vcl/source/glyphs/gcach_ftyp.cxx
+++ b/vcl/source/glyphs/gcach_ftyp.cxx
@@ -2430,7 +2430,7 @@ bool FreetypeServerFont::ApplyGSUB( const ImplFontSelectData& rFSD )
     sal_uLong nRequestedLangsys = 0;    //MKTAG("ZHT"); //### TODO: where to get langsys?
     // TODO: request more features depending on script and language system
 
-    if( aReqFeatureTagList.size() == 0) // nothing to do
+    if( aReqFeatureTagList.empty()) // nothing to do
         return true;
 
     // load GSUB table into memory
@@ -2510,7 +2510,7 @@ bool FreetypeServerFont::ApplyGSUB( const ImplFontSelectData& rFSD )
         }
     }
 
-    if( !aFeatureIndexList.size() )
+    if( aFeatureIndexList.empty() )
         return true;
 
     UshortList aLookupIndexList;
diff --git a/vcl/source/glyphs/graphite_layout.cxx b/vcl/source/glyphs/graphite_layout.cxx
index 02e9cea..81387e1 100644
--- a/vcl/source/glyphs/graphite_layout.cxx
+++ b/vcl/source/glyphs/graphite_layout.cxx
@@ -658,7 +658,7 @@ bool GraphiteLayout::LayoutGlyphs(ImplLayoutArgs& rArgs, gr_segment * pSegment)
                 mvCharDxs[mvCharDxs.size() - 1] = mnWidth;
             }
         }
-        catch (std::exception e)
+        catch (std::exception &e)
         {
 #ifdef GRLAYOUT_DEBUG
             fprintf(grLog(),"LayoutGlyphs failed %s\n", e.what());
diff --git a/vcl/source/window/brdwin.cxx b/vcl/source/window/brdwin.cxx
index 9e03c20..fca776f 100644
--- a/vcl/source/window/brdwin.cxx
+++ b/vcl/source/window/brdwin.cxx
@@ -371,9 +371,9 @@ sal_Bool ImplBorderWindowView::ImplMouseButtonDown( ImplBorderFrameData* pData,
     {
         pData->maMouseOff = rMEvt.GetPosPixel();
         pData->mnHitTest = ImplHitTest( pData, pData->maMouseOff );
-        sal_uInt16 nDragFullTest = 0;
         if ( pData->mnHitTest )
         {
+            sal_uInt16 nDragFullTest = 0;
             sal_Bool bTracking = sal_True;
             sal_Bool bHitTest = sal_True;
 
diff --git a/vcl/source/window/dndlcon.cxx b/vcl/source/window/dndlcon.cxx
index c27afb9..de3e87c 100644
--- a/vcl/source/window/dndlcon.cxx
+++ b/vcl/source/window/dndlcon.cxx
@@ -194,7 +194,7 @@ sal_uInt32 DNDListenerContainer::fireDropEvent( const Reference< XDropTargetDrop
                 }
             }
 
-            catch( RuntimeException exc )
+            catch( RuntimeException )
             {
                 pContainer->removeInterface( xElement );
             }
@@ -254,7 +254,7 @@ sal_uInt32 DNDListenerContainer::fireDragExitEvent()
                 }
             }
 
-            catch( RuntimeException exc )
+            catch( RuntimeException )
             {
                 pContainer->removeInterface( xElement );
             }
@@ -306,7 +306,7 @@ sal_uInt32 DNDListenerContainer::fireDragOverEvent( const Reference< XDropTarget
                 }
             }
 
-            catch( RuntimeException exc )
+            catch( RuntimeException )
             {
                 pContainer->removeInterface( xElement );
             }
@@ -374,7 +374,7 @@ sal_uInt32 DNDListenerContainer::fireDragEnterEvent( const Reference< XDropTarge
                 }
             }
 
-            catch( RuntimeException exc )
+            catch( RuntimeException )
             {
                 pContainer->removeInterface( xElement );
             }
@@ -441,7 +441,7 @@ sal_uInt32 DNDListenerContainer::fireDropActionChangedEvent( const Reference< XD
                 }
             }
 
-            catch( RuntimeException exc )
+            catch( RuntimeException )
             {
                 pContainer->removeInterface( xElement );
             }
@@ -503,7 +503,7 @@ sal_uInt32 DNDListenerContainer::fireDragGestureEvent( sal_Int8 dragAction, sal_
                 }
             }
 
-            catch( RuntimeException exc )
+            catch( RuntimeException )
             {
                 pContainer->removeInterface( xElement );
             }
diff --git a/vcl/source/window/dockmgr.cxx b/vcl/source/window/dockmgr.cxx
index 18354cf..b9a586e 100644
--- a/vcl/source/window/dockmgr.cxx
+++ b/vcl/source/window/dockmgr.cxx
@@ -368,7 +368,7 @@ ImplDockingWindowWrapper* DockingManager::GetDockingWindowWrapper( const Window
         if( (*p)->mpDockingWindow == pWindow )
             return (*p);
         else
-            p++;
+            ++p;
     }
     return NULL;
 }
@@ -482,7 +482,7 @@ void DockingManager::RemoveWindow( const Window *pWindow )
             break;
         }
         else
-            p++;
+            ++p;
     }
 }
 
diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx
index ce9f87f..75628c0 100644
--- a/vcl/source/window/printdlg.cxx
+++ b/vcl/source/window/printdlg.cxx
@@ -1078,7 +1078,6 @@ void PrintDialog::setupOptionalUI()
         Sequence< rtl::OUString > aHelpTexts;
         Sequence< rtl::OUString > aHelpIds;
         sal_Int64 nMinValue = 0, nMaxValue = 0;
-        sal_Int32 nCurHelpText = 0;
         rtl::OUString aGroupingHint;
         rtl::OUString aDependsOnName;
         sal_Int32 nDependsOnValue = 0;
@@ -1355,6 +1354,7 @@ void PrintDialog::setupOptionalUI()
             }
             else if( aCtrlType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Radio" ) ) && pCurParent )
             {
+                sal_Int32 nCurHelpText = 0;
                 boost::shared_ptr<vcl::RowOrColumn> pRadioColumn( pCurColumn );
                 if( aText.getLength() )
                 {
diff --git a/vcl/source/window/splitwin.cxx b/vcl/source/window/splitwin.cxx
index 94e7dd8..c51d5ad 100644
--- a/vcl/source/window/splitwin.cxx
+++ b/vcl/source/window/splitwin.cxx
@@ -97,7 +97,7 @@ struct ImplSplitSet
     size has not lower or upper bound.
 */
 namespace {
-    long ValidateSize (const long nSize, const ImplSplitItem rItem)
+    long ValidateSize (const long nSize, const ImplSplitItem &rItem)
     {
         if (rItem.mnMinSize>=0 && nSize<rItem.mnMinSize)
             return rItem.mnMinSize;
diff --git a/vcl/source/window/taskpanelist.cxx b/vcl/source/window/taskpanelist.cxx
index af0d589..cf6436d 100644
--- a/vcl/source/window/taskpanelist.cxx
+++ b/vcl/source/window/taskpanelist.cxx
@@ -235,7 +235,7 @@ sal_Bool TaskPaneList::HandleKeyEvent( KeyEvent aKeyEvent )
                 return sal_True;
             }
             else
-                p++;
+                ++p;
         }
 
         // the focus is not in the list: activate first float if F6 was pressed
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index 010ec01..d217360 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -4335,7 +4335,7 @@ Window::~Window()
                 xComponent->dispose();
         }
 
-        catch ( Exception exc )
+        catch ( Exception )
         {
             // can be safely ignored here.
         }
@@ -6766,7 +6766,7 @@ void Window::EnableInput( sal_Bool bEnable, sal_Bool bChild, sal_Bool bSysWin,
                     if ( !pExcludeWindow || !pExcludeWindow->ImplIsWindowOrChild( (*p), sal_True ) )
                         (*p)->EnableInput( bEnable, bChild );
                 }
-                p++;
+                ++p;
             }
         }
     }
@@ -8373,7 +8373,7 @@ uno::Reference< XDropTarget > Window::GetDropTarget()
 
                     }
 
-                    catch( RuntimeException exc )
+                    catch( RuntimeException )
                     {
                         // release all instances
                         mpWindowImpl->mpFrameData->mxDropTarget.clear();
@@ -8446,7 +8446,7 @@ uno::Reference< XDragSource > Window::GetDragSource()
             }
 
             // createInstance can throw any exception
-            catch( Exception exc )
+            catch( Exception )
             {
                 // release all instances
                 mpWindowImpl->mpFrameData->mxDropTarget.clear();
@@ -8526,7 +8526,7 @@ uno::Reference< XClipboard > Window::GetClipboard()
             }
 
             // createInstance can throw any exception
-            catch( Exception exc )
+            catch( Exception )
             {
                 // release all instances
                 mpWindowImpl->mpFrameData->mxClipboard.clear();
@@ -8578,7 +8578,7 @@ uno::Reference< XClipboard > Window::GetPrimarySelection()
             }
 
             // createInstance can throw any exception
-            catch( Exception exc )
+            catch( Exception )
             {
                 // release all instances
                 mpWindowImpl->mpFrameData->mxSelection.clear();
diff --git a/vcl/unx/gtk/a11y/atkutil.cxx b/vcl/unx/gtk/a11y/atkutil.cxx
index 7b4d7dd..b50fb5a 100644
--- a/vcl/unx/gtk/a11y/atkutil.cxx
+++ b/vcl/unx/gtk/a11y/atkutil.cxx
@@ -670,7 +670,7 @@ long WindowEventHandler(void *, ::VclSimpleEvent const * pEvent)
     default:
         break;
     }
-    } catch(lang::IndexOutOfBoundsException e)
+    } catch(lang::IndexOutOfBoundsException)
     {
         g_warning("Focused object has invalid index in parent");
     }
diff --git a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
index 8da8035..1309c53 100644
--- a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
@@ -377,7 +377,7 @@ void NWPixmapCacheList::ThemeChanged( )
     while( p != mCaches.end() )
     {
         (*p)->ThemeChanged();
-        p++;
+        ++p;
     }
 }
 


More information about the Libreoffice-commits mailing list