diff options
Diffstat (limited to 'qadevOOo/tests/basic/ifc/document')
32 files changed, 1352 insertions, 0 deletions
diff --git a/qadevOOo/tests/basic/ifc/document/DocumentInfo/document_DocumentInfo.xba b/qadevOOo/tests/basic/ifc/document/DocumentInfo/document_DocumentInfo.xba new file mode 100644 index 000000000000..4364dae08e03 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/document/DocumentInfo/document_DocumentInfo.xba @@ -0,0 +1,206 @@ +<?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="document_DocumentInfo" 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.document.DocumentInfo +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim pval As Variant, resVal As Variant + + PropertyTester.TestProperty("Author") + + PropertyTester.TestProperty("BlindCopiesTo") + + PropertyTester.TestProperty("CopyTo") + + testDateTime("CreationDate") + + PropertyTester.TestProperty("Description") + + PropertyTester.TestProperty("InReplyTo") + + PropertyTester.TestProperty("Keywords") + + PropertyTester.TestProperty("MIMEType") + + testDateTime("ModifyDate") + + PropertyTester.TestProperty("ModifiedBy") + + PropertyTester.TestProperty("Newsgroups") + + PropertyTester.TestProperty("Original") + + Test.StartMethod("Priority") + + bOK =true + + pval = oObj.Priority + Out.Log("Was:" + pval) + oObj.Priority = pval + 1 + resVal = oObj.Priority + Out.Log("Res:" + resVal) + bOK = bOK AND (pval + 1 = resVal) + + Test.MethodTested("Priority", bOK) + + PropertyTester.TestProperty("Recipient") + + PropertyTester.TestProperty("References") + + PropertyTester.TestProperty("ReplyTo") + + PropertyTester.TestProperty("Theme") + + PropertyTester.TestProperty("Title") + + PropertyTester.TestProperty("Template") + + testDateTime("TemplateDate") + + PropertyTester.TestProperty("IsEncrypted") + + testDateTime("PrintDate") + + PropertyTester.TestProperty("PrintedBy") + + PropertyTester.TestProperty("AutoloadEnabled") + + PropertyTester.TestProperty("AutoloadURL") + + Test.StartMethod("AutoloadSecs") + + bOK =true + + pval = oObj.AutoloadSecs + Out.Log("Was:" + pval) + oObj.AutoloadSecs = pval + 10 + resVal = oObj.AutoloadSecs + Out.Log("Res:" + resval) + bOK = bOK AND (pval + 10 = resVal) + + Test.MethodTested("AutoloadSecs", bOK) + + PropertyTester.TestProperty("DefaultTarget") + + PropertyTester.TestProperty("Generator") + + PropertyTester.TestProperty("CreationDate") + + PropertyTester.TestProperty("Subject") + + PropertyTester.TestProperty("Language") + + PropertyTester.TestProperty("ModifyDate") + + PropertyTester.TestProperty("PrintDate") + + PropertyTester.TestProperty("TemplateDate") + +Exit Sub +ErrHndl: + Test.Exception() + resume next +End Sub + +Sub testDateTime(propName As String) + Dim oldVal As Variant, resVal As Variant + Dim newVal As New com.sun.star.util.DateTime + Dim bOK As Boolean + bOK = true + + Test.StartMethod(propName) + + oldVal = oObj.getPropertyValue(propName) + Out.Log("OldVal :" + dateTime2String(oldVal)) + if isNull(oldVal) then + newVal.Year = 2001 + newVal.Month = 11 + newVal.Day = 12 + newVal.Hours = 16 + newVal.Minutes = 14 + newVal.Seconds = 48 + newVal.HundredthSeconds = 0 + else + newVal.Year = oldVal.Year + newVal.Month = oldVal.Month + newVal.Day = oldVal.Day + newVal.Hours = oldVal.Hours + newVal.Minutes = oldVal.Minutes + newVal.HundredthSeconds = oldVal.HundredthSeconds + newVal.Seconds = oldVal.Seconds + 1 + if (newVal.Seconds > 59) then newVal.Seconds = 0 + end if + + Out.Log("NewVal :" + dateTime2String(newVal)) + oObj.setPropertyValue(propName, newVal) + resVal = oObj.getPropertyValue(propName) + Out.Log("ResVal :" + dateTime2String(resVal)) + + bOK = bOK AND (newVal.Year = resVal.Year) + bOK = bOK AND (newVal.Month = resVal.Month) + bOK = bOK AND (newVal.Day = resVal.Day) + bOK = bOK AND (newVal.Hours = resVal.Hours) + bOK = bOK AND (newVal.Minutes = resVal.Minutes) + bOK = bOK AND (newVal.Seconds = resVal.Seconds) + bOK = bOK AND (newVal.HundredthSeconds = resVal.HundredthSeconds) + +' ### The following property was not found in correspond IDL file! ### + Test.MethodTested(propName, bOK) + + Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub + +Function dateTime2String (dT As Variant) As String + + dateTime2String = "" + dT.Day + "." + dT.Month + "." + dT.Year + _ + " " + dT.Hours + ":" + dT.Minutes + ":" + dT.Seconds + "." + _ + dT.HundredthSeconds + +End Function +</script:module> diff --git a/qadevOOo/tests/basic/ifc/document/DocumentInfo/script.xlb b/qadevOOo/tests/basic/ifc/document/DocumentInfo/script.xlb new file mode 100644 index 000000000000..ea8a16fe0ef1 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/document/DocumentInfo/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="document_DocumentInfo" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="document_DocumentInfo"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/document/OfficeDocument/document_OfficeDocument.xba b/qadevOOo/tests/basic/ifc/document/OfficeDocument/document_OfficeDocument.xba new file mode 100644 index 000000000000..a0130a98c040 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/document/OfficeDocument/document_OfficeDocument.xba @@ -0,0 +1,55 @@ +<?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="document_OfficeDocument" 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.document.OfficeDocument +'************************************************************************* +On Error Goto ErrHndl + PropertyTester.TestProperty("AutomaticControlFocus") + PropertyTester.TestProperty("ApplyFormDesignMode") +Exit Sub +ErrHndl: + Test.Exception() + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/document/OfficeDocument/script.xlb b/qadevOOo/tests/basic/ifc/document/OfficeDocument/script.xlb new file mode 100644 index 000000000000..543fca16b872 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/document/OfficeDocument/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="document_OfficeDocument" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="document_OfficeDocument"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/document/XActionLockable/document_XActionLockable.xba b/qadevOOo/tests/basic/ifc/document/XActionLockable/document_XActionLockable.xba new file mode 100644 index 000000000000..b395819bb6b5 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/document/XActionLockable/document_XActionLockable.xba @@ -0,0 +1,85 @@ +<?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="document_XActionLockable" 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.document.XActionLockable +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim bResetOK As Boolean + + Test.StartMethod("resetActionLocks()") + bOK = true + oObj.resetActionLocks() + bResetOK = bOK + + Test.StartMethod("isActionLocked()") + Test.StartMethod("addActionLock()") + bOK = true + bOK = bOK AND NOT oObj.isActionLocked() + oObj.addActionLock() + bOK = bOK AND oObj.isActionLocked() + Test.MethodTested("addActionLock()", bOK) + Test.MethodTested("isActionLocked()", bOK) + + Test.StartMethod("removeActionLock()") + bOK = true + oObj.removeActionLock() + bOK = bOK AND NOT oObj.isActionLocked() + Test.MethodTested("removeActionLock()", bOK) + + Test.StartMethod("setActionLocks()") + bOK = true + oObj.setActionLocks(5) + bOK = bOK AND oObj.resetActionLocks() = 5 + bResetOK = bResetOK AND bOK + Test.MethodTested("setActionLocks()", bOK) + Test.MethodTested("resetActionLocks()", bResetOK) + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/document/XActionLockable/script.xlb b/qadevOOo/tests/basic/ifc/document/XActionLockable/script.xlb new file mode 100644 index 000000000000..e10e4c90a117 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/document/XActionLockable/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="document_XActionLockable" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="document_XActionLockable"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/document/XDocumentInfo/document_XDocumentInfo.xba b/qadevOOo/tests/basic/ifc/document/XDocumentInfo/document_XDocumentInfo.xba new file mode 100644 index 000000000000..42b8f25b0bf3 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/document/XDocumentInfo/document_XDocumentInfo.xba @@ -0,0 +1,94 @@ +<?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="document_XDocumentInfo" 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.document.XDocumentInfo +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim fieldCnt As Variant + Dim oldProp As String, newProp As String, resProp As String + + Test.StartMethod("getUserFieldCount()") + bOK = true + fieldCnt = oObj.getUserFieldCount() + bOK = bOK AND (fieldCnt > 0) + Test.MethodTested("getUserFieldCount()", bOK) + + Test.StartMethod("getUserFieldName()") + bOK = true + oldProp = oObj.getUserFieldName(0) + bOK = bOK AND NOT isNull(oldProp) + Test.MethodTested("getUserFieldName()", bOK) + + Test.StartMethod("setUserFieldName()") + bOK = true + newProp = "_" + oldProp + oObj.setUserFieldName(0, newProp) + resProp = oObj.getUserFieldName(0) + Out.Log("Was: '" + oldProp + "', New: '" + newProp + "', Get: '" + resProp + "'") + bOK = bOK AND (resProp = newProp) + Test.MethodTested("setUserFieldName()", bOK) + + Test.StartMethod("getUserFieldValue()") + bOK = true + oldProp = oObj.getUserFieldValue(0) + bOK = bOK AND NOT isNull(oldProp) + Test.MethodTested("getUserFieldValue()", bOK) + + Test.StartMethod("setUserFieldValue()") + bOK = true + newProp = "_" + oldProp + oObj.setUserFieldValue(0, newProp) + resProp = oObj.getUserFieldValue(0) + Out.Log("Was: '" + oldProp + "', New: '" + newProp + "', Get: '" + resProp + "'") + bOK = bOK AND (resProp = newProp) + Test.MethodTested("setUserFieldValue()", bOK) + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/document/XDocumentInfo/script.xlb b/qadevOOo/tests/basic/ifc/document/XDocumentInfo/script.xlb new file mode 100644 index 000000000000..812b5ccb7e7e --- /dev/null +++ b/qadevOOo/tests/basic/ifc/document/XDocumentInfo/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="document_XDocumentInfo" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="document_XDocumentInfo"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/document/XDocumentInfoSupplier/document_XDocumentInfoSupplier.xba b/qadevOOo/tests/basic/ifc/document/XDocumentInfoSupplier/document_XDocumentInfoSupplier.xba new file mode 100644 index 000000000000..20199ab5d306 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/document/XDocumentInfoSupplier/document_XDocumentInfoSupplier.xba @@ -0,0 +1,61 @@ +<?xml version="1.0" encoding="UTF-8"?> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="document_XDocumentInfoSupplier" 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.document.XDocumentInfoSupplier +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + + + Test.StartMethod("getDocumentInfo()") + bOK = TRUE + bOK = bOK AND isObject(oObj.getDocumentInfo()) + Test.MethodTested("getDocumentInfo()", bOK) + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/document/XDocumentInfoSupplier/script.xlb b/qadevOOo/tests/basic/ifc/document/XDocumentInfoSupplier/script.xlb new file mode 100644 index 000000000000..3b44c76a9c99 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/document/XDocumentInfoSupplier/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="document_XDocumentInfoSupplier" library:readonly="false" library:passwordprotected="false"> + <library:element library:name="document_XDocumentInfoSupplier"/> + </library:library> diff --git a/qadevOOo/tests/basic/ifc/document/XDocumentInsertable/document_XDocumentInsertable.xba b/qadevOOo/tests/basic/ifc/document/XDocumentInsertable/document_XDocumentInsertable.xba new file mode 100644 index 000000000000..f2f508bc0f65 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/document/XDocumentInsertable/document_XDocumentInsertable.xba @@ -0,0 +1,64 @@ +<?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="document_XDocumentInsertable" 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.document.XDocumentInsertable +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim sURL As String + + Test.StartMethod("insertDocumentFromURL()") + bOK = true + sURL = utils.Path2URL(cTestDocsDir + "SwXTextSection.sdw") + oObj.insertDocumentFromURL(sURL, DimArray()) + bOK = bOK AND InStr(oDoc.Text.String, "SwXTextSection") > 0 + Test.MethodTested("insertDocumentFromURL()", bOK) + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/document/XDocumentInsertable/script.xlb b/qadevOOo/tests/basic/ifc/document/XDocumentInsertable/script.xlb new file mode 100644 index 000000000000..4ad1f6c4b1ae --- /dev/null +++ b/qadevOOo/tests/basic/ifc/document/XDocumentInsertable/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="document_XDocumentInsertable" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="document_XDocumentInsertable"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/document/XEmbeddedObjectSupplier/document_XEmbeddedObjectSupplier.xba b/qadevOOo/tests/basic/ifc/document/XEmbeddedObjectSupplier/document_XEmbeddedObjectSupplier.xba new file mode 100644 index 000000000000..bc962faf4660 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/document/XEmbeddedObjectSupplier/document_XEmbeddedObjectSupplier.xba @@ -0,0 +1,64 @@ +<?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="document_XEmbeddedObjectSupplier" 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.document.XEmbeddedObjectSupplier +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim oEObj As Object + + Test.StartMethod("getEmbeddedObject()") + bOK = true + oEObj = oObj.getEmbeddedObject() + bOK = bOK AND NOT isNULL(oEObj) + bOK = bOK AND hasUnoInterfaces(oEObj, "com.sun.star.lang.XComponent") + Test.MethodTested("getEmbeddedObject()", bOK) + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/document/XEmbeddedObjectSupplier/script.xlb b/qadevOOo/tests/basic/ifc/document/XEmbeddedObjectSupplier/script.xlb new file mode 100644 index 000000000000..6cb0db4671af --- /dev/null +++ b/qadevOOo/tests/basic/ifc/document/XEmbeddedObjectSupplier/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="document_XEmbeddedObjectSupplier" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="document_XEmbeddedObjectSupplier"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/document/XEventsSupplier/document_XEventsSupplier.xba b/qadevOOo/tests/basic/ifc/document/XEventsSupplier/document_XEventsSupplier.xba new file mode 100644 index 000000000000..f36518f9debb --- /dev/null +++ b/qadevOOo/tests/basic/ifc/document/XEventsSupplier/document_XEventsSupplier.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="document_XEventsSupplier" 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.document.XEventsSupplier +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + + Test.StartMethod("getEvents()") + bOK = true + bOK = bOK AND hasUnoInterfaces(oObj.getEvents(), "com.sun.star.container.XNameReplace") + Test.MethodTested("getEvents()", bOK) + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/document/XEventsSupplier/script.xlb b/qadevOOo/tests/basic/ifc/document/XEventsSupplier/script.xlb new file mode 100644 index 000000000000..9962039c40a8 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/document/XEventsSupplier/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="document_XEventsSupplier" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="document_XEventsSupplier"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/document/XExporter/document_XExporter.xba b/qadevOOo/tests/basic/ifc/document/XExporter/document_XExporter.xba new file mode 100644 index 000000000000..d69d1676cc97 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/document/XExporter/document_XExporter.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="document_XExporter" 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: + +' - Global oSrcDocument As Object + +'************************************************************************* + + + + + +Sub RunTest() + +'************************************************************************* +' INTERFACE: +' com.sun.star.document.XExporter +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + + Test.StartMethod("setSourceDocument()") + bOK = true + oObj.setSourceDocument(oSrcDocument) + Test.MethodTested("setSourceDocument()", bOK) + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/document/XExporter/script.xlb b/qadevOOo/tests/basic/ifc/document/XExporter/script.xlb new file mode 100644 index 000000000000..cbf12e52cd18 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/document/XExporter/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="document_XExporter" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="document_XExporter"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/document/XFilter/document_XFilter.xba b/qadevOOo/tests/basic/ifc/document/XFilter/document_XFilter.xba new file mode 100644 index 000000000000..d6eb1e62d281 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/document/XFilter/document_XFilter.xba @@ -0,0 +1,89 @@ +<?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="document_XFilter" 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: + +' - Global oFilterDescriptor As Variant +' - Global oDocHandler As Object + +'************************************************************************* + + + + + + +Sub RunTest() + +'************************************************************************* +' INTERFACE: +' com.sun.star.document.XFilter +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim iniParam(1) as Variant + Dim oFilter as Object + + Test.StartMethod("filter()") + bOK = true + bOK = bOK AND oObj.filter(oFilterDescriptor) + bOK = bOK AND checkFilter() + + Test.MethodTested("filter()", bOK) + Test.StartMethod("cancel()") + bOK = true + + oFilter = createUnoService("basichelper.Filter") + + iniParam(0) = oObj + iniParam(1) = oFilterDescriptor + oFilter.initialize(iniParam()) + oObj.Cancel() + + bOK = bOK AND NOT oFilter.getByName("Result") + Test.MethodTested("cancel()", bOK) + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/document/XFilter/script.xlb b/qadevOOo/tests/basic/ifc/document/XFilter/script.xlb new file mode 100644 index 000000000000..0375a4bdac03 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/document/XFilter/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="document_XFilter" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="document_XFilter"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/document/XImporter/document_XImporter.xba b/qadevOOo/tests/basic/ifc/document/XImporter/document_XImporter.xba new file mode 100644 index 000000000000..7ee18b8e87b5 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/document/XImporter/document_XImporter.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="document_XImporter" 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: + +' - Global oSrcDocument As Object + +'************************************************************************* + + + + + +Sub RunTest() + +'************************************************************************* +' INTERFACE: +' com.sun.star.document.XImporter +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + + Test.StartMethod("setTargetDocument()") + bOK = true + oObj.setTargetDocument(oSrcDocument) + Test.MethodTested("setTargetDocument()", bOK) + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/document/XImporter/script.xlb b/qadevOOo/tests/basic/ifc/document/XImporter/script.xlb new file mode 100644 index 000000000000..cd4492011a8a --- /dev/null +++ b/qadevOOo/tests/basic/ifc/document/XImporter/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="document_XImporter" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="document_XImporter"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/document/XLinkTargetSupplier/document_XLinkTargetSupplier.xba b/qadevOOo/tests/basic/ifc/document/XLinkTargetSupplier/document_XLinkTargetSupplier.xba new file mode 100644 index 000000000000..5ca9bed047e5 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/document/XLinkTargetSupplier/document_XLinkTargetSupplier.xba @@ -0,0 +1,61 @@ +<?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="document_XLinkTargetSupplier" 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.document.XLinkTargetSupplier +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + + Test.StartMethod("getLinks()") + bOK = true + oLinks = oObj.getLinks() + bOK = bOK AND isObject(oLinks) + bOK = bOK AND hasUnoInterfaces(oLinks, "com.sun.star.container.XNameAccess") + Test.MethodTested("getLinks()", bOK) + + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/document/XLinkTargetSupplier/script.xlb b/qadevOOo/tests/basic/ifc/document/XLinkTargetSupplier/script.xlb new file mode 100644 index 000000000000..bbf245a7347b --- /dev/null +++ b/qadevOOo/tests/basic/ifc/document/XLinkTargetSupplier/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="document_XLinkTargetSupplier" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="document_XLinkTargetSupplier"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/document/XMimeTypeInfo/document_XMimeTypeInfo.xba b/qadevOOo/tests/basic/ifc/document/XMimeTypeInfo/document_XMimeTypeInfo.xba new file mode 100644 index 000000000000..e2ba8676a170 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/document/XMimeTypeInfo/document_XMimeTypeInfo.xba @@ -0,0 +1,67 @@ +<?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="document_XMimeTypeInfo" 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.document.XMimeTypeInfo +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + + Test.StartMethod("getSupportedMimeTypeNames()") + Dim names As Variant + names = oObj.getSupportedMimeTypeNames() + bOK = ubound(names) > 0 + out.log("Number of supported mime types: " + ubound(names)) + Test.MethodTested("getSupportedMimeTypeNames()", bOK) + + Test.StartMethod("supportsMimeType()") + bOK = oObj.supportsMimeType(names(0)) + Test.MethodTested("supportsMimeType()", bOK) + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/document/XMimeTypeInfo/script.xlb b/qadevOOo/tests/basic/ifc/document/XMimeTypeInfo/script.xlb new file mode 100644 index 000000000000..8257ee12fc6b --- /dev/null +++ b/qadevOOo/tests/basic/ifc/document/XMimeTypeInfo/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="document_XMimeTypeInfo" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="document_XMimeTypeInfo"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/document/XStandaloneDocumentInfo/document_XStandaloneDocumentInfo.xba b/qadevOOo/tests/basic/ifc/document/XStandaloneDocumentInfo/document_XStandaloneDocumentInfo.xba new file mode 100644 index 000000000000..8ccb9db3d012 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/document/XStandaloneDocumentInfo/document_XStandaloneDocumentInfo.xba @@ -0,0 +1,85 @@ +<?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="document_XStandaloneDocumentInfo" 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: + +' - Global documentURL As String + +'************************************************************************* + + + + + + +Sub RunTest() + +'************************************************************************* +' INTERFACE: +' com.sun.star.document.XStandaloneDocumentInfo +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim oldProp As Variant, newProp As Variant, resProp As Variant + + Test.StartMethod("loadFromURL()") + Test.StartMethod("storeIntoURL()") + + bOK = true + oObj.loadFromURL(documentURL) + oldProp = oObj.Author + newProp = oldProp + "_" + oObj.Author = newProp + oObj.storeIntoURL(documentURL) + oObj.loadFromURL(documentURL) + resProp = oObj.Author + Out.Log("Was: '" + oldProp + "',Set: '" + newProp + "', New: " + resProp + "'") + bOK = bOK AND (resProp = newProp) + + Test.MethodTested("loadFromURL()", bOK) + Test.MethodTested("storeIntoURL()", bOK) + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/document/XStandaloneDocumentInfo/script.xlb b/qadevOOo/tests/basic/ifc/document/XStandaloneDocumentInfo/script.xlb new file mode 100644 index 000000000000..76eb171f19a2 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/document/XStandaloneDocumentInfo/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="document_XStandaloneDocumentInfo" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="document_XStandaloneDocumentInfo"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/document/XTypeDetection/document_XTypeDetection.xba b/qadevOOo/tests/basic/ifc/document/XTypeDetection/document_XTypeDetection.xba new file mode 100644 index 000000000000..f6cb7a6099cc --- /dev/null +++ b/qadevOOo/tests/basic/ifc/document/XTypeDetection/document_XTypeDetection.xba @@ -0,0 +1,79 @@ +<?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="document_XTypeDetection" 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.document.XTypeDetection +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + + Test.StartMethod("queryTypeByURL()") + bOK = true + Dim docURL As String + docURL = Path2URL(cTestDocsDir) + "XTypeDetection.sxw" + + Dim typ As String + typ = oObj.queryTypeByURL(docURL) + Out.log("queryTypeByURL(" + docURL + "): " + typ) + bOK = instr(typ, "writer") > 0 + Test.MethodTested("queryTypeByURL()", bOK) + + Test.StartMethod("queryTypeByDescriptor()") + Dim mediaDescr(0) As new com.sun.star.beans.PropertyValue + mediaDescr(0).Name = "URL" + mediaDescr(0).Value = docURL + typ = oObj.queryTypeByDescriptor(mediaDescr(), false) + Out.log("queryTypeByDescriptor(descr, false): " + typ) + bOK = instr(typ, "writer") > 0 + typ = oObj.queryTypeByDescriptor(mediaDescr(), true) + Out.log("queryTypeByDescriptor(descr, false): " + typ) + bOK = instr(typ, "calc") > 0 + Test.MethodTested("queryTypeByDescriptor()", bOK) +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/document/XTypeDetection/script.xlb b/qadevOOo/tests/basic/ifc/document/XTypeDetection/script.xlb new file mode 100644 index 000000000000..aa9d1b3da865 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/document/XTypeDetection/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="document_XTypeDetection" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="document_XTypeDetection"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/document/XViewDataSupplier/document_XViewDataSupplier.xba b/qadevOOo/tests/basic/ifc/document/XViewDataSupplier/document_XViewDataSupplier.xba new file mode 100644 index 000000000000..1142755128a9 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/document/XViewDataSupplier/document_XViewDataSupplier.xba @@ -0,0 +1,62 @@ +<?xml version="1.0" encoding="UTF-8"?> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="document_XViewDataSupplier" 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.document.XViewDataSupplier +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim oDat as Object + + Test.StartMethod("getViewData()") + bOK = TRUE + oDat = oObj.getViewData() + bOK = bOK AND hasUnoInterfaces(oDat, "com.sun.star.container.XIndexAccess") + Test.MethodTested("getViewData()", bOK) + + Test.StartMethod("setViewData()") + bOK = TRUE + oObj.setViewData(oDat) + Test.MethodTested("setViewData()", bOK) + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/document/XViewDataSupplier/script.xlb b/qadevOOo/tests/basic/ifc/document/XViewDataSupplier/script.xlb new file mode 100644 index 000000000000..e1afb0f1af9f --- /dev/null +++ b/qadevOOo/tests/basic/ifc/document/XViewDataSupplier/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="document_XViewDataSupplier" library:readonly="false" library:passwordprotected="false"> + <library:element library:name="document_XViewDataSupplier"/> + </library:library> |