summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
Diffstat (limited to 'sw')
-rw-r--r--sw/source/filter/xml/xmlexp.cxx5
-rw-r--r--sw/source/filter/xml/xmltbli.cxx2
-rw-r--r--sw/source/ui/dbui/dbmgr.cxx6
-rw-r--r--sw/source/ui/dbui/dbtree.cxx9
4 files changed, 8 insertions, 14 deletions
diff --git a/sw/source/filter/xml/xmlexp.cxx b/sw/source/filter/xml/xmlexp.cxx
index e12b3f3631bd..fca627d3af85 100644
--- a/sw/source/filter/xml/xmlexp.cxx
+++ b/sw/source/filter/xml/xmlexp.cxx
@@ -361,7 +361,7 @@ void SwXMLExport::GetViewSettings(Sequence<PropertyValue>& aProps)
Reference < XIndexContainer > xBox = IndexedPropertyValues::create( comphelper::getProcessComponentContext() );
pValue[nIndex].Name = OUString( "Views");
- pValue[nIndex++].Value <<= Reference < XIndexAccess > ( xBox, UNO_QUERY );
+ pValue[nIndex++].Value <<= xBox;
SwDoc *pDoc = getDoc();
const Rectangle rRect =
@@ -464,9 +464,8 @@ void SwXMLExport::_ExportContent()
if (xPage.is())
{
// prevent export of form controls which are embedded in mute sections
- Reference<XIndexAccess> xIAPage( xPage, UNO_QUERY );
GetTextParagraphExport()->PreventExportOfControlsInMuteSections(
- xIAPage, GetFormExport() );
+ xPage, GetFormExport() );
// #i36597#
if ( GetFormExport()->pageContainsForms( xPage ) || GetFormExport()->documentContainsXForms() )
diff --git a/sw/source/filter/xml/xmltbli.cxx b/sw/source/filter/xml/xmltbli.cxx
index 5a367cd49bd5..9cc801f5f2f8 100644
--- a/sw/source/filter/xml/xmltbli.cxx
+++ b/sw/source/filter/xml/xmltbli.cxx
@@ -1403,7 +1403,7 @@ SwXMLTableContext::SwXMLTableContext( SwXMLImport& rImport,
try
{
- xTextContent = Reference< XTextContent >( xTable, UNO_QUERY );
+ xTextContent = xTable;
GetImport().GetTextImport()->InsertTextContent( xTextContent );
}
catch( IllegalArgumentException& )
diff --git a/sw/source/ui/dbui/dbmgr.cxx b/sw/source/ui/dbui/dbmgr.cxx
index 51db9f330ce6..ae7a0d6b2ee5 100644
--- a/sw/source/ui/dbui/dbmgr.cxx
+++ b/sw/source/ui/dbui/dbmgr.cxx
@@ -2281,7 +2281,6 @@ String SwNewDBMgr::LoadAndRegisterDataSource()
{
Reference<XComponentContext> xContext( ::comphelper::getProcessComponentContext() );
Reference<XDatabaseContext> xDBContext = DatabaseContext::create(xContext);
- Reference<XSingleServiceFactory> xFact( xDBContext, UNO_QUERY);
String sNewName = INetURLObject::decode( aURL.getName(),
INET_HEX_ESCAPE,
@@ -2308,7 +2307,7 @@ String SwNewDBMgr::LoadAndRegisterDataSource()
}
else
{
- xNewInstance = xFact->createInstance();
+ xNewInstance = xDBContext->createInstance();
Reference<XPropertySet> xDataProperties(xNewInstance, UNO_QUERY);
if(aURLAny.hasValue())
@@ -2346,8 +2345,7 @@ String SwNewDBMgr::LoadAndRegisterDataSource()
}
xStore->storeAsURL(sTmpName, Sequence< PropertyValue >());
}
- Reference<XNamingService> xNaming(xDBContext, UNO_QUERY);
- xNaming->registerObject( sFind, xNewInstance );
+ xDBContext->registerObject( sFind, xNewInstance );
}
catch(const Exception&)
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();
}