diff options
-rw-r--r-- | include/sfx2/app.hxx | 4 | ||||
-rw-r--r-- | sfx2/source/appl/app.cxx | 62 | ||||
-rw-r--r-- | sfx2/source/appl/appbas.cxx | 12 | ||||
-rw-r--r-- | sfx2/source/appl/appchild.cxx | 24 | ||||
-rw-r--r-- | sfx2/source/appl/appdde.cxx | 42 | ||||
-rw-r--r-- | sfx2/source/appl/appinit.cxx | 54 | ||||
-rw-r--r-- | sfx2/source/appl/appmain.cxx | 8 | ||||
-rw-r--r-- | sfx2/source/appl/appmisc.cxx | 8 | ||||
-rw-r--r-- | sfx2/source/appl/appquit.cxx | 54 | ||||
-rw-r--r-- | sfx2/source/appl/appreg.cxx | 12 | ||||
-rw-r--r-- | sfx2/source/appl/appserv.cxx | 18 |
11 files changed, 148 insertions, 150 deletions
diff --git a/include/sfx2/app.hxx b/include/sfx2/app.hxx index 4978bc732377..2b02ed1356a7 100644 --- a/include/sfx2/app.hxx +++ b/include/sfx2/app.hxx @@ -107,7 +107,7 @@ class SfxObjectShellLock; class SFX2_DLLPUBLIC SfxApplication: public SfxShell { - SfxAppData_Impl* pAppData_Impl; + std::unique_ptr<SfxAppData_Impl> pImpl; DECL_DLLPRIVATE_LINK_TYPED( GlobalBasicErrorHdl_Impl, StarBASIC*, bool ); @@ -183,7 +183,7 @@ public: SAL_DLLPRIVATE void SetOptions_Impl(const SfxItemSet &); SAL_DLLPRIVATE void Initialize_Impl(); - SAL_DLLPRIVATE SfxAppData_Impl* Get_Impl() const { return pAppData_Impl; } + SAL_DLLPRIVATE SfxAppData_Impl* Get_Impl() const { return pImpl.get(); } // Object-Factories/global arrays SAL_DLLPRIVATE void RegisterChildWindow_Impl(SfxModule*, SfxChildWinFactory*); diff --git a/sfx2/source/appl/app.cxx b/sfx2/source/appl/app.cxx index 085961e317bc..86197278f3b2 100644 --- a/sfx2/source/appl/app.cxx +++ b/sfx2/source/appl/app.cxx @@ -165,14 +165,13 @@ SfxApplication* SfxApplication::GetOrCreate() } SfxApplication::SfxApplication() - : pAppData_Impl( nullptr ) + : pImpl( new SfxAppData_Impl( this ) ) { SetName( "StarOffice" ); if (!utl::ConfigManager::IsAvoidConfig()) SvtViewOptions::AcquireOptions(); - pAppData_Impl = new SfxAppData_Impl( this ); - pAppData_Impl->m_xImeStatusWindow->init(); + pImpl->m_xImeStatusWindow->init(); SAL_INFO( "sfx.appl", "{ initialize DDE" ); @@ -220,14 +219,13 @@ SfxApplication::~SfxApplication() if (!utl::ConfigManager::IsAvoidConfig()) SvtViewOptions::ReleaseOptions(); - if ( !pAppData_Impl->bDowning ) + if ( !pImpl->bDowning ) Deinitialize(); #if HAVE_FEATURE_SCRIPTING delete pBasic; #endif - delete pAppData_Impl; g_pSfxApplication = nullptr; } @@ -247,7 +245,7 @@ const OUString& SfxApplication::GetLastDir_Impl() const */ { - return pAppData_Impl->aLastDir; + return pImpl->aLastDir; } const OUString& SfxApplication::GetLastSaveDirectory() const @@ -280,28 +278,28 @@ void SfxApplication::SetLastDir_Impl */ { - pAppData_Impl->aLastDir = rNewDir; + pImpl->aLastDir = rNewDir; } void SfxApplication::ResetLastDir() { - pAppData_Impl->aLastDir.clear(); + pImpl->aLastDir.clear(); } SfxDispatcher* SfxApplication::GetDispatcher_Impl() { - return pAppData_Impl->pViewFrame? pAppData_Impl->pViewFrame->GetDispatcher(): pAppData_Impl->pAppDispat; + return pImpl->pViewFrame? pImpl->pViewFrame->GetDispatcher(): pImpl->pAppDispat; } void SfxApplication::SetViewFrame_Impl( SfxViewFrame *pFrame ) { - if ( pFrame != pAppData_Impl->pViewFrame ) + if ( pFrame != pImpl->pViewFrame ) { // get the containerframes ( if one of the frames is an InPlaceFrame ) - SfxViewFrame *pOldContainerFrame = pAppData_Impl->pViewFrame; + SfxViewFrame *pOldContainerFrame = pImpl->pViewFrame; while ( pOldContainerFrame && pOldContainerFrame->GetParentViewFrame_Impl() ) pOldContainerFrame = pOldContainerFrame->GetParentViewFrame_Impl(); SfxViewFrame *pNewContainerFrame = pFrame; @@ -323,7 +321,7 @@ void SfxApplication::SetViewFrame_Impl( SfxViewFrame *pFrame ) pOldContainerFrame->GetProgress()->Suspend(); } - pAppData_Impl->pViewFrame = pFrame; + pImpl->pViewFrame = pFrame; if( pNewContainerFrame ) { @@ -343,9 +341,9 @@ void SfxApplication::SetViewFrame_Impl( SfxViewFrame *pFrame ) pProgress->SetState( pProgress->GetState() ); } - if ( pAppData_Impl->pViewFrame->GetViewShell() ) + if ( pImpl->pViewFrame->GetViewShell() ) { - SfxDispatcher* pDisp = pAppData_Impl->pViewFrame->GetDispatcher(); + SfxDispatcher* pDisp = pImpl->pViewFrame->GetDispatcher(); pDisp->Flush(); pDisp->Update_Impl(true); } @@ -373,30 +371,30 @@ void SfxApplication::SetProgress_Impl ) { - DBG_ASSERT( ( !pAppData_Impl->pProgress && pProgress ) || - ( pAppData_Impl->pProgress && !pProgress ), + DBG_ASSERT( ( !pImpl->pProgress && pProgress ) || + ( pImpl->pProgress && !pProgress ), "Progress activation/deactivation mismatch" ); - if ( pAppData_Impl->pProgress && pProgress ) + if ( pImpl->pProgress && pProgress ) { - pAppData_Impl->pProgress->Suspend(); - pAppData_Impl->pProgress->UnLock(); - delete pAppData_Impl->pProgress; + pImpl->pProgress->Suspend(); + pImpl->pProgress->UnLock(); + delete pImpl->pProgress; } - pAppData_Impl->pProgress = pProgress; + pImpl->pProgress = pProgress; } sal_uInt16 SfxApplication::GetFreeIndex() { - return pAppData_Impl->aIndexBitSet.GetFreeIndex()+1; + return pImpl->aIndexBitSet.GetFreeIndex()+1; } void SfxApplication::ReleaseIndex(sal_uInt16 i) { - pAppData_Impl->aIndexBitSet.ReleaseIndex(i-1); + pImpl->aIndexBitSet.ReleaseIndex(i-1); } @@ -408,27 +406,27 @@ vcl::Window* SfxApplication::GetTopWindow() const SfxTbxCtrlFactArr_Impl& SfxApplication::GetTbxCtrlFactories_Impl() const { - return *pAppData_Impl->pTbxCtrlFac; + return *pImpl->pTbxCtrlFac; } SfxStbCtrlFactArr_Impl& SfxApplication::GetStbCtrlFactories_Impl() const { - return *pAppData_Impl->pStbCtrlFac; + return *pImpl->pStbCtrlFac; } SfxViewFrameArr_Impl& SfxApplication::GetViewFrames_Impl() const { - return *pAppData_Impl->pViewFrames; + return *pImpl->pViewFrames; } SfxViewShellArr_Impl& SfxApplication::GetViewShells_Impl() const { - return *pAppData_Impl->pViewShells; + return *pImpl->pViewShells; } SfxObjectShellArr_Impl& SfxApplication::GetObjectShells_Impl() const { - return *pAppData_Impl->pObjShells; + return *pImpl->pObjShells; } void SfxApplication::Invalidate( sal_uInt16 nId ) @@ -597,12 +595,12 @@ ErrCode SfxApplication::CallBasic( const OUString& rCode, BasicManager* pMgr, Sb sfx2::sidebar::Theme & SfxApplication::GetSidebarTheme() { - if (!pAppData_Impl->m_pSidebarTheme.is()) + if (!pImpl->m_pSidebarTheme.is()) { - pAppData_Impl->m_pSidebarTheme.set(new sfx2::sidebar::Theme); - pAppData_Impl->m_pSidebarTheme->InitializeTheme(); + pImpl->m_pSidebarTheme.set(new sfx2::sidebar::Theme); + pImpl->m_pSidebarTheme->InitializeTheme(); } - return *pAppData_Impl->m_pSidebarTheme; + return *pImpl->m_pSidebarTheme; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sfx2/source/appl/appbas.cxx b/sfx2/source/appl/appbas.cxx index 7aa28398cab5..b092a13fb1f8 100644 --- a/sfx2/source/appl/appbas.cxx +++ b/sfx2/source/appl/appbas.cxx @@ -89,8 +89,8 @@ using ::basic::BasicManagerRepository; void SfxApplication::SaveBasicAndDialogContainer() const { - if ( pAppData_Impl->pBasicManager->isValid() ) - pAppData_Impl->pBasicManager->storeAllLibraries(); + if ( pImpl->pBasicManager->isValid() ) + pImpl->pBasicManager->storeAllLibraries(); } BasicManager* SfxApplication::GetBasicManager() @@ -111,9 +111,9 @@ XLibraryContainer * SfxApplication::GetDialogContainer() #else if (utl::ConfigManager::IsAvoidConfig()) return nullptr; - if ( !pAppData_Impl->pBasicManager->isValid() ) + if ( !pImpl->pBasicManager->isValid() ) GetBasicManager(); - return pAppData_Impl->pBasicManager->getLibraryContainer( SfxBasicManagerHolder::DIALOGS ); + return pImpl->pBasicManager->getLibraryContainer( SfxBasicManagerHolder::DIALOGS ); #endif } @@ -125,9 +125,9 @@ XLibraryContainer * SfxApplication::GetBasicContainer() #else if (utl::ConfigManager::IsAvoidConfig()) return nullptr; - if ( !pAppData_Impl->pBasicManager->isValid() ) + if ( !pImpl->pBasicManager->isValid() ) GetBasicManager(); - return pAppData_Impl->pBasicManager->getLibraryContainer( SfxBasicManagerHolder::SCRIPTS ); + return pImpl->pBasicManager->getLibraryContainer( SfxBasicManagerHolder::SCRIPTS ); #endif } diff --git a/sfx2/source/appl/appchild.cxx b/sfx2/source/appl/appchild.cxx index 5475b22cea9b..2669ab991bae 100644 --- a/sfx2/source/appl/appchild.cxx +++ b/sfx2/source/appl/appchild.cxx @@ -43,18 +43,18 @@ void SfxApplication::RegisterChildWindow_Impl( SfxModule *pMod, SfxChildWinFacto return; } - if (!pAppData_Impl->pFactArr) - pAppData_Impl->pFactArr = new SfxChildWinFactArr_Impl; + if (!pImpl->pFactArr) + pImpl->pFactArr = new SfxChildWinFactArr_Impl; - for (size_t nFactory=0; nFactory<pAppData_Impl->pFactArr->size(); ++nFactory) + for (size_t nFactory=0; nFactory<pImpl->pFactArr->size(); ++nFactory) { - if (pFact->nId == (*pAppData_Impl->pFactArr)[nFactory].nId) + if (pFact->nId == (*pImpl->pFactArr)[nFactory].nId) { - pAppData_Impl->pFactArr->erase( pAppData_Impl->pFactArr->begin() + nFactory ); + pImpl->pFactArr->erase( pImpl->pFactArr->begin() + nFactory ); } } - pAppData_Impl->pFactArr->push_back( pFact ); + pImpl->pFactArr->push_back( pFact ); } void SfxApplication::RegisterChildWindowContext_Impl( SfxModule *pMod, sal_uInt16 nId, @@ -85,10 +85,10 @@ void SfxApplication::RegisterChildWindowContext_Impl( SfxModule *pMod, sal_uInt1 if ( !pF ) { // Search for Factory in the Application - DBG_ASSERT( pAppData_Impl, "No AppData!" ); - DBG_ASSERT( pAppData_Impl->pFactArr, "No Factories!" ); + DBG_ASSERT( pImpl, "No AppData!" ); + DBG_ASSERT( pImpl->pFactArr, "No Factories!" ); - pFactories = pAppData_Impl->pFactArr; + pFactories = pImpl->pFactArr; sal_uInt16 nCount = pFactories->size(); for (sal_uInt16 nFactory=0; nFactory<nCount; ++nFactory) { @@ -126,7 +126,7 @@ void SfxApplication::RegisterChildWindowContext_Impl( SfxModule *pMod, sal_uInt1 SfxChildWinFactArr_Impl& SfxApplication::GetChildWinFactories_Impl() const { - return ( *(pAppData_Impl->pFactArr)); + return ( *(pImpl->pFactArr)); } @@ -134,8 +134,8 @@ SfxWorkWindow* SfxApplication::GetWorkWindow_Impl(const SfxViewFrame *pFrame) co { if ( pFrame ) return pFrame->GetFrame().GetWorkWindow_Impl(); - else if ( pAppData_Impl->pViewFrame ) - return pAppData_Impl->pViewFrame->GetFrame().GetWorkWindow_Impl(); + else if ( pImpl->pViewFrame ) + return pImpl->pViewFrame->GetFrame().GetWorkWindow_Impl(); else return nullptr; } diff --git a/sfx2/source/appl/appdde.cxx b/sfx2/source/appl/appdde.cxx index 5d22e171a068..4e59af89f587 100644 --- a/sfx2/source/appl/appdde.cxx +++ b/sfx2/source/appl/appdde.cxx @@ -423,17 +423,17 @@ bool SfxApplication::InitializeDde() { int nError = 0; #if defined(_WIN32) - DBG_ASSERT( !pAppData_Impl->pDdeService, + DBG_ASSERT( !pImpl->pDdeService, "Dde can not be initialized multiple times" ); - pAppData_Impl->pDdeService = new ImplDdeService( Application::GetAppName() ); - nError = pAppData_Impl->pDdeService->GetError(); + pImpl->pDdeService = new ImplDdeService( Application::GetAppName() ); + nError = pImpl->pDdeService->GetError(); if( !nError ) { - pAppData_Impl->pDocTopics = new SfxDdeDocTopics_Impl; + pImpl->pDocTopics = new SfxDdeDocTopics_Impl; // we certainly want to support RTF! - pAppData_Impl->pDdeService->AddFormat( SotClipboardFormatId::RTF ); + pImpl->pDdeService->AddFormat( SotClipboardFormatId::RTF ); // Config path as a topic because of multiple starts INetURLObject aOfficeLockFile( SvtPathOptions().GetUserConfigPath() ); @@ -441,9 +441,9 @@ bool SfxApplication::InitializeDde() OUString aService( SfxDdeServiceName_Impl( aOfficeLockFile.GetMainURL(INetURLObject::DECODE_TO_IURI) ) ); aService = aService.toAsciiUpperCase(); - pAppData_Impl->pDdeService2 = new ImplDdeService( aService ); - pAppData_Impl->pTriggerTopic = new SfxDdeTriggerTopic_Impl; - pAppData_Impl->pDdeService2->AddTopic( *pAppData_Impl->pTriggerTopic ); + pImpl->pDdeService2 = new ImplDdeService( aService ); + pImpl->pTriggerTopic = new SfxDdeTriggerTopic_Impl; + pImpl->pDdeService2->AddTopic( *pImpl->pTriggerTopic ); } #endif return !nError; @@ -461,15 +461,15 @@ void SfxAppData_Impl::DeInitDDE() void SfxApplication::AddDdeTopic( SfxObjectShell* pSh ) { //OV: DDE is disconnected in server mode! - if( !pAppData_Impl->pDocTopics ) + if( !pImpl->pDocTopics ) return; // prevent double submit OUString sShellNm; sal_Bool bFnd = sal_False; - for (size_t n = pAppData_Impl->pDocTopics->size(); n;) + for (size_t n = pImpl->pDocTopics->size(); n;) { - if( (*pAppData_Impl->pDocTopics)[ --n ]->pSh == pSh ) + if( (*pImpl->pDocTopics)[ --n ]->pSh == pSh ) { // If the document is untitled, is still a new Topic is created! if( !bFnd ) @@ -477,15 +477,15 @@ void SfxApplication::AddDdeTopic( SfxObjectShell* pSh ) bFnd = sal_True; sShellNm = pSh->GetTitle(SFX_TITLE_FULLNAME).toAsciiLowerCase(); } - OUString sNm( (*pAppData_Impl->pDocTopics)[ n ]->GetName() ); + OUString sNm( (*pImpl->pDocTopics)[ n ]->GetName() ); if( sShellNm == sNm.toAsciiLowerCase() ) return ; } } SfxDdeDocTopic_Impl *const pTopic = new SfxDdeDocTopic_Impl(pSh); - pAppData_Impl->pDocTopics->push_back(pTopic); - pAppData_Impl->pDdeService->AddTopic( *pTopic ); + pImpl->pDocTopics->push_back(pTopic); + pImpl->pDdeService->AddTopic( *pTopic ); } #endif @@ -493,17 +493,17 @@ void SfxApplication::RemoveDdeTopic( SfxObjectShell* pSh ) { #if defined(_WIN32) //OV: DDE is disconnected in server mode! - if( !pAppData_Impl->pDocTopics ) + if( !pImpl->pDocTopics ) return; - for (size_t n = pAppData_Impl->pDocTopics->size(); n; ) + for (size_t n = pImpl->pDocTopics->size(); n; ) { - SfxDdeDocTopic_Impl *const pTopic = (*pAppData_Impl->pDocTopics)[ --n ]; + SfxDdeDocTopic_Impl *const pTopic = (*pImpl->pDocTopics)[ --n ]; if (pTopic->pSh == pSh) { - pAppData_Impl->pDdeService->RemoveTopic( *pTopic ); + pImpl->pDdeService->RemoveTopic( *pTopic ); delete pTopic; - pAppData_Impl->pDocTopics->erase( pAppData_Impl->pDocTopics->begin() + n ); + pImpl->pDocTopics->erase( pImpl->pDocTopics->begin() + n ); } } #else @@ -513,12 +513,12 @@ void SfxApplication::RemoveDdeTopic( SfxObjectShell* pSh ) const DdeService* SfxApplication::GetDdeService() const { - return pAppData_Impl->pDdeService; + return pImpl->pDdeService; } DdeService* SfxApplication::GetDdeService() { - return pAppData_Impl->pDdeService; + return pImpl->pDdeService; } #if defined(_WIN32) diff --git a/sfx2/source/appl/appinit.cxx b/sfx2/source/appl/appinit.cxx index bd00ae5ee589..da9983a9bd63 100644 --- a/sfx2/source/appl/appinit.cxx +++ b/sfx2/source/appl/appinit.cxx @@ -208,8 +208,8 @@ void SfxApplication::Initialize_Impl() Application::EnableAutoHelpId(); - pAppData_Impl->pAppDispatch = new SfxStatusDispatcher; - pAppData_Impl->pAppDispatch->acquire(); + pImpl->pAppDispatch = new SfxStatusDispatcher; + pImpl->pAppDispatch->acquire(); // SV-Look Help::EnableContextHelp(); @@ -222,19 +222,19 @@ void SfxApplication::Initialize_Impl() Application::SetDialogScaleX ( (short)(aLocalisation.GetDialogScale()) ); } - pAppData_Impl->m_pToolsErrorHdl = new SfxErrorHandler( + pImpl->m_pToolsErrorHdl = new SfxErrorHandler( RID_ERRHDL, ERRCODE_AREA_TOOLS, ERRCODE_AREA_LIB1); #if HAVE_FEATURE_SCRIPTING - pAppData_Impl->pBasicResMgr = ResMgr::CreateResMgr("sb"); + pImpl->pBasicResMgr = ResMgr::CreateResMgr("sb"); #endif - pAppData_Impl->pSvtResMgr = ResMgr::CreateResMgr("svt"); + pImpl->pSvtResMgr = ResMgr::CreateResMgr("svt"); - pAppData_Impl->m_pSoErrorHdl = new SfxErrorHandler( - RID_SO_ERROR_HANDLER, ERRCODE_AREA_SO, ERRCODE_AREA_SO_END, pAppData_Impl->pSvtResMgr ); + pImpl->m_pSoErrorHdl = new SfxErrorHandler( + RID_SO_ERROR_HANDLER, ERRCODE_AREA_SO, ERRCODE_AREA_SO_END, pImpl->pSvtResMgr ); #if HAVE_FEATURE_SCRIPTING - pAppData_Impl->m_pSbxErrorHdl = new SfxErrorHandler( - RID_BASIC_START, ERRCODE_AREA_SBX, ERRCODE_AREA_SBX_END, pAppData_Impl->pBasicResMgr ); + pImpl->m_pSbxErrorHdl = new SfxErrorHandler( + RID_BASIC_START, ERRCODE_AREA_SBX, ERRCODE_AREA_SBX_END, pImpl->pBasicResMgr ); #endif if (!utl::ConfigManager::IsAvoidConfig()) @@ -244,34 +244,34 @@ void SfxApplication::Initialize_Impl() SfxPickList::ensure(); } - DBG_ASSERT( !pAppData_Impl->pAppDispat, "AppDispatcher already exists" ); - pAppData_Impl->pAppDispat = new SfxDispatcher(static_cast<SfxDispatcher*>(nullptr)); - pAppData_Impl->pSlotPool = new SfxSlotPool; - pAppData_Impl->pTbxCtrlFac = new SfxTbxCtrlFactArr_Impl; - pAppData_Impl->pStbCtrlFac = new SfxStbCtrlFactArr_Impl; - pAppData_Impl->pViewFrames = new SfxViewFrameArr_Impl; - pAppData_Impl->pViewShells = new SfxViewShellArr_Impl; - pAppData_Impl->pObjShells = new SfxObjectShellArr_Impl; - pAppData_Impl->nInterfaces = SFX_INTERFACE_APP+8; - pAppData_Impl->pInterfaces = new SfxInterface*[pAppData_Impl->nInterfaces]; - memset( pAppData_Impl->pInterfaces, 0, sizeof(SfxInterface*) * pAppData_Impl->nInterfaces ); + DBG_ASSERT( !pImpl->pAppDispat, "AppDispatcher already exists" ); + pImpl->pAppDispat = new SfxDispatcher(static_cast<SfxDispatcher*>(nullptr)); + pImpl->pSlotPool = new SfxSlotPool; + pImpl->pTbxCtrlFac = new SfxTbxCtrlFactArr_Impl; + pImpl->pStbCtrlFac = new SfxStbCtrlFactArr_Impl; + pImpl->pViewFrames = new SfxViewFrameArr_Impl; + pImpl->pViewShells = new SfxViewShellArr_Impl; + pImpl->pObjShells = new SfxObjectShellArr_Impl; + pImpl->nInterfaces = SFX_INTERFACE_APP+8; + pImpl->pInterfaces = new SfxInterface*[pImpl->nInterfaces]; + memset( pImpl->pInterfaces, 0, sizeof(SfxInterface*) * pImpl->nInterfaces ); Registrations_Impl(); // Subklasse initialisieren - pAppData_Impl->bDowning = false; + pImpl->bDowning = false; // get CHAOS item pool... - pAppData_Impl->pPool = NoChaos::GetItemPool(); - SetPool( pAppData_Impl->pPool ); + pImpl->pPool = NoChaos::GetItemPool(); + SetPool( pImpl->pPool ); - if ( pAppData_Impl->bDowning ) + if ( pImpl->bDowning ) return; // App-Dispatcher aufbauen - pAppData_Impl->pAppDispat->Push(*this); - pAppData_Impl->pAppDispat->Flush(); - pAppData_Impl->pAppDispat->DoActivate_Impl( true, nullptr ); + pImpl->pAppDispat->Push(*this); + pImpl->pAppDispat->Flush(); + pImpl->pAppDispat->DoActivate_Impl( true, nullptr ); { SolarMutexGuard aGuard; diff --git a/sfx2/source/appl/appmain.cxx b/sfx2/source/appl/appmain.cxx index dae40ad112bc..665ac27dd285 100644 --- a/sfx2/source/appl/appmain.cxx +++ b/sfx2/source/appl/appmain.cxx @@ -43,13 +43,13 @@ SfxFilterMatcher& SfxApplication::GetFilterMatcher() { - if( !pAppData_Impl->pMatcher ) + if( !pImpl->pMatcher ) { - pAppData_Impl->pMatcher = new SfxFilterMatcher(); + pImpl->pMatcher = new SfxFilterMatcher(); URIHelper::SetMaybeFileHdl( LINK( - pAppData_Impl->pMatcher, SfxFilterMatcher, MaybeFileHdl_Impl ) ); + pImpl->pMatcher, SfxFilterMatcher, MaybeFileHdl_Impl ) ); } - return *pAppData_Impl->pMatcher; + return *pImpl->pMatcher; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sfx2/source/appl/appmisc.cxx b/sfx2/source/appl/appmisc.cxx index 3e3b419f9a85..bf6a9a151b62 100644 --- a/sfx2/source/appl/appmisc.cxx +++ b/sfx2/source/appl/appmisc.cxx @@ -116,7 +116,7 @@ void SfxApplication::InitInterface_Impl() */ SfxProgress* SfxApplication::GetProgress() const { - return pAppData_Impl->pProgress; + return pImpl->pProgress; } SfxModule* SfxApplication::GetModule_Impl() @@ -133,9 +133,9 @@ SfxModule* SfxApplication::GetModule_Impl() } } -bool SfxApplication::IsDowning() const { return pAppData_Impl->bDowning; } -SfxDispatcher* SfxApplication::GetAppDispatcher_Impl() { return pAppData_Impl->pAppDispat; } -SfxSlotPool& SfxApplication::GetAppSlotPool_Impl() const { return *pAppData_Impl->pSlotPool; } +bool SfxApplication::IsDowning() const { return pImpl->bDowning; } +SfxDispatcher* SfxApplication::GetAppDispatcher_Impl() { return pImpl->pAppDispat; } +SfxSlotPool& SfxApplication::GetAppSlotPool_Impl() const { return *pImpl->pSlotPool; } bool SfxApplication::loadBrandSvg(const char *pName, BitmapEx &rBitmap, int nWidth) { diff --git a/sfx2/source/appl/appquit.cxx b/sfx2/source/appl/appquit.cxx index 209d1b089f89..67264060a298 100644 --- a/sfx2/source/appl/appquit.cxx +++ b/sfx2/source/appl/appquit.cxx @@ -62,7 +62,7 @@ using ::basic::BasicManagerRepository; void SfxApplication::Deinitialize() { - if ( pAppData_Impl->bDowning ) + if ( pImpl->bDowning ) return; #if HAVE_FEATURE_SCRIPTING @@ -71,70 +71,70 @@ void SfxApplication::Deinitialize() SaveBasicAndDialogContainer(); #endif - pAppData_Impl->bDowning = true; // due to Timer from DecAliveCount and QueryExit + pImpl->bDowning = true; // due to Timer from DecAliveCount and QueryExit - DELETEZ( pAppData_Impl->pTemplates ); + DELETEZ( pImpl->pTemplates ); // By definition there shouldn't be any open view frames when we reach // this method. Therefore this call makes no sense and is the source of // some stack traces, which we don't understand. // For more information see: - pAppData_Impl->bDowning = false; + pImpl->bDowning = false; DBG_ASSERT( !SfxViewFrame::GetFirst(), "existing SfxViewFrame after Execute" ); DBG_ASSERT( !SfxObjectShell::GetFirst(), "existing SfxObjectShell after Execute" ); - pAppData_Impl->pAppDispat->Pop( *this, SfxDispatcherPopFlags::POP_UNTIL ); - pAppData_Impl->pAppDispat->Flush(); - pAppData_Impl->bDowning = true; - pAppData_Impl->pAppDispat->DoDeactivate_Impl( true, nullptr ); + pImpl->pAppDispat->Pop( *this, SfxDispatcherPopFlags::POP_UNTIL ); + pImpl->pAppDispat->Flush(); + pImpl->bDowning = true; + pImpl->pAppDispat->DoDeactivate_Impl( true, nullptr ); // Release Controller and others // then the remaining components should also disappear ( Beamer! ) #if HAVE_FEATURE_SCRIPTING BasicManagerRepository::resetApplicationBasicManager(); - pAppData_Impl->pBasicManager->reset( nullptr ); + pImpl->pBasicManager->reset( nullptr ); // this will also delete pBasMgr #endif - DBG_ASSERT( pAppData_Impl->pViewFrame == nullptr, "active foreign ViewFrame" ); + DBG_ASSERT( pImpl->pViewFrame == nullptr, "active foreign ViewFrame" ); - delete[] pAppData_Impl->pInterfaces; - pAppData_Impl->pInterfaces = nullptr; + delete[] pImpl->pInterfaces; + pImpl->pInterfaces = nullptr; // free administration managers - DELETEZ(pAppData_Impl->pAppDispat); + DELETEZ(pImpl->pAppDispat); SfxResId::DeleteResMgr(); SvtResId::DeleteResMgr(); // from here no SvObjects have to exists - DELETEZ(pAppData_Impl->pMatcher); + DELETEZ(pImpl->pMatcher); - DELETEX(SfxSlotPool, pAppData_Impl->pSlotPool); - DELETEX(SfxChildWinFactArr_Impl, pAppData_Impl->pFactArr); + DELETEX(SfxSlotPool, pImpl->pSlotPool); + DELETEX(SfxChildWinFactArr_Impl, pImpl->pFactArr); - DELETEX(SfxTbxCtrlFactArr_Impl, pAppData_Impl->pTbxCtrlFac); - DELETEX(SfxStbCtrlFactArr_Impl, pAppData_Impl->pStbCtrlFac); - DELETEX(SfxViewFrameArr_Impl, pAppData_Impl->pViewFrames); - DELETEX(SfxViewShellArr_Impl, pAppData_Impl->pViewShells); - DELETEX(SfxObjectShellArr_Impl, pAppData_Impl->pObjShells); + DELETEX(SfxTbxCtrlFactArr_Impl, pImpl->pTbxCtrlFac); + DELETEX(SfxStbCtrlFactArr_Impl, pImpl->pStbCtrlFac); + DELETEX(SfxViewFrameArr_Impl, pImpl->pViewFrames); + DELETEX(SfxViewShellArr_Impl, pImpl->pViewShells); + DELETEX(SfxObjectShellArr_Impl, pImpl->pObjShells); //TODO/CLEANUP //ReleaseArgs could be used instead! - pAppData_Impl->pPool = nullptr; + pImpl->pPool = nullptr; NoChaos::ReleaseItemPool(); #if HAVE_FEATURE_SCRIPTING - DELETEZ(pAppData_Impl->pBasicResMgr); + DELETEZ(pImpl->pBasicResMgr); #endif - DELETEZ(pAppData_Impl->pSvtResMgr); + DELETEZ(pImpl->pSvtResMgr); #if HAVE_FEATURE_SCRIPTING - delete pAppData_Impl->m_pSbxErrorHdl; + delete pImpl->m_pSbxErrorHdl; #endif - delete pAppData_Impl->m_pSoErrorHdl; - delete pAppData_Impl->m_pToolsErrorHdl; + delete pImpl->m_pSoErrorHdl; + delete pImpl->m_pToolsErrorHdl; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sfx2/source/appl/appreg.cxx b/sfx2/source/appl/appreg.cxx index 293b66c86e2d..acdbdf69c069 100644 --- a/sfx2/source/appl/appreg.cxx +++ b/sfx2/source/appl/appreg.cxx @@ -70,9 +70,9 @@ void SfxApplication::RegisterToolBoxControl_Impl( SfxModule *pMod, const SfxTbxC } #ifdef DBG_UTIL - for ( size_t n=0; n<pAppData_Impl->pTbxCtrlFac->size(); n++ ) + for ( size_t n=0; n<pImpl->pTbxCtrlFac->size(); n++ ) { - SfxTbxCtrlFactory *pF = &(*pAppData_Impl->pTbxCtrlFac)[n]; + SfxTbxCtrlFactory *pF = &(*pImpl->pTbxCtrlFac)[n]; if ( pF->nTypeId == rFact.nTypeId && (pF->nSlotId == rFact.nSlotId || pF->nSlotId == 0) ) { @@ -81,7 +81,7 @@ void SfxApplication::RegisterToolBoxControl_Impl( SfxModule *pMod, const SfxTbxC } #endif - pAppData_Impl->pTbxCtrlFac->push_back( rFact ); + pImpl->pTbxCtrlFac->push_back( rFact ); } @@ -94,9 +94,9 @@ void SfxApplication::RegisterStatusBarControl_Impl( SfxModule *pMod, const SfxSt } #ifdef DBG_UTIL - for ( size_t n=0; n<pAppData_Impl->pStbCtrlFac->size(); n++ ) + for ( size_t n=0; n<pImpl->pStbCtrlFac->size(); n++ ) { - SfxStbCtrlFactory *pF = &(*pAppData_Impl->pStbCtrlFac)[n]; + SfxStbCtrlFactory *pF = &(*pImpl->pStbCtrlFac)[n]; if ( pF->nTypeId == rFact.nTypeId && (pF->nSlotId == rFact.nSlotId || pF->nSlotId == 0) ) { @@ -105,7 +105,7 @@ void SfxApplication::RegisterStatusBarControl_Impl( SfxModule *pMod, const SfxSt } #endif - pAppData_Impl->pStbCtrlFac->push_back( rFact ); + pImpl->pStbCtrlFac->push_back( rFact ); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx index 88d74d5459c6..a947fd20b0e0 100644 --- a/sfx2/source/appl/appserv.cxx +++ b/sfx2/source/appl/appserv.cxx @@ -276,7 +276,7 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq ) case SID_LOGOUT: { // protect against reentrant calls - if ( pAppData_Impl->bInQuit ) + if ( pImpl->bInQuit ) return; if ( rReq.GetSlot() == SID_LOGOUT ) @@ -299,7 +299,7 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq ) SfxStringItem aNameItem( SID_FILE_NAME, OUString("vnd.sun.star.cmd:logout") ); SfxStringItem aReferer( SID_REFERER, "private/user" ); - pAppData_Impl->pAppDispat->ExecuteList(SID_OPENDOC, + pImpl->pAppDispat->ExecuteList(SID_OPENDOC, SfxCallMode::SLOT, { &aNameItem, &aReferer }); return; } @@ -318,16 +318,16 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq ) } // block reentrant calls - pAppData_Impl->bInQuit = true; + pImpl->bInQuit = true; Reference < XDesktop2 > xDesktop = Desktop::create ( ::comphelper::getProcessComponentContext() ); rReq.ForgetAllArgs(); - // if terminate() failed, pAppData_Impl->bInQuit will now be sal_False, allowing further calls of SID_QUITAPP + // if terminate() failed, pImpl->bInQuit will now be sal_False, allowing further calls of SID_QUITAPP bool bTerminated = xDesktop->terminate(); if (!bTerminated) // if terminate() was successful, SfxApplication is now dead! - pAppData_Impl->bInQuit = false; + pImpl->bInQuit = false; // Set return value, terminate if possible rReq.SetReturnValue( SfxBoolItem( rReq.GetSlot(), bTerminated ) ); @@ -570,9 +570,9 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq ) { const SfxBoolItem * pItem = rReq.GetArg<SfxBoolItem>(SID_SHOW_IME_STATUS_WINDOW); bool bShow = pItem == nullptr - ? !pAppData_Impl->m_xImeStatusWindow->isShowing() + ? !pImpl->m_xImeStatusWindow->isShowing() : pItem->GetValue(); - pAppData_Impl->m_xImeStatusWindow->show(bShow); + pImpl->m_xImeStatusWindow->show(bShow); if (pItem == nullptr) rReq.AppendItem(SfxBoolItem(SID_SHOW_IME_STATUS_WINDOW, bShow)); @@ -705,7 +705,7 @@ void SfxApplication::MiscState_Impl(SfxItemSet &rSet) break; case SID_QUITAPP: { - if ( pAppData_Impl->nDocModalMode ) + if ( pImpl->nDocModalMode ) rSet.DisableItem(nWhich); else rSet.Put(SfxStringItem(nWhich, SfxResId(STR_QUITAPP).toString())); @@ -779,7 +779,7 @@ void SfxApplication::MiscState_Impl(SfxItemSet &rSet) if (sfx2::appl::ImeStatusWindow::canToggle()) rSet.Put(SfxBoolItem( SID_SHOW_IME_STATUS_WINDOW, - pAppData_Impl->m_xImeStatusWindow-> + pImpl->m_xImeStatusWindow-> isShowing())); else rSet.DisableItem(SID_SHOW_IME_STATUS_WINDOW); |