summaryrefslogtreecommitdiff
path: root/qadevOOo/tests/java/ifc/style
diff options
context:
space:
mode:
Diffstat (limited to 'qadevOOo/tests/java/ifc/style')
-rw-r--r--qadevOOo/tests/java/ifc/style/_CharacterProperties.java544
-rw-r--r--qadevOOo/tests/java/ifc/style/_CharacterPropertiesAsian.java77
-rw-r--r--qadevOOo/tests/java/ifc/style/_CharacterPropertiesComplex.java69
-rwxr-xr-xqadevOOo/tests/java/ifc/style/_CharacterStyle.java50
-rwxr-xr-xqadevOOo/tests/java/ifc/style/_PageProperties.java125
-rwxr-xr-xqadevOOo/tests/java/ifc/style/_PageStyle.java56
-rw-r--r--qadevOOo/tests/java/ifc/style/_ParagraphProperties.java507
-rw-r--r--qadevOOo/tests/java/ifc/style/_ParagraphPropertiesAsian.java86
-rw-r--r--qadevOOo/tests/java/ifc/style/_ParagraphPropertiesComplex.java55
-rw-r--r--qadevOOo/tests/java/ifc/style/_ParagraphStyle.java36
-rw-r--r--qadevOOo/tests/java/ifc/style/_Style.java54
-rw-r--r--qadevOOo/tests/java/ifc/style/_XStyle.java117
-rw-r--r--qadevOOo/tests/java/ifc/style/_XStyleFamiliesSupplier.java55
13 files changed, 1831 insertions, 0 deletions
diff --git a/qadevOOo/tests/java/ifc/style/_CharacterProperties.java b/qadevOOo/tests/java/ifc/style/_CharacterProperties.java
new file mode 100644
index 000000000000..d6e6977222a4
--- /dev/null
+++ b/qadevOOo/tests/java/ifc/style/_CharacterProperties.java
@@ -0,0 +1,544 @@
+/*************************************************************************
+ *
+ * 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.
+ *
+ ************************************************************************/
+
+package ifc.style;
+
+import com.sun.star.beans.XPropertySet;
+import com.sun.star.container.XNameContainer;
+import com.sun.star.uno.AnyConverter;
+import com.sun.star.uno.Type;
+import com.sun.star.xml.AttributeData;
+import java.util.Enumeration;
+import java.util.Hashtable;
+import lib.MultiPropertyTest;
+
+import util.ValueChanger;
+import util.utils;
+
+
+/**
+* Testing <code>com.sun.star.style.CharacterProperties</code>
+* service properties :
+* <ul>
+* <li><code> CharFontName</code></li>
+* <li><code> CharFontStyleName</code></li>
+* <li><code> CharFontFamily</code></li>
+* <li><code> CharFontCharSet</code></li>
+* <li><code> CharFontPitch</code></li>
+* <li><code> CharColor</code></li>
+* <li><code> CharEscapement</code></li>
+* <li><code> CharHeight</code></li>
+* <li><code> CharUnderline</code></li>
+* <li><code> CharWeight</code></li>
+* <li><code> CharPosture</code></li>
+* <li><code> CharAutoKerning</code></li>
+* <li><code> CharBackColor</code></li>
+* <li><code> CharBackTransparent</code></li>
+* <li><code> CharCaseMap</code></li>
+* <li><code> CharCrossedOut</code></li>
+* <li><code> CharFlash</code></li>
+* <li><code> CharStrikeout</code></li>
+* <li><code> CharWordMode</code></li>
+* <li><code> CharKerning</code></li>
+* <li><code> CharLocale</code></li>
+* <li><code> CharKeepTogether</code></li>
+* <li><code> CharNoLineBreak</code></li>
+* <li><code> CharShadowed</code></li>
+* <li><code> CharFontType</code></li>
+* <li><code> CharStyleName</code></li>
+* <li><code> CharContoured</code></li>
+* <li><code> CharCombineIsOn</code></li>
+* <li><code> CharCombinePrefix</code></li>
+* <li><code> CharCombineSuffix</code></li>
+* <li><code> CharEmphasize</code></li>
+* <li><code> CharRelief</code></li>
+* <li><code> RubyText</code></li>
+* <li><code> RubyAdjust</code></li>
+* <li><code> RubyCharStyleName</code></li>
+* <li><code> RubyIsAbove</code></li>
+* <li><code> CharRotation</code></li>
+* <li><code> CharRotationIsFitToLine</code></li>
+* <li><code> CharScaleWidth</code></li>
+* <li><code> HyperLinkURL</code></li>
+* <li><code> HyperLinkTarget</code></li>
+* <li><code> HyperLinkName</code></li>
+* <li><code> TextUserDefinedAttributes</code></li>
+* </ul> <p>
+* This test needs the following object relations :
+* <ul>
+* <li> <code>'PARA'</code>: <b>optional</b>
+* (must implement <code>XPropertySet</code>):
+* if this relation is specified then some properties
+* testing is performed in a special manner. (e.g. this used in
+* <code>sw.SwXParagraph</code> component) For details
+* see {@link #changeProp} method description. </li>
+* <li> <code>'PORTION'</code>: <b>optional</b>
+* (must implement <code>XPropertySet</code>):
+* if this relation is specified then some properties
+* testing is performed in a special manner. (e.g. this used in
+* <code>sw.SwXParagraph</code> component) For details
+* see {@link #changeProp} method description. </li>
+* <ul> <p>
+* Properties testing is automated by <code>lib.MultiPropertyTest</code>.
+* @see com.sun.star.style.CharacterProperties
+*/
+public class _CharacterProperties extends MultiPropertyTest {
+
+ public void _CharFontName() {
+ testProperty("CharFontName", "Times New Roman", "Arial") ;
+ }
+
+ public void _CharHeight() {
+ testProperty("CharHeight", new PropertyTester() {
+ protected Object getNewValue(String propName, Object old) {
+ if (utils.isVoid(old)) {
+ return new Float(10) ;
+ } else {
+ return new Float(((Float) old).floatValue() + 10) ;
+ }
+ }
+ }) ;
+ }
+
+ /**
+ * Custom tester for properties which contains image URLs.
+ * Switches between two JPG images' URLs.
+ */
+ protected PropertyTester URLTester = new PropertyTester() {
+ protected Object getNewValue(String propName, Object oldValue) {
+ if (oldValue.equals("http://www.sun.com"))
+ return "http://www.openoffice.org"; else
+ return "http://www.sun.com";
+ }
+ } ;
+
+ public void _HyperLinkURL() {
+ testProperty("HyperLinkURL", URLTester) ;
+ }
+
+ public void _HyperLinkName() {
+ testProperty("HyperLinkName", URLTester) ;
+ }
+
+ public void _HyperLinkTarget() {
+ testProperty("HyperLinkTarget", URLTester) ;
+ }
+
+ public void _CharWeight() {
+ testProperty("CharWeight", new Float(com.sun.star.awt.FontWeight.BOLD),
+ new Float(com.sun.star.awt.FontWeight.THIN)) ;
+ }
+
+ public void _CharPosture() {
+ testProperty("CharPosture", com.sun.star.awt.FontSlant.ITALIC,
+ com.sun.star.awt.FontSlant.NONE) ;
+ }
+
+ /**
+ * Custom tester for style name properties. If object relations "STYLENAME1"
+ * and "STYLENAME2" exists, then testing with these strings, else switches
+ * between 'Citation' and 'Emphasis' names.
+ */
+ protected PropertyTester StyleTester = new PropertyTester() {
+ protected Object getNewValue(String propName, Object oldValue) {
+ String oStyleName1 = (String) tEnv.getObjRelation("STYLENAME1");
+ String oStyleName2 = (String) tEnv.getObjRelation("STYLENAME2");
+ if ((oStyleName1 != null) && (oStyleName2 != null)){
+ log.println("use strings given by object relation: '"
+ + oStyleName1 + "' '" + oStyleName2 +"'");
+ if (oldValue.equals( oStyleName1))
+ return oStyleName2;
+ else
+ return oStyleName1;
+ }
+ if (utils.isVoid(oldValue) || (oldValue.equals("Standard")))
+ return "Example"; else
+ return "Emphasis";
+ }
+ } ;
+
+ /**
+ * Custom tester for style names properties. Switches between
+ * 'Citation' and 'Emphasis' names.
+ */
+ protected PropertyTester StylesTester = new PropertyTester() {
+ protected Object getNewValue(String propName, Object oldValue) {
+ if (utils.isVoid(oldValue) || (oldValue.equals("Standard")))
+ return new String[] {"Citation"}; else
+ return new String[] {"Emphasis"};
+ }
+ } ;
+
+ /**
+ * If relations for paragraph and portion exist, then testing
+ * of this property performed using these objects, else
+ * testing is performed in common way.
+ */
+ public void _CharStyleName() {
+ log.println("Testing with custom Property tester") ;
+ Object oPara = tEnv.getObjRelation("PARA");
+ Object oPort = tEnv.getObjRelation("PORTION");
+ if (oPara == null) {
+ testProperty("CharStyleName", StyleTester) ;
+ } else {
+ changeProp((XPropertySet) oPara,
+ (XPropertySet) oPort,"CharStyleName","Standard");
+ }
+ }
+
+ /**
+ * If relations for paragraph and portion exist, then testing
+ * of this property performed using these objects, else
+ * testing is performed in common way.
+ */
+ public void _CharStyleNames() {
+ log.println("Testing with custom Property tester") ;
+ Object oPara = tEnv.getObjRelation("PARA");
+ Object oPort = tEnv.getObjRelation("PORTION");
+ if (oPara == null) {
+ testProperty("CharStyleNames", StylesTester) ;
+ } else {
+ String[] newNames = {"Standard"};
+ changeProp((XPropertySet) oPara,
+ (XPropertySet) oPort,"CharStyleNames",new String[] {"Standard"});
+ }
+ }
+
+ /**
+ * If relations for paragraph and portion exist, then testing
+ * of this property performed using these objects, else
+ * testing is performed in common way.
+ */
+ public void _RubyCharStyleName() {
+ log.println("Testing with custom Property tester") ;
+ Object oPara = tEnv.getObjRelation("PARA");
+ Object oPort = tEnv.getObjRelation("PORTION");
+ if (oPara == null) {
+ testProperty("RubyCharStyleName", StyleTester) ;
+ } else {
+ changeProp((XPropertySet) oPara, (XPropertySet)
+ oPort,"RubyCharStyleName","Standard");
+ }
+ }
+
+ /**
+ * If relations for paragraph and portion exist, then testing
+ * of this property performed using these objects, else
+ * testing is performed in common way.
+ */
+ public void _RubyAdjust() {
+ log.println("Testing with custom Property tester") ;
+ Object oPara = tEnv.getObjRelation("PARA");
+ Object oPort = tEnv.getObjRelation("PORTION");
+ if (oPara == null) {
+ testProperty("RubyAdjust",new Short((short)0),new Short((short)1));
+ } else {
+ Short aShort = new Short((short) 1);
+ changeProp((XPropertySet) oPara,
+ (XPropertySet) oPort,"RubyAdjust", aShort);
+ }
+ Short aShort = new Short((short) 1);
+ }
+
+ /**
+ * Custom tester for the ruby text property.
+ */
+ protected PropertyTester RubyTextTester = new PropertyTester() {
+ protected Object getNewValue(String propName, Object oldValue)
+ throws java.lang.IllegalArgumentException {
+ if (utils.isVoid(oldValue)) {
+ return new String("RubyText");
+ } else {
+ return ValueChanger.changePValue(oldValue);
+ }
+ }
+ } ;
+
+ /**
+ * If relations for paragraph and portion exist, then testing
+ * of this property performed using these objects, else
+ * testing is performed in common way.
+ */
+ public void _RubyText() {
+ log.println("Testing with custom Property tester") ;
+ Object oPara = tEnv.getObjRelation("PARA");
+ Object oPort = tEnv.getObjRelation("PORTION");
+ if (oPara == null) {
+ testProperty("RubyText", RubyTextTester) ;
+ } else {
+ changeProp((XPropertySet) oPara, (XPropertySet) oPort,
+ "RubyText","");
+ }
+ }
+
+ /**
+ * If relations for paragraph and portion exist, then testing
+ * of this property performed using these objects, else
+ * testing is performed in common way.
+ */
+ public void _RubyIsAbove() {
+ log.println("Testing with custom Property tester") ;
+ Object oPara = tEnv.getObjRelation("PARA");
+ Object oPort = tEnv.getObjRelation("PORTION");
+ if (oPara == null) {
+ testProperty("RubyIsAbove") ;
+ } else {
+ changeProp((XPropertySet) oPara, (XPropertySet) oPort,
+ "RubyIsAbove",new Boolean(true));
+ }
+ }
+
+ /**
+ * This property only takes values between 0..100
+ * so ist must be treated special
+ */
+ public void _CharEscapementHeight() {
+ Byte aByte = new Byte((byte)75);
+ Byte max = new Byte((byte)100);
+ testProperty("CharEscapementHeight", aByte, max) ;
+ }
+
+
+ /**
+ * This property can be void, so if old value is <code> null </code>
+ * new value must be specified.
+ */
+ public void _CharRotation() {
+ Short aShort = new Short((short) 10);
+ changeProp(oObj,oObj, "CharRotation", aShort);
+ }
+
+ /**
+ * Tests the property specified by <code>name</code> using
+ * property set <code>oProps</code>, but value after setting
+ * this property to a new value is checked using another
+ * PropertySet <code>get</code>. Special cases used for
+ * <code>CharRotation</code> property (it can have only certain values
+ * 0, 900, ...), and for <code>*StyleName</code> properties
+ * (only existing style names are accepted)
+ * @param oProps PropertySet from which property value is get
+ * changed and set.
+ * @param get PropertySet where property value is checked after
+ * setting.
+ * @param name Propety name to test.
+ * @param newVal Value used to set as new property value if
+ * the value get is null.
+ */
+ public void changeProp(XPropertySet oProps,
+ XPropertySet get,String name, Object newVal) {
+
+ Object gValue = null;
+ Object sValue = null;
+ Object ValueToSet = null;
+
+ try {
+ //waitForAllThreads();
+ gValue = oProps.getPropertyValue(name);
+
+ if ( (gValue == null) || (utils.isVoid(gValue)) ) {
+ log.println("Value for "+name+" is NULL");
+ gValue = newVal;
+ }
+
+ //waitForAllThreads();
+ if (name.equals("CharRotation")) {
+ Short s1 = new Short((short) 0);
+ Short s2 = new Short((short) 900);
+ if (gValue.equals(s1)) {
+ ValueToSet = s2;
+ } else {
+ ValueToSet = s1;
+ }
+ } else {
+ ValueToSet = ValueChanger.changePValue(gValue);
+ }
+ if (name.endsWith("StyleName")) {
+ if ( ((String) gValue).equals("Standard") ) {
+ ValueToSet="Main index entry";
+ }
+ else {
+ ValueToSet="Emphasis";
+ }
+ }
+
+ //waitForAllThreads();
+ oProps.setPropertyValue(name,ValueToSet);
+ sValue = get.getPropertyValue(name);
+ if (sValue == null) {
+ log.println("Value for "+name+" is NULL after setting");
+ sValue = gValue;
+ }
+
+ //check get-set methods
+ if (gValue.equals(sValue)) {
+ log.println("Value for '"+name+"' hasn't changed");
+ tRes.tested(name, false);
+ } else {
+ log.println("Property '"+name+"' OK");
+ log.println("old: "+gValue.toString());
+ log.println("new: "+ValueToSet.toString());
+ log.println("result: "+sValue.toString());
+ tRes.tested(name, true);
+ }
+ }
+ catch (com.sun.star.beans.UnknownPropertyException ex) {
+ if (isOptional(name)) {
+ log.println("Property '"+name+
+ "' is optional and not supported");
+ tRes.tested(name,true);
+ }
+ else {
+ log.println("Exception occured while testing property '" +
+ name + "'");
+ ex.printStackTrace(log);
+ tRes.tested(name, false);
+ }
+ } catch (com.sun.star.lang.WrappedTargetException e) {
+ log.println("Exception occured while testing property '" +
+ name + "'");
+ e.printStackTrace(log);
+ tRes.tested(name, false);
+ } catch (com.sun.star.lang.IllegalArgumentException e) {
+ log.println("Exception occured while testing property '" +
+ name + "'");
+ e.printStackTrace(log);
+ tRes.tested(name, false);
+ } catch (com.sun.star.beans.PropertyVetoException e) {
+ log.println("Exception occured while testing property '" +
+ name + "'");
+ e.printStackTrace(log);
+ tRes.tested(name, false);
+ }
+ }// end of changeProp
+
+ public void _TextUserDefinedAttributes() {
+ XNameContainer uda = null;
+ boolean res = false;
+
+ try {
+ try{
+ uda = (XNameContainer) AnyConverter.toObject(
+ new Type(XNameContainer.class),
+ oObj.getPropertyValue("TextUserDefinedAttributes"));
+ } catch (com.sun.star.lang.IllegalArgumentException e){
+ log.println("TextUserDefinedAttributes is empty.");
+ uda = new _CharacterProperties.OwnUserDefinedAttributes();
+ }
+ AttributeData attr = new AttributeData();
+ attr.Namespace = "http://www.sun.com/staroffice/apitest/Cellprop";
+ attr.Type = "CDATA";
+ attr.Value = "true";
+ uda.insertByName("Cellprop:has-first-alien-attribute", attr);
+
+ String[] els = uda.getElementNames();
+ oObj.setPropertyValue("TextUserDefinedAttributes", uda);
+ uda = (XNameContainer) AnyConverter.toObject(
+ new Type(XNameContainer.class),
+ oObj.getPropertyValue("TextUserDefinedAttributes"));
+ els = uda.getElementNames();
+
+ Object obj = uda.getByName("Cellprop:has-first-alien-attribute");
+ res = true;
+ } catch (com.sun.star.beans.UnknownPropertyException upe) {
+ if (isOptional("TextUserDefinedAttributes")) {
+ log.println("Property is optional and not supported");
+ res = true;
+ } else {
+ log.println("Don't know the Property 'TextUserDefinedAttributes'");
+ }
+ } catch (com.sun.star.lang.WrappedTargetException wte) {
+ log.println(
+ "WrappedTargetException while getting Property 'TextUserDefinedAttributes'");
+ } catch (com.sun.star.container.NoSuchElementException nee) {
+ log.println("added Element isn't part of the NameContainer");
+ } catch (com.sun.star.lang.IllegalArgumentException iae) {
+ log.println(
+ "IllegalArgumentException while getting Property 'TextUserDefinedAttributes'");
+ } catch (com.sun.star.beans.PropertyVetoException pve) {
+ log.println(
+ "PropertyVetoException while getting Property 'TextUserDefinedAttributes'");
+ } catch (com.sun.star.container.ElementExistException eee) {
+ log.println(
+ "ElementExistException while getting Property 'TextUserDefinedAttributes'");
+ }
+
+ tRes.tested("TextUserDefinedAttributes", res);
+ }
+
+ private class OwnUserDefinedAttributes implements XNameContainer{
+ Hashtable members = null;
+
+
+ public OwnUserDefinedAttributes() {
+ members = new Hashtable();
+ }
+
+ public Object getByName(String str) throws com.sun.star.container.NoSuchElementException, com.sun.star.lang.WrappedTargetException {
+ return members.get(str);
+ }
+
+ public String[] getElementNames() {
+ Enumeration oEnum = members.keys();
+ int count = members.size();
+ String[] res = new String[count];
+ int i=0;
+ while(oEnum.hasMoreElements())
+ res[i] = (String)oEnum.nextElement();
+ return res;
+ }
+
+ public com.sun.star.uno.Type getElementType() {
+ Enumeration oEnum = members.keys();
+ String key = (String)oEnum.nextElement();
+ Object o = members.get(key);
+ return new Type(o.getClass());
+ }
+
+ public boolean hasByName(String str) {
+ return members.get(str) != null;
+ }
+
+ public boolean hasElements() {
+ return members.size() > 0;
+ }
+
+ public void insertByName(String str, Object obj) throws com.sun.star.lang.IllegalArgumentException, com.sun.star.container.ElementExistException, com.sun.star.lang.WrappedTargetException {
+ members.put(str, obj);
+ }
+
+ public void removeByName(String str) throws com.sun.star.container.NoSuchElementException, com.sun.star.lang.WrappedTargetException {
+ members.remove(str);
+ }
+
+ public void replaceByName(String str, Object obj) throws com.sun.star.lang.IllegalArgumentException, com.sun.star.container.NoSuchElementException, com.sun.star.lang.WrappedTargetException {
+ members.put(str, obj);
+ }
+
+ }
+
+} //finish class _CharacterProperties
+
diff --git a/qadevOOo/tests/java/ifc/style/_CharacterPropertiesAsian.java b/qadevOOo/tests/java/ifc/style/_CharacterPropertiesAsian.java
new file mode 100644
index 000000000000..a5709503f602
--- /dev/null
+++ b/qadevOOo/tests/java/ifc/style/_CharacterPropertiesAsian.java
@@ -0,0 +1,77 @@
+/*************************************************************************
+ *
+ * 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.
+ *
+ ************************************************************************/
+
+package ifc.style;
+
+import lib.MultiPropertyTest;
+
+import com.sun.star.awt.FontSlant;
+import com.sun.star.awt.FontWeight;
+
+/**
+* Testing <code>com.sun.star.style.CharacterPropertiesAsian</code>
+* service properties :
+* <ul>
+* <li><code> CharHeightAsian</code></li>
+* <li><code> CharWeightAsian</code></li>
+* <li><code> CharFontNameAsian</code></li>
+* <li><code> CharFontStyleNameAsian</code></li>
+* <li><code> CharFontFamilyAsian</code></li>
+* <li><code> CharFontCharSetAsian</code></li>
+* <li><code> CharFontPitchAsian</code></li>
+* <li><code> CharPostureAsian</code></li>
+* <li><code> CharLocaleAsian</code></li>
+* <li><code> ParaIsCharacterDistance</code></li>
+* <li><code> ParaIsForbiddenRules</code></li>
+* <li><code> ParaIsHangingPunctuation</code></li>
+* </ul> <p>
+* Properties testing is automated by <code>lib.MultiPropertyTest</code>.
+* @see com.sun.star.style.CharacterPropertiesAsian
+*/
+public class _CharacterPropertiesAsian extends MultiPropertyTest {
+
+ public void _CharPostureAsian() {
+ testProperty("CharPostureAsian", FontSlant.NONE, FontSlant.ITALIC);
+ }
+
+ public void _CharWeightAsian() {
+ testProperty("CharWeightAsian", new Float(FontWeight.NORMAL),
+ new Float(FontWeight.BOLD));
+ }
+
+ public void _ParaIsCharacterDistance() {
+ testProperty("ParaIsCharacterDistance", Boolean.TRUE, Boolean.FALSE);
+ }
+
+ public void _ParaIsForbiddenRules() {
+ testProperty("ParaIsForbiddenRules", Boolean.TRUE, Boolean.FALSE);
+ }
+
+ public void _ParaIsHangingPunctuation() {
+ testProperty("ParaIsHangingPunctuation", Boolean.TRUE, Boolean.FALSE);
+ }
+} //finish class _CharacterPropertiesAsian
diff --git a/qadevOOo/tests/java/ifc/style/_CharacterPropertiesComplex.java b/qadevOOo/tests/java/ifc/style/_CharacterPropertiesComplex.java
new file mode 100644
index 000000000000..0bf69d68e7e9
--- /dev/null
+++ b/qadevOOo/tests/java/ifc/style/_CharacterPropertiesComplex.java
@@ -0,0 +1,69 @@
+/*************************************************************************
+ *
+ * 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.
+ *
+ ************************************************************************/
+
+package ifc.style;
+
+import lib.MultiPropertyTest;
+
+/**
+* Testing <code>com.sun.star.style.CharacterPropertiesComplex</code>
+* service properties :
+* <ul>
+* <li><code> CharHeightComplex</code></li>
+* <li><code> CharWeightComplex</code></li>
+* <li><code> CharFontNameComplex</code></li>
+* <li><code> CharFontStyleNameComplex</code></li>
+* <li><code> CharFontFamilyComplex</code></li>
+* <li><code> CharFontCharSetComplex</code></li>
+* <li><code> CharFontPitchComplex</code></li>
+* <li><code> CharPostureComplex</code></li>
+* <li><code> CharLocaleComplex</code></li>
+* </ul> <p>
+* Properties testing is automated by <code>lib.MultiPropertyTest</code>.
+* @see com.sun.star.style.CharacterPropertiesComplex
+*/
+public class _CharacterPropertiesComplex extends MultiPropertyTest {
+
+ public void _CharWeightComplex() {
+ testProperty("CharWeightComplex", new Float(com.sun.star.awt.FontWeight.BOLD),
+ new Float(com.sun.star.awt.FontWeight.THIN)) ;
+ }
+
+ public void _CharPostureComplex() {
+ testProperty("CharPostureComplex", com.sun.star.awt.FontSlant.ITALIC,
+ com.sun.star.awt.FontSlant.NONE) ;
+ }
+
+ /**
+ * Forces environment recreation.
+ */
+ protected void after() {
+ disposeEnvironment();
+ }
+
+} //finish class _CharacterPropertiesComplex
+
diff --git a/qadevOOo/tests/java/ifc/style/_CharacterStyle.java b/qadevOOo/tests/java/ifc/style/_CharacterStyle.java
new file mode 100755
index 000000000000..fb6acc14a42e
--- /dev/null
+++ b/qadevOOo/tests/java/ifc/style/_CharacterStyle.java
@@ -0,0 +1,50 @@
+/*************************************************************************
+ *
+ * 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.
+ *
+ ************************************************************************/
+
+package ifc.style;
+
+import lib.MultiPropertyTest;
+
+
+/**
+* Testing <code>com.sun.star.style.CharacterStyle</code>
+* service properties :
+* <ul>
+* <li><code> CharDiffHeight</code></li>
+* <li><code> CharPropHeight</code></li>
+* <li><code> CharDiffHeightAsian</code></li>
+* <li><code> CharPropHeightAsian</code></li>
+* <li><code> CharDiffHeightComplex</code></li>
+* <li><code> CharPropHeightComplex</code></li>
+* </ul> <p>
+* Properties testing is automated by <code>lib.MultiPropertyTest</code>.
+* @see com.sun.star.style.CharacterStyle
+*/
+public class _CharacterStyle extends MultiPropertyTest {
+
+}
+
diff --git a/qadevOOo/tests/java/ifc/style/_PageProperties.java b/qadevOOo/tests/java/ifc/style/_PageProperties.java
new file mode 100755
index 000000000000..c53f86b4aa41
--- /dev/null
+++ b/qadevOOo/tests/java/ifc/style/_PageProperties.java
@@ -0,0 +1,125 @@
+/*************************************************************************
+ *
+ * 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.
+ *
+ ************************************************************************/
+
+package ifc.style;
+
+import com.sun.star.container.XNameContainer;
+import com.sun.star.uno.AnyConverter;
+import com.sun.star.uno.Type;
+import com.sun.star.xml.AttributeData;
+import lib.MultiPropertyTest;
+
+/**
+ * Test page properties.
+ * Testing is done by lib.MultiPropertyTest, except for properties
+ * <ul>
+ * <li>PrinterPaperTray</li>
+ * <li>UserDefinedAttribures</li>
+ * </ul>
+ */
+public class _PageProperties extends MultiPropertyTest {
+
+ /**
+ * Switch on Header and Footer properties
+ * so all props can be tested.
+ */
+ protected void before() {
+ try {
+ oObj.setPropertyValue("HeaderIsOn", Boolean.TRUE);
+ oObj.setPropertyValue("FooterIsOn", Boolean.TRUE);
+ } catch (com.sun.star.beans.UnknownPropertyException upe) {
+ log.println("Don't know the Property 'HeaderIsOn' or 'FooterIsOn'");
+ } catch (com.sun.star.lang.WrappedTargetException wte) {
+ log.println("WrappedTargetException while setting Property 'HeaderIsOn' or 'FooterIsOn'");
+ } catch (com.sun.star.lang.IllegalArgumentException iae) {
+ log.println("IllegalArgumentException while setting Property 'HeaderIsOn' or 'FooterIsOn'");
+ } catch (com.sun.star.beans.PropertyVetoException pve) {
+ log.println("PropertyVetoException while setting Property 'HeaderIsOn' or 'FooterIsOn'");
+ }
+ }
+
+ /**
+ * This property is system dependent and printer dependent.
+ * So only reading it does make sense, since it cannot be determined, if
+ * it is set to a allowed value.
+ */
+ public void _PrinterPaperTray() {
+ boolean res = false;
+ String setting = null;
+ try {
+ setting = (String)oObj.getPropertyValue("PrinterPaperTray");
+ log.println("Property 'PrinterPaperTray' is set to '" + setting + "'.");
+ res = setting != null;
+ }
+ catch(com.sun.star.beans.UnknownPropertyException e) {
+ log.println("Don't know the Property 'PrinterPaperTray'");
+ } catch (com.sun.star.lang.WrappedTargetException wte) {
+ log.println("WrappedTargetException while getting Property 'PrinterPaperTray'");
+ }
+ tRes.tested("PrinterPaperTray", res);
+ }
+
+ /**
+ * Create some valid user defined attributes
+ */
+ public void _UserDefinedAttributes() {
+ XNameContainer uda = null;
+ boolean res = false;
+ try {
+ uda = (XNameContainer) AnyConverter.toObject(
+ new Type(XNameContainer.class),
+ oObj.getPropertyValue("UserDefinedAttributes"));
+ AttributeData attr = new AttributeData();
+ attr.Namespace = "http://www.sun.com/staroffice/apitest/Cellprop";
+ attr.Type="CDATA";
+ attr.Value="true";
+ uda.insertByName("Cellprop:has-first-alien-attribute",attr);
+ String[] els = uda.getElementNames();
+ oObj.setPropertyValue("UserDefinedAttributes",uda);
+ uda = (XNameContainer) AnyConverter.toObject(
+ new Type(XNameContainer.class),
+ oObj.getPropertyValue("UserDefinedAttributes"));
+ els = uda.getElementNames();
+ Object obj = uda.getByName("Cellprop:has-first-alien-attribute");
+ res = true;
+ } catch (com.sun.star.beans.UnknownPropertyException upe) {
+ log.println("Don't know the Property 'UserDefinedAttributes'");
+ } catch (com.sun.star.lang.WrappedTargetException wte) {
+ log.println("WrappedTargetException while getting Property 'UserDefinedAttributes'");
+ } catch (com.sun.star.container.NoSuchElementException nee) {
+ log.println("added Element isn't part of the NameContainer");
+ } catch (com.sun.star.lang.IllegalArgumentException iae) {
+ log.println("IllegalArgumentException while getting Property 'UserDefinedAttributes'");
+ } catch (com.sun.star.beans.PropertyVetoException pve) {
+ log.println("PropertyVetoException while getting Property 'UserDefinedAttributes'");
+ } catch (com.sun.star.container.ElementExistException eee) {
+ log.println("ElementExistException while getting Property 'UserDefinedAttributes'");
+ }
+ tRes.tested("UserDefinedAttributes",res);
+ }
+
+}
diff --git a/qadevOOo/tests/java/ifc/style/_PageStyle.java b/qadevOOo/tests/java/ifc/style/_PageStyle.java
new file mode 100755
index 000000000000..d8a6e5f7d344
--- /dev/null
+++ b/qadevOOo/tests/java/ifc/style/_PageStyle.java
@@ -0,0 +1,56 @@
+/*************************************************************************
+ *
+ * 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.
+ *
+ ************************************************************************/
+
+package ifc.style;
+
+import ifc.style._PageProperties;
+
+/**
+ * Test page style properties.
+ * These properties are a subset of the PageProperties. So just use the
+ * PageProperties test
+ */
+public class _PageStyle extends _PageProperties {
+
+ /**
+ * This property is system dependent and printer dependent.
+ * Test is used from _PageProperties
+ * @see ifc.style._PageProperties
+ */
+ public void _PrinterPaperTray() {
+ super._PrinterPaperTray();
+ }
+
+ /**
+ * Create some valid user defined attributes
+ * Test is used from _PageProperties
+ * @see ifc.style._PageProperties
+ */
+ public void _UserDefinedAttributes() {
+ super._UserDefinedAttributes();
+ }
+}
diff --git a/qadevOOo/tests/java/ifc/style/_ParagraphProperties.java b/qadevOOo/tests/java/ifc/style/_ParagraphProperties.java
new file mode 100644
index 000000000000..d412b93531da
--- /dev/null
+++ b/qadevOOo/tests/java/ifc/style/_ParagraphProperties.java
@@ -0,0 +1,507 @@
+/*************************************************************************
+ *
+ * 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.
+ *
+ ************************************************************************/
+package ifc.style;
+
+import com.sun.star.beans.PropertyValue;
+import com.sun.star.beans.UnknownPropertyException;
+import com.sun.star.container.XIndexReplace;
+import com.sun.star.container.XNameContainer;
+import com.sun.star.lang.WrappedTargetException;
+import com.sun.star.uno.AnyConverter;
+import com.sun.star.uno.Type;
+import com.sun.star.xml.AttributeData;
+import ifc.text._NumberingLevel;
+import java.util.Enumeration;
+import java.util.Hashtable;
+
+import lib.MultiPropertyTest;
+import lib.Status;
+import share.LogWriter;
+
+
+import util.utils;
+
+
+/**
+* Testing <code>com.sun.star.style.ParagraphProperties</code>
+* service properties :
+* <ul>
+* <li><code> ParaAdjust</code></li>
+* <li><code> ParaLineSpacing</code></li>
+* <li><code> ParaBackColor</code></li>
+* <li><code> ParaBackTransparent</code></li>
+* <li><code> ParaBackGraphicURL</code></li>
+* <li><code> ParaBackGraphicFilter</code></li>
+* <li><code> ParaBackGraphicLocation</code></li>
+* <li><code> ParaLastLineAdjust</code></li>
+* <li><code> ParaExpandSingleWord</code></li>
+* <li><code> ParaLeftMargin</code></li>
+* <li><code> ParaRightMargin</code></li>
+* <li><code> ParaTopMargin</code></li>
+* <li><code> ParaBottomMargin</code></li>
+* <li><code> ParaLineNumberCount</code></li>
+* <li><code> ParaLineNumberStartValue</code></li>
+* <li><code> ParaIsHyphenation</code></li>
+* <li><code> PageDescName</code></li>
+* <li><code> PageNumberOffset</code></li>
+* <li><code> ParaRegisterModeActive</code></li>
+* <li><code> ParaTabStops</code></li>
+* <li><code> ParaStyleName</code></li>
+* <li><code> DropCapFormat</code></li>
+* <li><code> DropCapWholeWord</code></li>
+* <li><code> ParaKeepTogether</code></li>
+* <li><code> ParaSplit</code></li>
+* <li><code> NumberingLevel</code></li>
+* <li><code> NumberingRules</code></li>
+* <li><code> NumberingStartValue</code></li>
+* <li><code> ParaIsNumberingRestart</code></li>
+* <li><code> NumberingStyleName</code></li>
+* <li><code> ParaOrphans</code></li>
+* <li><code> ParaWidows</code></li>
+* <li><code> ParaShadowFormat</code></li>
+* <li><code> IsHangingPunctuation</code></li>
+* <li><code> IsCharacterDistance</code></li>
+* <li><code> IsForbiddenRules</code></li>
+* <li><code> LeftBorder</code></li>
+* <li><code> RightBorder</code></li>
+* <li><code> TopBorder</code></li>
+* <li><code> BottomBorder</code></li>
+* <li><code> BorderDistance</code></li>
+* <li><code> LeftBorderDistance</code></li>
+* <li><code> RightBorderDistance</code></li>
+* <li><code> TopBorderDistance</code></li>
+* <li><code> BottomBorderDistance</code></li>
+* </ul> <p>
+* This test needs the following object relations :
+* <ul>
+* <li> <code>'NRULES'</code> : <b>optional</b>
+* (service <code>com.sun.star.text.NumberingRules</code>):
+* instance of the service which can be set as 'NumberingRules'
+* property new value. If the relation doesn't then two
+* different <code>NumberingRules</code> objects are tried
+* to be obtained by setting different 'NumberingStyleName'
+* property styles and getting 'NumberingRules' property values.</li>
+* <ul> <p>
+* Properties testing is automated by <code>lib.MultiPropertyTest</code>.
+* @see com.sun.star.style.ParagraphProperties
+*/
+public class _ParagraphProperties extends MultiPropertyTest {
+ /**
+ * Custom tester for numbering style properties. Switches between
+ * 'Numbering 1' and 'Numbering 2' styles.
+ */
+ protected PropertyTester NumberingStyleTester = new PropertyTester() {
+ protected Object getNewValue(String propName, Object oldValue)
+ throws java.lang.IllegalArgumentException {
+ if ((oldValue != null) && (oldValue.equals("Numbering 1"))) {
+ return "Numbering 2";
+ } else {
+ return "Numbering 1";
+ }
+ }
+ };
+
+ /**
+ * Custom tester for paragraph style properties. Switches between
+ * 'Salutation' and 'Heading' styles.
+ */
+ protected PropertyTester charStyleTester = new PropertyTester() {
+ protected Object getNewValue(String propName, Object oldValue) {
+ if (!utils.isVoid(oldValue) && (oldValue.equals("Example"))) {
+ return "Emphasis";
+ } else {
+ return "Example";
+ }
+ }
+ };
+
+ /**
+ * Custom tester for paragraph style properties. Switches between
+ * 'Salutation' and 'Heading' styles.
+ */
+ protected PropertyTester ParaStyleTester = new PropertyTester() {
+ protected Object getNewValue(String propName, Object oldValue) {
+ if (!utils.isVoid(oldValue) && (oldValue.equals("Heading"))) {
+ return "Salutation";
+ } else {
+ return "Heading";
+ }
+ }
+ };
+
+ /**
+ * Custom tester for PageDescName properties. Switches between
+ * 'HTML' and 'Standard' descriptor names.
+ */
+ protected PropertyTester PageDescTester = new PropertyTester() {
+ protected Object getNewValue(String propName, Object oldValue) {
+ if (!util.utils.isVoid(oldValue) &&
+ (oldValue.equals("Default"))) {
+ return "HTML";
+ } else {
+ return "Default";
+ }
+ }
+ };
+
+ /**
+ * Custom tester for properties which have <code>short</code> type
+ * and can be void, so if they have void value, the new value must
+ * be specified. Switches between two different values.
+ */
+ protected PropertyTester ShortTester = new PropertyTester() {
+ protected Object getNewValue(String propName, Object oldValue) {
+ if ((oldValue != null) &&
+ (oldValue.equals(new Short((short) 0)))) {
+ return new Short((short) 2);
+ } else {
+ return new Short((short) 0);
+ }
+ }
+ };
+
+ /**
+ * Custom tester for properties which have <code>boolean</code> type
+ * and can be void, so if they have void value, the new value must
+ * be specified. Switches between true and false.
+ */
+ protected PropertyTester BooleanTester = new PropertyTester() {
+ protected Object getNewValue(String propName, Object oldValue) {
+ if ((oldValue != null) &&
+ (oldValue.equals(new Boolean((boolean) false)))) {
+ return new Boolean((boolean) true);
+ } else {
+ return new Boolean((boolean) false);
+ }
+ }
+ };
+
+ /**
+ * Custom tester for properties which contains image URLs.
+ * Switches between two JPG images' URLs.
+ */
+ protected PropertyTester URLTester = new PropertyTester() {
+ protected Object getNewValue(String propName, Object oldValue) {
+ if (oldValue.equals(util.utils.getFullTestURL("space-metal.jpg"))) {
+ return util.utils.getFullTestURL("crazy-blue.jpg");
+ } else {
+ return util.utils.getFullTestURL("space-metal.jpg");
+ }
+ }
+ };
+
+ protected PropertyTester rules = null;
+
+ /**
+ * Creates tester for 'NumberingRules' depending on relation.
+ */
+ public void before() {
+ final Object nRules = tEnv.getObjRelation("NRULES");
+
+ if (nRules != null) {
+ rules = new PropertyTester() {
+ protected Object getNewValue(String propName, Object oldValue) {
+ return nRules;
+ }
+ };
+
+ } else {
+ Object rules1 = null;
+ Object rules2 = null;
+
+ try {
+ oObj.setPropertyValue("NumberingStyleName", "Numbering 1");
+ rules1 = oObj.getPropertyValue("NumberingRules");
+ oObj.setPropertyValue("NumberingStyleName", "Numbering 2");
+ rules2 = oObj.getPropertyValue("NumberingRules");
+ } catch (com.sun.star.lang.WrappedTargetException e) {
+ log.println("WARNING !!! Exception getting numbering rules :");
+ e.printStackTrace(log);
+ } catch (com.sun.star.lang.IllegalArgumentException e) {
+ log.println("WARNING !!! Exception getting numbering rules :");
+ e.printStackTrace(log);
+ } catch (com.sun.star.beans.PropertyVetoException e) {
+ log.println("WARNING !!! Exception getting numbering rules :");
+ e.printStackTrace(log);
+ } catch (com.sun.star.beans.UnknownPropertyException e) {
+ log.println("Property 'NumberingStyleName' is not supported.");
+ }
+
+ rules = new PropertyValueSwitcher(rules1, rules2);
+ }
+ }
+
+ /**
+ * Tested with custom property tester.
+ */
+ public void _NumberingStyleName() {
+ log.println("Testing with custom Property tester");
+ testProperty("NumberingStyleName", NumberingStyleTester);
+ }
+
+ /**
+ * Tested with custom property tester.
+ */
+ public void _DropCapCharStyleName() {
+ log.println("Testing with custom Property tester");
+ testProperty("DropCapCharStyleName", charStyleTester);
+ }
+
+ /**
+ * Tested with custom property tester.
+ */
+ public void _ParaStyleName() {
+ log.println("Testing with custom Property tester");
+ testProperty("ParaStyleName", ParaStyleTester);
+ }
+
+ /**
+ * Tested with custom property tester.
+ */
+ public void _PageDescName() {
+ log.println("Testing with custom Property tester");
+ testProperty("PageDescName", PageDescTester);
+ }
+
+ /**
+ * Tested with custom property tester. Before testing property
+ * <code>ParaAdjust</code> is setting to value <code>BLOCK</code>
+ * because setting the property <code>ParaLastLineAdjust</code>
+ * makes sense only in this case.
+ */
+ public void _ParaLastLineAdjust() {
+ log.println("Testing with custom Property tester");
+
+ try {
+ oObj.setPropertyValue("ParaAdjust",
+ com.sun.star.style.ParagraphAdjust.BLOCK);
+ } catch (com.sun.star.lang.WrappedTargetException e) {
+ log.println("Exception occured setting property 'ParagraphAdjust'" + e);
+ } catch (com.sun.star.lang.IllegalArgumentException e) {
+ log.println("Exception occured setting property 'ParagraphAdjust'" + e);
+ } catch (com.sun.star.beans.UnknownPropertyException e) {
+ log.println("Exception occured setting property 'ParagraphAdjust'" + e);
+ } catch (com.sun.star.beans.PropertyVetoException e) {
+ log.println("Exception occured setting property 'ParagraphAdjust'" + e);
+ }
+
+ testProperty("ParaLastLineAdjust", ShortTester);
+ }
+
+ /**
+ * Tested with custom property tester.
+ */
+ public void _ParaBackGraphicURL() {
+ log.println("Testing with custom Property tester");
+ testProperty("ParaBackGraphicURL", URLTester);
+ }
+
+ /**
+ * Tested with custom property tester. <p>
+ * The following property tests are to be completed successfully before :
+ * <ul>
+ * <li> <code> NumberingStyleName </code> : a numbering style must
+ * be set before testing this property </li>
+ * </ul>
+ */
+ public void _NumberingLevel() {
+ requiredMethod("NumberingStyleName");
+ log.println("Testing with custom Property tester");
+ testProperty("NumberingLevel", ShortTester);
+ }
+
+ /**
+ * Tested with custom property tester. <p>
+ */
+ public void _ParaIsConnectBorder() {
+
+ log.println("Testing with custom Property tester");
+ testProperty("ParaIsConnectBorder", BooleanTester);
+ }
+
+ /**
+ * Tested with custom property tester.
+ */
+ public void _ParaVertAlignment() {
+ log.println("Testing with custom Property tester");
+ testProperty("ParaVertAlignment", ShortTester);
+ }
+
+ /**
+ * Tested with com.sun.star.text.NumberingLevel <p>
+ * The value of this property is a com.sun.star.container.XIndexReplace which is represneted by
+ * com.sun.star.text.NumberingLevel.
+ * The following property tests are to be completed successfully before :
+ * <ul>
+ * <li> <code> NumberingStyleName </code> : a numbering style must
+ * be set before testing this property </li>
+ * </ul>
+ * @see com.sun.star.text.NumberlingLevel
+ * @see com.sun.star.container.XIndexReplace
+ * @see ifc.text._NumberingLevel
+ */
+ public void _NumberingRules() {
+ requiredMethod("NumberingStyleName");
+
+ XIndexReplace NumberingRules = null;
+ PropertyValue[] propertyValues = null;
+ try {
+ NumberingRules = (XIndexReplace) AnyConverter.toObject(
+ new Type(XIndexReplace.class), oObj.getPropertyValue("NumberingRules"));
+ } catch (com.sun.star.lang.IllegalArgumentException ex) {
+ Status.failed( "could not get NumberingRuels: "+ ex.toString() );
+ return;
+ } catch (UnknownPropertyException ex) {
+ Status.failed( "could not get NumberingRuels: "+ ex.toString() );
+ return;
+ } catch (WrappedTargetException ex) {
+ Status.failed( "could not get NumberingRuels: "+ ex.toString() );
+ return;
+ }
+ try {
+ propertyValues = (PropertyValue[]) NumberingRules.getByIndex(0);
+
+ } catch (com.sun.star.lang.IndexOutOfBoundsException ex) {
+ Status.failed( "could not get NumberlingLevel-Array from NumberingRuels: "+ ex.toString() );
+ return;
+ } catch (WrappedTargetException ex) {
+ Status.failed( "could not get NumberlingLevel-Array from NumberingRuels: "+ ex.toString() );
+ return;
+ }
+
+ _NumberingLevel numb = new _NumberingLevel((LogWriter)log, tParam, propertyValues);
+
+ boolean result = numb.testPropertieArray();
+
+ tRes.tested("NumberingRules", result);
+ }
+
+ public void _ParaUserDefinedAttributes() {
+ XNameContainer uda = null;
+ boolean res = false;
+
+ try {
+ try{
+ uda = (XNameContainer) AnyConverter.toObject(
+ new Type(XNameContainer.class),
+ oObj.getPropertyValue("ParaUserDefinedAttributes"));
+ } catch (com.sun.star.lang.IllegalArgumentException e){
+ log.println("ParaUserDefinedAttributes is empty.");
+ uda = new _ParagraphProperties.OwnUserDefinedAttributes();
+ }
+ AttributeData attr = new AttributeData();
+ attr.Namespace = "http://www.sun.com/staroffice/apitest/Cellprop";
+ attr.Type = "CDATA";
+ attr.Value = "true";
+ uda.insertByName("Cellprop:has-first-alien-attribute", attr);
+
+ String[] els = uda.getElementNames();
+ oObj.setPropertyValue("ParaUserDefinedAttributes", uda);
+ uda = (XNameContainer) AnyConverter.toObject(
+ new Type(XNameContainer.class),
+ oObj.getPropertyValue("ParaUserDefinedAttributes"));
+ els = uda.getElementNames();
+
+ Object obj = uda.getByName("Cellprop:has-first-alien-attribute");
+ res = true;
+ } catch (com.sun.star.beans.UnknownPropertyException upe) {
+ if (isOptional("ParaUserDefinedAttributes")) {
+ log.println("Property is optional and not supported");
+ res = true;
+ } else {
+ log.println("Don't know the Property 'ParaUserDefinedAttributes'");
+ }
+ } catch (com.sun.star.lang.WrappedTargetException wte) {
+ log.println(
+ "WrappedTargetException while getting Property 'ParaUserDefinedAttributes'");
+ } catch (com.sun.star.container.NoSuchElementException nee) {
+ log.println("added Element isn't part of the NameContainer");
+ } catch (com.sun.star.lang.IllegalArgumentException iae) {
+ log.println(
+ "IllegalArgumentException while getting Property 'ParaUserDefinedAttributes'");
+ } catch (com.sun.star.beans.PropertyVetoException pve) {
+ log.println(
+ "PropertyVetoException while getting Property 'ParaUserDefinedAttributes'");
+ } catch (com.sun.star.container.ElementExistException eee) {
+ log.println(
+ "ElementExistException while getting Property 'ParaUserDefinedAttributes'");
+ }
+
+ tRes.tested("ParaUserDefinedAttributes", res);
+ }
+
+ private class OwnUserDefinedAttributes implements XNameContainer{
+ Hashtable members = null;
+
+
+ public OwnUserDefinedAttributes() {
+ members = new Hashtable();
+ }
+
+ public Object getByName(String str) throws com.sun.star.container.NoSuchElementException, com.sun.star.lang.WrappedTargetException {
+ return members.get(str);
+ }
+
+ public String[] getElementNames() {
+ Enumeration oEnum = members.keys();
+ int count = members.size();
+ String[] res = new String[count];
+ int i=0;
+ while(oEnum.hasMoreElements())
+ res[i] = (String)oEnum.nextElement();
+ return res;
+ }
+
+ public com.sun.star.uno.Type getElementType() {
+ Enumeration oEnum = members.keys();
+ String key = (String)oEnum.nextElement();
+ Object o = members.get(key);
+ return new Type(o.getClass());
+ }
+
+ public boolean hasByName(String str) {
+ return members.get(str) != null;
+ }
+
+ public boolean hasElements() {
+ return members.size() > 0;
+ }
+
+ public void insertByName(String str, Object obj) throws com.sun.star.lang.IllegalArgumentException, com.sun.star.container.ElementExistException, com.sun.star.lang.WrappedTargetException {
+ members.put(str, obj);
+ }
+
+ public void removeByName(String str) throws com.sun.star.container.NoSuchElementException, com.sun.star.lang.WrappedTargetException {
+ members.remove(str);
+ }
+
+ public void replaceByName(String str, Object obj) throws com.sun.star.lang.IllegalArgumentException, com.sun.star.container.NoSuchElementException, com.sun.star.lang.WrappedTargetException {
+ members.put(str, obj);
+ }
+
+ }
+} // finish class _ParagraphProperties
diff --git a/qadevOOo/tests/java/ifc/style/_ParagraphPropertiesAsian.java b/qadevOOo/tests/java/ifc/style/_ParagraphPropertiesAsian.java
new file mode 100644
index 000000000000..6c3730d3bb5c
--- /dev/null
+++ b/qadevOOo/tests/java/ifc/style/_ParagraphPropertiesAsian.java
@@ -0,0 +1,86 @@
+/*************************************************************************
+ *
+ * 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.
+ *
+ ************************************************************************/
+
+package ifc.style;
+
+import lib.MultiPropertyTest;
+
+/**
+* Testing <code>com.sun.star.style.ParagraphPropertiesAsian</code>
+* service properties :
+* <ul>
+* <li><code> ParaIsHangingPunctuation </code></li>
+* <li><code> ParaIsCharacterDistance </code></li>
+* <li><code> ParaIsForbiddenRules </code></li>
+* </ul> <p>
+* Properties testing is automated by <code>lib.MultiPropertyTest</code>.
+* @see com.sun.star.style.ParagraphProperties
+*/
+public class _ParagraphPropertiesAsian extends MultiPropertyTest {
+ /**
+ * Custom tester for properties which have <code>boolean</code> type
+ * and can be void, so if they have void value, the new value must
+ * be specified. Switches between true and false.
+ */
+ protected PropertyTester BooleanTester = new PropertyTester() {
+ protected Object getNewValue(String propName, Object oldValue) {
+ if ((oldValue != null) &&
+ (oldValue.equals(new Boolean((boolean) false)))) {
+ return new Boolean((boolean) true);
+ } else {
+ return new Boolean((boolean) false);
+ }
+ }
+ };
+
+ /**
+ * Tested with custom property tester.
+ */
+ public void _ParaIsHangingPunctuation() {
+ log.println("Testing with custom Property tester");
+ testProperty("ParaIsHangingPunctuation", BooleanTester);
+ }
+
+ /**
+ * Tested with custom property tester.
+ */
+ public void _ParaIsCharacterDistance() {
+ log.println("Testing with custom Property tester");
+ testProperty("ParaIsCharacterDistance", BooleanTester);
+ }
+
+ /**
+ * Tested with custom property tester.
+ */
+ public void _ParaIsForbiddenRules() {
+ log.println("Testing with custom Property tester");
+ testProperty("ParaIsForbiddenRules", BooleanTester);
+ }
+
+
+} // finish class _ParagraphProperties
+
diff --git a/qadevOOo/tests/java/ifc/style/_ParagraphPropertiesComplex.java b/qadevOOo/tests/java/ifc/style/_ParagraphPropertiesComplex.java
new file mode 100644
index 000000000000..932bec5b3ead
--- /dev/null
+++ b/qadevOOo/tests/java/ifc/style/_ParagraphPropertiesComplex.java
@@ -0,0 +1,55 @@
+/*************************************************************************
+ *
+ * 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.
+ *
+ ************************************************************************/
+
+package ifc.style;
+
+import lib.MultiPropertyTest;
+
+/**
+* Testing <code>com.sun.star.style.ParagraphPropertiesComplex</code>
+*
+* Properties testing is automated by <code>lib.MultiPropertyTest</code>.
+* @see com.sun.star.style.ParagraphPropertiesComplex
+*/
+public class _ParagraphPropertiesComplex extends MultiPropertyTest {
+
+
+ protected PropertyTester WritingModeTester = new PropertyTester() {
+ protected Object getNewValue(String propName, Object oldValue) {
+ if ((oldValue != null) && (oldValue.equals(new Short(com.sun.star.text.WritingMode2.LR_TB))))
+ return new Short(com.sun.star.text.WritingMode2.PAGE); else
+ return new Short(com.sun.star.text.WritingMode2.LR_TB);
+ }
+ } ;
+
+ public void _WritingMode() {
+ log.println("Testing with custom Property tester") ;
+ testProperty("WritingMode", WritingModeTester) ;
+ }
+
+} // finish class _ParagraphPropertiesComplex
+
diff --git a/qadevOOo/tests/java/ifc/style/_ParagraphStyle.java b/qadevOOo/tests/java/ifc/style/_ParagraphStyle.java
new file mode 100644
index 000000000000..8dcdb56dc988
--- /dev/null
+++ b/qadevOOo/tests/java/ifc/style/_ParagraphStyle.java
@@ -0,0 +1,36 @@
+/*************************************************************************
+ *
+ * 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.
+ *
+ ************************************************************************/
+
+package ifc.style;
+
+import lib.MultiPropertyTest;
+
+/**
+ */
+public class _ParagraphStyle extends MultiPropertyTest {
+
+}
diff --git a/qadevOOo/tests/java/ifc/style/_Style.java b/qadevOOo/tests/java/ifc/style/_Style.java
new file mode 100644
index 000000000000..16dbf570c301
--- /dev/null
+++ b/qadevOOo/tests/java/ifc/style/_Style.java
@@ -0,0 +1,54 @@
+/*************************************************************************
+ *
+ * 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.
+ *
+ ************************************************************************/
+
+package ifc.style;
+
+import lib.MultiPropertyTest;
+
+/**
+* Testing <code>com.sun.star.style.Style</code>
+* service properties :
+* <ul>
+* <li><code> IsPhysical</code></li>
+* <li><code> FollowStyle</code></li>
+* <li><code> DisplayName</code></li>
+* <li><code> IsAutoUpdate</code></li>
+* </ul> <p>
+* Properties testing is automated by <code>lib.MultiPropertyTest</code>.
+* @see com.sun.star.style.Style
+*/
+public class _Style extends MultiPropertyTest {
+
+ public void _FollowStyle() {
+ String style = (String)tEnv.getObjRelation("FollowStyle");
+ if (style == null) style = "Heading 1";
+ testProperty("FollowStyle", style, "Heading 2");
+ }
+
+} // finish class _Style
+
+
diff --git a/qadevOOo/tests/java/ifc/style/_XStyle.java b/qadevOOo/tests/java/ifc/style/_XStyle.java
new file mode 100644
index 000000000000..bf0bb6bea2c8
--- /dev/null
+++ b/qadevOOo/tests/java/ifc/style/_XStyle.java
@@ -0,0 +1,117 @@
+/*************************************************************************
+ *
+ * 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.
+ *
+ ************************************************************************/
+
+package ifc.style;
+
+import lib.MultiMethodTest;
+import lib.Status;
+import lib.StatusException;
+
+import com.sun.star.style.XStyle;
+
+/**
+* Testing <code>com.sun.star.style.XStyle</code>
+* interface methods :
+* <ul>
+* <li><code> isUserDefined()</code></li>
+* <li><code> isInUse()</code></li>
+* <li><code> getParentStyle()</code></li>
+* <li><code> setParentStyle()</code></li>
+* </ul> <p>
+* This test needs the following object relations :
+* <ul>
+* <li> <code>'PoolStyle'</code> (of type <code>XStyle</code>):
+* some style from the SOffice collection (not user defined) </li>
+* <ul> <p>
+* Test is <b> NOT </b> multithread compilant. <p>
+* @see com.sun.star.style.XStyle
+*/
+public class _XStyle extends MultiMethodTest {
+
+ public XStyle oObj = null;
+ XStyle oMyStyle = null;
+
+ /**
+ * Retrieves object relations.
+ * @throws StatusException If one of relations not found.
+ */
+ public void before() {
+ oMyStyle = (XStyle) tEnv.getObjRelation("PoolStyle");
+ if (oMyStyle == null) throw new StatusException
+ (Status.failed("Relation not found")) ;
+ }
+
+ /**
+ * Gets the parent style . <p>
+ * Has <b> OK </b> status if the name of style returned is
+ * equal to the name of style which was set before. <p>
+ * The following method tests are to be completed successfully before :
+ * <ul>
+ * <li> <code> setParentStyle() </code> : to set the parent style </li>
+ * </ul>
+ */
+ public void _getParentStyle() {
+ requiredMethod("setParentStyle()");
+ tRes.tested("getParentStyle()",
+ oObj.getParentStyle().equals(oMyStyle.getName()));
+ }
+
+ /**
+ * Test calls the method. <p>
+ * Has <b> OK </b> status if the method sreturns <code>true</code>. <p>
+ */
+ public void _isInUse() {
+ tRes.tested("isInUse()",oObj.isInUse());
+ }
+
+ /**
+ * Test calls the method. <p>
+ * Has <b> OK </b> status if the method returns <code>true</code>. <p>
+ */
+ public void _isUserDefined() {
+ tRes.tested("isUserDefined()",
+ oObj.isUserDefined() && !oMyStyle.isUserDefined() );
+ }
+
+ /**
+ * Sets the style name which was passed as relation. <p>
+ * Has <b> OK </b> status if the method successfully returns
+ * and no exceptions were thrown. <p>
+ */
+ public void _setParentStyle() {
+ boolean result = true ;
+ try {
+ oObj.setParentStyle(oMyStyle.getName());
+ } catch (com.sun.star.container.NoSuchElementException e) {
+ log.println("Exception occured while method call: " + e);
+ result = false ;
+ }
+
+ tRes.tested("setParentStyle()",result);
+ }
+} //finish class _XStyle
+
diff --git a/qadevOOo/tests/java/ifc/style/_XStyleFamiliesSupplier.java b/qadevOOo/tests/java/ifc/style/_XStyleFamiliesSupplier.java
new file mode 100644
index 000000000000..037f4eab829b
--- /dev/null
+++ b/qadevOOo/tests/java/ifc/style/_XStyleFamiliesSupplier.java
@@ -0,0 +1,55 @@
+/*************************************************************************
+ *
+ * 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.
+ *
+ ************************************************************************/
+
+package ifc.style;
+
+import lib.MultiMethodTest;
+
+import com.sun.star.style.XStyleFamiliesSupplier;
+
+/**
+* Testing <code>com.sun.star.style.XStyleFamiliesSupplier</code>
+* interface methods :
+* <ul>
+* <li><code> getStyleFamilies()</code></li>
+* </ul> <p>
+* Test is multithread compilant. <p>
+* @see com.sun.star.style.XStyleFamiliesSupplier
+*/
+public class _XStyleFamiliesSupplier extends MultiMethodTest {
+
+ public XStyleFamiliesSupplier oObj = null;
+
+ /**
+ * Test calls the method. <p>
+ * Has <b> OK </b> status if the method returns not null value.
+ */
+ public void _getStyleFamilies() {
+ tRes.tested("getStyleFamilies()",oObj.getStyleFamilies() != null);
+ }
+}
+