summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKorrawit Pruegsanusak <detective.conan.1412@gmail.com>2011-05-29 01:40:26 +0700
committerNoel Power <noel.power@novell.com>2011-05-30 12:27:26 +0100
commitcda4a293608514783d38d470799cfbf97b245cc6 (patch)
tree21b48f9c9b7dbd67b01fa182da966380d20fddbb
parentda94363ed7a895fe39cee8d9b762966ebbee50ef (diff)
Code cleanup
* Remove dead code lying since 2001 * Remove duplicate if checking * So unindent the code Released under LGPLv3+/MPL
-rwxr-xr-xvcl/win/source/window/salobj.cxx71
1 files changed, 20 insertions, 51 deletions
diff --git a/vcl/win/source/window/salobj.cxx b/vcl/win/source/window/salobj.cxx
index 68e63f19f041..f79ad89fff45 100755
--- a/vcl/win/source/window/salobj.cxx
+++ b/vcl/win/source/window/salobj.cxx
@@ -543,58 +543,27 @@ SalObject* ImplSalCreateObject( WinSalInstance* pInst, WinSalFrame* pParent )
if ( !pSalData->mbObjClassInit )
{
- // #95301# shockwave plugin has bug; expects ASCII functions to be used
- if ( false )//aSalShlData.mbWNT )
+ WNDCLASSEXA aWndClassEx;
+ aWndClassEx.cbSize = sizeof( aWndClassEx );
+ aWndClassEx.style = 0;
+ aWndClassEx.lpfnWndProc = SalSysObjWndProcA;
+ aWndClassEx.cbClsExtra = 0;
+ aWndClassEx.cbWndExtra = SAL_OBJECT_WNDEXTRA;
+ aWndClassEx.hInstance = pSalData->mhInst;
+ aWndClassEx.hIcon = 0;
+ aWndClassEx.hIconSm = 0;
+ aWndClassEx.hCursor = LoadCursor( 0, IDC_ARROW );
+ aWndClassEx.hbrBackground = 0;
+ aWndClassEx.lpszMenuName = 0;
+ aWndClassEx.lpszClassName = SAL_OBJECT_CLASSNAMEA;
+ if ( RegisterClassExA( &aWndClassEx ) )
{
- WNDCLASSEXW aWndClassEx;
- aWndClassEx.cbSize = sizeof( aWndClassEx );
- aWndClassEx.style = 0;
- aWndClassEx.lpfnWndProc = SalSysObjWndProcW;
- aWndClassEx.cbClsExtra = 0;
- aWndClassEx.cbWndExtra = SAL_OBJECT_WNDEXTRA;
- aWndClassEx.hInstance = pSalData->mhInst;
- aWndClassEx.hIcon = 0;
- aWndClassEx.hIconSm = 0;
- aWndClassEx.hCursor = LoadCursor( 0, IDC_ARROW );
- aWndClassEx.hbrBackground = 0;
- aWndClassEx.lpszMenuName = 0;
- aWndClassEx.lpszClassName = SAL_OBJECT_CLASSNAMEW;
- if ( RegisterClassExW( &aWndClassEx ) )
- {
- // Wegen PlugIn's loeschen wir erstmal den Hintergrund
- aWndClassEx.cbWndExtra = 0;
- aWndClassEx.hbrBackground = (HBRUSH)(COLOR_WINDOW+1);
- aWndClassEx.lpfnWndProc = SalSysObjChildWndProcW;
- aWndClassEx.lpszClassName = SAL_OBJECT_CHILDCLASSNAMEW;
- if ( RegisterClassExW( &aWndClassEx ) )
- pSalData->mbObjClassInit = TRUE;
- }
- }
- else
- {
- WNDCLASSEXA aWndClassEx;
- aWndClassEx.cbSize = sizeof( aWndClassEx );
- aWndClassEx.style = 0;
- aWndClassEx.lpfnWndProc = SalSysObjWndProcA;
- aWndClassEx.cbClsExtra = 0;
- aWndClassEx.cbWndExtra = SAL_OBJECT_WNDEXTRA;
- aWndClassEx.hInstance = pSalData->mhInst;
- aWndClassEx.hIcon = 0;
- aWndClassEx.hIconSm = 0;
- aWndClassEx.hCursor = LoadCursor( 0, IDC_ARROW );
- aWndClassEx.hbrBackground = 0;
- aWndClassEx.lpszMenuName = 0;
- aWndClassEx.lpszClassName = SAL_OBJECT_CLASSNAMEA;
- if ( RegisterClassExA( &aWndClassEx ) )
- {
- // Wegen PlugIn's loeschen wir erstmal den Hintergrund
- aWndClassEx.cbWndExtra = 0;
- aWndClassEx.hbrBackground = (HBRUSH)(COLOR_WINDOW+1);
- aWndClassEx.lpfnWndProc = SalSysObjChildWndProcA;
- aWndClassEx.lpszClassName = SAL_OBJECT_CHILDCLASSNAMEA;
- if ( RegisterClassExA( &aWndClassEx ) )
- pSalData->mbObjClassInit = TRUE;
- }
+ // Clean background first because of plugins.
+ aWndClassEx.cbWndExtra = 0;
+ aWndClassEx.hbrBackground = (HBRUSH)(COLOR_WINDOW+1);
+ aWndClassEx.lpfnWndProc = SalSysObjChildWndProcA;
+ aWndClassEx.lpszClassName = SAL_OBJECT_CHILDCLASSNAMEA;
+ pSalData->mbObjClassInit = TRUE;
}
}