summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2011-05-08 17:04:25 +0200
committerJulien Nabet <serval2412@yahoo.fr>2011-05-08 17:04:25 +0200
commit5d80ddea6888fbe075907ea427105900906b57dd (patch)
tree414566884b0eabe76fb093efacf3fd67397f8f90 /vcl
parentafb1f2e918f392b70749de51599ef64c8223b1de (diff)
Some cppcheck cleaning
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/gdi/pngread.cxx2
-rw-r--r--vcl/source/gdi/print3.cxx2
-rw-r--r--vcl/source/gdi/regband.cxx2
-rw-r--r--vcl/source/glyphs/gcach_ftyp.cxx4
-rw-r--r--vcl/source/glyphs/graphite_layout.cxx2
-rw-r--r--vcl/source/window/brdwin.cxx2
-rw-r--r--vcl/source/window/dndlcon.cxx12
-rw-r--r--vcl/source/window/dockmgr.cxx4
-rw-r--r--vcl/source/window/printdlg.cxx2
-rw-r--r--vcl/source/window/splitwin.cxx2
-rw-r--r--vcl/source/window/taskpanelist.cxx2
-rw-r--r--vcl/source/window/window.cxx12
-rw-r--r--vcl/unx/gtk/a11y/atkutil.cxx2
-rw-r--r--vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx2
14 files changed, 26 insertions, 26 deletions
diff --git a/vcl/source/gdi/pngread.cxx b/vcl/source/gdi/pngread.cxx
index 66e3cd1bea1a..cd47967f760e 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 4fd2f1c6d6c6..a769e948372a 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 21c82cd51f3a..1cec295bda93 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 b87e5d94d95f..5eea8df58fc3 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 ab5b59025724..a653cf76cdb7 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 a71aadc3cdad..25ef3e27001c 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 4566852bc966..e7be0e0f6437 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 017fdc5390db..a2ebdb43c857 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 a433a57faefb..f52cfd1fade5 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 d0bf60b6412c..0a9a9dd70407 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 56bd9d799cce..6b6421d1595e 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 e7fd025f2aae..8702ca3c8b01 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 92f50a9d864f..78e0cb05d4de 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 b406acf299a8..073016b2e1a7 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;
}
}