diff options
Diffstat (limited to 'extensions/source/bibliography/framectr.cxx')
-rw-r--r-- | extensions/source/bibliography/framectr.cxx | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/extensions/source/bibliography/framectr.cxx b/extensions/source/bibliography/framectr.cxx index 1c5f85c03f35..758c8b3484c2 100644 --- a/extensions/source/bibliography/framectr.cxx +++ b/extensions/source/bibliography/framectr.cxx @@ -18,16 +18,19 @@ */ #include <comphelper/types.hxx> +#include <comphelper/propertyvalue.hxx> #include <comphelper/sequence.hxx> #include "framectr.hxx" #include "datman.hxx" #include <toolkit/helper/vclunohelper.hxx> #include "bibconfig.hxx" #include <cppuhelper/implbase.hxx> +#include <utility> #include <vcl/event.hxx> #include <vcl/svapp.hxx> #include <comphelper/processfactory.hxx> #include <com/sun/star/awt/XTextComponent.hpp> +#include <com/sun/star/awt/XVclWindowPeer.hpp> #include <com/sun/star/form/XConfirmDeleteListener.hpp> #include <com/sun/star/form/runtime/XFormController.hpp> #include <com/sun/star/beans/PropertyValue.hpp> @@ -42,7 +45,7 @@ #include <cppuhelper/supportsservice.hxx> #include <sot/exchange.hxx> #include <sot/formats.hxx> -#include <tools/diagnose_ex.h> +#include <comphelper/diagnose_ex.hxx> #include <vcl/weld.hxx> #include <osl/mutex.hxx> @@ -145,9 +148,9 @@ void BibFrameCtrl_Impl::disposing( const lang::EventObject& /*Source*/ ) pController->getFrame()->removeFrameActionListener( this ); } -BibFrameController_Impl::BibFrameController_Impl( const uno::Reference< awt::XWindow > & xComponent, +BibFrameController_Impl::BibFrameController_Impl( uno::Reference< awt::XWindow > xComponent, BibDataManager* pDataManager) - :m_xWindow( xComponent ) + :m_xWindow(std::move( xComponent )) ,m_xDatMan( pDataManager ) { m_bDisposing = false; @@ -225,12 +228,15 @@ void BibFrameController_Impl::dispose() if (xFrame.is()) xFrame->removeFrameActionListener( m_xImpl ); + m_xFrame.clear(); aObject.Source = static_cast<XController*>(this); m_xImpl->aLC.disposeAndClear(aObject); m_xDatMan.clear(); m_aStatusListeners.clear(); m_xLastQueriedFocusWin.clear(); + m_xWindow.clear(); + m_xImpl.clear(); } void BibFrameController_Impl::addEventListener( const uno::Reference< lang::XEventListener > & aListener ) @@ -393,10 +399,11 @@ void BibFrameController_Impl::dispatch(const util::URL& _rURL, const uno::Sequen { try { - uno::Sequence< beans::PropertyValue > aNewDataSource(2); - beans::PropertyValue* pProps = aNewDataSource.getArray(); - pProps[0].Value <<= OUString(); - pProps[1].Value <<= aURL; + uno::Sequence< beans::PropertyValue > aNewDataSource + { + comphelper::makePropertyValue( {}, OUString() ), + comphelper::makePropertyValue( {}, aURL ) + }; ChangeDataSource(aNewDataSource); } catch(const Exception&) @@ -478,7 +485,7 @@ void BibFrameController_Impl::dispatch(const util::URL& _rURL, const uno::Sequen { RemoveFilter(); } - else if( _rURL.Complete == "slot:5503" || aCommand == "CloseDoc" ) + else if( _rURL.Complete == ".uno:CloseDoc" || aCommand == "CloseDoc" ) { Application::PostUserEvent( LINK( this, BibFrameController_Impl, DisposeHdl ) ); |