diff options
Diffstat (limited to 'qadevOOo/tests/basic/ifc/text')
126 files changed, 6269 insertions, 0 deletions
diff --git a/qadevOOo/tests/basic/ifc/text/BaseFrame/script.xlb b/qadevOOo/tests/basic/ifc/text/BaseFrame/script.xlb new file mode 100644 index 000000000000..27ce09a2bb2c --- /dev/null +++ b/qadevOOo/tests/basic/ifc/text/BaseFrame/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="text_BaseFrame" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="text_BaseFrame"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/text/BaseFrame/text_BaseFrame.xba b/qadevOOo/tests/basic/ifc/text/BaseFrame/text_BaseFrame.xba new file mode 100644 index 000000000000..a63d8527567f --- /dev/null +++ b/qadevOOo/tests/basic/ifc/text/BaseFrame/text_BaseFrame.xba @@ -0,0 +1,67 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="text_BaseFrame" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2008 by Sun Microsystems, Inc. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' $RCSfile: text_BaseFrame.xba,v $ +' +' $Revision: 1.4 $ +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + + + +Sub RunTest() + +'************************************************************************* +' SERVICE: +' com.sun.star.text.BaseFrame +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + + Dim FrameStyles(6) as String + FrameStyles(0) = "Formula" + FrameStyles(1) = "Graphics" + FrameStyles(2) = "Marginalia" + FrameStyles(3) = "OLE" + FrameStyles(4) = "Labels" + FrameStyles(5) = "Watermark" + FrameStyles(6) = "Frame" + PropertyTester.TestProperty("FrameStyleName", FrameStyles()) + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/text/BaseFrameProperties/script.xlb b/qadevOOo/tests/basic/ifc/text/BaseFrameProperties/script.xlb new file mode 100644 index 000000000000..d19bf601e574 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/text/BaseFrameProperties/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="text_BaseFrameProperties" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="text_BaseFrameProperties"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/text/BaseFrameProperties/text_BaseFrameProperties.xba b/qadevOOo/tests/basic/ifc/text/BaseFrameProperties/text_BaseFrameProperties.xba new file mode 100644 index 000000000000..d537fe262def --- /dev/null +++ b/qadevOOo/tests/basic/ifc/text/BaseFrameProperties/text_BaseFrameProperties.xba @@ -0,0 +1,187 @@ +<?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="text_BaseFrameProperties" script:language="StarBasic"> + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2008 by Sun Microsystems, Inc. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' $RCSfile: text_BaseFrameProperties.xba,v $ +' +' $Revision: 1.4 $ +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + +' Be sure that all variables are dimensioned: +option explicit + + + + +Sub RunTest() + +'************************************************************************* +' INTERFACE: +' com.sun.star.text.BaseFrameProperties +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + + oObj.SizeProtected = false + + PropertyTester.TestProperty("ShadowFormat") + + Dim nPages(0 to 2) As Integer + nPages(0) = 1 + nPages(1) = 3 + nPages(2) = 1 + PropertyTester.TestProperty("AnchorPageNo",nPages()) + + PropertyTester.TestProperty("BackColor") + + PropertyTester.TestProperty("BackGraphicURL") + + PropertyTester.TestProperty("BackGraphicFilter") + + PropertyTester.TestProperty("BackGraphicLocation") + + PropertyTester.TestProperty("LeftBorder") + + PropertyTester.TestProperty("RightBorder") + + PropertyTester.TestProperty("TopBorder") + + PropertyTester.TestProperty("BottomBorder") + + PropertyTester.TestProperty("BorderDistance") + + PropertyTester.TestProperty("LeftBorderDistance") + + PropertyTester.TestProperty("RightBorderDistance") + + PropertyTester.TestProperty("TopBorderDistance") + + PropertyTester.TestProperty("BottomBorderDistance") + + PropertyTester.TestProperty("BackTransparent") + + PropertyTester.TestProperty("ContentProtected") + + PropertyTester.TestProperty("LeftMargin") + + PropertyTester.TestProperty("RightMargin") + + PropertyTester.TestProperty("TopMargin") + + PropertyTester.TestProperty("BottomMargin") + + Dim aRelative(2) As Integer + aRelative(0) = 10 + aRelative(1) = 20 + aRelative(2) = 0 + PropertyTester.TestProperty("RelativeHeight", aRelative()) + + PropertyTester.TestProperty("RelativeWidth", aRelative()) + + PropertyTester.TestProperty("Height") + + PropertyTester.TestProperty("Width") + + PropertyTester.TestProperty("IsSyncWidthToHeight") + + PropertyTester.TestProperty("IsSyncHeightToWidth") + + Dim aHoriOrient(3) As Integer + aHoriOrient(0) = com.sun.star.text.HoriOrientation.RIGHT + aHoriOrient(1) = com.sun.star.text.HoriOrientation.CENTER + aHoriOrient(2) = com.sun.star.text.HoriOrientation.LEFT + aHoriOrient(3) = com.sun.star.text.HoriOrientation.NONE + PropertyTester.TestProperty("HoriOrient", aHoriOrient()) + + PropertyTester.TestProperty("HoriOrientPosition") + + Dim aHoriRelations(3) As Integer + aHoriRelations(0) = com.sun.star.text.RelOrientation.FRAME + aHoriRelations(1) = com.sun.star.text.RelOrientation.CHAR + aHoriRelations(2) = com.sun.star.text.RelOrientation.PAGE_LEFT + aHoriRelations(3) = com.sun.star.text.RelOrientation.PAGE_RIGHT + + PropertyTester.TestProperty("HoriOrientRelation", aHoriRelations()) + + Dim aVertOrient(3) As Integer + aVertOrient(0) = com.sun.star.text.VertOrientation.TOP + aVertOrient(1) = com.sun.star.text.VertOrientation.CENTER + aVertOrient(2) = com.sun.star.text.VertOrientation.BOTTOM + aVertOrient(3) = com.sun.star.text.VertOrientation.NONE + PropertyTester.TestProperty("VertOrient", aVertOrient()) + + PropertyTester.TestProperty("VertOrientPosition", aVertOrient()) + + Dim aVertRelations(3) As Integer + aVertRelations(0) = com.sun.star.text.RelOrientation.FRAME + aVertRelations(1) = com.sun.star.text.RelOrientation.CHAR + aVertRelations(2) = com.sun.star.text.RelOrientation.PAGE_LEFT + aVertRelations(3) = com.sun.star.text.RelOrientation.PAGE_RIGHT + PropertyTester.TestProperty("VertOrientRelation", aVertRelations()) + + PropertyTester.TestProperty("HyperLinkURL") + + PropertyTester.TestProperty("HyperLinkTarget") + + PropertyTester.TestProperty("HyperLinkName") + + PropertyTester.TestProperty("Opaque") + + PropertyTester.TestProperty("PageToggle") + + PropertyTester.TestProperty("PositionProtected") + + PropertyTester.TestProperty("Print") + + PropertyTester.TestProperty("ServerMap") + + oObj.SizeProtected = false + PropertyTester.TestProperty("Size") + + PropertyTester.TestProperty("SizeProtected") + + oObj.SizeProtected = false + + PropertyTester.TestProperty("Surround") + + PropertyTester.TestProperty("SurroundAnchorOnly") + + PropertyTester.TestProperty("AnchorFrame") + + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/text/BaseIndex/script.xlb b/qadevOOo/tests/basic/ifc/text/BaseIndex/script.xlb new file mode 100644 index 000000000000..d3f4a6b1a23f --- /dev/null +++ b/qadevOOo/tests/basic/ifc/text/BaseIndex/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="text_BaseIndex" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="text_BaseIndex"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/text/BaseIndex/text_BaseIndex.xba b/qadevOOo/tests/basic/ifc/text/BaseIndex/text_BaseIndex.xba new file mode 100644 index 000000000000..84371ac6f55b --- /dev/null +++ b/qadevOOo/tests/basic/ifc/text/BaseIndex/text_BaseIndex.xba @@ -0,0 +1,106 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="text_BaseIndex" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2008 by Sun Microsystems, Inc. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' $RCSfile: text_BaseIndex.xba,v $ +' +' $Revision: 1.4 $ +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + + + +Sub RunTest() + +'************************************************************************* +' SERVICE: +' com.sun.star.text.BaseIndex +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + + + PropertyTester.TestProperty("Title") + + PropertyTester.TestProperty("IsProtected") + + PropertyTester.TestProperty("ParaStyleHeading") + + PropertyTester.TestProperty("ParaStyleLevel1") + + PropertyTester.TestProperty("ParaStyleLevel2") + + PropertyTester.TestProperty("ParaStyleLevel3") + + PropertyTester.TestProperty("ParaStyleLevel4") + + PropertyTester.TestProperty("ParaStyleLevel5") + + PropertyTester.TestProperty("ParaStyleLevel6") + + PropertyTester.TestProperty("ParaStyleLevel7") + + PropertyTester.TestProperty("ParaStyleLevel8") + + PropertyTester.TestProperty("ParaStyleLevel9") + + PropertyTester.TestProperty("ParaStyleLevel10") + + PropertyTester.TestProperty("ParaStyleSeparator") + + PropertyTester.TestProperty("TextColumns") + + PropertyTester.TestProperty("BackGraphicURL") + + PropertyTester.TestProperty("BackGraphicFilter") + + PropertyTester.TestProperty("BackGraphicLocation") + + PropertyTester.TestProperty("BackTransparent") + + PropertyTester.TestProperty("LevelFormat") + + PropertyTester.TestProperty("CreateFromChapter") + + PropertyTester.TestProperty("HeaderSection") + + PropertyTester.TestProperty("ContentSection") + + PropertyTester.TestProperty("BackColor") + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/text/BaseIndexMark/script.xlb b/qadevOOo/tests/basic/ifc/text/BaseIndexMark/script.xlb new file mode 100644 index 000000000000..dc54b5b8fdfb --- /dev/null +++ b/qadevOOo/tests/basic/ifc/text/BaseIndexMark/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="text_BaseIndexMark" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="text_BaseIndexMark"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/text/BaseIndexMark/text_BaseIndexMark.xba b/qadevOOo/tests/basic/ifc/text/BaseIndexMark/text_BaseIndexMark.xba new file mode 100644 index 000000000000..fa7f0ac441b1 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/text/BaseIndexMark/text_BaseIndexMark.xba @@ -0,0 +1,60 @@ +<?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="text_BaseIndexMark" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2008 by Sun Microsystems, Inc. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' $RCSfile: text_BaseIndexMark.xba,v $ +' +' $Revision: 1.3 $ +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + + + +Sub RunTest() + +'************************************************************************* +' SERVICE: +' com.sun.star.text.BaseIndexMark +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + + + PropertyTester.TestProperty("AlternativeText") + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/text/CellProperties/script.xlb b/qadevOOo/tests/basic/ifc/text/CellProperties/script.xlb new file mode 100644 index 000000000000..5fd5c45f6573 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/text/CellProperties/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="text_CellProperties" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="text_CellProperties"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/text/CellProperties/text_CellProperties.xba b/qadevOOo/tests/basic/ifc/text/CellProperties/text_CellProperties.xba new file mode 100644 index 000000000000..61f3a9d30b1e --- /dev/null +++ b/qadevOOo/tests/basic/ifc/text/CellProperties/text_CellProperties.xba @@ -0,0 +1,113 @@ +<?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="text_CellProperties" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2008 by Sun Microsystems, Inc. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' $RCSfile: text_CellProperties.xba,v $ +' +' $Revision: 1.3 $ +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + + + +Sub RunTest() + +'************************************************************************* +' SERVICE: +' com.sun.star.text.CellProperties +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + + + PropertyTester.TestProperty("BackColor") + + PropertyTester.TestProperty("BackGraphicURL") + + PropertyTester.TestProperty("BackGraphicFilter") + + PropertyTester.TestProperty("BackGraphicLocation") + + PropertyTester.TestProperty("NumberFormat") + + PropertyTester.TestProperty("BackTransparent") + + PropertyTester.TestProperty("LeftBorder") + + PropertyTester.TestProperty("RightBorder") + + PropertyTester.TestProperty("TopBorder") + + PropertyTester.TestProperty("BottomBorder") + + PropertyTester.TestProperty("LeftBorderDistance") + + PropertyTester.TestProperty("RightBorderDistance") + + PropertyTester.TestProperty("TopBorderDistance") + + PropertyTester.TestProperty("BottomBorderDistance") + + PropertyTester.TestProperty("UserDefinedAttributes") + + PropertyTester.TestProperty("TextSection") + + Dim myParams(2) As Boolean + myParams(0) = true + myParams(1) = false + myParams(1) = false + PropertyTester.TestProperty("IsProtected", myParams()) + + PropertyTester.TestProperty("CellName") + + + Dim orient(9) as Integer + orient(0) = com.sun.star.text.VertOrientation.NONE + orient(1) = com.sun.star.text.VertOrientation.TOP + orient(2) = com.sun.star.text.VertOrientation.CENTER + orient(3) = com.sun.star.text.VertOrientation.BOTTOM + orient(4) = com.sun.star.text.VertOrientation.CHAR_TOP + orient(5) = com.sun.star.text.VertOrientation.CHAR_CENTER + orient(6) = com.sun.star.text.VertOrientation.CHAR_BOTTOM + orient(7) = com.sun.star.text.VertOrientation.LINE_TOP + orient(8) = com.sun.star.text.VertOrientation.LINE_CENTER + orient(9) = com.sun.star.text.VertOrientation.LINE_BOTTOM + + PropertyTester.TestProperty("VertOrient", orient()) + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/text/CellRange/script.xlb b/qadevOOo/tests/basic/ifc/text/CellRange/script.xlb new file mode 100644 index 000000000000..59e6c295861d --- /dev/null +++ b/qadevOOo/tests/basic/ifc/text/CellRange/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="text_CellRange" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="text_CellRange"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/text/CellRange/text_CellRange.xba b/qadevOOo/tests/basic/ifc/text/CellRange/text_CellRange.xba new file mode 100644 index 000000000000..f19d512517c2 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/text/CellRange/text_CellRange.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="text_CellRange" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2008 by Sun Microsystems, Inc. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' $RCSfile: text_CellRange.xba,v $ +' +' $Revision: 1.3 $ +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + +' Be sure that all variables are dimensioned: +option explicit + + + +Sub RunTest() + +'************************************************************************* +' SERVICE: +' com.sun.star.text.CellRange +'************************************************************************* +On Error Goto ErrHndl + + PropertyTester.TestProperty("BackColor") + + PropertyTester.TestProperty("BackGraphicFilter") + + PropertyTester.TestProperty("BackGraphicLocation") + + PropertyTester.TestProperty("BackGraphicURL") + + PropertyTester.TestProperty("BackTransparent") + + PropertyTester.TestProperty("ChartColumnAsLabel") + + PropertyTester.TestProperty("ChartRowAsLabel") + + PropertyTester.TestProperty("NumberFormat") + + PropertyTester.TestProperty("TopMargin") + + PropertyTester.TestProperty("BottomMargin") + +Exit Sub +ErrHndl: + Test.Exception() + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/text/Defaults/script.xlb b/qadevOOo/tests/basic/ifc/text/Defaults/script.xlb new file mode 100644 index 000000000000..6b41f6d1336a --- /dev/null +++ b/qadevOOo/tests/basic/ifc/text/Defaults/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="text_Defaults" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="text_Defaults"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/text/Defaults/text_Defaults.xba b/qadevOOo/tests/basic/ifc/text/Defaults/text_Defaults.xba new file mode 100644 index 000000000000..c9fb2016baea --- /dev/null +++ b/qadevOOo/tests/basic/ifc/text/Defaults/text_Defaults.xba @@ -0,0 +1,60 @@ +<?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="text_Defaults" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2008 by Sun Microsystems, Inc. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' $RCSfile: text_Defaults.xba,v $ +' +' $Revision: 1.3 $ +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + +' Be sure that all variables are dimensioned: +option explicit + + + +Sub RunTest() + +'************************************************************************* +' SERVICE: +' com.sun.star.text.Defaults +'************************************************************************* +On Error Goto ErrHndl + + PropertyTester.TestProperty("TabStopDistance") + +Exit Sub +ErrHndl: + Test.Exception() + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/text/DocumentIndex/script.xlb b/qadevOOo/tests/basic/ifc/text/DocumentIndex/script.xlb new file mode 100644 index 000000000000..387227462568 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/text/DocumentIndex/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="text_DocumentIndex" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="text_DocumentIndex"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/text/DocumentIndex/text_DocumentIndex.xba b/qadevOOo/tests/basic/ifc/text/DocumentIndex/text_DocumentIndex.xba new file mode 100644 index 000000000000..ac7ab7a127f7 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/text/DocumentIndex/text_DocumentIndex.xba @@ -0,0 +1,70 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="text_DocumentIndex" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2008 by Sun Microsystems, Inc. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' $RCSfile: text_DocumentIndex.xba,v $ +' +' $Revision: 1.3 $ +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + +' Be sure that all variables are dimensioned: +option explicit + + + +Sub RunTest() + +'************************************************************************* +' SERVICE: +' com.sun.star.text.DocumentIndex +'************************************************************************* +On Error Goto ErrHndl + + PropertyTester.TestProperty("UseAlphabeticalSeparators") + PropertyTester.TestProperty("UseKeyAsEntry") + PropertyTester.TestProperty("UseCombinedEntries") + PropertyTester.TestProperty("IsCaseSensitive") + PropertyTester.TestProperty("UsePP") + PropertyTester.TestProperty("UseDash") + PropertyTester.TestProperty("UseUpperCase") + PropertyTester.TestProperty("MainEntryCharacterStyleName") + PropertyTester.TestProperty("DocumentIndexMarks") + PropertyTester.TestProperty("Locale") + PropertyTester.TestProperty("SortAlgorithm") + +Exit Sub +ErrHndl: + Test.Exception() + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/text/DocumentIndexMark/script.xlb b/qadevOOo/tests/basic/ifc/text/DocumentIndexMark/script.xlb new file mode 100644 index 000000000000..46a08a71d963 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/text/DocumentIndexMark/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="text_DocumentIndexMark" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="text_DocumentIndexMark"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/text/DocumentIndexMark/text_DocumentIndexMark.xba b/qadevOOo/tests/basic/ifc/text/DocumentIndexMark/text_DocumentIndexMark.xba new file mode 100644 index 000000000000..5b41336ddee9 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/text/DocumentIndexMark/text_DocumentIndexMark.xba @@ -0,0 +1,64 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="text_DocumentIndexMark" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2008 by Sun Microsystems, Inc. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' $RCSfile: text_DocumentIndexMark.xba,v $ +' +' $Revision: 1.3 $ +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + + + +Sub RunTest() + +'************************************************************************* +' SERVICE: +' com.sun.star.text.DocumentIndexMark +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + + + PropertyTester.TestProperty("PrimaryKey") + + PropertyTester.TestProperty("SecondaryKey") + + PropertyTester.TestProperty("IsMainEntry") + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/text/Footnote/script.xlb b/qadevOOo/tests/basic/ifc/text/Footnote/script.xlb new file mode 100644 index 000000000000..d0a6ba452943 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/text/Footnote/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="text_Footnote" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="text_Footnote"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/text/Footnote/text_Footnote.xba b/qadevOOo/tests/basic/ifc/text/Footnote/text_Footnote.xba new file mode 100644 index 000000000000..3e788f8af4d8 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/text/Footnote/text_Footnote.xba @@ -0,0 +1,60 @@ +<?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="text_Footnote" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2008 by Sun Microsystems, Inc. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' $RCSfile: text_Footnote.xba,v $ +' +' $Revision: 1.3 $ +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + + + +Sub RunTest() + +'************************************************************************* +' SERVICE: +' com.sun.star.text.Footnote +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + + + PropertyTester.TestProperty("ReferenceId") + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/text/FootnoteSettings/script.xlb b/qadevOOo/tests/basic/ifc/text/FootnoteSettings/script.xlb new file mode 100644 index 000000000000..552949b4a5ff --- /dev/null +++ b/qadevOOo/tests/basic/ifc/text/FootnoteSettings/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="text_FootnoteSettings" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="text_FootnoteSettings"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/text/FootnoteSettings/text_FootnoteSettings.xba b/qadevOOo/tests/basic/ifc/text/FootnoteSettings/text_FootnoteSettings.xba new file mode 100644 index 000000000000..5ed83651cd5b --- /dev/null +++ b/qadevOOo/tests/basic/ifc/text/FootnoteSettings/text_FootnoteSettings.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="text_FootnoteSettings" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2008 by Sun Microsystems, Inc. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' $RCSfile: text_FootnoteSettings.xba,v $ +' +' $Revision: 1.3 $ +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + + + +Sub RunTest() + +'************************************************************************* +' SERVICE: +' com.sun.star.text.FootnoteSettings +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + + + Dim aSymbolArr(1) As String + aSymbolArr(0) = "Footnote Symbol" + aSymbolArr(1) = "Endnote Symbol" + PropertyTester.TestProperty("CharStyleName",aSymbolArr()) + + PropertyTester.TestProperty("NumberingType") + + Dim aPageStyles(0 to 2) As String + aPageStyles(0) = "HTML" + aPageStyles(1) = "Index" + aPageStyles(2) = "Endnote" + PropertyTester.TestProperty("PageStyleName",aPageStyles()) + + Dim aParaStyles(0 to 2) As String + aParaStyles(0) = "Heading" + aParaStyles(1) = "Signature" + aParaStyles(2) = "Standard" + PropertyTester.TestProperty("ParaStyleName",aParaStyles()) + + PropertyTester.TestProperty("Prefix") + + PropertyTester.TestProperty("StartAt") + + PropertyTester.TestProperty("Suffix") + + PropertyTester.TestProperty("BeginNotice") + + PropertyTester.TestProperty("EndNotice") + + Dim aCounting(0 to 1) As Integer + aCounting(0) = 1 + aCounting(1) = 2 + PropertyTester.TestProperty("FootnoteCounting",aCounting()) + + PropertyTester.TestProperty("PositionEndOfDoc") + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/text/LineNumberingProperties/script.xlb b/qadevOOo/tests/basic/ifc/text/LineNumberingProperties/script.xlb new file mode 100644 index 000000000000..23e31fcc63f6 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/text/LineNumberingProperties/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="text_LineNumberingProperties" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="text_LineNumberingProperties"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/text/LineNumberingProperties/text_LineNumberingProperties.xba b/qadevOOo/tests/basic/ifc/text/LineNumberingProperties/text_LineNumberingProperties.xba new file mode 100644 index 000000000000..6f5c24748a80 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/text/LineNumberingProperties/text_LineNumberingProperties.xba @@ -0,0 +1,84 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="text_LineNumberingProperties" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2008 by Sun Microsystems, Inc. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' $RCSfile: text_LineNumberingProperties.xba,v $ +' +' $Revision: 1.3 $ +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + + + +Sub RunTest() + +'************************************************************************* +' SERVICE: +' com.sun.star.text.LineNumberingProperties +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + + + PropertyTester.TestProperty("IsOn") + + Dim aNames(1) As String + aNames(0) = "Endnote anchor" + aNames(1) = "Endnote Symbol" + PropertyTester.TestProperty("CharStyleName", aNames()) + + PropertyTester.TestProperty("CountEmptyLines") + + PropertyTester.TestProperty("CountLinesInFrames") + + PropertyTester.TestProperty("Distance") + + PropertyTester.TestProperty("Interval") + + PropertyTester.TestProperty("SeparatorText") + + PropertyTester.TestProperty("SeparatorInterval") + + Dim aPositions(1) As Integer + aPositions(0) = 1 + aPositions(1) = 0 + PropertyTester.TestProperty("NumberPosition", aPositions()) + + PropertyTester.TestProperty("NumberingType") + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/text/MailMerge/script.xlb b/qadevOOo/tests/basic/ifc/text/MailMerge/script.xlb new file mode 100644 index 000000000000..8ea1d96356a7 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/text/MailMerge/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="text_MailMerge" library:readonly="false" library:passwordprotected="false"> + <library:element library:name="text_MailMerge"/> + </library:library> diff --git a/qadevOOo/tests/basic/ifc/text/MailMerge/text_MailMerge.xba b/qadevOOo/tests/basic/ifc/text/MailMerge/text_MailMerge.xba new file mode 100644 index 000000000000..acc28dd8f7c5 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/text/MailMerge/text_MailMerge.xba @@ -0,0 +1,98 @@ +<?xml version="1.0" encoding="UTF-8"?> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="text_MailMerge" script:language="StarBasic"> + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2008 by Sun Microsystems, Inc. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' $RCSfile: text_MailMerge.xba,v $ +' +' $Revision: 1.4 $ +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + +'************************************************************************* +' This Interface/Service test depends on the following GLOBAL variables, +' which must be specified in the object creation: + +' Global cMailMerge_DocumentURL as String +' cMailMerge_DocumentURL must be a valid Document URL + +'************************************************************************* + +' Be sure that all variables are dimensioned: +option explicit + +Sub RunTest() + +'************************************************************************* +' INTERFACE: +' com.sun.star.text.MailMerge +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + + PropertyTester.TestProperty("DataSourceName") + + Dim DataCommandTypes(2) as Integer + DataCommandTypes(0) = com.sun.star.sdb.CommandType.TABLE + DataCommandTypes(1) = com.sun.star.sdb.CommandType.QUERY + DataCommandTypes(2) = com.sun.star.sdb.CommandType.COMMAND + PropertyTester.TestProperty("CommandType", DataCommandTypes()) + + PropertyTester.TestProperty("Command") + + PropertyTester.TestProperty("ResultSet") + + PropertyTester.TestProperty("ActiveConnection") + + PropertyTester.TestProperty("Selection", Array(Array(2,4), Array(1,3))) + + PropertyTester.TestProperty("EscapeProcessing", ) + + PropertyTester.TestProperty("Filter") + + PropertyTester.TestProperty("DocumentURL", Array(cMailMerge_DocumentURL)) + + PropertyTester.TestProperty("Model") + + PropertyTester.TestProperty("OutputType") + + PropertyTester.TestProperty("SinglePrintJobs") + + PropertyTester.TestProperty("OutputURL", Array(ConvertToURL(utils.getUserPath()))) + + PropertyTester.TestProperty("FileNameFromColumn") + + PropertyTester.TestProperty("FileNamePrefix") + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub + +</script:module> diff --git a/qadevOOo/tests/basic/ifc/text/NumberingRules/script.xlb b/qadevOOo/tests/basic/ifc/text/NumberingRules/script.xlb new file mode 100644 index 000000000000..fdd8280545eb --- /dev/null +++ b/qadevOOo/tests/basic/ifc/text/NumberingRules/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="text_NumberingRules" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="text_NumberingRules"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/text/NumberingRules/text_NumberingRules.xba b/qadevOOo/tests/basic/ifc/text/NumberingRules/text_NumberingRules.xba new file mode 100644 index 000000000000..2238a59bef99 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/text/NumberingRules/text_NumberingRules.xba @@ -0,0 +1,66 @@ +<?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="text_NumberingRules" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2008 by Sun Microsystems, Inc. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' $RCSfile: text_NumberingRules.xba,v $ +' +' $Revision: 1.3 $ +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + + + +Sub RunTest() + +'************************************************************************* +' SERVICE: +' com.sun.star.text.NumberingRules +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + + + PropertyTester.TestProperty("IsAbsoluteMargins") + + PropertyTester.TestProperty("IsAutomatic") + + PropertyTester.TestProperty("IsContinuousNumbering") + + PropertyTester.TestProperty("Name") + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/text/PrintSettings/script.xlb b/qadevOOo/tests/basic/ifc/text/PrintSettings/script.xlb new file mode 100644 index 000000000000..9e9b673d4c3e --- /dev/null +++ b/qadevOOo/tests/basic/ifc/text/PrintSettings/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="text_PrintSettings" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="text_PrintSettings"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/text/PrintSettings/text_PrintSettings.xba b/qadevOOo/tests/basic/ifc/text/PrintSettings/text_PrintSettings.xba new file mode 100644 index 000000000000..db965762fa05 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/text/PrintSettings/text_PrintSettings.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="text_PrintSettings" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2008 by Sun Microsystems, Inc. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' $RCSfile: text_PrintSettings.xba,v $ +' +' $Revision: 1.3 $ +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + + + +Sub RunTest() + +'************************************************************************* +' SERVICE: +' com.sun.star.text.PrintSettings +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + + PropertyTester.TestProperty("PrintGraphics") + + PropertyTester.TestProperty("PrintTables") + + PropertyTester.TestProperty("PrintDrawings") + + PropertyTester.TestProperty("PrintLeftPages") + + PropertyTester.TestProperty("PrintRightPages") + + PropertyTester.TestProperty("PrintControls") + + PropertyTester.TestProperty("PrintReversed") + + PropertyTester.TestProperty("PrintPaperFromSetup") + + PropertyTester.TestProperty("PrintFaxName") + + PropertyTester.TestProperty("PrintAnnotationMode", Array( _ + com.sun.star.text.NotePrintMode.NOT, _ + com.sun.star.text.NotePrintMode.ONLY, _ + com.sun.star.text.NotePrintMode.DOC_END, _ + com.sun.star.text.NotePrintMode.PAGE_END)) + + PropertyTester.TestProperty("PrintProspect") + + PropertyTester.TestProperty("PrintPageBackground") + + PropertyTester.TestProperty("PrintBlackFonts") + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/text/Text/script.xlb b/qadevOOo/tests/basic/ifc/text/Text/script.xlb new file mode 100644 index 000000000000..e86fce1e13bd --- /dev/null +++ b/qadevOOo/tests/basic/ifc/text/Text/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="text_Text" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="text_Text"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/text/Text/text_Text.xba b/qadevOOo/tests/basic/ifc/text/Text/text_Text.xba new file mode 100644 index 000000000000..4033f82ff626 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/text/Text/text_Text.xba @@ -0,0 +1,60 @@ +<?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="text_Text" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2008 by Sun Microsystems, Inc. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' $RCSfile: text_Text.xba,v $ +' +' $Revision: 1.3 $ +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + + + +Sub RunTest() + +'************************************************************************* +' SERVICE: +' com.sun.star.text.Text +'************************************************************************* +On Error Goto ErrHndl + + PropertyTester.TestProperty("StartRedline") + + PropertyTester.TestProperty("EndRedline") + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/text/TextColumns/script.xlb b/qadevOOo/tests/basic/ifc/text/TextColumns/script.xlb new file mode 100644 index 000000000000..c8aeed8326d5 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/text/TextColumns/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="text_TextColumns" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="text_TextColumns"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/text/TextColumns/text_TextColumns.xba b/qadevOOo/tests/basic/ifc/text/TextColumns/text_TextColumns.xba new file mode 100644 index 000000000000..ba6ee7843459 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/text/TextColumns/text_TextColumns.xba @@ -0,0 +1,79 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="text_TextColumns" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2008 by Sun Microsystems, Inc. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' $RCSfile: text_TextColumns.xba,v $ +' +' $Revision: 1.3 $ +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + + + +Sub RunTest() + +'************************************************************************* +' SERVICE: +' com.sun.star.text.TextColumns +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + PropertyTester.TestProperty("IsAutomatic") + + Test.StartMethod("AutomaticDistance") + bOK = true + if (oObj.IsAutomatic) then + bOK = PropertyTester.TestProperty("AutomaticDistance") + else + Out.Log("AutomaticDistance is available ONLY if IsAutomatic is TRUE. " & _ + "But it is FALSE.") + end if + + Test.MethodTested("AutomaticDistance", bOK) + + PropertyTester.TestProperty("SeparatorLineWidth") + PropertyTester.TestProperty("SeparatorLineColor") + + Dim aHeights(1) As Integer + aHeights(0) = 10 + aHeights(1) = 50 + PropertyTester.TestProperty("SeparatorLineRelativeHeight", aHeights()) + PropertyTester.TestProperty("SeparatorLineVerticalAlignment") + PropertyTester.TestProperty("SeparatorLineIsOn") + +Exit Sub +ErrHndl: + bOK = false + Test.Exception() + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/text/TextContent/script.xlb b/qadevOOo/tests/basic/ifc/text/TextContent/script.xlb new file mode 100644 index 000000000000..a28ef0745bf4 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/text/TextContent/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="text_TextContent" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="text_TextContent"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/text/TextContent/text_TextContent.xba b/qadevOOo/tests/basic/ifc/text/TextContent/text_TextContent.xba new file mode 100644 index 000000000000..519cca88b3d0 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/text/TextContent/text_TextContent.xba @@ -0,0 +1,82 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="text_TextContent" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2008 by Sun Microsystems, Inc. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' $RCSfile: text_TextContent.xba,v $ +' +' $Revision: 1.3 $ +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + +' Be sure that all variables are dimensioned: +option explicit + + + +Sub RunTest() + +'************************************************************************* +' SERVICE: +' com.sun.star.text.TextContent +'************************************************************************* +On Error Goto ErrHndl + Dim noElems() + Dim count,i,j As Integer + + j = 0 + if (oObj.getPropertySetInfo.hasPropertyByName("AnchorTypes")) then + count = ubound(oObj.AnchorTypes()) + if (count <> 0) then + Dim aTypes(count-1) As Variant + for i = 0 to (count) + if oObj.AnchorTypes(i) <> _ + com.sun.star.text.TextContentAnchorType.AT_FRAME then + aTypes(j) = oObj.AnchorTypes(i) + j = j + 1 + endif + next i + PropertyTester.TestProperty("AnchorType",aTypes()) + else + PropertyTester.TestProperty("AnchorType") + endif + else + PropertyTester.TestProperty("AnchorType") + endif + + PropertyTester.TestProperty("AnchorTypes", noElems()) + PropertyTester.TestProperty("TextWrap") +Exit Sub +ErrHndl: + Test.Exception() + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/text/TextDocument/script.xlb b/qadevOOo/tests/basic/ifc/text/TextDocument/script.xlb new file mode 100644 index 000000000000..852fc6355d18 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/text/TextDocument/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="text_TextDocument" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="text_TextDocument"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/text/TextDocument/text_TextDocument.xba b/qadevOOo/tests/basic/ifc/text/TextDocument/text_TextDocument.xba new file mode 100644 index 000000000000..c242d051df3d --- /dev/null +++ b/qadevOOo/tests/basic/ifc/text/TextDocument/text_TextDocument.xba @@ -0,0 +1,74 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="text_TextDocument" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2008 by Sun Microsystems, Inc. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' $RCSfile: text_TextDocument.xba,v $ +' +' $Revision: 1.3 $ +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + + + +Sub RunTest() + +'************************************************************************* +' SERVICE: +' com.sun.star.text.TextDocument +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + + + PropertyTester.TestProperty("CharLocale") + + PropertyTester.TestProperty("CharacterCount") + + PropertyTester.TestProperty("ParagraphCount") + + PropertyTester.TestProperty("WordCount") + + PropertyTester.TestProperty("WordSeparator") + + PropertyTester.TestProperty("IndexAutoMarkFileURL") + + PropertyTester.TestProperty("RecordChanges") + + PropertyTester.TestProperty("TwoDigitYear") + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/text/TextFieldMaster/script.xlb b/qadevOOo/tests/basic/ifc/text/TextFieldMaster/script.xlb new file mode 100644 index 000000000000..a9998b0a93f9 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/text/TextFieldMaster/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="text_TextFieldMaster" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="text_TextFieldMaster"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/text/TextFieldMaster/text_TextFieldMaster.xba b/qadevOOo/tests/basic/ifc/text/TextFieldMaster/text_TextFieldMaster.xba new file mode 100644 index 000000000000..65a8eb08b9d6 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/text/TextFieldMaster/text_TextFieldMaster.xba @@ -0,0 +1,61 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="text_TextFieldMaster" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2008 by Sun Microsystems, Inc. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' $RCSfile: text_TextFieldMaster.xba,v $ +' +' $Revision: 1.3 $ +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + + + +Sub RunTest() + +'************************************************************************* +' SERVICE: +' com.sun.star.text.TextFieldMaster +'************************************************************************* +On Error Goto ErrHndl + + PropertyTester.TestProperty("Name") + + PropertyTester.TestProperty("DependentTextFields") + + PropertyTester.TestProperty("InstanceName") + +Exit Sub +ErrHndl: + Test.Exception() + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/text/TextFrame/script.xlb b/qadevOOo/tests/basic/ifc/text/TextFrame/script.xlb new file mode 100644 index 000000000000..658d59486b38 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/text/TextFrame/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="text_TextFrame" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="text_TextFrame"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/text/TextFrame/text_TextFrame.xba b/qadevOOo/tests/basic/ifc/text/TextFrame/text_TextFrame.xba new file mode 100644 index 000000000000..9f95fd5ffdb2 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/text/TextFrame/text_TextFrame.xba @@ -0,0 +1,79 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="text_TextFrame" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2008 by Sun Microsystems, Inc. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' $RCSfile: text_TextFrame.xba,v $ +' +' $Revision: 1.3 $ +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + +' Be sure that all variables are dimensioned: +option explicit + + + +Sub RunTest() + +'************************************************************************* +' SERVICE: +' com.sun.star.text.TextFrame +'************************************************************************* +On Error Goto ErrHndl + oObj.SizeType = com.sun.star.text.SizeType.VARIABLE + PropertyTester.TestProperty("FrameHeightAbsolute") + + PropertyTester.TestProperty("FrameWidthAbsolute") + + Dim aPercents(2) As Integer + aPercents(0) = 25 + aPercents(1) = 50 + aPercents(2) = 100 + PropertyTester.TestProperty("FrameWidthPercent", aPercents()) + PropertyTester.TestProperty("FrameHeightPercent", aPercents()) + + PropertyTester.TestProperty("FrameIsAutomaticHeight") + + Dim SizeTypes(2) As Integer + SizeTypes(0) = com.sun.star.text.SizeType.VARIABLE + SizeTypes(1) = com.sun.star.text.SizeType.FIX + SizeTypes(2) = com.sun.star.text.SizeType.MIN + PropertyTester.TestProperty("SizeType",SizeTypes()) + + PropertyTester.TestProperty("WritingMode", Array(3)) + +Exit Sub +ErrHndl: + Test.Exception() + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/text/TextGraphicObject/script.xlb b/qadevOOo/tests/basic/ifc/text/TextGraphicObject/script.xlb new file mode 100644 index 000000000000..0c52b82b2a91 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/text/TextGraphicObject/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="text_TextGraphicObject" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="text_TextGraphicObject"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/text/TextGraphicObject/text_TextGraphicObject.xba b/qadevOOo/tests/basic/ifc/text/TextGraphicObject/text_TextGraphicObject.xba new file mode 100644 index 000000000000..eb085fa2034b --- /dev/null +++ b/qadevOOo/tests/basic/ifc/text/TextGraphicObject/text_TextGraphicObject.xba @@ -0,0 +1,211 @@ +<?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="text_TextGraphicObject" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2008 by Sun Microsystems, Inc. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' $RCSfile: text_TextGraphicObject.xba,v $ +' +' $Revision: 1.3 $ +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + +' Be sure that all variables are dimensioned: +option explicit + + + +Sub RunTest() + +'************************************************************************* +' SERVICE: +' com.sun.star.text.TextGraphicObject +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + + + PropertyTester.TestProperty("ContentProtected") + + PropertyTester.TestProperty("SurroundContour") + + PropertyTester.TestProperty("ContourOutside") + + Test.StartMethod("ContourPolyPolygon") + ' Because in additional parameters we must to + ' pass an array of values, we need such array. + Dim aPParr1(1) As Variant + Dim aPol1(3) As new com.sun.star.awt.Point + Dim gArr As Variant + + bOK = true + aPol1(0).x = 0 : aPol1(0).y = 0 + aPol1(1).x = 101 : aPol1(1).y = 0 + aPol1(2).x = 101 : aPol1(2).y = 101 + aPol1(3).x = 0 : aPol1(3).y = 101 + Dim aPol2(3) As new com.sun.star.awt.Point + aPol2(0).x = 11 : aPol2(0).y = 11 + aPol2(1).x = 90 : aPol2(1).y = 11 + aPol2(2).x = 90 : aPol2(2).y = 90 + aPol2(3).x = 11 : aPol2(3).y = 90 + aPParr1(0) = aPol1() : aPParr1(1) = aPol2() + oObj.setPropertyValue("ContourPolyPolygon", aPParr1()) + gArr = oObj.getPropertyValue("ContourPolyPolygon") + + if isArray(gArr) AND ubound(gArr) >= 1 then + Dim aP1 As Variant, aP2 As Variant + + aP1 = gArr(0) + aP2 = gArr(1) + bOK = bOK AND comparePointArrays(aPol1(), aP1, 0, 0, 4) + bOK = bOK AND comparePointArrays(aPol2(), aP2, 0, 0, 4) + + ' One more point must be added to close the polygon + bOK = bOK AND comparePointArrays(aPol1(), aP1, 0, 4, 1) + bOK = bOK AND comparePointArrays(aPol2(), aP2, 0, 4, 1) + else + Out.Log("Returned value is invalid") + Out.Log = false + endif + + Test.MethodTested("ContourPolyPolygon", bOK) + +' PropertyTester.TestProperty("ContourPolyPolygon",testArr()) + + Dim aCropArr(1) As Variant + Dim Crop1 As Object + Dim Crop2 As Object + + Crop1 = createUnoStruct("com.sun.star.text.GraphicCrop") + Crop2 = createUnoStruct("com.sun.star.text.GraphicCrop") + + Crop1.Top = 11 : Crop1.Bottom = 11 : Crop1.Left = 11 : Crop1.Right = 11 + Crop2.Top = -11 : Crop2.Bottom = 11 : Crop2.Left = -11 : Crop2.Right = 11 + + aCropArr(0) = Crop1 : aCropArr(1) = Crop2 + PropertyTester.TestProperty("GraphicCrop",aCropArr()) + + PropertyTester.TestProperty("HoriMirroredOnEvenPages") + + PropertyTester.TestProperty("HoriMirroredOnOddPages") + + PropertyTester.TestProperty("VertMirrored") + + PropertyTester.TestProperty("GraphicURL") + + PropertyTester.TestProperty("GraphicFilter") + + PropertyTester.TestProperty("ActualSize") + + Dim oAdjustArr(4) As Integer + oAdjustArr(0) = -100 + oAdjustArr(1) = -50 + oAdjustArr(2) = 0 + oAdjustArr(3) = 50 + oAdjustArr(4) = 100 + + PropertyTester.TestProperty("AdjustLuminance",oAdjustArr()) + + PropertyTester.TestProperty("AdjustContrast",oAdjustArr()) + + PropertyTester.TestProperty("AdjustRed",oAdjustArr()) + + PropertyTester.TestProperty("AdjustGreen",oAdjustArr()) + + PropertyTester.TestProperty("AdjustBlue",oAdjustArr()) + + PropertyTester.TestProperty("Gamma",oAdjustArr()) + + PropertyTester.TestProperty("GraphicIsInverted") + + PropertyTester.TestProperty("Transparency",oAdjustArr()) + + PropertyTester.TestProperty("GraphicColorMode") + + PropertyTester.TestProperty("ImageMap") + + PropertyTester.TestProperty("ActualSize") + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub + +Function comparePointArrays(arr1 As Variant, arr2 As Variant, fromIdx1 As Integer, fromIdx2 As Integer, count As Integer) As Boolean +On Error Goto ErrHndl + Dim bOK As Boolean + Dim i As Integer + + if NOT isArray(arr1) then + Out.Log("First parameter is not Array.") + comparePointArrays() = false + exit Function + endif + + if NOT isArray(arr2) then + Out.Log("Second parameter is not Array.") + comparePointArrays() = false + exit Function + endif + + if (lbound(arr1) > fromIdx1 OR ubound(arr1) < (fromIdx1 + count - 1)) then + Out.Log("Invalid bounds of the first array") + comparePointArrays() = false + exit Function + endif + if (lbound(arr2) > fromIdx2 OR ubound(arr2) < (fromIdx2 + count - 1)) then + Out.Log("Invalid bounds of the second array") + comparePointArrays() = false + exit Function + endif + + bOK = true + for i = 0 to count - 1 + if arr1(fromIdx1 + i).x <> arr2(fromIdx2 + i).x OR _ + arr1(fromIdx1 + i).y <> arr2(fromIdx2 + i).y then + + Out.Log("Points #" + i + " are different : (" + _ + arr1(fromIdx1 + i).x + "," + arr1(fromIdx1 + i).y + "), (" + _ + arr2(fromIdx2 + i).x + "," + arr2(fromIdx2 + i).y + ")." + + bOK = false + end if + next i + + comparePointArrays() = bOK + + exit Function +ErrHndl: + Test.Exception() + comparePointArrays() = false +End Function +</script:module> diff --git a/qadevOOo/tests/basic/ifc/text/TextPortion/script.xlb b/qadevOOo/tests/basic/ifc/text/TextPortion/script.xlb new file mode 100644 index 000000000000..0aefd8463cfc --- /dev/null +++ b/qadevOOo/tests/basic/ifc/text/TextPortion/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="text_TextPortion" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="text_TextPortion"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/text/TextPortion/text_TextPortion.xba b/qadevOOo/tests/basic/ifc/text/TextPortion/text_TextPortion.xba new file mode 100644 index 000000000000..93c70c4eeb46 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/text/TextPortion/text_TextPortion.xba @@ -0,0 +1,70 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="text_TextPortion" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2008 by Sun Microsystems, Inc. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' $RCSfile: text_TextPortion.xba,v $ +' +' $Revision: 1.3 $ +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + + + +Sub RunTest() + +'************************************************************************* +' SERVICE: +' com.sun.star.text.TextPortion +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + + + PropertyTester.TestProperty("TextPortionType") + + PropertyTester.TestProperty("ControlCharacter") + + +' + PropertyTester.TestProperty("Bookmark") + + PropertyTester.TestProperty("IsCollapsed") + + PropertyTester.TestProperty("IsStart") + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/text/TextSection/script.xlb b/qadevOOo/tests/basic/ifc/text/TextSection/script.xlb new file mode 100644 index 000000000000..649b8eee5e98 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/text/TextSection/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="text_TextSection" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="text_TextSection"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/text/TextSection/text_TextSection.xba b/qadevOOo/tests/basic/ifc/text/TextSection/text_TextSection.xba new file mode 100644 index 000000000000..8ba2d41ed9d7 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/text/TextSection/text_TextSection.xba @@ -0,0 +1,143 @@ +<?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="text_TextSection" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2008 by Sun Microsystems, Inc. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' $RCSfile: text_TextSection.xba,v $ +' +' $Revision: 1.4 $ +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + +' Be sure that all variables are dimensioned: +option explicit + + + +Sub RunTest() + +'************************************************************************* +' SERVICE: +' com.sun.star.text.TextSection +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + + + PropertyTester.TestProperty("Condition") + + PropertyTester.TestProperty("IsVisible") + + PropertyTester.TestProperty("IsProtected") + + Dim link As New com.sun.star.text.SectionFileLink + link.FileURL = utils.Path2URL(cTestDocsDir + "Iterator.sxw") + + PropertyTester.TestProperty("FileLink", Array(link)) + + PropertyTester.TestProperty("LinkRegion") + + PropertyTester.TestProperty("DDECommandType") + + PropertyTester.TestProperty("DDECommandFile") + + PropertyTester.TestProperty("DDECommandElement") + + PropertyTester.TestProperty("BackGraphicURL") + + PropertyTester.TestProperty("BackGraphicFilter") + + PropertyTester.TestProperty("BackGraphicLocation") + + PropertyTester.TestProperty("FootnoteIsCollectAtTextEnd") + + PropertyTester.TestProperty("FootnoteIsRestartNumbering") + + PropertyTester.TestProperty("FootnoteRestartNumberingAt") + + PropertyTester.TestProperty("FootnoteIsOwnNumbering") + + oObj.FootnoteIsOwnNumbering = true + oObj.FootnoteNumberingType = 1 + PropertyTester.TestProperty("FootnoteNumberingType", Array(com.sun.star.style.NumberingType.ARABIC)) + + PropertyTester.TestProperty("FootnoteNumberingPrefix") + + PropertyTester.TestProperty("FootnoteNumberingSuffix") + + PropertyTester.TestProperty("EndnoteIsCollectAtTextEnd") + + PropertyTester.TestProperty("EndnoteIsRestartNumbering") + + PropertyTester.TestProperty("EndnoteRestartNumberingAt") + + PropertyTester.TestProperty("EndnoteIsOwnNumbering") + + oObj.EndnoteIsOwnNumbering = true + oObj.EndnoteNumberingType = 1 + PropertyTester.TestProperty("EndnoteNumberingType", Array(com.sun.star.style.NumberingType.ARABIC)) + + PropertyTester.TestProperty("EndnoteNumberingPrefix") + + PropertyTester.TestProperty("EndnoteNumberingSuffix") + + PropertyTester.TestProperty("IsAutomaticUpdate") + + Test.StartMethod("TextColumns") + Dim oTC As Variant + Dim oldVal, newVal, val2set As Integer + oTC = oDoc.createInstance("com.sun.star.text.TextColumns") + oldVal = oObj.TextColumns.ColumnCount + Out.Log("COLUMNS BEFORE: "+oldVal) + if (oldVal < 100) then + val2set = oldVal + 20 + else + val2set = oldVal - 20 + Endif + Out.Log("COLUMNS TO SET: "+val2set) + oTC.ColumnCount = val2set + oObj.TextColumns = oTC + newVal = oObj.TextColumns.ColumnCount + Out.Log("COLUMNS AFTER: "+newVal) + bOK = oldVal <> newVal + Test.MethodTested("TextColumns", bOK) + + PropertyTester.TestProperty("SectionLeftMargin") + + PropertyTester.TestProperty("SectionRightMargin") + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/text/TextTable/script.xlb b/qadevOOo/tests/basic/ifc/text/TextTable/script.xlb new file mode 100644 index 000000000000..e7e7a0ab6ce4 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/text/TextTable/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="text_TextTable" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="text_TextTable"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/text/TextTable/text_TextTable.xba b/qadevOOo/tests/basic/ifc/text/TextTable/text_TextTable.xba new file mode 100644 index 000000000000..6b861372a1d7 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/text/TextTable/text_TextTable.xba @@ -0,0 +1,132 @@ +<?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="text_TextTable" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2008 by Sun Microsystems, Inc. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' $RCSfile: text_TextTable.xba,v $ +' +' $Revision: 1.3 $ +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + +' Be sure that all variables are dimensioned: +option explicit + + + +Sub RunTest() + +'************************************************************************* +' SERVICE: +' com.sun.star.text.TextTable +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim border As Variant + Dim oldVal As Variant, newVal As Variant, getVal As Variant + + + PropertyTester.TestProperty("BreakType") + + PropertyTester.TestProperty("LeftMargin") + + PropertyTester.TestProperty("RightMargin") + + PropertyTester.TestProperty("HoriOrient", Array( _ + com.sun.star.text.HoriOrientation.NONE, _ + com.sun.star.text.HoriOrientation.RIGHT, _ + com.sun.star.text.HoriOrientation.CENTER, _ + com.sun.star.text.HoriOrientation.LEFT, _ + com.sun.star.text.HoriOrientation.INSIDE, _ + com.sun.star.text.HoriOrientation.OUTSIDE, _ + com.sun.star.text.HoriOrientation.FULL, _ + com.sun.star.text.HoriOrientation.LEFT_AND_WIDTH)) + + PropertyTester.TestProperty("KeepTogether") + + PropertyTester.TestProperty("Split") + + PropertyTester.TestProperty("PageNumberOffset", Array(1, 2)) + + PropertyTester.TestProperty("PageDescName", Array("First Page")) + + PropertyTester.TestProperty("RelativeWidth", Array(50, 100)) + + PropertyTester.TestProperty("RepeatHeadline") + + PropertyTester.TestProperty("ShadowFormat") + + PropertyTester.TestProperty("TopMargin") + + PropertyTester.TestProperty("BottomMargin") + + PropertyTester.TestProperty("BackTransparent") + + PropertyTester.TestProperty("Width") + + oldVal = oObj.ChartRowAsLabel + PropertyTester.TestProperty("ChartRowAsLabel") + oObj.ChartRowAsLabel = oldVal + + oldVal = oObj.ChartColumnAsLabel + PropertyTester.TestProperty("ChartColumnAsLabel") + oObj.ChartColumnAsLabel = oldVal + + border = oObj.TableBorder + oldVal = border.Distance + newVal = oldVal + 200 + border.Distance = newVal + + PropertyTester.TestProperty("TableBorder", Array(border)) + + PropertyTester.TestProperty("TableColumnSeparators") + + PropertyTester.TestProperty("TableColumnRelativeSum") + + PropertyTester.TestProperty("BackColor") + + PropertyTester.TestProperty("BackGraphicURL") + + PropertyTester.TestProperty("BackGraphicFilter") + + PropertyTester.TestProperty("BackGraphicLocation") + + oObj.HoriOrient = com.sun.star.text.HoriOrientation.CENTER + oObj.RelativeWidth = 50 + PropertyTester.TestProperty("IsWidthRelative", Array(FALSE)) + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/text/TextTableRow/script.xlb b/qadevOOo/tests/basic/ifc/text/TextTableRow/script.xlb new file mode 100644 index 000000000000..43be1c5b512f --- /dev/null +++ b/qadevOOo/tests/basic/ifc/text/TextTableRow/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="text_TextTableRow" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="text_TextTableRow"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/text/TextTableRow/text_TextTableRow.xba b/qadevOOo/tests/basic/ifc/text/TextTableRow/text_TextTableRow.xba new file mode 100644 index 000000000000..fc3118abbeed --- /dev/null +++ b/qadevOOo/tests/basic/ifc/text/TextTableRow/text_TextTableRow.xba @@ -0,0 +1,79 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="text_TextTableRow" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2008 by Sun Microsystems, Inc. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' $RCSfile: text_TextTableRow.xba,v $ +' +' $Revision: 1.3 $ +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + +' Be sure that all variables are dimensioned: +option explicit + + + +Sub RunTest() + +'************************************************************************* +' SERVICE: +' com.sun.star.text.TextTableRow +'************************************************************************* +On Error Goto ErrHndl + PropertyTester.TestProperty("BackColor") + PropertyTester.TestProperty("BackTransparent") + PropertyTester.TestProperty("BackGraphicURL") + PropertyTester.TestProperty("BackGraphicFilter") + + Dim locations As Variant + locations = Array(_ + com.sun.star.style.GraphicLocation.LEFT_TOP,_ + com.sun.star.style.GraphicLocation.MIDDLE_TOP,_ + com.sun.star.style.GraphicLocation.RIGHT_TOP,_ + com.sun.star.style.GraphicLocation.LEFT_MIDDLE,_ + com.sun.star.style.GraphicLocation.MIDDLE_MIDDLE,_ + com.sun.star.style.GraphicLocation.RIGHT_MIDDLE,_ + com.sun.star.style.GraphicLocation.LEFT_BOTTOM,_ + com.sun.star.style.GraphicLocation.MIDDLE_BOTTOM,_ + com.sun.star.style.GraphicLocation.RIGHT_BOTTOM,_ + com.sun.star.style.GraphicLocation.AREA,_ + com.sun.star.style.GraphicLocation.TILED ) + PropertyTester.TestProperty("BackGraphicLocation", locations) + PropertyTester.TestProperty("TableColumnSeparators") + PropertyTester.TestProperty("Height") + PropertyTester.TestProperty("IsAutoHeight") +Exit Sub +ErrHndl: + Test.Exception() + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/text/ViewSettings/script.xlb b/qadevOOo/tests/basic/ifc/text/ViewSettings/script.xlb new file mode 100644 index 000000000000..8827ee26ea5e --- /dev/null +++ b/qadevOOo/tests/basic/ifc/text/ViewSettings/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="text_ViewSettings" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="text_ViewSettings"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/text/ViewSettings/text_ViewSettings.xba b/qadevOOo/tests/basic/ifc/text/ViewSettings/text_ViewSettings.xba new file mode 100644 index 000000000000..cbd7a592d5e9 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/text/ViewSettings/text_ViewSettings.xba @@ -0,0 +1,118 @@ +<?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="text_ViewSettings" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2008 by Sun Microsystems, Inc. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' $RCSfile: text_ViewSettings.xba,v $ +' +' $Revision: 1.3 $ +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + + + +Sub RunTest() + +'************************************************************************* +' SERVICE: +' com.sun.star.text.ViewSettings +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + + + PropertyTester.TestProperty("ShowAnnotations") + + PropertyTester.TestProperty("ShowBreaks") + + PropertyTester.TestProperty("ShowDrawings") + + PropertyTester.TestProperty("ShowFieldCommands") + + PropertyTester.TestProperty("ShowFootnoteBackground") + + PropertyTester.TestProperty("ShowGraphics") + + PropertyTester.TestProperty("ShowHiddenParagraphs") + + PropertyTester.TestProperty("ShowHiddenText") + + PropertyTester.TestProperty("ShowHoriRuler") + + PropertyTester.TestProperty("ShowHoriScrollBar") + + PropertyTester.TestProperty("ShowIndexMarkBackground") + + PropertyTester.TestProperty("ShowOnlineLayout") + + PropertyTester.TestProperty("ShowParaBreaks") + + PropertyTester.TestProperty("ShowProtectedSpaces") + + PropertyTester.TestProperty("ShowRulers") + + PropertyTester.TestProperty("ShowSoftHyphens") + + PropertyTester.TestProperty("ShowSpaces") + + PropertyTester.TestProperty("ShowTableBoundaries") + + PropertyTester.TestProperty("ShowTables") + + PropertyTester.TestProperty("ShowTabstops") + + PropertyTester.TestProperty("ShowTextBoundaries") + + PropertyTester.TestProperty("ShowTextFieldBackground") + + PropertyTester.TestProperty("ShowVertRuler") + + PropertyTester.TestProperty("ShowVertScrollBar") + + PropertyTester.TestProperty("SmoothScrolling") + + PropertyTester.TestProperty("SolidMarkHandles") + + PropertyTester.TestProperty("IsVertRulerRightAligned") + + Dim zoomTypes As Variant + zoomTypes = Array(0, 1, 2, 3) + PropertyTester.TestProperty("ZoomType", zoomTypes()) + + PropertyTester.TestProperty("ZoomValue") + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/text/XAutoTextContainer/script.xlb b/qadevOOo/tests/basic/ifc/text/XAutoTextContainer/script.xlb new file mode 100644 index 000000000000..3eebfbeaeb1b --- /dev/null +++ b/qadevOOo/tests/basic/ifc/text/XAutoTextContainer/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="text_XAutoTextContainer" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="text_XAutoTextContainer"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/text/XAutoTextContainer/text_XAutoTextContainer.xba b/qadevOOo/tests/basic/ifc/text/XAutoTextContainer/text_XAutoTextContainer.xba new file mode 100644 index 000000000000..9c97b5f98b70 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/text/XAutoTextContainer/text_XAutoTextContainer.xba @@ -0,0 +1,99 @@ +<?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="text_XAutoTextContainer" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2008 by Sun Microsystems, Inc. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' $RCSfile: text_XAutoTextContainer.xba,v $ +' +' $Revision: 1.3 $ +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + +' Be sure that all variables are dimensioned: +option explicit + +'************************************************************************* +' This Interface/Service test depends on the following GLOBAL variables, +' which must be specified in the object creation: + +' - Global nGlobalLong As Long + +'************************************************************************* + + + + + +Sub RunTest() + +'************************************************************************* +' INTERFACE: +' com.sun.star.text.XAutoTextContainer +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim oAutoText As Object + Dim aElementNames() As Variant + Dim i As Integer + Dim nCount As Integer + + Out.Log("Remove element with name '" & cIfcShortName & "' if exists") + aElementNames() = oObj.ElementNames + + for i = 0 to uBound(aElementNames()) + if aElementNames(i) = cIfcShortName then + oObj.removeByName(cIfcShortName) + nGlobalLong = oObj.Count + end if + next i + + Test.StartMethod("insertNewByName()") + bOK = true + oAutoText = oObj.insertNewByName(cIfcShortName) + nCount = oObj.Count + bOK = bOK AND (oObj.Count = nGlobalLong + 1) + Test.MethodTested("insertNewByName()", bOK) + + Test.StartMethod("removeByName()") + bOK = true + oObj.removeByName(cIfcShortName) + + nCount = oObj.Count + bOK = bOK AND (oObj.Count = nGlobalLong) + Test.MethodTested("removeByName()", bOK) + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/text/XAutoTextEntry/script.xlb b/qadevOOo/tests/basic/ifc/text/XAutoTextEntry/script.xlb new file mode 100644 index 000000000000..a35dec04f5bd --- /dev/null +++ b/qadevOOo/tests/basic/ifc/text/XAutoTextEntry/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="text_XAutoTextEntry" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="text_XAutoTextEntry"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/text/XAutoTextEntry/text_XAutoTextEntry.xba b/qadevOOo/tests/basic/ifc/text/XAutoTextEntry/text_XAutoTextEntry.xba new file mode 100644 index 000000000000..b4c2a1225953 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/text/XAutoTextEntry/text_XAutoTextEntry.xba @@ -0,0 +1,70 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="text_XAutoTextEntry" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2008 by Sun Microsystems, Inc. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' $RCSfile: text_XAutoTextEntry.xba,v $ +' +' $Revision: 1.3 $ +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + +' Be sure that all variables are dimensioned: +option explicit + + + +Sub RunTest() + +'************************************************************************* +' INTERFACE: +' com.sun.star.text.XAutoTextEntry +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim oldText As String, newText As String + + Test.StartMethod("applyTo()") + bOK = true + oldText = oDoc.Text.getString() + oObj.ApplyTo(oDoc.Text.createTextCursor()) + newText = oDoc.Text.getString() + bOK = bOK AND (newText <> oldText) + + Test.MethodTested("applyTo()", bOK) + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/text/XAutoTextGroup/script.xlb b/qadevOOo/tests/basic/ifc/text/XAutoTextGroup/script.xlb new file mode 100644 index 000000000000..11ef1cbd6ba5 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/text/XAutoTextGroup/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="text_XAutoTextGroup" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="text_XAutoTextGroup"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/text/XAutoTextGroup/text_XAutoTextGroup.xba b/qadevOOo/tests/basic/ifc/text/XAutoTextGroup/text_XAutoTextGroup.xba new file mode 100644 index 000000000000..8bac2721806c --- /dev/null +++ b/qadevOOo/tests/basic/ifc/text/XAutoTextGroup/text_XAutoTextGroup.xba @@ -0,0 +1,104 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="text_XAutoTextGroup" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2008 by Sun Microsystems, Inc. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' $RCSfile: text_XAutoTextGroup.xba,v $ +' +' $Revision: 1.3 $ +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + +'************************************************************************* +' This Interface/Service test depends on the following GLOBAL variables, +' which must be specified in the object creation: + +' - Global nGlobalLong as Long + +'************************************************************************* + + + + + +Sub RunTest() + +'************************************************************************* +' INTERFACE: +' com.sun.star.text.XAutoTextGroup +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + + Dim aTitles() As Variant + Dim aElements() As Variant + Dim oCursor As Object + + + bOK = true + + oCursor = oDoc.Text.createTextCursor() + oCursor.gotoEnd(true) + + Test.StartMethod("getTitles()") + bOK = true + aTitles() = oObj.Titles + bOK = bOK AND NOT (uBound(aTitles()) = -1) + Test.MethodTested("getTitles()", bOK) + + Test.StartMethod("insertNewByName()") + bOK = true + oObj.insertNewByName(cIfcShortName, cIfcShortName, oCursor) + bOK = bOK AND (oObj.Count > nGlobalLong) + Test.MethodTested("insertNewByName()", bOK) + + Test.StartMethod("renameByName()") + bOK = true + cName = mid(cIfcShortName,1,2) + oObj.renameByName(cIfcShortName,cName, cName & cIfcShortName ) + aElements() = oObj.getElementNames() + bOk = bOK AND (cName = aElements(uBound(aElements()))) + Test.MethodTested("renameByName()", bOK) + + Test.StartMethod("removeByName()") + bOK = true + oObj.removeByName(cName) + aElements() = oObj.getElementNames() + bOk = bOK AND (cName <> aElements(uBound(aElements()))) + Test.MethodTested("removeByName()", bOK) + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/text/XChapterNumberingSupplier/script.xlb b/qadevOOo/tests/basic/ifc/text/XChapterNumberingSupplier/script.xlb new file mode 100644 index 000000000000..5ba4d5a9a0d7 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/text/XChapterNumberingSupplier/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="text_XChapterNumberingSupplier" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="text_XChapterNumberingSupplier"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/text/XChapterNumberingSupplier/text_XChapterNumberingSupplier.xba b/qadevOOo/tests/basic/ifc/text/XChapterNumberingSupplier/text_XChapterNumberingSupplier.xba new file mode 100644 index 000000000000..ca7cac6ab187 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/text/XChapterNumberingSupplier/text_XChapterNumberingSupplier.xba @@ -0,0 +1,64 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="text_XChapterNumberingSupplier" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2008 by Sun Microsystems, Inc. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' $RCSfile: text_XChapterNumberingSupplier.xba,v $ +' +' $Revision: 1.3 $ +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + + + +Sub RunTest() + +'************************************************************************* +' INTERFACE: +' com.sun.star.text.XChapterNumberingSupplier +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + + + Test.StartMethod("getChapterNumberingRules()") + bOK = true + + bOK = bOK AND hasUnoInterfaces(oObj.getChapterNumberingRules(), "com.sun.star.container.XIndexReplace") + Test.MethodTested("getChapterNumberingRules()", bOK) + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/text/XDefaultNumberingProvider/script.xlb b/qadevOOo/tests/basic/ifc/text/XDefaultNumberingProvider/script.xlb new file mode 100644 index 000000000000..f216aeaf0c5f --- /dev/null +++ b/qadevOOo/tests/basic/ifc/text/XDefaultNumberingProvider/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="text_XDefaultNumberingProvider" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="text_XDefaultNumberingProvider"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/text/XDefaultNumberingProvider/text_XDefaultNumberingProvider.xba b/qadevOOo/tests/basic/ifc/text/XDefaultNumberingProvider/text_XDefaultNumberingProvider.xba new file mode 100644 index 000000000000..ac08f457f0df --- /dev/null +++ b/qadevOOo/tests/basic/ifc/text/XDefaultNumberingProvider/text_XDefaultNumberingProvider.xba @@ -0,0 +1,123 @@ +<?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="text_XDefaultNumberingProvider" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2008 by Sun Microsystems, Inc. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' $RCSfile: text_XDefaultNumberingProvider.xba,v $ +' +' $Revision: 1.3 $ +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + + + +Sub RunTest() + +'************************************************************************* +' INTERFACE: +' com.sun.star.text.XDefaultNumberingProvider +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim oLocale As New com.sun.star.lang.Locale + Dim aIndAcc As Object + Dim aPropVals As Object + Dim cr As Object + + oLocale.Country = "US" + oLocale.Language = "en" + + Test.StartMethod("getDefaultOutlineNumberings()") + bOK = true + aIndAcc = oObj.getDefaultOutlineNumberings(oLocale) + if (ubound(aIndAcc) >= 0) then + Out.Log("Returned sequence has " & ubound(aIndAcc) + 1 & " elements.") + bOK = bOK AND hasUNOInterfaces(aIndAcc(0), "com.sun.star.container.XIndexAccess") + else + Out.Log("Returned sequence is EMPTY.") + bOK = false + end if + Test.MethodTested("getDefaultOutlineNumberings()", bOK) + + Test.StartMethod("getDefaultContinuousNumberingLevels()") + bOK = true + aPropVals = oObj.getDefaultContinuousNumberingLevels(oLocale) + if (ubound(aPropVals) >= 0) then + Out.Log("Returned sequence has " & ubound(aPropVals) + 1 & " elements.") + cr = createUNOService("com.sun.star.reflection.CoreReflection") + bOK = bOK AND (cr.getType(aPropVals(0)).Name = "[]com.sun.star.beans.PropertyValue") +' OutDefaultContinuousNumberingLevels(aPropVals) + else + Out.Log("Returned sequence is EMPTY.") + bOK = false + end if + Test.MethodTested("getDefaultContinuousNumberingLevels()", bOK) + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +Sub OutDefaultOutlineNumberings(aIndAcc As Variant) + Dim i As Integer + Dim k As Integer + Dim l As Integer + Dim ia As Object + Dim props As Variant + + for k = 0 to ubound(aIndAcc) + Out.Log("" & k & ")") + ia = aIndAcc(k) + for l = 0 to ia.Count() - 1 + Out.Log(" " & l & ":") + props = ia.getByIndex(l) + for i = 0 to ubound(props) + Out.Log(" - " & props(i).Name & " = " & props(i).Value) + next i + next l + next k +End Sub + +Sub OutDefaultContinuousNumberingLevels(aPropVals As Variant) + Dim i As Integer + Dim k As Integer + Dim props As Variant + + for i = 0 to ubound(aPropVals) + Out.Log("" & i & ")") + props = aPropVals(i) + for k = 0 to ubound(props) + Out.Log(" - " & props(k).Name & " = " & props(k).Value) + next k + next i +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/text/XDocumentIndex/script.xlb b/qadevOOo/tests/basic/ifc/text/XDocumentIndex/script.xlb new file mode 100644 index 000000000000..fc20ebb211a8 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/text/XDocumentIndex/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="text_XDocumentIndex" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="text_XDocumentIndex"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/text/XDocumentIndex/text_XDocumentIndex.xba b/qadevOOo/tests/basic/ifc/text/XDocumentIndex/text_XDocumentIndex.xba new file mode 100644 index 000000000000..2ffecf1c8115 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/text/XDocumentIndex/text_XDocumentIndex.xba @@ -0,0 +1,69 @@ +<?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="text_XDocumentIndex" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2008 by Sun Microsystems, Inc. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' $RCSfile: text_XDocumentIndex.xba,v $ +' +' $Revision: 1.3 $ +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + + + +Sub RunTest() + +'************************************************************************* +' INTERFACE: +' com.sun.star.text.XDocumentIndex +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + + + Test.StartMethod("getServiceName()") + bOK = true + cName = oObj.getServiceName() + Out.Log("Service name is '" & cName & "'") + Test.MethodTested("getServiceName()", bOK) + + Test.StartMethod("update()") + bOK = true + oObj.update() + Test.MethodTested("update()", bOK) + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/text/XEndnotesSupplier/script.xlb b/qadevOOo/tests/basic/ifc/text/XEndnotesSupplier/script.xlb new file mode 100644 index 000000000000..bcd7bbe8ed05 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/text/XEndnotesSupplier/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="text_XEndnotesSupplier" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="text_XEndnotesSupplier"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/text/XEndnotesSupplier/text_XEndnotesSupplier.xba b/qadevOOo/tests/basic/ifc/text/XEndnotesSupplier/text_XEndnotesSupplier.xba new file mode 100644 index 000000000000..e430877f63d2 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/text/XEndnotesSupplier/text_XEndnotesSupplier.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="text_XEndnotesSupplier" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2008 by Sun Microsystems, Inc. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' $RCSfile: text_XEndnotesSupplier.xba,v $ +' +' $Revision: 1.3 $ +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + + + +Sub RunTest() + +'************************************************************************* +' INTERFACE: +' com.sun.star.text.XEndnotesSupplier +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + + + Test.StartMethod("getEndnotes()") + bOK = true + bOK = bOK AND hasUnoInterfaces(oObj.getEndnotes(), "com.sun.star.container.XIndexAccess") + Test.MethodTested("getEndnotes()", bOK) + + Test.StartMethod("getEndnoteSettings()") + bOK = true + bOK = bOK AND hasUnoInterfaces(oObj.getEndnoteSettings(), "com.sun.star.beans.XPropertySet") + Test.MethodTested("getEndnoteSettings()", bOK) + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/text/XFootnote/script.xlb b/qadevOOo/tests/basic/ifc/text/XFootnote/script.xlb new file mode 100644 index 000000000000..38bb5ec7b924 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/text/XFootnote/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="text_XFootnote" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="text_XFootnote"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/text/XFootnote/text_XFootnote.xba b/qadevOOo/tests/basic/ifc/text/XFootnote/text_XFootnote.xba new file mode 100644 index 000000000000..eafc45ab3f32 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/text/XFootnote/text_XFootnote.xba @@ -0,0 +1,72 @@ +<?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="text_XFootnote" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2008 by Sun Microsystems, Inc. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' $RCSfile: text_XFootnote.xba,v $ +' +' $Revision: 1.3 $ +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + + + +Sub RunTest() + +'************************************************************************* +' INTERFACE: +' com.sun.star.text.XFootnote +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + + Dim cLabel As String + + + Test.StartMethod("getLabel()") + bOK = true + cLabel = oObj.Label + bOK = bOK AND (cLabel = (cGlobalString & nGlobalLong)) + Test.MethodTested("getLabel()", bOK) + + Test.StartMethod("setLabel()") + bOK = true + oObj.Label = cIfcShortName + bOK = bOK AND (oObj.Label <> cLabel) + Test.MethodTested("setLabel()", bOK) + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/text/XFootnotesSupplier/script.xlb b/qadevOOo/tests/basic/ifc/text/XFootnotesSupplier/script.xlb new file mode 100644 index 000000000000..8b7a7ab94be3 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/text/XFootnotesSupplier/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="text_XFootnotesSupplier" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="text_XFootnotesSupplier"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/text/XFootnotesSupplier/text_XFootnotesSupplier.xba b/qadevOOo/tests/basic/ifc/text/XFootnotesSupplier/text_XFootnotesSupplier.xba new file mode 100644 index 000000000000..ced26c2ccddb --- /dev/null +++ b/qadevOOo/tests/basic/ifc/text/XFootnotesSupplier/text_XFootnotesSupplier.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="text_XFootnotesSupplier" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2008 by Sun Microsystems, Inc. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' $RCSfile: text_XFootnotesSupplier.xba,v $ +' +' $Revision: 1.3 $ +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + + + +Sub RunTest() + +'************************************************************************* +' INTERFACE: +' com.sun.star.text.XFootnotesSupplier +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + + + Test.StartMethod("getFootnotes()") + bOK = true + bOK = bOK AND hasUnoInterfaces(oObj.getFootnotes(), "com.sun.star.container.XIndexAccess") + Test.MethodTested("getFootnotes()", bOK) + + Test.StartMethod("getFootnoteSettings()") + bOK = true + bOK = bOK AND hasUnoInterfaces(oObj.getFootnoteSettings(), "com.sun.star.beans.XPropertySet") + Test.MethodTested("getFootnoteSettings()", bOK) + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/text/XLineNumberingSupplier/script.xlb b/qadevOOo/tests/basic/ifc/text/XLineNumberingSupplier/script.xlb new file mode 100644 index 000000000000..4bc46cc25d13 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/text/XLineNumberingSupplier/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="text_XLineNumberingSupplier" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="text_XLineNumberingSupplier"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/text/XLineNumberingSupplier/text_XLineNumberingSupplier.xba b/qadevOOo/tests/basic/ifc/text/XLineNumberingSupplier/text_XLineNumberingSupplier.xba new file mode 100644 index 000000000000..7eb381725026 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/text/XLineNumberingSupplier/text_XLineNumberingSupplier.xba @@ -0,0 +1,71 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="text_XLineNumberingSupplier" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2008 by Sun Microsystems, Inc. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' $RCSfile: text_XLineNumberingSupplier.xba,v $ +' +' $Revision: 1.3 $ +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + + + +Sub RunTest() + +'************************************************************************* +' INTERFACE: +' com.sun.star.text.XLineNumberingSupplier +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim Rules As Variant + + + Test.StartMethod("getLineNumberingRules()") + bOK = true + Rules = oObj.getLineNumberingRules() + Out.Log("ubound(Rules) = " & ubound(Rules)) + bOK = bOK AND NOT isNULL(Rules) + Test.MethodTested("getLineNumberingRules()", bOK) + + Test.StartMethod("setLineNumberingRules()") + bOK = true + oObj.setLineNumberingRules(Rules) + Test.MethodTested("setLineNumberingRules()", bOK) + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/text/XMailMergeBroadcaster/script.xlb b/qadevOOo/tests/basic/ifc/text/XMailMergeBroadcaster/script.xlb new file mode 100644 index 000000000000..92cdc97078fe --- /dev/null +++ b/qadevOOo/tests/basic/ifc/text/XMailMergeBroadcaster/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="text_XMailMergeBroadcaster" library:readonly="false" library:passwordprotected="false"> + <library:element library:name="text_XMailMergeBroadcaster"/> + </library:library> diff --git a/qadevOOo/tests/basic/ifc/text/XMailMergeBroadcaster/text_XMailMergeBroadcaster.xba b/qadevOOo/tests/basic/ifc/text/XMailMergeBroadcaster/text_XMailMergeBroadcaster.xba new file mode 100644 index 000000000000..0326eb610623 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/text/XMailMergeBroadcaster/text_XMailMergeBroadcaster.xba @@ -0,0 +1,110 @@ +<?xml version="1.0" encoding="UTF-8"?> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="text_XMailMergeBroadcaster" script:language="StarBasic"> + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2008 by Sun Microsystems, Inc. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' $RCSfile: text_XMailMergeBroadcaster.xba,v $ +' +' $Revision: 1.3 $ +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + +'************************************************************************* +' This Interface/Service test depends on the following GLOBAL variables, +' which must be specified in the object creation: + +' Global FUNCTION XMailMergeEvent() +' This function fires an event which causes a listner call + + +'************************************************************************* + +' Be sure that all variables are dimensioned: +option explicit + + Dim bCB1 as Boolean + Dim bCB2 as Boolean + + +Sub RunTest() + +'************************************************************************* +' INTERFACE: +' com.sun.star.text.XMailMergeBroadcaster +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim oListener1 as Object + Dim oListener2 as Object + + Out.Log("create two listeners") + oListener1 = createUNOListener("CB1_", "com.sun.star.text.XMailMergeListener") + oListener2 = createUNOListener("CB2_", "com.sun.star.text.XMailMergeListener") + + Test.StartMethod("addMailMergeEventListener()") + bCB1 = FALSE + bCB2 = FALSE + bOK = TRUE + oObj.addMailMergeEventListener(oListener1) + oObj.addMailMergeEventListener(oListener2) + XMailMergeEvent() + out.dbg("call oObj.execute()") + out.dbg("Listener1: " + bCB1 + " ; Listener2: " + bCB2) + bOK = bOK AND bCB1 AND bCB2 + Test.MethodTested("addMailMergeEventListener()", bOK) + + Test.StartMethod("removeMailMergeEventListener()") + bCB1 = FALSE + bCB2 = FALSE + bOK = TRUE + out.dbg("remove Listener1") + oObj.removeMailMergeEventListener(oListener1) + out.dbg("call oObj.execute()") + XMailMergeEvent() + out.dbg("Listener1: " + bCB1 + " ; Listener2: " + bCB2) + bOK = bOK AND NOT bCB1 AND bCB2 + Test.MethodTested("removeMailMergeEventListener()", bOK) + + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub + +Sub CB1_notifyMailMergeEvent() + out.dbg("CB1_notifyMailMergeEvent() was clled.") + bCB1 = TRUE +end Sub + +Sub CB2_notifyMailMergeEvent() + out.dbg("CB2_notifyMailMergeEvent() was clled.") + bCB2 = TRUE +end Sub + +</script:module> diff --git a/qadevOOo/tests/basic/ifc/text/XPageCursor/script.xlb b/qadevOOo/tests/basic/ifc/text/XPageCursor/script.xlb new file mode 100644 index 000000000000..45ceef1da261 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/text/XPageCursor/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="text_XPageCursor" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="text_XPageCursor"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/text/XPageCursor/text_XPageCursor.xba b/qadevOOo/tests/basic/ifc/text/XPageCursor/text_XPageCursor.xba new file mode 100644 index 000000000000..0533ec807d67 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/text/XPageCursor/text_XPageCursor.xba @@ -0,0 +1,127 @@ +<?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="text_XPageCursor" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2008 by Sun Microsystems, Inc. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' $RCSfile: text_XPageCursor.xba,v $ +' +' $Revision: 1.3 $ +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + +' Be sure that all variables are dimensioned: +option explicit + +'************************************************************************* +' This Interface/Service test depends on the following GLOBAL variables, +' which must be specified in the object creation: + +' - PageCursor must be created from document XPageCursor.sdw + +'************************************************************************* + + + + + + +Sub RunTest() + +'************************************************************************* +' INTERFACE: +' com.sun.star.text.XPageCursor +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + + RecreateObj() + + Test.StartMethod("jumpToFirstPage()") + bOK = true + bOK = bOK AND oObj.jumpToFirstPage() + oObj.goRight(12, true) + bOK = bOK AND oObj.String = "StartOfPage1" + Test.MethodTested("jumpToFirstPage()", bOK) + + Test.StartMethod("jumpToLastPage()") + bOK = true + bOK = bOK AND oObj.jumpToLastPage() + oObj.goRight(12, true) + bOK = bOK AND oObj.String = "StartOfPage2" + Test.MethodTested("jumpToLastPage()", bOK) + + Test.StartMethod("jumpToPage()") + bOK = true + bOK = bOK AND oObj.jumpToPage(1) + oObj.goRight(12, true) + bOK = bOK AND oObj.String = "StartOfPage1" + Test.MethodTested("jumpToPage()", bOK) + + Test.StartMethod("getPage()") + bOK = true + bOK = bOK AND oObj.getPage() = 1 + Test.MethodTested("getPage()", bOK) + + Test.StartMethod("jumpToNextPage()") + bOK = true + bOK = bOK AND oObj.jumpToNextPage() + oObj.goRight(12, true) + bOK = bOK AND oObj.String = "StartOfPage2" + Test.MethodTested("jumpToNextPage()", bOK) + + Test.StartMethod("jumpToPreviousPage()") + bOK = true + bOK = bOK AND oObj.jumpToPreviousPage() + oObj.goLeft(12, true) + bOK = bOK AND oObj.String = "EndOfPage 1" + Test.MethodTested("jumpToPreviousPage()", bOK) + + Test.StartMethod("jumpToEndOfPage()") + bOK = true + bOK = bOK AND oObj.jumpToEndOfPage() + oObj.goLeft(12, true) + bOK = bOK AND oObj.String = "EndOfPage 1" + Test.MethodTested("jumpToEndOfPage()", bOK) + + Test.StartMethod("jumpToStartOfPage()") + bOK = true + bOK = bOK AND oObj.jumpToStartOfPage() + oObj.goRight(12, true) + bOK = bOK AND oObj.String = "StartOfPage1" + Test.MethodTested("jumpToStartOfPage()", bOK) + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/text/XPagePrintable/script.xlb b/qadevOOo/tests/basic/ifc/text/XPagePrintable/script.xlb new file mode 100644 index 000000000000..9e126a20a50b --- /dev/null +++ b/qadevOOo/tests/basic/ifc/text/XPagePrintable/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="text_XPagePrintable" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="text_XPagePrintable"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/text/XPagePrintable/text_XPagePrintable.xba b/qadevOOo/tests/basic/ifc/text/XPagePrintable/text_XPagePrintable.xba new file mode 100644 index 000000000000..6cb6ce53b02a --- /dev/null +++ b/qadevOOo/tests/basic/ifc/text/XPagePrintable/text_XPagePrintable.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="text_XPagePrintable" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2008 by Sun Microsystems, Inc. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' $RCSfile: text_XPagePrintable.xba,v $ +' +' $Revision: 1.3 $ +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + +' Be sure that all variables are dimensioned: +option explicit + + + +Sub RunTest() + +'************************************************************************* +' INTERFACE: +' com.sun.star.text.XPagePrintable +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim aPrintSettings As Variant + Dim aNewSettings As Variant + + Test.StartMethod("getPagePrintSettings()") + bOK = true + aPrintSettings = oObj.getPagePrintSettings() + Out.Log("PrintSettings have " & (ubound(aPrintSettings) + 1) & " elements") + bOK = bOK AND (ubound(aPrintSettings) > 0) + Test.MethodTested("getPagePrintSettings()", bOK) + + Test.StartMethod("setPagePrintSettings()") + bOK = true + Dim bOldLandscape As Boolean + ' Changing Landscape property... + bOldLandscape = aPrintSettings(8).Value + aPrintSettings(8).Value = NOT bOldLandscape + + oObj.setPagePrintSettings(aPrintSettings()) + aNewSettings = oObj.getPagePrintSettings() + bOK = bOK AND (aNewSettings(8).Value = NOT bOldLandscape) + + Test.MethodTested("setPagePrintSettings()", bOK) + + Test.StartMethod("printPages()") + bOK = true + Dim aPrintingOptions(0) As New com.sun.star.beans.PropertyValue + Dim sFileName As String + sFileName = utils.Path2URL(cTestDocsDir & "/temp/XPagePrintable.prt") + + if (FileExists(sFileName)) then + kill(sFileName) + end if + + aPrintingOptions(0).Name = "FileName" + aPrintingOptions(0).Value = sFileName + aPrintingOptions(0).State = com.sun.star.beans.PropertyState.DEFAULT_VALUE + + Out.Log("Printing to " & sFileName) + oObj.printPages(aPrintingOptions()) + + bOK = bOK AND FileExists(sFileName) + Test.MethodTested("printPages()", bOK) + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/text/XParagraphCursor/script.xlb b/qadevOOo/tests/basic/ifc/text/XParagraphCursor/script.xlb new file mode 100644 index 000000000000..0b33ec3d310c --- /dev/null +++ b/qadevOOo/tests/basic/ifc/text/XParagraphCursor/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="text_XParagraphCursor" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="text_XParagraphCursor"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/text/XParagraphCursor/text_XParagraphCursor.xba b/qadevOOo/tests/basic/ifc/text/XParagraphCursor/text_XParagraphCursor.xba new file mode 100644 index 000000000000..4fdfd745d422 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/text/XParagraphCursor/text_XParagraphCursor.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="text_XParagraphCursor" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2008 by Sun Microsystems, Inc. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' $RCSfile: text_XParagraphCursor.xba,v $ +' +' $Revision: 1.3 $ +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + +' Be sure that all variables are dimensioned: +option explicit + +'************************************************************************* +' This Interface/Service test depends on the following GLOBAL variables, +' which must be specified in the object creation: + +' - Global oText As Object + +'************************************************************************* + + + + + +Sub RunTest() + +'************************************************************************* +' INTERFACE: +' com.sun.star.text.XParagraphCursor +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim i As Integer + + for i = 0 to 2 + oText.insertString(oObj, "" + i +"Start of paragraph.", false) + oText.insertString(oObj, Chr(10) + cObjectName + " " + cIfcShortName + Chr(10), false) + oText.insertString(oObj, "Paragraph's end." + i, false) + oText.insertControlCharacter(oObj, com.sun.star.text.ControlCharacter.PARAGRAPH_BREAK, false) + next i + + oObj.gotoStart(false) + + Test.StartMethod("gotoStartOfParagraph()") + bOK = true + oObj.gotoStartOfParagraph(false) + oText.insertString(oObj, "1", false) + bOK = bOK AND inStr(1, oText.String, "10Start") <> 0 + Test.MethodTested("gotoStartOfParagraph()", bOK) + + Test.StartMethod("gotoEndOfParagraph()") + bOK = true + oObj.gotoEndOfParagraph(false) + oText.insertString(oObj, "2", false) + bOK = bOK AND inStr(1, oText.String, "end.02") <> 0 + Test.MethodTested("gotoEndOfParagraph()", bOK) + + Test.StartMethod("gotoNextParagraph()") + bOK = true + oObj.gotoNextParagraph(false) + oObj.gotoNextParagraph(false) + oObj.gotoEndOfParagraph(false) + oText.insertString(oObj, "3", false) + bOK = bOK AND inStr(1, oText.String, "end.23") <> 0 + Test.MethodTested("gotoNextParagraph()", bOK) + + Test.StartMethod("gotoPreviousParagraph()") + bOK = true + oObj.gotoPreviousParagraph(false) + oObj.gotoEndOfParagraph(false) + oText.insertString(oObj, "4", false) + bOK = bOK AND inStr(1, oText.String, "end.14") <> 0 + Test.MethodTested("gotoPreviousParagraph()", bOK) + + Test.StartMethod("isStartOfParagraph()") + bOK = true + oObj.gotoStartOfParagraph(false) + bOK = bOK AND oObj.isStartOfParagraph() + bOK = bOK AND NOT oObj.isEndOfParagraph() + Test.MethodTested("isStartOfParagraph()", bOK) + + Test.StartMethod("isEndOfParagraph()") + bOK = true + oObj.gotoEndOfParagraph(false) + bOK = bOK AND oObj.isEndOfParagraph() + bOK = bOK AND NOT oObj.isStartOfParagraph() + Test.MethodTested("isEndOfParagraph()", bOK) + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/text/XReferenceMarksSupplier/script.xlb b/qadevOOo/tests/basic/ifc/text/XReferenceMarksSupplier/script.xlb new file mode 100644 index 000000000000..e66d625ea72a --- /dev/null +++ b/qadevOOo/tests/basic/ifc/text/XReferenceMarksSupplier/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="text_XReferenceMarksSupplier" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="text_XReferenceMarksSupplier"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/text/XReferenceMarksSupplier/text_XReferenceMarksSupplier.xba b/qadevOOo/tests/basic/ifc/text/XReferenceMarksSupplier/text_XReferenceMarksSupplier.xba new file mode 100644 index 000000000000..4fa598c6c06f --- /dev/null +++ b/qadevOOo/tests/basic/ifc/text/XReferenceMarksSupplier/text_XReferenceMarksSupplier.xba @@ -0,0 +1,63 @@ +<?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="text_XReferenceMarksSupplier" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2008 by Sun Microsystems, Inc. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' $RCSfile: text_XReferenceMarksSupplier.xba,v $ +' +' $Revision: 1.3 $ +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + + + +Sub RunTest() + +'************************************************************************* +' INTERFACE: +' com.sun.star.text.XReferenceMarksSupplier +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + + + Test.StartMethod("getReferenceMarks()") + bOK = true + bOK = bOK AND hasUnoInterfaces(oObj.getReferenceMarks(), "com.sun.star.container.XNameAccess") + Test.MethodTested("getReferenceMarks()", bOK) + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/text/XRelativeTextContentInsert/script.xlb b/qadevOOo/tests/basic/ifc/text/XRelativeTextContentInsert/script.xlb new file mode 100644 index 000000000000..45220fcf0ae9 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/text/XRelativeTextContentInsert/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="text_XRelativeTextContentInsert" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="text_XRelativeTextContentInsert"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/text/XRelativeTextContentInsert/text_XRelativeTextContentInsert.xba b/qadevOOo/tests/basic/ifc/text/XRelativeTextContentInsert/text_XRelativeTextContentInsert.xba new file mode 100644 index 000000000000..ef3bb7badbd6 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/text/XRelativeTextContentInsert/text_XRelativeTextContentInsert.xba @@ -0,0 +1,168 @@ +<?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="text_XRelativeTextContentInsert" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2008 by Sun Microsystems, Inc. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' $RCSfile: text_XRelativeTextContentInsert.xba,v $ +' +' $Revision: 1.3 $ +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + + + +Sub RunTest() + +'************************************************************************* +' INTERFACE: +' com.sun.star.text.XRelativeTextContentInsert +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim oEnum As Object + Dim oCursor As Object + Dim oContent1 As Object + Dim oContent2 As Object + Dim bFound As Boolean + Dim oEl As Object + + Test.StartMethod("insertTextContentBefore()") + bOK = true + oCursor = oObj.createTextCursor() + if (isNULL(oCursor)) then Out.Log("Can't create text cursor!") + + Out.Log("First, mark all existant entries with 0") + + oEnum = oObj.createEnumeration() + while (oEnum.hasMoreElements()) + oEl = oEnum.NextElement() + if (oEl.supportsService("com.sun.star.text.Paragraph")) then + oEl.String = "0" + end if + wend + + Out.Log("Inserting TextSection...") + oContent1 = oDoc.createInstance("com.sun.star.text.TextSection") + oObj.insertTextContent(oCursor, oContent1, false) + + oEnum = oObj.createEnumeration() + while (oEnum.hasMoreElements()) + oEl = oEnum.NextElement() + if (oEl.supportsService("com.sun.star.text.Paragraph")) then + if (oEl.String = "") then oEl.String = "1" + end if + wend + + Out.Log("Mark new entry with 1") + + oContent2 = oDoc.createInstance("com.sun.star.text.Paragraph") + oObj.insertTextContentBefore(oContent2, oContent1) + + oEnum = oObj.createEnumeration() + while (oEnum.hasMoreElements()) + oEl = oEnum.NextElement() + if (oEl.supportsService("com.sun.star.text.Paragraph")) then + if (oEl.String = "") then oEl.String = "2" + end if + wend + + Out.Log("Mark new entry with 2") + + Out.Log("Testing that content was inserted BEFORE. I.e. Label 2 before label 1") + + oEnum = oObj.createEnumeration() + bFound = false + while (oEnum.hasMoreElements() AND NOT bFound) + oEl = oEnum.NextElement() + if (oEl.supportsService("com.sun.star.text.Paragraph")) then + bFound = oEl.String = "2" + end if + wend + + oEl = oEnum.NextElement() + bOK = bOK AND oEl.String = "1" + + Test.MethodTested("insertTextContentBefore()", bOK) + + + Test.StartMethod("insertTextContentAfter()") + bOK = true + + Out.Log("Inserting TextSection...") + oContent1 = oDoc.createInstance("com.sun.star.text.TextSection") + oObj.insertTextContent(oCursor, oContent1, false) + + oEnum = oObj.createEnumeration() + while (oEnum.hasMoreElements()) + oEl = oEnum.NextElement() + if (oEl.supportsService("com.sun.star.text.Paragraph")) then + if (oEl.String = "") then oEl.String = "3" + end if + wend + + Out.Log("Mark new entry with 3") + + oContent2 = oDoc.createInstance("com.sun.star.text.Paragraph") + oObj.insertTextContentAfter(oContent2, oContent1) + + oEnum = oObj.createEnumeration() + while (oEnum.hasMoreElements()) + oEl = oEnum.NextElement() + if (oEl.supportsService("com.sun.star.text.Paragraph")) then + if (oEl.String = "") then oEl.String = "4" + end if + wend + + Out.Log("Mark new entry with 4") + + Out.Log("Testing that content was inserted AFTRER. I.e. Label 4 after label 3") + + oEnum = oObj.createEnumeration() + bFound = false + while (oEnum.hasMoreElements() AND NOT bFound) + oEl = oEnum.NextElement() + if (oEl.supportsService("com.sun.star.text.Paragraph")) then + bFound = oEl.String = "3" + end if + wend + + oEl = oEnum.NextElement() + bOK = bOK AND oEl.String = "4" + + Test.MethodTested("insertTextContentAfter()", bOK) + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/text/XSentenceCursor/script.xlb b/qadevOOo/tests/basic/ifc/text/XSentenceCursor/script.xlb new file mode 100644 index 000000000000..a27aa634f031 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/text/XSentenceCursor/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="text_XSentenceCursor" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="text_XSentenceCursor"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/text/XSentenceCursor/text_XSentenceCursor.xba b/qadevOOo/tests/basic/ifc/text/XSentenceCursor/text_XSentenceCursor.xba new file mode 100644 index 000000000000..11282a5e30ec --- /dev/null +++ b/qadevOOo/tests/basic/ifc/text/XSentenceCursor/text_XSentenceCursor.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="text_XSentenceCursor" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2008 by Sun Microsystems, Inc. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' $RCSfile: text_XSentenceCursor.xba,v $ +' +' $Revision: 1.3 $ +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + +' Be sure that all variables are dimensioned: +option explicit + + + +Sub RunTest() + +'************************************************************************* +' INTERFACE: +' com.sun.star.text.XSentenceCursor +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + + oObj.Text.String = "Sentence two. Sentence three." + + oObj.gotoEnd(false) + + Test.StartMethod("gotoStartOfSentence()") + bOK = true + oObj.gotoStartOfSentence(false) + oObj.String = "1" + Out.Log("Current text: '" + oObj.Text.String + "'") + bOK = bOK AND inStr(1, oObj.Text.String, "1Sentence three.") <> 0 + Test.MethodTested("gotoStartOfSentence()", bOK) + + Test.StartMethod("isStartOfSentence()") + Test.StartMethod("isEndOfSentence()") + bOK = true + oObj.gotoStartOfSentence(false) + bOK = bOK AND oObj.isStartOfSentence() + bOK = bOK AND NOT oObj.isEndOfSentence() + oObj.gotoEndOfSentence(false) + bOK = bOK AND NOT oObj.isStartOfSentence() + bOK = bOK AND oObj.isEndOfSentence() + Test.MethodTested("isStartOfSentence()", bOK) + Test.MethodTested("isEndOfSentence()", bOK) + + + Test.StartMethod("gotoEndOfSentence()") + bOK = true + oObj.gotoEndOfSentence(false) + oObj.String = "2" + Out.Log("Current text: '" + oObj.Text.String + "'") + bOK = bOK AND inStr(1, oObj.Text.String, "three.2") <> 0 + Test.MethodTested("gotoEndOfSentence()", bOK) + + Test.StartMethod("gotoPreviousSentence()") + bOK = true + oObj.gotoPreviousSentence(false) + oObj.String = "3" + Out.Log("Current text: '" + oObj.Text.String + "'") + bOK = bOK AND inStr(1, oObj.Text.String, "3Sentence two.") <> 0 + Test.MethodTested("gotoPreviousSentence()", bOK) + + Test.StartMethod("gotoNextSentence()") + bOK = true + oObj.gotoNextSentence(false) + oObj.String = "4" + Out.Log("Current text: '" + oObj.Text.String + "'") + bOK = bOK AND inStr(1, oObj.Text.String, "41") <> 0 + Test.MethodTested("gotoNextSentence()", bOK) + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/text/XSimpleText/script.xlb b/qadevOOo/tests/basic/ifc/text/XSimpleText/script.xlb new file mode 100644 index 000000000000..d15cb9a51d44 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/text/XSimpleText/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="text_XSimpleText" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="text_XSimpleText"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/text/XSimpleText/text_XSimpleText.xba b/qadevOOo/tests/basic/ifc/text/XSimpleText/text_XSimpleText.xba new file mode 100644 index 000000000000..1c57aeae36ef --- /dev/null +++ b/qadevOOo/tests/basic/ifc/text/XSimpleText/text_XSimpleText.xba @@ -0,0 +1,117 @@ +<?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="text_XSimpleText" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2008 by Sun Microsystems, Inc. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' $RCSfile: text_XSimpleText.xba,v $ +' +' $Revision: 1.3 $ +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + +' Be sure that all variables are dimensioned: +option explicit + + + +Sub RunTest() + +'************************************************************************* +' INTERFACE: +' com.sun.star.text.XSimpleText +'************************************************************************* +On Error Goto ErrHndl + Dim oCursor As Object + Dim oPosCursor As Variant + Dim cIfcShortName As String + Dim bOK As Boolean + Dim oldString, newString As String + + cIfcShortName = "XSimpleText" + + Test.StartMethod("createTextCursor()") + bOK = true + oCursor = oObj.createTextCursor() + bOK = bOK AND NOT (isNull(oCursor)) + bOK = bOK AND hasUnoInterfaces(oCursor, "com.sun.star.text.XTextCursor") + Test.MethodTested("createTextCursor()", bOK) + + Test.StartMethod("createTextCursorByRange()") + bOK = true + oPosCursor = oObj.createTextCursorbyRange(oCursor) + bOK = bOK AND NOT isNull(oPosCursor) + bOK = bOK AND hasUnoInterfaces(oPosCursor, "com.sun.star.text.XTextCursor") + Test.MethodTested("createTextCursorByRange()", bOK) + + Test.StartMethod("insertString()") + bOK = true + oldString = oObj.String + Out.Log("String before inserting:'" + oldString + "'") + oCursor.gotoStart(false) + oObj.insertString(oCursor, cIfcShortName, false) + Dim newStr As String + newStr = oObj.String + Out.Log("String content after inserting:'" + newStr + "'") + Dim expectedStr As String + expectedStr = cIfcShortName + oldString + Out.Log("Expected string:'" + expectedStr + "'") + bOK = bOK AND (expectedStr = newStr) + oObj.setString(oldString) + Test.MethodTested("insertString()", bOK) + + ' some cursor navigation to verify if controlcharacters have benn inserted:) + Test.StartMethod("insertControlCharacter()") + bOK = true + oldString = oObj.getString() + newString = "XSimpleText" + Out.Log("Set string to '" + newString + "'") + oObj.setString(newString) + Out.Log("Current string content of object: '" + oObj.getString() + "'") + oCursor.gotoStart(false) + Out.Log("Insert control characters...") +' oObj.insertControlCharacter(oCursor, com.sun.star.text.ControlCharacter.PARAGRAPH_BREAK, false) + oObj.insertControlCharacter(oCursor, com.sun.star.text.ControlCharacter.LINE_BREAK, false) + Out.Log("Now string content of object: '" + oObj.getString() + "'") + Dim breakPos As Integer + breakPos = inStr(oObj.getString(), chr(10)) + Out.Log("Line break found at " + breakPos) + bOK = bOK AND breakPos > 0 + oObj.String = oldString + Out.Log("Return string to old state:'" + oObj.getString() + "'" ) + Test.MethodTested("insertControlCharacter()", bOK) + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/text/XText/script.xlb b/qadevOOo/tests/basic/ifc/text/XText/script.xlb new file mode 100644 index 000000000000..af753e01a742 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/text/XText/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="text_XText" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="text_XText"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/text/XText/text_XText.xba b/qadevOOo/tests/basic/ifc/text/XText/text_XText.xba new file mode 100644 index 000000000000..29d3ddc87e99 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/text/XText/text_XText.xba @@ -0,0 +1,157 @@ +<?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="text_XText" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2008 by Sun Microsystems, Inc. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' $RCSfile: text_XText.xba,v $ +' +' $Revision: 1.4 $ +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + +' Be sure that all variables are dimensioned: +option explicit + +'************************************************************************* +' This Interface/Service test depends on the following GLOBAL variables, +' which must be specified in the object creation: + +' - Global oCollection As Object [optional] +' if this relation exists then the method "count" is called for check insert/remove +' - Global oInstance As Object +' Global aAddons() As Variant [optional] +' if this relation exists, then additional methods are called before and after insert/removeTextContent() methods + +'************************************************************************* + + + + + + +Sub RunTest() + +'************************************************************************* +' INTERFACE: +' com.sun.star.text.XText +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim cText As String + Dim oCursor As Object + Dim i1 As Integer + Dim i2 As Integer + + Test.StartMethod("insertTextContent()") + bOK = true + cText = ". Zeile : test_XText" + + If IsObject(oCollection) and IsObject(oInstance) Then + oCursor = oObj.createTextCursor() + oCursor.gotoEnd(false) + i1 = count(oCollection) + Out.Log("Before inserting we have " + i1 + " elements.") + +' if isArray(aAddons) then +' Out.Log("Calling beforeInsertTextContent() ...") +' beforeInsertTextContent() +' endif + + oObj.insertTextContent(oCursor, oInstance, false) + +' if isArray(aAddons) then +' Out.Log("Calling afterInsertTextContent() ...") +' afterInsertTextContent() +' endif + + i2 = count(oCollection) + Out.Log("After inserting we have " + i2 + " elements.") + bOK = bOK AND i1 = i2 - 1 + Test.MethodTested("insertTextContent()", bOK) + + Test.StartMethod("removeTextContent()") + bOK = true + i1 = count(oCollection) + Out.Log("Before removing we have " + i1 + " elements.") + +' if (isArray(aAddons)) then +' Out.Log("Calling beforeRemoveTextContent() ...") +' beforeRemoveTextContent() +' endif + + oObj.removeTextContent(oInstance) + +' if (isArray(aAddons)) then +' Out.Log("Calling afterRemoveTextContent() ...") +' afterRemoveTextContent() +' endif + + i2 = count(oCollection) + Out.Log("After removing we have " + i2 + " elements.") + bOK = bOK AND i1 = i2 + 1 + Test.MethodTested("removeTextContent()", bOK) + Else + oCursor = oObj.createTextCursor() + oCursor.gotoEnd(false) + oObj.insertTextContent(oCursor, oInstance, false) + Test.MethodTested("insertTextContent()", True) + Test.StartMethod("removeTextContent()") + oObj.removeTextContent(oInstance) + Test.MethodTested("removeTextContent()", True) + End If + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub + +Function count(container As Variant) As Integer + Dim iAmount As Integer + Dim oEnumeration As Object + + if hasUnoInterfaces(container, "com.sun.star.container.XIndexAccess") then + iAmount = container.getCount() + elseif hasUnoInterfaces(container, "com.sun.star.container.XNameAccess") then + iAmount = ubound(container.getElementNames()) + 1 + elseif hasUnoInterfaces(container, "com.sun.star.container.XEnumerationAccess") then + oEnumeration = container.createEnumeration() + iAmount = 0 + while oEnumeration.hasMoreElements() + iAmount = iAmount + 1 + oEnumeration.nextElement() + wend + end if + + count() = iAmount +End Function +</script:module> diff --git a/qadevOOo/tests/basic/ifc/text/XTextColumns/script.xlb b/qadevOOo/tests/basic/ifc/text/XTextColumns/script.xlb new file mode 100644 index 000000000000..de7dd8e808c0 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/text/XTextColumns/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="text_XTextColumns" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="text_XTextColumns"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/text/XTextColumns/text_XTextColumns.xba b/qadevOOo/tests/basic/ifc/text/XTextColumns/text_XTextColumns.xba new file mode 100644 index 000000000000..89bd0567e2f5 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/text/XTextColumns/text_XTextColumns.xba @@ -0,0 +1,123 @@ +<?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="text_XTextColumns" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2008 by Sun Microsystems, Inc. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' $RCSfile: text_XTextColumns.xba,v $ +' +' $Revision: 1.3 $ +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + +' Be sure that all variables are dimensioned: +option explicit + +'************************************************************************* +' This Interface/Service test depends on the following GLOBAL variables, +' which must be specified in the object creation: + +' - Global oPageStyle As Object + +'************************************************************************* + + + + + +Sub RunTest() + +'************************************************************************* +' INTERFACE: +' com.sun.star.text.XTextColumns +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + + Dim nCount As Integer + Dim aColumns As Variant + Dim RightCol As Variant + Dim LeftCol As Variant + Dim nRefValue As Long + + nCount = 2 + + Test.StartMethod("setColumnCount()") + bOK = true + oObj.setColumnCount(nCount) + Test.MethodTested("setColumnCount()", bOK) + + Test.StartMethod("getColumns()") + bOK = true + aColumns = oObj.Columns + bOK = bOK AND NOT isNull(aColumns) + Test.MethodTested("getColumns()", bOK) + + LeftCol = aColumns(0) + RightCol = aColumns(1) + RightCol.Width = 10000 : RightCol.RightMargin = 2000 + LeftCol.Width = 15000 : LeftCol.LeftMargin = 5000 + + aColumns(0) = LeftCol + aColumns(1) = RightCol + + oObj.setColumns(aColumns()) + + ' initialize the pagestyle with the new values + oPageStyle.TextColumns = oObj + + ' check if ColumnsCount was set successfull + Test.StartMethod("getColumnCount()") + bOK = true + bOK = bOK AND (nCount = oPageStyle.TextColumns.ColumnCount) + Test.MethodTested("getColumnCount()", bOK) + + Test.StartMethod("getReferenceValue()") + bOK = true + nRefValue = oObj.getReferenceValue() + bOK = bOK AND (nRefValue = 25000) + Test.MethodTested("getReferenceValue()", bOK) + + Test.StartMethod("setColumns()") + bOK = true + RightCol.Width = 15000 + aColumns(1) = RightCol + oObj.setColumns(aColumns()) + oPageStyle.TextColumns = oObj + bOK = bOK AND (oPageStyle.TextColumns.ReferenceValue = 30000) + Test.MethodTested("setColumns()", bOK) + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/text/XTextContent/script.xlb b/qadevOOo/tests/basic/ifc/text/XTextContent/script.xlb new file mode 100644 index 000000000000..b15fd5993ee6 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/text/XTextContent/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="text_XTextContent" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="text_XTextContent"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/text/XTextContent/text_XTextContent.xba b/qadevOOo/tests/basic/ifc/text/XTextContent/text_XTextContent.xba new file mode 100644 index 000000000000..cea39c6fcb4a --- /dev/null +++ b/qadevOOo/tests/basic/ifc/text/XTextContent/text_XTextContent.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="text_XTextContent" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2008 by Sun Microsystems, Inc. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' $RCSfile: text_XTextContent.xba,v $ +' +' $Revision: 1.3 $ +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + +' Be sure that all variables are dimensioned: +option explicit + + + +Sub RunTest() + +'************************************************************************* +' INTERFACE: +' com.sun.star.text.XTextContent +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim bImpossible as Boolean + + bImpossible = FALSE + Test.StartMethod("getAnchor()") + bOK = true + bOK = bOK AND hasUnoInterfaces(oObj.getAnchor(), "com.sun.star.text.XTextRange") + Test.MethodTested("getAnchor()", bOK) + +On Error Goto ImpossibleErr + If bXTextContentImpossible then + bImpossible = TRUE + End If + +On Error Goto ErrHndl + + Test.StartMethod("attach()") + bOK = true + oXTextContent.attach(oXTextContentRange) + If bImpossible then + bOK = True + Out.Log("bXTextContnetImpossible = TRUE: Object is not " + _ + "able to attach() to something => TRUE") + end If + Test.MethodTested("attach()", bOK) + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next + +ImpossibleErr: + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/text/XTextCursor/script.xlb b/qadevOOo/tests/basic/ifc/text/XTextCursor/script.xlb new file mode 100644 index 000000000000..ff8b4c2ee551 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/text/XTextCursor/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="text_XTextCursor" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="text_XTextCursor"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/text/XTextCursor/text_XTextCursor.xba b/qadevOOo/tests/basic/ifc/text/XTextCursor/text_XTextCursor.xba new file mode 100644 index 000000000000..ae77dfbc0ec9 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/text/XTextCursor/text_XTextCursor.xba @@ -0,0 +1,138 @@ +<?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="text_XTextCursor" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2008 by Sun Microsystems, Inc. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' $RCSfile: text_XTextCursor.xba,v $ +' +' $Revision: 1.3 $ +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + +'************************************************************************* +' This Interface/Service test depends on the following GLOBAL variables, +' which must be specified in the object creation: + +' - Global oCursor As Object +' One more cursor + +'************************************************************************* + + + + + +Sub RunTest() + +'************************************************************************* +' INTERFACE: +' com.sun.star.text.XTextCursor +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim oRange As Object + + oObj.Text.String = "abcdefg" + + Test.StartMethod("gotoEnd()") + bOK = true + oObj.gotoEnd(false) + oObj.String = "1" + bOK = bOK AND inStr(1, oObj.Text.String, "g1") + Test.MethodTested("gotoEnd()", bOK) + + Test.StartMethod("gotoStart()") + bOK = true + oObj.gotoStart(false) + oObj.String = "2" + bOK = bOK AND inStr(1, oObj.Text.String, "2a") + Test.MethodTested("gotoStart()", bOK) + + Test.StartMethod("goRight()") + bOK = true + oObj.gotoStart(false) + oObj.goRight(2, false) + oObj.String = "3" + bOK = bOK AND inStr(1, oObj.Text.String, "2a3") + Test.MethodTested("goRight()", bOK) + + Test.StartMethod("goLeft()") + bOK = true + oObj.gotoEnd(false) + oObj.goLeft(2, false) + oObj.String = "4" + bOK = bOK AND inStr(1, oObj.Text.String, "4g1") + Test.MethodTested("goLeft()", bOK) + + Test.StartMethod("gotoRange()") + bOK = true + oCursor.gotoEnd(false) + oCursor.goLeft(1, false) + oCursor.goLeft(2, true) + oObj.gotoStart(false) + oObj.gotoRange(oCursor, false) + bOK = bOK AND oObj.String = "4g" + Test.MethodTested("gotoRange()", bOK) + + Test.StartMethod("collapseToStart()") + bOK = true + cTp = oObj.String + oObj.collapseToStart() + oObj.String = "5" + bOK = bOK AND inStr(1, oObj.Text.String, "5" & cTp) + Test.MethodTested("collapseToStart()", bOK) + + Test.StartMethod("collapseToEnd()") + bOK = true + oObj.gotoEnd(false) + oObj.goLeft(3, true) + cTp = oObj.String + oObj.collapseToEnd() + oObj.String = "6" + bOK = bOK AND inStr(1, oObj.Text.String, cTp & "6") + Test.MethodTested("collapseToEnd()", bOK) + + Test.StartMethod("isCollapsed()") + bOK = true + oObj.collapseToStart() + bOK = bOK AND oObj.isCollapsed() + oObj.gotoEnd(false) + oObj.goLeft(3, true) + bOK = bOK AND NOT oObj.isCollapsed() + Test.MethodTested("isCollapsed()", bOK) + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/text/XTextDocument/script.xlb b/qadevOOo/tests/basic/ifc/text/XTextDocument/script.xlb new file mode 100644 index 000000000000..3d21d9548231 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/text/XTextDocument/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="text_XTextDocument" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="text_XTextDocument"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/text/XTextDocument/text_XTextDocument.xba b/qadevOOo/tests/basic/ifc/text/XTextDocument/text_XTextDocument.xba new file mode 100644 index 000000000000..f75c0d48fbce --- /dev/null +++ b/qadevOOo/tests/basic/ifc/text/XTextDocument/text_XTextDocument.xba @@ -0,0 +1,69 @@ +<?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="text_XTextDocument" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2008 by Sun Microsystems, Inc. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' $RCSfile: text_XTextDocument.xba,v $ +' +' $Revision: 1.3 $ +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + + + +Sub RunTest() + +'************************************************************************* +' INTERFACE: +' com.sun.star.text.XTextDocument +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + + + Test.StartMethod("getText()") + bOK = true + oText = oObj.getText() + bOK = bOK AND hasUnoInterfaces(oText, "com.sun.star.text.XText") + Test.MethodTested("getText()", bOK) + + Test.StartMethod("reformat()") + bOK = true + oObj.reformat() + Test.MethodTested("reformat()", bOK) + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/text/XTextEmbeddedObjectsSupplier/script.xlb b/qadevOOo/tests/basic/ifc/text/XTextEmbeddedObjectsSupplier/script.xlb new file mode 100644 index 000000000000..6c31a1aadd14 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/text/XTextEmbeddedObjectsSupplier/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="text_XTextEmbeddedObjectsSupplier" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="text_XTextEmbeddedObjectsSupplier"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/text/XTextEmbeddedObjectsSupplier/text_XTextEmbeddedObjectsSupplier.xba b/qadevOOo/tests/basic/ifc/text/XTextEmbeddedObjectsSupplier/text_XTextEmbeddedObjectsSupplier.xba new file mode 100644 index 000000000000..39ab046643d7 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/text/XTextEmbeddedObjectsSupplier/text_XTextEmbeddedObjectsSupplier.xba @@ -0,0 +1,63 @@ +<?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="text_XTextEmbeddedObjectsSupplier" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2008 by Sun Microsystems, Inc. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' $RCSfile: text_XTextEmbeddedObjectsSupplier.xba,v $ +' +' $Revision: 1.3 $ +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + + + +Sub RunTest() + +'************************************************************************* +' INTERFACE: +' com.sun.star.text.XTextEmbeddedObjectsSupplier +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + + + Test.StartMethod("getEmbeddedObjects()") + bOK = true + bOK = bOK AND hasUnoInterfaces(oObj.getEmbeddedObjects(), "com.sun.star.container.XNameAccess") + Test.MethodTested("getEmbeddedObjects()", bOK) + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/text/XTextField/script.xlb b/qadevOOo/tests/basic/ifc/text/XTextField/script.xlb new file mode 100644 index 000000000000..5520ad3eb242 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/text/XTextField/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="text_XTextField" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="text_XTextField"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/text/XTextField/text_XTextField.xba b/qadevOOo/tests/basic/ifc/text/XTextField/text_XTextField.xba new file mode 100644 index 000000000000..0d45133370c8 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/text/XTextField/text_XTextField.xba @@ -0,0 +1,71 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="text_XTextField" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2008 by Sun Microsystems, Inc. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' $RCSfile: text_XTextField.xba,v $ +' +' $Revision: 1.3 $ +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + +' Be sure that all variables are dimensioned: +option explicit + + + +Sub RunTest() + +'************************************************************************* +' INTERFACE: +' com.sun.star.text.XTextField +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + + Test.StartMethod("getPresentation()") + bOK = true + Out.Log("getting presentetion with bShowCommand flag...") + bOK = bOK AND (VarType(oObj.getPresentation(true)) = 8 ) + Out.Log("Result: " & bOK) + Out.Log("getting presentetion without bShowCommand flag...") + bOK = bOK AND (VarType(oObj.getPresentation(false)) = 8 ) + Out.Log("Result: " & bOK) + + Test.MethodTested("getPresentation()", bOK) + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/text/XTextFrame/script.xlb b/qadevOOo/tests/basic/ifc/text/XTextFrame/script.xlb new file mode 100644 index 000000000000..5da11ee8e3a7 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/text/XTextFrame/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="text_XTextFrame" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="text_XTextFrame"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/text/XTextFrame/text_XTextFrame.xba b/qadevOOo/tests/basic/ifc/text/XTextFrame/text_XTextFrame.xba new file mode 100644 index 000000000000..95c721ee2f5d --- /dev/null +++ b/qadevOOo/tests/basic/ifc/text/XTextFrame/text_XTextFrame.xba @@ -0,0 +1,74 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="text_XTextFrame" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2008 by Sun Microsystems, Inc. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' $RCSfile: text_XTextFrame.xba,v $ +' +' $Revision: 1.3 $ +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + + + +Sub RunTest() + +'************************************************************************* +' INTERFACE: +' com.sun.star.text.XTextFrame +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + + Dim oCursor As Object + + + Test.StartMethod("getText()") + bOK = true + oText = oObj.Text + bOK = bOK AND NOT isNull(oText) + + oCursor = oObj.Text.createTextCursor() + oBookmark = oDoc.Bookmarks.getByIndex(0) + + oCursor.gotoRange(oBookmark.Anchor, true) + + ' ... and check if text is what it should be + bOK = bOK AND (mid(oCursor.String, 1, Len(cFrameName)) = cFrameName) + Test.MethodTested("getText()", bOK) + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/text/XTextGraphicObjectsSupplier/script.xlb b/qadevOOo/tests/basic/ifc/text/XTextGraphicObjectsSupplier/script.xlb new file mode 100644 index 000000000000..1c98d19d8c83 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/text/XTextGraphicObjectsSupplier/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="text_XTextGraphicObjectsSupplier" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="text_XTextGraphicObjectsSupplier"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/text/XTextGraphicObjectsSupplier/text_XTextGraphicObjectsSupplier.xba b/qadevOOo/tests/basic/ifc/text/XTextGraphicObjectsSupplier/text_XTextGraphicObjectsSupplier.xba new file mode 100644 index 000000000000..7856332e9bc1 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/text/XTextGraphicObjectsSupplier/text_XTextGraphicObjectsSupplier.xba @@ -0,0 +1,63 @@ +<?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="text_XTextGraphicObjectsSupplier" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2008 by Sun Microsystems, Inc. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' $RCSfile: text_XTextGraphicObjectsSupplier.xba,v $ +' +' $Revision: 1.3 $ +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + + + +Sub RunTest() + +'************************************************************************* +' INTERFACE: +' com.sun.star.text.XTextGraphicObjectsSupplier +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + + + Test.StartMethod("getGraphicObjects()") + bOK = true + bOK = bOK AND hasUnoInterfaces(oObj.getGraphicObjects(), "com.sun.star.container.XNameAccess") + Test.MethodTested("getGraphicObjects()", bOK) + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/text/XTextRange/script.xlb b/qadevOOo/tests/basic/ifc/text/XTextRange/script.xlb new file mode 100644 index 000000000000..98eb1adc767b --- /dev/null +++ b/qadevOOo/tests/basic/ifc/text/XTextRange/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="text_XTextRange" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="text_XTextRange"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/text/XTextRange/text_XTextRange.xba b/qadevOOo/tests/basic/ifc/text/XTextRange/text_XTextRange.xba new file mode 100644 index 000000000000..736fbb04d6f0 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/text/XTextRange/text_XTextRange.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="text_XTextRange" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2008 by Sun Microsystems, Inc. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' $RCSfile: text_XTextRange.xba,v $ +' +' $Revision: 1.3 $ +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + +' Be sure that all variables are dimensioned: +option explicit + + + +Sub RunTest() + +'************************************************************************* +' INTERFACE: +' com.sun.star.text.XTextRange +'************************************************************************* +On Error Goto ErrHndl + Dim oStartOfTextRange As Object + Dim oEndOfTextRange As Object + Dim oText As Object + Dim bOK As Boolean + + + Test.StartMethod("setString()") + Test.StartMethod("getString()") + bOK = true + oObj.setString("Middle") + bOK = bOK AND (oObj.getString() = "Middle") + Test.MethodTested("setString()", bOK) + Test.MethodTested("getString()", bOK) + + Test.StartMethod("getEnd()") + oEndOfTextRange = oObj.getEnd() + oEndOfTextRange.String = "End" + + Test.StartMethod("getStart()") + bOK = true + oStartOfTextRange = oObj.getStart() + oStartOfTextRange.String = "Start" + + Test.StartMethod("getText()") + bOK = true + oText = oObj.getText() + Out.Log("Result string is '" + oText.getString() + "'") + bOK = bOK AND instr(oText.getString(), "StartMiddleEnd") > 0 + Test.MethodTested("getEnd()", bOK) + Test.MethodTested("getStart()", bOK) + Test.MethodTested("getText()", bOK) + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/text/XTextRangeCompare/script.xlb b/qadevOOo/tests/basic/ifc/text/XTextRangeCompare/script.xlb new file mode 100644 index 000000000000..08a067879bf7 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/text/XTextRangeCompare/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="text_XTextRangeCompare" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="text_XTextRangeCompare"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/text/XTextRangeCompare/text_XTextRangeCompare.xba b/qadevOOo/tests/basic/ifc/text/XTextRangeCompare/text_XTextRangeCompare.xba new file mode 100644 index 000000000000..8aa4d83c6153 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/text/XTextRangeCompare/text_XTextRangeCompare.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="text_XTextRangeCompare" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2008 by Sun Microsystems, Inc. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' $RCSfile: text_XTextRangeCompare.xba,v $ +' +' $Revision: 1.3 $ +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + +' Be sure that all variables are dimensioned: +option explicit + + + +Sub RunTest() + +'************************************************************************* +' INTERFACE: +' com.sun.star.text.XTextRangeCompare +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + + Dim oCursor1 As Object + Dim oCursor2 As Object + Dim nResult As Integer + Dim bEnd As Boolean + Dim bStart As Boolean + Dim cIfcShortName As String + + cIfcShortName = "XTextRangeCompare" + + nResult = 10 + + Test.StartMethod("compareRegionEnds()") + Test.StartMethod("compareRegionStarts()") + + oCursor1 = oObj.createTextCursor() + oCursor2 = oObj.createTextCursor() + + nResult = oObj.compareRegionEnds(oCursor1, oCursor2) + bEnd = (nResult = 0) + nResult = oObj.compareRegionStarts(oCursor1, oCursor2) + bStart = (nResult = 0) + + oObj.insertString(oCursor1, cIfcShortName, false) + oObj.insertControlCharacter(oCursor1, 0, false) + oCursor2 = oObj.createTextCursor() + + oObj.insertString(oCursor2, cIfcShortName + cIfcShortName, false) + oObj.insertControlCharacter(oCursor2, 0, false) + + nResult = oObj.compareRegionEnds(oCursor1, oCursor2) + bEnd = bEnd AND (nResult = -1) + nResult = oObj.compareRegionEnds(oCursor2, oCursor1) + bEnd = bEnd AND (nResult = 1) + + nResult = oObj.compareRegionStarts(oCursor1, oCursor2) + bStart = (nResult = -1) + nResult = oObj.compareRegionStarts(oCursor2, oCursor1) + bStart = (nResult = 1) + + Test.MethodTested("compareRegionEnds()", bEnd) + Test.MethodTested("compareRegionStarts()", bStart) + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/text/XTextRangeMover/script.xlb b/qadevOOo/tests/basic/ifc/text/XTextRangeMover/script.xlb new file mode 100644 index 000000000000..25b529a589f0 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/text/XTextRangeMover/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="text_XTextRangeMover" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="text_XTextRangeMover"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/text/XTextRangeMover/text_XTextRangeMover.xba b/qadevOOo/tests/basic/ifc/text/XTextRangeMover/text_XTextRangeMover.xba new file mode 100644 index 000000000000..0102b7586506 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/text/XTextRangeMover/text_XTextRangeMover.xba @@ -0,0 +1,75 @@ +<?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="text_XTextRangeMover" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2008 by Sun Microsystems, Inc. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' $RCSfile: text_XTextRangeMover.xba,v $ +' +' $Revision: 1.3 $ +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + +' Be sure that all variables are dimensioned: +option explicit + +'************************************************************************* +' This Interface/Service test depends on the following GLOBAL variables, +' which must be specified in the object creation: + +' - Global oTextRangeToMove As Object + +'************************************************************************* + + + + + +Sub RunTest() + +'************************************************************************* +' INTERFACE: +' com.sun.star.text.XTextRangeMover +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + + Test.StartMethod("moveTextRange()") + bOK = true + oObj.moveTextRange(oTextRangeToMove, 1) + Test.MethodTested("moveTextRange()", bOK) + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/text/XTextSection/script.xlb b/qadevOOo/tests/basic/ifc/text/XTextSection/script.xlb new file mode 100644 index 000000000000..0335ea7bbf13 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/text/XTextSection/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="text_XTextSection" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="text_XTextSection"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/text/XTextSection/text_XTextSection.xba b/qadevOOo/tests/basic/ifc/text/XTextSection/text_XTextSection.xba new file mode 100644 index 000000000000..b721cd037154 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/text/XTextSection/text_XTextSection.xba @@ -0,0 +1,110 @@ +<?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="text_XTextSection" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2008 by Sun Microsystems, Inc. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' $RCSfile: text_XTextSection.xba,v $ +' +' $Revision: 1.3 $ +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + +' Be sure that all variables are dimensioned: +option explicit + + + +Sub RunTest() + +'************************************************************************* +' INTERFACE: +' com.sun.star.text.XTextSection +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim oPS As Variant, oCS As Variant + Dim i As Integer + Dim bChild As Boolean + + Test.StartMethod("getParentSection()") + bOK = true + oPS = oObj.getParentSection() + if (NOT isNULL(oPS)) then + bOK = bOK AND hasUnoInterfaces(oPS, "com.sun.star.text.XTextSection") + if bOK then + Out.Log("Checking the names of parent's children ...") + oCS = oPS.getChildSections() + bChild = false + for i = 0 to ubound(oCS) + if oCS(i).Name = oObj.Name then bChild = true + next i + if NOT bChild then + Out.Log("The tested section was not found among its parent's child sections.") + bOK = false + endif + else + Out.Log("Wrong object returned.") + bOK = false + endif + else + Out.Log("!!! Not really tested. Parent not found !!!") + end if + Test.MethodTested("getParentSection()", bOK) + + Test.StartMethod("getChildSections()") + bOK = true + oCS = oObj.getChildSections() + bOK = bOK AND isArray(oCS) + if (ubound(oCS) >= 0) then + bOK = bOK AND hasUnoInterfaces(oCS(0), "com.sun.star.text.XTextSection") + if bOK then + Out.Log("Checking the name of child's parent ...") + oPS = oCS(0).getParentSection() + bOK = bOK AND oPS.Name = oObj.Name + if NOT bOK then + Out.Log("Child's parent name isn't match to the object name: '" + oPS.Name + "', '" + oObj.Name + "'") + endif + else + Out.Log("Wrong object returned.") + endif + else + Out.Log("!!! Not really tested. There are no section's children !!!") + bOK = false + end if + Test.MethodTested("getChildSections()", bOK) + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/text/XTextTable/script.xlb b/qadevOOo/tests/basic/ifc/text/XTextTable/script.xlb new file mode 100644 index 000000000000..292086fbe8a5 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/text/XTextTable/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="text_XTextTable" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="text_XTextTable"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/text/XTextTable/text_XTextTable.xba b/qadevOOo/tests/basic/ifc/text/XTextTable/text_XTextTable.xba new file mode 100644 index 000000000000..8013b9572ca1 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/text/XTextTable/text_XTextTable.xba @@ -0,0 +1,144 @@ +<?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="text_XTextTable" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2008 by Sun Microsystems, Inc. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' $RCSfile: text_XTextTable.xba,v $ +' +' $Revision: 1.3 $ +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + +' Be sure that all variables are dimensioned: +option explicit + +'************************************************************************* +' This Interface/Service test depends on the following GLOBAL variables, +' which must be specified in the object creation: + +' - Global nTableW As Integer +' - Global nTableH As Integer + +'************************************************************************* + + + + + +Sub RunTest() + +'************************************************************************* +' INTERFACE: +' com.sun.star.text.XTextTable +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim i As Integer, j As Integer + Dim oRows As Object, oColumns As Object + Dim oCursor As Object, oCell As Object + Dim aNames As Variant + Dim nDscColumns As Integer, nDscRows As Integer + + Test.StartMethod("initialize()") + bOK = true + ' Object is already was initialized, when it was created... So, assume that this is OK. + + For i = 0 to nTableW - 1 + For j = 0 to nTableH - 1 + oObj.getCellByPosition(i, j).Value = i + j * nTableW + Next j + Next i + + nDscColumns = ubound(oObj.getColumnDescriptions()) + 1 + nDscRows = ubound(oObj.getRowDescriptions()) + 1 + + bOK = bOK AND nDscRows = nTableH AND nDscColumns = nTableW + if NOT bOK then + Out.Log("The table must have size (" + nTableW + "," + nTableH + _ + "), but descriptions returned for size (" + nDscColumns + "," + nDscRows + ")") + endif + Test.MethodTested("initialize()", bOK) + + Test.StartMethod("getRows()") + bOK = true + + oRows = oObj.getRows() + + bOK = bOK AND hasUnoInterfaces(oRows, "com.sun.star.table.XTableRows") + bOK = bOK AND oRows.getCount() = nTableH + Test.MethodTested("getRows()", bOK) + + Test.StartMethod("getColumns()") + bOK = true + + oColumns = oObj.getColumns() + + bOK = bOK AND hasUnoInterfaces(oColumns, "com.sun.star.table.XTableColumns") + bOK = bOK AND oColumns.getCount() = nTableW + Test.MethodTested("getColumns()", bOK) + + + Test.StartMethod("createCursorByCellName()") + bOK = true + oCursor = oObj.createCursorByCellName("B2") + bOK = bOK AND hasUnoInterfaces(oCursor, "com.sun.star.text.XTextTableCursor") + bOK = bOK AND oCursor.getRangeName() = "B2" + Test.MethodTested("createCursorByCellName()", bOK) + + oCursor.splitRange(1, true) + oCursor.splitRange(1, false) + + Test.StartMethod("getCellNames()") + bOK = true + aNames = oObj.getCellNames() + bOK = bOK AND ubound(aNames) = nTableW * nTableH + 1 ' = nTableW * nTableH - 1 + 2(after splitting) + Test.MethodTested("getCellNames()", bOK) + + Test.StartMethod("getCellByName()") + bOK = true + oCell = oObj.getCellByPosition(0,0) + oCell.String = "A1" + oCell = oObj.getCellByName("A1") + bOK = bOK AND oCell.String = "A1" + + oCell = oObj.getCellByName("B2.2.1") + bOK = bOK AND hasUnoInterfaces(oCell, "com.sun.star.table.XCell") + + Test.MethodTested("getCellByName()", bOK) + + ReCreateObj() +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/text/XTextTableCursor/script.xlb b/qadevOOo/tests/basic/ifc/text/XTextTableCursor/script.xlb new file mode 100644 index 000000000000..6a67335e4ea2 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/text/XTextTableCursor/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="text_XTextTableCursor" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="text_XTextTableCursor"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/text/XTextTableCursor/text_XTextTableCursor.xba b/qadevOOo/tests/basic/ifc/text/XTextTableCursor/text_XTextTableCursor.xba new file mode 100644 index 000000000000..cfa87dbe5adb --- /dev/null +++ b/qadevOOo/tests/basic/ifc/text/XTextTableCursor/text_XTextTableCursor.xba @@ -0,0 +1,146 @@ +<?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="text_XTextTableCursor" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2008 by Sun Microsystems, Inc. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' $RCSfile: text_XTextTableCursor.xba,v $ +' +' $Revision: 1.3 $ +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + + + +Sub RunTest() + +'************************************************************************* +' INTERFACE: +' com.sun.star.text.XTextTableCursor +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + + Test.StartMethod("gotoStart()") + bOK = true + oObj.gotoStart(false) + bOK = bOK AND Expected("A1") + Test.MethodTested("gotoStart()", bOK) + + Test.StartMethod("getRangeName()") + bOK = true + cName = oObj.getRangeName() + bOK = bOK AND NOT isNULL(cName) + Test.MethodTested("getRangeName()", bOK) + + Test.StartMethod("gotoCellByName()") + bOK = true + bOK = bOK AND oObj.gotoCellByName("B2", true) + bOK = bOK AND Expected("A1:B2") + Test.MethodTested("gotoCellByName()", bOK) + + Test.StartMethod("goLeft()") + bOK = true + bOK = bOK AND oObj.goLeft(1, false) + bOK = bOK AND Expected("A2") + Test.MethodTested("goLeft()", bOK) + + Test.StartMethod("goRight()") + bOK = true + bOK = bOK AND oObj.goRight(3, true) + bOK = bOK AND Expected("A2:D2") + Test.MethodTested("goRight()", bOK) + + Test.StartMethod("goUp()") + bOK = true + bOK = bOK AND oObj.goUp(1, true) + bOK = bOK AND Expected("A2:D1") + Test.MethodTested("goUp()", bOK) + + Test.StartMethod("goDown()") + bOK = true + bOK = bOK AND oObj.goDown(3, false) + bOK = bOK AND Expected("D4") + Test.MethodTested("goDown()", bOK) + + Test.StartMethod("gotoEnd()") + bOK = true + oObj.gotoEnd(true) + bOK = bOK AND Expected("D4:E5") + Test.MethodTested("gotoEnd()", bOK) + + Test.StartMethod("mergeRange()") + bOK = true + oObj.gotoStart(false) + oObj.gotoEnd(true) + bOK = bOK AND oObj.mergeRange() + bOK = bOK AND Expected("A1") + Test.MethodTested("mergeRange()", bOK) + + Test.StartMethod("splitRange()") + bOK = true + bOK = bOK AND oObj.splitRange(3, true) + oObj.gotoEnd(true) + bOK = bOK AND Expected("A1.1.1:A1.1.4") + oObj.gotoStart(false) + bOK = bOK AND oObj.splitRange(2, false) + oObj.goRight(2, true) + bOK = bOK AND Expected("A1.1.1:A1.3.1") + Test.MethodTested("splitRange()", bOK) + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +Function Expected(cName As String) As Boolean + Dim bOK As Boolean + Dim cRangeName As String + Dim cAltName As String + Dim dPos As Integer + + cRangeName = oObj.getRangeName() + + dPos = inStr(1, cName, ":") + if (dPos > 0) then + cAltName = Mid(cName, dPos + 1) & ":" & Left(cName, dPos - 1) + bOK = (cRangeName = cName) OR (cAltName = cRangeName) + else + bOK = cRangeName = cName + end if + + if (NOT bOK) then + Out.Log("Expected RangeName is '" & cName & "' and actual is '" & cRangeName & "'") + end if + + Expected() = bOK +End Function +</script:module> diff --git a/qadevOOo/tests/basic/ifc/text/XTextTablesSupplier/script.xlb b/qadevOOo/tests/basic/ifc/text/XTextTablesSupplier/script.xlb new file mode 100644 index 000000000000..8357f15eee37 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/text/XTextTablesSupplier/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="text_XTextTablesSupplier" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="text_XTextTablesSupplier"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/text/XTextTablesSupplier/text_XTextTablesSupplier.xba b/qadevOOo/tests/basic/ifc/text/XTextTablesSupplier/text_XTextTablesSupplier.xba new file mode 100644 index 000000000000..3bc4b88a0ffe --- /dev/null +++ b/qadevOOo/tests/basic/ifc/text/XTextTablesSupplier/text_XTextTablesSupplier.xba @@ -0,0 +1,63 @@ +<?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="text_XTextTablesSupplier" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2008 by Sun Microsystems, Inc. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' $RCSfile: text_XTextTablesSupplier.xba,v $ +' +' $Revision: 1.3 $ +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + + + +Sub RunTest() + +'************************************************************************* +' INTERFACE: +' com.sun.star.text.XTextTablesSupplier +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + + + Test.StartMethod("getTextTables()") + bOK = true + bOK = bOK AND hasUnoInterfaces(oObj.getTextTables(), "com.sun.star.container.XNameAccess") + Test.MethodTested("getTextTables()", bOK) + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/text/XTextViewCursorSupplier/script.xlb b/qadevOOo/tests/basic/ifc/text/XTextViewCursorSupplier/script.xlb new file mode 100644 index 000000000000..82f35ff951ae --- /dev/null +++ b/qadevOOo/tests/basic/ifc/text/XTextViewCursorSupplier/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="text_XTextViewCursorSupplier" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="text_XTextViewCursorSupplier"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/text/XTextViewCursorSupplier/text_XTextViewCursorSupplier.xba b/qadevOOo/tests/basic/ifc/text/XTextViewCursorSupplier/text_XTextViewCursorSupplier.xba new file mode 100644 index 000000000000..68eee155ec24 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/text/XTextViewCursorSupplier/text_XTextViewCursorSupplier.xba @@ -0,0 +1,65 @@ +<?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="text_XTextViewCursorSupplier" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2008 by Sun Microsystems, Inc. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' $RCSfile: text_XTextViewCursorSupplier.xba,v $ +' +' $Revision: 1.3 $ +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + + + +Sub RunTest() + +'************************************************************************* +' INTERFACE: +' com.sun.star.text.XTextViewCursorSupplier +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + + + Test.StartMethod("getViewCursor()") + bOK = true + oCursor = oObj.getViewCursor() + bOK = bOK AND NOT isNULL(oCursor) + bOK = bOK AND oCursor.implementationName = "SwXTextViewCursor" + Test.MethodTested("getViewCursor()", bOK) + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/text/XWordCursor/script.xlb b/qadevOOo/tests/basic/ifc/text/XWordCursor/script.xlb new file mode 100644 index 000000000000..0bf6c008e8e8 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/text/XWordCursor/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="text_XWordCursor" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="text_XWordCursor"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/text/XWordCursor/text_XWordCursor.xba b/qadevOOo/tests/basic/ifc/text/XWordCursor/text_XWordCursor.xba new file mode 100644 index 000000000000..8d62ccebc58f --- /dev/null +++ b/qadevOOo/tests/basic/ifc/text/XWordCursor/text_XWordCursor.xba @@ -0,0 +1,103 @@ +<?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="text_XWordCursor" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2008 by Sun Microsystems, Inc. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' $RCSfile: text_XWordCursor.xba,v $ +' +' $Revision: 1.3 $ +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + + + +Sub RunTest() + +'************************************************************************* +' INTERFACE: +' com.sun.star.text.XWordCursor +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + + oObj.Text.string = "1Word1: 2Word2, 3Word3." + oObj.gotoStart(false) + + Test.StartMethod("gotoStartOfWord()") + bOK = true + oObj.gotoStartOfWord(false) + oObj.String = "1" + bOK = bOK AND inStr(1, oObj.Text.String, "11W") <> 0 + Test.MethodTested("gotoStartOfWord()", bOK) + + Test.StartMethod("gotoEndOfWord()") + bOK = true + oObj.gotoEndOfWord(false) + oObj.String = "2" + bOK = bOK AND inStr(1, oObj.Text.String, "d12") <> 0 + Test.MethodTested("gotoEndOfWord()", bOK) + + Test.StartMethod("gotoNextWord()") + bOK = true + oObj.gotoNextWord(false) + oObj.gotoNextWord(false) + oObj.gotoEndOfWord(false) + oObj.String = "3" + bOK = bOK AND inStr(1, oObj.Text.String, "d33") <> 0 + Test.MethodTested("gotoNextWord()", bOK) + + Test.StartMethod("gotoPreviousWord()") + bOK = true + oObj.gotoPreviousWord(false) + oObj.gotoStartOfWord(false) + oObj.String = "4" + bOK = bOK AND inStr(1, oObj.Text.String, "42W") <> 0 + Test.MethodTested("gotoPreviousWord()", bOK) + + Test.StartMethod("isStartOfWord()") + bOK = true + oObj.gotoStartOfWord(false) + bOK = bOK AND oObj.isStartOfWord() + Test.MethodTested("isStartOfWord()", bOK) + + Test.StartMethod("isEndOfWord()") + bOK = true + oObj.gotoEndOfWord(false) + bOK = bOK AND oObj.isEndOfWord() + Test.MethodTested("isEndOfWord()", bOK) + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> |