Version 5.2.6.1, tag libreoffice-5.2.6.1
[LibreOffice.git] / offapi / com / sun / star / util / PathSubstitution.idl
blobc0d99bc9f54991c4cfd5ff6e321dea76e32fd95b
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef __com_sun_star_util_PathSubstitution_idl__
21 #define __com_sun_star_util_PathSubstitution_idl__
23 #include <com/sun/star/util/XStringSubstitution.idl>
24 #include <com/sun/star/container/XNameContainer.idl>
25 #include <com/sun/star/container/XContainerListener.idl>
28 module com { module sun { module star { module util {
31 /** A service to support the substitution and resubstitution of path variables.
33 <p>
34 A path variable must be specified with the following syntax: "$("&lt;variable-name&gt;")".
35 Path variables are not case sensitive and are always provided as a UCB-compliant URLs
36 (for example: "file:///c:/temp" or "file:///usr/install"). This is mandatory to support an
37 optional remote file system.<br>
38 A user defined list of path variables is supported. This list is stored in the Office
39 configuration file (org/openoffice/Office/Substitution.xml). Please have a look at the
40 schema definition file which configuration structure this file uses.<br>
41 There is also a set of variables that have pre-defined values:
42 </p>
43 <dl>
44 <dt>\$(inst)</dt>
45 <dd>Installation path of the Office.</dd>
46 <dt>\$(prog)</dt>
47 <dd>Program path of the Office.</dd>
48 <dt>\$(user)</dt>
49 <dd>The user installation directory.</dd>
50 <dt>\$(work)</dt>
51 <dd>The work directory of the user. Under Windows this would be the
52 "MyDocuments" subdirectory. Under Unix this would be the home-directory</dd>
53 <dt>\$(home)</dt>
54 <dd>The home directory of the user. Under Unix this would be the home-
55 directory. Under Windows this would be the "Documents and Settings\<username>"
56 subdirectory.</dd>
57 <dt>\$(temp)</dt>
58 <dd>The current temporary directory.</dd>
59 <dt>\$(path)</dt>
60 <dd>The value of PATH environment variable.</dd>
61 <dt>\$(username)</dt>
62 <dd>The username (login name) of the currently active user, excluding the domain name on Windows. (Available since LibreOffice 5.2)</dd>
63 <dt>\$(langid)</dt>
64 <dd>The language code used by the Office, like 0x0009=English, 0x0409=English US.</dd>
65 <dt>\$(vlang)</dt>
66 <dd>The language used by the Office as a string. Like "German" for a German Office.</dd>
67 </dl>
68 <p>
69 Attention: Most predefined variables describe an absolute path.
70 The only exceptions are: \$(username), \$(langid) and \$(vlang).
71 Therefore the service implementation should only substitute variables which
72 are located at the start of a provided path string or are part of a multi-path.
73 This special service is not designed to be a text substiution but shall
74 provide (a) valid substituted path(s).
75 </p>
77 @since OOo 1.1.2
80 published service PathSubstitution : XStringSubstitution;
83 }; }; }; };
85 #endif
87 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */