diff options
-rw-r--r-- | desktop/source/app/app.cxx | 4 | ||||
-rw-r--r-- | include/vcl/svapp.hxx | 2 | ||||
-rw-r--r-- | vcl/source/app/svapp.cxx | 17 |
3 files changed, 17 insertions, 6 deletions
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx index 962e2b4e1984..8c0fe6aa0654 100644 --- a/desktop/source/app/app.cxx +++ b/desktop/source/app/app.cxx @@ -1951,8 +1951,8 @@ void Desktop::SystemSettingsChanging( AllSettings& rSettings ) sal_uInt32 nDragFullOptions = hStyleSettings.GetDragFullOptions(); SvtTabAppearanceCfg aAppearanceCfg; - sal_uInt16 nGet = aAppearanceCfg.GetDragMode(); - switch ( nGet ) + sal_uInt16 nDragMode = aAppearanceCfg.GetDragMode(); + switch ( nDragMode ) { case DragFullWindow: nDragFullOptions |= DRAGFULL_OPTION_ALL; diff --git a/include/vcl/svapp.hxx b/include/vcl/svapp.hxx index 8e7b053961fb..f0e9b80ff75c 100644 --- a/include/vcl/svapp.hxx +++ b/include/vcl/svapp.hxx @@ -780,6 +780,8 @@ public: private: + static void InitSettings(); + DECL_STATIC_LINK( Application, PostEventHandler, void* ); }; diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx index a754856c9608..ac13c7360f4d 100644 --- a/vcl/source/app/svapp.cxx +++ b/vcl/source/app/svapp.cxx @@ -519,7 +519,7 @@ void Application::SetSettings( const AllSettings& rSettings ) ImplSVData* pSVData = ImplGetSVData(); if ( !pSVData->maAppData.mpSettings ) { - GetSettings(); + InitSettings(); *pSVData->maAppData.mpSettings = rSettings; ResMgr::SetDefaultLocale( rSettings.GetUILanguageTag() ); } @@ -618,14 +618,23 @@ const AllSettings& Application::GetSettings() ImplSVData* pSVData = ImplGetSVData(); if ( !pSVData->maAppData.mpSettings ) { - pSVData->maAppData.mpCfgListener = new LocaleConfigurationListener; - pSVData->maAppData.mpSettings = new AllSettings(); - pSVData->maAppData.mpSettings->GetSysLocale().GetOptions().AddListener( pSVData->maAppData.mpCfgListener ); + InitSettings(); } return *(pSVData->maAppData.mpSettings); } +void Application::InitSettings() +{ + ImplSVData* pSVData = ImplGetSVData(); + + assert(!pSVData->maAppData.mpSettings); // initialization should not happen twice! + + pSVData->maAppData.mpCfgListener = new LocaleConfigurationListener; + pSVData->maAppData.mpSettings = new AllSettings(); + pSVData->maAppData.mpSettings->GetSysLocale().GetOptions().AddListener( pSVData->maAppData.mpCfgListener ); +} + void Application::NotifyAllWindows( DataChangedEvent& rDCEvt ) { ImplSVData* pSVData = ImplGetSVData(); |