summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-05-31 11:13:20 +0200
committerNoel Grandin <noel@peralex.com>2013-06-03 10:00:01 +0200
commit2e152c2438818049b50dcc7b322089af4bcfc384 (patch)
tree69a9cb3ae28d4d05a78e5feb2910d5c3a56349ef
parent65edd1c8a87abf3cfeaaa6490795be0d06049bea (diff)
fdo#46808, Remove XMultiServiceFactory from NavigatorTree
no point in storing global data Change-Id: Ic5ab867c2de7308c93b42b0d96074721e426b01d
-rw-r--r--svx/source/form/fmexpl.cxx2
-rw-r--r--svx/source/form/navigatortree.cxx7
-rw-r--r--svx/source/inc/fmexpl.hxx3
3 files changed, 5 insertions, 7 deletions
diff --git a/svx/source/form/fmexpl.cxx b/svx/source/form/fmexpl.cxx
index 26b8b906e2ee..717b87460245 100644
--- a/svx/source/form/fmexpl.cxx
+++ b/svx/source/form/fmexpl.cxx
@@ -601,7 +601,7 @@ namespace svxform
DBG_CTOR(NavigatorFrame,NULL);
SetHelpId( HID_FORM_NAVIGATOR_WIN );
- m_pNavigatorTree = new NavigatorTree(comphelper::getProcessServiceFactory(), this );
+ m_pNavigatorTree = new NavigatorTree( this );
m_pNavigatorTree->Show();
SetText( SVX_RES(RID_STR_FMEXPLORER) );
SfxDockingWindow::SetFloatingSize( Size(200,200) );
diff --git a/svx/source/form/navigatortree.cxx b/svx/source/form/navigatortree.cxx
index 768facd272e8..2d445a75655a 100644
--- a/svx/source/form/navigatortree.cxx
+++ b/svx/source/form/navigatortree.cxx
@@ -119,11 +119,9 @@ namespace svxform
//========================================================================
//------------------------------------------------------------------------
- NavigatorTree::NavigatorTree( const Reference< XMultiServiceFactory >& _xORB,
- Window* pParent )
+ NavigatorTree::NavigatorTree( Window* pParent )
:SvTreeListBox( pParent, WB_HASBUTTONS|WB_HASLINES|WB_BORDER|WB_HSCROLL ) // #100258# OJ WB_HSCROLL added
,m_aControlExchange(this)
- ,m_xORB(_xORB)
,m_pNavModel( NULL )
,m_pRootEntry(NULL)
,m_pEditEntry(NULL)
@@ -1364,7 +1362,8 @@ namespace svxform
//////////////////////////////////////////////////////////////////////
// Neue Form erzeugen
- Reference< XForm > xNewForm(m_xORB->createInstance(FM_SUN_COMPONENT_FORM), UNO_QUERY);
+ Reference<XComponentContext> xContext = comphelper::getProcessComponentContext();
+ Reference< XForm > xNewForm(xContext->getServiceManager()->createInstanceWithContext(FM_SUN_COMPONENT_FORM, xContext), UNO_QUERY);
if (!xNewForm.is())
return;
diff --git a/svx/source/inc/fmexpl.hxx b/svx/source/inc/fmexpl.hxx
index 67e4adf6ca24..c7c97da807de 100644
--- a/svx/source/inc/fmexpl.hxx
+++ b/svx/source/inc/fmexpl.hxx
@@ -427,7 +427,6 @@ namespace svxform
::svxform::OControlExchangeHelper m_aControlExchange;
- ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xORB;
NavigatorTreeModel* m_pNavModel;
SvTreeListEntry* m_pRootEntry;
SvTreeListEntry* m_pEditEntry;
@@ -509,7 +508,7 @@ namespace svxform
virtual void StartDrag( sal_Int8 nAction, const Point& rPosPixel );
public:
- NavigatorTree(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _xORB, Window* pParent );
+ NavigatorTree(Window* pParent );
virtual ~NavigatorTree();
void Clear();