summaryrefslogtreecommitdiff
path: root/sw/source/core
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/core
parent0e31c12f4c1cb53e1d68d1129b3b42508605846f (diff)
use uno::Reference::set method instead of assignmen
Change-Id: I76671a74150791e1a74ece3d5bcf40fd6c727ac7
Diffstat (limited to 'sw/source/core')
-rw-r--r--sw/source/core/unocore/unochart.cxx6
-rw-r--r--sw/source/core/unocore/unocrsrhelper.cxx5
-rw-r--r--sw/source/core/unocore/unodraw.cxx6
-rw-r--r--sw/source/core/unocore/unofield.cxx3
4 files changed, 9 insertions, 11 deletions
diff --git a/sw/source/core/unocore/unochart.cxx b/sw/source/core/unocore/unochart.cxx
index 9c100c7a7c2f..f962e82300bc 100644
--- a/sw/source/core/unocore/unochart.cxx
+++ b/sw/source/core/unocore/unochart.cxx
@@ -142,7 +142,7 @@ void SwChartLockController_Helper::LockUnlockAllCharts( bool bLock )
uno::Reference < embed::XEmbeddedObject > xIP = pONd->GetOLEObj().GetOleRef();
if ( svt::EmbeddedObjectRef::TryRunningState( xIP ) )
{
- xRes = uno::Reference < frame::XModel >( xIP->getComponent(), uno::UNO_QUERY );
+ xRes.set( xIP->getComponent(), uno::UNO_QUERY );
if (xRes.is())
{
if (bLock)
@@ -2696,10 +2696,10 @@ void SwChartLabeledDataSequence::SetDataSequence(
rxDest = rxSource;
// start listening to new data-sequence
- xC = uno::Reference< lang::XComponent >( rxDest, uno::UNO_QUERY );
+ xC.set( rxDest, uno::UNO_QUERY );
if (xC.is())
xC->addEventListener( xEL );
- xMB = uno::Reference< util::XModifyBroadcaster >( rxDest, uno::UNO_QUERY );
+ xMB.set( rxDest, uno::UNO_QUERY );
if (xMB.is())
xMB->addModifyListener( xML );
}
diff --git a/sw/source/core/unocore/unocrsrhelper.cxx b/sw/source/core/unocore/unocrsrhelper.cxx
index da746b073ca0..9953b6c2066b 100644
--- a/sw/source/core/unocore/unocrsrhelper.cxx
+++ b/sw/source/core/unocore/unocrsrhelper.cxx
@@ -991,9 +991,8 @@ void InsertFile(SwUnoCrsr* pUnoCrsr, const OUString& rURL,
aArgs[1] <<= embed::ElementModes::READ;
try
{
- xReadStorage = uno::Reference< embed::XStorage >(
- ::comphelper::OStorageHelper::GetStorageFactory()->createInstanceWithArguments( aArgs ),
- uno::UNO_QUERY );
+ xReadStorage.set( ::comphelper::OStorageHelper::GetStorageFactory()->createInstanceWithArguments( aArgs ),
+ uno::UNO_QUERY );
}
catch( const io::IOException& rEx)
{
diff --git a/sw/source/core/unocore/unodraw.cxx b/sw/source/core/unocore/unodraw.cxx
index d957a74c288b..7e351a7f591f 100644
--- a/sw/source/core/unocore/unodraw.cxx
+++ b/sw/source/core/unocore/unodraw.cxx
@@ -364,7 +364,7 @@ uno::Reference< drawing::XShape > SwFmDrawPage::_CreateShape( SdrObject *pObj )
xPrSet = new SwXGroupShape( xCreate );
else
xPrSet = new SwXShape( xCreate );
- xRet = uno::Reference< drawing::XShape >(xPrSet, uno::UNO_QUERY);
+ xRet.set(xPrSet, uno::UNO_QUERY);
}
}
return xRet;
@@ -403,7 +403,7 @@ SwXShapesEnumeration::SwXShapesEnumeration(SwXDrawPage* const pDrawPage)
std::set<const SwFrameFormat*> aTextBoxes = SwTextBoxHelper::findTextBoxes(pDrawPage->GetDoc());
for(sal_Int32 nIdx = 0; nIdx < nCount; nIdx++)
{
- uno::Reference<drawing::XShape> xShape = uno::Reference<drawing::XShape>(pDrawPage->getByIndex(nIdx, &aTextBoxes), uno::UNO_QUERY);
+ uno::Reference<drawing::XShape> xShape(pDrawPage->getByIndex(nIdx, &aTextBoxes), uno::UNO_QUERY);
*pInserter++ = uno::makeAny(xShape);
}
}
@@ -806,7 +806,7 @@ uno::Reference< drawing::XShapeGroup > SwXDrawPage::group(const uno::Reference<
if(pContact)
{
uno::Reference< uno::XInterface > xInt = SwFmDrawPage::GetInterface( pContact->GetMaster() );
- xRet = uno::Reference< drawing::XShapeGroup >(xInt, uno::UNO_QUERY);
+ xRet.set(xInt, uno::UNO_QUERY);
}
pDoc->GetIDocumentUndoRedo().EndUndo( UNDO_END, NULL );
}
diff --git a/sw/source/core/unocore/unofield.cxx b/sw/source/core/unocore/unofield.cxx
index b7cf85fc4236..a9dde64b999a 100644
--- a/sw/source/core/unocore/unofield.cxx
+++ b/sw/source/core/unocore/unofield.cxx
@@ -857,8 +857,7 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException,
uno::Reference<text::XTextField> const xField =
SwXTextField::CreateXTextField(m_pImpl->m_pDoc, pField);
- pRetSeq[i] = uno::Reference<text::XDependentTextField>(xField,
- uno::UNO_QUERY);
+ pRetSeq[i].set(xField, uno::UNO_QUERY);
}
aRet <<= aRetSeq;
}