summaryrefslogtreecommitdiff
path: root/sfx2/source/appl
diff options
context:
space:
mode:
authorDirk Voelzke <dv@openoffice.org>2010-04-01 15:57:23 +0200
committerDirk Voelzke <dv@openoffice.org>2010-04-01 15:57:23 +0200
commit3be47e5ae7be854fe74f56651ca5abd5b42e63ef (patch)
tree37d468a62ed0a9e286d7a60718fcc285a073a74b /sfx2/source/appl
parentf98a6048cbdaa4fe436b9bf5c46be02666d2db88 (diff)
parent414ac336816d505d4d9e24b84ad514bf3576114a (diff)
nativea: merged heads
Diffstat (limited to 'sfx2/source/appl')
-rw-r--r--sfx2/source/appl/shutdowniconw32.cxx23
1 files changed, 10 insertions, 13 deletions
diff --git a/sfx2/source/appl/shutdowniconw32.cxx b/sfx2/source/appl/shutdowniconw32.cxx
index be71e2d2ca..6fbe06ea93 100644
--- a/sfx2/source/appl/shutdowniconw32.cxx
+++ b/sfx2/source/appl/shutdowniconw32.cxx
@@ -273,7 +273,7 @@ static HMENU createSystrayMenu( )
addMenuItem( hMenu, IDM_TEMPLATE, ICON_TEMPLATE,
pShutdownIcon->GetResString( STR_QUICKSTART_FROMTEMPLATE ), pos, true, aEmpty);
addMenuItem( hMenu, static_cast< UINT >( -1 ), 0, OUString(), pos, false, aEmpty );
- addMenuItem( hMenu, IDM_OPEN, ICON_OPEN, pShutdownIcon->GetResString( STR_QUICKSTART_FILEOPEN ), pos, true, OUString::createFromAscii( "shell32" ));
+ addMenuItem( hMenu, IDM_OPEN, ICON_OPEN, pShutdownIcon->GetResString( STR_QUICKSTART_FILEOPEN ), pos, true, OUString::createFromAscii( "SHELL32" ));
addMenuItem( hMenu, static_cast< UINT >( -1 ), 0, OUString(), pos, false, aEmpty );
#endif
addMenuItem( hMenu, IDM_INSTALL,0, pShutdownIcon->GetResString( STR_QUICKSTART_PRELAUNCH ), pos, false, aEmpty );
@@ -742,28 +742,25 @@ void OnDrawItem(HWND /*hwnd*/, LPDRAWITEMSTRUCT lpdis)
x = aRect.left;
y = aRect.top;
- int cx = GetSystemMetrics( SM_CXSMICON );
- int cy = GetSystemMetrics( SM_CYSMICON );
- HICON hIcon( 0 );
+ int cx = GetSystemMetrics( SM_CXSMICON );
+ int cy = GetSystemMetrics( SM_CYSMICON );
+ HICON hIcon( 0 );
+ HMODULE hModule( GetModuleHandle( NULL ) );
if ( pMyItem->module.getLength() > 0 )
{
LPCWSTR pModuleName = reinterpret_cast<LPCWSTR>( pMyItem->module.getStr() );
- HMODULE hModule = GetModuleHandleW( pModuleName );
+ hModule = GetModuleHandleW( pModuleName );
if ( hModule == NULL )
{
LoadLibraryW( pModuleName );
hModule = GetModuleHandleW( pModuleName );
}
- hIcon = (HICON) LoadImageA( hModule,
- MAKEINTRESOURCE( pMyItem->iconId ),
- IMAGE_ICON, cx, cy,
- LR_DEFAULTCOLOR | LR_SHARED );
}
- else
- hIcon = (HICON) LoadImageA( GetModuleHandle( NULL ), MAKEINTRESOURCE( pMyItem->iconId ),
- IMAGE_ICON, cx, cy,
- LR_DEFAULTCOLOR | LR_SHARED );
+
+ hIcon = (HICON) LoadImageA( hModule, MAKEINTRESOURCE( pMyItem->iconId ),
+ IMAGE_ICON, cx, cy,
+ LR_DEFAULTCOLOR | LR_SHARED );
// DrawIconEx( lpdis->hDC, x, y+(height-cy)/2, hIcon, cx, cy, 0, NULL, DI_NORMAL );