diff options
Diffstat (limited to 'qadevOOo/tests/basic/ifc/sheet')
132 files changed, 6150 insertions, 0 deletions
diff --git a/qadevOOo/tests/basic/ifc/sheet/CellAreaLink/script.xlb b/qadevOOo/tests/basic/ifc/sheet/CellAreaLink/script.xlb new file mode 100644 index 000000000000..c731910c87be --- /dev/null +++ b/qadevOOo/tests/basic/ifc/sheet/CellAreaLink/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="sheet_CellAreaLink" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sheet_CellAreaLink"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/sheet/CellAreaLink/sheet_CellAreaLink.xba b/qadevOOo/tests/basic/ifc/sheet/CellAreaLink/sheet_CellAreaLink.xba new file mode 100644 index 000000000000..71b64f1f89f1 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/sheet/CellAreaLink/sheet_CellAreaLink.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="sheet_CellAreaLink" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2000, 2010 Oracle and/or its affiliates. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + +' Be sure that all variables are dimensioned: +option explicit + + + +Sub RunTest() + +'************************************************************************* +' SERVICE: +' com.sun.star.sheet.CellAreaLink +'************************************************************************* +On Error Goto ErrHndl + + Dim aURLs(1) As String + aURLs(0) = utils.Path2URL(cTestDocsDir) + aURLs(1) = utils.Path2URL(cTestDocsDir & "/temp.txt") + PropertyTester.TestProperty("Url", aURLs()) + + PropertyTester.TestProperty("Filter") + + PropertyTester.TestProperty("FilterOptions") + + PropertyTester.TestProperty("RefreshDelay") + +Exit Sub +ErrHndl: + Test.Exception() + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/sheet/DataPilotField/script.xlb b/qadevOOo/tests/basic/ifc/sheet/DataPilotField/script.xlb new file mode 100644 index 000000000000..ff63efd2cb23 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/sheet/DataPilotField/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="sheet_DataPilotField" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sheet_DataPilotField"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/sheet/DataPilotField/sheet_DataPilotField.xba b/qadevOOo/tests/basic/ifc/sheet/DataPilotField/sheet_DataPilotField.xba new file mode 100644 index 000000000000..5ce59de61b8e --- /dev/null +++ b/qadevOOo/tests/basic/ifc/sheet/DataPilotField/sheet_DataPilotField.xba @@ -0,0 +1,57 @@ +<?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="sheet_DataPilotField" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2000, 2010 Oracle and/or its affiliates. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + +' Be sure that all variables are dimensioned: +option explicit + + + +Sub RunTest() + +'************************************************************************* +' SERVICE: +' com.sun.star.sheet.DataPilotField +'************************************************************************* +On Error Goto ErrHndl + PropertyTester.TestProperty("Orientation") + + oObj.setPropertyValue("Orientation", com.sun.star.sheet.DataPilotFieldOrientation.COLUMN) + PropertyTester.TestProperty("Function") +Exit Sub +ErrHndl: + Test.Exception() + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/sheet/DatabaseRange/script.xlb b/qadevOOo/tests/basic/ifc/sheet/DatabaseRange/script.xlb new file mode 100644 index 000000000000..74e74df5975c --- /dev/null +++ b/qadevOOo/tests/basic/ifc/sheet/DatabaseRange/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="sheet_DatabaseRange" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sheet_DatabaseRange"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/sheet/DatabaseRange/sheet_DatabaseRange.xba b/qadevOOo/tests/basic/ifc/sheet/DatabaseRange/sheet_DatabaseRange.xba new file mode 100644 index 000000000000..956ce9af08b6 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/sheet/DatabaseRange/sheet_DatabaseRange.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="sheet_DatabaseRange" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2000, 2010 Oracle and/or its affiliates. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + +' Be sure that all variables are dimensioned: +option explicit + + + +Sub RunTest() + +'************************************************************************* +' SERVICE: +' com.sun.star.sheet.DatabaseRange +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + + PropertyTester.TestProperty("MoveCells") + + PropertyTester.TestProperty("KeepFormats") + + PropertyTester.TestProperty("StripData") + + PropertyTester.TestProperty("AutoFilter") + + PropertyTester.TestProperty("UseFilterCriteriaSource") + + PropertyTester.TestProperty("FilterCriteriaSource") + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/sheet/GlobalSheetSettings/script.xlb b/qadevOOo/tests/basic/ifc/sheet/GlobalSheetSettings/script.xlb new file mode 100644 index 000000000000..2b471754b704 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/sheet/GlobalSheetSettings/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="sheet_GlobalSheetSettings" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sheet_GlobalSheetSettings"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/sheet/GlobalSheetSettings/sheet_GlobalSheetSettings.xba b/qadevOOo/tests/basic/ifc/sheet/GlobalSheetSettings/sheet_GlobalSheetSettings.xba new file mode 100644 index 000000000000..db041b57b210 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/sheet/GlobalSheetSettings/sheet_GlobalSheetSettings.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="sheet_GlobalSheetSettings" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2000, 2010 Oracle and/or its affiliates. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + +' Be sure that all variables are dimensioned: +option explicit + + + +Sub RunTest() + +'************************************************************************* +' SERVICE: +' com.sun.star.sheet.GlobalSheetSettings +'************************************************************************* +On Error Goto ErrHndl + + PropertyTester.TestProperty("MoveSelection") + + PropertyTester.TestProperty("MoveDirection") + + PropertyTester.TestProperty("EnterEdit") + + PropertyTester.TestProperty("ExtendFormat") + + PropertyTester.TestProperty("RangeFinder") + + PropertyTester.TestProperty("ExpandReferences") + + PropertyTester.TestProperty("MarkHeader") + + PropertyTester.TestProperty("UseTabCol") + + PropertyTester.TestProperty("Metric") + + PropertyTester.TestProperty("Scale") + + PropertyTester.TestProperty("DoAutoComplete") + + PropertyTester.TestProperty("StatusBarFunction") + + PropertyTester.TestProperty("UserLists") + + PropertyTester.TestProperty("LinkUpdateMode") + + PropertyTester.TestProperty("PrintAllSheets") + + PropertyTester.TestProperty("PrintEmptyPages") + + PropertyTester.TestProperty("UsePrinterMetrics") + + PropertyTester.TestProperty("ReplaceCellsWarning") + +Exit Sub +ErrHndl: + Test.Exception() + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/sheet/SheetCell/script.xlb b/qadevOOo/tests/basic/ifc/sheet/SheetCell/script.xlb new file mode 100644 index 000000000000..e5ddf6444cc6 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/sheet/SheetCell/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="sheet_SheetCell" library:readonly="false" library:passwordprotected="false"> + <library:element library:name="sheet_SheetCell"/> + </library:library> diff --git a/qadevOOo/tests/basic/ifc/sheet/SheetCell/sheet_SheetCell.xba b/qadevOOo/tests/basic/ifc/sheet/SheetCell/sheet_SheetCell.xba new file mode 100644 index 000000000000..605351a25d57 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/sheet/SheetCell/sheet_SheetCell.xba @@ -0,0 +1,66 @@ +<?xml version="1.0" encoding="UTF-8"?> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="sheet_SheetCell" script:language="StarBasic"> + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2000, 2010 Oracle and/or its affiliates. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + +' Be sure that all variables are dimensioned: +option explicit + +Sub RunTest() + +'************************************************************************* +' INTERFACE: +' com.sun.star.sheet.SheetCell +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + + PropertyTester.TestProperty("Position") + + PropertyTester.TestProperty("Size") + + PropertyTester.TestProperty("FormulaLocal") + + PropertyTester.TestProperty("FormulaResultType") + + PropertyTester.TestProperty("ConditionalFormat") + + PropertyTester.TestProperty("ConditionalFormatLocal") + + PropertyTester.TestProperty("Validation") + + PropertyTester.TestProperty("ValidationLocal") + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/sheet/SheetCellRange/script.xlb b/qadevOOo/tests/basic/ifc/sheet/SheetCellRange/script.xlb new file mode 100644 index 000000000000..cccdd3d6113c --- /dev/null +++ b/qadevOOo/tests/basic/ifc/sheet/SheetCellRange/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="sheet_SheetCellRange" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sheet_SheetCellRange"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/sheet/SheetCellRange/sheet_SheetCellRange.xba b/qadevOOo/tests/basic/ifc/sheet/SheetCellRange/sheet_SheetCellRange.xba new file mode 100644 index 000000000000..bd5acf56ce60 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/sheet/SheetCellRange/sheet_SheetCellRange.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="sheet_SheetCellRange" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2000, 2010 Oracle and/or its affiliates. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + +' Be sure that all variables are dimensioned: +option explicit + + + +Sub RunTest() + +'************************************************************************* +' SERVICE: +' com.sun.star.sheet.SheetCellRange +'************************************************************************* +On Error Goto ErrHndl + PropertyTester.TestProperty("Position") + PropertyTester.TestProperty("Size") + + PropertyTester.TestProperty("Validation") + + PropertyTester.TestProperty("ValidationLocal") + + PropertyTester.TestProperty("ConditionalFormat") + + PropertyTester.TestProperty("ConditionalFormatLocal") + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/sheet/SheetCellRanges/script.xlb b/qadevOOo/tests/basic/ifc/sheet/SheetCellRanges/script.xlb new file mode 100644 index 000000000000..2c9622791cf5 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/sheet/SheetCellRanges/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="sheet_SheetCellRanges" library:readonly="false" library:passwordprotected="false"> + <library:element library:name="sheet_SheetCellRanges"/> + </library:library> diff --git a/qadevOOo/tests/basic/ifc/sheet/SheetCellRanges/sheet_SheetCellRanges.xba b/qadevOOo/tests/basic/ifc/sheet/SheetCellRanges/sheet_SheetCellRanges.xba new file mode 100644 index 000000000000..dc51f0fae055 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/sheet/SheetCellRanges/sheet_SheetCellRanges.xba @@ -0,0 +1,58 @@ +<?xml version="1.0" encoding="UTF-8"?> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="sheet_SheetCellRanges" script:language="StarBasic"> + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2000, 2010 Oracle and/or its affiliates. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + +' Be sure that all variables are dimensioned: +option explicit + +Sub RunTest() + +'************************************************************************* +' INTERFACE: +' com.sun.star.sheet.SheetCellRanges +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + + PropertyTester.TestProperty("ConditionalFormat") + + PropertyTester.TestProperty("ConditionalFormatLocal") + + PropertyTester.TestProperty("Validation") + + PropertyTester.TestProperty("ValidationLocal") + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/sheet/SheetFilterDescriptor/script.xlb b/qadevOOo/tests/basic/ifc/sheet/SheetFilterDescriptor/script.xlb new file mode 100644 index 000000000000..e82850021381 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/sheet/SheetFilterDescriptor/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="sheet_SheetFilterDescriptor" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sheet_SheetFilterDescriptor"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/sheet/SheetFilterDescriptor/sheet_SheetFilterDescriptor.xba b/qadevOOo/tests/basic/ifc/sheet/SheetFilterDescriptor/sheet_SheetFilterDescriptor.xba new file mode 100644 index 000000000000..3d865a931836 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/sheet/SheetFilterDescriptor/sheet_SheetFilterDescriptor.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="sheet_SheetFilterDescriptor" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2000, 2010 Oracle and/or its affiliates. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + +' Be sure that all variables are dimensioned: +option explicit + + + +Sub RunTest() + +'************************************************************************* +' SERVICE: +' com.sun.star.sheet.SheetFilterDescriptor +'************************************************************************* +On Error Goto ErrHndl + + PropertyTester.TestProperty("IsCaseSensitive") + + PropertyTester.TestProperty("SkipDuplicates") + + PropertyTester.TestProperty("UseRegularExpressions") + + PropertyTester.TestProperty("SaveOutputPosition") + + PropertyTester.TestProperty("Orientation") + + PropertyTester.TestProperty("ContainsHeader") + + PropertyTester.TestProperty("CopyOutputData") + + PropertyTester.TestProperty("OutputPosition") + + PropertyTester.TestProperty("MaxFieldCount") + +Exit Sub +ErrHndl: + Test.Exception() + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/sheet/SheetLink/script.xlb b/qadevOOo/tests/basic/ifc/sheet/SheetLink/script.xlb new file mode 100644 index 000000000000..30fbc310593b --- /dev/null +++ b/qadevOOo/tests/basic/ifc/sheet/SheetLink/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="sheet_SheetLink" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sheet_SheetLink"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/sheet/SheetLink/sheet_SheetLink.xba b/qadevOOo/tests/basic/ifc/sheet/SheetLink/sheet_SheetLink.xba new file mode 100644 index 000000000000..48ac50f08318 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/sheet/SheetLink/sheet_SheetLink.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="sheet_SheetLink" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2000, 2010 Oracle and/or its affiliates. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + +' Be sure that all variables are dimensioned: +option explicit + + + +Sub RunTest() + +'************************************************************************* +' SERVICE: +' com.sun.star.sheet.SheetLink +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + + Dim aURLs(1) As String + aURLs(0) = utils.Path2URL(cTestDocsDir) + aURLs(1) = utils.Path2URL(cTestDocsDir & "/temp.txt") + + PropertyTester.TestProperty("Url", aURLs()) + + Dim aFilters(1) As String + aFilters(0) = "StarCalc 4.0" + aFilters(1) = "StarCalc 5.0" + + PropertyTester.TestProperty("Filter", aFilters()) + + PropertyTester.TestProperty("FilterOptions") + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/sheet/Spreadsheet/script.xlb b/qadevOOo/tests/basic/ifc/sheet/Spreadsheet/script.xlb new file mode 100644 index 000000000000..54d523870d7e --- /dev/null +++ b/qadevOOo/tests/basic/ifc/sheet/Spreadsheet/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="sheet_Spreadsheet" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sheet_Spreadsheet"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/sheet/Spreadsheet/sheet_Spreadsheet.xba b/qadevOOo/tests/basic/ifc/sheet/Spreadsheet/sheet_Spreadsheet.xba new file mode 100644 index 000000000000..98435657a745 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/sheet/Spreadsheet/sheet_Spreadsheet.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="sheet_Spreadsheet" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2000, 2010 Oracle and/or its affiliates. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + +' Be sure that all variables are dimensioned: +option explicit + +'************************************************************************* +' This Interface/Service test depends on the following GLOBAL variables, +' which must be specified in the object creation: + +' - Global sStyleName As String + +'************************************************************************* + + + + + + +Sub RunTest() + +'************************************************************************* +' SERVICE: +' com.sun.star.sheet.Spreadsheet +'************************************************************************* +On Error Goto ErrHndl + PropertyTester.TestProperty("IsVisible") + Dim aStyles(1) As String + aStyles(0) = sStyleName + aStyles(1) = "Default" + PropertyTester.TestProperty("PageStyle", aStyles()) +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/sheet/SpreadsheetDocument/script.xlb b/qadevOOo/tests/basic/ifc/sheet/SpreadsheetDocument/script.xlb new file mode 100644 index 000000000000..870d40c0204f --- /dev/null +++ b/qadevOOo/tests/basic/ifc/sheet/SpreadsheetDocument/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="sheet_SpreadsheetDocument" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sheet_SpreadsheetDocument"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/sheet/SpreadsheetDocument/sheet_SpreadsheetDocument.xba b/qadevOOo/tests/basic/ifc/sheet/SpreadsheetDocument/sheet_SpreadsheetDocument.xba new file mode 100644 index 000000000000..6706c1f00d49 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/sheet/SpreadsheetDocument/sheet_SpreadsheetDocument.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="sheet_SpreadsheetDocument" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2000, 2010 Oracle and/or its affiliates. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + +' Be sure that all variables are dimensioned: +option explicit + + + +Sub RunTest() + +'************************************************************************* +' SERVICE: +' com.sun.star.sheet.SpreadsheetDocument +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + + PropertyTester.TestProperty("NamedRanges") + + PropertyTester.TestProperty("DatabaseRanges") + + PropertyTester.TestProperty("ColumnLabelRanges") + + PropertyTester.TestProperty("RowLabelRanges") + + PropertyTester.TestProperty("SheetLinks") + + PropertyTester.TestProperty("AreaLinks") + + PropertyTester.TestProperty("DDELinks") + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/sheet/SpreadsheetDocumentSettings/script.xlb b/qadevOOo/tests/basic/ifc/sheet/SpreadsheetDocumentSettings/script.xlb new file mode 100644 index 000000000000..351347139143 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/sheet/SpreadsheetDocumentSettings/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="sheet_SpreadsheetDocumentSettings" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sheet_SpreadsheetDocumentSettings"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/sheet/SpreadsheetDocumentSettings/sheet_SpreadsheetDocumentSettings.xba b/qadevOOo/tests/basic/ifc/sheet/SpreadsheetDocumentSettings/sheet_SpreadsheetDocumentSettings.xba new file mode 100644 index 000000000000..e0a761901887 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/sheet/SpreadsheetDocumentSettings/sheet_SpreadsheetDocumentSettings.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="sheet_SpreadsheetDocumentSettings" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2000, 2010 Oracle and/or its affiliates. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + +' Be sure that all variables are dimensioned: +option explicit + + + +Sub RunTest() + +'************************************************************************* +' SERVICE: +' com.sun.star.sheet.SpreadsheetDocumentSettings +'************************************************************************* +On Error Goto ErrHndl + PropertyTester.TestProperty("IsIterationEnabled") + PropertyTester.TestProperty("IterationCount") + PropertyTester.TestProperty("IterationEpsilon") + PropertyTester.TestProperty("StandardDecimals") + PropertyTester.TestProperty("NullDate") + PropertyTester.TestProperty("DefaultTabStop") + PropertyTester.TestProperty("IgnoreCase") + PropertyTester.TestProperty("CalcAsShown") + PropertyTester.TestProperty("MatchWholeCell") + PropertyTester.TestProperty("SpellOnline") + PropertyTester.TestProperty("LookUpLabels") + PropertyTester.TestProperty("RegularExpressions") + PropertyTester.TestProperty("ForbiddenCharacters") + PropertyTester.TestProperty("HasDrawPages") + +' + PropertyTester.TestProperty("CharLocale") + + PropertyTester.TestProperty("CharLocaleAsian") + + PropertyTester.TestProperty("CharLocaleComplex") + +Exit Sub +ErrHndl: + Test.Exception() + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/sheet/SpreadsheetViewSettings/script.xlb b/qadevOOo/tests/basic/ifc/sheet/SpreadsheetViewSettings/script.xlb new file mode 100644 index 000000000000..d9f23cd17d45 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/sheet/SpreadsheetViewSettings/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="sheet_SpreadsheetViewSettings" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sheet_SpreadsheetViewSettings"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/sheet/SpreadsheetViewSettings/sheet_SpreadsheetViewSettings.xba b/qadevOOo/tests/basic/ifc/sheet/SpreadsheetViewSettings/sheet_SpreadsheetViewSettings.xba new file mode 100644 index 000000000000..c448552f7e29 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/sheet/SpreadsheetViewSettings/sheet_SpreadsheetViewSettings.xba @@ -0,0 +1,96 @@ +<?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="sheet_SpreadsheetViewSettings" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2000, 2010 Oracle and/or its affiliates. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + +' Be sure that all variables are dimensioned: +option explicit + + + +Sub RunTest() + +'************************************************************************* +' SERVICE: +' com.sun.star.sheet.SpreadsheetViewSettings +'************************************************************************* +On Error Goto ErrHndl + + PropertyTester.TestProperty("ShowFormulas") + + PropertyTester.TestProperty("ShowZeroValues") + + PropertyTester.TestProperty("IsValueHighlightingEnabled") + + PropertyTester.TestProperty("ShowNotes") + + PropertyTester.TestProperty("HasVerticalScrollBar") + + PropertyTester.TestProperty("HasHorizontalScrollBar") + + PropertyTester.TestProperty("HasSheetTabs") + + PropertyTester.TestProperty("IsOutlineSymbolsSet") + + PropertyTester.TestProperty("HasColumnRowHeaders") + + PropertyTester.TestProperty("ShowGrid") + + PropertyTester.TestProperty("GridColor") + + PropertyTester.TestProperty("ShowHelpLines") + + PropertyTester.TestProperty("ShowAnchor") + + PropertyTester.TestProperty("ShowPageBreaks") + + PropertyTester.TestProperty("SolidHandles") + + PropertyTester.TestProperty("ShowObjects") + + PropertyTester.TestProperty("ShowCharts") + + PropertyTester.TestProperty("ShowDrawing") + + PropertyTester.TestProperty("HideSpellMarks") + + PropertyTester.TestProperty("ZoomType") + + PropertyTester.TestProperty("ZoomValue") + +Exit Sub +ErrHndl: + Test.Exception() + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/sheet/SubTotalDescriptor/script.xlb b/qadevOOo/tests/basic/ifc/sheet/SubTotalDescriptor/script.xlb new file mode 100644 index 000000000000..ec784755fab0 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/sheet/SubTotalDescriptor/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="sheet_SubTotalDescriptor" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sheet_SubTotalDescriptor"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/sheet/SubTotalDescriptor/sheet_SubTotalDescriptor.xba b/qadevOOo/tests/basic/ifc/sheet/SubTotalDescriptor/sheet_SubTotalDescriptor.xba new file mode 100644 index 000000000000..bb9810addb02 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/sheet/SubTotalDescriptor/sheet_SubTotalDescriptor.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="sheet_SubTotalDescriptor" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2000, 2010 Oracle and/or its affiliates. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + +' Be sure that all variables are dimensioned: +option explicit + + + +Sub RunTest() + +'************************************************************************* +' SERVICE: +' com.sun.star.sheet.SubTotalDescriptor +'************************************************************************* +On Error Goto ErrHndl + + PropertyTester.TestProperty("InsertPageBreaks") + + PropertyTester.TestProperty("IsCaseSensitive") + + PropertyTester.TestProperty("EnableUserSortList") + + PropertyTester.TestProperty("UserSortListIndex") + + PropertyTester.TestProperty("BindFormatsToContent") + + PropertyTester.TestProperty("SortAscending") + + PropertyTester.TestProperty("MaxFieldCount") + + PropertyTester.TestProperty("EnableSort") + +Exit Sub +ErrHndl: + Test.Exception() + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/sheet/TableAutoFormat/script.xlb b/qadevOOo/tests/basic/ifc/sheet/TableAutoFormat/script.xlb new file mode 100644 index 000000000000..43d45faccf0d --- /dev/null +++ b/qadevOOo/tests/basic/ifc/sheet/TableAutoFormat/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="sheet_TableAutoFormat" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sheet_TableAutoFormat"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/sheet/TableAutoFormat/sheet_TableAutoFormat.xba b/qadevOOo/tests/basic/ifc/sheet/TableAutoFormat/sheet_TableAutoFormat.xba new file mode 100644 index 000000000000..9c1fe4e521ec --- /dev/null +++ b/qadevOOo/tests/basic/ifc/sheet/TableAutoFormat/sheet_TableAutoFormat.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="sheet_TableAutoFormat" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2000, 2010 Oracle and/or its affiliates. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + + + +Sub RunTest() + +'************************************************************************* +' SERVICE: +' com.sun.star.sheet.TableAutoFormat +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + + + PropertyTester.TestProperty("IncludeFont") + + PropertyTester.TestProperty("IncludeJustify") + + PropertyTester.TestProperty("IncludeBorder") + + PropertyTester.TestProperty("IncludeBackground") + + PropertyTester.TestProperty("IncludeNumberFormat") + + PropertyTester.TestProperty("IncludeWidthAndHeight") + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/sheet/TableAutoFormatField/script.xlb b/qadevOOo/tests/basic/ifc/sheet/TableAutoFormatField/script.xlb new file mode 100644 index 000000000000..a82bd1a1a653 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/sheet/TableAutoFormatField/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="sheet_TableAutoFormatField" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sheet_TableAutoFormatField"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/sheet/TableAutoFormatField/sheet_TableAutoFormatField.xba b/qadevOOo/tests/basic/ifc/sheet/TableAutoFormatField/sheet_TableAutoFormatField.xba new file mode 100644 index 000000000000..f66727fb5da4 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/sheet/TableAutoFormatField/sheet_TableAutoFormatField.xba @@ -0,0 +1,163 @@ +<?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="sheet_TableAutoFormatField" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2000, 2010 Oracle and/or its affiliates. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + + + +Sub RunTest() + +'************************************************************************* +' SERVICE: +' com.sun.star.sheet.TableAutoFormatField +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + + + PropertyTester.TestProperty("CharFontName") + + Dim aHeightArray(3) As Double + aHeightArray(0) = 10 + aHeightArray(1) = 20.1 + aHeightArray(2) = 25.2 + aHeightArray(3) = 30.3 + PropertyTester.TestProperty("CharHeight",aHeightArray()) + + Dim aWeightArray(9) As Integer + with com.sun.star.awt.FontWeight + aWeightArray(0) = .DONTKNOW + aWeightArray(1) = .THIN + aWeightArray(2) = .ULTRALIGHT + aWeightArray(3) = .LIGHT + aWeightArray(4) = .SEMILIGHT + aWeightArray(5) = .NORMAL + aWeightArray(6) = .SEMIBOLD + aWeightArray(7) = .BOLD + aWeightArray(8) = .ULTRABOLD + aWeightArray(9) = .BLACK + end with + PropertyTester.TestProperty("CharWeight", aWeightArray()) + + PropertyTester.TestProperty("CharPosture") + + PropertyTester.TestProperty("CharUnderline") + + PropertyTester.TestProperty("CharCrossedOut") + + PropertyTester.TestProperty("CharContoured") + + PropertyTester.TestProperty("CharShadowed") + + PropertyTester.TestProperty("CharColor") + +' ### The following property was not found in correspond IDL file! ### + PropertyTester.TestProperty("CharLocale") + + PropertyTester.TestProperty("CellBackColor") + + PropertyTester.TestProperty("IsCellBackgroundTransparent") + + PropertyTester.TestProperty("ShadowFormat") + + PropertyTester.TestProperty("ParaRightMargin") + + PropertyTester.TestProperty("ParaLeftMargin") + + PropertyTester.TestProperty("ParaBottomMargin") + + PropertyTester.TestProperty("ParaTopMargin") + + PropertyTester.TestProperty("RotateReference") + + PropertyTester.TestProperty("RotateAngle") + + PropertyTester.TestProperty("Orientation") + + PropertyTester.TestProperty("IsTextWrapped") + + PropertyTester.TestProperty("VertJustify") + + PropertyTester.TestProperty("HoriJustify") + + PropertyTester.TestProperty("CharPostureComplex") + + PropertyTester.TestProperty("CharPostureAsian") + + PropertyTester.TestProperty("CharWeightComplex", aWeightArray()) + + PropertyTester.TestProperty("CharWeightAsian", aWeightArray()) + + PropertyTester.TestProperty("CharHeightComplex", aHeightArray()) + + PropertyTester.TestProperty("CharHeightAsian", aHeightArray()) + + PropertyTester.TestProperty("CharFontPitchComplex") + + PropertyTester.TestProperty("CharFontPitchAsian") + + PropertyTester.TestProperty("CharFontPitch") + + PropertyTester.TestProperty("CharFontFamilyComplex") + + PropertyTester.TestProperty("CharFontFamilyAsian") + + PropertyTester.TestProperty("CharFontFamily") + + PropertyTester.TestProperty("CharFontCharSetComplex") + + PropertyTester.TestProperty("CharFontCharSetAsian") + + PropertyTester.TestProperty("CharFontCharSet") + + PropertyTester.TestProperty("CharFontStyleNameComplex") + + PropertyTester.TestProperty("CharFontStyleNameAsian") + + PropertyTester.TestProperty("CharFontStyleName") + + PropertyTester.TestProperty("CharFontNameComplex") + + PropertyTester.TestProperty("CharFontNameAsian") + + +' + PropertyTester.TestProperty("TableBorder") + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/sheet/TableValidation/script.xlb b/qadevOOo/tests/basic/ifc/sheet/TableValidation/script.xlb new file mode 100644 index 000000000000..b5a1217ee934 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/sheet/TableValidation/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="sheet_TableValidation" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sheet_TableValidation"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/sheet/TableValidation/sheet_TableValidation.xba b/qadevOOo/tests/basic/ifc/sheet/TableValidation/sheet_TableValidation.xba new file mode 100644 index 000000000000..100c51fa0397 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/sheet/TableValidation/sheet_TableValidation.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="sheet_TableValidation" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2000, 2010 Oracle and/or its affiliates. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + +' Be sure that all variables are dimensioned: +option explicit + + + +Sub RunTest() + +'************************************************************************* +' SERVICE: +' com.sun.star.sheet.TableValidation +'************************************************************************* +On Error Goto ErrHndl + + PropertyTester.TestProperty("Type") + + PropertyTester.TestProperty("ShowInputMessage") + + PropertyTester.TestProperty("InputTitle") + + PropertyTester.TestProperty("InputMessage") + + PropertyTester.TestProperty("ShowErrorMessage") + + PropertyTester.TestProperty("ErrorTitle") + + PropertyTester.TestProperty("ErrorMessage") + + PropertyTester.TestProperty("IgnoreBlankCells") + + PropertyTester.TestProperty("ErrorAlertStyle") + +Exit Sub +ErrHndl: + Test.Exception() + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/sheet/XAreaLink/script.xlb b/qadevOOo/tests/basic/ifc/sheet/XAreaLink/script.xlb new file mode 100644 index 000000000000..47d6b97b9722 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/sheet/XAreaLink/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="sheet_XAreaLink" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sheet_XAreaLink"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/sheet/XAreaLink/sheet_XAreaLink.xba b/qadevOOo/tests/basic/ifc/sheet/XAreaLink/sheet_XAreaLink.xba new file mode 100644 index 000000000000..6f3315327c25 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/sheet/XAreaLink/sheet_XAreaLink.xba @@ -0,0 +1,111 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="sheet_XAreaLink" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2000, 2010 Oracle and/or its affiliates. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + + + +Sub RunTest() + +'************************************************************************* +' INTERFACE: +' com.sun.star.sheet.XAreaLink +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + + + Test.StartMethod("getSourceArea()") + bOK = true + Dim cArea As String + cArea = oObj.getSourceArea() + bOK = bOK AND NOT isNULL(cArea) + Test.MethodTested("getSourceArea()", bOK) + + + Test.StartMethod("setSourceArea()") + bOK = true + Dim oldArea As String + Dim newArea As String + oldArea = oObj.getSourceArea() + newArea = "Sheet0.I6:G8" + Out.Log("Set SourceArea to '" & newArea & "'") + oObj.setSourceArea(newArea) + newArea = oObj.getSourceArea() + Out.Log("SourceArea is '" & newArea & "'") + bOK = bOK AND oldArea <> newArea + oObj.setSourceArea(oldArea) + Test.MethodTested("setSourceArea()", bOK) + + Test.StartMethod("getDestArea()") + Dim oArea As Object + bOK = true + oArea = oObj.getDestArea() + bOK = bOK AND NOT isNULL(oArea) + Test.MethodTested("getDestArea()", bOK) + + Test.StartMethod("setDestArea()") + Dim sNewArea As New com.sun.star.table.CellRangeAddress + Dim sOldArea As Object + + bOK = true + sOldArea = oObj.getDestArea() + + sNewArea.Sheet = sOldArea.Sheet + sNewArea.StartRow = sOldArea.StartRow + 1 + sNewArea.StartColumn = sOldArea.StartColumn + 1 + sNewArea.EndRow = sOldArea.EndRow + 1 + sNewArea.EndColumn = sOldArea.EndColumn + 1 + + oObj.setDestArea(sNewArea) + + bOK = bOK AND NOT isNULL(oObj.getDestArea()) + if (bOK) then + bOK = bOK AND (sOldArea.Sheet = oObj.getDestArea.Sheet) + bOK = bOK AND (sOldArea.StartRow = oObj.getDestArea.StartRow - 1) + bOK = bOK AND (sOldArea.StartColumn = oObj.getDestArea.StartColumn - 1) + bOK = bOK AND (sOldArea.EndRow = oObj.getDestArea.EndRow - 1) + bOK = bOK AND (sOldArea.EndColumn = oObj.getDestArea.EndColumn - 1) + end if + + oObj.setDestArea(sOldArea) + + Test.MethodTested("setDestArea()", bOK) + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/sheet/XAreaLinks/script.xlb b/qadevOOo/tests/basic/ifc/sheet/XAreaLinks/script.xlb new file mode 100644 index 000000000000..430bf9a3a93e --- /dev/null +++ b/qadevOOo/tests/basic/ifc/sheet/XAreaLinks/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="sheet_XAreaLinks" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sheet_XAreaLinks"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/sheet/XAreaLinks/sheet_XAreaLinks.xba b/qadevOOo/tests/basic/ifc/sheet/XAreaLinks/sheet_XAreaLinks.xba new file mode 100644 index 000000000000..3e8d9d11354a --- /dev/null +++ b/qadevOOo/tests/basic/ifc/sheet/XAreaLinks/sheet_XAreaLinks.xba @@ -0,0 +1,85 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="sheet_XAreaLinks" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2000, 2010 Oracle and/or its affiliates. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + + + +Sub RunTest() + +'************************************************************************* +' INTERFACE: +' com.sun.star.sheet.XAreaLinks +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + + Test.StartMethod("insertAtPosition()") + bOK = true + 'remembering amount of elements + Dim m_startAmount as Integer + m_startAmount = oObj.Count() + + Dim addr As New com.sun.star.table.CellAddress + addr.Sheet = 0 + addr.Row = 0 + addr.Column = 2 + + Dim mSrcFileName as String + mSrcFileName = utils.Path2URL(cTestDocsDir + "/" + "calcshapes.sxc") + Dim amdstAddresss as String + mdstAddress = "a2:b4" + Dim asmFilter as String + mFilter = "" + Dim mFilterOpts as String + mFilterOpts = "" + oObj.insertAtPosition(addr, mSrcFileName, mdstAddress, mFilter, mFilterOpts) + + bOK = bOK AND (m_startAmount + 1 = oObj.Count) + Test.MethodTested("insertAtPosition()", bOK) + + + Test.StartMethod("removeByIndex()") + bOK = true + oObj.removeByIndex(0) + bOK = bOK AND (oObj.Count = m_startAmount) + Test.MethodTested("removeByIndex()", bOK) + + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/sheet/XArrayFormulaRange/script.xlb b/qadevOOo/tests/basic/ifc/sheet/XArrayFormulaRange/script.xlb new file mode 100644 index 000000000000..301683569797 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/sheet/XArrayFormulaRange/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="sheet_XArrayFormulaRange" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sheet_XArrayFormulaRange"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/sheet/XArrayFormulaRange/sheet_XArrayFormulaRange.xba b/qadevOOo/tests/basic/ifc/sheet/XArrayFormulaRange/sheet_XArrayFormulaRange.xba new file mode 100644 index 000000000000..120aa4b65033 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/sheet/XArrayFormulaRange/sheet_XArrayFormulaRange.xba @@ -0,0 +1,85 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="sheet_XArrayFormulaRange" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2000, 2010 Oracle and/or its affiliates. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + +' Be sure that all variables are dimensioned: +option explicit + + + +Sub RunTest() + +'************************************************************************* +' INTERFACE: +' com.sun.star.sheet.XArrayFormulaRange +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim bExpectedException As Boolean + + Test.StartMethod("setArrayFormula()") + Test.StartMethod("getArrayFormula()") + bOK = true + + if (cObjectName = "sc.ScTableSheetObj") then + bExpectedException = true + oObj.setArrayFormula("=1+2") + wait(1) ' additional operator should exists here to avoid + ' resuming on 'else' after exception handling + else + oObj.setArrayFormula("=1+2") + bOK = bOK AND (oObj.getArrayFormula() = "{=1+2}") + Out.Log("2") + end if + + ' Setting of _empty_ formula should work for all objects. + bExpectedException = false + oObj.setArrayFormula("") + bOK = bOK AND (oObj.getArrayFormula() = "") + + Test.MethodTested("getArrayFormula()", bOK) + Test.MethodTested("setArrayFormula()", bOK) + +Exit Sub +ErrHndl: + if (bExpectedException) then + Out.Log("It doesn't make sense to set formula over whole page.") + Out.Log("Expected exception: " & error) + else + Test.Exception() + bOK = false + end if + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/sheet/XCellAddressable/script.xlb b/qadevOOo/tests/basic/ifc/sheet/XCellAddressable/script.xlb new file mode 100644 index 000000000000..892840f8d8e2 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/sheet/XCellAddressable/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="sheet_XCellAddressable" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sheet_XCellAddressable"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/sheet/XCellAddressable/sheet_XCellAddressable.xba b/qadevOOo/tests/basic/ifc/sheet/XCellAddressable/sheet_XCellAddressable.xba new file mode 100644 index 000000000000..7f00430ae466 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/sheet/XCellAddressable/sheet_XCellAddressable.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="sheet_XCellAddressable" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2000, 2010 Oracle and/or its affiliates. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + +' Be sure that all variables are dimensioned: +option explicit + + + +Sub RunTest() + +'************************************************************************* +' INTERFACE: +' com.sun.star.sheet.XCellAddressable +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim vCellAddress As Variant + + Test.StartMethod("getCellAddress()") + bOK = true + vCellAddress = oObj.getCellAddress() + bOK = bOK AND isNumeric(vCellAddress.Row) + Test.MethodTested("getCellAddress()", bOK) + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/sheet/XCellRangeAddressable/script.xlb b/qadevOOo/tests/basic/ifc/sheet/XCellRangeAddressable/script.xlb new file mode 100644 index 000000000000..e72e1f1f4a52 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/sheet/XCellRangeAddressable/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="sheet_XCellRangeAddressable" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sheet_XCellRangeAddressable"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/sheet/XCellRangeAddressable/sheet_XCellRangeAddressable.xba b/qadevOOo/tests/basic/ifc/sheet/XCellRangeAddressable/sheet_XCellRangeAddressable.xba new file mode 100644 index 000000000000..d5f063b3c7e4 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/sheet/XCellRangeAddressable/sheet_XCellRangeAddressable.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="sheet_XCellRangeAddressable" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2000, 2010 Oracle and/or its affiliates. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + +' Be sure that all variables are dimensioned: +option explicit + + + +Sub RunTest() + +'************************************************************************* +' INTERFACE: +' com.sun.star.sheet.XCellRangeAddressable +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim oAddress As Variant + + Test.StartMethod("getRangeAddress()") + bOK = true + oAddress = oObj.getRangeAddress() + bOK = bOK AND isNumeric(oAddress.Sheet) + bOK = bOK AND isNumeric(oAddress.StartColumn) + bOK = bOK AND isNumeric(oAddress.EndColumn) + bOK = bOK AND isNumeric(oAddress.StartRow) + bOK = bOK AND isNumeric(oAddress.EndRow) + Test.MethodTested("getRangeAddress()", bOK) + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/sheet/XCellRangeData/script.xlb b/qadevOOo/tests/basic/ifc/sheet/XCellRangeData/script.xlb new file mode 100644 index 000000000000..9112c7c9b7f2 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/sheet/XCellRangeData/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="sheet_XCellRangeData" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sheet_XCellRangeData"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/sheet/XCellRangeData/sheet_XCellRangeData.xba b/qadevOOo/tests/basic/ifc/sheet/XCellRangeData/sheet_XCellRangeData.xba new file mode 100644 index 000000000000..f6114d09437a --- /dev/null +++ b/qadevOOo/tests/basic/ifc/sheet/XCellRangeData/sheet_XCellRangeData.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="sheet_XCellRangeData" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2000, 2010 Oracle and/or its affiliates. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + +' Be sure that all variables are dimensioned: +option explicit + +'************************************************************************* +' This Interface/Service test depends on the following GLOBAL variables, +' which must be specified in the object creation: + +'Global newData As Variant + +'************************************************************************* + +Sub RunTest() + +'************************************************************************* +' INTERFACE: +' com.sun.star.sheet.XCellRangeData +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim data As Variant + Dim myNewData as Variant + + Test.StartMethod("getDataArray()") + data = oObj.getDataArray() + bOK = Not IsEmpty(data) AND ubound(data) > 0 + Test.MethodTested("getDataArray()", bOK) + + Test.StartMethod("setDataArray()") + oObj.setDataArray(createUnoValue("[][]any",newData)) + data = oObj.getDataArray() + bOK = equals(data, newData) + Test.MethodTested("setDataArray()", bOK) +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/sheet/XCellRangeMovement/script.xlb b/qadevOOo/tests/basic/ifc/sheet/XCellRangeMovement/script.xlb new file mode 100644 index 000000000000..ae74228d9729 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/sheet/XCellRangeMovement/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="sheet_XCellRangeMovement" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sheet_XCellRangeMovement"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/sheet/XCellRangeMovement/sheet_XCellRangeMovement.xba b/qadevOOo/tests/basic/ifc/sheet/XCellRangeMovement/sheet_XCellRangeMovement.xba new file mode 100644 index 000000000000..8d420350ce38 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/sheet/XCellRangeMovement/sheet_XCellRangeMovement.xba @@ -0,0 +1,167 @@ +<?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="sheet_XCellRangeMovement" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2000, 2010 Oracle and/or its affiliates. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + + + +Sub RunTest() + +'************************************************************************* +' INTERFACE: +' com.sun.star.sheet.XCellRangeMovement +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + + Out.Log("Prepearing test...") + for i = 0 to 5 + for j = 0 to 5 + oObj.getCellByPosition(j, i).Value = i * 6 + j + next j + next i + + Test.StartMethod("insertCells()") + bOK = true + Dim newCellAddress As New com.sun.star.table.CellRangeAddress + newCellAddress.Sheet = 0 + newCellAddress.StartColumn = 1 + newCellAddress.StartRow = 1 + newCellAddress.EndColumn = 1 + newCellAddress.EndRow = 1 + oObj.insertCells(newCellAddress, com.sun.star.sheet.CellInsertMode.DOWN) + bOK = bOK AND oObj.getCellByPosition(1, 1).String = "" + bOK = bOK AND oObj.getCellByPosition(2, 2).Value = 14 + bOK = bOK AND oObj.getCellByPosition(1, 2).Value = 7 + bOK = bOK AND oObj.getCellByPosition(0, 2).Value = 12 + + oObj.insertCells(newCellAddress, com.sun.star.sheet.CellInsertMode.RIGHT) + bOK = bOK AND oObj.getCellByPosition(1, 1).String = "" + bOK = bOK AND oObj.getCellByPosition(3, 0).Value = 3 + bOK = bOK AND oObj.getCellByPosition(3, 1).Value = 8 + bOK = bOK AND oObj.getCellByPosition(3, 2).Value = 15 + + oObj.insertCells(newCellAddress, com.sun.star.sheet.CellInsertMode.ROWS) + bOK = bOK AND oObj.getCellByPosition(1, 1).String = "" + bOK = bOK AND oObj.getCellByPosition(4, 0).Value = 4 + bOK = bOK AND oObj.getCellByPosition(4, 1).String = "" + bOK = bOK AND oObj.getCellByPosition(4, 2).Value = 9 + + oObj.insertCells(newCellAddress, com.sun.star.sheet.CellInsertMode.COLUMNS) + bOK = bOK AND oObj.getCellByPosition(1, 1).String = "" + bOK = bOK AND oObj.getCellByPosition(0, 5).Value = 24 + bOK = bOK AND oObj.getCellByPosition(1, 5).String = "" + bOK = bOK AND oObj.getCellByPosition(2, 5).Value = 19 + + Test.MethodTested("insertCells()", bOK) + + Test.StartMethod("removeRange()") + bOK = true + oObj.removeRange(newCellAddress, com.sun.star.sheet.CellDeleteMode.ROWS) + bOK = bOK AND oObj.getCellByPosition(1, 1).String = "" + bOK = bOK AND oObj.getCellByPosition(4, 0).Value = 3 + bOK = bOK AND oObj.getCellByPosition(4, 1).Value = 8 + bOK = bOK AND oObj.getCellByPosition(4, 2).Value = 15 + + oObj.removeRange(newCellAddress, com.sun.star.sheet.CellDeleteMode.COLUMNS) + bOK = bOK AND oObj.getCellByPosition(1, 1).String = "" + bOK = bOK AND oObj.getCellByPosition(4, 0).Value = 4 + bOK = bOK AND oObj.getCellByPosition(4, 1).Value = 9 + bOK = bOK AND oObj.getCellByPosition(4, 2).Value = 16 + + oObj.removeRange(newCellAddress, com.sun.star.sheet.CellDeleteMode.UP) + bOK = bOK AND oObj.getCellByPosition(1, 1).Value = 7 + bOK = bOK AND oObj.getCellByPosition(1, 2).Value = 13 + bOK = bOK AND oObj.getCellByPosition(1, 3).Value = 19 + bOK = bOK AND oObj.getCellByPosition(0, 3).Value = 18 + + oObj.removeRange(newCellAddress, com.sun.star.sheet.CellDeleteMode.LEFT) + bOK = bOK AND oObj.getCellByPosition(1, 1).String = "" + bOK = bOK AND oObj.getCellByPosition(0, 1).Value = 6 + bOK = bOK AND oObj.getCellByPosition(1, 1).String = "" + bOK = bOK AND oObj.getCellByPosition(2, 1).Value = 8 + + Test.MethodTested("removeRange()", bOK) + + Test.StartMethod("moveRange()") + bOK = true + newCellAddress.Sheet = 0 + newCellAddress.StartColumn = 0 + newCellAddress.StartRow = 0 + newCellAddress.EndColumn = 1 + newCellAddress.EndRow = 1 + Dim sCell As New com.sun.star.table.CellAddress + sCell.Sheet = 0 + sCell.Column = 3 + sCell.Row = 3 + oObj.moveRange(sCell, newCellAddress) + + bOK = bOK AND oObj.getCellByPosition(0, 0).String = "" + bOK = bOK AND oObj.getCellByPosition(1, 0).String = "" + bOK = bOK AND oObj.getCellByPosition(0, 1).String = "" + bOK = bOK AND oObj.getCellByPosition(1, 1).String = "" + + bOK = bOK AND oObj.getCellByPosition(3, 3).Value = 0 + bOK = bOK AND oObj.getCellByPosition(3, 4).Value = 6 + bOK = bOK AND oObj.getCellByPosition(4, 3).Value = 1 + bOK = bOK AND oObj.getCellByPosition(4, 4).String = "" + + Test.MethodTested("moveRange()", bOK) + + Test.StartMethod("copyRange()") + bOK = true + newCellAddress.Sheet = 0 + newCellAddress.StartColumn = 2 + newCellAddress.StartRow = 2 + newCellAddress.EndColumn = 3 + newCellAddress.EndRow = 3 + sCell.Sheet = 0 + sCell.Column = 0 + sCell.Row = 0 + + oObj.copyRange(sCell, newCellAddress) + + bOK = bOK AND oObj.getCellByPosition(0, 0).Value = oObj.getCellByPosition(2, 2).Value + bOK = bOK AND oObj.getCellByPosition(0, 1).Value = oObj.getCellByPosition(2, 3).Value + bOK = bOK AND oObj.getCellByPosition(1, 0).Value = oObj.getCellByPosition(3, 2).Value + bOK = bOK AND oObj.getCellByPosition(1, 1).Value = oObj.getCellByPosition(3, 3).Value + + Test.MethodTested("copyRange()", bOK) + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/sheet/XCellRangeReferrer/script.xlb b/qadevOOo/tests/basic/ifc/sheet/XCellRangeReferrer/script.xlb new file mode 100644 index 000000000000..579888e295a3 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/sheet/XCellRangeReferrer/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="sheet_XCellRangeReferrer" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sheet_XCellRangeReferrer"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/sheet/XCellRangeReferrer/sheet_XCellRangeReferrer.xba b/qadevOOo/tests/basic/ifc/sheet/XCellRangeReferrer/sheet_XCellRangeReferrer.xba new file mode 100644 index 000000000000..7a41e77309c5 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/sheet/XCellRangeReferrer/sheet_XCellRangeReferrer.xba @@ -0,0 +1,92 @@ +<?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="sheet_XCellRangeReferrer" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2000, 2010 Oracle and/or its affiliates. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + +' Be sure that all variables are dimensioned: +option explicit + +'************************************************************************* +' This Interface/Service test depends on the following GLOBAL variables, +' which must be specified in the object creation: + +' - Global oReferredCells As New com.sun.star.table.CellRangeAddress + +'************************************************************************* + + + + + + +Sub RunTest() + +'************************************************************************* +' INTERFACE: +' com.sun.star.sheet.XCellRangeReferrer +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim refCells As Object + + Test.StartMethod("getReferredCells()") + bOK = true + refCells = oObj.ReferredCells.getRangeAddress() + bOK = NOT isNULL(refCells) + bOK = bOK AND refCells.Sheet = oReferredCells.Sheet + bOK = bOK AND refCells.StartRow = oReferredCells.StartRow + bOK = bOK AND refCells.EndRow = oReferredCells.EndRow + bOK = bOK AND refCells.StartColumn = oReferredCells.StartColumn + bOK = bOK AND refCells.EndColumn = oReferredCells.EndColumn + + if NOT(bOK) then + Out.Log("Global oReferredCells var is: (" & oReferredCells.Sheet & "," _ + & oReferredCells.StartRow & "," _ + & oReferredCells.StartColumn & "," _ + & oReferredCells.EndRow & "," _ + & oReferredCells.EndColumn & ")") + Out.Log("Local var is: (" & refCells.Sheet & "," _ + & refCells.StartRow & "," _ + & refCells.StartColumn & "," _ + & refCells.EndRow & "," _ + & refCells.EndColumn & ")") + end if + Test.MethodTested("getReferredCells()", bOK) + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/sheet/XCellSeries/script.xlb b/qadevOOo/tests/basic/ifc/sheet/XCellSeries/script.xlb new file mode 100644 index 000000000000..b75c980df466 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/sheet/XCellSeries/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="sheet_XCellSeries" library:readonly="false" library:passwordprotected="false"> + <library:element library:name="sheet_XCellSeries"/> + </library:library> diff --git a/qadevOOo/tests/basic/ifc/sheet/XCellSeries/sheet_XCellSeries.xba b/qadevOOo/tests/basic/ifc/sheet/XCellSeries/sheet_XCellSeries.xba new file mode 100644 index 000000000000..7005d9886b6f --- /dev/null +++ b/qadevOOo/tests/basic/ifc/sheet/XCellSeries/sheet_XCellSeries.xba @@ -0,0 +1,126 @@ +<?xml version="1.0" encoding="UTF-8"?> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="sheet_XCellSeries" script:language="StarBasic"> + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2000, 2010 Oracle and/or its affiliates. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + +'************************************************************************* +' This Interface/Service test depends on the following GLOBAL variables, +' which must be specified in the object creation: + +' - Global aCellSeries(1) As Integer +' aCellSeries(0) = amount of rows of range +' aCellSeries(1) = amount of columns of range + +'************************************************************************* + +' Be sure that all variables are dimensioned: +option explicit + +Sub RunTest() + +'************************************************************************* +' INTERFACE: +' com.sun.star.sheet.XCellSeries +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim startValue as Integer + Dim nStep as Integer + Dim shouldValue as Integer + Dim filledValue as Integer + Dim endCell(2) as Integer + Dim n as Integer, m as Integer + + startValue = 5 + nStep = 2 + + ' if 'nStep' is not a divisor of 'aCellSeries' it must be calculated + ' the last filled cell + for n = 0 to 1 + if (aCellSeries(n) mod nStep) <> 0 then + endCell(n) = aCellSeries(n) - (nStep-1) + else + endCell(n) = aCellSeries(n) + end if + next n + 'make clean cells + for n = 0 to endCell(0) + for m = 0 to endCell(1) + oObj.getCellByPosition(n,m).setString("") + next + next + 'set defined start value + oObj.getCellByPosition(0,0).setValue(startValue) + Test.StartMethod("fillAuto()") + bOK = TRUE + oObj.fillAuto(com.sun.star.sheet.FillDirection.TO_BOTTOM, nStep) + shouldValue = endCell(0) / nStep + startValue + filledValue = oObj.getCellByPosition(0,endCell(0)).getValue() + bOK = bOK AND ( shouldValue = filledValue ) + out.log("" + shouldValue + ":" + filledValue) + Test.MethodTested("fillAuto()", bOK) + + + Test.StartMethod("fillSeries()") + bOK = TRUE + out.log("fillSeries() 1/3") + oObj.fillSeries(com.sun.star.sheet.FillDirection.TO_BOTTOM, _ + com.sun.star.sheet.FillMode.LINEAR, _ + com.sun.star.sheet.FillDateMode.FILL_DATE_DAY, nStep, 20000000) + shouldValue = endCell(0) * nStep + startValue + filledValue = oObj.getCellByPosition(0,endCell(0)).getValue() + bOK = bOK and (shouldValue = filledValue) + + out.log("fillSeries() 2/3") + oObj.fillSeries(com.sun.star.sheet.FillDirection.TO_RIGHT, _ + com.sun.star.sheet.FillMode.LINEAR, _ + com.sun.star.sheet.FillDateMode.FILL_DATE_DAY, nStep, 20000000) + shouldValue = endCell(1) * nStep + startValue + filledValue = oObj.getCellByPosition(endCell(1),0).getValue() + bOK = bOK and (shouldValue = filledValue) + + + out.log("fillSeries() 3/3") + oObj.fillSeries(com.sun.star.sheet.FillDirection.TO_BOTTOM, _ + com.sun.star.sheet.FillMode.GROWTH, _ + com.sun.star.sheet.FillDateMode.FILL_DATE_DAY, nStep, 20000000) + shouldValue = startValue * nStep ^ endCell(0) + filledValue = oObj.getCellByPosition(0,endCell(0)).getValue() + bOK = bOK and (shouldValue = filledValue) + + Test.MethodTested("fillSeries()", bOK) + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/sheet/XConsolidationDescriptor/script.xlb b/qadevOOo/tests/basic/ifc/sheet/XConsolidationDescriptor/script.xlb new file mode 100644 index 000000000000..c5f0520146ca --- /dev/null +++ b/qadevOOo/tests/basic/ifc/sheet/XConsolidationDescriptor/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="sheet_XConsolidationDescriptor" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sheet_XConsolidationDescriptor"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/sheet/XConsolidationDescriptor/sheet_XConsolidationDescriptor.xba b/qadevOOo/tests/basic/ifc/sheet/XConsolidationDescriptor/sheet_XConsolidationDescriptor.xba new file mode 100644 index 000000000000..426050dedc32 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/sheet/XConsolidationDescriptor/sheet_XConsolidationDescriptor.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="sheet_XConsolidationDescriptor" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2000, 2010 Oracle and/or its affiliates. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + +' Be sure that all variables are dimensioned: +option explicit + + + +Sub RunTest() + +'************************************************************************* +' INTERFACE: +' com.sun.star.sheet.XConsolidationDescriptor +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim mStartPos, objpos As Variant + Dim bUseCols, bUseRows, bUsed, bLinks As Boolean + Dim src(0) As New com.sun.star.table.CellRangeAddress + Dim outpos As New com.sun.star.table.CellAddress + Dim objSrc() As Variant + + Test.StartMethod("getFunction()") + bOK = true + bOK = bOK AND NOT IsNULL(oObj.Function) + Test.MethodTested("getFunction()", bOK) + + Test.StartMethod("getSources()") + bOK = true + bOK = bOK AND NOT isNULL(oObj.getSources()) + Test.MethodTested("getSources()", bOK) + + Test.StartMethod("getStartOutputPosition()") + bOK = true + mStartPos = oObj.getStartOutputPosition() + bOK = mStartPos.Row >= 0 ' Checking that returned type is correct + ' (if Object has such field) + Test.MethodTested("getStartOutputPosition()", bOK) + + Test.StartMethod("getUseRowHeaders()") + Test.StartMethod("setUseRowHeaders()") + bOK = true + bUsed = oObj.getUseRowHeaders + oObj.setUseRowHeaders(NOT bUsed) + bOK = bOK AND (oObj.getUseRowHeaders <> bUsed) + Test.MethodTested("getUseRowHeaders()", bOK) + Test.MethodTested("setUseRowHeaders()", bOK) + + Test.StartMethod("setFunction()") + bOK = true + oObj.setFunction(com.sun.star.sheet.GeneralFunction.MAX) + bOK = bOK AND (oObj.getFunction = com.sun.star.sheet.GeneralFunction.MAX) + Test.MethodTested("setFunction()", bOK) + + Test.StartMethod("getInsertLinks()") + Test.StartMethod("setInsertLinks()") + bOK = true + bLinks = oObj.getInsertLinks + oObj.setInsertLinks(NOT bLinks) + bOK = bOK AND (oObj.getInsertLinks <> bLinks) + Test.MethodTested("getInsertLinks()", bOK) + Test.MethodTested("setInsertLinks()", bOK) + + Test.StartMethod("setSources()") + bOK = true + src(0).Sheet = 0 + src(0).StartRow = 5 + src(0).StartColumn = 5 + src(0).EndRow = 10 + src(0).EndColumn = 10 + oObj.setSources(src()) + objSrc() = oObj.getSources + bOK = bOK AND ((objSrc(0).Sheet = src(0).Sheet) AND _ + (objSrc(0).StartRow = src(0).StartRow) AND _ + (objSrc(0).EndRow = src(0).EndRow) AND _ + (objSrc(0).StartColumn = src(0).StartColumn) AND _ + (objSrc(0).EndColumn = src(0).EndColumn)) + Test.MethodTested("setSources()", bOK) + + Test.StartMethod("setStartOutputPosition()") + bOK = true + outpos.Sheet = 0 + outpos.Row = 2 + outpos.Column = 2 + oObj.setStartOutputPosition(outpos) + objpos = oObj.getStartOutputPosition + bOK = bOK AND ((objpos(0).Sheet = outpos(0).Sheet) AND _ + (objpos(0).Row = outpos(0).Row) AND _ + (objpos(0).Column = outpos(0).Column)) + Test.MethodTested("setStartOutputPosition()", bOK) + + Test.StartMethod("getUseColumnHeaders()") + bOK = true + bUseCols = oObj.getUseColumnHeaders() + oObj.setUseColumnHeaders(NOT bUseCols) + bOK = bOK AND (oObj.getUseColumnHeaders() <> bUseCols) + Test.MethodTested("getUseColumnHeaders()", bOK) + + Test.StartMethod("setUseColumnHeaders()") + bOK = true + bUseRows = oObj.getUseRowHeaders + oObj.setUseRowHeaders(NOT bUseRows) + bOK = bOK AND (oObj.getUseRowHeaders <> bUseRows) + Test.MethodTested("setUseColumnHeaders()", bOK) + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/sheet/XDDELink/script.xlb b/qadevOOo/tests/basic/ifc/sheet/XDDELink/script.xlb new file mode 100644 index 000000000000..b045e20e2e69 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/sheet/XDDELink/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="sheet_XDDELink" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sheet_XDDELink"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/sheet/XDDELink/sheet_XDDELink.xba b/qadevOOo/tests/basic/ifc/sheet/XDDELink/sheet_XDDELink.xba new file mode 100644 index 000000000000..9b0f8e94fa82 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/sheet/XDDELink/sheet_XDDELink.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="sheet_XDDELink" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2000, 2010 Oracle and/or its affiliates. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + +' Be sure that all variables are dimensioned: +option explicit + +'************************************************************************* +' This Interface/Service test depends on the following GLOBAL variables, +' which must be specified in the object creation: + +' - Global DDETopic As String +' - Global DDEApplication As String +' - Global DDEItem As String + +'************************************************************************* + + + + + + +Sub RunTest() + +'************************************************************************* +' INTERFACE: +' com.sun.star.sheet.XDDELink +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + + Test.StartMethod("getApplication()") + bOK = true + bOK = bOK AND NOT isNULL(oObj.getApplication) AND (oObj.getApplication = DDEApplication) + Test.MethodTested("getApplication()", bOK) + + Test.StartMethod("getTopic()") + bOK = true + bOK = bOK AND NOT isNULL(oObj.getTopic) AND (oObj.getTopic = DDETopic) + Test.MethodTested("getTopic()", bOK) + + Test.StartMethod("getItem()") + bOK = true + bOK = bOK AND NOT isNULL(oObj.getItem) AND (oObj.getItem = DDEItem) + Test.MethodTested("getItem()", bOK) + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/sheet/XDataPilotDescriptor/script.xlb b/qadevOOo/tests/basic/ifc/sheet/XDataPilotDescriptor/script.xlb new file mode 100644 index 000000000000..303178ad2b29 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/sheet/XDataPilotDescriptor/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="sheet_XDataPilotDescriptor" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sheet_XDataPilotDescriptor"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/sheet/XDataPilotDescriptor/sheet_XDataPilotDescriptor.xba b/qadevOOo/tests/basic/ifc/sheet/XDataPilotDescriptor/sheet_XDataPilotDescriptor.xba new file mode 100644 index 000000000000..97fecf3af2e4 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/sheet/XDataPilotDescriptor/sheet_XDataPilotDescriptor.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="sheet_XDataPilotDescriptor" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2000, 2010 Oracle and/or its affiliates. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + +' Be sure that all variables are dimensioned: +option explicit + + + +Sub RunTest() + +'************************************************************************* +' INTERFACE: +' com.sun.star.sheet.XDataPilotDescriptor +'************************************************************************* +On Error Goto ErrHndl + Dim bOK, bOK1 As Boolean + Dim Tag, oldTag As String + Dim oldRange, newRange, FD As Object + Dim Range As New com.sun.star.table.CellRangeAddress + Dim Fields() As Object + + Test.StartMethod("getTag()") + bOK = true + bOK = bOK AND NOT isNULL(oObj.getTag()) + Test.MethodTested("getTag()", bOK) + + Test.StartMethod("setTag()") + bOK = true + Tag = cIfcShortName + oldTag = oObj.getTag() + oObj.SetTag(Tag) + bOK = bOK AND (oldTag <> oObj.getTag()) + oObj.setTag(oldTag) + Test.MethodTested("setTag()", bOK) + + Test.StartMethod("getSourceRange()") + bOK = true + bOK = bOK AND NOT isNULL(oObj.getSourceRange()) + Test.MethodTested("getSourceRange()", bOK) + + Test.StartMethod("setSourceRange()") + bOK = true + Range.Sheet = 0 + Range.StartColumn = 1 + Range.StartRow = 1 + Range.EndColumn = 4 + Range.EndRow = 4 + + oldRange = oObj.getSourceRange + oObj.setSourceRange(Range) + newRange = oObj.getSourceRange + bOK1 = false + bOK1 = bOK1 OR newRange.Sheet <> oldRange.Sheet + bOK1 = bOK1 OR newRange.StartColumn <> oldRange.StartColumn + bOK1 = bOK1 OR newRange.EndColumn <> oldRange.EndColumn + bOK1 = bOK1 OR newRange.StartRow <> oldRange.StartRow + bOK1 = bOK1 OR newRange.EndRow <> oldRange.EndRow + bOK = bOK AND bOK1 + + oObj.setSourceRange(oldRange) + Test.MethodTested("setSourceRange()", bOK) + + Test.StartMethod("getFilterDescriptor()") + bOK = true + FD = oObj.getFilterDescriptor + bOK = (NOT isNULL(FD)) AND (ubound(FD.getFilterFields) > 0) + Test.MethodTested("getFilterDescriptor()", bOK) + + Test.StartMethod("getDataPilotFields()") + bOK = true + Fields = oObj.getDataPilotFields + bOK = NOT isNULL(Fields) + Test.MethodTested("getDataPilotFields()", bOK) + + Test.StartMethod("getColumnFields()") + bOK = true + Fields = oObj.getColumnFields + bOK = NOT isNULL(Fields) + Test.MethodTested("getColumnFields()", bOK) + + Test.StartMethod("getRowFields()") + bOK = true + Fields = oObj.getRowFields + bOK = NOT isNULL(Fields) + Test.MethodTested("getRowFields()", bOK) + + Test.StartMethod("getPageFields()") + bOK = true + Fields = oObj.getPageFields() + bOK = NOT isNULL(Fields) + Test.MethodTested("getPageFields()", bOK) + + Test.StartMethod("getDataFields()") + bOK = true + Fields = oObj.getDataFields + bOK = bOK AND NOT isNULL(Fields) + Test.MethodTested("getDataFields()", bOK) + + Test.StartMethod("getHiddenFields()") + bOK = true + Fields = oObj.getHiddenFields() + bOK = NOT isNULL(Fields) + Test.MethodTested("getHiddenFields()", bOK) + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/sheet/XDataPilotTable/script.xlb b/qadevOOo/tests/basic/ifc/sheet/XDataPilotTable/script.xlb new file mode 100644 index 000000000000..5edf552cd579 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/sheet/XDataPilotTable/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="sheet_XDataPilotTable" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sheet_XDataPilotTable"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/sheet/XDataPilotTable/sheet_XDataPilotTable.xba b/qadevOOo/tests/basic/ifc/sheet/XDataPilotTable/sheet_XDataPilotTable.xba new file mode 100644 index 000000000000..e2d7d1c517eb --- /dev/null +++ b/qadevOOo/tests/basic/ifc/sheet/XDataPilotTable/sheet_XDataPilotTable.xba @@ -0,0 +1,92 @@ +<?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="sheet_XDataPilotTable" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2000, 2010 Oracle and/or its affiliates. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + +' Be sure that all variables are dimensioned: +option explicit + +'************************************************************************* +' This Interface/Service test depends on the following GLOBAL variables, +' which must be specified in the object creation: + +' - Global oOutputRange As New com.sun.star.table.CellAddress + +'************************************************************************* + + + + + + +Sub RunTest() + +'************************************************************************* +' INTERFACE: +' com.sun.star.sheet.XDataPilotTable +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim Range, oSheet As Object + Dim oldData, newData, CellRow, CellCol As Integer + + Test.StartMethod("getOutputRange()") + bOK = true + Range = oObj.getOutputRange() + bOK = bOK AND NOT isNULL(Range) + if (bOK) then + bOK = bOK AND Range.Sheet = oOutputRange.Sheet + bOK = bOK AND Range.StartRow = oOutputRange.Row + bOK = bOK AND Range.StartColumn = oOutputRange.Column + end if + Test.MethodTested("getOutputRange()", bOK) + + Test.StartMethod("refresh()") + bOK = true + CellRow = oObj.getSourceRange.EndRow + CellCol = oObj.getSourceRange.EndColumn + oSheet = oDoc.Sheets.getByIndex(0) + oSheet.getCellByPosition(CellCol, CellRow).Value = 5 + oldData = oSheet.getCellByPosition(oOutputRange.Column, oOutputRange.Row+3).Value + oObj.refresh() + newData = oSheet.getCellByPosition(oOutputRange.Column, oOutputRange.Row+3).Value + bOK = bOK AND (oldData <> newData) + Test.MethodTested("refresh()", bOK) + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/sheet/XDataPilotTables/script.xlb b/qadevOOo/tests/basic/ifc/sheet/XDataPilotTables/script.xlb new file mode 100644 index 000000000000..2e5439e882be --- /dev/null +++ b/qadevOOo/tests/basic/ifc/sheet/XDataPilotTables/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="sheet_XDataPilotTables" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sheet_XDataPilotTables"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/sheet/XDataPilotTables/sheet_XDataPilotTables.xba b/qadevOOo/tests/basic/ifc/sheet/XDataPilotTables/sheet_XDataPilotTables.xba new file mode 100644 index 000000000000..fb343083c4fe --- /dev/null +++ b/qadevOOo/tests/basic/ifc/sheet/XDataPilotTables/sheet_XDataPilotTables.xba @@ -0,0 +1,88 @@ +<?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="sheet_XDataPilotTables" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2000, 2010 Oracle and/or its affiliates. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + +' Be sure that all variables are dimensioned: +option explicit + + + +Sub RunTest() + +'************************************************************************* +' INTERFACE: +' com.sun.star.sheet.XDataPilotTables +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim DSC As Object + Dim DSCcreated As Boolean + Dim count As Long + + Test.StartMethod("createDataPilotDescriptor()") + bOK = true + DSC = oObj.createDataPilotDescriptor() + bOK = bOK AND not isNull(DSC) + DSCcreated = bOK + Test.MethodTested("createDataPilotDescriptor()", bOK) + + Test.StartMethod("insertNewByName()") + bOK = true + if (DSCcreated) then + count = oObj.Count + Dim Address As New com.sun.star.table.CellAddress + Address.Sheet = 0 + Address.Column = 10 + Address.Row = 10 + oObj.insertNewByName(cIfcShortName & "insertNewByName", Address, DSC) + bOK = bOK AND oObj.Count = count + 1 + end if + Test.MethodTested("insertNewByName()", bOK) + + Test.StartMethod("removeByName()") + bOK = true + if (DSCcreated) then + count = oObj.Count + oObj.removeByName(cIfcShortName & "insertNewByName") + bOK = oObj.Count = count - 1 + end if + Test.MethodTested("removeByName()", bOK) + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/sheet/XDataPilotTablesSupplier/script.xlb b/qadevOOo/tests/basic/ifc/sheet/XDataPilotTablesSupplier/script.xlb new file mode 100644 index 000000000000..9bc02996a2a8 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/sheet/XDataPilotTablesSupplier/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="sheet_XDataPilotTablesSupplier" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sheet_XDataPilotTablesSupplier"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/sheet/XDataPilotTablesSupplier/sheet_XDataPilotTablesSupplier.xba b/qadevOOo/tests/basic/ifc/sheet/XDataPilotTablesSupplier/sheet_XDataPilotTablesSupplier.xba new file mode 100644 index 000000000000..fd7bb7476312 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/sheet/XDataPilotTablesSupplier/sheet_XDataPilotTablesSupplier.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="sheet_XDataPilotTablesSupplier" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2000, 2010 Oracle and/or its affiliates. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + + + +Sub RunTest() + +'************************************************************************* +' INTERFACE: +' com.sun.star.sheet.XDataPilotTablesSupplier +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + + + Test.StartMethod("getDataPilotTables()") + bOK = true + oDPT = oObj.getDataPilotTables() + bOK = bOK AND hasUnoInterfaces(oDPT, "com.sun.star.sheet.XDataPilotTables") + Test.MethodTested("getDataPilotTables()", bOK) + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/sheet/XDatabaseRange/script.xlb b/qadevOOo/tests/basic/ifc/sheet/XDatabaseRange/script.xlb new file mode 100644 index 000000000000..0211247cd414 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/sheet/XDatabaseRange/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="sheet_XDatabaseRange" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sheet_XDatabaseRange"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/sheet/XDatabaseRange/sheet_XDatabaseRange.xba b/qadevOOo/tests/basic/ifc/sheet/XDatabaseRange/sheet_XDatabaseRange.xba new file mode 100644 index 000000000000..be1d5b906306 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/sheet/XDatabaseRange/sheet_XDatabaseRange.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="sheet_XDatabaseRange" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2000, 2010 Oracle and/or its affiliates. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + +' Be sure that all variables are dimensioned: +option explicit + + + +Sub RunTest() + +'************************************************************************* +' INTERFACE: +' com.sun.star.sheet.XDatabaseRange +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim oldDA, oSD, oFD, oID, oSTD As Object + Dim newDA As New com.sun.star.table.CellRangeAddress + + Test.StartMethod("getDataArea()") + Test.StartMethod("setDataArea()") + bOK = true + oldDA = oObj.getDataArea() + newDA.Sheet = 0 + newDA.StartColumn = 5 + newDA.StartRow = 6 + newDA.EndColumn = 10 + newDA.EndRow = 8 + oObj.setDataArea(newDA) + bOK = bOK AND oObj.getDataArea().Sheet = newDA.Sheet + bOK = bOK AND oObj.getDataArea().StartColumn = newDA.StartColumn + bOK = bOK AND oObj.getDataArea().StartRow = newDA.StartRow + bOK = bOK AND oObj.getDataArea().EndColumn = newDA.EndColumn + bOK = bOK AND oObj.getDataArea().EndRow = newDA.EndRow + oObj.setDataArea(oldDA) + Test.MethodTested("getDataArea()", bOK) + Test.MethodTested("setDataArea()", bOK) + + Test.StartMethod("getSortDescriptor()") + bOK = true + oSD = oObj.getSortDescriptor() + bOK = bOK AND isArray(oSD) + Test.MethodTested("getSortDescriptor()", bOK) + + Test.StartMethod("getFilterDescriptor()") + bOK = true + oFD = oObj.getFilterDescriptor() + bOK = bOK AND hasUnoInterfaces(oFD, "com.sun.star.sheet.XSheetFilterDescriptor") + Test.MethodTested("getFilterDescriptor()", bOK) + + Test.StartMethod("getSubTotalDescriptor()") + bOK = true + oSTD = oObj.getSubTotalDescriptor() + bOK = bOK AND hasUnoInterfaces(oSTD, "com.sun.star.sheet.XSubTotalDescriptor") + Test.MethodTested("getSubTotalDescriptor()", bOK) + + Test.StartMethod("getImportDescriptor()") + bOK = true + oID = oObj.getImportDescriptor() + bOK = bOK AND isArray(oID) + Test.MethodTested("getImportDescriptor()", bOK) + + Test.StartMethod("refresh()") + bOK = true + oObj.refresh() + Test.MethodTested("refresh()", bOK) + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/sheet/XDatabaseRanges/script.xlb b/qadevOOo/tests/basic/ifc/sheet/XDatabaseRanges/script.xlb new file mode 100644 index 000000000000..19f153f7d2f3 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/sheet/XDatabaseRanges/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="sheet_XDatabaseRanges" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sheet_XDatabaseRanges"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/sheet/XDatabaseRanges/sheet_XDatabaseRanges.xba b/qadevOOo/tests/basic/ifc/sheet/XDatabaseRanges/sheet_XDatabaseRanges.xba new file mode 100644 index 000000000000..c3d645b8f486 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/sheet/XDatabaseRanges/sheet_XDatabaseRanges.xba @@ -0,0 +1,76 @@ +<?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="sheet_XDatabaseRanges" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2000, 2010 Oracle and/or its affiliates. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + +' Be sure that all variables are dimensioned: +option explicit + + + +Sub RunTest() + +'************************************************************************* +' INTERFACE: +' com.sun.star.sheet.XDatabaseRanges +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim nCount As Integer + Dim aRange As New com.sun.star.table.CellRangeAddress + + Test.StartMethod("addNewByName()") + bOK = true + nCount = oObj.Count + aRange.Sheet = 0 + aRange.StartRow = 3 + aRange.StartColumn = 4 + aRange.EndRow = 10 + aRange.EndColumn = 7 + oObj.addNewByName(cIfcShortName, aRange) + bOK = bOK AND oObj.Count = nCount + 1 + Test.MethodTested("addNewByName()", bOK) + + Test.StartMethod("removeByName()") + bOK = true + oObj.removeByName(cIfcShortName) + bOK = bOK AND oObj.Count = nCount + Test.MethodTested("removeByName()", bOK) + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/sheet/XFunctionDescriptions/script.xlb b/qadevOOo/tests/basic/ifc/sheet/XFunctionDescriptions/script.xlb new file mode 100644 index 000000000000..62b8a0e946bc --- /dev/null +++ b/qadevOOo/tests/basic/ifc/sheet/XFunctionDescriptions/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="sheet_XFunctionDescriptions" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sheet_XFunctionDescriptions"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/sheet/XFunctionDescriptions/sheet_XFunctionDescriptions.xba b/qadevOOo/tests/basic/ifc/sheet/XFunctionDescriptions/sheet_XFunctionDescriptions.xba new file mode 100644 index 000000000000..3499cf8146ef --- /dev/null +++ b/qadevOOo/tests/basic/ifc/sheet/XFunctionDescriptions/sheet_XFunctionDescriptions.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="sheet_XFunctionDescriptions" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2000, 2010 Oracle and/or its affiliates. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + +' Be sure that all variables are dimensioned: +option explicit + + + +Sub RunTest() + +'************************************************************************* +' INTERFACE: +' com.sun.star.sheet.XFunctionDescriptions +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim fId,count As Long + Dim fName As String + Dim funct As Object + Dim i,j As Long + + Test.StartMethod("getById()") + bOK = true + count = oObj.count + Dim retfunct() As Variant + for i = 0 to count - 1 + funct = oObj.getByIndex(i) + for j = 0 to ubound(funct) + if funct(j).Name = "Name" then fName = funct(j).Value + if funct(j).Name = "Id" then fId = funct(j).Value + next j + Out.Log("Function " & i & ") " & fName & " has Id = " & fId) + retfunct = oObj.getById(fId) + for j = 0 to ubound(retfunct) + if retfunct(j).Name = "Name" then bOK = bOK AND retfunct(j).Value = fName + next j + next i + Test.MethodTested("getById()", bOK) + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/sheet/XHeaderFooterContent/script.xlb b/qadevOOo/tests/basic/ifc/sheet/XHeaderFooterContent/script.xlb new file mode 100644 index 000000000000..f1b385ebbd9b --- /dev/null +++ b/qadevOOo/tests/basic/ifc/sheet/XHeaderFooterContent/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="sheet_XHeaderFooterContent" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sheet_XHeaderFooterContent"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/sheet/XHeaderFooterContent/sheet_XHeaderFooterContent.xba b/qadevOOo/tests/basic/ifc/sheet/XHeaderFooterContent/sheet_XHeaderFooterContent.xba new file mode 100644 index 000000000000..e280923d62b0 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/sheet/XHeaderFooterContent/sheet_XHeaderFooterContent.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="sheet_XHeaderFooterContent" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2000, 2010 Oracle and/or its affiliates. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + +' Be sure that all variables are dimensioned: +option explicit + +'************************************************************************* +' This Interface/Service test depends on the following GLOBAL variables, +' which must be specified in the object creation: + +' - Global cLeftText As String +' - Global cCenterText As String +' - Global cRightText As String + +'************************************************************************* + + + + + + +Sub RunTest() + +'************************************************************************* +' INTERFACE: +' com.sun.star.sheet.XHeaderFooterContent +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim oText As Object + + Test.StartMethod("getLeftText()") + bOK = true + oText = oObj.getLeftText() + bOK = bOK AND hasUnoInterfaces(oText, "com.sun.star.text.XText") + Out.Log("Text is '" & oText.String & "'") + bOK = bOK AND oText.String = cLeftText + Test.MethodTested("getLeftText()", bOK) + + Test.StartMethod("getCenterText()") + bOK = true + oText = oObj.getCenterText() + bOK = bOK AND hasUnoInterfaces(oText, "com.sun.star.text.XText") + Out.Log("Text is '" & oText.String & "'") + bOK = bOK AND oText.String = cCenterText + Test.MethodTested("getCenterText()", bOK) + + Test.StartMethod("getRightText()") + bOK = true + oText = oObj.getRightText() + bOK = bOK AND hasUnoInterfaces(oText, "com.sun.star.text.XText") + Out.Log("Text is '" & oText.String & "'") + bOK = bOK AND oText.String = cRightText + Test.MethodTested("getRightText()", bOK) + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/sheet/XLabelRange/script.xlb b/qadevOOo/tests/basic/ifc/sheet/XLabelRange/script.xlb new file mode 100644 index 000000000000..8c8d2b1bc8b5 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/sheet/XLabelRange/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="sheet_XLabelRange" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sheet_XLabelRange"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/sheet/XLabelRange/sheet_XLabelRange.xba b/qadevOOo/tests/basic/ifc/sheet/XLabelRange/sheet_XLabelRange.xba new file mode 100644 index 000000000000..312cc52aef76 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/sheet/XLabelRange/sheet_XLabelRange.xba @@ -0,0 +1,116 @@ +<?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="sheet_XLabelRange" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2000, 2010 Oracle and/or its affiliates. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + +' Be sure that all variables are dimensioned: +option explicit + + + +Sub RunTest() + +'************************************************************************* +' INTERFACE: +' com.sun.star.sheet.XLabelRange +'************************************************************************* +On Error Goto ErrHndl + Dim bOK, bAllOK As Boolean + Dim oldArea, newArea As Object + Dim Area As New com.sun.star.table.CellRangeAddress + + Test.StartMethod("getLabelArea()") + bOK = true + bOK = bOK AND NOT isNULL(oObj.getLabelArea()) + Test.MethodTested("getLabelArea()", bOK) + + bAllOK = bAllOK AND bOK + + Test.StartMethod("setLabelArea()") + bOK = true + + Area.Sheet = 0 + Area.StartColumn = 1 + Area.StartRow = 1 + Area.EndColumn = 5 + Area.EndRow = 5 + + oldArea = oObj.getLabelArea() + oObj.setLabelArea(Area) + newArea = oObj.getLabelArea() + bOK = bOK AND NOT isNULL(newArea) + + bOK = bOK AND newArea.Sheet = Area.Sheet + bOK = bOK AND newArea.StartColumn = Area.StartColumn + bOK = bOK AND newArea.StartRow = Area.StartRow + bOK = bOK AND newArea.EndColumn = Area.EndColumn + bOK = bOK AND newArea.EndRow = Area.EndRow + + oObj.setLabelArea(oldArea) + Test.MethodTested("setLabelArea()", bOK) + + Test.StartMethod("getDataArea()") + bOK = true + bOK = bOK AND NOT isNULL(oObj.getDataArea()) + Test.MethodTested("getDataArea()", bOK) + + Test.StartMethod("setDataArea()") + bOK = true + + Area.Sheet = 0 + Area.StartColumn = 1 + Area.StartRow = 1 + Area.EndColumn = 5 + Area.EndRow = 5 + + oldArea = oObj.getDataArea() + oObj.setDataArea(Area) + newArea = oObj.getDataArea() + bOK = bOK AND NOT isNULL(newArea) + + bOK = bOK AND newArea.Sheet = Area.Sheet + bOK = bOK AND newArea.StartColumn = Area.StartColumn + bOK = bOK AND newArea.StartRow = Area.StartRow + bOK = bOK AND newArea.EndColumn = Area.EndColumn + bOK = bOK AND newArea.EndRow = Area.EndRow + + oObj.setDataArea(oldArea) + Test.MethodTested("setDataArea()", bOK) + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/sheet/XLabelRanges/script.xlb b/qadevOOo/tests/basic/ifc/sheet/XLabelRanges/script.xlb new file mode 100644 index 000000000000..d465b388bf8e --- /dev/null +++ b/qadevOOo/tests/basic/ifc/sheet/XLabelRanges/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="sheet_XLabelRanges" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sheet_XLabelRanges"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/sheet/XLabelRanges/sheet_XLabelRanges.xba b/qadevOOo/tests/basic/ifc/sheet/XLabelRanges/sheet_XLabelRanges.xba new file mode 100644 index 000000000000..bd8b9b817ece --- /dev/null +++ b/qadevOOo/tests/basic/ifc/sheet/XLabelRanges/sheet_XLabelRanges.xba @@ -0,0 +1,88 @@ +<?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="sheet_XLabelRanges" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2000, 2010 Oracle and/or its affiliates. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + +' Be sure that all variables are dimensioned: +option explicit + + + +Sub RunTest() + +'************************************************************************* +' INTERFACE: +' com.sun.star.sheet.XLabelRanges +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim count As Integer + Dim RangeAddress1 As New com.sun.star.table.CellRangeAddress + Dim RangeAddress2 As New com.sun.star.table.CellRangeAddress + + Test.StartMethod("addNew()") + bOK = true + + count = oObj.count + RangeAddress1.Sheet = 0 + RangeAddress1.StartColumn = 2 + RangeAddress1.StartRow = 3 + RangeAddress1.EndColumn = 4 + RangeAddress1.EndRow = 5 + + RangeAddress2.Sheet = 0 + RangeAddress2.StartColumn = 6 + RangeAddress2.StartRow = 7 + RangeAddress2.EndColumn = 8 + RangeAddress2.EndRow = 9 + oObj.AddNew(RangeAddress1, RangeAddress2) + + bOK = bOK AND count = oObj.count - 1 + Test.MethodTested("addNew()", bOK) + + Test.StartMethod("removeByIndex()") + bOK = true + + count = oObj.count + oObj.removeByIndex(count - 1) + + bOK = bOK AND (count = oObj.count + 1) + Test.MethodTested("removeByIndex()", bOK) + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/sheet/XNamedRange/script.xlb b/qadevOOo/tests/basic/ifc/sheet/XNamedRange/script.xlb new file mode 100644 index 000000000000..85dfce8cddf2 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/sheet/XNamedRange/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="sheet_XNamedRange" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sheet_XNamedRange"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/sheet/XNamedRange/sheet_XNamedRange.xba b/qadevOOo/tests/basic/ifc/sheet/XNamedRange/sheet_XNamedRange.xba new file mode 100644 index 000000000000..69ef24c93c5c --- /dev/null +++ b/qadevOOo/tests/basic/ifc/sheet/XNamedRange/sheet_XNamedRange.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="sheet_XNamedRange" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2000, 2010 Oracle and/or its affiliates. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + +' Be sure that all variables are dimensioned: +option explicit + + + +Sub RunTest() + +'************************************************************************* +' INTERFACE: +' com.sun.star.sheet.XNamedRange +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim oldContent, newContent As String + Dim position, oldPosition As Object + Dim newPosition As New com.sun.star.table.CellAddress + Dim oldType, newType As Long + + Test.StartMethod("getContent()") + bOK = true + bOK = bOK AND NOT isNULL(oObj.getContent()) + Test.MethodTested("getContent()", bOK) + + Test.StartMethod("setContent()") + bOK = true + oldContent = oObj.getContent + newContent = cIfcShortName + oObj.setContent(newContent) + bOK = bOK AND (oldContent <> oObj.getContent) + oObj.setContent(oldContent) + Test.MethodTested("setContent()", bOK) + + Test.StartMethod("getReferencePosition()") + bOK = true + bOK = bOK AND NOT isNULL(oObj.getReferencePosition()) + Test.MethodTested("getReferencePosition()", bOK) + + Test.StartMethod("setReferencePosition()") + bOK = true + oldPosition = oObj.getReferencePosition() + + newPosition.sheet = oldPosition.sheet + newPosition.row = oldPosition.row + 1 + newPosition.column = oldPosition.column + 1 + oObj.setReferencePosition(newPosition) + position = oObj.getReferencePosition() + + bOK = bOK AND NOT isNULL(position) + bOK = bOK AND position.Row <> oldPosition.row + bOK = bOK AND position.Column <> oldPosition.Column + + oObj.setReferencePosition(oldPosition) + Test.MethodTested("setReferencePosition()", bOK) + + Test.StartMethod("getType()") + bOK = true + bOK = bOK AND NOT isNULL(oObj.getType) + Test.MethodTested("getType()", bOK) + + Test.StartMethod("setType()") + bOK = true + oldType = oObj.getType() + newType = oldType XOR com.sun.star.sheet.NamedRangeFlag.PRINT_AREA + oObj.setType(newType) + bOK = bOK AND (oldType <> oObj.getType()) + oObj.setType(oldType) + Test.MethodTested("setType()", bOK) + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/sheet/XNamedRanges/script.xlb b/qadevOOo/tests/basic/ifc/sheet/XNamedRanges/script.xlb new file mode 100644 index 000000000000..fc871518b603 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/sheet/XNamedRanges/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="sheet_XNamedRanges" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sheet_XNamedRanges"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/sheet/XNamedRanges/sheet_XNamedRanges.xba b/qadevOOo/tests/basic/ifc/sheet/XNamedRanges/sheet_XNamedRanges.xba new file mode 100644 index 000000000000..e7da70d5be52 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/sheet/XNamedRanges/sheet_XNamedRanges.xba @@ -0,0 +1,131 @@ +<?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="sheet_XNamedRanges" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2000, 2010 Oracle and/or its affiliates. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + +' Be sure that all variables are dimensioned: +option explicit + + + +Sub RunTest() + +'************************************************************************* +' INTERFACE: +' com.sun.star.sheet.XNamedRanges +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim count As Integer + Dim outRange As New com.sun.star.table.CellAddress + Dim range As New com.sun.star.table.CellRangeAddress + Dim i As Integer + + Test.StartMethod("addNewByName()") + bOK = true + outRange.Sheet = 0 + outRange.Row = 1 + outRange.Column = 1 + count = oObj.Count + oObj.addNewByName(cIfcShortName, "T4:Y7", outRange, 0) + bOK = bOK AND oObj.count = count + 1 + bOK = bOK AND oObj.hasByName(cIfcShortName) + Test.MethodTested("addNewByName()", bOK) + + Test.StartMethod("addNewFromTitles()") + bOK = true + count = oObj.count + + range.Sheet = 0 + range.StartRow = 1 + range.StartColumn = 2 + range.EndRow = 3 + range.EndColumn = 4 + + for i = 1 to 5 + oDoc.Sheets(0).getCellByPosition(i, 1).String = "Col" & i + next i + + oObj.addNewFromTitles(range, com.sun.star.sheet.Border.TOP) + + bOK = bOK AND (oObj.count = count + 3) + + bOK = bOK AND NOT oObj.hasByName("Col1") + bOK = bOK AND oObj.hasByName("Col2") + bOK = bOK AND oObj.hasByName("Col3") + bOK = bOK AND oObj.hasByName("Col4") + bOK = bOK AND NOT oObj.hasByName("Col5") + Test.MethodTested("addNewFromTitles()", bOK) + + Test.StartMethod("removeByName()") + bOK = true + count = oObj.Count + oObj.removeByName(cIfcShortName) + bOK = bOK AND (count = oObj.count + 1) + bOK = bOK AND NOT oObj.hasByName(cIfcShortName) + Test.MethodTested("removeByName()", bOK) + + Test.StartMethod("outputList()") + bOK = true + outRange.Sheet = 0 + outRange.Row = 5 + outRange.Column = 5 + + count = oObj.count + for i = 4 to 5 + count + oDoc.Sheets(0).getCellByPosition(5, i).String = "a" + oDoc.Sheets(0).getCellByPosition(6, i).String = "b" + next i + + oObj.outputList(outRange) + + bOK = bOK AND oDoc.Sheets(0).getCellByPosition(5, 4).String = "a" + bOK = bOK AND oDoc.Sheets(0).getCellByPosition(6, 4).String = "b" + bOK = bOK AND oDoc.Sheets(0).getCellByPosition(5, 5 + count).String = "a" + bOK = bOK AND oDoc.Sheets(0).getCellByPosition(6, 5 + count).String = "b" + + for i = 5 to 4 + count + bOK = bOK AND oDoc.Sheets(0).getCellByPosition(5, i).String <> "a" + bOK = bOK AND oDoc.Sheets(0).getCellByPosition(6, i).String <> "b" + bOK = bOK AND oObj.hasByName(oDoc.Sheets(0).getCellByPosition(5, i).String) + next i + + Test.MethodTested("outputList()", bOK) + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/sheet/XRecentFunctions/script.xlb b/qadevOOo/tests/basic/ifc/sheet/XRecentFunctions/script.xlb new file mode 100644 index 000000000000..3ae59e9d0b50 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/sheet/XRecentFunctions/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="sheet_XRecentFunctions" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sheet_XRecentFunctions"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/sheet/XRecentFunctions/sheet_XRecentFunctions.xba b/qadevOOo/tests/basic/ifc/sheet/XRecentFunctions/sheet_XRecentFunctions.xba new file mode 100644 index 000000000000..dbc114a848e4 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/sheet/XRecentFunctions/sheet_XRecentFunctions.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="sheet_XRecentFunctions" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2000, 2010 Oracle and/or its affiliates. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + +' Be sure that all variables are dimensioned: +option explicit + +'************************************************************************* +' This Interface/Service test depends on the following GLOBAL variables, +' which must be specified in the object creation: + +' - Global AllFunctions As Variant + +'************************************************************************* + + + + + + +Sub RunTest() + +'************************************************************************* +' INTERFACE: +' com.sun.star.sheet.XRecentFunctions +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim recentFunctions As Variant + Dim i, j As Integer + Dim props As Variant + + + Test.StartMethod("getRecentFunctionIds()") + bOK = true + recentFunctions = oObj.getRecentFunctionIds() + bOK = bOK AND NOT isNULL(recentFunctions) + bOK = bOK AND ubound(recentFunctions) <= oObj.getMaxRecentFunctions + for i = 0 to ubound(recentFunctions) - 1 + for j = i + 1 to ubound(recentFunctions) + if recentFunctions(i) = recentFunctions(j) then bOK = false + next j + next i + Test.MethodTested("getRecentFunctionIds()", bOK) + + Test.StartMethod("setRecentFunctionIds()") + bOK = true + Dim Max As Integer + Max = oObj.getMaxRecentFunctions + Dim newList(Max) As Integer + + for i = 0 to ubound(newList()) + props = AllFunctions.getByIndex(i) + for j = 0 to ubound(props()) + if props(j).Name = "Id" then + newList(i) = props(j).Value + exit for + end if + next j + next i + + oObj.setRecentFunctionIds(newList()) + bOK = bOK AND (Max = oObj.getMaxRecentFunctions) + Test.MethodTested("setRecentFunctionIds()", bOK) + + Test.StartMethod("getMaxRecentFunctions()") + bOK = true + Max = oObj.getMaxRecentFunctions + Out.Log("MaxRecentFunctions = " & Max) + bOK = bOK AND Max > 0 + Test.MethodTested("getMaxRecentFunctions()", bOK) + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/sheet/XScenarios/script.xlb b/qadevOOo/tests/basic/ifc/sheet/XScenarios/script.xlb new file mode 100644 index 000000000000..27edd15fbc85 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/sheet/XScenarios/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="sheet_XScenarios" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sheet_XScenarios"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/sheet/XScenarios/sheet_XScenarios.xba b/qadevOOo/tests/basic/ifc/sheet/XScenarios/sheet_XScenarios.xba new file mode 100644 index 000000000000..f700d2c2bf7c --- /dev/null +++ b/qadevOOo/tests/basic/ifc/sheet/XScenarios/sheet_XScenarios.xba @@ -0,0 +1,80 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="sheet_XScenarios" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2000, 2010 Oracle and/or its affiliates. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + +' Be sure that all variables are dimensioned: +option explicit + + + +Sub RunTest() + +'************************************************************************* +' INTERFACE: +' com.sun.star.sheet.XScenarios +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim nCount As Integer + Dim aCRA(1) As New com.sun.star.table.CellRangeAddress + + aCRA(0).Sheet = 0 : aCRA(1).Sheet = 0 + aCRA(0).StartColumn = 3 : aCRA(1).StartColumn = 13 + aCRA(0).StartRow = 4 : aCRA(1).StartRow = 14 + aCRA(0).EndColumn = 8 : aCRA(1).EndColumn = 18 + aCRA(0).EndRow = 9 : aCRA(1).EndRow = 19 + + Test.StartMethod("addNewByName()") + bOK = true + nCount = oObj.getCount() + Out.Log("Initialy there are " & nCount & " scenarios.") + oObj.addNewByName("NewScenario", aCRA(), "New comment") + Out.Log("After inserting there are " & oObj.getCount() & " scenarios.") + bOK = bOK AND oObj.getCount() = nCount + 1 + Test.MethodTested("addNewByName()", bOK) + + Test.StartMethod("removeByName()") + bOK = true + oObj.removeByName("NewScenario") + Out.Log("After removing there are " & oObj.getCount() & " scenarios.") + bOK = bOK AND oObj.getCount() = nCount + Test.MethodTested("removeByName()", bOK) + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/sheet/XScenariosSupplier/script.xlb b/qadevOOo/tests/basic/ifc/sheet/XScenariosSupplier/script.xlb new file mode 100644 index 000000000000..51fbaf29311e --- /dev/null +++ b/qadevOOo/tests/basic/ifc/sheet/XScenariosSupplier/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="sheet_XScenariosSupplier" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sheet_XScenariosSupplier"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/sheet/XScenariosSupplier/sheet_XScenariosSupplier.xba b/qadevOOo/tests/basic/ifc/sheet/XScenariosSupplier/sheet_XScenariosSupplier.xba new file mode 100644 index 000000000000..678b06532a20 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/sheet/XScenariosSupplier/sheet_XScenariosSupplier.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="sheet_XScenariosSupplier" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2000, 2010 Oracle and/or its affiliates. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + + + +Sub RunTest() + +'************************************************************************* +' INTERFACE: +' com.sun.star.sheet.XScenariosSupplier +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + + + Test.StartMethod("getScenarios()") + bOK = true + oScen = oObj.getScenarios() + bOK = bOK AND NOT isNULL(oScen) + bOK = bOK AND hasUnoInterfaces(oScen, "com.sun.star.sheet.XScenarios") + Test.MethodTested("getScenarios()", bOK) + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/sheet/XSheetAnnotation/script.xlb b/qadevOOo/tests/basic/ifc/sheet/XSheetAnnotation/script.xlb new file mode 100644 index 000000000000..a00e77a3e5c5 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/sheet/XSheetAnnotation/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="sheet_XSheetAnnotation" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sheet_XSheetAnnotation"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/sheet/XSheetAnnotation/sheet_XSheetAnnotation.xba b/qadevOOo/tests/basic/ifc/sheet/XSheetAnnotation/sheet_XSheetAnnotation.xba new file mode 100644 index 000000000000..2278f4bb7d0d --- /dev/null +++ b/qadevOOo/tests/basic/ifc/sheet/XSheetAnnotation/sheet_XSheetAnnotation.xba @@ -0,0 +1,92 @@ +<?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="sheet_XSheetAnnotation" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2000, 2010 Oracle and/or its affiliates. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + +' Be sure that all variables are dimensioned: +option explicit + + + +Sub RunTest() + +'************************************************************************* +' INTERFACE: +' com.sun.star.sheet.XSheetAnnotation +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim oldVal, newVal, valToSet As Boolean + Dim vPos As Variant + + Test.StartMethod("getAuthor()") + bOK = true + bOK = bOK AND (VarType(oObj.getAuthor()) = 8) + Test.MethodTested("getAuthor()", bOK) + + Test.StartMethod("getDate()") + bOK = true + bOK = bOK AND (VarType(oObj.getDate()) = 8) + Test.MethodTested("getDate()", bOK) + + Test.StartMethod("getIsVisible()") + Test.StartMethod("setIsVisible()") + bOK = true + oldVal = oObj.getIsVisible() + Out.Log("value before: " + oldVal) + if oldVal then + valToSet = false + else + valToSet = true + endif + Out.Log("setting value: " + valToSet) + oObj.setIsVisible(valToSet) + newVal = oObj.getIsVisible() + Out.Log("value after: " + newVal) + bOK = bOK AND (oObj.getIsVisible() = valToSet) + Test.MethodTested("getIsVisible()", bOK) + Test.MethodTested("setIsVisible()", bOK) + + Test.StartMethod("getPosition()") + bOK = true + vPos = oObj.getPosition() + bOK = bOK AND isNumeric(vPos.Column) + Test.MethodTested("getPosition()", bOK) + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/sheet/XSheetAnnotations/script.xlb b/qadevOOo/tests/basic/ifc/sheet/XSheetAnnotations/script.xlb new file mode 100644 index 000000000000..6625ff875cc8 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/sheet/XSheetAnnotations/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="sheet_XSheetAnnotations" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sheet_XSheetAnnotations"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/sheet/XSheetAnnotations/sheet_XSheetAnnotations.xba b/qadevOOo/tests/basic/ifc/sheet/XSheetAnnotations/sheet_XSheetAnnotations.xba new file mode 100644 index 000000000000..8c2a3a05eeec --- /dev/null +++ b/qadevOOo/tests/basic/ifc/sheet/XSheetAnnotations/sheet_XSheetAnnotations.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="sheet_XSheetAnnotations" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2000, 2010 Oracle and/or its affiliates. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + +' Be sure that all variables are dimensioned: +option explicit + + + +Sub RunTest() + +'************************************************************************* +' INTERFACE: +' com.sun.star.sheet.XSheetAnnotations +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim aPos As New com.sun.star.table.CellAddress + Dim nCount As Integer + + Test.StartMethod("insertNew()") + bOK = true + nCount = oObj.Count + aPos.Sheet = 1 + aPos.Row = 2 + aPos.Column = 3 + oObj.insertNew(aPos, cIfcShortName) + bOK = bOK AND (oObj.Count = nCount + 1) + Test.MethodTested("insertNew()", bOK) + + Test.StartMethod("removeByIndex()") + bOK = true + oObj.removeByIndex(0) + bOK = bOK AND (oObj.Count = nCount) + Test.MethodTested("removeByIndex()", bOK) + + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/sheet/XSheetAnnotationsSupplier/script.xlb b/qadevOOo/tests/basic/ifc/sheet/XSheetAnnotationsSupplier/script.xlb new file mode 100644 index 000000000000..405fe71bf16a --- /dev/null +++ b/qadevOOo/tests/basic/ifc/sheet/XSheetAnnotationsSupplier/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="sheet_XSheetAnnotationsSupplier" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sheet_XSheetAnnotationsSupplier"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/sheet/XSheetAnnotationsSupplier/sheet_XSheetAnnotationsSupplier.xba b/qadevOOo/tests/basic/ifc/sheet/XSheetAnnotationsSupplier/sheet_XSheetAnnotationsSupplier.xba new file mode 100644 index 000000000000..226b12b238ec --- /dev/null +++ b/qadevOOo/tests/basic/ifc/sheet/XSheetAnnotationsSupplier/sheet_XSheetAnnotationsSupplier.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="sheet_XSheetAnnotationsSupplier" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2000, 2010 Oracle and/or its affiliates. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + + + +Sub RunTest() + +'************************************************************************* +' INTERFACE: +' com.sun.star.sheet.XSheetAnnotationsSupplier +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + + + Test.StartMethod("getAnnotations()") + bOK = true + oAnno = oObj.getAnnotations() + bOK = bOK AND hasUnoInterfaces(oAnno, "com.sun.star.sheet.XSheetAnnotations") + Test.MethodTested("getAnnotations()", bOK) + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/sheet/XSheetCellCursor/script.xlb b/qadevOOo/tests/basic/ifc/sheet/XSheetCellCursor/script.xlb new file mode 100644 index 000000000000..9d3c2f6875fd --- /dev/null +++ b/qadevOOo/tests/basic/ifc/sheet/XSheetCellCursor/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="sheet_XSheetCellCursor" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sheet_XSheetCellCursor"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/sheet/XSheetCellCursor/sheet_XSheetCellCursor.xba b/qadevOOo/tests/basic/ifc/sheet/XSheetCellCursor/sheet_XSheetCellCursor.xba new file mode 100644 index 000000000000..436e88fc983b --- /dev/null +++ b/qadevOOo/tests/basic/ifc/sheet/XSheetCellCursor/sheet_XSheetCellCursor.xba @@ -0,0 +1,135 @@ +<?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="sheet_XSheetCellCursor" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2000, 2010 Oracle and/or its affiliates. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + +' Be sure that all variables are dimensioned: +option explicit + + + +Sub RunTest() + +'************************************************************************* +' INTERFACE: +' com.sun.star.sheet.XSheetCellCursor +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim nCols As Integer, nRows As Long + Dim ResetCols As Integer, ResetRows As Long + Dim oRange As Variant + + ResetCols = oObj.getColumns().getCount() + ResetRows = oObj.getRows().getCount() + + Test.StartMethod("collapseToCurrentRegion()") + bOK = true + oObj.collapseToCurrentRegion() + nCols = oObj.getColumns().getCount() + nRows = oObj.getRows().getCount() + bOK = bOK AND (nCols > 0) AND (nRows > 0) + Out.Log("collapseToCurrentRegion(): nCols = " & nCols & "(>0) nRows = " & nRows & "(>0)") + Test.MethodTested("collapseToCurrentRegion()", bOK) + + 'collapseToMergedArea goes into the area. But you must be insite + ' of one cell of these area + Test.StartMethod("collapseToMergedArea()") + bOK = true + oObj.collapseToSize(5,6) + oRange = oObj.getCellRangeByPosition(0,0,2,2) + oRange.merge(true) + oObj.gotoStart() + oObj.collapseToMergedArea() + nCols = oObj.getColumns().getCount() + nRows = oObj.getRows().getCount() + bOK = bOK AND (nCols = 3) AND (nRows = 3) + Out.Log("collapseToMergedArea(): nCols = " & nCols & "(3) nRows = " & nRows & "(3)") + Test.MethodTested("collapseToMergedArea()", bOK) + oRange.merge(false) + + + Test.StartMethod("collapseToSize()") + bOK = true + oObj.collapseToSize(5,6) + nCols = oObj.getColumns().getCount() + nRows = oObj.getRows().getCount() + bOK = bOK AND (nCols = 5 ) AND (nRows = 6) + Out.Log("collapseToSize(): nCols = " & nCols & "(5) nRows = " & nRows & "(6)") + Test.MethodTested("collapseToSize()", bOK) + + Test.StartMethod("collapseToCurrentArray()") + oObj.collapseToSize(5,6) + oRange = oObj.getCellRangeByPosition(0,0,2,3) + oRange.setArrayFormula("A1:A3") + bOK = true + oObj.collapseToCurrentArray() + nCols = oObj.getColumns().getCount() + nRows = oObj.getRows().getCount() + bOK = bOK AND (nCols = 3) AND (nRows = 4) + Out.Log("collapseToCurrentArray(): nCols = " & nCols & "(3) nRows = " & nRows & "(4)") + Test.MethodTested("collapseToCurrentArray()", bOK) + oRange.setArrayFormula("") + + + Test.StartMethod("expandToEntireColumns()") + bOK = true + oObj.collapseToSize(1,1) + oObj.expandToEntireColumns() + nCols = oObj.getColumns().getCount() + nRows = oObj.getRows().getCount() + bOK = bOK AND (nCols = 1) AND (nRows >= 32000) + Out.Log("expandToEntireColumns(): nCols = " & nCols & "(1) nRows = " & nRows & "(>=32000)") + Test.MethodTested("expandToEntireColumns()", bOK) + + Test.StartMethod("expandToEntireRows()") + bOK = true + oObj.collapseToSize(1,1) + oObj.expandToEntireRows() + nCols = oObj.getColumns().getCount() + nRows = oObj.getRows().getCount() + bOK = bOK AND (nCols >= 256) AND (nRows = 1) + Out.Log("expandToEntireRows(): nCols = " & nCols & "(>=256) nRows = " & nRows & "(1)") + Test.MethodTested("expandToEntireRows()", bOK) + + + Out.Log("Reset to old range: " & ResetCols & "," & ResetRows) + oObj.collapseToSize(ResetCols, ResetRows) + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/sheet/XSheetCellRange/script.xlb b/qadevOOo/tests/basic/ifc/sheet/XSheetCellRange/script.xlb new file mode 100644 index 000000000000..c161cc4a0128 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/sheet/XSheetCellRange/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="sheet_XSheetCellRange" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sheet_XSheetCellRange"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/sheet/XSheetCellRange/sheet_XSheetCellRange.xba b/qadevOOo/tests/basic/ifc/sheet/XSheetCellRange/sheet_XSheetCellRange.xba new file mode 100644 index 000000000000..abfb9155ad5b --- /dev/null +++ b/qadevOOo/tests/basic/ifc/sheet/XSheetCellRange/sheet_XSheetCellRange.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="sheet_XSheetCellRange" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2000, 2010 Oracle and/or its affiliates. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + +' Be sure that all variables are dimensioned: +option explicit + + + +Sub RunTest() + +'************************************************************************* +' INTERFACE: +' com.sun.star.sheet.XSheetCellRange +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim oSheet As Object + + Test.StartMethod("getSpreadsheet()") + bOK = true + oSheet = oObj.getSpreadsheet() + bOK = bOK AND hasUnoInterfaces(oSheet, "com.sun.star.sheet.XSpreadsheet") + Test.MethodTested("getSpreadsheet()", bOK) + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/sheet/XSheetCellRangeContainer/script.xlb b/qadevOOo/tests/basic/ifc/sheet/XSheetCellRangeContainer/script.xlb new file mode 100644 index 000000000000..77b18f7f6f93 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/sheet/XSheetCellRangeContainer/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="sheet_XSheetCellRangeContainer" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sheet_XSheetCellRangeContainer"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/sheet/XSheetCellRangeContainer/sheet_XSheetCellRangeContainer.xba b/qadevOOo/tests/basic/ifc/sheet/XSheetCellRangeContainer/sheet_XSheetCellRangeContainer.xba new file mode 100644 index 000000000000..18def92467cd --- /dev/null +++ b/qadevOOo/tests/basic/ifc/sheet/XSheetCellRangeContainer/sheet_XSheetCellRangeContainer.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="sheet_XSheetCellRangeContainer" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2000, 2010 Oracle and/or its affiliates. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + +' Be sure that all variables are dimensioned: +option explicit + + + +Sub RunTest() + +'************************************************************************* +' INTERFACE: +' com.sun.star.sheet.XSheetCellRangeContainer +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim newAddress As New com.sun.star.table.CellRangeAddress + Dim newAddress1 As New com.sun.star.table.CellRangeAddress + Dim newAddresses(1) As Variant + Dim nCount As Integer + + Test.StartMethod("addRangeAddress()") + Test.StartMethod("removeRangeAddress()") + bOK = true + nCount = oObj.getCount() + newAddress.Sheet = 0 + newAddress.StartColumn = 15 : newAddress.EndColumn = 18 + newAddress.StartRow = 15 : newAddress.EndRow = 16 + oObj.addRangeAddress(newAddress, false) + bOK = bOK AND oObj.getCount() = nCount + 1 + oObj.removeRangeAddress(newAddress) + bOK = bOK AND oObj.getCount() = nCount + Test.MethodTested("addRangeAddress()", bOK) + Test.MethodTested("removeRangeAddress()", bOK) + + + Test.StartMethod("addRangeAddresses()") + Test.StartMethod("removeRangeAddresses()") + bOK = true + newAddress1.Sheet = 0 + newAddress1.StartColumn = 20 : newAddress1.EndColumn = 30 + newAddress1.StartRow = 20 : newAddress1.EndRow = 20 + newAddresses(0) = newAddress + newAddresses(1) = newAddress1 + oObj.addRangeAddresses(newAddresses(), false) + bOK = bOK AND oObj.getCount() = nCount + 2 + oObj.removeRangeAddresses(newAddresses()) + bOK = bOK AND oObj.getCount() = nCount + Test.MethodTested("removeRangeAddresses()", bOK) + Test.MethodTested("addRangeAddresses()", bOK) + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/sheet/XSheetCellRanges/script.xlb b/qadevOOo/tests/basic/ifc/sheet/XSheetCellRanges/script.xlb new file mode 100644 index 000000000000..46814879c917 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/sheet/XSheetCellRanges/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="sheet_XSheetCellRanges" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sheet_XSheetCellRanges"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/sheet/XSheetCellRanges/sheet_XSheetCellRanges.xba b/qadevOOo/tests/basic/ifc/sheet/XSheetCellRanges/sheet_XSheetCellRanges.xba new file mode 100644 index 000000000000..2f1b076933ed --- /dev/null +++ b/qadevOOo/tests/basic/ifc/sheet/XSheetCellRanges/sheet_XSheetCellRanges.xba @@ -0,0 +1,81 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="sheet_XSheetCellRanges" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2000, 2010 Oracle and/or its affiliates. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + +' Be sure that all variables are dimensioned: +option explicit + + + +Sub RunTest() + +'************************************************************************* +' INTERFACE: +' com.sun.star.sheet.XSheetCellRanges +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim oCells, oRanges As Variant + Dim cRanges As String + + Test.StartMethod("getCells()") + bOK = true + oCells = oObj.getCells() + bOK = bOK AND hasUnoInterfaces(oCells, "com.sun.star.container.XEnumerationAccess") + Test.MethodTested("getCells()", bOK) + + Test.StartMethod("getRangeAddressesAsString()") + bOK = true + cRanges = oObj.getRangeAddressesAsString() + Out.Log("Returned ranges are : '" & cRanges & "'") + bOK = bOK AND inStr(1, cRanges, "Sheet") + Test.MethodTested("getRangeAddressesAsString()", bOK) + + Test.StartMethod("getRangeAddresses()") + bOK = true + oRanges = oObj.getRangeAddresses() + bOK = bOK AND (oRanges(ubound(oRanges)).StartColumn <> 0 OR _ + oRanges(ubound(oRanges)).StartRow <> 0 OR _ + oRanges(ubound(oRanges)).EndRow <> 0 OR _ + oRanges(ubound(oRanges)).EndColumn <> 0 OR _ + oRanges(ubound(oRanges)).Sheet <> 0) + Test.MethodTested("getRangeAddresses()", bOK) + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/sheet/XSheetCondition/script.xlb b/qadevOOo/tests/basic/ifc/sheet/XSheetCondition/script.xlb new file mode 100644 index 000000000000..9d983d5cf384 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/sheet/XSheetCondition/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="sheet_XSheetCondition" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sheet_XSheetCondition"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/sheet/XSheetCondition/sheet_XSheetCondition.xba b/qadevOOo/tests/basic/ifc/sheet/XSheetCondition/sheet_XSheetCondition.xba new file mode 100644 index 000000000000..9215c1e80c1e --- /dev/null +++ b/qadevOOo/tests/basic/ifc/sheet/XSheetCondition/sheet_XSheetCondition.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="sheet_XSheetCondition" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2000, 2010 Oracle and/or its affiliates. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + +' Be sure that all variables are dimensioned: +option explicit + + + +Sub RunTest() + +'************************************************************************* +' INTERFACE: +' com.sun.star.sheet.XSheetCondition +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim oldOperator As Variant + Dim oldFormula As String + Dim oPos As com.sun.star.table.CellAddress + Dim newPos As New com.sun.star.table.CellAddress + + Test.StartMethod("setOperator()") + Test.StartMethod("getOperator()") + bOK = true + oldOperator = oObj.getOperator() + oObj.setOperator(com.sun.star.sheet.ConditionOperator.LESS) + bOK = bOK AND oObj.getOperator() <> oldOperator + oObj.setOperator(oldOperator) + Test.MethodTested("getOperator()", bOK) + Test.MethodTested("setOperator()", bOK) + + Test.StartMethod("getFormula1()") + Test.StartMethod("setFormula1()") + bOK = true + oldFormula = oObj.getFormula1() + oObj.setFormula1("1") + bOK = bOK AND oObj.getFormula1() = "1" + oObj.setFormula1(oldFormula) + Test.MethodTested("getFormula1()", bOK) + Test.MethodTested("setFormula1()", bOK) + + Test.StartMethod("getFormula2()") + Test.StartMethod("setFormula2()") + bOK = true + oldFormula = oObj.getFormula2() + oObj.setFormula2("2") + bOK = bOK AND oObj.getFormula2() = "2" + oObj.setFormula2(oldFormula) + Test.MethodTested("getFormula2()", bOK) + Test.MethodTested("setFormula2()", bOK) + + Test.StartMethod("getSourcePosition()") + Test.StartMethod("setSourcePosition()") + bOK = true + oPos = oObj.getSourcePosition() + bOK = bOK AND oPos.Column >= 0 + newPos.Sheet = oPos.Sheet + newPos.Column = oPos.Column + 1 + newPos.Row = oPos.Row + 1 + oObj.setSourcePosition(newPos) + bOK = bOK AND oObj.getSourcePosition().Column = oPos.Column + 1 + Test.MethodTested("getSourcePosition()", bOK) + Test.MethodTested("setSourcePosition()", bOK) + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/sheet/XSheetConditionalEntries/script.xlb b/qadevOOo/tests/basic/ifc/sheet/XSheetConditionalEntries/script.xlb new file mode 100644 index 000000000000..098e6c0ffc95 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/sheet/XSheetConditionalEntries/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="sheet_XSheetConditionalEntries" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sheet_XSheetConditionalEntries"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/sheet/XSheetConditionalEntries/sheet_XSheetConditionalEntries.xba b/qadevOOo/tests/basic/ifc/sheet/XSheetConditionalEntries/sheet_XSheetConditionalEntries.xba new file mode 100644 index 000000000000..88be1a8e4d6f --- /dev/null +++ b/qadevOOo/tests/basic/ifc/sheet/XSheetConditionalEntries/sheet_XSheetConditionalEntries.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="sheet_XSheetConditionalEntries" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2000, 2010 Oracle and/or its affiliates. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + +' Be sure that all variables are dimensioned: +option explicit + + + +Sub RunTest() + +'************************************************************************* +' INTERFACE: +' com.sun.star.sheet.XSheetConditionalEntries +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim nNum As Integer + Dim aConditionalEntry(0) As New com.sun.star.beans.PropertyValue + + Test.StartMethod("addNew()") + bOK = true + nNum = oObj.Count + oObj.addNew(aConditionalEntry()) + bOK = bOK AND nNum = oObj.Count - 1 + Test.MethodTested("addNew()", bOK) + + Test.StartMethod("removeByIndex()") + bOK = true + oObj.removeByIndex(0) + bOK = bOK AND nNum = oObj.Count + Test.MethodTested("removeByIndex()", bOK) + + Test.StartMethod("clear()") + bOK = true + oObj.clear() + bOK = bOK AND oObj.Count = 0 + Test.MethodTested("clear()", bOK) + + ReCreateObj() +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/sheet/XSheetConditionalEntry/script.xlb b/qadevOOo/tests/basic/ifc/sheet/XSheetConditionalEntry/script.xlb new file mode 100644 index 000000000000..b4e0c725f364 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/sheet/XSheetConditionalEntry/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="sheet_XSheetConditionalEntry" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sheet_XSheetConditionalEntry"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/sheet/XSheetConditionalEntry/sheet_XSheetConditionalEntry.xba b/qadevOOo/tests/basic/ifc/sheet/XSheetConditionalEntry/sheet_XSheetConditionalEntry.xba new file mode 100644 index 000000000000..334657127ec1 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/sheet/XSheetConditionalEntry/sheet_XSheetConditionalEntry.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="sheet_XSheetConditionalEntry" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2000, 2010 Oracle and/or its affiliates. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + +' Be sure that all variables are dimensioned: +option explicit + + + +Sub RunTest() + +'************************************************************************* +' INTERFACE: +' com.sun.star.sheet.XSheetConditionalEntry +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim cName, cName1 As String + + Test.StartMethod("getStyleName()") + Test.StartMethod("setStyleName()") + bOK = true + cName = oObj.getStyleName() + Out.Log("Style name is '" & cName & "'") + oObj.setStyleName(cIfcShortName) + cName1 = oObj.getStyleName() + Out.Log("Style name is '" & cName1 & "'") + bOK = bOK AND cName1 <> cName + oObj.setStyleName(cName) + Test.MethodTested("getStyleName()", bOK) + Test.MethodTested("setStyleName()", bOK) + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/sheet/XSheetFilterDescriptor/script.xlb b/qadevOOo/tests/basic/ifc/sheet/XSheetFilterDescriptor/script.xlb new file mode 100644 index 000000000000..c3f3a5da4331 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/sheet/XSheetFilterDescriptor/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="sheet_XSheetFilterDescriptor" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sheet_XSheetFilterDescriptor"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/sheet/XSheetFilterDescriptor/sheet_XSheetFilterDescriptor.xba b/qadevOOo/tests/basic/ifc/sheet/XSheetFilterDescriptor/sheet_XSheetFilterDescriptor.xba new file mode 100644 index 000000000000..6b2824138913 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/sheet/XSheetFilterDescriptor/sheet_XSheetFilterDescriptor.xba @@ -0,0 +1,77 @@ +<?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="sheet_XSheetFilterDescriptor" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2000, 2010 Oracle and/or its affiliates. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + +' Be sure that all variables are dimensioned: +option explicit + + + +Sub RunTest() + +'************************************************************************* +' INTERFACE: +' com.sun.star.sheet.XSheetFilterDescriptor +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim oldVal, objVal As Object + Dim newVal(0) As New com.sun.star.sheet.TableFilterField + + + Test.StartMethod("getFilterFields()") + bOK = true + bOK = bOK AND NOT isNULL(oObj.getFilterFields()) + Test.MethodTested("getFilterFields()", bOK) + + Test.StartMethod("setFilterFields()") + bOK = true + oldVal = oObj.getFilterFields() + newVal(0).Field = 0 + newVal(0).isNumeric = true + newVal(0).Operator = com.sun.star.sheet.FilterOperator.GREATER_EQUAL + newVal(0).NumericValue = 99 + newVal(0).Connection = com.sun.star.sheet.FilterConnection.AND + oObj.setFilterFields(newVal()) + objVal = oObj.getFilterFields() + bOK = bOK AND (ubound(objVal) = 0) AND (objVal(0).NumericValue = 99) + Test.MethodTested("setFilterFields()", bOK) + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/sheet/XSheetOperation/script.xlb b/qadevOOo/tests/basic/ifc/sheet/XSheetOperation/script.xlb new file mode 100644 index 000000000000..aa560324cc77 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/sheet/XSheetOperation/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="sheet_XSheetOperation" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sheet_XSheetOperation"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/sheet/XSheetOperation/sheet_XSheetOperation.xba b/qadevOOo/tests/basic/ifc/sheet/XSheetOperation/sheet_XSheetOperation.xba new file mode 100644 index 000000000000..65df94719702 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/sheet/XSheetOperation/sheet_XSheetOperation.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="sheet_XSheetOperation" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2000, 2010 Oracle and/or its affiliates. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + +' Be sure that all variables are dimensioned: +option explicit + + + +Sub RunTest() + +'************************************************************************* +' INTERFACE: +' com.sun.star.sheet.XSheetOperation +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim nCompute As Long + + Test.StartMethod("computeFunction()") + bOK = true + nCompute = oObj.computeFunction(com.sun.star.sheet.GeneralFunction.COUNT) + bOK = bOK AND (nCompute >= 0) + Test.MethodTested("computeFunction()", bOK) + + Test.StartMethod("clearContents()") + bOK = true + oObj.clearContents(com.sun.star.sheet.CellFlags.VALUE) + nCompute= oObj.computeFunction(com.sun.star.sheet.GeneralFunction.COUNT) + bOK = bOK AND (nCompute = 0) + Test.MethodTested("clearContents()", bOK) + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/sheet/XSheetPageBreak/script.xlb b/qadevOOo/tests/basic/ifc/sheet/XSheetPageBreak/script.xlb new file mode 100644 index 000000000000..4894c78c3242 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/sheet/XSheetPageBreak/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="sheet_XSheetPageBreak" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sheet_XSheetPageBreak"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/sheet/XSheetPageBreak/sheet_XSheetPageBreak.xba b/qadevOOo/tests/basic/ifc/sheet/XSheetPageBreak/sheet_XSheetPageBreak.xba new file mode 100644 index 000000000000..493557926c14 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/sheet/XSheetPageBreak/sheet_XSheetPageBreak.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="sheet_XSheetPageBreak" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2000, 2010 Oracle and/or its affiliates. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + +' Be sure that all variables are dimensioned: +option explicit + + + +Sub RunTest() + +'************************************************************************* +' INTERFACE: +' com.sun.star.sheet.XSheetPageBreak +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim nColsBreaks As Integer + Dim nRowsBreaks As Integer + Dim oColumn As Object + Dim oRow As Object + Dim oPBs As Variant + Dim iRowsBefore As Integer + Dim iColsBefore As Integer + + iColsBefore = ubound(oObj.getColumnPageBreaks()) - 1 + iRowsBefore = ubound(oObj.getRowPageBreaks()) - 1 + + Out.Log("Before test: colBreaks: " & iColsBefore & _ + " rowBreaks: " & iRowsBefore) + + Out.Log("Inserting new PageBreaks.") + oColumn = oObj.Columns.getByIndex(5) + oColumn.SetPropertyValue("IsStartOfNewPage", true) + oRow = oObj.Rows.getByIndex(15) + oRow.SetPropertyValue("IsStartOfNewPage", true) + + Test.StartMethod("getColumnPageBreaks()") + bOK = true + oPBs = oObj.getColumnPageBreaks() + nColsBreaks = uBound(oPBs) + Out.Log("There are " & nColsBreaks & " column breaks.") + bOK = bOK AND nColsBreaks > 0 + bOK = bOK AND oPBs(0).Position >= 0 + Test.MethodTested("getColumnPageBreaks()", bOK) + + Test.StartMethod("getRowPageBreaks()") + bOK = true + oPBs = oObj.getRowPageBreaks() + nRowsBreaks = uBound(oPBs) + Out.Log("There are " & nRowsBreaks & " row breaks.") + bOK = bOK AND nRowsBreaks > 0 + bOK = bOK AND oPBs(0).Position >= 0 + Test.MethodTested("getRowPageBreaks()", bOK) + + Test.StartMethod("removeAllManualPageBreaks()") + bOK = true + oObj.removeAllManualPageBreaks() + Out.Log("After test: colBreaks: " & ubound(oObj.getColumnPageBreaks()) - 1 & _ + " rowBreaks: " & ubound(oObj.getRowPageBreaks()) - 1) + + bOK = bOK AND ubound(oObj.getRowPageBreaks()) - 1 = iRowsBefore + bOK = bOK AND ubound(oObj.getColumnPageBreaks()) - 1= iColsBefore + Test.MethodTested("removeAllManualPageBreaks()", bOK) + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/sheet/XSpreadsheet/script.xlb b/qadevOOo/tests/basic/ifc/sheet/XSpreadsheet/script.xlb new file mode 100644 index 000000000000..629d421c08c1 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/sheet/XSpreadsheet/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="sheet_XSpreadsheet" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sheet_XSpreadsheet"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/sheet/XSpreadsheet/sheet_XSpreadsheet.xba b/qadevOOo/tests/basic/ifc/sheet/XSpreadsheet/sheet_XSpreadsheet.xba new file mode 100644 index 000000000000..2ada541ca50e --- /dev/null +++ b/qadevOOo/tests/basic/ifc/sheet/XSpreadsheet/sheet_XSpreadsheet.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="sheet_XSpreadsheet" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2000, 2010 Oracle and/or its affiliates. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + + + +Sub RunTest() + +'************************************************************************* +' INTERFACE: +' com.sun.star.sheet.XSpreadsheet +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + + + Test.StartMethod("createCursor()") + bOK = true + oCur = oObj.createCursor() + bOK = bOK AND hasUnoInterfaces(oCur, "com.sun.star.sheet.XSheetCellCursor") + Test.MethodTested("createCursor()", bOK) + + Test.StartMethod("createCursorByRange()") + bOK = true + oCur = oObj.createCursorByRange(oObj) + bOK = bOK AND hasUnoInterfaces(oCur, "com.sun.star.sheet.XSheetCellCursor") + Test.MethodTested("createCursorByRange()", bOK) + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/sheet/XSpreadsheetDocument/script.xlb b/qadevOOo/tests/basic/ifc/sheet/XSpreadsheetDocument/script.xlb new file mode 100644 index 000000000000..7a9f4d13b24e --- /dev/null +++ b/qadevOOo/tests/basic/ifc/sheet/XSpreadsheetDocument/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="sheet_XSpreadsheetDocument" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sheet_XSpreadsheetDocument"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/sheet/XSpreadsheetDocument/sheet_XSpreadsheetDocument.xba b/qadevOOo/tests/basic/ifc/sheet/XSpreadsheetDocument/sheet_XSpreadsheetDocument.xba new file mode 100644 index 000000000000..1624ad932211 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/sheet/XSpreadsheetDocument/sheet_XSpreadsheetDocument.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="sheet_XSpreadsheetDocument" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2000, 2010 Oracle and/or its affiliates. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + +' Be sure that all variables are dimensioned: +option explicit + + + +Sub RunTest() + +'************************************************************************* +' INTERFACE: +' com.sun.star.sheet.XSpreadsheetDocument +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim oSheets As Object + + Test.StartMethod("getSheets()") + bOK = true + oSheets = oObj.getSheets + bOK = bOK AND ((NOT isNULL(oSheets)) AND (oSheets.count > 0)) + Test.MethodTested("getSheets()", bOK) + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/sheet/XSpreadsheetView/script.xlb b/qadevOOo/tests/basic/ifc/sheet/XSpreadsheetView/script.xlb new file mode 100644 index 000000000000..57b477800e29 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/sheet/XSpreadsheetView/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="sheet_XSpreadsheetView" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sheet_XSpreadsheetView"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/sheet/XSpreadsheetView/sheet_XSpreadsheetView.xba b/qadevOOo/tests/basic/ifc/sheet/XSpreadsheetView/sheet_XSpreadsheetView.xba new file mode 100644 index 000000000000..55dac404bf79 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/sheet/XSpreadsheetView/sheet_XSpreadsheetView.xba @@ -0,0 +1,95 @@ +<?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="sheet_XSpreadsheetView" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2000, 2010 Oracle and/or its affiliates. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + +' Be sure that all variables are dimensioned: +option explicit + +'************************************************************************* +' This Interface/Service test depends on the following GLOBAL variables, +' which must be specified in the object creation: + +' - Global oActivableSheet As Object + +'************************************************************************* + + + + + + +Sub RunTest() + +'************************************************************************* +' INTERFACE: +' com.sun.star.sheet.XSpreadsheetView +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim oActiveSheet, oNewSheet, oNewActiveSheet As Object + Dim cString As String + + Test.StartMethod("getActiveSheet()") + bOK = true + oActiveSheet = oObj.getActiveSheet() + bOK = bOK AND NOT isNULL(oActiveSheet) + Test.MethodTested("getActiveSheet()", bOK) + + Test.StartMethod("setActiveSheet()") + bOK = true + oNewSheet = oDoc.createInstance("com.sun.star.sheet.Spreadsheet") + oDoc.Sheets.insertByName("ActiveSheet", oNewSheet) + + oActiveSheet = oObj.getActiveSheet() + + cString = oActiveSheet.getCellByPosition(1, 1).String & " on New Sheet" + oNewSheet.getCellByPosition(1, 1).String = cString + oObj.setActiveSheet(oNewSheet) + + oNewActiveSheet = oObj.getActiveSheet() + + bOK = bOK AND oNewActiveSheet.Name = "ActiveSheet" + bOK = bOK AND oNewActiveSheet.getCellByPosition(1, 1).String = cString + + oDoc.Sheets.removeByName("ActiveSheet") + + Test.MethodTested("setActiveSheet()", bOK) + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/sheet/XSpreadsheets/script.xlb b/qadevOOo/tests/basic/ifc/sheet/XSpreadsheets/script.xlb new file mode 100644 index 000000000000..c51159812739 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/sheet/XSpreadsheets/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="sheet_XSpreadsheets" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sheet_XSpreadsheets"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/sheet/XSpreadsheets/sheet_XSpreadsheets.xba b/qadevOOo/tests/basic/ifc/sheet/XSpreadsheets/sheet_XSpreadsheets.xba new file mode 100644 index 000000000000..2391c87df0c1 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/sheet/XSpreadsheets/sheet_XSpreadsheets.xba @@ -0,0 +1,130 @@ +<?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="sheet_XSpreadsheets" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2000, 2010 Oracle and/or its affiliates. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + +' Be sure that all variables are dimensioned: +option explicit + +'************************************************************************* +' This Interface/Service test depends on the following GLOBAL variables, +' which must be specified in the object creation: + +' - Global nGlobalLong As Long the number of sheets + +'************************************************************************* + + + + + + +Sub RunTest() + +'************************************************************************* +' INTERFACE: +' com.sun.star.sheet.XSpreadsheets +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim l As Integer + Dim sname As String + Dim oSheet1, oSheet2 As Object + + + Test.StartMethod("insertNewByName()") + bOK = true + for l = 1 to nGlobalLong + sname = cIfcShortName & CStr(l) + oObj.insertNewByName(sname, l) + oSheet1 = oObj.getByName(sname) + oSheet2 = oObj.getByIndex(l) + bOK = bOK AND NOT isNull(oSheet1) + bOK = bOK AND NOT isNull(oSheet2) + if (bOK) then + bOK = bOK and oSheet1.name = oSheet2.name + end if + next l + Test.MethodTested("insertNewByName()", bOK) + + Test.StartMethod("copyByName()") + bOK = true + l = 1 + sname = cIfcShortName & "COPY" + oObj.copyByName(cIfcShortName & CStr(l), sname, l ) + oSheet1 = oObj.getByName(sname) + oSheet2 = oObj.getByIndex(l) + bOK = bOK AND NOT isNull(oSheet1) + bOK = bOK AND NOT isNull(oSheet2) + if (bOK) then + bOK = bOK AND oSheet1.name = oSheet2.name + end if + Test.MethodTested("copyByName()", bOK) + + Test.StartMethod("moveByName()") + bOK = true + l = 1 + sname = cIfcShortName & "2" + oObj.moveByName(sname, l) + oSheet1 = oObj.getByName(sname) + oSheet2 = oObj.getByIndex(l) + bOK = bOK AND NOT isNull(oSheet1) + bOK = bOK AND NOT isNull(oSheet2) + if (bOK) then + bOK = bOK AND oSheet1.name = oSheet2.name + end if + Out.Log(cIfcShortName & ":" & "#1 - " & bOK) + + sname = cIfcShortName & "COPY" + l = nGlobalLong + 1 + oObj.moveByName(sname, l) + l = l - 1 + oSheet1 = oObj.getByName(sname) + oSheet2 = oObj.getByIndex(l) + bOK = bOK AND NOT isNull(oSheet1) + bOK = bOK AND NOT isNull(oSheet2) + if (bOK) then + bOK = bOK and oSheet1.name =oSheet2.name + end if + Test.MethodTested("moveByName()", bOK) + + nGlobalLong = nGlobalLong * 2 + 1 ' nGlobalLong : 3 default sheets where already there + ' nGlobalLong have been inserted + ' + 1 has been created by Copy +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/sheet/XSubTotalDescriptor/script.xlb b/qadevOOo/tests/basic/ifc/sheet/XSubTotalDescriptor/script.xlb new file mode 100644 index 000000000000..537bf6eddab9 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/sheet/XSubTotalDescriptor/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="sheet_XSubTotalDescriptor" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sheet_XSubTotalDescriptor"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/sheet/XSubTotalDescriptor/sheet_XSubTotalDescriptor.xba b/qadevOOo/tests/basic/ifc/sheet/XSubTotalDescriptor/sheet_XSubTotalDescriptor.xba new file mode 100644 index 000000000000..907b6299de86 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/sheet/XSubTotalDescriptor/sheet_XSubTotalDescriptor.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="sheet_XSubTotalDescriptor" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2000, 2010 Oracle and/or its affiliates. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + +' Be sure that all variables are dimensioned: +option explicit + + + +Sub RunTest() + +'************************************************************************* +' INTERFACE: +' com.sun.star.sheet.XSubTotalDescriptor +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim count As Integer + + Test.StartMethod("addNew()") + bOK = true + count = oObj.Count + + Out.Log("Before addNew() there are " & count & " elements") + + Dim SubTotalCol(0) As New com.sun.star.sheet.SubTotalColumn + SubTotalCol(0).Column = 7 + SubTotalCol(0).Function = com.sun.star.sheet.GeneralFunction.SUM + + oObj.addNew(SubTotalCol(), 1) + + bOK = bOK AND oObj.count = count + 1 + Out.Log("After addNew() there are " & oObj.Count & " elements") + Test.MethodTested("addNew()", bOK) + + Test.StartMethod("clear()") + bOK = true + oObj.clear() + bOK = bOK AND oObj.Count = 0 + Test.MethodTested("clear()", bOK) + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/sheet/XSubTotalField/script.xlb b/qadevOOo/tests/basic/ifc/sheet/XSubTotalField/script.xlb new file mode 100644 index 000000000000..b938a580a566 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/sheet/XSubTotalField/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="sheet_XSubTotalField" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sheet_XSubTotalField"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/sheet/XSubTotalField/sheet_XSubTotalField.xba b/qadevOOo/tests/basic/ifc/sheet/XSubTotalField/sheet_XSubTotalField.xba new file mode 100644 index 000000000000..9e5c0324dfee --- /dev/null +++ b/qadevOOo/tests/basic/ifc/sheet/XSubTotalField/sheet_XSubTotalField.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="sheet_XSubTotalField" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2000, 2010 Oracle and/or its affiliates. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + +' Be sure that all variables are dimensioned: +option explicit + + + +Sub RunTest() + +'************************************************************************* +' INTERFACE: +' com.sun.star.sheet.XSubTotalField +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim oldCol, newCol As Integer + Dim SubTotalCol(1) As New com.sun.star.sheet.SubTotalColumn + + Test.StartMethod("getGroupColumn()") + bOK = true + bOK = bOK AND NOT isNULL(oObj.getGroupColumn()) + Test.MethodTested("getGroupColumn()", bOK) + + Test.StartMethod("setGroupColumn()") + bOK = true + oldCol = oObj.getGroupColumn() + newCol = oldCol + 1 + oObj.setGroupColumn(newCol) + bOK = bOK AND (oldCol <> oObj.getGroupColumn()) + oObj.setGroupColumn(oldCol) + Test.MethodTested("setGroupColumn()", bOK) + + Test.StartMethod("getSubTotalColumns()") + bOK = true + bOK = bOK AND NOT isNULL(oObj.getSubTotalColumns()) + Test.MethodTested("getSubTotalColumns()", bOK) + + Test.StartMethod("setSubTotalColumns()") + bOK = true + SubTotalCol(0).Column = 1 + SubTotalCol(0).Function = com.sun.star.sheet.GeneralFunction.AVERAGE + SubTotalCol(1).Column = 2 + SubTotalCol(1).Function = com.sun.star.sheet.GeneralFunction.SUM + oObj.setSubTotalColumns(SubTotalCol()) + bOK = bOK AND ubound(oObj.getSubTotalColumns()) = 1 + Test.MethodTested("setSubTotalColumns()", bOK) + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/sheet/XUsedAreaCursor/script.xlb b/qadevOOo/tests/basic/ifc/sheet/XUsedAreaCursor/script.xlb new file mode 100644 index 000000000000..b2e8ad029c89 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/sheet/XUsedAreaCursor/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="sheet_XUsedAreaCursor" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sheet_XUsedAreaCursor"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/sheet/XUsedAreaCursor/sheet_XUsedAreaCursor.xba b/qadevOOo/tests/basic/ifc/sheet/XUsedAreaCursor/sheet_XUsedAreaCursor.xba new file mode 100644 index 000000000000..4ac4e48941f6 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/sheet/XUsedAreaCursor/sheet_XUsedAreaCursor.xba @@ -0,0 +1,86 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="sheet_XUsedAreaCursor" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2000, 2010 Oracle and/or its affiliates. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + +' Be sure that all variables are dimensioned: +option explicit + + + +Sub RunTest() + +'************************************************************************* +' INTERFACE: +' com.sun.star.sheet.XUsedAreaCursor +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim nStartSCol, nStartECol As Integer + Dim nStartSRow, nStartERow As Long + Dim nEndSCol, nEndECol As Integer + Dim nEndSRow, nEndERow As Long + Dim oAddress As Object + + Test.StartMethod("gotoStartOfUsedArea()") + bOK = true + oObj.gotoStartOfUsedArea(true) + oAddress = oObj.getRangeAddress() + nStartSCol = oAddress.StartColumn + nStartECol = oAddress.EndColumn + nStartSRow = oAddress.StartRow + nStartERow = oAddress.EndRow + + Test.StartMethod("gotoEndOfUsedArea()") + bOK = true + oObj.gotoEndOfUsedArea(true) + oAddress = oObj.getRangeAddress() + nEndSCol = oAddress.StartColumn + nEndECol = oAddress.EndColumn + nEndSRow = oAddress.StartRow + nEndERow = oAddress.EndRow + + 'get the results + bOK = bOK AND ((nStartSCol <> nEndSCol) OR (nStartECol <> nEndECol) OR _ + (nStartSRow <> nEndSRow) OR (nStartERow <> nEndERow)) + + Test.MethodTested("gotoStartOfUsedArea()", bOK) + Test.MethodTested("gotoEndOfUsedArea()", bOK) + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/sheet/XViewFreezable/script.xlb b/qadevOOo/tests/basic/ifc/sheet/XViewFreezable/script.xlb new file mode 100644 index 000000000000..251284d32141 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/sheet/XViewFreezable/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="sheet_XViewFreezable" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sheet_XViewFreezable"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/sheet/XViewFreezable/sheet_XViewFreezable.xba b/qadevOOo/tests/basic/ifc/sheet/XViewFreezable/sheet_XViewFreezable.xba new file mode 100644 index 000000000000..f1b48399ed44 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/sheet/XViewFreezable/sheet_XViewFreezable.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="sheet_XViewFreezable" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2000, 2010 Oracle and/or its affiliates. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + +' Be sure that all variables are dimensioned: +option explicit + + + +Sub RunTest() + +'************************************************************************* +' INTERFACE: +' com.sun.star.sheet.XViewFreezable +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + + Test.StartMethod("freezeAtPosition()") + bOK = true + ' Only one of XViewSplitable::getIsWindowSplit() and + ' XViewFreezable::hasFrozenPanes() can be true + + oObj.SplitAtPosition(100, 100) + bOK = bOK AND oObj.getIsWindowSplit() + oObj.freezeAtPosition(0, 10) + bOK = bOK AND NOT oObj.getIsWindowSplit() + Test.MethodTested("freezeAtPosition()", bOK) + + Test.StartMethod("hasFrozenPanes()") + bOK = true + oObj.freezeAtPosition(3, 0) + bOK = bOK AND oObj.hasFrozenPanes() + oObj.SplitAtPosition(100, 100) + bOK = bOK AND NOT oObj.hasFrozenPanes() + Test.MethodTested("hasFrozenPanes()", bOK) + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/sheet/XViewPane/script.xlb b/qadevOOo/tests/basic/ifc/sheet/XViewPane/script.xlb new file mode 100644 index 000000000000..59b8e6c28258 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/sheet/XViewPane/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="sheet_XViewPane" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sheet_XViewPane"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/sheet/XViewPane/sheet_XViewPane.xba b/qadevOOo/tests/basic/ifc/sheet/XViewPane/sheet_XViewPane.xba new file mode 100644 index 000000000000..86be1f937a3c --- /dev/null +++ b/qadevOOo/tests/basic/ifc/sheet/XViewPane/sheet_XViewPane.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="sheet_XViewPane" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2000, 2010 Oracle and/or its affiliates. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + +' Be sure that all variables are dimensioned: +option explicit + + + +Sub RunTest() + +'************************************************************************* +' INTERFACE: +' com.sun.star.sheet.XViewPane +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim nCol, nRow As Integer + Dim oRange As Object + + Test.StartMethod("getFirstVisibleColumn()") + Test.StartMethod("setFirstVisibleColumn()") + bOK = true + nCol = oObj.getFirstVisibleColumn() + oObj.setFirstVisibleColumn(nCol + 4) + bOK = bOK AND nCol = oObj.getFirstVisibleColumn() - 4 + Test.MethodTested("getFirstVisibleColumn()", bOK) + Test.MethodTested("setFirstVisibleColumn()", bOK) + + Test.StartMethod("getFirstVisibleRow()") + Test.StartMethod("setFirstVisibleRow()") + bOK = true + nRow = oObj.getFirstVisibleRow() + oObj.setFirstVisibleRow(nRow + 4) + bOK = bOK AND nRow = oObj.getFirstVisibleRow() - 4 + Test.MethodTested("getFirstVisibleRow()", bOK) + Test.MethodTested("setFirstVisibleRow()", bOK) + + Test.StartMethod("getVisibleRange()") + bOK = true + oRange = oObj.getVisibleRange() + bOK = bOK AND NOT isNULL(oRange) + bOK = bOK AND oRange.StartColumn = nCol + 4 + bOK = bOK AND oRange.StartRow = nRow + 4 + Test.MethodTested("getVisibleRange()", bOK) + + ' We have to re-create object, as it's was referred range was changed here. + DisposeObj() + CreateObj() +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/sheet/XViewSplitable/script.xlb b/qadevOOo/tests/basic/ifc/sheet/XViewSplitable/script.xlb new file mode 100644 index 000000000000..62ab086ba658 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/sheet/XViewSplitable/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="sheet_XViewSplitable" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sheet_XViewSplitable"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/sheet/XViewSplitable/sheet_XViewSplitable.xba b/qadevOOo/tests/basic/ifc/sheet/XViewSplitable/sheet_XViewSplitable.xba new file mode 100644 index 000000000000..b9d25b417916 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/sheet/XViewSplitable/sheet_XViewSplitable.xba @@ -0,0 +1,133 @@ +<?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="sheet_XViewSplitable" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2000, 2010 Oracle and/or its affiliates. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + +' Be sure that all variables are dimensioned: +option explicit + +Dim XSplitPos As Long +Dim YSplitPos As Long + + +Sub RunTest() + +'************************************************************************* +' INTERFACE: +' com.sun.star.sheet.XViewSplitable +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + + Test.StartMethod("splitAtPosition()") + bOK = true + ' Only one of XViewSplitable::getIsWindowSplit() and + ' XViewFreezable::hasFrozenPanes() can be true + + oObj.freezeAtPosition(10, 10) + bOK = bOK AND oObj.hasFrozenPanes() + SplitAt(100, 200) + bOK = bOK AND NOT oObj.hasFrozenPanes() + Test.MethodTested("splitAtPosition()", bOK) + + Test.StartMethod("getIsWindowSplit()") + bOK = true + SplitAt(0, 0) + bOK = bOK AND NOT oObj.getIsWindowSplit() + SplitAt(50, 50) + bOK = bOK AND oObj.getIsWindowSplit() + + Test.MethodTested("getIsWindowSplit()", bOK) + + Test.StartMethod("getSplitHorizontal()") + bOK = true + SplitAt(0, 0) + bOK = bOK AND oObj.getSplitHorizontal() = XSplitPos + SplitAt(0, 100) + bOK = bOK AND oObj.getSplitHorizontal() = XSplitPos + SplitAt(100, 0) + bOK = bOK AND oObj.getSplitHorizontal() = XSplitPos + SplitAt(100, 100) + bOK = bOK AND oObj.getSplitHorizontal() = XSplitPos + Test.MethodTested("getSplitHorizontal()", bOK) + + Test.StartMethod("getSplitVertical()") + bOK = true + SplitAt(0, 0) + bOK = bOK AND oObj.getSplitVertical() = YSplitPos + SplitAt(100, 0) + bOK = bOK AND oObj.getSplitVertical() = YSplitPos + SplitAt(100, 100) + bOK = bOK AND oObj.getSplitVertical() = YSplitPos + SplitAt(0, 100) + bOK = bOK AND oObj.getSplitVertical() = YSplitPos + Test.MethodTested("getSplitVertical()", bOK) + + Test.StartMethod("getSplitColumn()") + bOK = true + SplitAt(0, 0) + bOK = bOK AND oObj.getSplitColumn() = 0 + SplitAt(0, 100) + bOK = bOK AND oObj.getSplitColumn() = 0 + SplitAt(100, 100) + bOK = bOK AND oObj.getSplitColumn() <> 0 + SplitAt(100, 0) + bOK = bOK AND oObj.getSplitColumn() <> 0 + Test.MethodTested("getSplitColumn()", bOK) + + Test.StartMethod("getSplitRow()") + bOK = true + SplitAt(0, 0) + bOK = bOK AND oObj.getSplitRow() = 0 + SplitAt(100, 0) + bOK = bOK AND oObj.getSplitRow() = 0 + SplitAt(100, 100) + bOK = bOK AND oObj.getSplitRow() <> 0 + SplitAt(0, 100) + bOK = bOK AND oObj.getSplitRow() <> 0 + Test.MethodTested("getSplitRow()", bOK) + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub + +Sub SplitAt(x As Long, y As Long) + Out.Log("Spliting At position (" & x & ", " & y & ")") + oObj.SplitAtPosition(x, y) + XSplitPos = x + YSplitPos = y +End Sub +</script:module> |