summaryrefslogtreecommitdiff
path: root/sw/source/uibase
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-11-05 10:25:49 +0200
committerNoel Grandin <noel@peralex.com>2015-11-05 11:18:41 +0200
commitf9a6e75e21e9919a405a1964d85345a1c0634067 (patch)
tree8b3a9162071da1e8beded91bc3cad16614b2abcc /sw/source/uibase
parent0e31c12f4c1cb53e1d68d1129b3b42508605846f (diff)
use uno::Reference::set method instead of assignmen
Change-Id: I76671a74150791e1a74ece3d5bcf40fd6c727ac7
Diffstat (limited to 'sw/source/uibase')
-rw-r--r--sw/source/uibase/app/apphdl.cxx3
-rw-r--r--sw/source/uibase/dbui/dbmgr.cxx20
-rw-r--r--sw/source/uibase/dbui/dbtree.cxx12
-rw-r--r--sw/source/uibase/dbui/mailmergehelper.cxx7
-rw-r--r--sw/source/uibase/dochdl/swdtflvr.cxx2
-rw-r--r--sw/source/uibase/docvw/PageBreakWin.cxx12
-rw-r--r--sw/source/uibase/fldui/fldmgr.cxx2
-rw-r--r--sw/source/uibase/fldui/xfldui.cxx8
-rw-r--r--sw/source/uibase/misc/numberingtypelistbox.cxx2
-rw-r--r--sw/source/uibase/uno/unoatxt.cxx4
-rw-r--r--sw/source/uibase/uno/unodispatch.cxx2
-rw-r--r--sw/source/uibase/uno/unomailmerge.cxx5
-rw-r--r--sw/source/uibase/uno/unomodule.cxx2
-rw-r--r--sw/source/uibase/uno/unotxdoc.cxx2
-rw-r--r--sw/source/uibase/uno/unotxvw.cxx6
-rw-r--r--sw/source/uibase/utlui/unotools.cxx2
16 files changed, 42 insertions, 49 deletions
diff --git a/sw/source/uibase/app/apphdl.cxx b/sw/source/uibase/app/apphdl.cxx
index 09f6414684f4..4d600a4db9a6 100644
--- a/sw/source/uibase/app/apphdl.cxx
+++ b/sw/source/uibase/app/apphdl.cxx
@@ -382,8 +382,7 @@ void SwMailMergeWizardExecutor::ExecuteMailMergeWizard( const SfxItemSet * pArgs
aDescriptor[svx::daConnection] >>= xConnection;
uno::Reference<container::XChild> xChild(xConnection, uno::UNO_QUERY);
if(xChild.is())
- xSource = uno::Reference<sdbc::XDataSource>(
- xChild->getParent(), uno::UNO_QUERY);
+ xSource.set(xChild->getParent(), uno::UNO_QUERY);
m_pMMConfig->SetCurrentConnection(
xSource, SharedConnection( xConnection, SharedConnection::NoTakeOwnership ),
xColumnsSupplier, aDBData);
diff --git a/sw/source/uibase/dbui/dbmgr.cxx b/sw/source/uibase/dbui/dbmgr.cxx
index f65903d132f0..49446b9ed506 100644
--- a/sw/source/uibase/dbui/dbmgr.cxx
+++ b/sw/source/uibase/dbui/dbmgr.cxx
@@ -306,7 +306,7 @@ struct SwDBManager_Impl
static void lcl_InitNumberFormatter(SwDSParam& rParam, uno::Reference<sdbc::XDataSource> xSource)
{
uno::Reference<uno::XComponentContext> xContext = ::comphelper::getProcessComponentContext();
- rParam.xFormatter = uno::Reference<util::XNumberFormatter>(util::NumberFormatter::create(xContext), uno::UNO_QUERY);
+ rParam.xFormatter.set(util::NumberFormatter::create(xContext), uno::UNO_QUERY);
if(!xSource.is())
xSource = SwDBManager::getDataSourceAsParent(rParam.xConnection, rParam.sDataSource);
@@ -690,7 +690,7 @@ bool SwDBManager::GetTableNames(ListBox* pListBox, const OUString& rDBName)
}
if(xConnection.is())
{
- uno::Reference<sdbcx::XTablesSupplier> xTSupplier = uno::Reference<sdbcx::XTablesSupplier>(xConnection, uno::UNO_QUERY);
+ uno::Reference<sdbcx::XTablesSupplier> xTSupplier(xConnection, uno::UNO_QUERY);
if(xTSupplier.is())
{
uno::Reference<container::XNameAccess> xTables = xTSupplier->getTables();
@@ -702,7 +702,7 @@ bool SwDBManager::GetTableNames(ListBox* pListBox, const OUString& rDBName)
pListBox->SetEntryData(nEntry, nullptr);
}
}
- uno::Reference<sdb::XQueriesSupplier> xQSupplier = uno::Reference<sdb::XQueriesSupplier>(xConnection, uno::UNO_QUERY);
+ uno::Reference<sdb::XQueriesSupplier> xQSupplier(xConnection, uno::UNO_QUERY);
if(xQSupplier.is())
{
uno::Reference<container::XNameAccess> xQueries = xQSupplier->getQueries();
@@ -1694,7 +1694,7 @@ sal_uLong SwDBManager::GetColumnFormat( uno::Reference< sdbc::XDataSource> xSour
{
uno::Reference<container::XChild> xChild(xConnection, uno::UNO_QUERY);
if ( xChild.is() )
- xSource = uno::Reference<sdbc::XDataSource>(xChild->getParent(), uno::UNO_QUERY);
+ xSource.set(xChild->getParent(), uno::UNO_QUERY);
}
if(xSource.is() && xConnection.is() && xColumn.is() && pNFormatr)
{
@@ -1779,7 +1779,7 @@ sal_Int32 SwDBManager::GetColumnType( const OUString& rDBName,
if(pParam && pParam->xConnection.is())
{
xConnection = pParam->xConnection;
- xColsSupp = uno::Reference< sdbcx::XColumnsSupplier >( pParam->xResultSet, uno::UNO_QUERY );
+ xColsSupp.set( pParam->xResultSet, uno::UNO_QUERY );
}
else
{
@@ -1840,7 +1840,7 @@ uno::Reference< sdbcx::XColumnsSupplier> SwDBManager::GetColumnSupplier(uno::Ref
if(eTableOrQuery == SwDBSelect::UNKNOWN)
{
//search for a table with the given command name
- uno::Reference<sdbcx::XTablesSupplier> xTSupplier = uno::Reference<sdbcx::XTablesSupplier>(xConnection, uno::UNO_QUERY);
+ uno::Reference<sdbcx::XTablesSupplier> xTSupplier(xConnection, uno::UNO_QUERY);
if(xTSupplier.is())
{
uno::Reference<container::XNameAccess> xTables = xTSupplier->getTables();
@@ -1868,7 +1868,7 @@ uno::Reference< sdbcx::XColumnsSupplier> SwDBManager::GetColumnSupplier(uno::Ref
xRowProperties->setPropertyValue("FetchSize", uno::makeAny((sal_Int32)10));
xRowProperties->setPropertyValue("ActiveConnection", uno::makeAny(xConnection));
xRowSet->execute();
- xRet = uno::Reference<sdbcx::XColumnsSupplier>( xRowSet, uno::UNO_QUERY );
+ xRet.set( xRowSet, uno::UNO_QUERY );
}
catch (const uno::Exception& e)
{
@@ -2970,7 +2970,7 @@ void SwDBManager::InsertText(SwWrtShell& rSh,
uno::Reference<sdbc::XDataSource> xSource;
uno::Reference<container::XChild> xChild(xConnection, uno::UNO_QUERY);
if(xChild.is())
- xSource = uno::Reference<sdbc::XDataSource>(xChild->getParent(), uno::UNO_QUERY);
+ xSource.set(xChild->getParent(), uno::UNO_QUERY);
if(!xSource.is())
xSource = dbtools::getDataSource(sDataSource, xContext);
uno::Reference< sdbcx::XColumnsSupplier > xColSupp( xResSet, uno::UNO_QUERY );
@@ -3010,7 +3010,7 @@ uno::Reference<sdbc::XDataSource> SwDBManager::getDataSourceAsParent(const uno::
{
uno::Reference<container::XChild> xChild(_xConnection, uno::UNO_QUERY);
if ( xChild.is() )
- xSource = uno::Reference<sdbc::XDataSource>(xChild->getParent(), uno::UNO_QUERY);
+ xSource.set(xChild->getParent(), uno::UNO_QUERY);
if ( !xSource.is() )
xSource = dbtools::getDataSource(_sDataSourceName, ::comphelper::getProcessComponentContext());
}
@@ -3049,7 +3049,7 @@ uno::Reference<sdbc::XResultSet> SwDBManager::createCursor(const OUString& _sDat
uno::Reference< task::XInteractionHandler > xHandler( task::InteractionHandler::createWithParent(comphelper::getComponentContext(xMgr), 0), uno::UNO_QUERY_THROW );
xRowSet->executeWithCompletion(xHandler);
}
- xResultSet = uno::Reference<sdbc::XResultSet>(xRowSet, uno::UNO_QUERY);
+ xResultSet.set(xRowSet, uno::UNO_QUERY);
}
}
}
diff --git a/sw/source/uibase/dbui/dbtree.cxx b/sw/source/uibase/dbui/dbtree.cxx
index 4ddad2a74939..48f2ff993b28 100644
--- a/sw/source/uibase/dbui/dbtree.cxx
+++ b/sw/source/uibase/dbui/dbtree.cxx
@@ -277,7 +277,7 @@ void SwDBTreeList::RequestingChildren(SvTreeListEntry* pParent)
Reference<XColumnsSupplier> xColsSupplier;
if(bTable)
{
- Reference<XTablesSupplier> xTSupplier = Reference<XTablesSupplier>(xConnection, UNO_QUERY);
+ Reference<XTablesSupplier> xTSupplier(xConnection, UNO_QUERY);
if(xTSupplier.is())
{
Reference<XNameAccess> xTables = xTSupplier->getTables();
@@ -287,7 +287,7 @@ void SwDBTreeList::RequestingChildren(SvTreeListEntry* pParent)
Any aTable = xTables->getByName(sTableName);
Reference<XPropertySet> xPropSet;
aTable >>= xPropSet;
- xColsSupplier = Reference<XColumnsSupplier>(xPropSet, UNO_QUERY);
+ xColsSupplier.set(xPropSet, UNO_QUERY);
}
catch (const Exception&)
{
@@ -296,7 +296,7 @@ void SwDBTreeList::RequestingChildren(SvTreeListEntry* pParent)
}
else
{
- Reference<XQueriesSupplier> xQSupplier = Reference<XQueriesSupplier>(xConnection, UNO_QUERY);
+ Reference<XQueriesSupplier> xQSupplier(xConnection, UNO_QUERY);
if(xQSupplier.is())
{
Reference<XNameAccess> xQueries = xQSupplier->getQueries();
@@ -306,7 +306,7 @@ void SwDBTreeList::RequestingChildren(SvTreeListEntry* pParent)
Any aQuery = xQueries->getByName(sTableName);
Reference<XPropertySet> xPropSet;
aQuery >>= xPropSet;
- xColsSupplier = Reference<XColumnsSupplier>(xPropSet, UNO_QUERY);
+ xColsSupplier.set(xPropSet, UNO_QUERY);
}
catch (const Exception&)
{
@@ -341,7 +341,7 @@ void SwDBTreeList::RequestingChildren(SvTreeListEntry* pParent)
Reference<XConnection> xConnection = pImpl->GetConnection(sSourceName);
if (xConnection.is())
{
- Reference<XTablesSupplier> xTSupplier = Reference<XTablesSupplier>(xConnection, UNO_QUERY);
+ Reference<XTablesSupplier> xTSupplier(xConnection, UNO_QUERY);
if(xTSupplier.is())
{
Reference<XNameAccess> xTables = xTSupplier->getTables();
@@ -359,7 +359,7 @@ void SwDBTreeList::RequestingChildren(SvTreeListEntry* pParent)
}
}
- Reference<XQueriesSupplier> xQSupplier = Reference<XQueriesSupplier>(xConnection, UNO_QUERY);
+ Reference<XQueriesSupplier> xQSupplier(xConnection, UNO_QUERY);
if(xQSupplier.is())
{
Reference<XNameAccess> xQueries = xQSupplier->getQueries();
diff --git a/sw/source/uibase/dbui/mailmergehelper.cxx b/sw/source/uibase/dbui/mailmergehelper.cxx
index 22160a2bec9c..1b49433d0f4d 100644
--- a/sw/source/uibase/dbui/mailmergehelper.cxx
+++ b/sw/source/uibase/dbui/mailmergehelper.cxx
@@ -97,10 +97,7 @@ uno::Reference< mail::XSmtpService > ConnectToSmtpServer(
{
uno::Reference< mail::XMailServiceProvider > xMailServiceProvider(
mail::MailServiceProvider::create( xContext ) );
- xSmtpServer = uno::Reference< mail::XSmtpService > (
- xMailServiceProvider->create(
- mail::MailServiceType_SMTP
- ), uno::UNO_QUERY);
+ xSmtpServer.set(xMailServiceProvider->create(mail::MailServiceType_SMTP), uno::UNO_QUERY);
uno::Reference< mail::XConnectionListener> xConnectionListener(new SwConnectionListener());
@@ -155,7 +152,7 @@ uno::Reference< mail::XSmtpService > ConnectToSmtpServer(
rConfigItem.GetMailPort(),
rConfigItem.IsSecureConnection() ? OUString("Ssl") : OUString("Insecure") );
xSmtpServer->connect(xConnectionContext, xAuthenticator);
- rxInMailService = uno::Reference< mail::XMailService >( xSmtpServer, uno::UNO_QUERY );
+ rxInMailService.set( xSmtpServer, uno::UNO_QUERY );
}
catch (const uno::Exception&)
{
diff --git a/sw/source/uibase/dochdl/swdtflvr.cxx b/sw/source/uibase/dochdl/swdtflvr.cxx
index 39bd292393dc..43043942e6ab 100644
--- a/sw/source/uibase/dochdl/swdtflvr.cxx
+++ b/sw/source/uibase/dochdl/swdtflvr.cxx
@@ -691,7 +691,7 @@ bool SwTransferable::WriteObject( tools::SvRef<SotStorageStream>& xStream,
bRet = true;
xWorkStore->dispose();
- xWorkStore = uno::Reference < embed::XStorage >();
+ xWorkStore.clear();
xStream->Commit();
}
catch (const uno::Exception&)
diff --git a/sw/source/uibase/docvw/PageBreakWin.cxx b/sw/source/uibase/docvw/PageBreakWin.cxx
index cc180b5cd0d0..93e7c427bf7a 100644
--- a/sw/source/uibase/docvw/PageBreakWin.cxx
+++ b/sw/source/uibase/docvw/PageBreakWin.cxx
@@ -165,9 +165,9 @@ void SwPageBreakWin::Paint(vcl::RenderContext& rRenderContext, const Rectangle&)
B2DPolygon aPolygon = createPolygonFromRect(aBRect, 3.0 / BUTTON_WIDTH, 3.0 / BUTTON_HEIGHT);
// Create the polygon primitives
- aSeq[0] = css::uno::Reference< css::graphic::XPrimitive2D >(new drawinglayer::primitive2d::PolyPolygonColorPrimitive2D(
+ aSeq[0].set(new drawinglayer::primitive2d::PolyPolygonColorPrimitive2D(
B2DPolyPolygon(aPolygon), aOtherColor));
- aSeq[1] = css::uno::Reference< css::graphic::XPrimitive2D >(new drawinglayer::primitive2d::PolygonHairlinePrimitive2D(
+ aSeq[1].set(new drawinglayer::primitive2d::PolygonHairlinePrimitive2D(
aPolygon, aColor));
// Create the primitive for the image
@@ -175,7 +175,7 @@ void SwPageBreakWin::Paint(vcl::RenderContext& rRenderContext, const Rectangle&)
double nImgOfstX = 3.0;
if (bRtl)
nImgOfstX = aRect.Right() - aImg.GetSizePixel().Width() - 3.0;
- aSeq[2] = css::uno::Reference< css::graphic::XPrimitive2D >(new drawinglayer::primitive2d::DiscreteBitmapPrimitive2D(
+ aSeq[2].set(new drawinglayer::primitive2d::DiscreteBitmapPrimitive2D(
aImg.GetBitmapEx(), B2DPoint(nImgOfstX, 1.0)));
double nTop = double(aRect.getHeight()) / 2.0;
@@ -196,8 +196,7 @@ void SwPageBreakWin::Paint(vcl::RenderContext& rRenderContext, const Rectangle&)
aTriangleColor = Color(COL_WHITE).getBColor();
aSeq.realloc(aSeq.getLength() + 1);
- aSeq[aSeq.getLength() - 1] = css::uno::Reference< css::graphic::XPrimitive2D >(
- new drawinglayer::primitive2d::PolyPolygonColorPrimitive2D(
+ aSeq[aSeq.getLength() - 1].set( new drawinglayer::primitive2d::PolyPolygonColorPrimitive2D(
B2DPolyPolygon(aTriangle), aTriangleColor));
css::uno::Sequence< css::uno::Reference< css::graphic::XPrimitive2D > > aGhostedSeq(1);
@@ -205,8 +204,7 @@ void SwPageBreakWin::Paint(vcl::RenderContext& rRenderContext, const Rectangle&)
const basegfx::BColorModifierSharedPtr aBColorModifier(
new basegfx::BColorModifier_interpolate(Color(COL_WHITE).getBColor(),
1.0 - nFadeRate));
- aGhostedSeq[0] = css::uno::Reference< css::graphic::XPrimitive2D >(
- new drawinglayer::primitive2d::ModifiedColorPrimitive2D(
+ aGhostedSeq[0].set( new drawinglayer::primitive2d::ModifiedColorPrimitive2D(
aSeq, aBColorModifier));
// Create the processor and process the primitives
diff --git a/sw/source/uibase/fldui/fldmgr.cxx b/sw/source/uibase/fldui/fldmgr.cxx
index 3ad6f9c3a988..fa6ecca7d6d8 100644
--- a/sw/source/uibase/fldui/fldmgr.cxx
+++ b/sw/source/uibase/fldui/fldmgr.cxx
@@ -1707,7 +1707,7 @@ Reference<XNumberingTypeInfo> SwFieldMgr::GetNumberingInfo() const
{
Reference<XComponentContext> xContext( ::comphelper::getProcessComponentContext() );
Reference<XDefaultNumberingProvider> xDefNum = text::DefaultNumberingProvider::create(xContext);
- const_cast<SwFieldMgr*>(this)->xNumberingInfo = Reference<XNumberingTypeInfo>(xDefNum, UNO_QUERY);
+ const_cast<SwFieldMgr*>(this)->xNumberingInfo.set(xDefNum, UNO_QUERY);
}
return xNumberingInfo;
}
diff --git a/sw/source/uibase/fldui/xfldui.cxx b/sw/source/uibase/fldui/xfldui.cxx
index 5bf5b738ac9f..c7164e5e771d 100644
--- a/sw/source/uibase/fldui/xfldui.cxx
+++ b/sw/source/uibase/fldui/xfldui.cxx
@@ -65,7 +65,7 @@ bool SwFieldMgr::IsDBNumeric( const OUString& rDBName, const OUString& rTableQry
Reference<XColumnsSupplier> xColsSupplier;
if(bIsTable)
{
- Reference<XTablesSupplier> xTSupplier = Reference<XTablesSupplier>(xConnection, UNO_QUERY);
+ Reference<XTablesSupplier> xTSupplier(xConnection, UNO_QUERY);
if(xTSupplier.is())
{
Reference<XNameAccess> xTables = xTSupplier->getTables();
@@ -75,7 +75,7 @@ bool SwFieldMgr::IsDBNumeric( const OUString& rDBName, const OUString& rTableQry
Any aTable = xTables->getByName(rTableQryName);
Reference<XPropertySet> xPropSet;
aTable >>= xPropSet;
- xColsSupplier = Reference<XColumnsSupplier>(xPropSet, UNO_QUERY);
+ xColsSupplier.set(xPropSet, UNO_QUERY);
}
catch (const Exception&)
{
@@ -84,7 +84,7 @@ bool SwFieldMgr::IsDBNumeric( const OUString& rDBName, const OUString& rTableQry
}
else
{
- Reference<XQueriesSupplier> xQSupplier = Reference<XQueriesSupplier>(xConnection, UNO_QUERY);
+ Reference<XQueriesSupplier> xQSupplier(xConnection, UNO_QUERY);
if(xQSupplier.is())
{
Reference<XNameAccess> xQueries = xQSupplier->getQueries();
@@ -94,7 +94,7 @@ bool SwFieldMgr::IsDBNumeric( const OUString& rDBName, const OUString& rTableQry
Any aQuery = xQueries->getByName(rTableQryName);
Reference<XPropertySet> xPropSet;
aQuery >>= xPropSet;
- xColsSupplier = Reference<XColumnsSupplier>(xPropSet, UNO_QUERY);
+ xColsSupplier.set(xPropSet, UNO_QUERY);
}
catch (const Exception&)
{
diff --git a/sw/source/uibase/misc/numberingtypelistbox.cxx b/sw/source/uibase/misc/numberingtypelistbox.cxx
index 7e76bc6b26fa..1f1e47a4eee1 100644
--- a/sw/source/uibase/misc/numberingtypelistbox.cxx
+++ b/sw/source/uibase/misc/numberingtypelistbox.cxx
@@ -43,7 +43,7 @@ SwNumberingTypeListBox::SwNumberingTypeListBox( vcl::Window* pWin, WinBits nStyl
uno::Reference<uno::XComponentContext> xContext( ::comphelper::getProcessComponentContext() );
uno::Reference<text::XDefaultNumberingProvider> xDefNum = text::DefaultNumberingProvider::create(xContext);
- pImpl->xInfo = uno::Reference<text::XNumberingTypeInfo>(xDefNum, uno::UNO_QUERY);
+ pImpl->xInfo.set(xDefNum, uno::UNO_QUERY);
}
bool SwNumberingTypeListBox::set_property(const OString &rKey, const OString &rValue)
diff --git a/sw/source/uibase/uno/unoatxt.cxx b/sw/source/uibase/uno/unoatxt.cxx
index f8223eeaca96..428b6c92f109 100644
--- a/sw/source/uibase/uno/unoatxt.cxx
+++ b/sw/source/uibase/uno/unoatxt.cxx
@@ -802,7 +802,7 @@ void SwXAutoTextEntry::GetBodyText ()
StartListening( *&xDocSh );
pBodyText = new SwXBodyText ( xDocSh->GetDoc() );
- xBodyText = uno::Reference < lang::XServiceInfo > ( *pBodyText, uno::UNO_QUERY);
+ xBodyText.set( *pBodyText, uno::UNO_QUERY);
}
uno::Reference< text::XTextCursor > SwXAutoTextEntry::createTextCursor() throw( uno::RuntimeException, std::exception )
@@ -928,7 +928,7 @@ void SwXAutoTextEntry::applyTo(const uno::Reference< text::XTextRange > & xTextR
pDoc = pCursor->GetDoc();
else if ( pText && pText->GetDoc() )
{
- xTunnel = uno::Reference < lang::XUnoTunnel > (pText->getStart(), uno::UNO_QUERY);
+ xTunnel.set(pText->getStart(), uno::UNO_QUERY);
if (xTunnel.is())
{
pCursor = reinterpret_cast < OTextCursorHelper* >
diff --git a/sw/source/uibase/uno/unodispatch.cxx b/sw/source/uibase/uno/unodispatch.cxx
index 8b281b03ba19..e1b95428eca7 100644
--- a/sw/source/uibase/uno/unodispatch.cxx
+++ b/sw/source/uibase/uno/unodispatch.cxx
@@ -43,7 +43,7 @@ SwXDispatchProviderInterceptor::SwXDispatchProviderInterceptor(SwView& rVw) :
m_pView(&rVw)
{
uno::Reference< frame::XFrame> xUnoFrame = m_pView->GetViewFrame()->GetFrame().GetFrameInterface();
- m_xIntercepted = uno::Reference< frame::XDispatchProviderInterception>(xUnoFrame, uno::UNO_QUERY);
+ m_xIntercepted.set(xUnoFrame, uno::UNO_QUERY);
if(m_xIntercepted.is())
{
m_refCount++;
diff --git a/sw/source/uibase/uno/unomailmerge.cxx b/sw/source/uibase/uno/unomailmerge.cxx
index df76382caa63..3d8fc435c617 100644
--- a/sw/source/uibase/uno/unomailmerge.cxx
+++ b/sw/source/uibase/uno/unomailmerge.cxx
@@ -145,8 +145,7 @@ static bool LoadFromURL_impl(
try
{
Reference < XDesktop2 > xDesktop = Desktop::create( ::comphelper::getProcessComponentContext() );
- xTmpModel = Reference < XModel >( xDesktop->loadComponentFromURL(
- rURL, "_blank", 0, aArgs ), UNO_QUERY );
+ xTmpModel.set( xDesktop->loadComponentFromURL( rURL, "_blank", 0, aArgs ), UNO_QUERY );
}
catch (const Exception&)
{
@@ -642,7 +641,7 @@ uno::Any SAL_CALL SwXMailMerge::execute(
xRowSet->execute(); // build ResultSet from properties
if( !xCurConnection.is() )
xCurConnection.set( xRowSetPropSet->getPropertyValue( "ActiveConnection" ), UNO_QUERY );
- xCurResultSet = Reference< sdbc::XResultSet >( xRowSet, UNO_QUERY );
+ xCurResultSet.set( xRowSet, UNO_QUERY );
OSL_ENSURE( xCurResultSet.is(), "failed to build ResultSet" );
}
}
diff --git a/sw/source/uibase/uno/unomodule.cxx b/sw/source/uibase/uno/unomodule.cxx
index 62a899747808..c353e25817f8 100644
--- a/sw/source/uibase/uno/unomodule.cxx
+++ b/sw/source/uibase/uno/unomodule.cxx
@@ -132,7 +132,7 @@ uno::Reference< frame::XDispatch > SAL_CALL SwUnoModule::queryDispatch(
SwGlobals::ensure();
const SfxSlot* pSlot = SW_MOD()->GetInterface()->GetSlot( aURL.Complete );
if ( pSlot )
- xReturn = uno::Reference< frame::XDispatch >(static_cast< frame::XDispatch* >(this), uno::UNO_QUERY);
+ xReturn.set(static_cast< frame::XDispatch* >(this), uno::UNO_QUERY);
return xReturn;
}
diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx
index 43a5b324d9ca..79b5b90bd8bf 100644
--- a/sw/source/uibase/uno/unotxdoc.cxx
+++ b/sw/source/uibase/uno/unotxdoc.cxx
@@ -452,7 +452,7 @@ void SwXTextDocument::GetNumberFormatter()
SvNumberFormatsSupplierObj* pNumFormat = new SvNumberFormatsSupplierObj(
pDocShell->GetDoc()->GetNumberFormatter());
Reference< util::XNumberFormatsSupplier > xTmp = pNumFormat;
- xNumFormatAgg = Reference< XAggregation >(xTmp, UNO_QUERY);
+ xNumFormatAgg.set(xTmp, UNO_QUERY);
}
if(xNumFormatAgg.is())
xNumFormatAgg->setDelegator(static_cast<cppu::OWeakObject*>(static_cast<SwXTextDocumentBaseClass*>(this)));
diff --git a/sw/source/uibase/uno/unotxvw.cxx b/sw/source/uibase/uno/unotxvw.cxx
index 2871760addac..dc012f1a0183 100644
--- a/sw/source/uibase/uno/unotxvw.cxx
+++ b/sw/source/uibase/uno/unotxvw.cxx
@@ -341,7 +341,7 @@ uno::Any SwXTextView::getSelection()
OSL_ENSURE(rSh.GetTableFormat(), "not a table format?");
uno::Reference< text::XTextTableCursor > xCrsr = new SwXTextTableCursor(*rSh.GetTableFormat(),
rSh.GetTableCrsr());
- aRef = uno::Reference< uno::XInterface > (xCrsr, uno::UNO_QUERY);
+ aRef.set(xCrsr, uno::UNO_QUERY);
break;
}
@@ -353,7 +353,7 @@ uno::Any SwXTextView::getSelection()
case SHELL_MODE_TEXT :
{
uno::Reference< container::XIndexAccess > xPos = SwXTextRanges::Create(rSh.GetCrsr());
- aRef = uno::Reference< uno::XInterface >(xPos, uno::UNO_QUERY);
+ aRef.set(xPos, uno::UNO_QUERY);
}
break;
case SHELL_MODE_FRAME :
@@ -407,7 +407,7 @@ uno::Any SwXTextView::getSelection()
uno::Reference< drawing::XShape > xShape(xInt, uno::UNO_QUERY);
xShCol->add(xShape);
}
- aRef = uno::Reference< uno::XInterface >(xShCol, uno::UNO_QUERY);
+ aRef.set(xShCol, uno::UNO_QUERY);
}
break;
default:;//prevent warning
diff --git a/sw/source/uibase/utlui/unotools.cxx b/sw/source/uibase/utlui/unotools.cxx
index 9afbb4ab79a1..fce324cd2e13 100644
--- a/sw/source/uibase/utlui/unotools.cxx
+++ b/sw/source/uibase/utlui/unotools.cxx
@@ -114,7 +114,7 @@ void SwOneExampleFrame::CreateControl()
xMgr = comphelper::getProcessServiceFactory();
uno::Reference< uno::XComponentContext > xContext = comphelper::getProcessComponentContext();
uno::Reference< uno::XInterface > xInst = xMgr->createInstance( "com.sun.star.frame.FrameControl" );
- _xControl = uno::Reference< awt::XControl >(xInst, uno::UNO_QUERY);
+ _xControl.set(xInst, uno::UNO_QUERY);
if(_xControl.is())
{
uno::Reference< awt::XWindowPeer > xParent( aTopWindow->GetComponentInterface() );