summaryrefslogtreecommitdiff
path: root/basctl
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-10-29 15:48:45 +0200
committerNoel Grandin <noel@peralex.com>2015-10-30 08:10:22 +0200
commit065c8b48a604b70140862d0d02deb584626d6994 (patch)
tree578c07b470b8ec9e5908d224c2fbf33cadda5adf /basctl
parentaddb63fa8ac9fa1a29a00e886e7ae177b604494c (diff)
use uno::Reference::set method instead of assignment
Change-Id: I58410209f32f988f258a588364e0b037c2790211
Diffstat (limited to 'basctl')
-rw-r--r--basctl/source/accessibility/accessibledialogcontrolshape.cxx2
-rw-r--r--basctl/source/basicide/moduldl2.cxx10
-rw-r--r--basctl/source/basicide/moduldlg.cxx2
-rw-r--r--basctl/source/dlged/dlgedobj.cxx4
-rw-r--r--basctl/source/dlged/propbrw.cxx4
5 files changed, 9 insertions, 13 deletions
diff --git a/basctl/source/accessibility/accessibledialogcontrolshape.cxx b/basctl/source/accessibility/accessibledialogcontrolshape.cxx
index 9e3955348db7..5c4c9968cf8e 100644
--- a/basctl/source/accessibility/accessibledialogcontrolshape.cxx
+++ b/basctl/source/accessibility/accessibledialogcontrolshape.cxx
@@ -58,7 +58,7 @@ AccessibleDialogControlShape::AccessibleDialogControlShape (DialogWindow* pDialo
m_pExternalLock = static_cast< VCLExternalSolarLock* >( getExternalLock() );
if ( m_pDlgEdObj )
- m_xControlModel = Reference< XPropertySet >( m_pDlgEdObj->GetUnoControlModel(), UNO_QUERY );
+ m_xControlModel.set( m_pDlgEdObj->GetUnoControlModel(), UNO_QUERY );
if ( m_xControlModel.is() )
m_xControlModel->addPropertyChangeListener( OUString(), static_cast< beans::XPropertyChangeListener* >( this ) );
diff --git a/basctl/source/basicide/moduldl2.cxx b/basctl/source/basicide/moduldl2.cxx
index 0c503a3c7877..7b4f0fb96c4c 100644
--- a/basctl/source/basicide/moduldl2.cxx
+++ b/basctl/source/basicide/moduldl2.cxx
@@ -805,15 +805,13 @@ void LibPage::InsertLib()
OUString aModURL( aModURLObj.GetMainURL( INetURLObject::NO_DECODE ) );
if ( xSFA->exists( aModURL ) )
{
- xModLibContImport = Reference< script::XLibraryContainer2 >(
- script::DocumentScriptLibraryContainer::createWithURL(xContext, aModURL), UNO_QUERY );
+ xModLibContImport.set( script::DocumentScriptLibraryContainer::createWithURL(xContext, aModURL), UNO_QUERY );
}
OUString aDlgURL( aDlgURLObj.GetMainURL( INetURLObject::NO_DECODE ) );
if ( xSFA->exists( aDlgURL ) )
{
- xDlgLibContImport = Reference< script::XLibraryContainer2 >(
- script::DocumentDialogLibraryContainer::createWithURL(xContext, aDlgURL), UNO_QUERY );
+ xDlgLibContImport.set( script::DocumentDialogLibraryContainer::createWithURL(xContext, aDlgURL), UNO_QUERY );
}
if ( xModLibContImport.is() || xDlgLibContImport.is() )
@@ -973,7 +971,7 @@ void LibPage::InsertLib()
OUString aModStorageURL( aModStorageURLObj.GetMainURL( INetURLObject::NO_DECODE ) );
// create library link
- xModLib = Reference< container::XNameContainer >( xModLibContainer->createLibraryLink( aLibName, aModStorageURL, true ), UNO_QUERY);
+ xModLib.set( xModLibContainer->createLibraryLink( aLibName, aModStorageURL, true ), UNO_QUERY);
}
else
{
@@ -1042,7 +1040,7 @@ void LibPage::InsertLib()
OUString aDlgStorageURL( aDlgStorageURLObj.GetMainURL( INetURLObject::NO_DECODE ) );
// create library link
- xDlgLib = Reference< container::XNameContainer >( xDlgLibContainer->createLibraryLink( aLibName, aDlgStorageURL, true ), UNO_QUERY);
+ xDlgLib.set( xDlgLibContainer->createLibraryLink( aLibName, aDlgStorageURL, true ), UNO_QUERY);
}
else
{
diff --git a/basctl/source/basicide/moduldlg.cxx b/basctl/source/basicide/moduldlg.cxx
index 939c84127ecd..2041ec2c4e17 100644
--- a/basctl/source/basicide/moduldlg.cxx
+++ b/basctl/source/basicide/moduldlg.cxx
@@ -286,7 +286,7 @@ void Shell::CopyDialogResources(
// create dialog model
Reference< XComponentContext > xContext = comphelper::getProcessComponentContext();
- Reference< container::XNameContainer > xDialogModel = Reference< container::XNameContainer >( xContext->getServiceManager()->createInstanceWithContext
+ Reference< container::XNameContainer > xDialogModel( xContext->getServiceManager()->createInstanceWithContext
( "com.sun.star.awt.UnoControlDialogModel", xContext ), UNO_QUERY );
Reference< io::XInputStream > xInput( io_xISP->createInputStream() );
::xmlscript::importDialogModel( xInput, xDialogModel, xContext, rSourceDoc.isDocument() ? rSourceDoc.getDocument() : Reference< frame::XModel >() );
diff --git a/basctl/source/dlged/dlgedobj.cxx b/basctl/source/dlged/dlgedobj.cxx
index 4304ab3f86af..c348536cd5b0 100644
--- a/basctl/source/dlged/dlgedobj.cxx
+++ b/basctl/source/dlged/dlgedobj.cxx
@@ -1522,7 +1522,7 @@ void DlgEdForm::UpdateGroups()
sal_uInt32 nSize = aChildList.size();
Sequence< Reference< awt::XControl > > aSeqControls( nSize );
for ( sal_uInt32 i = 0; i < nSize; ++i )
- aSeqControls.getArray()[i] = Reference< awt::XControl >( aChildList[i]->GetControl(), UNO_QUERY );
+ aSeqControls.getArray()[i].set( aChildList[i]->GetControl(), UNO_QUERY );
sal_Int32 nGroupCount = xTabModel->getGroupCount();
for ( sal_Int32 nGroup = 0; nGroup < nGroupCount; ++nGroup )
@@ -1550,7 +1550,7 @@ void DlgEdForm::UpdateGroups()
if ( xCtrlModel.get() == pModels[nModel].get() )
{
// get the control peer and insert into the list of peers
- aSeqPeers.getArray()[ nModel ] = Reference< awt::XWindow >( xCtrl->getPeer(), UNO_QUERY );
+ aSeqPeers.getArray()[ nModel ].set( xCtrl->getPeer(), UNO_QUERY );
break;
}
}
diff --git a/basctl/source/dlged/propbrw.cxx b/basctl/source/dlged/propbrw.cxx
index b121294dfdf3..544fbdec4b1b 100644
--- a/basctl/source/dlged/propbrw.cxx
+++ b/basctl/source/dlged/propbrw.cxx
@@ -131,9 +131,7 @@ void PropBrw::ImplReCreateController()
// create a property browser controller
Reference< XMultiComponentFactory > xFactory( xInspectorContext->getServiceManager(), UNO_QUERY_THROW );
static const char s_sControllerServiceName[] = "com.sun.star.awt.PropertyBrowserController";
- m_xBrowserController = Reference< XPropertySet >(
- xFactory->createInstanceWithContext( s_sControllerServiceName, xInspectorContext ), UNO_QUERY
- );
+ m_xBrowserController.set( xFactory->createInstanceWithContext( s_sControllerServiceName, xInspectorContext ), UNO_QUERY );
if ( !m_xBrowserController.is() )
{
ShowServiceNotAvailableError( GetParent(), s_sControllerServiceName, true );