diff options
author | Noel Grandin <noel@peralex.com> | 2013-01-04 13:38:11 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-01-09 08:08:16 +0200 |
commit | b23fd68eeeddd6973f5ea79da4cf7638094ad8d4 (patch) | |
tree | e977427671a7fe58c5b7fb2e2aef2a03e2f7497a /dbaccess/source/ui | |
parent | e88e974e7cd9d92ca338ba6c56baa0aa9a4b0636 (diff) |
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
Diffstat (limited to 'dbaccess/source/ui')
-rw-r--r-- | dbaccess/source/ui/app/AppDetailPageHelper.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/browser/dbtreeview.cxx | 4 | ||||
-rw-r--r-- | dbaccess/source/ui/browser/dbtreeview.hxx | 3 | ||||
-rw-r--r-- | dbaccess/source/ui/browser/unodatbr.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/control/dbtreelistbox.cxx | 8 | ||||
-rw-r--r-- | dbaccess/source/ui/control/marktree.cxx | 8 | ||||
-rw-r--r-- | dbaccess/source/ui/control/tabletree.cxx | 8 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/adtabdlg.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/tablespage.cxx | 3 | ||||
-rw-r--r-- | dbaccess/source/ui/inc/dbtreelistbox.hxx | 8 | ||||
-rw-r--r-- | dbaccess/source/ui/inc/marktree.hxx | 8 | ||||
-rw-r--r-- | dbaccess/source/ui/inc/tabletree.hxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/misc/WNameMatch.cxx | 2 |
13 files changed, 19 insertions, 41 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<lang::XMultiServiceFactory>(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<lang::XMultiServiceFactory>(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 <vcl/window.hxx> -#include <com/sun/star/lang/XMultiServiceFactory.hpp> - 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<XMultiServiceFactory>(m_xORB->getServiceManager(), UNO_QUERY_THROW) ); Reference<XPropertySet> 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 ); |