diff options
author | Henry Castro <hcastro@collabora.com> | 2021-03-31 09:44:24 -0400 |
---|---|---|
committer | Henry Castro <hcastro@collabora.com> | 2021-03-31 21:12:19 +0200 |
commit | edc7b4bad6361f00aff69b65a722fb230c6e120c (patch) | |
tree | cb28a361f9fe93adfe89c0eda6aff23965cf6349 /extensions | |
parent | 4de064ca4b001993f5b7742b7cb40944d70e1ba1 (diff) |
lok: "BibFrameController_Impl" prefix m_* members
Change-Id: I2bead3015d306c678d81980ef14e7689ab4acc54
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113419
Tested-by: Jenkins
Reviewed-by: Henry Castro <hcastro@collabora.com>
Diffstat (limited to 'extensions')
-rw-r--r-- | extensions/source/bibliography/framectr.cxx | 73 | ||||
-rw-r--r-- | extensions/source/bibliography/framectr.hxx | 12 |
2 files changed, 43 insertions, 42 deletions
diff --git a/extensions/source/bibliography/framectr.cxx b/extensions/source/bibliography/framectr.cxx index 2bb4246fe4c5..7b0a5dd9eaba 100644 --- a/extensions/source/bibliography/framectr.cxx +++ b/extensions/source/bibliography/framectr.cxx @@ -147,17 +147,17 @@ void BibFrameCtrl_Impl::disposing( const lang::EventObject& /*Source*/ ) BibFrameController_Impl::BibFrameController_Impl( const uno::Reference< awt::XWindow > & xComponent, BibDataManager* pDataManager) - :xWindow( xComponent ) + :m_xWindow( xComponent ) ,m_xDatMan( pDataManager ) { - bDisposing=false; - mxImpl = new BibFrameCtrl_Impl; - mxImpl->pController = this; + m_bDisposing = false; + m_xImpl = new BibFrameCtrl_Impl; + m_xImpl->pController = this; } BibFrameController_Impl::~BibFrameController_Impl() { - mxImpl->pController = nullptr; + m_xImpl->pController = nullptr; m_xDatMan.clear(); } @@ -180,8 +180,8 @@ css::uno::Sequence< OUString > SAL_CALL BibFrameController_Impl::getSupportedSer void BibFrameController_Impl::attachFrame( const uno::Reference< XFrame > & xArg ) { - xFrame = xArg; - xFrame->addFrameActionListener( mxImpl ); + m_xFrame = xArg; + m_xFrame->addFrameActionListener( m_xImpl ); } sal_Bool BibFrameController_Impl::attachModel( const uno::Reference< XModel > & /*xModel*/ ) @@ -192,9 +192,9 @@ sal_Bool BibFrameController_Impl::attachModel( const uno::Reference< XModel > & sal_Bool BibFrameController_Impl::suspend( sal_Bool bSuspend ) { if ( bSuspend ) - getFrame()->removeFrameActionListener( mxImpl ); + getFrame()->removeFrameActionListener( m_xImpl ); else - getFrame()->addFrameActionListener( mxImpl ); + getFrame()->addFrameActionListener( m_xImpl ); return true; } @@ -209,7 +209,7 @@ void BibFrameController_Impl::restoreViewData( const uno::Any& /*Value*/ ) uno::Reference< XFrame > BibFrameController_Impl::getFrame() { - return xFrame; + return m_xFrame; } uno::Reference< XModel > BibFrameController_Impl::getModel() @@ -219,28 +219,28 @@ uno::Reference< XModel > BibFrameController_Impl::getModel() void BibFrameController_Impl::dispose() { - bDisposing = true; + m_bDisposing = true; lang::EventObject aObject; aObject.Source = static_cast<XController*>(this); - mxImpl->aLC.disposeAndClear(aObject); + m_xImpl->aLC.disposeAndClear(aObject); m_xDatMan.clear(); - aStatusListeners.clear(); + m_aStatusListeners.clear(); m_xLastQueriedFocusWin.clear(); } void BibFrameController_Impl::addEventListener( const uno::Reference< lang::XEventListener > & aListener ) { - mxImpl->aLC.addInterface( cppu::UnoType<lang::XEventListener>::get(), aListener ); + m_xImpl->aLC.addInterface( cppu::UnoType<lang::XEventListener>::get(), aListener ); } void BibFrameController_Impl::removeEventListener( const uno::Reference< lang::XEventListener > & aListener ) { - mxImpl->aLC.removeInterface( cppu::UnoType<lang::XEventListener>::get(), aListener ); + m_xImpl->aLC.removeInterface( cppu::UnoType<lang::XEventListener>::get(), aListener ); } uno::Reference< frame::XDispatch > BibFrameController_Impl::queryDispatch( const util::URL& aURL, const OUString& /*aTarget*/, sal_Int32 /*nSearchFlags*/ ) { - if ( !bDisposing ) + if ( !m_bDisposing ) { const CmdToInfoCache& rCmdCache = GetCommandToInfoCache(); CmdToInfoCache::const_iterator pIter = rCmdCache.find( aURL.Complete ); @@ -366,11 +366,11 @@ static vcl::Window* lcl_GetFocusChild( vcl::Window const * pParent ) //class XDispatch void BibFrameController_Impl::dispatch(const util::URL& _rURL, const uno::Sequence< beans::PropertyValue >& aArgs) { - if ( bDisposing ) + if ( m_bDisposing ) return; ::SolarMutexGuard aGuard; - weld::Window* pParent = Application::GetFrameWeld(xWindow); + weld::Window* pParent = Application::GetFrameWeld(m_xWindow); weld::WaitObject aWaitObject(pParent); OUString aCommand( _rURL.Path); @@ -404,10 +404,10 @@ void BibFrameController_Impl::dispatch(const util::URL& _rURL, const uno::Sequen } else if(aCommand == "Bib/autoFilter") { - sal_uInt16 nCount = aStatusListeners.size(); + sal_uInt16 nCount = m_aStatusListeners.size(); for ( sal_uInt16 n=0; n<nCount; n++ ) { - BibStatusDispatch *pObj = aStatusListeners[n].get(); + BibStatusDispatch *pObj = m_aStatusListeners[n].get(); if ( pObj->aURL.Path == "Bib/removeFilter" ) { FeatureStateEvent aEvent; @@ -440,7 +440,7 @@ void BibFrameController_Impl::dispatch(const util::URL& _rURL, const uno::Sequen // create the dialog object uno::Reference< ui::dialogs::XExecutableDialog > xDialog = sdb::FilterDialog::createWithQuery(xContext, m_xDatMan->getParser(), - Reference<sdbc::XRowSet>(m_xDatMan->getForm(), uno::UNO_QUERY_THROW), xWindow); + Reference<sdbc::XRowSet>(m_xDatMan->getForm(), uno::UNO_QUERY_THROW), m_xWindow); // execute it if ( xDialog->execute( ) ) { @@ -455,10 +455,10 @@ void BibFrameController_Impl::dispatch(const util::URL& _rURL, const uno::Sequen TOOLS_WARN_EXCEPTION( "extensions.biblio", "BibFrameController_Impl::dispatch" ); } - sal_uInt16 nCount = aStatusListeners.size(); + sal_uInt16 nCount = m_aStatusListeners.size(); for ( sal_uInt16 n=0; n<nCount; n++ ) { - BibStatusDispatch *pObj = aStatusListeners[n].get(); + BibStatusDispatch *pObj = m_aStatusListeners[n].get(); if ( pObj->aURL.Path == "Bib/removeFilter" && m_xDatMan->getParser().is()) { FeatureStateEvent aEvent; @@ -592,7 +592,8 @@ void BibFrameController_Impl::dispatch(const util::URL& _rURL, const uno::Sequen } IMPL_LINK_NOARG( BibFrameController_Impl, DisposeHdl, void*, void ) { - xFrame->dispose(); + if (m_xFrame.is()) + m_xFrame->dispose(); }; void BibFrameController_Impl::addStatusListener( @@ -601,7 +602,7 @@ void BibFrameController_Impl::addStatusListener( { BibConfig* pConfig = BibModul::GetConfig(); // create a new Reference and insert into listener array - aStatusListeners.push_back( std::make_unique<BibStatusDispatch>( aURL, aListener ) ); + m_aStatusListeners.push_back( std::make_unique<BibStatusDispatch>( aURL, aListener ) ); // send first status synchronously FeatureStateEvent aEvent; @@ -652,7 +653,7 @@ void BibFrameController_Impl::addStatusListener( } else if(aURL.Path == "Cut") { - m_xLastQueriedFocusWin = lcl_GetFocusChild( VCLUnoHelper::GetWindow( xWindow ) ); + m_xLastQueriedFocusWin = lcl_GetFocusChild( VCLUnoHelper::GetWindow( m_xWindow ) ); if (m_xLastQueriedFocusWin) { Reference<css::awt::XTextComponent> xEdit(m_xLastQueriedFocusWin->GetComponentInterface(), css::uno::UNO_QUERY); @@ -661,7 +662,7 @@ void BibFrameController_Impl::addStatusListener( } if(aURL.Path == "Copy") { - m_xLastQueriedFocusWin = lcl_GetFocusChild( VCLUnoHelper::GetWindow( xWindow ) ); + m_xLastQueriedFocusWin = lcl_GetFocusChild( VCLUnoHelper::GetWindow( m_xWindow ) ); if (m_xLastQueriedFocusWin) { Reference<css::awt::XTextComponent> xEdit(m_xLastQueriedFocusWin->GetComponentInterface(), css::uno::UNO_QUERY); @@ -671,7 +672,7 @@ void BibFrameController_Impl::addStatusListener( else if(aURL.Path == "Paste" ) { aEvent.IsEnabled = false; - m_xLastQueriedFocusWin = lcl_GetFocusChild( VCLUnoHelper::GetWindow( xWindow ) ); + m_xLastQueriedFocusWin = lcl_GetFocusChild( VCLUnoHelper::GetWindow( m_xWindow ) ); if (m_xLastQueriedFocusWin) { Reference<css::awt::XTextComponent> xEdit(m_xLastQueriedFocusWin->GetComponentInterface(), css::uno::UNO_QUERY); @@ -734,18 +735,18 @@ void BibFrameController_Impl::removeStatusListener( { // search listener array for given listener // for checking equality always "cast" to XInterface - if ( bDisposing ) + if ( m_bDisposing ) return; - sal_uInt16 nCount = aStatusListeners.size(); + sal_uInt16 nCount = m_aStatusListeners.size(); for ( sal_uInt16 n=0; n<nCount; n++ ) { - BibStatusDispatch *pObj = aStatusListeners[n].get(); + BibStatusDispatch *pObj = m_aStatusListeners[n].get(); bool bFlag=pObj->xListener.is(); if (!bFlag || (pObj->xListener == aObject && ( aURL.Complete.isEmpty() || pObj->aURL.Path == aURL.Path ))) { - aStatusListeners.erase( aStatusListeners.begin() + n ); + m_aStatusListeners.erase( m_aStatusListeners.begin() + n ); break; } } @@ -756,14 +757,14 @@ void BibFrameController_Impl::RemoveFilter() OUString aQuery; m_xDatMan->startQueryWith(aQuery); - sal_uInt16 nCount = aStatusListeners.size(); + sal_uInt16 nCount = m_aStatusListeners.size(); bool bRemoveFilter=false; bool bQueryText=false; for ( sal_uInt16 n=0; n<nCount; n++ ) { - BibStatusDispatch *pObj = aStatusListeners[n].get(); + BibStatusDispatch *pObj = m_aStatusListeners[n].get(); if ( pObj->aURL.Path == "Bib/removeFilter" ) { FeatureStateEvent aEvent; @@ -818,13 +819,13 @@ void BibFrameController_Impl::ChangeDataSource(const uno::Sequence< beans::Prope } - sal_uInt16 nCount = aStatusListeners.size(); + sal_uInt16 nCount = m_aStatusListeners.size(); bool bMenuFilter=false; bool bQueryText=false; for ( sal_uInt16 n=0; n<nCount; n++ ) { - BibStatusDispatch *pObj = aStatusListeners[n].get(); + BibStatusDispatch *pObj = m_aStatusListeners[n].get(); if (pObj->aURL.Path == "Bib/MenuFilter") { FeatureStateEvent aEvent; diff --git a/extensions/source/bibliography/framectr.hxx b/extensions/source/bibliography/framectr.hxx index b91f20896ec1..be91982ccfe4 100644 --- a/extensions/source/bibliography/framectr.hxx +++ b/extensions/source/bibliography/framectr.hxx @@ -61,13 +61,13 @@ class BibFrameController_Impl : public cppu::WeakImplHelper < > { friend class BibFrameCtrl_Impl; - rtl::Reference<BibFrameCtrl_Impl> mxImpl; - BibStatusDispatchArr aStatusListeners; - css::uno::Reference< css::awt::XWindow > xWindow; - css::uno::Reference< css::frame::XFrame > xFrame; - bool bDisposing; + rtl::Reference<BibFrameCtrl_Impl> m_xImpl; + BibStatusDispatchArr m_aStatusListeners; + css::uno::Reference< css::awt::XWindow > m_xWindow; + css::uno::Reference< css::frame::XFrame > m_xFrame; + bool m_bDisposing; rtl::Reference<BibDataManager> m_xDatMan; - VclPtr<vcl::Window> m_xLastQueriedFocusWin; + VclPtr<vcl::Window> m_xLastQueriedFocusWin; DECL_LINK( DisposeHdl, void*, void ); |