EqualUnoObjects Function/text/sbasic/shared/03104600.xhpSun Microsystems, Inc.EqualUnoObjects function
EqualUnoObjects Function
Returns True if the two specified Basic variables represent the same Uno object instance.
EqualUnoObjects(oObj1, oObj2)
oObj1, oObj2: the variables to be tested.BoolThe example below returns True because both oDoc and ThisComponent are references to the same object:Dim oDoc as ObjectoDoc = ThisComponentMsgBox EqualUnoObjects(oDoc, ThisComponent) ' TrueThe 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.PropertyValueDim Struct2 as VariantStruct1.Name = "John"Struct2 = Struct1MsgBox EqualUnoObjects(Struct1, Struct2) ' FalseStruct2.Name = "Judy"MsgBox Struct1.Name ' JohnMsgBox Struct2.Name ' Judy