aoE6z‖

zeBDF‖EqualUnoObjects Function

Gc4cj‖Returns True if the two specified Basic variables represent the same Uno object instance.

FVEx2‖Syntax:

EqualUnoObjects(oObj1, oObj2)

bBBqF‖Return type:

NqNdq‖Bool

WADQ4‖Parameters:

Name

Type

Description

83dV3‖oObj1

Object

FLvAu‖the first Basic Uno object.

2ZKYY‖oObj2

Object

xLY9z‖the second Basic Uno object.


EFSA4‖Example:

NvGLb‖The example below returns True because both oDoc and ThisComponent are references to the same object:


    Dim oDoc as Object
    oDoc = ThisComponent
    MsgBox EqualUnoObjects(oDoc, ThisComponent) ' True
  

5QGLx‖The example below returns False because the assignment creates a copy of the original object. Hence Struct1 and Struct2 refer to different object instances.


    Dim Struct1 as new com.sun.star.beans.PropertyValue
    Dim Struct2 as Variant
    Struct1.Name = "John"
    Struct2 = Struct1
    MsgBox EqualUnoObjects(Struct1, Struct2) ' False
    Struct2.Name = "Judy"
    MsgBox Struct1.Name ' John
    MsgBox Struct2.Name ' Judy