use insert function instead of for loop
[LibreOffice.git] / offapi / com / sun / star / util / PathSubstitution.idl
blob5f59d6fc205bd632984dbe5f2555f8033f6c12e8
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 .
21 module com { module sun { module star { module util {
24 /** A service to support the substitution and resubstitution of path variables.
26 <p>
27 A path variable must be specified with the following syntax: "$("&lt;variable-name&gt;")".
28 Path variables are not case sensitive and are always provided as a UCB-compliant URLs
29 (for example: "file:///c:/temp" or "file:///usr/install"). This is mandatory to support an
30 optional remote file system.<br>
31 There is a set of variables that have pre-defined values:
32 </p>
33 <dl>
34 <dt>\$(inst)</dt>
35 <dd>Installation path of the Office.</dd>
36 <dt>\$(prog)</dt>
37 <dd>Program path of the Office.</dd>
38 <dt>\$(user)</dt>
39 <dd>The user installation directory.</dd>
40 <dt>\$(work)</dt>
41 <dd>The work directory of the user. Under Windows this would be the
42 "MyDocuments" subdirectory. Under Unix this would be the home-directory</dd>
43 <dt>\$(home)</dt>
44 <dd>The home directory of the user. Under Unix this would be the home-
45 directory. Under Windows this would be the CSIDL_PERSONAL directory,
46 for example "Documents and Settings\<username>\Documents".</dd>
47 <dt>\$(temp)</dt>
48 <dd>The current temporary directory.</dd>
49 <dt>\$(path)</dt>
50 <dd>The value of PATH environment variable.</dd>
51 <dt>\$(username)</dt>
52 <dd>The username (login name) of the currently active user, excluding the domain name on Windows. (Available since LibreOffice 5.2)</dd>
53 <dt>\$(langid)</dt>
54 <dd>The language code used by the Office, like 0x0009=English, 0x0409=English US.</dd>
55 <dt>\$(vlang)</dt>
56 <dd>The language used by the Office as a string. Like "German" for a German Office.</dd>
57 </dl>
58 <p>
59 Attention: Most predefined variables describe an absolute path.
60 The only exceptions are: \$(username), \$(langid) and \$(vlang).
61 Therefore the service implementation should only substitute variables which
62 are located at the start of a provided path string or are part of a multi-path.
63 This special service is not designed to be a text substitution but shall
64 provide (a) valid substituted path(s).
65 </p>
67 @since OOo 1.1.2
70 published service PathSubstitution : XStringSubstitution;
73 }; }; }; };
75 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */