Remove unused Window parameter from SystemSettingsChanging
This took a bit of code archaelogy for me to track down. It turns out that as part of an effort to optimize startup, the line of code in this function was commented out, presumably to be rewritten later. This happened in commit ee3351d78c in July 2001 (!). About three years later, in February 2004, the function was rewritten in commit 189c2388d80. As it turns out, the only two functions that used the Window parameter were vcl/source/window/window.cxx (which passed itself in, but of course this did nothing) and vcl/source/window/winproc.cxx. Furthermore, winproc only ever passed in the first frame, so it didn't really do anything either. Consequently, the function as it stands *now* only notifies the application that system settings have been changed. It doesn't care which window it tells. Therefore, I have excised this parameter from the function. I don't think it made sense when it was implemented anyway, so there is no net loss. After removing the unneeded parameter, I was also able to remove the Window parameter from winproc.cxx's ImplHandleSalSettings function as it was only ever used to set the top level window, which is now irrelevant. Change-Id: I84f2c5c5ff8969387da3af81e4a9c7f9ac6237e1 Reviewed-on: https://gerrit.libreoffice.org/7541 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com>
This commit is contained in:
parent
305077c6c3
commit
b799cb7528
@ -78,7 +78,7 @@ class Desktop : public Application
|
||||
virtual void DeInit();
|
||||
virtual sal_Bool QueryExit();
|
||||
virtual sal_uInt16 Exception(sal_uInt16 nError);
|
||||
virtual void SystemSettingsChanging( AllSettings& rSettings, Window* pFrame );
|
||||
virtual void SystemSettingsChanging( AllSettings& rSettings );
|
||||
virtual void AppEvent( const ApplicationEvent& rAppEvent );
|
||||
|
||||
DECL_LINK( OpenClients_Impl, void* );
|
||||
|
@ -1933,7 +1933,7 @@ sal_Bool Desktop::InitializeQuickstartMode( const Reference< XComponentContext >
|
||||
}
|
||||
}
|
||||
|
||||
void Desktop::SystemSettingsChanging( AllSettings& rSettings, Window* )
|
||||
void Desktop::SystemSettingsChanging( AllSettings& rSettings )
|
||||
{
|
||||
if ( !SvtTabAppearanceCfg::IsInitialized () )
|
||||
return;
|
||||
|
@ -563,8 +563,7 @@ public:
|
||||
*/
|
||||
static sal_Bool IsUICaptured();
|
||||
|
||||
virtual void SystemSettingsChanging( AllSettings& rSettings,
|
||||
Window* pFrame );
|
||||
virtual void SystemSettingsChanging( AllSettings& rSettings );
|
||||
static void MergeSystemSettings( AllSettings& rSettings );
|
||||
|
||||
static void SetSettings( const AllSettings& rSettings );
|
||||
|
@ -219,7 +219,7 @@ void SvtTabAppearanceCfg::SetApplicationDefaults ( Application* pApp )
|
||||
|
||||
hAppSettings.SetStyleSettings( hAppStyle );
|
||||
pApp->MergeSystemSettings ( hAppSettings ); // Allow system-settings to apply
|
||||
pApp->SystemSettingsChanging ( hAppSettings, NULL );// Allow overruling of system-settings
|
||||
pApp->SystemSettingsChanging ( hAppSettings ); // Allow overruling of system-settings
|
||||
//is concerned with window drag
|
||||
|
||||
pApp->SetSettings ( hAppSettings );
|
||||
|
@ -476,8 +476,7 @@ sal_Bool Application::IsUICaptured()
|
||||
return sal_False;
|
||||
}
|
||||
|
||||
void Application::SystemSettingsChanging( AllSettings& /*rSettings*/,
|
||||
Window* /*pFrame*/ )
|
||||
void Application::SystemSettingsChanging( AllSettings& /*rSettings*/ )
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -689,7 +689,7 @@ void Window::ImplUpdateGlobalSettings( AllSettings& rSettings, sal_Bool bCallHdl
|
||||
#endif
|
||||
|
||||
if ( bCallHdl )
|
||||
GetpApp()->SystemSettingsChanging( rSettings, this );
|
||||
GetpApp()->SystemSettingsChanging( rSettings );
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
|
@ -2124,13 +2124,8 @@ static void ImplHandleInputLanguageChange( Window* pWindow )
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
|
||||
static void ImplHandleSalSettings( Window* pWindow, sal_uInt16 nEvent )
|
||||
static void ImplHandleSalSettings( sal_uInt16 nEvent )
|
||||
{
|
||||
// Application Notification werden nur fuer das erste Window ausgeloest
|
||||
ImplSVData* pSVData = ImplGetSVData();
|
||||
if ( pWindow != pSVData->maWinData.mpFirstFrame )
|
||||
return;
|
||||
|
||||
Application* pApp = GetpApp();
|
||||
if ( !pApp )
|
||||
return;
|
||||
@ -2139,7 +2134,7 @@ static void ImplHandleSalSettings( Window* pWindow, sal_uInt16 nEvent )
|
||||
{
|
||||
AllSettings aSettings = pApp->GetSettings();
|
||||
pApp->MergeSystemSettings( aSettings );
|
||||
pApp->SystemSettingsChanging( aSettings, pWindow );
|
||||
pApp->SystemSettingsChanging( aSettings );
|
||||
pApp->SetSettings( aSettings );
|
||||
}
|
||||
else
|
||||
@ -2539,7 +2534,7 @@ bool ImplWindowFrameProc( Window* pWindow, SalFrame* /*pFrame*/,
|
||||
case SALEVENT_FONTCHANGED:
|
||||
case SALEVENT_DATETIMECHANGED:
|
||||
case SALEVENT_KEYBOARDCHANGED:
|
||||
ImplHandleSalSettings( pWindow, nEvent );
|
||||
ImplHandleSalSettings( nEvent );
|
||||
break;
|
||||
|
||||
case SALEVENT_USEREVENT:
|
||||
|
Loading…
x
Reference in New Issue
Block a user