diff options
Diffstat (limited to 'qadevOOo/tests/java/ifc/style')
13 files changed, 81 insertions, 81 deletions
diff --git a/qadevOOo/tests/java/ifc/style/_CharacterProperties.java b/qadevOOo/tests/java/ifc/style/_CharacterProperties.java index d6e6977222a4..5235bc2fd676 100644 --- a/qadevOOo/tests/java/ifc/style/_CharacterProperties.java +++ b/qadevOOo/tests/java/ifc/style/_CharacterProperties.java @@ -1,7 +1,7 @@ /************************************************************************* * * 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 @@ -35,7 +35,7 @@ import com.sun.star.xml.AttributeData; import java.util.Enumeration; import java.util.Hashtable; import lib.MultiPropertyTest; - + import util.ValueChanger; import util.utils; @@ -160,7 +160,7 @@ public class _CharacterProperties extends MultiPropertyTest { /** * Custom tester for style name properties. If object relations "STYLENAME1" - * and "STYLENAME2" exists, then testing with these strings, else switches + * and "STYLENAME2" exists, then testing with these strings, else switches * between 'Citation' and 'Emphasis' names. */ protected PropertyTester StyleTester = new PropertyTester() { @@ -311,9 +311,9 @@ public class _CharacterProperties extends MultiPropertyTest { "RubyIsAbove",new Boolean(true)); } } - + /** - * This property only takes values between 0..100 + * This property only takes values between 0..100 * so ist must be treated special */ public void _CharEscapementHeight() { @@ -321,7 +321,7 @@ public class _CharacterProperties extends MultiPropertyTest { Byte max = new Byte((byte)100); testProperty("CharEscapementHeight", aByte, max) ; } - + /** * This property can be void, so if old value is <code> null </code> @@ -434,7 +434,7 @@ public class _CharacterProperties extends MultiPropertyTest { tRes.tested(name, false); } }// end of changeProp - + public void _TextUserDefinedAttributes() { XNameContainer uda = null; boolean res = false; @@ -457,7 +457,7 @@ public class _CharacterProperties extends MultiPropertyTest { String[] els = uda.getElementNames(); oObj.setPropertyValue("TextUserDefinedAttributes", uda); uda = (XNameContainer) AnyConverter.toObject( - new Type(XNameContainer.class), + new Type(XNameContainer.class), oObj.getPropertyValue("TextUserDefinedAttributes")); els = uda.getElementNames(); @@ -488,19 +488,19 @@ public class _CharacterProperties extends MultiPropertyTest { 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(); @@ -510,34 +510,34 @@ public class _CharacterProperties extends MultiPropertyTest { 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 index a5709503f602..364cc3ac446f 100644 --- a/qadevOOo/tests/java/ifc/style/_CharacterPropertiesAsian.java +++ b/qadevOOo/tests/java/ifc/style/_CharacterPropertiesAsian.java @@ -1,7 +1,7 @@ /************************************************************************* * * 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 diff --git a/qadevOOo/tests/java/ifc/style/_CharacterPropertiesComplex.java b/qadevOOo/tests/java/ifc/style/_CharacterPropertiesComplex.java index 0bf69d68e7e9..d7df0fca3b71 100644 --- a/qadevOOo/tests/java/ifc/style/_CharacterPropertiesComplex.java +++ b/qadevOOo/tests/java/ifc/style/_CharacterPropertiesComplex.java @@ -1,7 +1,7 @@ /************************************************************************* * * 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 @@ -47,7 +47,7 @@ import lib.MultiPropertyTest; * @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)) ; @@ -56,14 +56,14 @@ public class _CharacterPropertiesComplex extends MultiPropertyTest { 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 index fb6acc14a42e..2efaeedb391b 100755 --- a/qadevOOo/tests/java/ifc/style/_CharacterStyle.java +++ b/qadevOOo/tests/java/ifc/style/_CharacterStyle.java @@ -1,7 +1,7 @@ /************************************************************************* * * 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 @@ -28,7 +28,7 @@ package ifc.style; import lib.MultiPropertyTest; - + /** * Testing <code>com.sun.star.style.CharacterStyle</code> diff --git a/qadevOOo/tests/java/ifc/style/_PageProperties.java b/qadevOOo/tests/java/ifc/style/_PageProperties.java index c53f86b4aa41..cca2c9074667 100755 --- a/qadevOOo/tests/java/ifc/style/_PageProperties.java +++ b/qadevOOo/tests/java/ifc/style/_PageProperties.java @@ -1,7 +1,7 @@ /************************************************************************* * * 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 @@ -46,7 +46,7 @@ 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); @@ -59,9 +59,9 @@ public class _PageProperties extends MultiPropertyTest { 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 @@ -73,19 +73,19 @@ public class _PageProperties extends MultiPropertyTest { try { setting = (String)oObj.getPropertyValue("PrinterPaperTray"); log.println("Property 'PrinterPaperTray' is set to '" + setting + "'."); - res = setting != null; + 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; @@ -97,8 +97,8 @@ public class _PageProperties extends MultiPropertyTest { 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(); + uda.insertByName("Cellprop:has-first-alien-attribute",attr); + String[] els = uda.getElementNames(); oObj.setPropertyValue("UserDefinedAttributes",uda); uda = (XNameContainer) AnyConverter.toObject( new Type(XNameContainer.class), @@ -118,7 +118,7 @@ public class _PageProperties extends MultiPropertyTest { 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 index d8a6e5f7d344..0c29e1591f86 100755 --- a/qadevOOo/tests/java/ifc/style/_PageStyle.java +++ b/qadevOOo/tests/java/ifc/style/_PageStyle.java @@ -1,7 +1,7 @@ /************************************************************************* * * 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 @@ -31,11 +31,11 @@ import ifc.style._PageProperties; /** * Test page style properties. - * These properties are a subset of the PageProperties. So just use the + * 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 @@ -44,13 +44,13 @@ public class _PageStyle extends _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 index d412b93531da..64c22912fea1 100644 --- a/qadevOOo/tests/java/ifc/style/_ParagraphProperties.java +++ b/qadevOOo/tests/java/ifc/style/_ParagraphProperties.java @@ -1,7 +1,7 @@ /************************************************************************* * * 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 @@ -41,7 +41,7 @@ import java.util.Hashtable; import lib.MultiPropertyTest; import lib.Status; import share.LogWriter; - + import util.utils; @@ -159,7 +159,7 @@ public class _ParagraphProperties extends MultiPropertyTest { */ protected PropertyTester PageDescTester = new PropertyTester() { protected Object getNewValue(String propName, Object oldValue) { - if (!util.utils.isVoid(oldValue) && + if (!util.utils.isVoid(oldValue) && (oldValue.equals("Default"))) { return "HTML"; } else { @@ -175,7 +175,7 @@ public class _ParagraphProperties extends MultiPropertyTest { */ protected PropertyTester ShortTester = new PropertyTester() { protected Object getNewValue(String propName, Object oldValue) { - if ((oldValue != null) && + if ((oldValue != null) && (oldValue.equals(new Short((short) 0)))) { return new Short((short) 2); } else { @@ -191,7 +191,7 @@ public class _ParagraphProperties extends MultiPropertyTest { */ protected PropertyTester BooleanTester = new PropertyTester() { protected Object getNewValue(String propName, Object oldValue) { - if ((oldValue != null) && + if ((oldValue != null) && (oldValue.equals(new Boolean((boolean) false)))) { return new Boolean((boolean) true); } else { @@ -297,7 +297,7 @@ public class _ParagraphProperties extends MultiPropertyTest { log.println("Testing with custom Property tester"); try { - oObj.setPropertyValue("ParaAdjust", + oObj.setPropertyValue("ParaAdjust", com.sun.star.style.ParagraphAdjust.BLOCK); } catch (com.sun.star.lang.WrappedTargetException e) { log.println("Exception occured setting property 'ParagraphAdjust'" + e); @@ -338,7 +338,7 @@ public class _ParagraphProperties extends MultiPropertyTest { * Tested with custom property tester. <p> */ public void _ParaIsConnectBorder() { - + log.println("Testing with custom Property tester"); testProperty("ParaIsConnectBorder", BooleanTester); } @@ -366,7 +366,7 @@ public class _ParagraphProperties extends MultiPropertyTest { */ public void _NumberingRules() { requiredMethod("NumberingStyleName"); - + XIndexReplace NumberingRules = null; PropertyValue[] propertyValues = null; try { @@ -392,12 +392,12 @@ public class _ParagraphProperties extends MultiPropertyTest { 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); + + tRes.tested("NumberingRules", result); } public void _ParaUserDefinedAttributes() { @@ -422,7 +422,7 @@ public class _ParagraphProperties extends MultiPropertyTest { String[] els = uda.getElementNames(); oObj.setPropertyValue("ParaUserDefinedAttributes", uda); uda = (XNameContainer) AnyConverter.toObject( - new Type(XNameContainer.class), + new Type(XNameContainer.class), oObj.getPropertyValue("ParaUserDefinedAttributes")); els = uda.getElementNames(); @@ -453,19 +453,19 @@ public class _ParagraphProperties extends MultiPropertyTest { 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(); @@ -475,33 +475,33 @@ public class _ParagraphProperties extends MultiPropertyTest { 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 index 6c3730d3bb5c..d5aa514f3631 100644 --- a/qadevOOo/tests/java/ifc/style/_ParagraphPropertiesAsian.java +++ b/qadevOOo/tests/java/ifc/style/_ParagraphPropertiesAsian.java @@ -1,7 +1,7 @@ /************************************************************************* * * 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 @@ -48,7 +48,7 @@ public class _ParagraphPropertiesAsian extends MultiPropertyTest { */ protected PropertyTester BooleanTester = new PropertyTester() { protected Object getNewValue(String propName, Object oldValue) { - if ((oldValue != null) && + if ((oldValue != null) && (oldValue.equals(new Boolean((boolean) false)))) { return new Boolean((boolean) true); } else { diff --git a/qadevOOo/tests/java/ifc/style/_ParagraphPropertiesComplex.java b/qadevOOo/tests/java/ifc/style/_ParagraphPropertiesComplex.java index 932bec5b3ead..a0c061271684 100644 --- a/qadevOOo/tests/java/ifc/style/_ParagraphPropertiesComplex.java +++ b/qadevOOo/tests/java/ifc/style/_ParagraphPropertiesComplex.java @@ -1,7 +1,7 @@ /************************************************************************* * * 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 @@ -37,19 +37,19 @@ import lib.MultiPropertyTest; */ 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 index 8dcdb56dc988..73fac8699bdf 100644 --- a/qadevOOo/tests/java/ifc/style/_ParagraphStyle.java +++ b/qadevOOo/tests/java/ifc/style/_ParagraphStyle.java @@ -1,7 +1,7 @@ /************************************************************************* * * 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 @@ -32,5 +32,5 @@ 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 index 16dbf570c301..4174ecaeaf1e 100644 --- a/qadevOOo/tests/java/ifc/style/_Style.java +++ b/qadevOOo/tests/java/ifc/style/_Style.java @@ -1,7 +1,7 @@ /************************************************************************* * * 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 @@ -48,7 +48,7 @@ public class _Style extends MultiPropertyTest { 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 index bf0bb6bea2c8..5f6a5e38b0e4 100644 --- a/qadevOOo/tests/java/ifc/style/_XStyle.java +++ b/qadevOOo/tests/java/ifc/style/_XStyle.java @@ -1,7 +1,7 @@ /************************************************************************* * * 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 diff --git a/qadevOOo/tests/java/ifc/style/_XStyleFamiliesSupplier.java b/qadevOOo/tests/java/ifc/style/_XStyleFamiliesSupplier.java index 037f4eab829b..dda7b109da3c 100644 --- a/qadevOOo/tests/java/ifc/style/_XStyleFamiliesSupplier.java +++ b/qadevOOo/tests/java/ifc/style/_XStyleFamiliesSupplier.java @@ -1,7 +1,7 @@ /************************************************************************* * * 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 |