From b23fd68eeeddd6973f5ea79da4cf7638094ad8d4 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Fri, 4 Jan 2013 13:38:11 +0200 Subject: fdo#468080, remove unnecessary XMultiServiceFactory from framework The ActionTrigger classes in framework were not using their XMultiServiceFactory parameters, so remove them. And follow that through by cleaning up places that no longer need to store XMultiServiceFactory references. Change-Id: I433c4fdb02a56eeef75728893e0c9b749d8313be --- dbaccess/source/ui/app/AppDetailPageHelper.cxx | 2 -- dbaccess/source/ui/browser/dbtreeview.cxx | 4 ++-- dbaccess/source/ui/browser/dbtreeview.hxx | 3 --- dbaccess/source/ui/browser/unodatbr.cxx | 2 +- dbaccess/source/ui/control/dbtreelistbox.cxx | 8 +++----- dbaccess/source/ui/control/marktree.cxx | 8 ++++---- dbaccess/source/ui/control/tabletree.cxx | 8 ++++---- dbaccess/source/ui/dlg/adtabdlg.cxx | 2 +- dbaccess/source/ui/dlg/tablespage.cxx | 3 +-- dbaccess/source/ui/inc/dbtreelistbox.hxx | 8 -------- dbaccess/source/ui/inc/marktree.hxx | 8 ++------ dbaccess/source/ui/inc/tabletree.hxx | 2 -- dbaccess/source/ui/misc/WNameMatch.cxx | 2 +- framework/inc/classes/actiontriggercontainer.hxx | 2 +- framework/inc/classes/actiontriggerpropertyset.hxx | 3 +-- framework/inc/classes/actiontriggerseparatorpropertyset.hxx | 3 +-- framework/inc/classes/rootactiontriggercontainer.hxx | 2 +- framework/inc/framework/actiontriggerhelper.hxx | 2 -- framework/inc/helper/propertysetcontainer.hxx | 6 +----- framework/source/fwe/classes/actiontriggercontainer.cxx | 10 +++++----- framework/source/fwe/classes/actiontriggerpropertyset.cxx | 2 +- .../source/fwe/classes/actiontriggerseparatorpropertyset.cxx | 2 +- framework/source/fwe/classes/rootactiontriggercontainer.cxx | 10 +++++----- framework/source/fwe/helper/actiontriggerhelper.cxx | 3 +-- framework/source/fwe/helper/propertysetcontainer.cxx | 2 +- sfx2/source/view/viewsh.cxx | 2 +- 26 files changed, 39 insertions(+), 70 deletions(-) diff --git a/dbaccess/source/ui/app/AppDetailPageHelper.cxx b/dbaccess/source/ui/app/AppDetailPageHelper.cxx index a053679f1436..3efb185b9832 100644 --- a/dbaccess/source/ui/app/AppDetailPageHelper.cxx +++ b/dbaccess/source/ui/app/AppDetailPageHelper.cxx @@ -604,7 +604,6 @@ void OAppDetailPageHelper::createTablesPage(const Reference< XConnection>& _xCon if ( !m_pLists[E_TABLE] ) { OTableTreeListBox* pTreeView = new OTableTreeListBox(this - ,uno::Reference(getBorderWin().getView()->getORB()->getServiceManager(), uno::UNO_QUERY_THROW) ,WB_HASLINES | WB_SORT | WB_HASBUTTONS | WB_HSCROLL |WB_HASBUTTONSATROOT | WB_TABSTOP ,sal_False); pTreeView->SetHelpId(HID_APP_TABLE_TREE); @@ -777,7 +776,6 @@ void OAppDetailPageHelper::fillNames( const Reference< XNameAccess >& _xContaine DBTreeListBox* OAppDetailPageHelper::createSimpleTree( const rtl::OString& _sHelpId, const Image& _rImage) { DBTreeListBox* pTreeView = new DBTreeListBox(this, - uno::Reference(getBorderWin().getView()->getORB()->getServiceManager(), uno::UNO_QUERY_THROW), WB_HASLINES | WB_SORT | WB_HASBUTTONS | WB_HSCROLL |WB_HASBUTTONSATROOT | WB_TABSTOP); pTreeView->SetHelpId( _sHelpId ); return createTree( pTreeView, _rImage ); diff --git a/dbaccess/source/ui/browser/dbtreeview.cxx b/dbaccess/source/ui/browser/dbtreeview.cxx index 91ee108c47c7..895fd3db50c9 100644 --- a/dbaccess/source/ui/browser/dbtreeview.cxx +++ b/dbaccess/source/ui/browser/dbtreeview.cxx @@ -36,13 +36,13 @@ DBG_NAME(DBTreeView) //======================================================================== // class DBTreeView //======================================================================== -DBTreeView::DBTreeView( Window* pParent, const Reference< XMultiServiceFactory >& _rxORB, WinBits nBits) +DBTreeView::DBTreeView( Window* pParent, WinBits nBits) : Window( pParent, nBits ) , m_pTreeListBox(NULL) { DBG_CTOR(DBTreeView,NULL); - m_pTreeListBox = new DBTreeListBox(this, _rxORB ,WB_BORDER | WB_HASLINES | WB_HASLINESATROOT | WB_HASBUTTONS | WB_HSCROLL |WB_HASBUTTONSATROOT); + m_pTreeListBox = new DBTreeListBox(this, WB_BORDER | WB_HASLINES | WB_HASLINESATROOT | WB_HASBUTTONS | WB_HSCROLL |WB_HASBUTTONSATROOT); m_pTreeListBox->EnableCheckButton(NULL); m_pTreeListBox->SetDragDropMode( 0 ); m_pTreeListBox->EnableInplaceEditing( sal_True ); diff --git a/dbaccess/source/ui/browser/dbtreeview.hxx b/dbaccess/source/ui/browser/dbtreeview.hxx index c54cf39ae8da..3232f6f16013 100644 --- a/dbaccess/source/ui/browser/dbtreeview.hxx +++ b/dbaccess/source/ui/browser/dbtreeview.hxx @@ -22,8 +22,6 @@ #include -#include - class SvTreeList; namespace dbaui { @@ -42,7 +40,6 @@ namespace dbaui public: DBTreeView( Window* pParent, - const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB, WinBits nBits ); ~DBTreeView(); diff --git a/dbaccess/source/ui/browser/unodatbr.cxx b/dbaccess/source/ui/browser/unodatbr.cxx index af44aa1f3260..fcb6f3ed6204 100644 --- a/dbaccess/source/ui/browser/unodatbr.cxx +++ b/dbaccess/source/ui/browser/unodatbr.cxx @@ -380,7 +380,7 @@ sal_Bool SbaTableQueryBrowser::Construct(Window* pParent) m_pSplitter->SetPosSizePixel( ::Point(0,0), ::Size(nFrameWidth,0) ); m_pSplitter->SetBackground( Wallpaper( Application::GetSettings().GetStyleSettings().GetDialogColor() ) ); - m_pTreeView = new DBTreeView(getBrowserView(),getORB(), WB_TABSTOP | WB_BORDER); + m_pTreeView = new DBTreeView(getBrowserView(), WB_TABSTOP | WB_BORDER); m_pTreeView->SetPreExpandHandler(LINK(this, SbaTableQueryBrowser, OnExpandEntry)); m_pTreeView->setCopyHandler(LINK(this, SbaTableQueryBrowser, OnCopyEntry)); diff --git a/dbaccess/source/ui/control/dbtreelistbox.cxx b/dbaccess/source/ui/control/dbtreelistbox.cxx index 38cb20f7e523..6b9d3112bd9e 100644 --- a/dbaccess/source/ui/control/dbtreelistbox.cxx +++ b/dbaccess/source/ui/control/dbtreelistbox.cxx @@ -62,25 +62,23 @@ DBG_NAME(DBTreeListBox) // class DBTreeListBox //======================================================================== //------------------------------------------------------------------------ -DBTreeListBox::DBTreeListBox( Window* pParent, const Reference< XMultiServiceFactory >& _rxORB, WinBits nWinStyle ,sal_Bool _bHandleEnterKey) +DBTreeListBox::DBTreeListBox( Window* pParent, WinBits nWinStyle ,sal_Bool _bHandleEnterKey) :SvTreeListBox(pParent,nWinStyle) ,m_pDragedEntry(NULL) ,m_pActionListener(NULL) ,m_pContextMenuProvider( NULL ) ,m_bHandleEnterKey(_bHandleEnterKey) - ,m_xORB(_rxORB) { DBG_CTOR(DBTreeListBox,NULL); init(); } // ----------------------------------------------------------------------------- -DBTreeListBox::DBTreeListBox( Window* pParent, const Reference< XMultiServiceFactory >& _rxORB, const ResId& rResId,sal_Bool _bHandleEnterKey) +DBTreeListBox::DBTreeListBox( Window* pParent, const ResId& rResId,sal_Bool _bHandleEnterKey) :SvTreeListBox(pParent,rResId) ,m_pDragedEntry(NULL) ,m_pActionListener(NULL) ,m_pContextMenuProvider( NULL ) ,m_bHandleEnterKey(_bHandleEnterKey) - ,m_xORB(_rxORB) { DBG_CTOR(DBTreeListBox,NULL); init(); @@ -630,7 +628,7 @@ PopupMenu* DBTreeListBox::CreateContextMenu( void ) aEvent.ExecutePosition.X = -1; aEvent.ExecutePosition.Y = -1; aEvent.ActionTriggerContainer = ::framework::ActionTriggerHelper::CreateActionTriggerContainerFromMenu( - m_xORB, pContextMenu.get(), 0 ); + pContextMenu.get(), 0 ); aEvent.Selection = new SelectionSupplier( m_pContextMenuProvider->getCurrentSelection( *this ) ); ::cppu::OInterfaceIteratorHelper aIter( *pInterceptors ); diff --git a/dbaccess/source/ui/control/marktree.cxx b/dbaccess/source/ui/control/marktree.cxx index a62ee25bc4be..dcf7e5f559ac 100644 --- a/dbaccess/source/ui/control/marktree.cxx +++ b/dbaccess/source/ui/control/marktree.cxx @@ -30,16 +30,16 @@ namespace dbaui DBG_NAME(OMarkableTreeListBox) -OMarkableTreeListBox::OMarkableTreeListBox( Window* pParent, const Reference< XMultiServiceFactory >& _rxORB, WinBits nWinStyle ) - : DBTreeListBox(pParent,_rxORB,nWinStyle) +OMarkableTreeListBox::OMarkableTreeListBox( Window* pParent, WinBits nWinStyle ) + : DBTreeListBox(pParent, nWinStyle) { DBG_CTOR(OMarkableTreeListBox,NULL); InitButtonData(); } -OMarkableTreeListBox::OMarkableTreeListBox( Window* pParent, const Reference< XMultiServiceFactory >& _rxORB, const ResId& rResId) - : DBTreeListBox(pParent,_rxORB,rResId) +OMarkableTreeListBox::OMarkableTreeListBox( Window* pParent, const ResId& rResId) + : DBTreeListBox(pParent, rResId) { DBG_CTOR(OMarkableTreeListBox,NULL); diff --git a/dbaccess/source/ui/control/tabletree.cxx b/dbaccess/source/ui/control/tabletree.cxx index 60a81e519453..3535ab0d52f1 100644 --- a/dbaccess/source/ui/control/tabletree.cxx +++ b/dbaccess/source/ui/control/tabletree.cxx @@ -70,8 +70,8 @@ namespace DatabaseObjectContainer = ::com::sun::star::sdb::application::Database //======================================================================== //= OTableTreeListBox //======================================================================== -OTableTreeListBox::OTableTreeListBox( Window* pParent, const Reference< XMultiServiceFactory >& _rxORB, WinBits nWinStyle,sal_Bool _bVirtualRoot ) - :OMarkableTreeListBox(pParent,_rxORB,nWinStyle) +OTableTreeListBox::OTableTreeListBox( Window* pParent, WinBits nWinStyle, sal_Bool _bVirtualRoot ) + :OMarkableTreeListBox(pParent, nWinStyle) ,m_pImageProvider( new ImageProvider ) ,m_bVirtualRoot(_bVirtualRoot) ,m_bNoEmptyFolders( false ) @@ -79,8 +79,8 @@ OTableTreeListBox::OTableTreeListBox( Window* pParent, const Reference< XMultiSe implSetDefaultImages(); } //------------------------------------------------------------------------ -OTableTreeListBox::OTableTreeListBox( Window* pParent, const Reference< XMultiServiceFactory >& _rxORB, const ResId& rResId ,sal_Bool _bVirtualRoot) - :OMarkableTreeListBox(pParent,_rxORB,rResId) +OTableTreeListBox::OTableTreeListBox( Window* pParent, const ResId& rResId, sal_Bool _bVirtualRoot) + :OMarkableTreeListBox(pParent, rResId) ,m_pImageProvider( new ImageProvider ) ,m_bVirtualRoot(_bVirtualRoot) ,m_bNoEmptyFolders( false ) diff --git a/dbaccess/source/ui/dlg/adtabdlg.cxx b/dbaccess/source/ui/dlg/adtabdlg.cxx index 55fbf4b1dfff..216d8902aaf9 100644 --- a/dbaccess/source/ui/dlg/adtabdlg.cxx +++ b/dbaccess/source/ui/dlg/adtabdlg.cxx @@ -323,7 +323,7 @@ OAddTableDlg::OAddTableDlg( Window* pParent, IAddTableDialogContext& _rContext ) :ModelessDialog( pParent, ModuleRes(DLG_JOIN_TABADD) ) ,m_aCaseTables( this, ModuleRes( RB_CASE_TABLES ) ) ,m_aCaseQueries( this, ModuleRes( RB_CASE_QUERIES ) ) - ,m_aTableList( this, NULL, ModuleRes( LB_TABLE_OR_QUERY ), sal_False ) + ,m_aTableList( this, ModuleRes( LB_TABLE_OR_QUERY ), sal_False ) ,m_aQueryList( this, ModuleRes( LB_TABLE_OR_QUERY ) ) ,aAddButton( this, ModuleRes( PB_ADDTABLE ) ) ,aCloseButton( this, ModuleRes( PB_CLOSE ) ) diff --git a/dbaccess/source/ui/dlg/tablespage.cxx b/dbaccess/source/ui/dlg/tablespage.cxx index 7cb42b0c0e73..14a16399be80 100644 --- a/dbaccess/source/ui/dlg/tablespage.cxx +++ b/dbaccess/source/ui/dlg/tablespage.cxx @@ -79,7 +79,7 @@ DBG_NAME(OTableSubscriptionPage) OTableSubscriptionPage::OTableSubscriptionPage( Window* pParent, const SfxItemSet& _rCoreAttrs,OTableSubscriptionDialog* _pTablesDlg ) :OGenericAdministrationPage( pParent, ModuleRes(PAGE_TABLESUBSCRIPTION), _rCoreAttrs ) ,m_aTables (this, ModuleRes(FL_SEPARATOR1)) - ,m_aTablesList (this, NULL,ModuleRes(CTL_TABLESUBSCRIPTION),sal_True) + ,m_aTablesList (this, ModuleRes(CTL_TABLESUBSCRIPTION),sal_True) ,m_aExplanation (this, ModuleRes(FT_FILTER_EXPLANATION)) ,m_bCatalogAtStart ( sal_True ) ,m_pTablesDlg(_pTablesDlg) @@ -295,7 +295,6 @@ DBG_NAME(OTableSubscriptionPage) m_aTablesList.GetModel()->SetCompareHdl(LINK(this, OTableSubscriptionPage, OnTreeEntryCompare)); Reference< XDriver > xDriver; - m_aTablesList.setORB( Reference(m_xORB->getServiceManager(), UNO_QUERY_THROW) ); Reference xProp = m_pTablesDlg->getCurrentDataSource(); OSL_ENSURE(xProp.is(),"No data source set!"); if ( xProp.is() ) diff --git a/dbaccess/source/ui/inc/dbtreelistbox.hxx b/dbaccess/source/ui/inc/dbtreelistbox.hxx index f61c8ad7e30b..27a7dadd4fb0 100644 --- a/dbaccess/source/ui/inc/dbtreelistbox.hxx +++ b/dbaccess/source/ui/inc/dbtreelistbox.hxx @@ -75,9 +75,6 @@ namespace dbaui sal_Bool m_bHandleEnterKey; - protected: - ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xORB; - private: void init(); DECL_LINK( OnTimeOut, void* ); @@ -87,11 +84,9 @@ namespace dbaui public: DBTreeListBox( Window* pParent - ,const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB ,WinBits nWinStyle=0 ,sal_Bool _bHandleEnterKey = sal_False); DBTreeListBox( Window* pParent - ,const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB ,const ResId& rResId ,sal_Bool _bHandleEnterKey = sal_False); ~DBTreeListBox(); @@ -99,9 +94,6 @@ namespace dbaui void setControlActionListener( IControlActionListener* _pListener ) { m_pActionListener = _pListener; } void setContextMenuProvider( IContextMenuProvider* _pContextMenuProvider ) { m_pContextMenuProvider = _pContextMenuProvider; } - inline void setORB(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _xORB) { m_xORB = _xORB; } - - void SetPreExpandHandler(const Link& _rHdl) { m_aPreExpandHandler = _rHdl; } void SetSelChangeHdl( const Link& _rHdl ) { m_aSelChangeHdl = _rHdl; } void setCutHandler(const Link& _rHdl) { m_aCutHandler = _rHdl; } diff --git a/dbaccess/source/ui/inc/marktree.hxx b/dbaccess/source/ui/inc/marktree.hxx index 0567e22d8947..05dc9e85b77d 100644 --- a/dbaccess/source/ui/inc/marktree.hxx +++ b/dbaccess/source/ui/inc/marktree.hxx @@ -43,12 +43,8 @@ class OMarkableTreeListBox : public DBTreeListBox Link m_aCheckButtonHandler; public: - OMarkableTreeListBox( Window* pParent - ,const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB - , WinBits nWinStyle=0 ); - OMarkableTreeListBox( Window* pParent - ,const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB - , const ResId& rResId ); + OMarkableTreeListBox( Window* pParent, WinBits nWinStyle=0 ); + OMarkableTreeListBox( Window* pParent, const ResId& rResId ); ~OMarkableTreeListBox(); virtual void KeyInput( const KeyEvent& rKEvt ); diff --git a/dbaccess/source/ui/inc/tabletree.hxx b/dbaccess/source/ui/inc/tabletree.hxx index 960f426d7e04..0eebfca65b32 100644 --- a/dbaccess/source/ui/inc/tabletree.hxx +++ b/dbaccess/source/ui/inc/tabletree.hxx @@ -54,13 +54,11 @@ protected: public: OTableTreeListBox( Window* pParent, - const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB, WinBits nWinStyle, sal_Bool _bVirtualRoot ); OTableTreeListBox( Window* pParent, - const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB, const ResId& rResId, sal_Bool _bVirtualRoot ); diff --git a/dbaccess/source/ui/misc/WNameMatch.cxx b/dbaccess/source/ui/misc/WNameMatch.cxx index f56bd6ac4e5c..cfad889af007 100644 --- a/dbaccess/source/ui/misc/WNameMatch.cxx +++ b/dbaccess/source/ui/misc/WNameMatch.cxx @@ -351,7 +351,7 @@ void OColumnString::Paint(const Point& rPos, SvTreeListBox& rDev, const SvViewDa } //======================================================================== OColumnTreeBox::OColumnTreeBox( Window* pParent, const ResId& rResId ) - : OMarkableTreeListBox(pParent,NULL,rResId) + : OMarkableTreeListBox(pParent, rResId) { SetDragDropMode( 0 ); EnableInplaceEditing( sal_False ); diff --git a/framework/inc/classes/actiontriggercontainer.hxx b/framework/inc/classes/actiontriggercontainer.hxx index 5c8488053a63..116a18602fe7 100644 --- a/framework/inc/classes/actiontriggercontainer.hxx +++ b/framework/inc/classes/actiontriggercontainer.hxx @@ -39,7 +39,7 @@ class FWE_DLLPUBLIC ActionTriggerContainer : public PropertySetContainer, public com::sun::star::lang::XTypeProvider { public: - ActionTriggerContainer( const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& rServiceManager ); + ActionTriggerContainer(); virtual ~ActionTriggerContainer(); // XInterface diff --git a/framework/inc/classes/actiontriggerpropertyset.hxx b/framework/inc/classes/actiontriggerpropertyset.hxx index fbeaefe628da..55e87c1a658f 100644 --- a/framework/inc/classes/actiontriggerpropertyset.hxx +++ b/framework/inc/classes/actiontriggerpropertyset.hxx @@ -27,7 +27,6 @@ #include #include -#include #include #include #include @@ -47,7 +46,7 @@ class ActionTriggerPropertySet : public ThreadHelpBase , public ::cppu::OWeakObject { public: - FWE_DLLPUBLIC ActionTriggerPropertySet( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager ); + FWE_DLLPUBLIC ActionTriggerPropertySet(); FWE_DLLPUBLIC virtual ~ActionTriggerPropertySet(); // XInterface diff --git a/framework/inc/classes/actiontriggerseparatorpropertyset.hxx b/framework/inc/classes/actiontriggerseparatorpropertyset.hxx index ba451843f93d..44f035604aad 100644 --- a/framework/inc/classes/actiontriggerseparatorpropertyset.hxx +++ b/framework/inc/classes/actiontriggerseparatorpropertyset.hxx @@ -25,7 +25,6 @@ #include #include #include -#include #include #include #include @@ -46,7 +45,7 @@ class ActionTriggerSeparatorPropertySet : public ThreadHelpBase public ::cppu::OWeakObject { public: - ActionTriggerSeparatorPropertySet( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager ); + ActionTriggerSeparatorPropertySet(); virtual ~ActionTriggerSeparatorPropertySet(); // XInterface diff --git a/framework/inc/classes/rootactiontriggercontainer.hxx b/framework/inc/classes/rootactiontriggercontainer.hxx index 7b09159b3aa2..726f29c23c7d 100644 --- a/framework/inc/classes/rootactiontriggercontainer.hxx +++ b/framework/inc/classes/rootactiontriggercontainer.hxx @@ -43,7 +43,7 @@ class FWE_DLLPUBLIC RootActionTriggerContainer : public PropertySetContainer, public com::sun::star::container::XNamed { public: - RootActionTriggerContainer( const Menu* pMenu, const ::rtl::OUString* pMenuIdentifier, const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& rServiceManager ); + RootActionTriggerContainer( const Menu* pMenu, const ::rtl::OUString* pMenuIdentifier); virtual ~RootActionTriggerContainer(); // XInterface diff --git a/framework/inc/framework/actiontriggerhelper.hxx b/framework/inc/framework/actiontriggerhelper.hxx index 1cecdf749ede..2061d6534b1c 100644 --- a/framework/inc/framework/actiontriggerhelper.hxx +++ b/framework/inc/framework/actiontriggerhelper.hxx @@ -21,7 +21,6 @@ #define __FRAMEWORK_HELPER_ACTIONTRIGGERHELPER_HXX_ #include -#include #include #include @@ -49,7 +48,6 @@ namespace framework // the above mentioned restriction!!! static com::sun::star::uno::Reference< com::sun::star::container::XIndexContainer > CreateActionTriggerContainerFromMenu( - const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceFactory, const Menu* pMenu, const ::rtl::OUString* pMenuIdentifier ); // Fills the submitted rActionTriggerContainer with the structure of the menu diff --git a/framework/inc/helper/propertysetcontainer.hxx b/framework/inc/helper/propertysetcontainer.hxx index 2cff66e4253e..27d453b23ea5 100644 --- a/framework/inc/helper/propertysetcontainer.hxx +++ b/framework/inc/helper/propertysetcontainer.hxx @@ -25,7 +25,6 @@ */ #include #include -#include #include #include #include @@ -39,7 +38,7 @@ class FWE_DLLPUBLIC PropertySetContainer : public com::sun::star::container::XIn public ::cppu::OWeakObject { public: - PropertySetContainer( const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& ); + PropertySetContainer(); virtual ~PropertySetContainer(); // XInterface @@ -76,9 +75,6 @@ class FWE_DLLPUBLIC PropertySetContainer : public com::sun::star::container::XIn virtual sal_Bool SAL_CALL hasElements() throw (::com::sun::star::uno::RuntimeException); - protected: - com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > m_xServiceManager; - private: typedef std::vector< com::sun::star::uno::Reference< com::sun::star::beans::XPropertySet > > PropertySetVector; PropertySetVector m_aPropertySetVector; diff --git a/framework/source/fwe/classes/actiontriggercontainer.cxx b/framework/source/fwe/classes/actiontriggercontainer.cxx index 2f901583838b..0a2efcf76c46 100644 --- a/framework/source/fwe/classes/actiontriggercontainer.cxx +++ b/framework/source/fwe/classes/actiontriggercontainer.cxx @@ -31,8 +31,8 @@ using namespace com::sun::star::container; namespace framework { -ActionTriggerContainer::ActionTriggerContainer( const Reference< XMultiServiceFactory >& rServiceManager ) : - PropertySetContainer( rServiceManager ) +ActionTriggerContainer::ActionTriggerContainer() : + PropertySetContainer() { } @@ -75,11 +75,11 @@ Reference< XInterface > SAL_CALL ActionTriggerContainer::createInstance( const : throw ( ::com::sun::star::uno::Exception, RuntimeException) { if ( aServiceSpecifier.equalsAscii( SERVICENAME_ACTIONTRIGGER )) - return (OWeakObject *)( new ActionTriggerPropertySet( m_xServiceManager )); + return (OWeakObject *)( new ActionTriggerPropertySet()); else if ( aServiceSpecifier.equalsAscii( SERVICENAME_ACTIONTRIGGERCONTAINER )) - return (OWeakObject *)( new ActionTriggerContainer( m_xServiceManager )); + return (OWeakObject *)( new ActionTriggerContainer()); else if ( aServiceSpecifier.equalsAscii( SERVICENAME_ACTIONTRIGGERSEPARATOR )) - return (OWeakObject *)( new ActionTriggerSeparatorPropertySet( m_xServiceManager )); + return (OWeakObject *)( new ActionTriggerSeparatorPropertySet()); else throw com::sun::star::uno::RuntimeException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Unknown service specifier!" )), (OWeakObject *)this ); } diff --git a/framework/source/fwe/classes/actiontriggerpropertyset.cxx b/framework/source/fwe/classes/actiontriggerpropertyset.cxx index f786bd692437..bcde553aa713 100644 --- a/framework/source/fwe/classes/actiontriggerpropertyset.cxx +++ b/framework/source/fwe/classes/actiontriggerpropertyset.cxx @@ -51,7 +51,7 @@ enum EPROPERTIES namespace framework { -ActionTriggerPropertySet::ActionTriggerPropertySet( const Reference< XMultiServiceFactory >& /*xServiceManager*/ ) +ActionTriggerPropertySet::ActionTriggerPropertySet() : ThreadHelpBase ( &Application::GetSolarMutex() ) , OBroadcastHelper ( m_aLock.getShareableOslMutex() ) , OPropertySetHelper ( *(static_cast< OBroadcastHelper * >(this))) diff --git a/framework/source/fwe/classes/actiontriggerseparatorpropertyset.cxx b/framework/source/fwe/classes/actiontriggerseparatorpropertyset.cxx index 3d8d5914818a..c5b33ad2687c 100644 --- a/framework/source/fwe/classes/actiontriggerseparatorpropertyset.cxx +++ b/framework/source/fwe/classes/actiontriggerseparatorpropertyset.cxx @@ -45,7 +45,7 @@ enum EPROPERTIES namespace framework { -ActionTriggerSeparatorPropertySet::ActionTriggerSeparatorPropertySet( const Reference< XMultiServiceFactory >& /*ServiceManager*/ ) +ActionTriggerSeparatorPropertySet::ActionTriggerSeparatorPropertySet() : ThreadHelpBase ( &Application::GetSolarMutex() ) , OBroadcastHelper ( m_aLock.getShareableOslMutex() ) , OPropertySetHelper ( *(static_cast< OBroadcastHelper * >(this)) ) diff --git a/framework/source/fwe/classes/rootactiontriggercontainer.cxx b/framework/source/fwe/classes/rootactiontriggercontainer.cxx index 18b99685662a..8fab56fc1a10 100644 --- a/framework/source/fwe/classes/rootactiontriggercontainer.cxx +++ b/framework/source/fwe/classes/rootactiontriggercontainer.cxx @@ -47,8 +47,8 @@ static Sequence< sal_Int8 > impl_getStaticIdentifier() } -RootActionTriggerContainer::RootActionTriggerContainer( const Menu* pMenu, const ::rtl::OUString* pMenuIdentifier, const Reference< XMultiServiceFactory >& rServiceManager ) : - PropertySetContainer( rServiceManager ) +RootActionTriggerContainer::RootActionTriggerContainer( const Menu* pMenu, const ::rtl::OUString* pMenuIdentifier ) : + PropertySetContainer() , m_bContainerCreated( sal_False ) , m_bContainerChanged( sal_False ) , m_bInContainerCreation( sal_False ) @@ -96,11 +96,11 @@ Reference< XInterface > SAL_CALL RootActionTriggerContainer::createInstance( con throw ( Exception, RuntimeException ) { if ( aServiceSpecifier.equalsAscii( SERVICENAME_ACTIONTRIGGER )) - return (OWeakObject *)( new ActionTriggerPropertySet( m_xServiceManager )); + return (OWeakObject *)( new ActionTriggerPropertySet()); else if ( aServiceSpecifier.equalsAscii( SERVICENAME_ACTIONTRIGGERCONTAINER )) - return (OWeakObject *)( new ActionTriggerContainer( m_xServiceManager )); + return (OWeakObject *)( new ActionTriggerContainer()); else if ( aServiceSpecifier.equalsAscii( SERVICENAME_ACTIONTRIGGERSEPARATOR )) - return (OWeakObject *)( new ActionTriggerSeparatorPropertySet( m_xServiceManager )); + return (OWeakObject *)( new ActionTriggerSeparatorPropertySet()); else throw com::sun::star::uno::RuntimeException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Unknown service specifier!" )), (OWeakObject *)this ); } diff --git a/framework/source/fwe/helper/actiontriggerhelper.cxx b/framework/source/fwe/helper/actiontriggerhelper.cxx index c6ebcfcf69da..7a258345322b 100644 --- a/framework/source/fwe/helper/actiontriggerhelper.cxx +++ b/framework/source/fwe/helper/actiontriggerhelper.cxx @@ -382,11 +382,10 @@ void ActionTriggerHelper::FillActionTriggerContainerFromMenu( } Reference< XIndexContainer > ActionTriggerHelper::CreateActionTriggerContainerFromMenu( - const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceFactory, const Menu* pMenu, const ::rtl::OUString* pMenuIdentifier ) { - return new RootActionTriggerContainer( pMenu, pMenuIdentifier, xServiceFactory ); + return new RootActionTriggerContainer( pMenu, pMenuIdentifier ); } } diff --git a/framework/source/fwe/helper/propertysetcontainer.cxx b/framework/source/fwe/helper/propertysetcontainer.cxx index 4482d5db70ec..48357b16caf1 100644 --- a/framework/source/fwe/helper/propertysetcontainer.cxx +++ b/framework/source/fwe/helper/propertysetcontainer.cxx @@ -34,7 +34,7 @@ using namespace com::sun::star::beans; namespace framework { -PropertySetContainer::PropertySetContainer( const Reference< XMultiServiceFactory >& ) +PropertySetContainer::PropertySetContainer() : ThreadHelpBase( &Application::GetSolarMutex() ) , OWeakObject() diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx index cb5541752e15..941ec1537a91 100644 --- a/sfx2/source/view/viewsh.cxx +++ b/sfx2/source/view/viewsh.cxx @@ -2001,7 +2001,7 @@ sal_Bool SfxViewShell::TryContextMenuInterception( Menu& rIn, const ::rtl::OUStr // create container from menu aEvent.ActionTriggerContainer = ::framework::ActionTriggerHelper::CreateActionTriggerContainerFromMenu( - ::comphelper::getProcessServiceFactory(), &rIn, &rMenuIdentifier ); + &rIn, &rMenuIdentifier ); // get selection from controller aEvent.Selection = uno::Reference < view::XSelectionSupplier > ( GetController(), uno::UNO_QUERY ); -- cgit