diff options
Diffstat (limited to 'qadevOOo/tests/basic/ifc/style')
18 files changed, 1078 insertions, 0 deletions
diff --git a/qadevOOo/tests/basic/ifc/style/CharacterProperties/script.xlb b/qadevOOo/tests/basic/ifc/style/CharacterProperties/script.xlb new file mode 100644 index 000000000000..8fba4931cf47 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/style/CharacterProperties/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="style_CharacterProperties" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="style_CharacterProperties"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/style/CharacterProperties/style_CharacterProperties.xba b/qadevOOo/tests/basic/ifc/style/CharacterProperties/style_CharacterProperties.xba new file mode 100644 index 000000000000..48805b3691ed --- /dev/null +++ b/qadevOOo/tests/basic/ifc/style/CharacterProperties/style_CharacterProperties.xba @@ -0,0 +1,292 @@ +<?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="style_CharacterProperties" 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.style.CharacterProperties +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim oStyleFamilies, oCharStyles As Variant + + PropertyTester.TestProperty("CharFontName") + + PropertyTester.TestProperty("CharFontStyleName") + + Dim aFamilys(6) As Integer + with com.sun.star.awt.FontFamily + aFamilys(0) = .DONTKNOW + aFamilys(1) = .DECORATIVE + aFamilys(2) = .MODERN + aFamilys(3) = .ROMAN + aFamilys(4) = .SCRIPT + aFamilys(5) = .SWISS + aFamilys(6) = .SYSTEM + end with + PropertyTester.TestProperty("CharFontFamily",aFamilys()) + + Dim aCharSetArray(10) As Integer + with com.sun.star.awt.CharSet + aCharSetArray(0) = .DONTKNOW + aCharSetArray(1) = .ANSI + aCharSetArray(2) = .MAC + aCharSetArray(3) = .IBMPC_437 + aCharSetArray(4) = .IBMPC_850 + aCharSetArray(5) = .IBMPC_860 + aCharSetArray(6) = .IBMPC_861 + aCharSetArray(7) = .IBMPC_863 + aCharSetArray(8) = .IBMPC_865 + aCharSetArray(9) = .SYSTEM + aCharSetArray(10) = .SYMBOL + end with + + PropertyTester.TestProperty("CharFontCharSet",aCharSetArray()) + + Dim aFontPitchArray(3) As Integer + with com.sun.star.awt.FontPitch + aFontPitchArray(0) = .DONTKNOW + aFontPitchArray(1) = .FIXED + aFontPitchArray(2) = .VARIABLE + end with + PropertyTester.TestProperty("CharFontPitch",aFontPitchArray()) + + PropertyTester.TestProperty("CharColor") + + Dim vCharEsc (0 to 4) As Integer + vCharEsc(0) = -100 + vCharEsc(1) = 100 + vCharEsc(2) = -63 + vCharEsc(3) = 76 + vCharEsc(4) = 0 + PropertyTester.TestProperty("CharEscapement",vCharEsc()) + + 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 aUnderlineArray(18) As Integer + with com.sun.star.awt.FontUnderline + aUnderlineArray(0) = .NONE + aUnderlineArray(1) = .SINGLE + aUnderlineArray(2) = .DOUBLE + aUnderlineArray(3) = .DOTTED + aUnderlineArray(4) = .DONTKNOW + aUnderlineArray(5) = .DASH + aUnderlineArray(6) = .LONGDASH + aUnderlineArray(7) = .DASHDOT + aUnderlineArray(8) = .DASHDOTDOT + aUnderlineArray(9) = .SMALLWAVE + aUnderlineArray(10) = .WAVE + aUnderlineArray(11) = .DOUBLEWAVE + aUnderlineArray(12) = .BOLD + aUnderlineArray(13) = .BOLDDOTTED + aUnderlineArray(14) = .BOLDDASH + aUnderlineArray(15) = .BOLDLONGDASH + aUnderlineArray(16) = .BOLDDASHDOT + aUnderlineArray(17) = .BOLDDASHDOTDOT + aUnderlineArray(18) = .BOLDWAVE + end with + PropertyTester.TestProperty("CharUnderline",aUnderlineArray()) + + 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("CharAutoKerning") + + PropertyTester.TestProperty("CharBackColor") + + PropertyTester.TestProperty("CharBackTransparent") + + Dim aCaseMaps(4) As Integer + with com.sun.star.style.CaseMap + aCaseMaps(0) = .NONE + aCaseMaps(1) = .UPPERCASE + aCaseMaps(2) = .LOWERCASE + aCaseMaps(3) = .TITLE + aCaseMaps(4) = .SMALLCAPS + end with + PropertyTester.TestProperty("CharCaseMap",aCaseMaps()) + + PropertyTester.TestProperty("CharCrossedOut") + + PropertyTester.TestProperty("CharFlash") + + Dim aStrikeoutArray(6) As Integer + with com.sun.star.awt.FontStrikeout + aStrikeoutArray(0) = .NONE + aStrikeoutArray(1) = .SINGLE + aStrikeoutArray(2) = .DOUBLE + aStrikeoutArray(3) = .DONTKNOW + aStrikeoutArray(4) = .BOLD + aStrikeoutArray(5) = .SLASH + aStrikeoutArray(6) = .X + end with + PropertyTester.TestProperty("CharStrikeout",aStrikeoutArray()) + + PropertyTester.TestProperty("CharWordMode") + + PropertyTester.TestProperty("CharKerning") + + PropertyTester.TestProperty("CharLocale") + + PropertyTester.TestProperty("CharKeepTogether") + + PropertyTester.TestProperty("CharNoLineBreak") + + PropertyTester.TestProperty("CharShadowed") + + PropertyTester.TestProperty("CharFontType") + + PropertyTester.TestProperty("CharContoured") + + PropertyTester.TestProperty("CharCombineIsOn") + + oObj.setPropertyValue("CharCombineIsOn", true) + Dim aPrifixes(1) As String + aPrifixes(0) = "(" + aPrifixes(1) = "[" + PropertyTester.TestProperty("CharCombinePrefix", aPrifixes()) + + Dim aSuffixes(1) As String + aSuffixes(0) = ")" + aSuffixes(1) = "]" + PropertyTester.TestProperty("CharCombineSuffix", aSuffixes()) + + Dim aCharEmphasizeArr(8) As Integer + with com.sun.star.text.FontEmphasis + aCharEmphasizeArr(0) = .NONE + aCharEmphasizeArr(1) = .DOT_ABOVE + aCharEmphasizeArr(2) = .CIRCLE_ABOVE + aCharEmphasizeArr(3) = .DISK_ABOVE + aCharEmphasizeArr(4) = .ACCENT_ABOVE + aCharEmphasizeArr(5) = .DOT_BELOW + aCharEmphasizeArr(6) = .CIRCLE_BELOW + aCharEmphasizeArr(7) = .DISK_BELOW + aCharEmphasizeArr(8) = .ACCENT_BELOW + end with + PropertyTester.TestProperty("CharEmphasize",aCharEmphasizeArr()) + + Dim aReliefs(2) As Integer + with com.sun.star.text.FontRelief + aReliefs(0) = .NONE + aReliefs(1) = .EMBOSSED + aReliefs(2) = .ENGRAVED + end with + PropertyTester.TestProperty("CharRelief",aReliefs()) + + PropertyTester.TestProperty("CharRotationIsFitToLine") + + PropertyTester.TestProperty("CharScaleWidth") + + Dim aRotat(2) As Integer + aRotat(0) = 900 + aRotat(1) = 2700 + aRotat(2) = 0 + PropertyTester.TestProperty("CharRotation",aRotat()) + + PropertyTester.TestProperty("RubyText") + + PropertyTester.TestProperty("RubyIsAbove") + + Dim aAdjusts(5) As Integer + aAdjusts(0) = com.sun.star.text.RubyAdjust.LEFT + aAdjusts(1) = com.sun.star.text.RubyAdjust.CENTER + aAdjusts(2) = com.sun.star.text.RubyAdjust.RIGHT + aAdjusts(3) = com.sun.star.text.RubyAdjust.LEFT + aAdjusts(4) = com.sun.star.text.RubyAdjust.BLOCK + aAdjusts(5) = com.sun.star.text.RubyAdjust.INDENT_BLOCK + PropertyTester.TestProperty("RubyAdjust", aAdjusts()) + + Dim aCharStyleNames() As String + oStyleFamilies = oDoc.StyleFamilies + oCharStyles = oStyleFamilies.getByIndex(0) + aCharStyleNames() = oCharStyles.Elementnames() + aCharStyleNames(0) = aCharStyleNames(2) ' "Standard" the same as "", exclude it... + + PropertyTester.TestProperty("RubyCharStyleName",aCharStyleNames()) + + PropertyTester.TestProperty("CharStyleName",aCharStyleNames()) + + PropertyTester.TestProperty("CharRotationIsFitToLine") + PropertyTester.TestProperty("CharScaleWidth") + PropertyTester.TestProperty("HyperLinkURL") + PropertyTester.TestProperty("HyperLinkTarget") + PropertyTester.TestProperty("HyperLinkName") + + Dim nHeight(0 to 2) as Integer + nHeight(0)=1 + nHeight(1)=33 + nHeight(2)=100 + PropertyTester.TestProperty("CharEscapementHeight", nHeight()) + + PropertyTester.TestProperty("CharNoHyphenation") + PropertyTester.TestProperty("CharUnderlineHasColor") + oObj.CharUnderlineHasColor = TRUE + PropertyTester.TestProperty("CharUnderlineColor") + + ReCreateObj() + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/style/CharacterPropertiesAsian/script.xlb b/qadevOOo/tests/basic/ifc/style/CharacterPropertiesAsian/script.xlb new file mode 100644 index 000000000000..55654ebf43b4 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/style/CharacterPropertiesAsian/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="style_CharacterPropertiesAsian" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="style_CharacterPropertiesAsian"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/style/CharacterPropertiesAsian/style_CharacterPropertiesAsian.xba b/qadevOOo/tests/basic/ifc/style/CharacterPropertiesAsian/style_CharacterPropertiesAsian.xba new file mode 100644 index 000000000000..956cfe025e24 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/style/CharacterPropertiesAsian/style_CharacterPropertiesAsian.xba @@ -0,0 +1,100 @@ +<?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="style_CharacterPropertiesAsian" 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.style.CharacterPropertiesAsian +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + + Dim charHeightAsian(3) As Double + charHeightAsian(0) = 12.3 + charHeightAsian(1) = 16.2 + charHeightAsian(2) = 26.6 + charHeightAsian(3) = 42.8 + + Dim charWeightAsian(9) As Integer + with com.sun.star.awt.FontWeight + charWeightAsian(0) = .DONTKNOW + charWeightAsian(1) = .THIN + charWeightAsian(2) = .ULTRALIGHT + charWeightAsian(3) = .LIGHT + charWeightAsian(4) = .SEMILIGHT + charWeightAsian(5) = .NORMAL + charWeightAsian(6) = .SEMIBOLD + charWeightAsian(7) = .BOLD + charWeightAsian(8) = .ULTRABOLD + charWeightAsian(9) = .BLACK + end with + + PropertyTester.TestProperty("CharHeightAsian",charHeightAsian()) + + PropertyTester.TestProperty("CharWeightAsian",charWeightAsian()) + + PropertyTester.TestProperty("CharFontNameAsian") + + PropertyTester.TestProperty("CharFontStyleNameAsian") + + PropertyTester.TestProperty("CharFontFamilyAsian") + + PropertyTester.TestProperty("CharFontCharSetAsian") + + PropertyTester.TestProperty("CharFontPitchAsian") + + PropertyTester.TestProperty("CharPostureAsian") + + PropertyTester.TestProperty("CharLocaleAsian") + + PropertyTester.TestProperty("ParaIsCharacterDistance") + + PropertyTester.TestProperty("ParaIsForbiddenRules") + + PropertyTester.TestProperty("ParaIsHangingPunctuation") + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/style/CharacterPropertiesComplex/script.xlb b/qadevOOo/tests/basic/ifc/style/CharacterPropertiesComplex/script.xlb new file mode 100644 index 000000000000..47d057ab617b --- /dev/null +++ b/qadevOOo/tests/basic/ifc/style/CharacterPropertiesComplex/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="style_CharacterPropertiesComplex" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="style_CharacterPropertiesComplex"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/style/CharacterPropertiesComplex/style_CharacterPropertiesComplex.xba b/qadevOOo/tests/basic/ifc/style/CharacterPropertiesComplex/style_CharacterPropertiesComplex.xba new file mode 100644 index 000000000000..6ff647853299 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/style/CharacterPropertiesComplex/style_CharacterPropertiesComplex.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="style_CharacterPropertiesComplex" 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.style.CharacterPropertiesComplex +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + + Dim charHeightComplex(3) As Double + charHeightComplex(0) = 12.3 + charHeightComplex(1) = 16.2 + charHeightComplex(2) = 26.6 + charHeightComplex(3) = 42.8 + + Dim charWeightComplex(9) As Integer + with com.sun.star.awt.FontWeight + charWeightComplex(0) = .DONTKNOW + charWeightComplex(1) = .THIN + charWeightComplex(2) = .ULTRALIGHT + charWeightComplex(3) = .LIGHT + charWeightComplex(4) = .SEMILIGHT + charWeightComplex(5) = .NORMAL + charWeightComplex(6) = .SEMIBOLD + charWeightComplex(7) = .BOLD + charWeightComplex(8) = .ULTRABOLD + charWeightComplex(9) = .BLACK + end with + + PropertyTester.TestProperty("CharHeightComplex",charHeightComplex()) + + PropertyTester.TestProperty("CharWeightComplex",charWeightComplex()) + + PropertyTester.TestProperty("CharFontNameComplex") + + PropertyTester.TestProperty("CharFontStyleNameComplex") + + PropertyTester.TestProperty("CharFontFamilyComplex") + + PropertyTester.TestProperty("CharFontCharSetComplex") + + PropertyTester.TestProperty("CharFontPitchComplex") + + PropertyTester.TestProperty("CharPostureComplex") + + PropertyTester.TestProperty("CharLocaleComplex") + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/style/ParagraphProperties/script.xlb b/qadevOOo/tests/basic/ifc/style/ParagraphProperties/script.xlb new file mode 100644 index 000000000000..9a6f2064f777 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/style/ParagraphProperties/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="style_ParagraphProperties" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="style_ParagraphProperties"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/style/ParagraphProperties/style_ParagraphProperties.xba b/qadevOOo/tests/basic/ifc/style/ParagraphProperties/style_ParagraphProperties.xba new file mode 100644 index 000000000000..922c6fcec0a9 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/style/ParagraphProperties/style_ParagraphProperties.xba @@ -0,0 +1,212 @@ +<?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="style_ParagraphProperties" 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.style.ParagraphProperties +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + + if hasUnoInterfaces(oObj, "com.sun.star.text.XTextRange") then + oObj.String = "This is an example string from ParagraphProperties..." + end if + + Dim nParaAdjust(3) As Integer + nParaAdjust(0) = com.sun.star.style.ParagraphAdjust.LEFT + nParaAdjust(1) = com.sun.star.style.ParagraphAdjust.RIGHT + nParaAdjust(2) = com.sun.star.style.ParagraphAdjust.BLOCK + nParaAdjust(3) = com.sun.star.style.ParagraphAdjust.CENTER + ' STRETCH???? + + Dim nLastLineAdjust(2) As Integer + nLastLineAdjust(0) = com.sun.star.style.ParagraphAdjust.LEFT + nLastLineAdjust(1) = com.sun.star.style.ParagraphAdjust.BLOCK + nLastLineAdjust(2) = com.sun.star.style.ParagraphAdjust.CENTER + ' STRETCH???? + + Out.Log("Starting ...") + + PropertyTester.TestProperty("ParaAdjust",nParaAdjust()) + + PropertyTester.TestProperty("ParaLineSpacing") + + PropertyTester.TestProperty("ParaBackColor") + + PropertyTester.TestProperty("ParaBackTransparent") + + PropertyTester.TestProperty("ParaBackGraphicURL") + + PropertyTester.TestProperty("ParaBackGraphicFilter") + + PropertyTester.TestProperty("ParaBackGraphicLocation") + + Out.Log("set ParaAdjust to com.sun.star.style.ParagraphAdjust.BLOCK") + oObj.ParaAdjust = com.sun.star.style.ParagraphAdjust.BLOCK + PropertyTester.TestProperty("ParaLastLineAdjust",nLastLineAdjust()) + oObj.ParaAdjust = com.sun.star.style.ParagraphAdjust.LEFT + + PropertyTester.TestProperty("ParaExpandSingleWord") + + Dim margins(2) As Integer + margins(0) = 0 + margins(1) = 50 + margins(2) = 100 + + PropertyTester.TestProperty("ParaLeftMargin",margins()) + + PropertyTester.TestProperty("ParaRightMargin",margins()) + + PropertyTester.TestProperty("ParaTopMargin",margins()) + + PropertyTester.TestProperty("ParaBottomMargin",margins()) + + PropertyTester.TestProperty("ParaLineNumberCount") + + PropertyTester.TestProperty("ParaLineNumberStartValue") + + Dim cPageDescName(0 To 1) As String + cPageDescName(0) = "HTML" + cPageDescName(1) = "Standard" + PropertyTester.TestProperty("PageDescName",cPageDescName()) + + PropertyTester.TestProperty("PageNumberOffset") + + PropertyTester.TestProperty("ParaRegisterModeActive") + + PropertyTester.TestProperty("ParaTabStops") + + Dim cParaStyleName(0 to 3) As String + cParaStyleName(0) = "Heading 1" + cParaStyleName(1) = "First line indent" + cParaStyleName(2) = "Text body" + cParaStyleName(3) = "Standard" + PropertyTester.TestProperty("ParaStyleName",cParaStyleName()) + + PropertyTester.TestProperty("DropCapFormat") + + PropertyTester.TestProperty("DropCapWholeWord") + + PropertyTester.TestProperty("ParaKeepTogether") + + PropertyTester.TestProperty("ParaSplit") + + Dim nLevel(0 to 1) As Integer + nLevel(0) = 3 + nLevel(1) = 0 + Out.Log("Set NumberingStyleName to 'List 2' " + if PropertyTester.isAvailable("NumberingStyleName") then + oObj.NumberingStyleName = "List 2" + end if + PropertyTester.TestProperty("NumberingLevel",nLevel()) + + PropertyTester.TestProperty("NumberingRules") + + PropertyTester.TestProperty("NumberingStartValue") + + PropertyTester.TestProperty("ParaIsNumberingRestart") + + Dim cStyleName(0 to 1) As String + cStyleName(0) = "List 1" + cStyleName(1) = "Numbering 2" + PropertyTester.TestProperty("NumberingStyleName",cStyleName()) + + PropertyTester.TestProperty("ParaOrphans") + + PropertyTester.TestProperty("ParaWidows") + + PropertyTester.TestProperty("ParaShadowFormat") + + PropertyTester.TestProperty("LeftBorder") + + PropertyTester.TestProperty("RightBorder") + + PropertyTester.TestProperty("TopBorder") + + PropertyTester.TestProperty("BottomBorder") + + PropertyTester.TestProperty("BorderDistance") + + PropertyTester.TestProperty("LeftBorderDistance") + + PropertyTester.TestProperty("RightBorderDistance") + + PropertyTester.TestProperty("TopBorderDistance") + + PropertyTester.TestProperty("BottomBorderDistance") + + PropertyTester.TestProperty("BreakType") + + Dim cCharStyles(1) as String + cCharStyles(0) = "Emphasis" + CCharStyles(1) = "Teletype" + + PropertyTester.TestProperty("DropCapCharStyleName",cCharStyles()) + + PropertyTester.TestProperty("ParaFirstLineIndent") + + PropertyTester.TestProperty("ParaIsAutoFirstLineIndent") + + PropertyTester.TestProperty("ParaHyphenationMaxHyphens") + + PropertyTester.TestProperty("ParaHyphenationMaxLeadingChars") + + PropertyTester.TestProperty("ParaHyphenationMaxTrailingChars") + + Dim VertAlign(0 to 4) as Integer + Dim nCount as Integer + for nCount = 0 to uBound(VertAlign()) + VertAlign(nCount) = nCount + next nCount + PropertyTester.TestProperty("ParaVertAlignment", VertAlign()) + + PropertyTester.TestProperty("ParaUserDefinedAttributes") + + PropertyTester.TestProperty("ParaIsHyphenation") + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/style/ParagraphPropertiesAsian/script.xlb b/qadevOOo/tests/basic/ifc/style/ParagraphPropertiesAsian/script.xlb new file mode 100644 index 000000000000..38149c374b1f --- /dev/null +++ b/qadevOOo/tests/basic/ifc/style/ParagraphPropertiesAsian/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="style_ParagraphPropertiesAsian" library:readonly="false" library:passwordprotected="false"> + <library:element library:name="style_ParagraphPropertiesAsian"/> + </library:library> diff --git a/qadevOOo/tests/basic/ifc/style/ParagraphPropertiesAsian/style_ParagraphPropertiesAsian.xba b/qadevOOo/tests/basic/ifc/style/ParagraphPropertiesAsian/style_ParagraphPropertiesAsian.xba new file mode 100644 index 000000000000..887375db02b2 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/style/ParagraphPropertiesAsian/style_ParagraphPropertiesAsian.xba @@ -0,0 +1,63 @@ +<?xml version="1.0" encoding="UTF-8"?> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="style_ParagraphPropertiesAsian" 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.style.ParagraphPropertiesAsian +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + + +' + PropertyTester.TestProperty("ParaIsHangingPunctuation") + + PropertyTester.TestProperty("ParaIsCharacterDistance") + + PropertyTester.TestProperty("ParaIsForbiddenRules") + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/style/ParagraphPropertiesComplex/script.xlb b/qadevOOo/tests/basic/ifc/style/ParagraphPropertiesComplex/script.xlb new file mode 100644 index 000000000000..e9f33ed0a38e --- /dev/null +++ b/qadevOOo/tests/basic/ifc/style/ParagraphPropertiesComplex/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="style_ParagraphPropertiesComplex" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="style_ParagraphPropertiesComplex"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/style/ParagraphPropertiesComplex/style_ParagraphPropertiesComplex.xba b/qadevOOo/tests/basic/ifc/style/ParagraphPropertiesComplex/style_ParagraphPropertiesComplex.xba new file mode 100644 index 000000000000..45c0e719955b --- /dev/null +++ b/qadevOOo/tests/basic/ifc/style/ParagraphPropertiesComplex/style_ParagraphPropertiesComplex.xba @@ -0,0 +1,58 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="style_ParagraphPropertiesComplex" 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.style.ParagraphPropertiesComplex +'************************************************************************* +On Error Goto ErrHndl + + Dim newVals As Variant + newVals = Array(0, 1, 2, 3, 4) + PropertyTester.TestProperty("WritingMode", newVals()) + +Exit Sub +ErrHndl: + Test.Exception() + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/style/Style/script.xlb b/qadevOOo/tests/basic/ifc/style/Style/script.xlb new file mode 100644 index 000000000000..e38e0da873aa --- /dev/null +++ b/qadevOOo/tests/basic/ifc/style/Style/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="style_Style" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="style_Style"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/style/Style/style_Style.xba b/qadevOOo/tests/basic/ifc/style/Style/style_Style.xba new file mode 100644 index 000000000000..e1e8f67685d9 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/style/Style/style_Style.xba @@ -0,0 +1,62 @@ +<?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="style_Style" 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.style.Style +'************************************************************************* +On Error Goto ErrHndl + + PropertyTester.TestProperty("IsPhysical") + + PropertyTester.TestProperty("FollowStyle") + + PropertyTester.TestProperty("DisplayName") + + PropertyTester.TestProperty("IsAutoUpdate") + +Exit Sub +ErrHndl: + Test.Exception() + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/style/XStyle/script.xlb b/qadevOOo/tests/basic/ifc/style/XStyle/script.xlb new file mode 100644 index 000000000000..359a7b3efb62 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/style/XStyle/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="style_XStyle" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="style_XStyle"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/style/XStyle/style_XStyle.xba b/qadevOOo/tests/basic/ifc/style/XStyle/style_XStyle.xba new file mode 100644 index 000000000000..0e8b9c872be8 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/style/XStyle/style_XStyle.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="style_XStyle" 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 oStandartStyle As Object + +'************************************************************************* + + + + + + +Sub RunTest() + +'************************************************************************* +' INTERFACE: +' com.sun.star.style.XStyle +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim cName, cObjName As String + + Test.StartMethod("isUserDefined()") + bOK = true + bOK = bOK AND oObj.isUserDefined() AND NOT oStandartStyle.isUserDefined() + Test.MethodTested("isUserDefined()", bOK) + + Test.StartMethod("isInUse()") + bOK = true + bOK = bOK AND oObj.isInUse() + Test.MethodTested("isInUse()", bOK) + + Test.StartMethod("setParentStyle()") + Test.StartMethod("getParentStyle()") + bOK = true + cName = oStandartStyle.Name + Out.Log("setting name to '" & cName & "'") + oObj.setParentStyle(cName) + cObjName = oObj.getParentStyle() + Out.Log("name is '" & cObjName & "'") + bOK = bOK AND cObjName = cName + Test.MethodTested("getParentStyle()", bOK) + Test.MethodTested("setParentStyle()", bOK) + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/style/XStyleFamiliesSupplier/script.xlb b/qadevOOo/tests/basic/ifc/style/XStyleFamiliesSupplier/script.xlb new file mode 100644 index 000000000000..3f55b2fa6d90 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/style/XStyleFamiliesSupplier/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="style_XStyleFamiliesSupplier" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="style_XStyleFamiliesSupplier"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/style/XStyleFamiliesSupplier/style_XStyleFamiliesSupplier.xba b/qadevOOo/tests/basic/ifc/style/XStyleFamiliesSupplier/style_XStyleFamiliesSupplier.xba new file mode 100644 index 000000000000..27ea60e95a47 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/style/XStyleFamiliesSupplier/style_XStyleFamiliesSupplier.xba @@ -0,0 +1,62 @@ +<?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="style_XStyleFamiliesSupplier" 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.style.XStyleFamiliesSupplier +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim oFam As Object + + + Test.StartMethod("getStyleFamilies()") + bOK = true + oFam = oObj.getStyleFamilies() + bOK = NOT isNULL(oFam) + bOK = bOK AND hasUnoInterfaces(oFam, "com.sun.star.container.XNameAccess") + Test.MethodTested("getStyleFamilies()", bOK) + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> |