summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-04-13 09:36:25 +0200
committerMichael Stahl <mstahl@redhat.com>2016-04-13 10:58:00 +0000
commit9a2ff36b51f86ca3ade8093d7698314c0d3db6a6 (patch)
tree0ad2d4afa2f2d345cced80b48812e8fb302625f1
parent32102b9aa75a296b99f3fdaf370bd83bfd629f4e (diff)
remove dead stuff from Windows SalData
- drop mbInTimerProc field - drop mnSageStatus,mpSageEnableProc fields i.e. SAGE.DLL (System Agent) workaround, which died out with Win95/98 - convert some TRUE/FALSE constants to true/false where the field is a bool - drop maDwmLib, mpDwmIsCompositionEnabled fields Change-Id: I7b773f915dbc329eb0262bc8fee2ea7c72d25c66 Reviewed-on: https://gerrit.libreoffice.org/24047 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
-rw-r--r--vcl/inc/win/saldata.hxx9
-rw-r--r--vcl/inc/win/wincomp.hxx5
-rw-r--r--vcl/win/app/salinst.cxx4
-rw-r--r--vcl/win/gdi/salnativewidgets-luna.cxx6
-rw-r--r--vcl/win/window/salframe.cxx37
-rw-r--r--vcl/win/window/salobj.cxx2
6 files changed, 8 insertions, 55 deletions
diff --git a/vcl/inc/win/saldata.hxx b/vcl/inc/win/saldata.hxx
index c9215144be4d..03c9faa7acf3 100644
--- a/vcl/inc/win/saldata.hxx
+++ b/vcl/inc/win/saldata.hxx
@@ -40,8 +40,6 @@ namespace vcl { class Font; }
struct HDCCache;
struct TempFontItem;
-typedef HRESULT (WINAPI *DwmIsCompositionEnabled_ptr)(BOOL*);
-
#define MAX_STOCKPEN 4
#define MAX_STOCKBRUSH 4
#define SAL_CLIPRECT_COUNT 16
@@ -87,7 +85,6 @@ public:
DWORD mnNextTimerTime;
DWORD mnLastEventTime;
HANDLE mnTimerId; ///< Windows timer id
- bool mbInTimerProc; // timer event is currently being dispatched
HHOOK mhSalObjMsgHook; // hook to get interesting msg for SalObject
HWND mhWantLeaveMsg; // window handle, that want a MOUSELEAVE message
AutoTimer* mpMouseLeaveTimer; // Timer for MouseLeave Test
@@ -109,10 +106,8 @@ public:
BYTE mnCacheDCInUse; // count of CacheDC in use
bool mbObjClassInit; // is SALOBJECTCLASS initialised
bool mbInPalChange; // is in WM_QUERYNEWPALETTE
- DWORD mnAppThreadId; // Id from Applikation-Thread
+ DWORD mnAppThreadId; // Id from Application-Thread
BOOL mbScrSvrEnabled; // ScreenSaver enabled
- int mnSageStatus; // status of Sage-DLL (DISABLE_AGENT == does not exist)
- SysAgt_Enable_PROC mpSageEnableProc; // funktion to deactivate the system agent
SalIcon* mpFirstIcon; // icon cache, points to first icon, NULL if none
TempFontItem* mpTempFontItem;
bool mbThemeChanged; // true if visual theme was changed: throw away theme handles
@@ -123,8 +118,6 @@ public:
std::set< HMENU > mhMenuSet; // keeps track of menu handles created by VCL, used by IsKnownMenuHandle()
std::map< UINT,sal_uInt16 > maVKMap; // map some dynamic VK_* entries
- oslModule maDwmLib;
- DwmIsCompositionEnabled_ptr mpDwmIsCompositionEnabled;
};
inline void SetSalData( SalData* pData ) { ImplGetSVData()->mpSalData = pData; }
diff --git a/vcl/inc/win/wincomp.hxx b/vcl/inc/win/wincomp.hxx
index b1f0fa73b334..549b3f4dd175 100644
--- a/vcl/inc/win/wincomp.hxx
+++ b/vcl/inc/win/wincomp.hxx
@@ -198,11 +198,6 @@ inline HINSTANCE GetWindowInstance( HWND hWnd )
#endif
-#define ENABLE_AGENT 1
-#define DISABLE_AGENT 2
-#define GET_AGENT_STATUS 3
-typedef int (APIENTRY* SysAgt_Enable_PROC)( int );
-
// - 5.0-Erweiterungen -
#ifndef COLOR_GRADIENTACTIVECAPTION
diff --git a/vcl/win/app/salinst.cxx b/vcl/win/app/salinst.cxx
index 346d439f8ba9..dd687d813b2b 100644
--- a/vcl/win/app/salinst.cxx
+++ b/vcl/win/app/salinst.cxx
@@ -363,8 +363,6 @@ SalData::SalData()
mbInPalChange = false; // is in WM_QUERYNEWPALETTE
mnAppThreadId = 0; // Id from Applikation-Thread
mbScrSvrEnabled = FALSE; // ScreenSaver enabled
- mnSageStatus = 0; // status of Sage-DLL (DISABLE_AGENT == not available)
- mpSageEnableProc = 0; // funktion to deactivate the system agent
mpFirstIcon = 0; // icon cache, points to first icon, NULL if none
mpTempFontItem = 0;
mbThemeChanged = false; // true if visual theme was changed: throw away theme handles
@@ -372,8 +370,6 @@ SalData::SalData()
// init with NULL
gdiplusToken = 0;
- maDwmLib = 0;
- mpDwmIsCompositionEnabled = 0;
initKeyCodeMap();
diff --git a/vcl/win/gdi/salnativewidgets-luna.cxx b/vcl/win/gdi/salnativewidgets-luna.cxx
index d9db4a06412f..e65974794c08 100644
--- a/vcl/win/gdi/salnativewidgets-luna.cxx
+++ b/vcl/win/gdi/salnativewidgets-luna.cxx
@@ -206,8 +206,6 @@ void SalData::deInitNWF()
++iter;
}
aThemeMap.clear();
- if( maDwmLib )
- osl_unloadModule( maDwmLib );
}
static HTHEME getThemeHandle( HWND hWnd, LPCWSTR name )
@@ -216,7 +214,7 @@ static HTHEME getThemeHandle( HWND hWnd, LPCWSTR name )
{
// throw away invalid theme handles
GetSalData()->deInitNWF();
- GetSalData()->mbThemeChanged = FALSE;
+ GetSalData()->mbThemeChanged = false;
}
ThemeMap::iterator iter;
@@ -1563,7 +1561,7 @@ void WinSalGraphics::updateSettingsNative( AllSettings& rSettings )
pSVData->maNWFData.mnMenuFormatBorderX = 2;
pSVData->maNWFData.mnMenuFormatBorderY = 2;
pSVData->maNWFData.maMenuBarHighlightTextColor = aMenuBarTextColor;
- GetSalData()->mbThemeMenuSupport = TRUE;
+ GetSalData()->mbThemeMenuSupport = true;
}
rSettings.SetStyleSettings( aStyleSettings );
diff --git a/vcl/win/window/salframe.cxx b/vcl/win/window/salframe.cxx
index ad2693e2594a..851c2a131406 100644
--- a/vcl/win/window/salframe.cxx
+++ b/vcl/win/window/salframe.cxx
@@ -1936,31 +1936,6 @@ void WinSalFrame::StartPresentation( bool bStart )
SalData* pSalData = GetSalData();
if ( bStart )
{
- if ( !pSalData->mpSageEnableProc )
- {
- if ( pSalData->mnSageStatus != DISABLE_AGENT )
- {
- OFSTRUCT aOS;
- OpenFile( "SAGE.DLL", &aOS, OF_EXIST );
-
- if ( !aOS.nErrCode )
- {
- OUString aLibraryName( OUString::createFromAscii( aOS.szPathName ) );
- oslModule mhSageInst = osl_loadModule( aLibraryName.pData, SAL_LOADMODULE_DEFAULT );
- pSalData->mpSageEnableProc = (SysAgt_Enable_PROC)osl_getAsciiFunctionSymbol( mhSageInst, "System_Agent_Enable" );
- }
- else
- pSalData->mnSageStatus = DISABLE_AGENT;
- }
- }
-
- if ( pSalData->mpSageEnableProc )
- {
- pSalData->mnSageStatus = pSalData->mpSageEnableProc( GET_AGENT_STATUS );
- if ( pSalData->mnSageStatus == ENABLE_AGENT )
- pSalData->mpSageEnableProc( DISABLE_AGENT );
- }
-
// turn off screen-saver when in Presentation mode
SystemParametersInfo( SPI_GETSCREENSAVEACTIVE, 0,
&(pSalData->mbScrSvrEnabled), 0 );
@@ -1972,10 +1947,6 @@ void WinSalFrame::StartPresentation( bool bStart )
// turn on screen-saver
if ( pSalData->mbScrSvrEnabled )
SystemParametersInfo( SPI_SETSCREENSAVEACTIVE, pSalData->mbScrSvrEnabled, 0, 0 );
-
- // re-activate system agents
- if ( pSalData->mnSageStatus == ENABLE_AGENT )
- pSalData->mpSageEnableProc( pSalData->mnSageStatus );
}
}
@@ -2698,7 +2669,7 @@ void WinSalFrame::UpdateSettings( AllSettings& rSettings )
pSVData->maNWFData.mnMenuFormatBorderX = 0;
pSVData->maNWFData.mnMenuFormatBorderY = 0;
pSVData->maNWFData.maMenuBarHighlightTextColor = Color( COL_TRANSPARENT );
- GetSalData()->mbThemeMenuSupport = FALSE;
+ GetSalData()->mbThemeMenuSupport = false;
if (officecfg::Office::Common::Accessibility::AutoDetectSystemHC::get())
{
aStyleSettings.SetShadowColor( ImplWinColorToSal( GetSysColor( COLOR_ACTIVEBORDER ) ) );
@@ -4216,7 +4187,7 @@ static LRESULT ImplHandlePalette( bool bFrame, HWND hWnd, UINT nMsg,
bool bStdDC;
bool bUpdate;
- pSalData->mbInPalChange = TRUE;
+ pSalData->mbInPalChange = true;
// reset all palettes in VirDevs and Frames
pTempVD = pSalData->mpFirstVD;
@@ -4313,7 +4284,7 @@ static LRESULT ImplHandlePalette( bool bFrame, HWND hWnd, UINT nMsg,
}
}
- pSalData->mbInPalChange = FALSE;
+ pSalData->mbInPalChange = false;
if ( bReleaseMutex )
ImplSalYieldMutexRelease();
@@ -5793,7 +5764,7 @@ LRESULT CALLBACK SalFrameWndProc( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lP
break;
case WM_THEMECHANGED:
- GetSalData()->mbThemeChanged = TRUE;
+ GetSalData()->mbThemeChanged = true;
break;
case SAL_MSG_USEREVENT:
diff --git a/vcl/win/window/salobj.cxx b/vcl/win/window/salobj.cxx
index a0fb9c39ca05..49aa26f0c2c7 100644
--- a/vcl/win/window/salobj.cxx
+++ b/vcl/win/window/salobj.cxx
@@ -489,7 +489,7 @@ SalObject* ImplSalCreateObject( WinSalInstance* pInst, WinSalFrame* pParent )
aWndClassEx.lpfnWndProc = SalSysObjChildWndProcA;
aWndClassEx.lpszClassName = SAL_OBJECT_CHILDCLASSNAMEA;
if ( RegisterClassExA( &aWndClassEx ) )
- pSalData->mbObjClassInit = TRUE;
+ pSalData->mbObjClassInit = true;
}
}