diff options
author | Behrend Cornelius <bc@openoffice.org> | 2001-10-29 14:25:36 +0000 |
---|---|---|
committer | Behrend Cornelius <bc@openoffice.org> | 2001-10-29 14:25:36 +0000 |
commit | 0b7e8d6a6a65833f32b8c22ca43f346d31a06112 (patch) | |
tree | 2ac5f6e4f6d829516047c784578517698a75d66e /wizards/source/tools/Misc.xba | |
parent | b037d1c39c5ac8f59e18d637da49fb0755abd630 (diff) |
#93813# Sub 'ModifyPropertyValue' modified
Diffstat (limited to 'wizards/source/tools/Misc.xba')
-rw-r--r-- | wizards/source/tools/Misc.xba | 22 |
1 files changed, 5 insertions, 17 deletions
diff --git a/wizards/source/tools/Misc.xba b/wizards/source/tools/Misc.xba index e7b87f16bbab..ef7cf08a94ae 100644 --- a/wizards/source/tools/Misc.xba +++ b/wizards/source/tools/Misc.xba @@ -631,45 +631,33 @@ End Sub -Function ModifyPropertyValue(oContent() as Object, TargetProperties() as New com.sun.star.beans.PropertyValue ) +Function ModifyPropertyValue(oContent() as New com.sun.star.beans.PropertyValue, TargetProperties() as New com.sun.star.beans.PropertyValue) Dim MaxIndex as Integer Dim i as Integer Dim a as Integer -Dim bDoReplace as Boolean MaxIndex = Ubound(oContent()) bDoReplace = False - Dim oNewBuffer(MaxIndex) as New com.sun.star.beans.PropertyValue For i = 0 To MaxIndex - oNewBuffer(i).Name = oContent(i).Name a = GetPropertyValueIndex(oContent(i).Name, TargetProperties()) If a <> -1 Then If Vartype(TargetProperties(a).Value) <> 9 Then If TargetProperties(a).Value <> oContent(i).Value Then - oNewBuffer(i).Value = TargetProperties(a).Value + oContent(i).Value = TargetProperties(a).Value bDoReplace = True - Else - oNewBuffer(i).Value = oContent(i).Value End If Else - If Not equalUnoObjects(TargetProperties(a).Value, oContent(i).Value) Then - oNewBuffer(i).Value = TargetProperties(a).Value + If Not EqualUnoObjects(TargetProperties(a).Value, oContent(i).Value) Then + oContent(i).Value = TargetProperties(a).Value bDoReplace = True - Else - oNewBuffer(i).Value = oContent(i).Value End If End If - Else - oNewBuffer(i).Value = oContent(i).Value End If Next i - If bDoReplace Then - oContent() = oNewBuffer() - End If ModifyPropertyValue() = bDoReplace End Function -Function GetPropertyValueIndex(SearchName as String, TargetProperties() as New com.sun.star.beans.PropertyValue ) +Function GetPropertyValueIndex(SearchName as String, TargetProperties() as New com.sun.star.beans.PropertyValue ) as Integer Dim i as Integer For i = 0 To Ubound(TargetProperties()) If Searchname = TargetProperties(i).Name Then |