summaryrefslogtreecommitdiff
path: root/sw/source/ui/dbui/dbtree.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/ui/dbui/dbtree.cxx')
-rw-r--r--sw/source/ui/dbui/dbtree.cxx9
1 files changed, 3 insertions, 6 deletions
diff --git a/sw/source/ui/dbui/dbtree.cxx b/sw/source/ui/dbui/dbtree.cxx
index 8a5193733c80..77c67718a6d1 100644
--- a/sw/source/ui/dbui/dbtree.cxx
+++ b/sw/source/ui/dbui/dbtree.cxx
@@ -96,14 +96,13 @@ class SwDBTreeList_Impl : public cppu::WeakImplHelper1 < XContainerListener >
SwDBTreeList_Impl::~SwDBTreeList_Impl()
{
- Reference<XContainer> xContainer(xDBContext, UNO_QUERY);
- if(xContainer.is())
+ if(xDBContext.is())
{
m_refCount++;
//block necessary due to solaris' compiler behaviour to
//remove temporaries at the block's end
{
- xContainer->removeContainerListener( this );
+ xDBContext->removeContainerListener( this );
}
m_refCount--;
}
@@ -145,9 +144,7 @@ sal_Bool SwDBTreeList_Impl::HasContext()
{
Reference< XComponentContext > xContext( ::comphelper::getProcessComponentContext() );
xDBContext = DatabaseContext::create(xContext);
- Reference<XContainer> xContainer(xDBContext, UNO_QUERY);
- if(xContainer.is())
- xContainer->addContainerListener( this );
+ xDBContext->addContainerListener( this );
}
return xDBContext.is();
}