vcl/inc/win/saldata.hxx               |    9 --------
 vcl/inc/win/wincomp.hxx               |    5 ----
 vcl/win/app/salinst.cxx               |    4 ---
 vcl/win/gdi/salnativewidgets-luna.cxx |    6 +----
 vcl/win/window/salframe.cxx           |   37 +++-------------------------------
 vcl/win/window/salobj.cxx             |    2 -
 6 files changed, 8 insertions(+), 55 deletions(-)

New commits:
commit 9a2ff36b51f86ca3ade8093d7698314c0d3db6a6
Author: Noel Grandin <n...@peralex.com>
Date:   Wed Apr 13 09:36:25 2016 +0200

    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 <c...@libreoffice.org>
    Reviewed-by: Michael Stahl <mst...@redhat.com>

diff --git a/vcl/inc/win/saldata.hxx b/vcl/inc/win/saldata.hxx
index c921514..03c9faa7 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 b1f0fa7..549b3f4 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 346d439..dd687d8 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 d9db4a0..e659747 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 ad2693e..851c2a1 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 a0fb9c3..49aa26f 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;
         }
     }
 
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to