summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2012-12-15 16:04:01 +0100
committerJulien Nabet <serval2412@yahoo.fr>2012-12-15 16:04:01 +0100
commitb98b779401433a3c7146aa8f9750c64e60c46e93 (patch)
tree556a929bf82179b0ab9f1681126fbed1c43a5d9d /vcl
parent74fcda22f78c73eb38473bc202aebd6584ab9c6c (diff)
Some cppcheck cleaning in vcl
Change-Id: Ie8fc421d4b9cc7340d5c634e3e2593795bf2be68
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/edit/vclmedit.cxx1
-rw-r--r--vcl/unx/generic/app/wmadaptor.cxx3
-rw-r--r--vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx3
-rw-r--r--vcl/win/source/gdi/salprn.cxx12
4 files changed, 6 insertions, 13 deletions
diff --git a/vcl/source/edit/vclmedit.cxx b/vcl/source/edit/vclmedit.cxx
index 90e17cb8d952..d901df00c6e6 100644
--- a/vcl/source/edit/vclmedit.cxx
+++ b/vcl/source/edit/vclmedit.cxx
@@ -709,7 +709,6 @@ sal_Bool ImpVclMEdit::HandleCommand( const CommandEvent& rCEvt )
TextWindow::TextWindow( Window* pParent ) : Window( pParent )
{
mbInMBDown = sal_False;
- mbSelectOnTab = sal_True;
mbFocusSelectionHide = sal_False;
mbIgnoreTab = sal_False;
mbActivePopup = sal_False;
diff --git a/vcl/unx/generic/app/wmadaptor.cxx b/vcl/unx/generic/app/wmadaptor.cxx
index 78ccef7c9e7b..652d238e6340 100644
--- a/vcl/unx/generic/app/wmadaptor.cxx
+++ b/vcl/unx/generic/app/wmadaptor.cxx
@@ -349,12 +349,11 @@ NetWMAdaptor::NetWMAdaptor( SalDisplay* pSalDisplay ) :
unsigned long nItems = 0;
unsigned long nBytesLeft = 0;
unsigned char* pProperty = NULL;
- bool bNetWM = false;
initAtoms();
// check for NetWM
- bNetWM = getNetWmName();
+ bool bNetWM = getNetWmName();
if( bNetWM
&& XGetWindowProperty( m_pDisplay,
m_pSalDisplay->GetRootWindow( m_pSalDisplay->GetDefaultXScreen() ),
diff --git a/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx b/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx
index 7d99c32e7ce8..210e50ba43fa 100644
--- a/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx
@@ -966,7 +966,6 @@ void GtkSalGraphics::renderAreaToPix( cairo_t *cr,
long ax = region->x;
long ay = region->y;
long awidth = region->width;
- long aheight = region->height;
/* Get tje cairo surface and the data */
cairo_surface_t* surface = cairo_get_target(cr);
@@ -979,7 +978,7 @@ void GtkSalGraphics::renderAreaToPix( cairo_t *cr,
unsigned char *src = data.get();
src += (int)ay * nStride + (int)ax * 3;
awidth = MIN (region->width, size.getX() - ax);
- aheight = MIN (region->height, size.getY() - ay);
+ long aheight = MIN (region->height, size.getY() - ay);
for (int y = 0; y < aheight; ++y)
{
diff --git a/vcl/win/source/gdi/salprn.cxx b/vcl/win/source/gdi/salprn.cxx
index 46c7196ed218..9bc4b148a609 100644
--- a/vcl/win/source/gdi/salprn.cxx
+++ b/vcl/win/source/gdi/salprn.cxx
@@ -172,11 +172,10 @@ void WinSalInstance::GetPrinterQueueInfo( ImplPrnQueueList* pList )
DWORD i;
DWORD nBytes = 0;
DWORD nInfoPrn4 = 0;
- PRINTER_INFO_4W* pWinInfo4 = NULL;
EnumPrintersW( PRINTER_ENUM_LOCAL | PRINTER_ENUM_CONNECTIONS, NULL, 4, NULL, 0, &nBytes, &nInfoPrn4 );
if ( nBytes )
{
- pWinInfo4 = (PRINTER_INFO_4W*) rtl_allocateMemory( nBytes );
+ PRINTER_INFO_4W* pWinInfo4 = (PRINTER_INFO_4W*) rtl_allocateMemory( nBytes );
if ( EnumPrintersW( PRINTER_ENUM_LOCAL | PRINTER_ENUM_CONNECTIONS, NULL, 4, (LPBYTE)pWinInfo4, nBytes, &nBytes, &nInfoPrn4 ) )
{
for ( i = 0; i < nInfoPrn4; i++ )
@@ -335,8 +334,7 @@ static sal_Bool ImplTestSalJobSetup( WinSalInfoPrinter* pPrinter,
return FALSE;
}
BYTE *pBuffer = (BYTE*)_alloca( nSysJobSize );
- LONG nRet = -1;
- nRet = DocumentPropertiesW( 0, hPrn,
+ LONG nRet = DocumentPropertiesW( 0, hPrn,
pPrinterNameW,
(LPDEVMODEW)pBuffer, NULL, DM_OUT_BUFFER );
if( nRet < 0 )
@@ -390,14 +388,13 @@ static sal_Bool ImplUpdateSalJobSetup( WinSalInfoPrinter* pPrinter, ImplJobSetup
return FALSE;
LONG nRet;
- LONG nSysJobSize = -1;
HWND hWnd = 0;
DWORD nMode = DM_OUT_BUFFER;
sal_uLong nDriverDataLen = 0;
SalDriverData* pOutBuffer = NULL;
BYTE* pInBuffer = NULL;
- nSysJobSize = DocumentPropertiesW( hWnd, hPrn,
+ LONG nSysJobSize = DocumentPropertiesW( hWnd, hPrn,
pPrinterNameW,
NULL, NULL, 0 );
if ( nSysJobSize < 0 )
@@ -1182,10 +1179,9 @@ void WinSalInfoPrinter::InitPaperFormats( const ImplJobSetup* pSetupData )
if( nCount == GDI_ERROR )
nCount = 0;
- POINT* pPaperSizes = NULL;
if( nCount )
{
- pPaperSizes = (POINT*)rtl_allocateZeroMemory(nCount*sizeof(POINT));
+ POINT* pPaperSizes = (POINT*)rtl_allocateZeroMemory(nCount*sizeof(POINT));
ImplDeviceCaps( this, DC_PAPERSIZE, (BYTE*)pPaperSizes, pSetupData );
sal_Unicode* pNamesBuffer = (sal_Unicode*)rtl_allocateMemory(nCount*64*sizeof(sal_Unicode));