Update ooo320-m1
[ooovba.git] / qadevOOo / tests / java / ifc / util / _PathSettings.java
blob7c059237bb6b48d959a8cf7790450387901d0265
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: _PathSettings.java,v $
10 * $Revision: 1.5 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 package ifc.util;
33 import lib.MultiPropertyTest;
34 import util.utils;
36 import com.sun.star.lang.XMultiServiceFactory;
38 /**
39 * Testing <code>com.sun.star.util.PathSettings</code>
40 * service properties :
41 * <ul>
42 * <li><code> Addin </code></li>
43 * <li><code> AutoCorrect </code></li>
44 * <li><code> AutoText </code></li>
45 * <li><code> Backup </code></li>
46 * <li><code> Basic </code></li>
47 * <li><code> Bitmap </code></li>
48 * <li><code> Config </code></li>
49 * <li><code> Dictionary </code></li>
50 * <li><code> Favorites </code></li>
51 * <li><code> Filter </code></li>
52 * <li><code> Gallery </code></li>
53 * <li><code> Graphic </code></li>
54 * <li><code> Help </code></li>
55 * <li><code> Linguistic </code></li>
56 * <li><code> Module </code></li>
57 * <li><code> Palette </code></li>
58 * <li><code> Plugin </code></li>
59 * <li><code> Storage </code></li>
60 * <li><code> Temp </code></li>
61 * <li><code> Template </code></li>
62 * <li><code> UIConfig </code></li>
63 * <li><code> UserConfig </code></li>
64 * <li><code> UserDictionary</code></li>
65 * <li><code> Work </code></li>
66 * </ul> <p>
68 * Properties testing is automated by <code>lib.MultiPropertyTest</code>.
69 * @see com.sun.star.util.PathSettings
71 public class _PathSettings extends MultiPropertyTest {
73 /**
74 * This path list could be empty after SO installation.
75 * And the URL is validated to match the pattern 'file:///*'
76 * thats why the custom changing of this property required.
78 public void _UIConfig() {
79 testProperty("UIConfig", new PropertyTester() {
80 public Object getNewValue(String propName, Object oldVal) {
81 String path = (String) oldVal;
82 if (path == null) path = "";
83 if (path.length() > 0 && !path.endsWith(";")) {
84 path += ";";
86 path += utils.getOfficeTemp((XMultiServiceFactory)tParam.getMSF());
87 return path;
89 });