diff options
Diffstat (limited to 'qadevOOo/tests/basic/mod/svx')
60 files changed, 2902 insertions, 0 deletions
diff --git a/qadevOOo/tests/basic/mod/svx/AccessibleControlShape/script.xlb b/qadevOOo/tests/basic/mod/svx/AccessibleControlShape/script.xlb new file mode 100644 index 000000000000..77d4ad179a8b --- /dev/null +++ b/qadevOOo/tests/basic/mod/svx/AccessibleControlShape/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="svx_AccessibleControlShape" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="svx_AccessibleControlShape"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/svx/AccessibleControlShape/svx_AccessibleControlShape.xba b/qadevOOo/tests/basic/mod/svx/AccessibleControlShape/svx_AccessibleControlShape.xba new file mode 100644 index 000000000000..3c9d71237bb6 --- /dev/null +++ b/qadevOOo/tests/basic/mod/svx/AccessibleControlShape/svx_AccessibleControlShape.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="svx_AccessibleControlShape" 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 + + +' REQUIRED VARIABLES for interface/service tests: +Global oShape As Object +Global accText As String +Global hasChangeableAttrs As Boolean + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' svx.AccessibleControlShape +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim oWin As Object, xRoot As Object, oDP As Object + Dim newSize As New com.sun.star.awt.Size + + oDoc = utils.createDocument("sdraw", cObjectName) + oShape = toolkittools.createControlShapeWithDefaultControl("CommandButton") + newSize = oShape.getSize() + newSize.Width = 2000 + newSize.Height = 1000 + oShape.setSize(newSize) + oDP = oDoc.getDrawPages().getByIndex(0) + oDP.add(oShape) + oWin = utils.at_getCurrentWindow(oDoc) + xRoot = utils.at_getAccessibleObject(oWin) + oObj = utils.at_getAccessibleObjectForRole(xRoot, com.sun.star.accessibility.AccessibleRole.SHAPE,"PushButton") + Out.Log("ImplementationName: "+oObj.getImplementationName()) + if hasUNOInterfaces(oObj,"com.sun.star.accessibility.XAccessibleText") then + accText = oObj.getText() + End If + hasChangeableAttrs = true + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub DisposeObj() + utils.closeObject(oDoc) +End Sub + +Sub fireEvent() + Dim oSize As New com.sun.star.awt.Size + oSize = oShape.getSize() + oSize.Width = oSize.Width + 100 + oShape.setSize(oSize) +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/svx/AccessibleEditableTextPara/script.xlb b/qadevOOo/tests/basic/mod/svx/AccessibleEditableTextPara/script.xlb new file mode 100644 index 000000000000..75b3b77785b0 --- /dev/null +++ b/qadevOOo/tests/basic/mod/svx/AccessibleEditableTextPara/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="svx_AccessibleEditableTextPara" library:readonly="false" library:passwordprotected="false"> + <library:element library:name="svx_AccessibleEditableTextPara"/> + </library:library> diff --git a/qadevOOo/tests/basic/mod/svx/AccessibleEditableTextPara/svx_AccessibleEditableTextPara.xba b/qadevOOo/tests/basic/mod/svx/AccessibleEditableTextPara/svx_AccessibleEditableTextPara.xba new file mode 100644 index 000000000000..3cc36dc5665b --- /dev/null +++ b/qadevOOo/tests/basic/mod/svx/AccessibleEditableTextPara/svx_AccessibleEditableTextPara.xba @@ -0,0 +1,108 @@ +<?xml version="1.0" encoding="UTF-8"?> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="AccessibleEditableTextPara" 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 + + +' REQUIRED VARIABLES for interface/service tests: + +' "com::sun::star::accessibility::XAccessibleEditableText#optional" + ' needs the following object relation: + global hasChangeableAttrs as boolean + +' "com::sun::star::accessibility::XAccessibleSelection#optional" + ' needs the following object relation: +' Global multiSelection As Boolean + +' "com::sun::star::accessibility::XAccessibleText" + ' needs the following object relation: + Global accText as String + Global readOnly as Boolean + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' com.sun.star.AccessibleEditableTextPara +'************************************************************************* +On Error Goto ErrHndl + + oDoc = utils.createDocument("sdraw", cObjectName) + + Dim oShape As Object + oShape = oDoc.createInstance("com.sun.star.drawing.TextShape") + + oDoc.DrawPages(0).add(oShape) + + Dim oSize As new com.sun.star.awt.Size + Dim oPos As new com.sun.star.awt.Point + oSize.Width = 7500 + oSize.Height = 5000 + oPos.X = 5000 + oPos.Y = 3500 + oShape.Size = oSize + oShape.Position = oPos + + Dim cursor As Object + cursor = oShape.createTextCursor() + + oShape.insertString(cursor, "Paragraph 1", false) + oShape.insertControlCharacter(cursor, com.sun.star.text.ControlCharacter.PARAGRAPH_BREAK, false) + + Dim oWin as Object + Dim xRoot as Object + + oWin = utils.at_getCurrentWindow(oDoc) + xRoot = utils.at_getAccessibleObject(oWin) + oObj = utils.at_getAccessibleObjectForRole(xRoot, _ + com.sun.star.accessibility.AccessibleRole.PARAGRAPH,"Paragraph 0") + Out.Log("Implementation Name: "+oObj.getImplementationName()) + accText = "My AccessibleEditableTextPara text" + oObj.setText(accText) + readOnly = false + hasChangeableAttrs = false + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub fireEvent() + Dim myText as String + myText = oObj.getText() + oObj.setText(myText + "dummy") + wait(1000) + oObj.setText(myText) + wait(1000) +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/svx/AccessibleGraphicShape/script.xlb b/qadevOOo/tests/basic/mod/svx/AccessibleGraphicShape/script.xlb new file mode 100644 index 000000000000..68aabd47df19 --- /dev/null +++ b/qadevOOo/tests/basic/mod/svx/AccessibleGraphicShape/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="svx_AccessibleGraphicShape" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="svx_AccessibleGraphicShape"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/svx/AccessibleGraphicShape/svx_AccessibleGraphicShape.xba b/qadevOOo/tests/basic/mod/svx/AccessibleGraphicShape/svx_AccessibleGraphicShape.xba new file mode 100644 index 000000000000..ba3b7268d5b5 --- /dev/null +++ b/qadevOOo/tests/basic/mod/svx/AccessibleGraphicShape/svx_AccessibleGraphicShape.xba @@ -0,0 +1,83 @@ +<?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="svx_AccessibleGraphicShape" 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 + + +' REQUIRED VARIABLES for interface/service tests: +Global oShape As Object +Global accText As String +Global hasChangeableAttrs As Boolean + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' svx.AccessibleGraphicShape +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim oWin As Object, xRoot As Object, oDP As Object + + oDoc = utils.createDocument("sdraw", cObjectName) + oDP = oDoc.getDrawPages().getByIndex(0) + oShape = toolkittools.addShapeToDrawDoc(oDP,2000,1500,"GraphicObject") + oWin = utils.at_getCurrentWindow(oDoc) + xRoot = utils.at_getAccessibleObject(oWin) + oObj = utils.at_getAccessibleObjectForRole(xRoot, com.sun.star.accessibility.AccessibleRole.SHAPE,"GraphicObject") + Out.Log("Implementation Name: "+oObj.getImplementationName()) + if hasUNOInterfaces(oObj,"com.sun.star.accessibility.XAccessibleText") then + accText = oObj.getText() + End If + hasChangeableAttrs = true + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub DisposeObj() + utils.closeObject(oDoc) +End Sub + +Sub fireEvent() + Dim oSize As New com.sun.star.awt.Size + oSize = oShape.getSize() + oSize.Width = oSize.Width + 100 + oShape.setSize(oSize) +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/svx/AccessibleOLEShape/script.xlb b/qadevOOo/tests/basic/mod/svx/AccessibleOLEShape/script.xlb new file mode 100644 index 000000000000..b5489ac01e47 --- /dev/null +++ b/qadevOOo/tests/basic/mod/svx/AccessibleOLEShape/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="svx_AccessibleOLEShape" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="svx_AccessibleOLEShape"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/svx/AccessibleOLEShape/svx_AccessibleOLEShape.xba b/qadevOOo/tests/basic/mod/svx/AccessibleOLEShape/svx_AccessibleOLEShape.xba new file mode 100644 index 000000000000..f30a5d9f977f --- /dev/null +++ b/qadevOOo/tests/basic/mod/svx/AccessibleOLEShape/svx_AccessibleOLEShape.xba @@ -0,0 +1,83 @@ +<?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="svx_AccessibleOLEShape" 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 + + +' REQUIRED VARIABLES for interface/service tests: +Global oShape As Object +Global accText As String +Global hasChangeableAttrs As Boolean + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' svx.AccessibleOLEShape +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim oWin As Object, xRoot As Object, oDP As Object + + oDoc = utils.createDocument("sdraw", cObjectName) + oDP = oDoc.getDrawPages().getByIndex(0) + oShape = toolkittools.addShapeToDrawDoc(oDP,2000,1500,"OLE2") + oWin = utils.at_getCurrentWindow(oDoc) + xRoot = utils.at_getAccessibleObject(oWin) + oObj = utils.at_getAccessibleObjectForRole(xRoot, com.sun.star.accessibility.AccessibleRole.SHAPE,"OLEShape") + Out.Log("Implementation Name: "+oObj.getImplementationName()) + if hasUNOInterfaces(oObj,"com.sun.star.accessibility.XAccessibleText") then + accText = oObj.getText() + End If + hasChangeableAttrs = true + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub DisposeObj() + utils.closeObject(oDoc) +End Sub + +Sub fireEvent() + Dim oSize As New com.sun.star.awt.Size + oSize = oShape.getSize() + oSize.Width = oSize.Width + 100 + oShape.setSize(oSize) +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/svx/AccessiblePageShape/script.xlb b/qadevOOo/tests/basic/mod/svx/AccessiblePageShape/script.xlb new file mode 100644 index 000000000000..bae91fa48bb8 --- /dev/null +++ b/qadevOOo/tests/basic/mod/svx/AccessiblePageShape/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="svx_AccessiblePageShape" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="svx_AccessiblePageShape"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/svx/AccessiblePageShape/svx_AccessiblePageShape.xba b/qadevOOo/tests/basic/mod/svx/AccessiblePageShape/svx_AccessiblePageShape.xba new file mode 100644 index 000000000000..b657a5d9a43d --- /dev/null +++ b/qadevOOo/tests/basic/mod/svx/AccessiblePageShape/svx_AccessiblePageShape.xba @@ -0,0 +1,86 @@ +<?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="svx_AccessiblePageShape" 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 + + +' REQUIRED VARIABLES for interface/service tests: +Global oPage As Object +Global accText As String +Global hasChangeableAttrs As Boolean + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' svx.AccessiblePageShape +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim oWin As Object, xRoot As Object + + oDoc = utils.createDocument("sdraw", cObjectName) + oPage = oDoc.getDrawPages().getByIndex(0) + oWin = utils.at_getCurrentWindow(oDoc) + xRoot = utils.at_getAccessibleObject(oWin) + oObj = utils.at_getAccessibleObjectForRole(xRoot, com.sun.star.accessibility.AccessibleRole.SHAPE,"PageShape") + Out.Log("Implementation Name: "+oObj.getImplementationName()) + if hasUNOInterfaces(oObj,"com.sun.star.accessibility.XAccessibleText") then + accText = oObj.getText() + End If + hasChangeableAttrs = true + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub DisposeObj() + utils.closeObject(oDoc) +End Sub + +Sub fireEvent() + Dim oldHeight As Integer, newHeight As Integer + oldHeight = oPage.getPropertyValue("Height") + if oldHeight = 3000 then + newHeight = 5000 + else + newHeight = 3000 + end if + oPage.setPropertyValue("Height",newHeight) +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/svx/AccessiblePresentationGraphicShape/script.xlb b/qadevOOo/tests/basic/mod/svx/AccessiblePresentationGraphicShape/script.xlb new file mode 100644 index 000000000000..5c4ed50fcd54 --- /dev/null +++ b/qadevOOo/tests/basic/mod/svx/AccessiblePresentationGraphicShape/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="svx_AccessiblePresentationGraphicShape" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="svx_AccessiblePresentationGraphicShape"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/svx/AccessiblePresentationGraphicShape/svx_AccessiblePresentationGraphicShape.xba b/qadevOOo/tests/basic/mod/svx/AccessiblePresentationGraphicShape/svx_AccessiblePresentationGraphicShape.xba new file mode 100644 index 000000000000..a80bad77237b --- /dev/null +++ b/qadevOOo/tests/basic/mod/svx/AccessiblePresentationGraphicShape/svx_AccessiblePresentationGraphicShape.xba @@ -0,0 +1,86 @@ +<?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="svx_AccessiblePresentationGraphicShape" 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 + + +' REQUIRED VARIABLES for interface/service tests: +Global oShape As Object +Global accText As Object +Global hasChangeableAttrs As Boolean + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' svx.AccessiblePresentationGraphicShape +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim oWin As Object, xRoot As Object, oDP As Object + + oDoc = utils.createImpressDocument(cObjectName) + oShape = oDoc.createInstance("com.sun.star.presentation.GraphicObjectShape") + oDP = oDoc.getDrawPages().getByIndex(0) + oDP.add(oShape) + oShape.setPropertyValue("IsEmptyPresentationObject",false) + wait(1000) + oWin = utils.at_getCurrentWindow(oDoc) + xRoot = utils.at_getAccessibleObject(oWin) + oObj = utils.at_getAccessibleObjectForRole(xRoot, com.sun.star.accessibility.AccessibleRole.SHAPE,"ImpressGraphicObject0") + Out.Log("Implementation Name: "+oObj.getImplementationName()) + if hasUNOInterfaces(oObj,"com.sun.star.accessibility.XAccessibleText") then + accText = oObj.getText() + End If + hasChangeableAttrs = true + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub DisposeObj() + utils.closeObject(oDoc) +End Sub + +Sub fireEvent() + Dim oSize As New com.sun.star.awt.Size + oSize = oShape.getSize() + oSize.Width = oSize.Width + 100 + oShape.setSize(oSize) +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/svx/AccessiblePresentationOLEShape/script.xlb b/qadevOOo/tests/basic/mod/svx/AccessiblePresentationOLEShape/script.xlb new file mode 100644 index 000000000000..28a82bbc9a42 --- /dev/null +++ b/qadevOOo/tests/basic/mod/svx/AccessiblePresentationOLEShape/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="svx_AccessiblePresentationOLEShape" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="svx_AccessiblePresentationOLEShape"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/svx/AccessiblePresentationOLEShape/svx_AccessiblePresentationOLEShape.xba b/qadevOOo/tests/basic/mod/svx/AccessiblePresentationOLEShape/svx_AccessiblePresentationOLEShape.xba new file mode 100644 index 000000000000..dce2a97ed8e5 --- /dev/null +++ b/qadevOOo/tests/basic/mod/svx/AccessiblePresentationOLEShape/svx_AccessiblePresentationOLEShape.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="svx_AccessiblePresentationOLEShape" 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 + + +' REQUIRED VARIABLES for interface/service tests: +Global oShape As Object +Global accText As String +Global hasChangeableAttrs As Boolean + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' svx.AccessiblePresentationOLEShape +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim oWin As Object, xRoot As Object, oDP As Object + + oDoc = utils.createImpressDocument(cObjectName) + oShape = oDoc.createInstance("com.sun.star.presentation.OLE2Shape") + oDP = oDoc.getDrawPages().getByIndex(0) + oDP.add(oShape) + oShape.setPropertyValue("IsEmptyPresentationObject",false) + wait(1000) + oWin = utils.at_getCurrentWindow(oDoc) + xRoot = utils.at_getAccessibleObject(oWin) + oObj = utils.at_getAccessibleObjectForRole(xRoot, com.sun.star.accessibility.AccessibleRole.SHAPE,"ImpressOLE0") + if hasUNOInterfaces(oObj,"com.sun.star.accessibility.XAccessibleText") then + accText = oObj.getText() + End If + hasChangeableAttrs = true + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub DisposeObj() + utils.closeObject(oDoc) +End Sub + +Sub fireEvent() + Dim oSize As New com.sun.star.awt.Size + oSize = oShape.getSize() + oSize.Width = oSize.Width + 100 + oShape.setSize(oSize) +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/svx/AccessiblePresentationShape/script.xlb b/qadevOOo/tests/basic/mod/svx/AccessiblePresentationShape/script.xlb new file mode 100644 index 000000000000..0d8026ccc39b --- /dev/null +++ b/qadevOOo/tests/basic/mod/svx/AccessiblePresentationShape/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="svx_AccessiblePresentationShape" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="svx_AccessiblePresentationShape"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/svx/AccessiblePresentationShape/svx_AccessiblePresentationShape.xba b/qadevOOo/tests/basic/mod/svx/AccessiblePresentationShape/svx_AccessiblePresentationShape.xba new file mode 100644 index 000000000000..46c8789fb3b4 --- /dev/null +++ b/qadevOOo/tests/basic/mod/svx/AccessiblePresentationShape/svx_AccessiblePresentationShape.xba @@ -0,0 +1,87 @@ +<?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="svx_AccessiblePresentationShape" 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 + + +' REQUIRED VARIABLES for interface/service tests: +Global oShape As Object +Global accText As String +Global hasChangeableAttrs As Boolean + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' svx.AccessiblePresentationShape +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean, oDP As Object + Dim oWin As Object, xRoot As Object + + oDoc = utils.createImpressDocument(cObjectName) + oShape = oDoc.createInstance("com.sun.star.presentation.HandoutShape") + oDP = oDoc.getDrawPages().getByIndex(0) + oDP.add(oShape) + oShape.setPropertyValue("IsEmptyPresentationObject",false) + wait(1000) + oWin = utils.at_getCurrentWindow(oDoc) + xRoot = utils.at_getAccessibleObject(oWin) + oObj = utils.at_getAccessibleObjectForRole(xRoot, com.sun.star.accessibility.AccessibleRole.SHAPE,"ImpressHandout0") + Out.Log("Implementation Name: "+oObj.getImplementationName()) + if hasUNOInterfaces(oObj,"com.sun.star.accessibility.XAccessibleText") then + accText = oObj.getText() + Out.Log("Text: "+accText) + End If + hasChangeableAttrs = true + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub DisposeObj() + utils.closeObject(oDoc) +End Sub + +Sub fireEvent() + Dim oSize As New com.sun.star.awt.Size + oSize = oShape.getSize() + oSize.Width = oSize.Width + 100 + oShape.setSize(oSize) +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/svx/AccessibleShape/script.xlb b/qadevOOo/tests/basic/mod/svx/AccessibleShape/script.xlb new file mode 100644 index 000000000000..a19b93caf59c --- /dev/null +++ b/qadevOOo/tests/basic/mod/svx/AccessibleShape/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="svx_AccessibleShape" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="svx_AccessibleShape"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/svx/AccessibleShape/svx_AccessibleShape.xba b/qadevOOo/tests/basic/mod/svx/AccessibleShape/svx_AccessibleShape.xba new file mode 100644 index 000000000000..df23003fe75f --- /dev/null +++ b/qadevOOo/tests/basic/mod/svx/AccessibleShape/svx_AccessibleShape.xba @@ -0,0 +1,83 @@ +<?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="svx_AccessibleShape" 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 + + +' REQUIRED VARIABLES for interface/service tests: +Global oShape As Object +Global accText As String +Global hasChangeableAttrs As Boolean + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' svx.AccessibleShape +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim oWin As Object, xRoot As Object, oDP As Object + + oDoc = utils.createDocument("sdraw", cObjectName) + oDP = oDoc.getDrawPages().getByIndex(0) + oShape = toolkittools.addShapeToDrawDoc(oDP,2000,1500,"Rectangle") + oWin = utils.at_getCurrentWindow(oDoc) + xRoot = utils.at_getAccessibleObject(oWin) + oObj = utils.at_getAccessibleObjectForRole(xRoot, com.sun.star.accessibility.AccessibleRole.SHAPE,"Rectangle") + Out.Log("Implementation Name: "+oObj.getImplementationName()) + if hasUNOInterfaces(oObj,"com.sun.star.accessibility.XAccessibleText") then + accText = oObj.getText() + End If + hasChangeableAttrs = true + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub DisposeObj() + utils.closeObject(oDoc) +End Sub + +Sub fireEvent() + Dim oSize As New com.sun.star.awt.Size + oSize = oShape.getSize() + oSize.Width = oSize.Width + 100 + oShape.setSize(oSize) +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/svx/GraphicExporter/script.xlb b/qadevOOo/tests/basic/mod/svx/GraphicExporter/script.xlb new file mode 100644 index 000000000000..e71cdd2c295c --- /dev/null +++ b/qadevOOo/tests/basic/mod/svx/GraphicExporter/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="svx_GraphicExporter" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="svx_GraphicExporter"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/svx/GraphicExporter/svx_GraphicExporter.xba b/qadevOOo/tests/basic/mod/svx/GraphicExporter/svx_GraphicExporter.xba new file mode 100644 index 000000000000..d2ba0465ea4a --- /dev/null +++ b/qadevOOo/tests/basic/mod/svx/GraphicExporter/svx_GraphicExporter.xba @@ -0,0 +1,109 @@ +<?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="svx_GraphicExporter" 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 + + +' REQUIRED VARIABLES for interface/service tests: +' Requiered for com.sun.star.document.XFilter + Global oFilterDescriptor As Variant + Global pictureURL As String + +' Requiered for com.sun.star.document.XExporter + Global oSrcDocument As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' svx.GraphicExporter +'************************************************************************* +On Error Goto ErrHndl + + oDoc = utils.createDocument("sdraw", cObjectName) + oObj = createUnoService("com.sun.star.drawing.GraphicExportFilter") + + Dim shape As Object + shape = oDoc.createInstance("com.sun.star.drawing.GraphicObjectShape") + out.log("create com.sun.star.drawing.GraphicObjectShape : is NULL? " + IsNULL(shape)) + + Dim shapeSize As new com.sun.star.awt.Size + Dim shapePos As new com.sun.star.awt.Point + shapeSize.Width = 5000 + shapeSize.Height = 5000 + out.log("set size of shape : " + shapeSize.Width + ", " + shapeSize.Height) + shape.setSize(shapeSize) + shapePos.x = 1500 + shapePos.y = 1000 + out.log("set position of shape : " + shapePos.x + ", " + shapePos.y) + shape.setPosition(shapePos) + out.log("adds created shape") + oDoc.getDrawPages.getByIndex(0).add(shape) + out.log("set GraphicURL to " + utils.Path2URL(cTestDocsDir & "space-metal.jpg") ) + shape.GraphicURL = utils.Path2URL(cTestDocsDir & "space-metal.jpg") + out.log("set shape as source document for created object") + oObj.setSourceDocument(shape) + oSrcDocument = shape + + Dim _Filter(2) As New com.sun.star.beans.PropertyValue + _Filter(0).Name = "FilterName" : _Filter(0).Value = "JPG" + Dim url as new com.sun.star.util.URL + url.Complete = utils.getTempFileURL("picture.jpg", True) + pictureURL = url.Complete + out.log("URL descriptor : " + pictureURL) + _Filter(1).Name = "URL" : _Filter(1).Value = url + _Filter(2).Name = "MediaType" : _Filter(1).Value = "image/jpeg" + oFilterDescriptor = _Filter() + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Function checkFilter() As Boolean + If IsNULL(soapi_test_hidewindows) Or soapi_test_hidewindows = True Then + out.log("all windows are hide") + checkFilter() = True + Else + Dim simpleFile As Object + simpleFile = createUnoService("com.sun.star.ucb.SimpleFileAccess") + out.log("creates com.sun.star.ucb.SimpleFileAccess : is NULL? " + IsNULL(SimpleFile)) + checkFilter() = simpleFile.exists(pictureURL) + out.log("check existing of " + pictureURL + ": " + checkFilter) + EndIf +End Function +</script:module> diff --git a/qadevOOo/tests/basic/mod/svx/SvxDrawPage/script.xlb b/qadevOOo/tests/basic/mod/svx/SvxDrawPage/script.xlb new file mode 100644 index 000000000000..92cbb03d1a70 --- /dev/null +++ b/qadevOOo/tests/basic/mod/svx/SvxDrawPage/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="svx_SvxDrawPage" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="svx_SvxDrawPage"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/svx/SvxDrawPage/svx_SvxDrawPage.xba b/qadevOOo/tests/basic/mod/svx/SvxDrawPage/svx_SvxDrawPage.xba new file mode 100644 index 000000000000..93bf472a1f72 --- /dev/null +++ b/qadevOOo/tests/basic/mod/svx/SvxDrawPage/svx_SvxDrawPage.xba @@ -0,0 +1,125 @@ +<?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="svx_SvxDrawPage" 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. +' +'************************************************************************* +'************************************************************************* + + + + +' REQUIRED VARIABLES for interface/service tests: + +' Requiered for com.sun.star.container.XNamed + Global cNameToSet As String ' "fixed" if name is fixed + +' Requiered for com.sun.star.drawing.XShapeGrouper + Global oGrouperCollection As Object 'groupable objects +' Requiered for com.sun.star.drawing.XShapes + Global oXShapeInstance As Object 'to add/remove +' Requiered for com.sun.star.drawing.XShapeCombiner + Global oCombinerCollection As Object +' Requiered for com.sun.star.drawing.XShapeBinder + Global oBinderCollection As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' svx.SvxDrawPage +'************************************************************************* +On Error Goto ErrHndl + + Dim bOK As Boolean + bOK = true + + oDoc = utils.createDocument("sdraw", cObjectName) + + Dim aPoint As New com.sun.star.awt.Point + Dim aSize As New com.sun.star.awt.Size + aPoint.x = 100 + aPoint.y = 200 + aSize.Width = 3000 + aSize.Height = 4000 + oXShapeInstance = oDoc.createInstance("com.sun.star.drawing.RectangleShape") + oXShapeInstance.Size = aSize + oXShapeInstance.Position = aPoint + oXShapeInstance.FillColor = RGB(255, 0, 0) + + oDrawPage = oDoc.DrawPages(0) + oObj = oDrawPage + + oGrouperCollection = createUNOService("com.sun.star.drawing.ShapeCollection") + oCombinerCollection = createUNOService("com.sun.star.drawing.ShapeCollection") + oBinderCollection = createUNOService("com.sun.star.drawing.ShapeCollection") + + AddShape(oObj, 100, 200, "com.sun.star.drawing.LineShape") + AddShape(oObj, 200, 200, "com.sun.star.drawing.EllipseShape") + + oShape = oObj.getByIndex(0) + oGrouperCollection.Add(oShape) + oShape = oObj.getByIndex(1) + oGrouperCollection.Add(oShape) + + AddShape(oObj, 300, 200, "com.sun.star.drawing.LineShape") + AddShape(oObj, 400, 200, "com.sun.star.drawing.EllipseShape") + oShape = oObj.getByIndex(2) + oCombinerCollection.Add(oShape) + oShape = oObj.getByIndex(3) + oCombinerCollection.Add(oShape) + + AddShape(oObj, 500, 200, "com.sun.star.drawing.LineShape") + AddShape(oObj, 600, 200, "com.sun.star.drawing.EllipseShape") + oShape = oObj.getByIndex(4) + oBinderCollection.Add(oShape) + oShape = oObj.getByIndex(5) + oBinderCollection.Add(oShape) + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +sub AddShape(oPage as Object, nPosX, nPosY as Integer, shapeService As String) + Dim aPoint As New com.sun.star.awt.Point + Dim aSize As New com.sun.star.awt.Size + Dim oShape As Object + + aPoint.x = nPosX + aPoint.y = nPosY + aSize.Width = 10000 + aSize.Height = 10000 + oShape = oDoc.createInstance(shapeService) + oShape.Size = aSize + oShape.Position = aPoint + oShape.FillColor = RGB(255, 0, 0) + oPage.add(oShape) +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/svx/SvxGraphCtrlAccessibleContext/script.xlb b/qadevOOo/tests/basic/mod/svx/SvxGraphCtrlAccessibleContext/script.xlb new file mode 100644 index 000000000000..91ba4fe53e18 --- /dev/null +++ b/qadevOOo/tests/basic/mod/svx/SvxGraphCtrlAccessibleContext/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="svx_SvxGraphCtrlAccessibleContext" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="svx_SvxGraphCtrlAccessibleContext"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/svx/SvxGraphCtrlAccessibleContext/svx_SvxGraphCtrlAccessibleContext.xba b/qadevOOo/tests/basic/mod/svx/SvxGraphCtrlAccessibleContext/svx_SvxGraphCtrlAccessibleContext.xba new file mode 100644 index 000000000000..1eff0e117047 --- /dev/null +++ b/qadevOOo/tests/basic/mod/svx/SvxGraphCtrlAccessibleContext/svx_SvxGraphCtrlAccessibleContext.xba @@ -0,0 +1,102 @@ +<?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="svx_SvxGraphCtrlAccessibleContext" 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 + + +' REQUIRED VARIABLES for interface/service tests: +Global xController As Object +Global oShape As Object +Global multiSelection As Boolean + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' svx.SvxGraphCtrlAccessibleContext +'************************************************************************* +On Error Goto ErrHndl + Dim oWin As Object, xRoot As Object + Dim oDP As Object, url As String + Dim newSize As New com.sun.star.awt.Size + Dim aUrl As new com.sun.star.util.URL + Dim xDispatcher As Object, urlTransformer As Object + Dim tk As Object + + 'creating document, toolkit and adding shape + oDoc = utils.createDocument("sdraw", cObjectName) + tk = createUnoService("com.sun.star.awt.Toolkit") + oShape = oDoc.createInstance("com.sun.star.drawing.GraphicObjectShape") + newSize = oShape.getSize() + newSize.Width = 5000 + newSize.Height = 5000 + oShape.setSize(newSize) + url = utils.Path2URL(cTestDocsDir + "space-metal.jpg") + Out.log("URL: "+url) + oShape.setPropertyValue("GraphicURL", url) + wait(500) + oDoc.getDrawPages().getByIndex(0).add(oShape) + wait(1000) + + 'opening ImageMapDialog + urlTransformer = createUNOService("com.sun.star.util.URLTransformer") + aUrl.Complete = "slot:10371" + urlTransformer.parseStrict(aUrl) + wait(500) + xController = oDoc.getCurrentController() + xDispatcher = xController.queryDispatch(aUrl,"",0) + if (NOT isNull(xDispatcher)) then + xDispatcher.dispatch(aUrl, DimArray()) + wait(2000) + oWin = tk.getActiveTopWindow() + xRoot = utils.at_getAccessibleObject(oWin) + oObj = utils.at_getAccessibleObjectForRole(xRoot, com.sun.star.accessibility.AccessibleRole.PANEL) + Out.Log("Implementation name: "+oObj.getImplementationName()) + multiSelection = true + else + Out.Log("QueryDispatch FAILED. Cannot open ImageMapDialog...") + End If + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub fireEvent() + xController.select(oShape) + wait(500) +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/svx/SvxGraphicObject/script.xlb b/qadevOOo/tests/basic/mod/svx/SvxGraphicObject/script.xlb new file mode 100644 index 000000000000..7a7140bbdc62 --- /dev/null +++ b/qadevOOo/tests/basic/mod/svx/SvxGraphicObject/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="svx_SvxGraphicObject" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="svx_SvxGraphicObject"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/svx/SvxGraphicObject/svx_SvxGraphicObject.xba b/qadevOOo/tests/basic/mod/svx/SvxGraphicObject/svx_SvxGraphicObject.xba new file mode 100644 index 000000000000..2eced4069f0d --- /dev/null +++ b/qadevOOo/tests/basic/mod/svx/SvxGraphicObject/svx_SvxGraphicObject.xba @@ -0,0 +1,102 @@ +<?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="svx_SvxGraphicObject" 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 + + + +' REQUIRED VARIABLES for interface/service tests: + +' Required for com.sun.star.lang.XComponent + Global oComponentInstance As Object ' it will be disposed + +' Required for com.sun.star.drawing.XShapeDescriptor + Global cShapeType As String + +' Requiered for com.sun.star.text.XText + Global oInstance As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' svx.SvxGraphicObject +'************************************************************************* +On Error Goto ErrHndl + + Dim bOK As Boolean + Dim oShape As Object + bOK = true + + oDoc = utils.createDocument("sdraw", cObjectName) + + cShapeType = "com.sun.star.drawing.GraphicObjectShape" + + oShape = oDoc.createInstance("com.sun.star.drawing.GraphicObjectShape") + + Dim aPoint As New com.sun.star.awt.Point + Dim aSize As New com.sun.star.awt.Size + + aPoint.x = 100 + aPoint.y = 100 + aSize.Width = 10000 + aSize.Height = 10000 + oShape.Size = aSize + oShape.Position = aPoint + + oDoc.DrawPages(0).add(oShape) + oShape.setString("Graphic Object") + oObj = oShape + + oComponentInstance = oDoc.createInstance("com.sun.star.drawing.GraphicObjectShape") + + aPoint.x = 100 + aPoint.y = 10200 + aSize.Width = 20000 + aSize.Height = 10000 + oComponentInstance.Size = aSize + oComponentInstance.Position = aPoint + oDoc.DrawPages(0).add(oComponentInstance) + oComponentInstance.setString("For com.sun.star.lang.XComponent") + + oInstance = oDoc.createInstance("com.sun.star.text.TextField.DateTime") + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/svx/SvxShape/script.xlb b/qadevOOo/tests/basic/mod/svx/SvxShape/script.xlb new file mode 100644 index 000000000000..7fb4aa928ddd --- /dev/null +++ b/qadevOOo/tests/basic/mod/svx/SvxShape/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="svx_SvxShape" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="svx_SvxShape"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/svx/SvxShape/svx_SvxShape.xba b/qadevOOo/tests/basic/mod/svx/SvxShape/svx_SvxShape.xba new file mode 100644 index 000000000000..c1d24e64033b --- /dev/null +++ b/qadevOOo/tests/basic/mod/svx/SvxShape/svx_SvxShape.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="svx_SvxShape" 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 + + +' REQUIRED VARIABLES for interface/service tests: + +' Requiered for com.sun.star.lang.XComponent + Global oComponentInstance As Object ' it will be disposed + +' Requiered for com.sun.star.drawing.XShapeDescriptor + Global cShapeType As String + +' Requiered for com.sun.star.text.XText + Global oInstance As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' svx.SvxShape +'************************************************************************* +On Error Goto ErrHndl + + Dim bOK As Boolean + bOK = true + + oDoc = utils.loadTestDocument("SvxShape.sxd") + + Dim oDrawPage As Object + oDrawPage = oDoc.DrawPages(0) + + oObj = oDrawPage.getByIndex(0) + + cShapeType = "com.sun.star.drawing.RectangleShape" + + oComponentInstance = oDrawPage.getByIndex(1) + + oInstance = oDoc.createInstance("com.sun.star.text.TextField.DateTime") + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/svx/SvxShapeCircle/script.xlb b/qadevOOo/tests/basic/mod/svx/SvxShapeCircle/script.xlb new file mode 100644 index 000000000000..b86c75094fb8 --- /dev/null +++ b/qadevOOo/tests/basic/mod/svx/SvxShapeCircle/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="svx_SvxShapeCircle" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="svx_SvxShapeCircle"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/svx/SvxShapeCircle/svx_SvxShapeCircle.xba b/qadevOOo/tests/basic/mod/svx/SvxShapeCircle/svx_SvxShapeCircle.xba new file mode 100644 index 000000000000..f70fded68818 --- /dev/null +++ b/qadevOOo/tests/basic/mod/svx/SvxShapeCircle/svx_SvxShapeCircle.xba @@ -0,0 +1,102 @@ +<?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="svx_SvxShapeCircle" 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 + + +' REQUIRED VARIABLES for interface/service tests: + +' Requiered for com.sun.star.lang.XComponent + Global oComponentInstance As Object ' it will be disposed + +' Requiered for com.sun.star.drawing.XShapeDescriptor + Global cShapeType As String + +' Requiered for com.sun.star.text.XText + Global oInstance As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' svx.SvxShapeCircle +'************************************************************************* +On Error Goto ErrHndl + + Dim bOK As Boolean + Dim oDrawPage As Object, oShape As Object + + bOK = true + + oDoc = utils.loadTestDocument("SvxShape.sxd") + + oDrawPage = oDoc.DrawPages(0) + + oShape = CreateShape(5000, 5000, 3000, 3000, "EllipseShape", oDoc) + oDrawPage.Add(oShape) + + oShape.setPropertyValue("CircleKind", com.sun.star.drawing.CircleKind.FULL) + + oObj = oShape + + cShapeType = "com.sun.star.drawing.EllipseShape" + + oComponentInstance = oDrawPage.getByIndex(1) + + oInstance = oDoc.createInstance("com.sun.star.text.TextField.DateTime") + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Function CreateShape(x As Integer, y As Integer, width As Integer, height As Integer, kind As String, doc As Object) + Dim oShape As Object + Dim pos As new com.sun.star.awt.Point + Dim size As new com.sun.star.awt.Size + + oShape = doc.createInstance("com.sun.star.drawing." + kind) + pos.X = x + pos.Y = y + oShape.setPosition(pos) + size.Width = width + size.Height = height + oShape.setSize(size) + + CreateShape = oShape +End Function +</script:module> diff --git a/qadevOOo/tests/basic/mod/svx/SvxShapeCollection/script.xlb b/qadevOOo/tests/basic/mod/svx/SvxShapeCollection/script.xlb new file mode 100644 index 000000000000..d8b9b68aa10b --- /dev/null +++ b/qadevOOo/tests/basic/mod/svx/SvxShapeCollection/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="svx_SvxShapeCollection" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="svx_SvxShapeCollection"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/svx/SvxShapeCollection/svx_SvxShapeCollection.xba b/qadevOOo/tests/basic/mod/svx/SvxShapeCollection/svx_SvxShapeCollection.xba new file mode 100644 index 000000000000..735877f852aa --- /dev/null +++ b/qadevOOo/tests/basic/mod/svx/SvxShapeCollection/svx_SvxShapeCollection.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="svx_SvxShapeCollection" 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. +' +'************************************************************************* +'************************************************************************* + + + + +' REQUIRED VARIABLES for interface/service tests: + +' Requiered for com.sun.star.drawing.XShapes + Global oXShapeInstance As Object 'to add/remove + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' svx.SvxShapeCollection +'************************************************************************* +On Error Goto ErrHndl + + Dim bOK As Boolean + bOK = true + + oDoc = utils.createDocument("sdraw", cObjectName) + + oObj = createUnoService("com.sun.star.drawing.ShapeCollection") + + oInstance = oDoc.createInstance("com.sun.star.drawing.LineShape") + oObj.add(oInstance) + + oXShapeInstance = oDoc.createInstance("com.sun.star.drawing.EllipseShape") + + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/svx/SvxShapeConnector/script.xlb b/qadevOOo/tests/basic/mod/svx/SvxShapeConnector/script.xlb new file mode 100644 index 000000000000..9543a130574d --- /dev/null +++ b/qadevOOo/tests/basic/mod/svx/SvxShapeConnector/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="svx_SvxShapeConnector" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="svx_SvxShapeConnector"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/svx/SvxShapeConnector/svx_SvxShapeConnector.xba b/qadevOOo/tests/basic/mod/svx/SvxShapeConnector/svx_SvxShapeConnector.xba new file mode 100644 index 000000000000..cdc3affad516 --- /dev/null +++ b/qadevOOo/tests/basic/mod/svx/SvxShapeConnector/svx_SvxShapeConnector.xba @@ -0,0 +1,78 @@ +<?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="svx_SvxShapeConnector" 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 + + + +' REQUIRED VARIABLES for interface/service tests: + +' Requiered for com.sun.star.lang.XComponent + Global oComponentInstance As Object ' it will be disposed + +' Requiered for com.sun.star.drawing.XShapeDescriptor + Global cShapeType As String + +' Requiered for com.sun.star.text.XText + Global oInstance As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' svx.SvxShapeConnector +'************************************************************************* +On Error Goto ErrHndl + + Dim bOK As Boolean + bOK = true + + oDoc = utils.createDocument("sdraw", cObjectName) + + oObj = oDoc.createInstance("com.sun.star.drawing.ConnectorShape") + oDoc.DrawPages(0).add(oObj) + oComponentInstance = oDoc.createInstance("com.sun.star.drawing.ConnectorShape") + oDoc.DrawPages(0).add(oComponentInstance) + + cShapeType = "com.sun.star.drawing.ConnectorShape" + + oInstance = oDoc.createInstance("com.sun.star.text.TextField.DateTime") +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/svx/SvxShapeControl/script.xlb b/qadevOOo/tests/basic/mod/svx/SvxShapeControl/script.xlb new file mode 100644 index 000000000000..5545f03095c2 --- /dev/null +++ b/qadevOOo/tests/basic/mod/svx/SvxShapeControl/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="svx_SvxShapeControl" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="svx_SvxShapeControl"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/svx/SvxShapeControl/svx_SvxShapeControl.xba b/qadevOOo/tests/basic/mod/svx/SvxShapeControl/svx_SvxShapeControl.xba new file mode 100644 index 000000000000..ab0ed81abf79 --- /dev/null +++ b/qadevOOo/tests/basic/mod/svx/SvxShapeControl/svx_SvxShapeControl.xba @@ -0,0 +1,108 @@ +<?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="svx_SvxShapeControl" 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 + + +' REQUIRED VARIABLES for interface/service tests: + +' Requiered for com.sun.star.lang.XComponent + Global oComponentInstance As Object ' it will be disposed + +' Requiered for com.sun.star.drawing.XControlShape + Global oControlToSet As Object + +' Requiered for com.sun.star.drawing.XShapeDescriptor + Global cShapeType As String + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' svx.SvxShapeControl +'************************************************************************* +On Error Goto ErrHndl + + Dim bOK As Boolean + Dim oDrawPage As Object, oShape As Object + + bOK = true + + oDoc = utils.createDocument("sdraw", cObjectName) + + oDrawPage = oDoc.DrawPages(0) + + oControlToSet = oDoc.createInstance("com.sun.star.form.component.CheckBox") + + ' insert ControlShape + Dim aPoint As New com.sun.star.awt.Point + Dim aSize As New com.sun.star.awt.Size + Dim oControl, oCShape As Object + + aPoint.x = 3000 + aPoint.y = 4500 + aSize.Width = 15000 + aSize.Height = 1000 + oCShape = oDoc.createInstance("com.sun.star.drawing.ControlShape") + oCShape.Size = aSize + oCShape.Position = aPoint + + oControl = oDoc.createInstance("com.sun.star.form.component.CommandButton") + oControl.DefaultControl = "com.sun.star.form.control.CommandButton" + + oCShape.setControl(oControl) + + oDrawPage.add(oCShape) + + oObj = oCShape + + cShapeType = "com.sun.star.drawing.ControlShape" + + aPoint.x = 3000 + aPoint.y = 10000 + aSize.Width = 15000 + aSize.Height = 1000 + oComponentInstance = oDoc.createInstance("com.sun.star.drawing.LineShape") + oComponentInstance.Size = aSize + oComponentInstance.Position = aPoint + + oDrawPage.add(oComponentInstance) +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/svx/SvxShapeDimensioning/script.xlb b/qadevOOo/tests/basic/mod/svx/SvxShapeDimensioning/script.xlb new file mode 100644 index 000000000000..53eb8199670e --- /dev/null +++ b/qadevOOo/tests/basic/mod/svx/SvxShapeDimensioning/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="svx_SvxShapeDimensioning" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="svx_SvxShapeDimensioning"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/svx/SvxShapeDimensioning/svx_SvxShapeDimensioning.xba b/qadevOOo/tests/basic/mod/svx/SvxShapeDimensioning/svx_SvxShapeDimensioning.xba new file mode 100644 index 000000000000..b60010cfde5e --- /dev/null +++ b/qadevOOo/tests/basic/mod/svx/SvxShapeDimensioning/svx_SvxShapeDimensioning.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="svx_SvxShapeDimensioning" 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 + + +' REQUIRED VARIABLES for interface/service tests: + +' Requiered for com.sun.star.lang.XComponent + Global oComponentInstance As Object ' it will be disposed + +' Requiered for com.sun.star.text.XText + Global oInstance As Object + +' Requiered for com.sun.star.drawing.XShapeDescriptor + Global cShapeType As String + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' svx.SvxShapeDimensioning +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim oMShape As Object + + bOK = true + + oDoc = utils.createDocument("sdraw", cObjectName) + + oMShape = oDoc.createInstance("com.sun.star.drawing.MeasureShape") + oDoc.DrawPages(0).add(oMShape) + + Dim oSize As new com.sun.star.awt.Size + Dim oPosition As new com.sun.star.awt.Point + + oSize.Width = 3000 + oSize.Height = 3000 + oPosition.X = 4000 + oPosition.Y = 4000 + oMShape.Size = oSize + oMShape.Position = oPosition + + oComponentInstance = oDoc.createInstance("com.sun.star.drawing.LineShape") + oDoc.DrawPages(0).Add(oComponentInstance) + + oSize.Width = 7500 + oSize.Height = 5000 + oPosition.X = 5000 + oPosition.Y = 3500 + oComponentInstance.Size = oSize + oComponentInstance.Position = oPosition + + oObj = oMShape + + oInstance = oDoc.createInstance("com.sun.star.text.TextField.DateTime") + + cShapeType = "com.sun.star.drawing.MeasureShape" +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/svx/SvxShapeGroup/script.xlb b/qadevOOo/tests/basic/mod/svx/SvxShapeGroup/script.xlb new file mode 100644 index 000000000000..55001aa96454 --- /dev/null +++ b/qadevOOo/tests/basic/mod/svx/SvxShapeGroup/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="svx_SvxShapeGroup" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="svx_SvxShapeGroup"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/svx/SvxShapeGroup/svx_SvxShapeGroup.xba b/qadevOOo/tests/basic/mod/svx/SvxShapeGroup/svx_SvxShapeGroup.xba new file mode 100644 index 000000000000..5f68214c0fda --- /dev/null +++ b/qadevOOo/tests/basic/mod/svx/SvxShapeGroup/svx_SvxShapeGroup.xba @@ -0,0 +1,102 @@ +<?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="svx_SvxShapeGroup" 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 + + +' REQUIRED VARIABLES for interface/service tests: + +' Requiered for com.sun.star.drawing.XShapes + Global oXShapeInstance As Object 'to add/remove + +' Requiered for com.sun.star.lang.XComponent + Global oComponentInstance As Object ' it will be disposed + +' Requiered for com.sun.star.drawing.XShapeDescriptor + Global cShapeType As String + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' svx.SvxShapeGroup +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim oInstance As Object, oDP As Object + + bOK = true + + oDoc = utils.createDocument("sdraw", cObjectName) + + oDP = oDoc.DrawPages(0) + oInstance = CreateShape(1000, 2000, 4000, 3000, "LineShape") + oDP.add(oInstance) + + oInstance = CreateShape(1000, 2000, 3000, 4000, "LineShape") + oDP.add(oInstance) + + oObj = oDP.group(oDP) + + oXShapeInstance = CreateShape(1000, 6000, 4000, 3000, "EllipseShape") + oDP.add(oXShapeInstance) + + oComponentInstance = CreateShape(10000, 5000, 6000, 4000, "RectangleShape") + oDP.add(oComponentInstance) + + cShapeType = "com.sun.star.drawing.GroupShape" +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Function CreateShape(x As Integer, y As Integer, width As Integer, height As Integer, kind As String) + Dim oShape As Object + Dim pos As new com.sun.star.awt.Point + Dim size As new com.sun.star.awt.Size + + oShape = oDoc.createInstance("com.sun.star.drawing." + kind) + pos.X = x + pos.Y = y + oShape.setPosition(pos) + size.Width = width + size.Height = height + oShape.setSize(size) + + CreateShape = oShape +End Function +</script:module> diff --git a/qadevOOo/tests/basic/mod/svx/SvxShapePolyPolygon/script.xlb b/qadevOOo/tests/basic/mod/svx/SvxShapePolyPolygon/script.xlb new file mode 100644 index 000000000000..eb6344ae8d7b --- /dev/null +++ b/qadevOOo/tests/basic/mod/svx/SvxShapePolyPolygon/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="svx_SvxShapePolyPolygon" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="svx_SvxShapePolyPolygon"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/svx/SvxShapePolyPolygon/svx_SvxShapePolyPolygon.xba b/qadevOOo/tests/basic/mod/svx/SvxShapePolyPolygon/svx_SvxShapePolyPolygon.xba new file mode 100644 index 000000000000..bbe16dae426d --- /dev/null +++ b/qadevOOo/tests/basic/mod/svx/SvxShapePolyPolygon/svx_SvxShapePolyPolygon.xba @@ -0,0 +1,107 @@ +<?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="svx_SvxShapePolyPolygon" 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 + + + +' REQUIRED VARIABLES for interface/service tests: + +' Requiered for com.sun.star.lang.XComponent + Global oComponentInstance As Object ' it will be disposed + +' Requiered for com.sun.star.drawing.XShapeDescriptor + Global cShapeType As String + +' Requiered for com.sun.star.text.XText + Global oInstance As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' svx.SvxShapePolyPolygon +'************************************************************************* +On Error Goto ErrHndl + + Dim bOK As Boolean + bOK = true + + oDoc = utils.loadTestDocument("SvxShape.sxd") + + oObj = oDoc.createInstance("com.sun.star.drawing.PolyPolygonShape") + oComponentInstance = oDoc.createInstance("com.sun.star.drawing.PolyPolygonShape") + oDoc.DrawPages(0).add(oObj) + oDoc.DrawPages(0).add(oComponentInstance) + + Dim oSize As new com.sun.star.awt.Size + Dim oPosition As new com.sun.star.awt.Point + + oSize.Width = 0 + oSize.Height = 0 + oPosition.X = 0 + oPosition.Y = 0 + + oObj.Size = oSize + oObj.Position = oPosition + + Dim ps1(3) As new com.sun.star.awt.Point + ps1(0).X = 5000 : ps1(0).Y = 5000 + ps1(1).X = 10000 : ps1(1).Y = 5000 + ps1(2).X = 10000 : ps1(2).Y = 10000 + ps1(3).X = 5000 : ps1(3).Y = 10000 + + Dim ps2(3) As new com.sun.star.awt.Point + ps2(0).X = 6500 : ps2(0).Y = 6500 + ps2(1).X = 8500 : ps2(1).Y = 6500 + ps2(2).X = 8500 : ps2(2).Y = 8500 + ps2(3).X = 6500 : ps2(3).Y = 8500 + + Dim psA(1) As Variant + psA(0) = ps1() + psA(1) = ps2() + + oObj.setPropertyValue("PolyPolygon", psA()) + + cShapeType = "com.sun.star.drawing.PolyPolygonShape" + + oInstance = oDoc.createInstance("com.sun.star.text.TextField.DateTime") +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/svx/SvxShapePolyPolygonBezier/script.xlb b/qadevOOo/tests/basic/mod/svx/SvxShapePolyPolygonBezier/script.xlb new file mode 100644 index 000000000000..10c60b564753 --- /dev/null +++ b/qadevOOo/tests/basic/mod/svx/SvxShapePolyPolygonBezier/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="svx_SvxShapePolyPolygonBezier" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="svx_SvxShapePolyPolygonBezier"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/svx/SvxShapePolyPolygonBezier/svx_SvxShapePolyPolygonBezier.xba b/qadevOOo/tests/basic/mod/svx/SvxShapePolyPolygonBezier/svx_SvxShapePolyPolygonBezier.xba new file mode 100644 index 000000000000..65cf58712755 --- /dev/null +++ b/qadevOOo/tests/basic/mod/svx/SvxShapePolyPolygonBezier/svx_SvxShapePolyPolygonBezier.xba @@ -0,0 +1,121 @@ +<?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="svx_SvxShapePolyPolygonBezier" 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 + + +' REQUIRED VARIABLES for interface/service tests: + +' Requiered for com.sun.star.lang.XComponent + Global oComponentInstance As Object ' it will be disposed + +' Requiered for com.sun.star.drawing.XShapeDescriptor + Global cShapeType As String + +' Requiered for com.sun.star.text.XText + Global oInstance As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' svx.SvxShapePolyPolygonBezier +'************************************************************************* +On Error Goto ErrHndl + + Dim bOK As Boolean + bOK = true + + oDoc = utils.loadTestDocument("SvxShape.sxd") + + cShapeType = "com.sun.star.drawing.ClosedBezierShape" + + oObj = oDoc.createInstance("com.sun.star.drawing.ClosedBezierShape") + oDoc.DrawPages(0).add(oObj) + Dim oSize As new com.sun.star.awt.Size + Dim oPosition As new com.sun.star.awt.Point + oSize.Width = 5000 + oSize.Height = 5000 + oPosition.X = 4000 + oPosition.Y = 4000 + oObj.Size = oSize + oObj.Position = oPosition + + oComponentInstance = oDoc.createInstance("com.sun.star.drawing.ClosedBezierShape") + oDoc.DrawPages(0).add(oComponentInstance) + oSize.Width = 8000 + oSize.Height = 8000 + oPosition.X = 4000 + oPosition.Y = 4000 + oComponentInstance.Size = oSize + oComponentInstance.Position = oPosition + + Dim ps1(3) As new com.sun.star.awt.Point + Dim pf1(3) As Integer + with com.sun.star.drawing.PolygonFlags + + ps1(0).X = 5000 : ps1(0).Y = 5000 : pf1(0) = .NORMAL + ps1(1).X = 10000 : ps1(1).Y = 5000 : pf1(1) = .CONTROL + ps1(2).X = 10000 : ps1(2).Y = 10000 : pf1(2) = .CONTROL + ps1(3).X = 5000 : ps1(3).Y = 10000 : pf1(3) = .NORMAL + + Dim ps2(3) As new com.sun.star.awt.Point + Dim pf2(3) As Integer + ps2(0).X = 6500 : ps2(0).Y = 6500 : pf2(0) = .NORMAL + ps2(1).X = 8500 : ps2(1).Y = 6500 : pf2(1) = .CONTROL + ps2(2).X = 8500 : ps2(2).Y = 8500 : pf2(2) = .CONTROL + ps2(3).X = 6500 : ps2(3).Y = 8500 : pf2(3) = .NORMAL + end with + + Dim psA As Variant + psA = Array( ps1(), ps2() ) + + Dim oFlags As Variant + oFlags = Array( pf1(), pf2() ) + + Dim oCoords As New com.sun.star.drawing.PolyPolygonBezierCoords + oCoords.Coordinates = psA() + oCoords.Flags = oFlags() + + oInstance = oDoc.createInstance("com.sun.star.text.TextField.DateTime") + + oObj.PolyPolygonBezier = oCoords +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/svx/SvxUnoNumberingRules/script.xlb b/qadevOOo/tests/basic/mod/svx/SvxUnoNumberingRules/script.xlb new file mode 100644 index 000000000000..dbec5ae77863 --- /dev/null +++ b/qadevOOo/tests/basic/mod/svx/SvxUnoNumberingRules/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="svx_SvxUnoNumberingRules" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="svx_SvxUnoNumberingRules"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/svx/SvxUnoNumberingRules/svx_SvxUnoNumberingRules.xba b/qadevOOo/tests/basic/mod/svx/SvxUnoNumberingRules/svx_SvxUnoNumberingRules.xba new file mode 100644 index 000000000000..9e810e199564 --- /dev/null +++ b/qadevOOo/tests/basic/mod/svx/SvxUnoNumberingRules/svx_SvxUnoNumberingRules.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="svx_SvxUnoNumberingRules" 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 CreateObj() + +'************************************************************************* +' COMPONENT: +' svx.SvxUnoNumberingRules +'************************************************************************* +On Error Goto ErrHndl + + Dim bOK As Boolean + bOK = true + + oDoc = utils.createDocument("sdraw", cObjectName) + + oObj = oDoc.CreateInstance("com.sun.star.text.NumberingRules") + + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/svx/SvxUnoText/script.xlb b/qadevOOo/tests/basic/mod/svx/SvxUnoText/script.xlb new file mode 100644 index 000000000000..c9bf01991831 --- /dev/null +++ b/qadevOOo/tests/basic/mod/svx/SvxUnoText/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="svx_SvxUnoText" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="svx_SvxUnoText"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/svx/SvxUnoText/svx_SvxUnoText.xba b/qadevOOo/tests/basic/mod/svx/SvxUnoText/svx_SvxUnoText.xba new file mode 100644 index 000000000000..1e83583fb8f8 --- /dev/null +++ b/qadevOOo/tests/basic/mod/svx/SvxUnoText/svx_SvxUnoText.xba @@ -0,0 +1,91 @@ +<?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="svx_SvxUnoText" 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 + + + +' REQUIRED VARIABLES for interface/service tests: + +' Requiered for com.sun.star.text.XText + Global oInstance As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' svx.SvxUnoText +'************************************************************************* +On Error Goto ErrHndl + + Dim bOK As Boolean + bOK = true + Dim oShape As Object + + oDoc = utils.createDocument("sdraw", cObjectName) + + oShape = oDoc.createInstance("com.sun.star.drawing.TextShape") + + oDoc.DrawPages(0).add(oShape) + + Dim oSize As new com.sun.star.awt.Size + Dim oPos As new com.sun.star.awt.Point + oSize.Width = 7500 + oSize.Height = 5000 + oPos.X = 5000 + oPos.Y = 3500 + oShape.Size = oSize + oShape.Position = oPos + + Dim cursor As Object + cursor = oShape.createTextCursor() + + oShape.insertString(cursor, "Paragraph 1", false) + oShape.insertControlCharacter(cursor, com.sun.star.text.ControlCharacter.PARAGRAPH_BREAK, false) + oShape.insertString(cursor, "Paragraph 2", false) + oShape.insertControlCharacter(cursor, com.sun.star.text.ControlCharacter.PARAGRAPH_BREAK, false) + oShape.insertString(cursor, "Paragraph 3", false) + oShape.insertControlCharacter(cursor, com.sun.star.text.ControlCharacter.PARAGRAPH_BREAK, false) + + oObj = oShape.getText() + oInstance = oDoc.createInstance("com.sun.star.text.TextField.DateTime") + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/svx/SvxUnoTextContent/script.xlb b/qadevOOo/tests/basic/mod/svx/SvxUnoTextContent/script.xlb new file mode 100644 index 000000000000..2e140811e9f8 --- /dev/null +++ b/qadevOOo/tests/basic/mod/svx/SvxUnoTextContent/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="svx_SvxUnoTextContent" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="svx_SvxUnoTextContent"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/svx/SvxUnoTextContent/svx_SvxUnoTextContent.xba b/qadevOOo/tests/basic/mod/svx/SvxUnoTextContent/svx_SvxUnoTextContent.xba new file mode 100644 index 000000000000..8ae855ffa829 --- /dev/null +++ b/qadevOOo/tests/basic/mod/svx/SvxUnoTextContent/svx_SvxUnoTextContent.xba @@ -0,0 +1,90 @@ +<?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="svx_SvxUnoTextContent" 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 + + +' REQUIRED VARIABLES for interface/service tests: + +' Requiered for com.sun.star.lang.XComponent + Global oComponentInstance As Object ' it will be disposed + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' svx.SvxUnoTextContent +'************************************************************************* +On Error Goto ErrHndl + + Dim bOK As Boolean + Dim oEnum As Object + Dim oCursor As Object + Dim oShape As Object + + bOK = true + + oDoc = utils.createDocument("sdraw", cObjectName) + + oShape = oDoc.createInstance("com.sun.star.drawing.TextShape") + oDoc.DrawPages(0).Add(oShape) + + Dim oSize As new com.sun.star.awt.Size + Dim oPos As new com.sun.star.awt.Point + oSize.Width = 5000 + oSize.Height = 3500 + oPos.X = 7500 + oPos.Y = 5000 + oShape.Size = oSize + oShape.Position = oPos + + oCursor = oShape.createTextCursor() + oShape.insertString(oCursor, "String1 from SvxUnoTextContent", false) + oShape.insertControlCharacter(oCursor, com.sun.star.text.ControlCharacter.PARAGRAPH_BREAK, false) + oShape.insertString(oCursor, "String2 from SvxUnoTextContent", false) + oShape.insertControlCharacter(oCursor, com.sun.star.text.ControlCharacter.PARAGRAPH_BREAK, false) + + oEnum = oShape.createEnumeration() + + oObj = oEnum.nextElement() + oComponentInstance = oEnum.nextElement() + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/svx/SvxUnoTextContentEnum/script.xlb b/qadevOOo/tests/basic/mod/svx/SvxUnoTextContentEnum/script.xlb new file mode 100644 index 000000000000..c061425efd68 --- /dev/null +++ b/qadevOOo/tests/basic/mod/svx/SvxUnoTextContentEnum/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="svx_SvxUnoTextContentEnum" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="svx_SvxUnoTextContentEnum"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/svx/SvxUnoTextContentEnum/svx_SvxUnoTextContentEnum.xba b/qadevOOo/tests/basic/mod/svx/SvxUnoTextContentEnum/svx_SvxUnoTextContentEnum.xba new file mode 100644 index 000000000000..c867d49d09e1 --- /dev/null +++ b/qadevOOo/tests/basic/mod/svx/SvxUnoTextContentEnum/svx_SvxUnoTextContentEnum.xba @@ -0,0 +1,81 @@ +<?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="svx_SvxUnoTextContentEnum" 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 CreateObj() + +'************************************************************************* +' COMPONENT: +' svx.SvxUnoTextContentEnum +'************************************************************************* +On Error Goto ErrHndl + + Dim bOK As Boolean + Dim oCursor As Object + Dim oShape As Object + + bOK = true + + oDoc = utils.createDocument("sdraw", cObjectName) + + oShape = oDoc.createInstance("com.sun.star.drawing.TextShape") + oDoc.DrawPages(0).Add(oShape) + + Dim oSize As new com.sun.star.awt.Size + Dim oPos As new com.sun.star.awt.Point + oSize.Width = 5000 + oSize.Height = 3500 + oPos.X = 7500 + oPos.Y = 5000 + oShape.Size = oSize + oShape.Position = oPos + + oCursor = oShape.createTextCursor() + oShape.insertString(oCursor, "String1 from SvxUnoTextContentEnum", false) + oShape.insertControlCharacter(oCursor, com.sun.star.text.ControlCharacter.PARAGRAPH_BREAK, false) + oShape.insertString(oCursor, "String2 from SvxUnoTextContentEnum", false) + oShape.insertControlCharacter(oCursor, com.sun.star.text.ControlCharacter.PARAGRAPH_BREAK, false) + + oObj = oShape.createEnumeration() + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/svx/SvxUnoTextCursor/script.xlb b/qadevOOo/tests/basic/mod/svx/SvxUnoTextCursor/script.xlb new file mode 100644 index 000000000000..be5f5a3ea2d9 --- /dev/null +++ b/qadevOOo/tests/basic/mod/svx/SvxUnoTextCursor/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="svx_SvxUnoTextCursor" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="svx_SvxUnoTextCursor"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/svx/SvxUnoTextCursor/svx_SvxUnoTextCursor.xba b/qadevOOo/tests/basic/mod/svx/SvxUnoTextCursor/svx_SvxUnoTextCursor.xba new file mode 100644 index 000000000000..9c6dbdee9dc1 --- /dev/null +++ b/qadevOOo/tests/basic/mod/svx/SvxUnoTextCursor/svx_SvxUnoTextCursor.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="svx_SvxUnoTextCursor" 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 + + + +' REQUIRED VARIABLES for interface/service tests: + +' Requiered for com.sun.star.text.XParagraphCursor + Global oText As Object + +' Requiered for com.sun.star.text.XTextCursor + Global oCursor As Object 'One more cursor + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' svx.SvxUnoTextCursor +'************************************************************************* +On Error Goto ErrHndl + + Dim bOK As Boolean + bOK = true + + oDoc = utils.createDocument("scalc", cObjectName) + + Dim StyleFamilies As Object + StyleFamilies = oDoc.getStyleFamilies + + Dim PageStyles As Object + PageStyles = StyleFamilies.getByName("PageStyles") + + Dim DefaultStyle As Object + DefaultStyle = PageStyles.getByName("Default") + + Dim RPHC As Object + RPHC = DefaultStyle.getPropertyValue("RightPageHeaderContent") + RPHC.getCenterText.String = "Center" + DefaultStyle.setPropertyValue("RightPageHeaderContent", RPHC) + + oText = RPHC.getCenterText + oObj = oText.createTextCursor() + + oCursor = oText.createTextCursor() +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/svx/SvxUnoTextField/script.xlb b/qadevOOo/tests/basic/mod/svx/SvxUnoTextField/script.xlb new file mode 100644 index 000000000000..13e071929680 --- /dev/null +++ b/qadevOOo/tests/basic/mod/svx/SvxUnoTextField/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="svx_SvxUnoTextField" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="svx_SvxUnoTextField"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/svx/SvxUnoTextField/svx_SvxUnoTextField.xba b/qadevOOo/tests/basic/mod/svx/SvxUnoTextField/svx_SvxUnoTextField.xba new file mode 100644 index 000000000000..cc6c9e57f8cb --- /dev/null +++ b/qadevOOo/tests/basic/mod/svx/SvxUnoTextField/svx_SvxUnoTextField.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="svx_SvxUnoTextField" 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 + + +' REQUIRED VARIABLES for interface/service tests: + +' Requiered for com.sun.star.lang.XComponent + Global oComponentInstance As Object ' it will be disposed + +Global oXTextContent as Object +Global oXTextContentRange as Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' svx.SvxUnoTextField +'************************************************************************* +On Error Goto ErrHndl + + Dim bOK As Boolean + bOK = true + + oDoc = utils.createDocument("sdraw", cObjectName) + + Dim oShape As Object + oShape = oDoc.createInstance("com.sun.star.drawing.TextShape") + oDoc.DrawPages(0).Add(oShape) + + Dim oSize As new com.sun.star.awt.Size + Dim oPos As new com.sun.star.awt.Point + oSize.Width = 5000 + oSize.Height = 3500 + oPos.X = 7500 + oPos.Y = 5000 + oShape.Size = oSize + oShape.Position = oPos + + Dim oCursor As Object + oCursor = oShape.createTextCursor() + oShape.insertString(oCursor, "String1 from SvxUnoText", false) + oShape.insertControlCharacter(oCursor, com.sun.star.text.ControlCharacter.PARAGRAPH_BREAK, false) + oShape.insertString(oCursor, "String2 from SvxUnoText", false) + oShape.insertControlCharacter(oCursor, com.sun.star.text.ControlCharacter.PARAGRAPH_BREAK, false) + + oObj = oDoc.createInstance("com.sun.star.text.TextField.DateTime") + oShape.insertTextContent(oShape.createTextCursor(), oObj, false) + oComponentInstance = oDoc.createInstance("com.sun.star.text.TextField.DateTime") + oShape.insertTextContent(oShape.createTextCursor(), oComponentInstance, false) + + oXTextContent = oDoc.createInstance("com.sun.star.text.TextField.DateTime") + oXTextContentRange = oShape.createTextCursor() + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/svx/SvxUnoTextRange/script.xlb b/qadevOOo/tests/basic/mod/svx/SvxUnoTextRange/script.xlb new file mode 100644 index 000000000000..10f511650187 --- /dev/null +++ b/qadevOOo/tests/basic/mod/svx/SvxUnoTextRange/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="svx_SvxUnoTextRange" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="svx_SvxUnoTextRange"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/svx/SvxUnoTextRange/svx_SvxUnoTextRange.xba b/qadevOOo/tests/basic/mod/svx/SvxUnoTextRange/svx_SvxUnoTextRange.xba new file mode 100644 index 000000000000..ff1172f84c5f --- /dev/null +++ b/qadevOOo/tests/basic/mod/svx/SvxUnoTextRange/svx_SvxUnoTextRange.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="svx_SvxUnoTextRange" 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 CreateObj() + +'************************************************************************* +' COMPONENT: +' svx.SvxUnoTextRange +'************************************************************************* +On Error Goto ErrHndl + + Dim bOK As Boolean + bOK = true + Dim oEnum As Object + oDoc = utils.createDocument("sdraw", cObjectName) + + Dim oShape As Object + oShape = oDoc.createInstance("com.sun.star.drawing.TextShape") + oDoc.DrawPages(0).Add(oShape) + + Dim oSize As new com.sun.star.awt.Size + Dim oPos As new com.sun.star.awt.Point + oSize.Width = 5000 + oSize.Height = 3500 + oPos.X = 7500 + oPos.Y = 5000 + oShape.Size = oSize + oShape.Position = oPos + + Dim oCursor As Object + oCursor = oShape.createTextCursor() + oShape.insertString(oCursor, "String1 from SvxUnoText", false) + oShape.insertControlCharacter(oCursor, com.sun.star.text.ControlCharacter.PARAGRAPH_BREAK, false) + oShape.insertString(oCursor, "String2 from SvxUnoText", false) + oShape.insertControlCharacter(oCursor, com.sun.star.text.ControlCharacter.PARAGRAPH_BREAK, false) + + oObj = oShape.CreateEnumeration().nextElement() + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/svx/SvxUnoTextRangeEnumeration/script.xlb b/qadevOOo/tests/basic/mod/svx/SvxUnoTextRangeEnumeration/script.xlb new file mode 100644 index 000000000000..d4b54ce26e6b --- /dev/null +++ b/qadevOOo/tests/basic/mod/svx/SvxUnoTextRangeEnumeration/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="svx_SvxUnoTextRangeEnumeration" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="svx_SvxUnoTextRangeEnumeration"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/svx/SvxUnoTextRangeEnumeration/svx_SvxUnoTextRangeEnumeration.xba b/qadevOOo/tests/basic/mod/svx/SvxUnoTextRangeEnumeration/svx_SvxUnoTextRangeEnumeration.xba new file mode 100644 index 000000000000..9885dbde5056 --- /dev/null +++ b/qadevOOo/tests/basic/mod/svx/SvxUnoTextRangeEnumeration/svx_SvxUnoTextRangeEnumeration.xba @@ -0,0 +1,81 @@ +<?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="svx_SvxUnoTextRangeEnumeration" 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 CreateObj() + +'************************************************************************* +' COMPONENT: +' svx.SvxUnoTextRangeEnumeration +'************************************************************************* +On Error Goto ErrHndl + + Dim bOK As Boolean + bOK = true + Dim oEnum As Object + + oDoc = utils.createDocument("sdraw", cObjectName) + + Dim oShape As Object + oShape = oDoc.createInstance("com.sun.star.drawing.TextShape") + oDoc.DrawPages(0).Add(oShape) + + Dim oSize As new com.sun.star.awt.Size + Dim oPos As new com.sun.star.awt.Point + oSize.Width = 5000 + oSize.Height = 3500 + oPos.X = 7500 + oPos.Y = 5000 + oShape.Size = oSize + oShape.Position = oPos + + Dim oCursor As Object + oCursor = oShape.createTextCursor() + oShape.insertString(oCursor, "String1 from SvxUnoText", false) + oShape.insertControlCharacter(oCursor, com.sun.star.text.ControlCharacter.PARAGRAPH_BREAK, false) + oShape.insertString(oCursor, "String2 from SvxUnoText", false) + oShape.insertControlCharacter(oCursor, com.sun.star.text.ControlCharacter.PARAGRAPH_BREAK, false) + + oObj = oShape.CreateEnumeration() + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> |