summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-11-05 12:55:32 +0200
committerNoel Grandin <noel@peralex.com>2015-11-05 13:32:16 +0200
commit281296330735158d6265e0b146b5d5301f6e610e (patch)
treeee8235f54b59dbec8d13f12b0bafa62e61ab9ad1 /vcl
parent75da22e3ce80f8dcdeef0488b22c4dc522c2ec29 (diff)
use uno::Reference::set method instead of assignment
Change-Id: I31a69a997098eb1807361b8049c3312a4f287d75
Diffstat (limited to 'vcl')
-rw-r--r--vcl/osx/DragSource.cxx4
-rw-r--r--vcl/osx/DropTarget.cxx4
-rw-r--r--vcl/osx/a11ycomponentwrapper.mm2
-rw-r--r--vcl/osx/a11ywrapper.mm24
-rw-r--r--vcl/osx/service_entry.cxx2
-rw-r--r--vcl/source/filter/FilterConfigItem.cxx2
-rw-r--r--vcl/source/gdi/print.cxx2
-rw-r--r--vcl/source/opengl/OpenGLHelper.cxx2
-rw-r--r--vcl/unx/gtk/gdi/salprn-gtk.cxx14
-rw-r--r--vcl/unx/gtk/window/gtksalframe.cxx2
-rw-r--r--vcl/workben/mtfdemo.cxx3
-rw-r--r--vcl/workben/vcldemo.cxx3
12 files changed, 31 insertions, 33 deletions
diff --git a/vcl/osx/DragSource.cxx b/vcl/osx/DragSource.cxx
index d2ce6d103975..bc3ee9700284 100644
--- a/vcl/osx/DragSource.cxx
+++ b/vcl/osx/DragSource.cxx
@@ -123,7 +123,7 @@ Sequence<OUString> dragSource_getSupportedServiceNames()
bDropSuccess );
mDragSource->mXDragSrcListener->dragDropEnd(dsde);
- mDragSource->mXDragSrcListener = uno::Reference<XDragSourceListener>();
+ mDragSource->mXDragSrcListener.clear();
}
-(void)draggedImage:(NSImage *)draggedImage movedTo:(NSPoint)screenPoint
@@ -276,7 +276,7 @@ void SAL_CALL DragSource::startDrag(const DragGestureEvent& trigger,
[dragImage release];
- g_XTransferable = uno::Reference<XTransferable>();
+ g_XTransferable.clear();
g_DragSourceView = nil;
// reset drop success flags
diff --git a/vcl/osx/DropTarget.cxx b/vcl/osx/DropTarget.cxx
index 3c836eea31d5..bd7467db64cf 100644
--- a/vcl/osx/DropTarget.cxx
+++ b/vcl/osx/DropTarget.cxx
@@ -338,7 +338,7 @@ void DropTarget::concludeDragOperation(id /*sender*/)
{
mDragSourceSupportedActions = DNDConstants::ACTION_NONE;
mSelectedDropAction = DNDConstants::ACTION_NONE;
- mXCurrentDragClipboard = uno::Reference<XClipboard>();
+ mXCurrentDragClipboard.clear();
[[NSCursor arrowCursor] set];
}
@@ -438,7 +438,7 @@ void SAL_CALL DropTarget::dropComplete(sal_Bool success) throw (RuntimeException
{
// Reset the internal transferable used as shortcut in case this is
// an internal D&D operation
- DragSource::g_XTransferable = uno::Reference<XTransferable>();
+ DragSource::g_XTransferable.clear();
DragSource::g_DropSuccessSet = true;
DragSource::g_DropSuccess = success;
}
diff --git a/vcl/osx/a11ycomponentwrapper.mm b/vcl/osx/a11ycomponentwrapper.mm
index 5b61c1257ca7..d7d0327b7b8a 100644
--- a/vcl/osx/a11ycomponentwrapper.mm
+++ b/vcl/osx/a11ycomponentwrapper.mm
@@ -85,7 +85,7 @@ using namespace ::com::sun::star::uno;
if ( rxParent.is() ) {
Reference < XAccessibleContext > rxContext = rxParent->getAccessibleContext();
if ( rxContext.is() && rxContext -> getAccessibleRole() == AccessibleRole::PANEL ) {
- Reference < XAccessibleComponent > rxComponent = Reference < XAccessibleComponent > ( rxParent -> getAccessibleContext(), UNO_QUERY );
+ Reference < XAccessibleComponent > rxComponent( rxParent -> getAccessibleContext(), UNO_QUERY );
if ( rxComponent.is() ) {
rxComponent -> grabFocus();
}
diff --git a/vcl/osx/a11ywrapper.mm b/vcl/osx/a11ywrapper.mm
index a90f917f3813..cd6a28b3d041 100644
--- a/vcl/osx/a11ywrapper.mm
+++ b/vcl/osx/a11ywrapper.mm
@@ -83,27 +83,27 @@ static std::ostream &operator<<(std::ostream &s, NSObject *obj) {
// Querying all supported interfaces
try {
// XAccessibleComponent
- mpReferenceWrapper -> rAccessibleComponent = Reference < XAccessibleComponent > ( rxAccessibleContext, UNO_QUERY );
+ mpReferenceWrapper->rAccessibleComponent.set( rxAccessibleContext, UNO_QUERY );
// XAccessibleExtendedComponent
- mpReferenceWrapper -> rAccessibleExtendedComponent = Reference < XAccessibleExtendedComponent > ( rxAccessibleContext, UNO_QUERY );
+ mpReferenceWrapper->rAccessibleExtendedComponent.set( rxAccessibleContext, UNO_QUERY );
// XAccessibleSelection
- mpReferenceWrapper -> rAccessibleSelection = Reference< XAccessibleSelection > ( rxAccessibleContext, UNO_QUERY );
+ mpReferenceWrapper->rAccessibleSelection.set( rxAccessibleContext, UNO_QUERY );
// XAccessibleTable
- mpReferenceWrapper -> rAccessibleTable = Reference < XAccessibleTable > ( rxAccessibleContext, UNO_QUERY );
+ mpReferenceWrapper->rAccessibleTable.set( rxAccessibleContext, UNO_QUERY );
// XAccessibleText
- mpReferenceWrapper -> rAccessibleText = Reference < XAccessibleText > ( rxAccessibleContext, UNO_QUERY );
+ mpReferenceWrapper->rAccessibleText.set( rxAccessibleContext, UNO_QUERY );
// XAccessibleEditableText
- mpReferenceWrapper -> rAccessibleEditableText = Reference < XAccessibleEditableText > ( rxAccessibleContext, UNO_QUERY );
+ mpReferenceWrapper->rAccessibleEditableText.set( rxAccessibleContext, UNO_QUERY );
// XAccessibleValue
- mpReferenceWrapper -> rAccessibleValue = Reference < XAccessibleValue > ( rxAccessibleContext, UNO_QUERY );
+ mpReferenceWrapper->rAccessibleValue.set( rxAccessibleContext, UNO_QUERY );
// XAccessibleAction
- mpReferenceWrapper -> rAccessibleAction = Reference < XAccessibleAction > ( rxAccessibleContext, UNO_QUERY );
+ mpReferenceWrapper->rAccessibleAction.set( rxAccessibleContext, UNO_QUERY );
// XAccessibleTextAttributes
- mpReferenceWrapper -> rAccessibleTextAttributes = Reference < XAccessibleTextAttributes > ( rxAccessibleContext, UNO_QUERY );
+ mpReferenceWrapper->rAccessibleTextAttributes.set( rxAccessibleContext, UNO_QUERY );
// XAccessibleMultiLineText
- mpReferenceWrapper -> rAccessibleMultiLineText = Reference < XAccessibleMultiLineText > ( rxAccessibleContext, UNO_QUERY );
+ mpReferenceWrapper->rAccessibleMultiLineText.set( rxAccessibleContext, UNO_QUERY );
// XAccessibleTextMarkup
- mpReferenceWrapper -> rAccessibleTextMarkup = Reference < XAccessibleTextMarkup > ( rxAccessibleContext, UNO_QUERY );
+ mpReferenceWrapper->rAccessibleTextMarkup.set( rxAccessibleContext, UNO_QUERY );
// XAccessibleEventBroadcaster
#if 0
/* #i102033# NSAccessibility does not seemt to know an equivalent for transient children.
@@ -313,7 +313,7 @@ static std::ostream &operator<<(std::ostream &s, NSObject *obj) {
AccessibleRelation relationMemberOf = rxAccessibleRelationSet -> getRelationByType ( AccessibleRelationType::MEMBER_OF );
if ( relationMemberOf.RelationType == AccessibleRelationType::MEMBER_OF && relationMemberOf.TargetSet.hasElements() ) {
for ( int index = 0; index < relationMemberOf.TargetSet.getLength(); index++ ) {
- Reference < XAccessible > rMateAccessible = Reference < XAccessible > ( relationMemberOf.TargetSet[index], UNO_QUERY );
+ Reference < XAccessible > rMateAccessible( relationMemberOf.TargetSet[index], UNO_QUERY );
if ( rMateAccessible.is() ) {
Reference< XAccessibleContext > rMateAccessibleContext( rMateAccessible -> getAccessibleContext() );
if ( rMateAccessibleContext.is() ) {
diff --git a/vcl/osx/service_entry.cxx b/vcl/osx/service_entry.cxx
index a8ac53c58e8e..3679d9726459 100644
--- a/vcl/osx/service_entry.cxx
+++ b/vcl/osx/service_entry.cxx
@@ -42,7 +42,7 @@ uno::Reference< XInterface > AquaSalInstance::CreateClipboard( const Sequence< A
SalData* pSalData = GetSalData();
if( ! pSalData->mxClipboard.is() )
- pSalData->mxClipboard = uno::Reference<XInterface>(static_cast< XClipboard* >(new AquaClipboard()), UNO_QUERY);
+ pSalData->mxClipboard.set(static_cast< XClipboard* >(new AquaClipboard()), UNO_QUERY);
return pSalData->mxClipboard;
}
diff --git a/vcl/source/filter/FilterConfigItem.cxx b/vcl/source/filter/FilterConfigItem.cxx
index 34ad8af03eda..a70a0c46313a 100644
--- a/vcl/source/filter/FilterConfigItem.cxx
+++ b/vcl/source/filter/FilterConfigItem.cxx
@@ -137,7 +137,7 @@ void FilterConfigItem::ImpInitTree( const OUString& rSubTree )
"com.sun.star.configuration.ConfigurationUpdateAccess",
aArguments );
if ( xUpdatableView.is() )
- xPropSet = Reference< XPropertySet >( xUpdatableView, UNO_QUERY );
+ xPropSet.set( xUpdatableView, UNO_QUERY );
}
catch ( ::com::sun::star::uno::Exception& )
{
diff --git a/vcl/source/gdi/print.cxx b/vcl/source/gdi/print.cxx
index 88d118ca04ec..6b02440f026e 100644
--- a/vcl/source/gdi/print.cxx
+++ b/vcl/source/gdi/print.cxx
@@ -157,7 +157,7 @@ bool PrinterOptions::ReadFromConfig( bool i_bFile )
else
aVal.Value <<= OUString( "/org.openoffice.Office.Common/Print/Option/Printer" );
aArgs.getArray()[0] <<= aVal;
- xConfigAccess = Reference< XNameAccess >(
+ xConfigAccess.set(
xConfigProvider->createInstanceWithArguments(
"com.sun.star.configuration.ConfigurationAccess", aArgs ),
UNO_QUERY );
diff --git a/vcl/source/opengl/OpenGLHelper.cxx b/vcl/source/opengl/OpenGLHelper.cxx
index ae42776b2ac3..a051245d411f 100644
--- a/vcl/source/opengl/OpenGLHelper.cxx
+++ b/vcl/source/opengl/OpenGLHelper.cxx
@@ -837,7 +837,7 @@ void OpenGLWatchdogThread::start()
{
assert (gxWatchdog == NULL);
gpWatchdogExit = osl_createCondition();
- gxWatchdog = rtl::Reference<OpenGLWatchdogThread>(new OpenGLWatchdogThread());
+ gxWatchdog.set(new OpenGLWatchdogThread());
gxWatchdog->launch();
}
diff --git a/vcl/unx/gtk/gdi/salprn-gtk.cxx b/vcl/unx/gtk/gdi/salprn-gtk.cxx
index cf20b2c430eb..ce4088bf971f 100644
--- a/vcl/unx/gtk/gdi/salprn-gtk.cxx
+++ b/vcl/unx/gtk/gdi/salprn-gtk.cxx
@@ -895,7 +895,7 @@ void GtkPrintDialog::ExportAsPDF(const OUString &rFileURL, GtkPrintSettings *pSe
uno::Reference < XDesktop2 > xDesktop = Desktop::create( ::comphelper::getProcessComponentContext() );
uno::Reference < XFrame > xFrame(xDesktop->getActiveFrame());
if (!xFrame.is())
- xFrame = uno::Reference < XFrame >(xDesktop, UNO_QUERY);
+ xFrame.set(xDesktop, UNO_QUERY);
uno::Reference < XFilter > xFilter(
::comphelper::getProcessServiceFactory()->createInstance("com.sun.star.document.PDFFilter"),
@@ -908,7 +908,7 @@ void GtkPrintDialog::ExportAsPDF(const OUString &rFileURL, GtkPrintSettings *pSe
if (xFrame.is())
xController = xFrame->getController();
if (xController.is())
- xDoc = uno::Reference< XComponent >(xController->getModel(), UNO_QUERY);
+ xDoc.set(xController->getModel(), UNO_QUERY);
SvFileStream aStream(rFileURL, STREAM_READWRITE | StreamMode::SHARE_DENYWRITE | StreamMode::TRUNC);
uno::Reference< XOutputStream > xOStm(new utl::OOutputStreamWrapper(aStream));
@@ -954,15 +954,15 @@ void GtkPrintDialog::ExportAsPDF(const OUString &rFileURL, GtkPrintSettings *pSe
uno::Reference< XNamed > xName;
if (xController.is())
- xSpreadsheetView = uno::Reference< XSpreadsheetView >(xController, UNO_QUERY);
+ xSpreadsheetView.set(xController, UNO_QUERY);
if (xSpreadsheetView.is())
- xSheet = uno::Reference< XSpreadsheet>(xSpreadsheetView->getActiveSheet());
+ xSheet.set(xSpreadsheetView->getActiveSheet());
if (xSheet.is())
- xName = uno::Reference < XNamed >(xSheet, UNO_QUERY);
+ xName.set(xSheet, UNO_QUERY);
if (xName.is())
- xSheetDoc = uno::Reference< XSpreadsheetDocument >(xController->getModel(), UNO_QUERY);
+ xSheetDoc.set(xController->getModel(), UNO_QUERY);
if (xSheetDoc.is())
- xSheets = uno::Reference< XIndexAccess >(xSheetDoc->getSheets(), UNO_QUERY);
+ xSheets.set(xSheetDoc->getSheets(), UNO_QUERY);
if (xSheets.is())
{
const OUString &rName = xName->getName();
diff --git a/vcl/unx/gtk/window/gtksalframe.cxx b/vcl/unx/gtk/window/gtksalframe.cxx
index 929fa5e54db9..8fe61521902a 100644
--- a/vcl/unx/gtk/window/gtksalframe.cxx
+++ b/vcl/unx/gtk/window/gtksalframe.cxx
@@ -592,7 +592,7 @@ static void activate_uno(GSimpleAction *action, GVariant*, gpointer)
uno::Reference < css::frame::XFrame > xFrame(xDesktop->getActiveFrame());
if (!xFrame.is())
- xFrame = uno::Reference < css::frame::XFrame >(xDesktop, uno::UNO_QUERY);
+ xFrame.set(xDesktop, uno::UNO_QUERY);
if (!xFrame.is())
return;
diff --git a/vcl/workben/mtfdemo.cxx b/vcl/workben/mtfdemo.cxx
index 404552750c35..3488a1e32b10 100644
--- a/vcl/workben/mtfdemo.cxx
+++ b/vcl/workben/mtfdemo.cxx
@@ -130,8 +130,7 @@ protected:
uno::Reference<uno::XComponentContext> xComponentContext
= ::cppu::defaultBootstrap_InitialComponentContext();
- xMSF = uno::Reference<lang::XMultiServiceFactory>
- (xComponentContext->getServiceManager(), uno::UNO_QUERY);
+ xMSF.set(xComponentContext->getServiceManager(), uno::UNO_QUERY);
if(!xMSF.is())
Application::Abort("Bootstrap failure - no service manager");
diff --git a/vcl/workben/vcldemo.cxx b/vcl/workben/vcldemo.cxx
index 1e7c5cca0b91..0e98530e8d77 100644
--- a/vcl/workben/vcldemo.cxx
+++ b/vcl/workben/vcldemo.cxx
@@ -1864,8 +1864,7 @@ protected:
{
uno::Reference<uno::XComponentContext> xComponentContext
= ::cppu::defaultBootstrap_InitialComponentContext();
- xMSF = uno::Reference<lang::XMultiServiceFactory>
- (xComponentContext->getServiceManager(), uno::UNO_QUERY);
+ xMSF.set(xComponentContext->getServiceManager(), uno::UNO_QUERY);
if(!xMSF.is())
Application::Abort("Bootstrap failure - no service manager");