summaryrefslogtreecommitdiff
path: root/qadevOOo/tests/basic/ifc/util
diff options
context:
space:
mode:
Diffstat (limited to 'qadevOOo/tests/basic/ifc/util')
-rw-r--r--qadevOOo/tests/basic/ifc/util/PathSettings/script.xlb5
-rw-r--r--qadevOOo/tests/basic/ifc/util/PathSettings/util_PathSettings.xba151
-rw-r--r--qadevOOo/tests/basic/ifc/util/SearchDescriptor/script.xlb5
-rw-r--r--qadevOOo/tests/basic/ifc/util/SearchDescriptor/util_SearchDescriptor.xba74
-rw-r--r--qadevOOo/tests/basic/ifc/util/XCancellable/script.xlb5
-rw-r--r--qadevOOo/tests/basic/ifc/util/XCancellable/util_XCancellable.xba58
-rw-r--r--qadevOOo/tests/basic/ifc/util/XCloneable/script.xlb5
-rw-r--r--qadevOOo/tests/basic/ifc/util/XCloneable/util_XCloneable.xba66
-rw-r--r--qadevOOo/tests/basic/ifc/util/XFlushable/script.xlb5
-rw-r--r--qadevOOo/tests/basic/ifc/util/XFlushable/util_XFlushable.xba98
-rw-r--r--qadevOOo/tests/basic/ifc/util/XMergeable/script.xlb5
-rw-r--r--qadevOOo/tests/basic/ifc/util/XMergeable/util_XMergeable.xba71
-rw-r--r--qadevOOo/tests/basic/ifc/util/XModeSelector/script.xlb5
-rw-r--r--qadevOOo/tests/basic/ifc/util/XModeSelector/util_XModeSelector.xba84
-rw-r--r--qadevOOo/tests/basic/ifc/util/XModifyBroadcaster/script.xlb5
-rw-r--r--qadevOOo/tests/basic/ifc/util/XModifyBroadcaster/util_XModifyBroadcaster.xba82
-rw-r--r--qadevOOo/tests/basic/ifc/util/XNumberFormatsSupplier/script.xlb5
-rw-r--r--qadevOOo/tests/basic/ifc/util/XNumberFormatsSupplier/util_XNumberFormatsSupplier.xba71
-rw-r--r--qadevOOo/tests/basic/ifc/util/XRefreshable/script.xlb5
-rw-r--r--qadevOOo/tests/basic/ifc/util/XRefreshable/util_XRefreshable.xba106
-rw-r--r--qadevOOo/tests/basic/ifc/util/XReplaceDescriptor/script.xlb5
-rw-r--r--qadevOOo/tests/basic/ifc/util/XReplaceDescriptor/util_XReplaceDescriptor.xba68
-rw-r--r--qadevOOo/tests/basic/ifc/util/XReplaceable/script.xlb5
-rw-r--r--qadevOOo/tests/basic/ifc/util/XReplaceable/util_XReplaceable.xba93
-rw-r--r--qadevOOo/tests/basic/ifc/util/XSearchDescriptor/script.xlb5
-rw-r--r--qadevOOo/tests/basic/ifc/util/XSearchDescriptor/util_XSearchDescriptor.xba70
-rw-r--r--qadevOOo/tests/basic/ifc/util/XSearchable/script.xlb5
-rw-r--r--qadevOOo/tests/basic/ifc/util/XSearchable/util_XSearchable.xba111
-rw-r--r--qadevOOo/tests/basic/ifc/util/XSortable/script.xlb5
-rw-r--r--qadevOOo/tests/basic/ifc/util/XSortable/util_XSortable.xba80
-rw-r--r--qadevOOo/tests/basic/ifc/util/XStringEscape/script.xlb5
-rw-r--r--qadevOOo/tests/basic/ifc/util/XStringEscape/util_XStringEscape.xba71
-rw-r--r--qadevOOo/tests/basic/ifc/util/XTextSearch/script.xlb5
-rw-r--r--qadevOOo/tests/basic/ifc/util/XTextSearch/util_XTextSearch.xba104
34 files changed, 1543 insertions, 0 deletions
diff --git a/qadevOOo/tests/basic/ifc/util/PathSettings/script.xlb b/qadevOOo/tests/basic/ifc/util/PathSettings/script.xlb
new file mode 100644
index 000000000000..07a37da2ed37
--- /dev/null
+++ b/qadevOOo/tests/basic/ifc/util/PathSettings/script.xlb
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "library.dtd">
+<library:library xmlns:library="http://openoffice.org/2000/library" library:name="util_PathSettings" library:readonly="false" library:passwordprotected="false">
+"<library:element library:name="util_PathSettings"/>
+"</library:library>
diff --git a/qadevOOo/tests/basic/ifc/util/PathSettings/util_PathSettings.xba b/qadevOOo/tests/basic/ifc/util/PathSettings/util_PathSettings.xba
new file mode 100644
index 000000000000..bd2c5cfe2a45
--- /dev/null
+++ b/qadevOOo/tests/basic/ifc/util/PathSettings/util_PathSettings.xba
@@ -0,0 +1,151 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
+<script:module xmlns:script="http://openoffice.org/2000/script" script:name="util_PathSettings" script:language="StarBasic">
+
+
+'*************************************************************************
+'
+' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+'
+' Copyright 2000, 2010 Oracle and/or its affiliates.
+'
+' OpenOffice.org - a multi-platform office productivity suite
+'
+' This file is part of OpenOffice.org.
+'
+' OpenOffice.org is free software: you can redistribute it and/or modify
+' it under the terms of the GNU Lesser General Public License version 3
+' only, as published by the Free Software Foundation.
+'
+' OpenOffice.org is distributed in the hope that it will be useful,
+' but WITHOUT ANY WARRANTY; without even the implied warranty of
+' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' GNU Lesser General Public License version 3 for more details
+' (a copy is included in the LICENSE file that accompanied this code).
+'
+' You should have received a copy of the GNU Lesser General Public License
+' version 3 along with OpenOffice.org. If not, see
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'*************************************************************************
+'*************************************************************************
+
+
+
+' Be sure that all variables are dimensioned:
+option explicit
+
+
+
+Sub RunTest()
+
+'*************************************************************************
+' SERVICE:
+' com.sun.star.util.PathSettings
+'*************************************************************************
+On Error Goto ErrHndl
+
+ Dim values(1) As String
+ values(1) = oObj.Addin
+ values(0) = values(1) + "New"
+ PropertyTester.TestProperty("Addin", values())
+
+ values(1) = oObj.AutoCorrect
+ values(0) = values(1) + "New"
+ PropertyTester.TestProperty("AutoCorrect", values())
+
+ values(1) = oObj.AutoText
+ values(0) = values(1) + "New"
+ PropertyTester.TestProperty("AutoText", values())
+
+ values(1) = oObj.Backup
+ values(0) = values(1) + "New"
+ PropertyTester.TestProperty("Backup", values())
+
+ values(1) = oObj.Basic
+ values(0) = values(1) + "New"
+ PropertyTester.TestProperty("Basic", values())
+
+ values(1) = oObj.Bitmap
+ values(0) = values(1) + "New"
+ PropertyTester.TestProperty("Bitmap", values())
+
+ values(1) = oObj.Config
+ values(0) = values(1) + "New"
+ PropertyTester.TestProperty("Config", values())
+
+ values(1) = oObj.Dictionary
+ values(0) = values(1) + "New"
+ PropertyTester.TestProperty("Dictionary", values())
+
+ values(1) = oObj.Favorite
+ values(0) = values(1) + "New"
+ PropertyTester.TestProperty("Favorite", values())
+
+ values(1) = oObj.Filter
+ values(0) = values(1) + "New"
+ PropertyTester.TestProperty("Filter", values())
+
+ values(1) = oObj.Gallery
+ values(0) = values(1) + "New"
+ PropertyTester.TestProperty("Gallery", values())
+
+ values(1) = oObj.Graphic
+ values(0) = values(1) + "New"
+ PropertyTester.TestProperty("Graphic", values())
+
+ values(1) = oObj.Help
+ values(0) = values(1) + "New"
+ PropertyTester.TestProperty("Help", values())
+
+ values(1) = oObj.Linguistic
+ values(0) = values(1) + "New"
+ PropertyTester.TestProperty("Linguistic", values())
+
+ values(1) = oObj.Module
+ values(0) = values(1) + "New"
+ PropertyTester.TestProperty("Module", values())
+
+ values(1) = oObj.Palette
+ values(0) = values(1) + "New"
+ PropertyTester.TestProperty("Palette", values())
+
+ values(1) = oObj.Plugin
+ values(0) = values(1) + "New"
+ PropertyTester.TestProperty("Plugin", values())
+
+ values(1) = oObj.Storage
+ values(0) = values(1) + "New"
+ PropertyTester.TestProperty("Storage", values())
+
+ values(1) = oObj.Temp
+ values(0) = values(1) + "New"
+ PropertyTester.TestProperty("Temp", values())
+
+ values(1) = oObj.Template
+ values(0) = values(1) + "New"
+ PropertyTester.TestProperty("Template", values())
+
+ values(1) = oObj.UIConfig
+ values(0) = values(1) + "New"
+ PropertyTester.TestProperty("UIConfig", values())
+
+ values(1) = oObj.UserConfig
+ values(0) = values(1) + "New"
+ PropertyTester.TestProperty("UserConfig", values())
+
+ values(1) = oObj.UserDictionary
+ values(0) = values(1) + "New"
+ PropertyTester.TestProperty("UserDictionary", values())
+
+ values(1) = oObj.Work
+ values(0) = values(1) + "New"
+ PropertyTester.TestProperty("Work", values())
+
+Exit Sub
+ErrHndl:
+ Test.Exception()
+ resume next
+End Sub
+</script:module>
diff --git a/qadevOOo/tests/basic/ifc/util/SearchDescriptor/script.xlb b/qadevOOo/tests/basic/ifc/util/SearchDescriptor/script.xlb
new file mode 100644
index 000000000000..dd9c79134331
--- /dev/null
+++ b/qadevOOo/tests/basic/ifc/util/SearchDescriptor/script.xlb
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "library.dtd">
+<library:library xmlns:library="http://openoffice.org/2000/library" library:name="util_SearchDescriptor" library:readonly="false" library:passwordprotected="false">
+"<library:element library:name="util_SearchDescriptor"/>
+"</library:library>
diff --git a/qadevOOo/tests/basic/ifc/util/SearchDescriptor/util_SearchDescriptor.xba b/qadevOOo/tests/basic/ifc/util/SearchDescriptor/util_SearchDescriptor.xba
new file mode 100644
index 000000000000..1a1a355275bd
--- /dev/null
+++ b/qadevOOo/tests/basic/ifc/util/SearchDescriptor/util_SearchDescriptor.xba
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
+<script:module xmlns:script="http://openoffice.org/2000/script" script:name="util_SearchDescriptor" script:language="StarBasic">
+
+
+'*************************************************************************
+'
+' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+'
+' Copyright 2000, 2010 Oracle and/or its affiliates.
+'
+' OpenOffice.org - a multi-platform office productivity suite
+'
+' This file is part of OpenOffice.org.
+'
+' OpenOffice.org is free software: you can redistribute it and/or modify
+' it under the terms of the GNU Lesser General Public License version 3
+' only, as published by the Free Software Foundation.
+'
+' OpenOffice.org is distributed in the hope that it will be useful,
+' but WITHOUT ANY WARRANTY; without even the implied warranty of
+' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' GNU Lesser General Public License version 3 for more details
+' (a copy is included in the LICENSE file that accompanied this code).
+'
+' You should have received a copy of the GNU Lesser General Public License
+' version 3 along with OpenOffice.org. If not, see
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'*************************************************************************
+'*************************************************************************
+
+
+
+' Be sure that all variables are dimensioned:
+option explicit
+
+
+
+Sub RunTest()
+
+'*************************************************************************
+' SERVICE:
+' com.sun.star.util.SearchDescriptor
+'*************************************************************************
+On Error Goto ErrHndl
+
+ PropertyTester.TestProperty("SearchBackwards")
+
+ PropertyTester.TestProperty("SearchCaseSensitive")
+
+ PropertyTester.TestProperty("SearchWords")
+
+ PropertyTester.TestProperty("SearchRegularExpression")
+
+ PropertyTester.TestProperty("SearchStyles")
+
+ PropertyTester.TestProperty("SearchSimilarity")
+
+ PropertyTester.TestProperty("SearchSimilarityRelax")
+
+ PropertyTester.TestProperty("SearchSimilarityRemove")
+
+ PropertyTester.TestProperty("SearchSimilarityAdd")
+
+ PropertyTester.TestProperty("SearchSimilarityExchange")
+
+Exit Sub
+ErrHndl:
+ Test.Exception()
+ resume next
+End Sub
+</script:module>
diff --git a/qadevOOo/tests/basic/ifc/util/XCancellable/script.xlb b/qadevOOo/tests/basic/ifc/util/XCancellable/script.xlb
new file mode 100644
index 000000000000..a65518a13481
--- /dev/null
+++ b/qadevOOo/tests/basic/ifc/util/XCancellable/script.xlb
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "library.dtd">
+<library:library xmlns:library="http://openoffice.org/2000/library" library:name="util_XCancellable" library:readonly="false" library:passwordprotected="false">
+"<library:element library:name="util_XCancellable"/>
+"</library:library>
diff --git a/qadevOOo/tests/basic/ifc/util/XCancellable/util_XCancellable.xba b/qadevOOo/tests/basic/ifc/util/XCancellable/util_XCancellable.xba
new file mode 100644
index 000000000000..0887a9b674c6
--- /dev/null
+++ b/qadevOOo/tests/basic/ifc/util/XCancellable/util_XCancellable.xba
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
+<script:module xmlns:script="http://openoffice.org/2000/script" script:name="util_XCancellable" script:language="StarBasic">
+
+
+'*************************************************************************
+'
+' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+'
+' Copyright 2000, 2010 Oracle and/or its affiliates.
+'
+' OpenOffice.org - a multi-platform office productivity suite
+'
+' This file is part of OpenOffice.org.
+'
+' OpenOffice.org is free software: you can redistribute it and/or modify
+' it under the terms of the GNU Lesser General Public License version 3
+' only, as published by the Free Software Foundation.
+'
+' OpenOffice.org is distributed in the hope that it will be useful,
+' but WITHOUT ANY WARRANTY; without even the implied warranty of
+' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' GNU Lesser General Public License version 3 for more details
+' (a copy is included in the LICENSE file that accompanied this code).
+'
+' You should have received a copy of the GNU Lesser General Public License
+' version 3 along with OpenOffice.org. If not, see
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'*************************************************************************
+'*************************************************************************
+
+
+
+
+
+Sub RunTest()
+
+'*************************************************************************
+' INTERFACE:
+' com.sun.star.util.XCancellable
+'*************************************************************************
+On Error Goto ErrHndl
+ Dim bOK As Boolean
+
+ Test.StartMethod("cancel()")
+ bOK = true
+ oObj.cancel()
+ Test.MethodTested("cancel()", bOK)
+
+Exit Sub
+ErrHndl:
+ Test.Exception()
+ bOK = false
+ resume next
+End Sub
+</script:module>
diff --git a/qadevOOo/tests/basic/ifc/util/XCloneable/script.xlb b/qadevOOo/tests/basic/ifc/util/XCloneable/script.xlb
new file mode 100644
index 000000000000..08e7c9519719
--- /dev/null
+++ b/qadevOOo/tests/basic/ifc/util/XCloneable/script.xlb
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "library.dtd">
+ <library:library xmlns:library="http://openoffice.org/2000/library" library:name="util_XCloneable" library:readonly="false" library:passwordprotected="false">
+ <library:element library:name="util_XCloneable"/>
+ </library:library>
diff --git a/qadevOOo/tests/basic/ifc/util/XCloneable/util_XCloneable.xba b/qadevOOo/tests/basic/ifc/util/XCloneable/util_XCloneable.xba
new file mode 100644
index 000000000000..0cdf04f59fa3
--- /dev/null
+++ b/qadevOOo/tests/basic/ifc/util/XCloneable/util_XCloneable.xba
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<script:module xmlns:script="http://openoffice.org/2000/script" script:name="util_XCloneable" script:language="StarBasic">
+
+'*************************************************************************
+'
+' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+'
+' Copyright 2000, 2010 Oracle and/or its affiliates.
+'
+' OpenOffice.org - a multi-platform office productivity suite
+'
+' This file is part of OpenOffice.org.
+'
+' OpenOffice.org is free software: you can redistribute it and/or modify
+' it under the terms of the GNU Lesser General Public License version 3
+' only, as published by the Free Software Foundation.
+'
+' OpenOffice.org is distributed in the hope that it will be useful,
+' but WITHOUT ANY WARRANTY; without even the implied warranty of
+' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' GNU Lesser General Public License version 3 for more details
+' (a copy is included in the LICENSE file that accompanied this code).
+'
+' You should have received a copy of the GNU Lesser General Public License
+' version 3 along with OpenOffice.org. If not, see
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'*************************************************************************
+'*************************************************************************
+
+'*************************************************************************
+' This Interface/Service test depends on the following GLOBAL variables,
+' which must be specified in the object creation:
+
+' NONE
+
+'*************************************************************************
+
+' Be sure that all variables are dimensioned:
+option explicit
+
+Sub RunTest()
+
+'*************************************************************************
+' INTERFACE:
+' com.sun.star.util.XCloneable
+'*************************************************************************
+On Error Goto ErrHndl
+ Dim bOK As Boolean
+ Dim oClone as Object
+
+'
+ Test.StartMethod("createClone()")
+ bOK = TRUE
+ oClone = oObj.createClone()
+ bOK = bOK AND hasUnoInterfaces(oClone, "com.sun.star.util.XCloneable")
+ Test.MethodTested("createClone()", bOK)
+
+Exit Sub
+ErrHndl:
+ Test.Exception()
+ bOK = false
+ resume next
+End Sub
+</script:module>
diff --git a/qadevOOo/tests/basic/ifc/util/XFlushable/script.xlb b/qadevOOo/tests/basic/ifc/util/XFlushable/script.xlb
new file mode 100644
index 000000000000..df08bd96abed
--- /dev/null
+++ b/qadevOOo/tests/basic/ifc/util/XFlushable/script.xlb
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "library.dtd">
+<library:library xmlns:library="http://openoffice.org/2000/library" library:name="util_XFlushable" library:readonly="false" library:passwordprotected="false">
+"<library:element library:name="util_XFlushable"/>
+"</library:library>
diff --git a/qadevOOo/tests/basic/ifc/util/XFlushable/util_XFlushable.xba b/qadevOOo/tests/basic/ifc/util/XFlushable/util_XFlushable.xba
new file mode 100644
index 000000000000..b57ea89b80fd
--- /dev/null
+++ b/qadevOOo/tests/basic/ifc/util/XFlushable/util_XFlushable.xba
@@ -0,0 +1,98 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
+<script:module xmlns:script="http://openoffice.org/2000/script" script:name="util_XFlushable" script:language="StarBasic">
+
+
+'*************************************************************************
+'
+' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+'
+' Copyright 2000, 2010 Oracle and/or its affiliates.
+'
+' OpenOffice.org - a multi-platform office productivity suite
+'
+' This file is part of OpenOffice.org.
+'
+' OpenOffice.org is free software: you can redistribute it and/or modify
+' it under the terms of the GNU Lesser General Public License version 3
+' only, as published by the Free Software Foundation.
+'
+' OpenOffice.org is distributed in the hope that it will be useful,
+' but WITHOUT ANY WARRANTY; without even the implied warranty of
+' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' GNU Lesser General Public License version 3 for more details
+' (a copy is included in the LICENSE file that accompanied this code).
+'
+' You should have received a copy of the GNU Lesser General Public License
+' version 3 along with OpenOffice.org. If not, see
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'*************************************************************************
+'*************************************************************************
+
+
+
+
+Dim iCB1_flushed As Integer
+Dim iCB2_flushed As Integer
+
+
+Sub RunTest()
+
+'*************************************************************************
+' INTERFACE:
+' com.sun.star.util.XFlushable
+'*************************************************************************
+On Error Goto ErrHndl
+ Dim bOK As Boolean
+
+ Dim oListener1 As Object
+ Dim oListener2 As Object
+
+ oListener1 = createUnoListener("CB1_", "com.sun.star.util.XFlushListener")
+ oListener2 = createUnoListener("CB2_", "com.sun.star.util.XFlushListener")
+
+ Test.StartMethod("addFlushListener()")
+ bOK = true
+ iCB1_flushed = 0 : iCB2_flushed = 0
+ Out.Log("Adding two listeners...")
+ oObj.addFlushListener(oListener1)
+ oObj.addFlushListener(oListener2)
+ oObj.flush()
+ bOK = bOK AND iCB1_flushed = 1 AND iCB2_flushed = 1
+ Test.MethodTested("addFlushListener()", bOK)
+
+ Test.StartMethod("flush()")
+ bOK = true
+ oObj.flush()
+ Test.MethodTested("flush()", bOK)
+
+ Test.StartMethod("removeFlushListener()")
+ bOK = true
+ iCB1_flushed = 0 : iCB2_flushed = 0
+ Out.Log("Removing first listener")
+ oObj.removeFlushListener(oListener1)
+ oObj.flush()
+ bOK = bOK AND iCB1_flushed = 0 AND iCB2_flushed = 1
+ Test.MethodTested("removeFlushListener()", bOK)
+
+ Out.Log("Removing second listener")
+ oObj.removeFlushListener(oListener2)
+
+Exit Sub
+ErrHndl:
+ Test.Exception()
+ bOK = false
+ resume next
+End Sub
+Sub CB1_flushed(oEvent As Object)
+ iCB1_flushed = iCB1_flushed + 1
+ Out.Log("CallBack function for the first listener was called.")
+End Sub
+
+Sub CB2_flushed(oEvent As Object)
+ iCB2_flushed = iCB2_flushed + 1
+ Out.Log("CallBack function for the second listener was called.")
+End Sub
+</script:module>
diff --git a/qadevOOo/tests/basic/ifc/util/XMergeable/script.xlb b/qadevOOo/tests/basic/ifc/util/XMergeable/script.xlb
new file mode 100644
index 000000000000..02a018fc1cec
--- /dev/null
+++ b/qadevOOo/tests/basic/ifc/util/XMergeable/script.xlb
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "library.dtd">
+<library:library xmlns:library="http://openoffice.org/2000/library" library:name="util_XMergeable" library:readonly="false" library:passwordprotected="false">
+"<library:element library:name="util_XMergeable"/>
+"</library:library>
diff --git a/qadevOOo/tests/basic/ifc/util/XMergeable/util_XMergeable.xba b/qadevOOo/tests/basic/ifc/util/XMergeable/util_XMergeable.xba
new file mode 100644
index 000000000000..40d8e356db8d
--- /dev/null
+++ b/qadevOOo/tests/basic/ifc/util/XMergeable/util_XMergeable.xba
@@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
+<script:module xmlns:script="http://openoffice.org/2000/script" script:name="util_XMergeable" script:language="StarBasic">
+
+
+'*************************************************************************
+'
+' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+'
+' Copyright 2000, 2010 Oracle and/or its affiliates.
+'
+' OpenOffice.org - a multi-platform office productivity suite
+'
+' This file is part of OpenOffice.org.
+'
+' OpenOffice.org is free software: you can redistribute it and/or modify
+' it under the terms of the GNU Lesser General Public License version 3
+' only, as published by the Free Software Foundation.
+'
+' OpenOffice.org is distributed in the hope that it will be useful,
+' but WITHOUT ANY WARRANTY; without even the implied warranty of
+' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' GNU Lesser General Public License version 3 for more details
+' (a copy is included in the LICENSE file that accompanied this code).
+'
+' You should have received a copy of the GNU Lesser General Public License
+' version 3 along with OpenOffice.org. If not, see
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'*************************************************************************
+'*************************************************************************
+
+
+
+' Be sure that all variables are dimensioned:
+option explicit
+
+
+
+Sub RunTest()
+
+'*************************************************************************
+' INTERFACE:
+' com.sun.star.util.XMergeable
+'*************************************************************************
+On Error Goto ErrHndl
+ Dim bOK As Boolean
+ Dim bMerged As Boolean
+
+ bMerged = false
+
+ Test.StartMethod("merge()")
+ bOK = true
+ oObj.merge(true)
+ bOk = bOk AND oObj.getIsMerged()
+ oObj.merge(false)
+ bOk = bOk AND NOT oObj.getIsMerged()
+
+ Test.MethodTested("merge()", bOK)
+
+ Test.StartMethod("getIsMerged()")
+ Test.MethodTested("getIsMerged()", bOK)
+
+Exit Sub
+ErrHndl:
+ Test.Exception()
+ bOK = false
+ resume next
+End Sub
+</script:module>
diff --git a/qadevOOo/tests/basic/ifc/util/XModeSelector/script.xlb b/qadevOOo/tests/basic/ifc/util/XModeSelector/script.xlb
new file mode 100644
index 000000000000..6408972dd437
--- /dev/null
+++ b/qadevOOo/tests/basic/ifc/util/XModeSelector/script.xlb
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "library.dtd">
+<library:library xmlns:library="http://openoffice.org/2000/library" library:name="util_XModeSelector" library:readonly="false" library:passwordprotected="false">
+"<library:element library:name="util_XModeSelector"/>
+"</library:library>
diff --git a/qadevOOo/tests/basic/ifc/util/XModeSelector/util_XModeSelector.xba b/qadevOOo/tests/basic/ifc/util/XModeSelector/util_XModeSelector.xba
new file mode 100644
index 000000000000..5743050ff6a9
--- /dev/null
+++ b/qadevOOo/tests/basic/ifc/util/XModeSelector/util_XModeSelector.xba
@@ -0,0 +1,84 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
+<script:module xmlns:script="http://openoffice.org/2000/script" script:name="util_XModeSelector" script:language="StarBasic">
+
+
+'*************************************************************************
+'
+' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+'
+' Copyright 2000, 2010 Oracle and/or its affiliates.
+'
+' OpenOffice.org - a multi-platform office productivity suite
+'
+' This file is part of OpenOffice.org.
+'
+' OpenOffice.org is free software: you can redistribute it and/or modify
+' it under the terms of the GNU Lesser General Public License version 3
+' only, as published by the Free Software Foundation.
+'
+' OpenOffice.org is distributed in the hope that it will be useful,
+' but WITHOUT ANY WARRANTY; without even the implied warranty of
+' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' GNU Lesser General Public License version 3 for more details
+' (a copy is included in the LICENSE file that accompanied this code).
+'
+' You should have received a copy of the GNU Lesser General Public License
+' version 3 along with OpenOffice.org. If not, see
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'*************************************************************************
+'*************************************************************************
+
+
+
+' Be sure that all variables are dimensioned:
+option explicit
+
+
+
+Sub RunTest()
+
+'*************************************************************************
+' INTERFACE:
+' com.sun.star.util.XModeSelector
+'*************************************************************************
+On Error Goto ErrHndl
+ Dim bOK As Boolean
+ Dim i As Integer
+ Dim modes As Variant
+ Dim oldMode As String, newMode As String, resMode As String
+
+ Test.StartMethod("getSupportedModes()")
+ bOK = true
+ modes = oObj.getSupportedModes()
+ for i = lbound(modes()) to ubound(modes())
+ out.Log(" " + modes(i))
+ next i
+ bOK = bOK AND ubound(modes()) &gt; 0
+ Test.MethodTested("getSupportedModes()", bOK)
+
+ Test.StartMethod("supportsMode()")
+ bOK = true
+ bOK = bOK AND oObj.supportsMode(modes(0))
+ Test.MethodTested("supportsMode()", bOK)
+
+ Test.StartMethod("getMode()")
+ Test.StartMethod("setMode()")
+ bOK = true
+ oldMode = oObj.getMode()
+ if oldMode = modes(0) then newMode = modes(1) else newMode = modes(0)
+ oObj.setMode(newMode)
+ resMode = oObj.getMode()
+ bOK = bOK AND (newMode = resMode)
+ Test.MethodTested("getMode()", bOK)
+ Test.MethodTested("setMode()", bOK)
+
+Exit Sub
+ErrHndl:
+ Test.Exception()
+ bOK = false
+ resume next
+End Sub
+</script:module>
diff --git a/qadevOOo/tests/basic/ifc/util/XModifyBroadcaster/script.xlb b/qadevOOo/tests/basic/ifc/util/XModifyBroadcaster/script.xlb
new file mode 100644
index 000000000000..e65d266ff846
--- /dev/null
+++ b/qadevOOo/tests/basic/ifc/util/XModifyBroadcaster/script.xlb
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "library.dtd">
+<library:library xmlns:library="http://openoffice.org/2000/library" library:name="util_XModifyBroadcaster" library:readonly="false" library:passwordprotected="false">
+"<library:element library:name="util_XModifyBroadcaster"/>
+"</library:library>
diff --git a/qadevOOo/tests/basic/ifc/util/XModifyBroadcaster/util_XModifyBroadcaster.xba b/qadevOOo/tests/basic/ifc/util/XModifyBroadcaster/util_XModifyBroadcaster.xba
new file mode 100644
index 000000000000..dbca0d2ed013
--- /dev/null
+++ b/qadevOOo/tests/basic/ifc/util/XModifyBroadcaster/util_XModifyBroadcaster.xba
@@ -0,0 +1,82 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
+<script:module xmlns:script="http://openoffice.org/2000/script" script:name="util_XModifyBroadcaster" script:language="StarBasic">
+
+
+'*************************************************************************
+'
+' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+'
+' Copyright 2000, 2010 Oracle and/or its affiliates.
+'
+' OpenOffice.org - a multi-platform office productivity suite
+'
+' This file is part of OpenOffice.org.
+'
+' OpenOffice.org is free software: you can redistribute it and/or modify
+' it under the terms of the GNU Lesser General Public License version 3
+' only, as published by the Free Software Foundation.
+'
+' OpenOffice.org is distributed in the hope that it will be useful,
+' but WITHOUT ANY WARRANTY; without even the implied warranty of
+' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' GNU Lesser General Public License version 3 for more details
+' (a copy is included in the LICENSE file that accompanied this code).
+'
+' You should have received a copy of the GNU Lesser General Public License
+' version 3 along with OpenOffice.org. If not, see
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'*************************************************************************
+'*************************************************************************
+
+
+
+' Be sure that all variables are dimensioned:
+option explicit
+
+'*************************************************************************
+'Result checking is not performed. Modify listeners are called only in case of
+' interaction with UI.
+
+'*************************************************************************
+
+
+
+
+
+
+Sub RunTest()
+
+'*************************************************************************
+' INTERFACE:
+' com.sun.star.util.XModifyBroadcaster
+'*************************************************************************
+On Error Goto ErrHndl
+ Dim bOK As Boolean
+ Dim listener As Object
+
+ listener = createUnoListener("TestListener_", "com.sun.star.util.XModifyListener")
+
+ Test.StartMethod("addModifyListener()")
+ bOK = true
+ oObj.addModifyListener(listener)
+ Test.MethodTested("addModifyListener()", bOK)
+
+ Test.StartMethod("removeModifyListener()")
+ bOK = true
+ oObj.removeModifyListener(listener)
+ Test.MethodTested("removeModifyListener()", bOK)
+
+Exit Sub
+ErrHndl:
+ Test.Exception()
+ bOK = false
+ resume next
+End Sub
+
+Sub TestListener_modified()
+' dummy
+end sub
+</script:module>
diff --git a/qadevOOo/tests/basic/ifc/util/XNumberFormatsSupplier/script.xlb b/qadevOOo/tests/basic/ifc/util/XNumberFormatsSupplier/script.xlb
new file mode 100644
index 000000000000..7142ba2bfb90
--- /dev/null
+++ b/qadevOOo/tests/basic/ifc/util/XNumberFormatsSupplier/script.xlb
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "library.dtd">
+<library:library xmlns:library="http://openoffice.org/2000/library" library:name="util_XNumberFormatsSupplier" library:readonly="false" library:passwordprotected="false">
+"<library:element library:name="util_XNumberFormatsSupplier"/>
+"</library:library>
diff --git a/qadevOOo/tests/basic/ifc/util/XNumberFormatsSupplier/util_XNumberFormatsSupplier.xba b/qadevOOo/tests/basic/ifc/util/XNumberFormatsSupplier/util_XNumberFormatsSupplier.xba
new file mode 100644
index 000000000000..ad3a41ead80b
--- /dev/null
+++ b/qadevOOo/tests/basic/ifc/util/XNumberFormatsSupplier/util_XNumberFormatsSupplier.xba
@@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
+<script:module xmlns:script="http://openoffice.org/2000/script" script:name="util_XNumberFormatsSupplier" script:language="StarBasic">
+
+
+'*************************************************************************
+'
+' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+'
+' Copyright 2000, 2010 Oracle and/or its affiliates.
+'
+' OpenOffice.org - a multi-platform office productivity suite
+'
+' This file is part of OpenOffice.org.
+'
+' OpenOffice.org is free software: you can redistribute it and/or modify
+' it under the terms of the GNU Lesser General Public License version 3
+' only, as published by the Free Software Foundation.
+'
+' OpenOffice.org is distributed in the hope that it will be useful,
+' but WITHOUT ANY WARRANTY; without even the implied warranty of
+' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' GNU Lesser General Public License version 3 for more details
+' (a copy is included in the LICENSE file that accompanied this code).
+'
+' You should have received a copy of the GNU Lesser General Public License
+' version 3 along with OpenOffice.org. If not, see
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'*************************************************************************
+'*************************************************************************
+
+
+
+' Be sure that all variables are dimensioned:
+option explicit
+
+
+
+Sub RunTest()
+
+'*************************************************************************
+' INTERFACE:
+' com.sun.star.util.XNumberFormatsSupplier
+'*************************************************************************
+On Error Goto ErrHndl
+ Dim bOK As Boolean
+ Dim oNumberFormatSettings, oNumberFormats As Object
+
+ Test.StartMethod("getNumberFormatSettings()")
+ bOK = true
+ oNumberFormatSettings = oObj.getNumberFormatSettings()
+ bOK = bOK AND NOT isNULL(oNumberFormatSettings)
+ bOK = bOK AND hasUnoInterfaces(oNumberFormatSettings, "com.sun.star.beans.XPropertySet")
+ Test.MethodTested("getNumberFormatSettings()", bOK)
+
+ Test.StartMethod("getNumberFormats()")
+ bOK = true
+ oNumberFormats = oObj.getNumberFormats()
+ bOK = bOK AND NOT isNULL(oNumberFormats)
+ bOK = bOK AND hasUnoInterfaces(oNumberFormats, "com.sun.star.util.XNumberFormats")
+ Test.MethodTested("getNumberFormats()", bOK)
+
+Exit Sub
+ErrHndl:
+ Test.Exception()
+ bOK = false
+ resume next
+End Sub
+</script:module>
diff --git a/qadevOOo/tests/basic/ifc/util/XRefreshable/script.xlb b/qadevOOo/tests/basic/ifc/util/XRefreshable/script.xlb
new file mode 100644
index 000000000000..3dce23efef3a
--- /dev/null
+++ b/qadevOOo/tests/basic/ifc/util/XRefreshable/script.xlb
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "library.dtd">
+<library:library xmlns:library="http://openoffice.org/2000/library" library:name="util_XRefreshable" library:readonly="false" library:passwordprotected="false">
+"<library:element library:name="util_XRefreshable"/>
+"</library:library>
diff --git a/qadevOOo/tests/basic/ifc/util/XRefreshable/util_XRefreshable.xba b/qadevOOo/tests/basic/ifc/util/XRefreshable/util_XRefreshable.xba
new file mode 100644
index 000000000000..342bfabf3232
--- /dev/null
+++ b/qadevOOo/tests/basic/ifc/util/XRefreshable/util_XRefreshable.xba
@@ -0,0 +1,106 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
+<script:module xmlns:script="http://openoffice.org/2000/script" script:name="util_XRefreshable" script:language="StarBasic">
+
+
+'*************************************************************************
+'
+' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+'
+' Copyright 2000, 2010 Oracle and/or its affiliates.
+'
+' OpenOffice.org - a multi-platform office productivity suite
+'
+' This file is part of OpenOffice.org.
+'
+' OpenOffice.org is free software: you can redistribute it and/or modify
+' it under the terms of the GNU Lesser General Public License version 3
+' only, as published by the Free Software Foundation.
+'
+' OpenOffice.org is distributed in the hope that it will be useful,
+' but WITHOUT ANY WARRANTY; without even the implied warranty of
+' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' GNU Lesser General Public License version 3 for more details
+' (a copy is included in the LICENSE file that accompanied this code).
+'
+' You should have received a copy of the GNU Lesser General Public License
+' version 3 along with OpenOffice.org. If not, see
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'*************************************************************************
+'*************************************************************************
+
+
+
+' Be sure that all variables are dimensioned:
+option explicit
+
+
+Dim nCB1Val As Integer
+Dim nCB2Val As Integer
+
+
+Sub RunTest()
+
+'*************************************************************************
+' INTERFACE:
+' com.sun.star.util.XRefreshable
+'*************************************************************************
+On Error Goto ErrHndl
+ Dim bOK As Boolean
+ Dim oListener1, oListener2 As Object
+ Dim nCount As Integer
+
+ bOK = true
+ nCount = 0
+ nCB1Val = 0
+ nCB2Val = 0
+
+ Out.Log("Create two listeners...")
+ oListener1 = createUNOListener("CB1_", "com.sun.star.util.XRefreshListener")
+ oListener2 = createUNOListener("CB2_", "com.sun.star.util.XRefreshListener")
+
+ Out.Log("Adding two refresh listeners")
+ oObj.addRefreshListener(oListener1)
+ oObj.addRefreshListener(oListener2)
+
+ Test.StartMethod("addRefreshListener()")
+ bOK = true
+ oObj.refresh()
+ bOK = bOK AND (nCB1Val = 1) AND (nCB2Val = 1)
+ Test.MethodTested("addRefreshListener()", bOK)
+
+ Test.StartMethod("removeRefreshListener()")
+ bOK = true
+ Out.Log("Removing second refresh listener")
+ oObj.removeRefreshListener(oListener2)
+ oObj.refresh()
+ bOK = bOK AND (nCB1Val = 2) AND (nCB2Val = 1)
+ Test.MethodTested("removeRefreshListener()", bOK)
+
+ Test.StartMethod("refresh()")
+ bOK = true
+ bOK = bOK AND (nCB1Val = 2) AND (nCB2Val = 1)
+ Test.MethodTested("refresh()", bOK)
+
+ Out.Log("Removing first refresh listener")
+ oObj.removeRefreshListener(oListener1)
+
+Exit Sub
+ErrHndl:
+ Test.Exception()
+ bOK = false
+ resume next
+End Sub
+
+Sub CB1_refreshed()
+ Out.Log("First listener CallBack called")
+ nCB1Val = nCB1Val + 1
+End Sub
+
+Sub CB2_refreshed()
+ Out.Log("Second listener CallBack called")
+ nCB2Val = nCB2Val + 1
+End Sub
+</script:module>
diff --git a/qadevOOo/tests/basic/ifc/util/XReplaceDescriptor/script.xlb b/qadevOOo/tests/basic/ifc/util/XReplaceDescriptor/script.xlb
new file mode 100644
index 000000000000..1f7fa245341a
--- /dev/null
+++ b/qadevOOo/tests/basic/ifc/util/XReplaceDescriptor/script.xlb
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "library.dtd">
+<library:library xmlns:library="http://openoffice.org/2000/library" library:name="util_XReplaceDescriptor" library:readonly="false" library:passwordprotected="false">
+"<library:element library:name="util_XReplaceDescriptor"/>
+"</library:library>
diff --git a/qadevOOo/tests/basic/ifc/util/XReplaceDescriptor/util_XReplaceDescriptor.xba b/qadevOOo/tests/basic/ifc/util/XReplaceDescriptor/util_XReplaceDescriptor.xba
new file mode 100644
index 000000000000..e34fdb3015b5
--- /dev/null
+++ b/qadevOOo/tests/basic/ifc/util/XReplaceDescriptor/util_XReplaceDescriptor.xba
@@ -0,0 +1,68 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
+<script:module xmlns:script="http://openoffice.org/2000/script" script:name="util_XReplaceDescriptor" script:language="StarBasic">
+
+
+'*************************************************************************
+'
+' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+'
+' Copyright 2000, 2010 Oracle and/or its affiliates.
+'
+' OpenOffice.org - a multi-platform office productivity suite
+'
+' This file is part of OpenOffice.org.
+'
+' OpenOffice.org is free software: you can redistribute it and/or modify
+' it under the terms of the GNU Lesser General Public License version 3
+' only, as published by the Free Software Foundation.
+'
+' OpenOffice.org is distributed in the hope that it will be useful,
+' but WITHOUT ANY WARRANTY; without even the implied warranty of
+' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' GNU Lesser General Public License version 3 for more details
+' (a copy is included in the LICENSE file that accompanied this code).
+'
+' You should have received a copy of the GNU Lesser General Public License
+' version 3 along with OpenOffice.org. If not, see
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'*************************************************************************
+'*************************************************************************
+
+
+
+' Be sure that all variables are dimensioned:
+option explicit
+
+
+
+Sub RunTest()
+
+'*************************************************************************
+' INTERFACE:
+' com.sun.star.util.XReplaceDescriptor
+'*************************************************************************
+On Error Goto ErrHndl
+ Dim bOK As Boolean
+ Dim rStr As String
+
+ Test.StartMethod("setReplaceString()")
+ Test.StartMethod("getReplaceString()")
+ bOK = true
+
+ rStr = oObj.getReplaceString()
+ oObj.setReplaceString(rStr &amp; cIfcShortName)
+
+ bOK = bOK AND (rStr &amp; cIfcShortName = oObj.getReplaceString())
+ Test.MethodTested("getReplaceString()", bOK)
+ Test.MethodTested("setReplaceString()", bOK)
+
+Exit Sub
+ErrHndl:
+ Test.Exception()
+ bOK = false
+ resume next
+End Sub
+</script:module>
diff --git a/qadevOOo/tests/basic/ifc/util/XReplaceable/script.xlb b/qadevOOo/tests/basic/ifc/util/XReplaceable/script.xlb
new file mode 100644
index 000000000000..63b382a66845
--- /dev/null
+++ b/qadevOOo/tests/basic/ifc/util/XReplaceable/script.xlb
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "library.dtd">
+<library:library xmlns:library="http://openoffice.org/2000/library" library:name="util_XReplaceable" library:readonly="false" library:passwordprotected="false">
+"<library:element library:name="util_XReplaceable"/>
+"</library:library>
diff --git a/qadevOOo/tests/basic/ifc/util/XReplaceable/util_XReplaceable.xba b/qadevOOo/tests/basic/ifc/util/XReplaceable/util_XReplaceable.xba
new file mode 100644
index 000000000000..4a04437b8119
--- /dev/null
+++ b/qadevOOo/tests/basic/ifc/util/XReplaceable/util_XReplaceable.xba
@@ -0,0 +1,93 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
+<script:module xmlns:script="http://openoffice.org/2000/script" script:name="util_XReplaceable" script:language="StarBasic">
+
+
+'*************************************************************************
+'
+' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+'
+' Copyright 2000, 2010 Oracle and/or its affiliates.
+'
+' OpenOffice.org - a multi-platform office productivity suite
+'
+' This file is part of OpenOffice.org.
+'
+' OpenOffice.org is free software: you can redistribute it and/or modify
+' it under the terms of the GNU Lesser General Public License version 3
+' only, as published by the Free Software Foundation.
+'
+' OpenOffice.org is distributed in the hope that it will be useful,
+' but WITHOUT ANY WARRANTY; without even the implied warranty of
+' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' GNU Lesser General Public License version 3 for more details
+' (a copy is included in the LICENSE file that accompanied this code).
+'
+' You should have received a copy of the GNU Lesser General Public License
+' version 3 along with OpenOffice.org. If not, see
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'*************************************************************************
+'*************************************************************************
+
+
+
+'*************************************************************************
+' This Interface/Service test depends on the following GLOBAL variables,
+' which must be specified in the object creation:
+
+' - Global cStringToSearch As String
+' should appears more than once
+' - Global nSearchedEntriesAmount As Integer
+
+'*************************************************************************
+
+
+
+
+
+Sub RunTest()
+
+'*************************************************************************
+' INTERFACE:
+' com.sun.star.util.XReplaceable
+'*************************************************************************
+On Error Goto ErrHndl
+ Dim bOK As Boolean
+ Dim oReplaceDescriptor As Object
+ Dim nReplace As Integer
+
+
+ Test.StartMethod("createReplaceDescriptor()")
+ bOK = true
+ oReplaceDescriptor = oObj.createReplaceDescriptor()
+ bOK = bOK AND hasUnoInterfaces(oReplaceDescriptor, "com.sun.star.util.XReplaceDescriptor")
+ Test.MethodTested("createReplaceDescriptor()", bOK)
+
+ Test.StartMethod("replaceAll()")
+ bOK = true
+ Out.Log("Prepearing descriptor...")
+ oReplaceDescriptor.SearchAll = true
+ oReplaceDescriptor.SearchCaseSensitive = true
+ oReplaceDescriptor.SearchWords = false
+ oReplaceDescriptor.SearchString = cStringToSearch
+ oReplaceDescriptor.ReplaceString = ucase(cStringToSearch)
+
+ nReplace = oObj.replaceAll(oReplaceDescriptor)
+ Out.Log("" &amp; nReplace &amp; " replaces were performed. Expected: " &amp; nSearchedEntriesAmount)
+ bOK = bOK AND nSearchedEntriesAmount = nReplace
+
+ Out.Log("Return to previous state...")
+ oReplaceDescriptor.SearchString = ucase(cStringToSearch)
+ oReplaceDescriptor.ReplaceString = cStringToSearch
+ nReplace = oObj.replaceAll(oReplaceDescriptor)
+ Test.MethodTested("replaceAll()", bOK)
+
+Exit Sub
+ErrHndl:
+ Test.Exception()
+ bOK = false
+ resume next
+End Sub
+</script:module>
diff --git a/qadevOOo/tests/basic/ifc/util/XSearchDescriptor/script.xlb b/qadevOOo/tests/basic/ifc/util/XSearchDescriptor/script.xlb
new file mode 100644
index 000000000000..774469012875
--- /dev/null
+++ b/qadevOOo/tests/basic/ifc/util/XSearchDescriptor/script.xlb
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "library.dtd">
+<library:library xmlns:library="http://openoffice.org/2000/library" library:name="util_XSearchDescriptor" library:readonly="false" library:passwordprotected="false">
+"<library:element library:name="util_XSearchDescriptor"/>
+"</library:library>
diff --git a/qadevOOo/tests/basic/ifc/util/XSearchDescriptor/util_XSearchDescriptor.xba b/qadevOOo/tests/basic/ifc/util/XSearchDescriptor/util_XSearchDescriptor.xba
new file mode 100644
index 000000000000..95b66d85774f
--- /dev/null
+++ b/qadevOOo/tests/basic/ifc/util/XSearchDescriptor/util_XSearchDescriptor.xba
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
+<script:module xmlns:script="http://openoffice.org/2000/script" script:name="util_XSearchDescriptor" script:language="StarBasic">
+
+
+'*************************************************************************
+'
+' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+'
+' Copyright 2000, 2010 Oracle and/or its affiliates.
+'
+' OpenOffice.org - a multi-platform office productivity suite
+'
+' This file is part of OpenOffice.org.
+'
+' OpenOffice.org is free software: you can redistribute it and/or modify
+' it under the terms of the GNU Lesser General Public License version 3
+' only, as published by the Free Software Foundation.
+'
+' OpenOffice.org is distributed in the hope that it will be useful,
+' but WITHOUT ANY WARRANTY; without even the implied warranty of
+' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' GNU Lesser General Public License version 3 for more details
+' (a copy is included in the LICENSE file that accompanied this code).
+'
+' You should have received a copy of the GNU Lesser General Public License
+' version 3 along with OpenOffice.org. If not, see
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'*************************************************************************
+'*************************************************************************
+
+
+
+' Be sure that all variables are dimensioned:
+option explicit
+
+
+
+Sub RunTest()
+
+'*************************************************************************
+' INTERFACE:
+' com.sun.star.util.XSearchDescriptor
+'*************************************************************************
+On Error Goto ErrHndl
+ Dim bOK As Boolean
+ Dim sStr As String
+
+
+ Test.StartMethod("setSearchString()")
+ bOK = true
+ sStr = oObj.getSearchString()
+ oObj.setSearchString(sStr &amp; cIfcShortName)
+ bOK = bOK AND (sStr &lt;&gt; oObj.getSearchString())
+ Test.MethodTested("setSearchString()", bOK)
+
+ Test.StartMethod("getSearchString()")
+ bOK = true
+ bOK = bOK AND (oObj.getSearchString() = (sStr &amp; cIfcShortName))
+ Test.MethodTested("getSearchString()", bOK)
+
+Exit Sub
+ErrHndl:
+ Test.Exception()
+ bOK = false
+ resume next
+End Sub
+</script:module>
diff --git a/qadevOOo/tests/basic/ifc/util/XSearchable/script.xlb b/qadevOOo/tests/basic/ifc/util/XSearchable/script.xlb
new file mode 100644
index 000000000000..2e4eb5ac7612
--- /dev/null
+++ b/qadevOOo/tests/basic/ifc/util/XSearchable/script.xlb
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "library.dtd">
+<library:library xmlns:library="http://openoffice.org/2000/library" library:name="util_XSearchable" library:readonly="false" library:passwordprotected="false">
+"<library:element library:name="util_XSearchable"/>
+"</library:library>
diff --git a/qadevOOo/tests/basic/ifc/util/XSearchable/util_XSearchable.xba b/qadevOOo/tests/basic/ifc/util/XSearchable/util_XSearchable.xba
new file mode 100644
index 000000000000..56b3c7c5601a
--- /dev/null
+++ b/qadevOOo/tests/basic/ifc/util/XSearchable/util_XSearchable.xba
@@ -0,0 +1,111 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
+<script:module xmlns:script="http://openoffice.org/2000/script" script:name="util_XSearchable" script:language="StarBasic">
+
+
+'*************************************************************************
+'
+' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+'
+' Copyright 2000, 2010 Oracle and/or its affiliates.
+'
+' OpenOffice.org - a multi-platform office productivity suite
+'
+' This file is part of OpenOffice.org.
+'
+' OpenOffice.org is free software: you can redistribute it and/or modify
+' it under the terms of the GNU Lesser General Public License version 3
+' only, as published by the Free Software Foundation.
+'
+' OpenOffice.org is distributed in the hope that it will be useful,
+' but WITHOUT ANY WARRANTY; without even the implied warranty of
+' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' GNU Lesser General Public License version 3 for more details
+' (a copy is included in the LICENSE file that accompanied this code).
+'
+' You should have received a copy of the GNU Lesser General Public License
+' version 3 along with OpenOffice.org. If not, see
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'*************************************************************************
+'*************************************************************************
+
+
+
+'*************************************************************************
+' This Interface/Service test depends on the following GLOBAL variables,
+' which must be specified in the object creation:
+
+' - Global cStringToSearch As String
+' should appears more than once
+' - Global nSearchedEntriesAmount As Integer
+
+'*************************************************************************
+
+
+
+
+
+Sub RunTest()
+
+'*************************************************************************
+' INTERFACE:
+' com.sun.star.util.XSearchable
+'*************************************************************************
+On Error Goto ErrHndl
+ Dim bOK As Boolean
+
+ Dim oMatch As Object
+ Dim oAllMatch As Object
+ Dim oSearchDescriptor As Object
+ Dim nCount As Long
+
+ Test.StartMethod("createSearchDescriptor()")
+ bOK = true
+ oSearchDescriptor = oObj.createSearchDescriptor()
+ bOK = bOK AND NOT isNULL(oSearchDescriptor)
+ bOK = bOK AND hasUnoInterfaces(oSearchDescriptor, "com.sun.star.util.XSearchDescriptor")
+ Test.MethodTested("createSearchDescriptor()", bOK)
+
+ Out.Log("Setting values to search descriptor")
+ oSearchDescriptor.SearchString = cStringToSearch
+ oSearchDescriptor.SearchWords = false
+ oSearchDescriptor.SearchCaseSensitive = true
+
+ Test.StartMethod("findAll()")
+ bOK = true
+ oAllMatch = oObj.findAll(oSearchDescriptor)
+ bOK = bOK AND hasUnoInterfaces(oAllMatch, "com.sun.star.container.XIndexAccess")
+ for i = 0 to oAllMatch.count - 1
+ bOK = bOK AND oAllMatch.getByIndex(i).String = cStringToSearch
+ next i
+ bOK = bOK AND oAllMatch.count = nSearchedEntriesAmount
+ Test.MethodTested("findAll()", bOK)
+
+ Test.StartMethod("findFirst()")
+ bOK = true
+ oMatch = oObj.findFirst(oSearchDescriptor)
+ bOK = bOK AND oMatch.String = cStringToSearch
+ Test.MethodTested("findFirst()", bOK)
+
+ Test.StartMethod("findNext()")
+ bOK = true
+ nCount = 0
+
+ While NOT isNULL(oMatch)
+ nCount = nCount + 1
+ bOK = bOK AND oMatch.String = cStringToSearch
+ oMatch = oObj.findNext(oMatch.end, oSearchDescriptor)
+ wend
+
+ bOK = bOK AND nSearchedEntriesAmount = nCount
+ Test.MethodTested("findNext()", bOK)
+
+Exit Sub
+ErrHndl:
+ Test.Exception()
+ bOK = false
+ resume next
+End Sub
+</script:module>
diff --git a/qadevOOo/tests/basic/ifc/util/XSortable/script.xlb b/qadevOOo/tests/basic/ifc/util/XSortable/script.xlb
new file mode 100644
index 000000000000..a50e2d2de419
--- /dev/null
+++ b/qadevOOo/tests/basic/ifc/util/XSortable/script.xlb
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "library.dtd">
+<library:library xmlns:library="http://openoffice.org/2000/library" library:name="util_XSortable" library:readonly="false" library:passwordprotected="false">
+"<library:element library:name="util_XSortable"/>
+"</library:library>
diff --git a/qadevOOo/tests/basic/ifc/util/XSortable/util_XSortable.xba b/qadevOOo/tests/basic/ifc/util/XSortable/util_XSortable.xba
new file mode 100644
index 000000000000..dd998e38baab
--- /dev/null
+++ b/qadevOOo/tests/basic/ifc/util/XSortable/util_XSortable.xba
@@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
+<script:module xmlns:script="http://openoffice.org/2000/script" script:name="util_XSortable" script:language="StarBasic">
+
+
+'*************************************************************************
+'
+' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+'
+' Copyright 2000, 2010 Oracle and/or its affiliates.
+'
+' OpenOffice.org - a multi-platform office productivity suite
+'
+' This file is part of OpenOffice.org.
+'
+' OpenOffice.org is free software: you can redistribute it and/or modify
+' it under the terms of the GNU Lesser General Public License version 3
+' only, as published by the Free Software Foundation.
+'
+' OpenOffice.org is distributed in the hope that it will be useful,
+' but WITHOUT ANY WARRANTY; without even the implied warranty of
+' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' GNU Lesser General Public License version 3 for more details
+' (a copy is included in the LICENSE file that accompanied this code).
+'
+' You should have received a copy of the GNU Lesser General Public License
+' version 3 along with OpenOffice.org. If not, see
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'*************************************************************************
+'*************************************************************************
+
+
+
+' Be sure that all variables are dimensioned:
+option explicit
+
+'*************************************************************************
+' This Interface/Service test depends on the following GLOBAL variables,
+' which must be specified in the object creation:
+
+' - modifyDescriptor(sortDescr As Variant)
+' checkSort() As Boolean
+
+'*************************************************************************
+
+
+
+
+Sub RunTest()
+
+'*************************************************************************
+' INTERFACE:
+' com.sun.star.util.XSortable
+'*************************************************************************
+On Error Goto ErrHndl
+ Dim bOK As Boolean
+ Dim oSortDsc As Object, newDsc As Object
+
+ Test.StartMethod("createSortDescriptor()")
+ bOK = true
+ oSortDsc = oObj.createSortDescriptor()
+ bOK = bOK AND NOT isNULL(oSortDsc)
+ bOK = bOK AND isArray(oSortDsc)
+ Test.MethodTested("createSortDescriptor()", bOK)
+
+ Test.StartMethod("sort()")
+ newDsc = modifyDescriptor(oSortDsc)
+ bOK = true
+ oObj.sort(newDsc)
+ bOK = bOK AND checkSort()
+ Test.MethodTested("sort()", bOK)
+Exit Sub
+ErrHndl:
+ Test.Exception()
+ bOK = false
+ resume next
+End Sub
+</script:module>
diff --git a/qadevOOo/tests/basic/ifc/util/XStringEscape/script.xlb b/qadevOOo/tests/basic/ifc/util/XStringEscape/script.xlb
new file mode 100644
index 000000000000..45c2a0056092
--- /dev/null
+++ b/qadevOOo/tests/basic/ifc/util/XStringEscape/script.xlb
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "library.dtd">
+ <library:library xmlns:library="http://openoffice.org/2000/library" library:name="util_XStringEscape" library:readonly="false" library:passwordprotected="false">
+ <library:element library:name="util_XStringEscape"/>
+ </library:library>
diff --git a/qadevOOo/tests/basic/ifc/util/XStringEscape/util_XStringEscape.xba b/qadevOOo/tests/basic/ifc/util/XStringEscape/util_XStringEscape.xba
new file mode 100644
index 000000000000..70ca52891aa0
--- /dev/null
+++ b/qadevOOo/tests/basic/ifc/util/XStringEscape/util_XStringEscape.xba
@@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<script:module xmlns:script="http://openoffice.org/2000/script" script:name="XStringEscape" script:language="StarBasic">
+
+'*************************************************************************
+'
+' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+'
+' Copyright 2000, 2010 Oracle and/or its affiliates.
+'
+' OpenOffice.org - a multi-platform office productivity suite
+'
+' This file is part of OpenOffice.org.
+'
+' OpenOffice.org is free software: you can redistribute it and/or modify
+' it under the terms of the GNU Lesser General Public License version 3
+' only, as published by the Free Software Foundation.
+'
+' OpenOffice.org is distributed in the hope that it will be useful,
+' but WITHOUT ANY WARRANTY; without even the implied warranty of
+' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' GNU Lesser General Public License version 3 for more details
+' (a copy is included in the LICENSE file that accompanied this code).
+'
+' You should have received a copy of the GNU Lesser General Public License
+' version 3 along with OpenOffice.org. If not, see
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'*************************************************************************
+'*************************************************************************
+
+
+'*************************************************************************
+
+' Be sure that all variables are dimensioned:
+option explicit
+
+Sub RunTest()
+
+'*************************************************************************
+' INTERFACE:
+' com.sun.star.util.XStringEscape
+'*************************************************************************
+On Error Goto ErrHndl
+ Dim bOK As Boolean
+
+ out.log("The Implementation of this Interface doesn't really do anything")
+ Dim toCheck as String
+ toCheck = ";:&lt;&gt;/*"
+
+ Test.StartMethod("escapeString()")
+ bOK = TRUE
+ Dim eString as String
+ eString = oObj.escapeString(toCheck)
+ bOK = bOK AND (eString = toCheck)
+ Test.MethodTested("escapeString()", bOK)
+
+ Test.StartMethod("unescapeString()")
+ bOK = TRUE
+ Dim ueString as String
+ ueString = oObj.unescapeString(toCheck)
+ bOK = bOK AND (ueString = toCheck)
+ Test.MethodTested("unescapeString()", bOK)
+
+Exit Sub
+ErrHndl:
+ Test.Exception()
+ bOK = false
+ resume next
+End Sub
+</script:module>
diff --git a/qadevOOo/tests/basic/ifc/util/XTextSearch/script.xlb b/qadevOOo/tests/basic/ifc/util/XTextSearch/script.xlb
new file mode 100644
index 000000000000..923ac8c6cdd1
--- /dev/null
+++ b/qadevOOo/tests/basic/ifc/util/XTextSearch/script.xlb
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "library.dtd">
+<library:library xmlns:library="http://openoffice.org/2000/library" library:name="util_XTextSearch" library:readonly="false" library:passwordprotected="false">
+"<library:element library:name="util_XTextSearch"/>
+"</library:library>
diff --git a/qadevOOo/tests/basic/ifc/util/XTextSearch/util_XTextSearch.xba b/qadevOOo/tests/basic/ifc/util/XTextSearch/util_XTextSearch.xba
new file mode 100644
index 000000000000..875e1e1d26a0
--- /dev/null
+++ b/qadevOOo/tests/basic/ifc/util/XTextSearch/util_XTextSearch.xba
@@ -0,0 +1,104 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
+<script:module xmlns:script="http://openoffice.org/2000/script" script:name="util_XTextSearch" script:language="StarBasic">
+
+
+'*************************************************************************
+'
+' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+'
+' Copyright 2000, 2010 Oracle and/or its affiliates.
+'
+' OpenOffice.org - a multi-platform office productivity suite
+'
+' This file is part of OpenOffice.org.
+'
+' OpenOffice.org is free software: you can redistribute it and/or modify
+' it under the terms of the GNU Lesser General Public License version 3
+' only, as published by the Free Software Foundation.
+'
+' OpenOffice.org is distributed in the hope that it will be useful,
+' but WITHOUT ANY WARRANTY; without even the implied warranty of
+' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' GNU Lesser General Public License version 3 for more details
+' (a copy is included in the LICENSE file that accompanied this code).
+'
+' You should have received a copy of the GNU Lesser General Public License
+' version 3 along with OpenOffice.org. If not, see
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'*************************************************************************
+'*************************************************************************
+
+
+
+' Be sure that all variables are dimensioned:
+option explicit
+
+
+
+Sub RunTest()
+
+'*************************************************************************
+' INTERFACE:
+' com.sun.star.util.XTextSearch
+'*************************************************************************
+On Error Goto ErrHndl
+ Dim bOK As Boolean
+
+ Dim _Locale As new com.sun.star.lang.Locale
+ _Locale.Country = "US"
+ _Locale.Language = "en"
+
+ Test.StartMethod("setOptions()")
+ bOK = true
+ Dim aSearchOptions As new com.sun.star.util.SearchOptions
+ aSearchOptions.algorithmType = com.sun.star.util.SearchAlgorithms.REGEXP
+ aSearchOptions.searchFlag = com.sun.star.util.SearchFlags.ALL_IGNORE_CASE
+ aSearchOptions.searchString = "h[ae](k|l|j)+o" 'Should work because of ALL_IGNORE_CASE!
+ aSearchOptions.Locale = _Locale
+ oObj.setOptions(aSearchOptions)
+ Test.MethodTested("setOptions()", bOK)
+
+ Test.StartMethod("searchForward()")
+ bOK = true
+ Dim _string As String
+ Dim _result As Variant
+
+ _string = "String with 'Hello' and 'Hallo'."
+ _result = oObj.searchForward(_string, 0, len(_string))
+ if (ubound(_result.startOffset()) &gt;= 0) then
+ bOK = bOK AND _result.startOffset(0) = 13
+ bOK = bOK AND _result.endOffset(0) = 18
+ _result = oObj.searchForward(_string, 18, len(_string))
+ bOK = bOK AND _result.startOffset(0) = 25
+ bOK = bOK AND _result.endOffset(0) = 30
+ else
+ Out.Log("No matches were found!")
+ bOK = false
+ end if
+ Test.MethodTested("searchForward()", bOK)
+
+ Test.StartMethod("searchBackward()")
+ bOK = true
+ _result = oObj.searchBackward(_string, len(_string), 0)
+ if (ubound(_result.startOffset()) &gt;= 0) then
+ bOK = bOK AND _result.startOffset(0) = 30
+ bOK = bOK AND _result.endOffset(0) = 25
+ _result = oObj.searchBackward(_string, _result.endOffset(0), 0)
+ bOK = bOK AND _result.startOffset(0) = 18
+ bOK = bOK AND _result.endOffset(0) = 13
+ else
+ Out.Log("No matches were found!")
+ bOK = false
+ end if
+ Test.MethodTested("searchBackward()", bOK)
+
+Exit Sub
+ErrHndl:
+ Test.Exception()
+ bOK = false
+ resume next
+End Sub
+</script:module>