diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-04-18 21:29:37 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-04-18 21:31:57 +0100 |
commit | 16d9e686d7f78633c1509db1e98ec231f90af5e6 (patch) | |
tree | c2036e5ae35bf944b2b9d991cef71ef50b14d819 /vcl | |
parent | bdb6e244626fb922b916aae8ba02941c9123a2cf (diff) |
don't drop unused errs, but log them
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/win/source/window/salframe.cxx | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/vcl/win/source/window/salframe.cxx b/vcl/win/source/window/salframe.cxx index 273a19dfd546..ad0fe7da8676 100644 --- a/vcl/win/source/window/salframe.cxx +++ b/vcl/win/source/window/salframe.cxx @@ -4755,7 +4755,7 @@ static WinSalMenuItem* ImplGetSalMenuItem( HMENU hMenu, UINT nPos, sal_Bool bByP mi.cbSize = sizeof( mi ); mi.fMask = MIIM_DATA; if( !GetMenuItemInfoW( hMenu, nPos, bByPosition, &mi) ) - DWORD err = GetLastError(); + ImplWriteLastError( GetLastError(), "ImplGetSalMenuItem" ); return (WinSalMenuItem *) mi.dwItemData; } @@ -4773,7 +4773,7 @@ static int ImplGetSelectedIndex( HMENU hMenu ) for(int i=0; i<n; i++ ) { if( !GetMenuItemInfoW( hMenu, i, TRUE, &mi) ) - DWORD err = GetLastError(); + ImplWriteLastError( GetLastError(), "ImplGetSelectedIndex" ); else { if( mi.fState & MFS_HILITE ) @@ -4883,7 +4883,6 @@ static int ImplMeasureItem( HWND hWnd, WPARAM wParam, LPARAM lParam ) static int ImplDrawItem(HWND, WPARAM wParam, LPARAM lParam ) { int nRet = 0; - DWORD err = 0; if( !wParam ) { // request was sent by a menu @@ -4923,7 +4922,7 @@ static int ImplDrawItem(HWND, WPARAM wParam, LPARAM lParam ) // Fill background if(!PatBlt( pDI->hDC, aRect.left, aRect.top, aRect.right-aRect.left, aRect.bottom-aRect.top, PATCOPY )) - err = GetLastError(); + ImplWriteLastError(GetLastError(), "ImplDrawItem"); int lineHeight = aRect.bottom-aRect.top; @@ -5007,7 +5006,7 @@ static int ImplDrawItem(HWND, WPARAM wParam, LPARAM lParam ) (LPARAM)(LPWSTR) aStr.GetBuffer(), (WPARAM)0, aRect.left, aRect.top + (lineHeight - strSize.cy)/2, 0, 0, DST_PREFIXTEXT | (fDisabled && !fSelected ? DSS_DISABLED : DSS_NORMAL) ) ) - err = GetLastError(); + ImplWriteLastError(GetLastError(), "ImplDrawItem"); if( pSalMenuItem->mAccelText.Len() ) { @@ -5024,7 +5023,7 @@ static int ImplDrawItem(HWND, WPARAM wParam, LPARAM lParam ) (LPARAM)(LPWSTR) aStr.GetBuffer(), (WPARAM)0, aRect.right-strSizeA.cx-tm.tmMaxCharWidth, aRect.top + (lineHeight - strSizeA.cy)/2, 0, 0, DST_TEXT | (fDisabled && !fSelected ? DSS_DISABLED : DSS_NORMAL) ) ) - err = GetLastError(); + ImplWriteLastError(GetLastError(), "ImplDrawItem"); } // Restore the original font and colors. |