Kaydet (Commit) e4600364 authored tarafından Tor Lillqvist's avatar Tor Lillqvist

Kill Win9x and NT4 code

üst 6cd6af5b
...@@ -154,9 +154,6 @@ struct SalShlData ...@@ -154,9 +154,6 @@ struct SalShlData
UINT mnWheelScrollLines; // WheelScrollLines UINT mnWheelScrollLines; // WheelScrollLines
UINT mnWheelScrollChars; // WheelScrollChars UINT mnWheelScrollChars; // WheelScrollChars
UINT mnWheelMsgId; // Wheel-Message-Id fuer W95 UINT mnWheelMsgId; // Wheel-Message-Id fuer W95
WORD mnVersion; // System-Version (311 == 3.11)
WIN_BOOL mbWNT; // kein W16/W95/W98 sondern ein NT
WIN_BOOL mbW40; // Is System-Version >= 4.0
WIN_BOOL mbWXP; // Windows XP WIN_BOOL mbWXP; // Windows XP
WIN_BOOL mbWPrinter; // true: use unicode printer functions WIN_BOOL mbWPrinter; // true: use unicode printer functions
// false: use anis compat printer functions // false: use anis compat printer functions
......
...@@ -121,21 +121,6 @@ bool WinSalSystem::initMonitors() ...@@ -121,21 +121,6 @@ bool WinSalSystem::initMonitors()
if( m_aMonitors.size() > 0 ) if( m_aMonitors.size() > 0 )
return true; return true;
bool winVerOk = true;
// multi monitor calls not available on Win95/NT
if ( aSalShlData.maVersionInfo.dwPlatformId == VER_PLATFORM_WIN32_NT )
{
if ( aSalShlData.maVersionInfo.dwMajorVersion <= 4 )
winVerOk = false; // NT
}
else if( aSalShlData.maVersionInfo.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS )
{
if ( aSalShlData.maVersionInfo.dwMajorVersion == 4 && aSalShlData.maVersionInfo.dwMinorVersion == 0 )
winVerOk = false; // Win95
}
if( winVerOk )
{
int nMonitors = GetSystemMetrics( SM_CMONITORS ); int nMonitors = GetSystemMetrics( SM_CMONITORS );
if( nMonitors == 1 ) if( nMonitors == 1 )
{ {
...@@ -201,23 +186,6 @@ bool WinSalSystem::initMonitors() ...@@ -201,23 +186,6 @@ bool WinSalSystem::initMonitors()
} }
} }
} }
}
else
{
int w = GetSystemMetrics( SM_CXSCREEN );
int h = GetSystemMetrics( SM_CYSCREEN );
m_aMonitors.push_back( DisplayMonitor( rtl::OUString(),
rtl::OUString(),
Rectangle( Point(), Size( w, h ) ),
Rectangle( Point(), Size( w, h ) ),
0 ) );
m_aDeviceNameToMonitor[ rtl::OUString() ] = 0;
m_nPrimary = 0;
RECT aWorkRect;
if( SystemParametersInfo( SPI_GETWORKAREA, 0, &aWorkRect, 0 ) )
m_aMonitors.back().m_aWorkArea = Rectangle( aWorkRect.left, aWorkRect.top,
aWorkRect.right, aWorkRect.bottom );
}
return m_aMonitors.size() > 0; return m_aMonitors.size() > 0;
} }
......
...@@ -512,20 +512,13 @@ SalInstance* CreateSalInstance() ...@@ -512,20 +512,13 @@ SalInstance* CreateSalInstance()
SalData* pSalData = GetSalData(); SalData* pSalData = GetSalData();
// determine the windows version // determine the windows version
aSalShlData.mbWNT = 0;
aSalShlData.mbWXP = 0; aSalShlData.mbWXP = 0;
aSalShlData.mbWPrinter = 0; aSalShlData.mbWPrinter = 0;
WORD nVer = (WORD)GetVersion(); WORD nVer = (WORD)GetVersion();
aSalShlData.mnVersion = (((WORD)LOBYTE(nVer)) * 100) + HIBYTE(nVer);
if ( aSalShlData.mnVersion >= 400 )
aSalShlData.mbW40 = 1;
rtl_zeroMemory( &aSalShlData.maVersionInfo, sizeof(aSalShlData.maVersionInfo) ); rtl_zeroMemory( &aSalShlData.maVersionInfo, sizeof(aSalShlData.maVersionInfo) );
aSalShlData.maVersionInfo.dwOSVersionInfoSize = sizeof( aSalShlData.maVersionInfo ); aSalShlData.maVersionInfo.dwOSVersionInfoSize = sizeof( aSalShlData.maVersionInfo );
if ( GetVersionEx( &aSalShlData.maVersionInfo ) ) if ( GetVersionEx( &aSalShlData.maVersionInfo ) )
{ {
if ( aSalShlData.maVersionInfo.dwPlatformId == VER_PLATFORM_WIN32_NT )
{
aSalShlData.mbWNT = 1;
// Windows XP ? // Windows XP ?
if ( aSalShlData.maVersionInfo.dwMajorVersion > 5 || if ( aSalShlData.maVersionInfo.dwMajorVersion > 5 ||
( aSalShlData.maVersionInfo.dwMajorVersion == 5 && aSalShlData.maVersionInfo.dwMinorVersion >= 1 ) ) ( aSalShlData.maVersionInfo.dwMajorVersion == 5 && aSalShlData.maVersionInfo.dwMinorVersion >= 1 ) )
...@@ -533,14 +526,11 @@ SalInstance* CreateSalInstance() ...@@ -533,14 +526,11 @@ SalInstance* CreateSalInstance()
if( aSalShlData.maVersionInfo.dwMajorVersion >= 5 ) if( aSalShlData.maVersionInfo.dwMajorVersion >= 5 )
aSalShlData.mbWPrinter = 1; aSalShlData.mbWPrinter = 1;
} }
}
pSalData->mnAppThreadId = GetCurrentThreadId(); pSalData->mnAppThreadId = GetCurrentThreadId();
// register frame class // register frame class
if ( !pSalData->mhPrevInst ) if ( !pSalData->mhPrevInst )
{
if ( aSalShlData.mbWNT )
{ {
WNDCLASSEXW aWndClassEx; WNDCLASSEXW aWndClassEx;
aWndClassEx.cbSize = sizeof( aWndClassEx ); aWndClassEx.cbSize = sizeof( aWndClassEx );
...@@ -578,52 +568,11 @@ SalInstance* CreateSalInstance() ...@@ -578,52 +568,11 @@ SalInstance* CreateSalInstance()
if ( !RegisterClassExW( &aWndClassEx ) ) if ( !RegisterClassExW( &aWndClassEx ) )
return NULL; return NULL;
} }
else
{
WNDCLASSEXA aWndClassEx;
aWndClassEx.cbSize = sizeof( aWndClassEx );
aWndClassEx.style = CS_OWNDC;
aWndClassEx.lpfnWndProc = SalFrameWndProcA;
aWndClassEx.cbClsExtra = 0;
aWndClassEx.cbWndExtra = SAL_FRAME_WNDEXTRA;
aWndClassEx.hInstance = pSalData->mhInst;
aWndClassEx.hCursor = 0;
aWndClassEx.hbrBackground = 0;
aWndClassEx.lpszMenuName = 0;
aWndClassEx.lpszClassName = SAL_FRAME_CLASSNAMEA;
ImplLoadSalIcon( SAL_RESID_ICON_DEFAULT, aWndClassEx.hIcon, aWndClassEx.hIconSm );
if ( !RegisterClassExA( &aWndClassEx ) )
return NULL;
aWndClassEx.hIcon = 0;
aWndClassEx.hIconSm = 0;
aWndClassEx.style |= CS_SAVEBITS;
aWndClassEx.lpszClassName = SAL_SUBFRAME_CLASSNAMEA;
if ( !RegisterClassExA( &aWndClassEx ) )
return NULL;
aWndClassEx.style = 0;
aWndClassEx.lpfnWndProc = SalComWndProcA;
aWndClassEx.cbWndExtra = 0;
aWndClassEx.lpszClassName = SAL_COM_CLASSNAMEA;
if ( !RegisterClassExA( &aWndClassEx ) )
return NULL;
}
}
HWND hComWnd; HWND hComWnd;
if ( aSalShlData.mbWNT )
{
hComWnd = CreateWindowExW( WS_EX_TOOLWINDOW, SAL_COM_CLASSNAMEW, hComWnd = CreateWindowExW( WS_EX_TOOLWINDOW, SAL_COM_CLASSNAMEW,
L"", WS_POPUP, 0, 0, 0, 0, 0, 0, L"", WS_POPUP, 0, 0, 0, 0, 0, 0,
pSalData->mhInst, NULL ); pSalData->mhInst, NULL );
}
else
{
hComWnd = CreateWindowExA( WS_EX_TOOLWINDOW, SAL_COM_CLASSNAMEA,
"", WS_POPUP, 0, 0, 0, 0, 0, 0,
pSalData->mhInst, NULL );
}
if ( !hComWnd ) if ( !hComWnd )
return NULL; return NULL;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment