2 * This file is part of the LibreOffice project.
4 * This Source Code Form is subject to the terms of the Mozilla Public
5 * License, v. 2.0. If a copy of the MPL was not distributed with this
6 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 * This file incorporates work covered by the following license notice:
10 * Licensed to the Apache Software Foundation (ASF) under one or more
11 * contributor license agreements. See the NOTICE file distributed
12 * with this work for additional information regarding copyright
13 * ownership. The ASF licenses this file to you under the Apache
14 * License, Version 2.0 (the "License"); you may not use this file
15 * except in compliance with the License. You may obtain a copy of
16 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
21 import com
.sun
.star
.drawing
.LineDash
;
22 import lib
.MultiPropertyTest
;
25 * Testing <code>com.sun.star.drawing.LineProperties</code>
26 * service properties :
28 * <li><code> LineStyle</code></li>
29 * <li><code> LineDash</code></li>
30 * <li><code> LineColor</code></li>
31 * <li><code> LineTransparence</code></li>
32 * <li><code> LineWidth</code></li>
33 * <li><code> LineJoint</code></li>
34 * <li><code> LineStartName</code></li>
35 * <li><code> LineStart</code></li>
36 * <li><code> LineEnd</code></li>
37 * <li><code> LineStartCenter</code></li>
38 * <li><code> LineStartWidth</code></li>
39 * <li><code> LineEndCenter</code></li>
40 * <li><code> LineEndWidth</code></li>
42 * Properties testing is automated by <code>lib.MultiPropertyTest</code>.
43 * @see com.sun.star.drawing.LineProperties
45 public class _LineProperties
extends MultiPropertyTest
{
48 * Tester used for property LineStartName which can have
49 * only predefined String values.
51 protected PropertyTester LineTester
= new PropertyTester() {
53 protected Object
getNewValue(String propName
, Object oldValue
)
54 throws java
.lang
.IllegalArgumentException
{
55 if (oldValue
.equals("Arrow"))
62 * The property switched between 'Square' and 'Arrow' values.
64 public void _LineStartName() {
65 log
.println("Testing with custom Property tester");
66 testProperty("LineStartName", LineTester
) ;
69 public void _LineDash() {
70 LineDash aLineDash
= new LineDash();
71 LineDash aLineDash2
= new LineDash();
72 aLineDash
.DashLen
= 5;
73 aLineDash2
.DashLen
= 1;
74 testProperty("LineDash",aLineDash
,aLineDash2
);