1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 24#ifndef __com_sun_star_util_PathSubstitution_idl__ 25#define __com_sun_star_util_PathSubstitution_idl__ 26 27#ifndef __com_sun_star_util_XStringSubstitution_idl__ 28#include <com/sun/star/util/XStringSubstitution.idl> 29#endif 30 31#ifndef __com_sun_star_container_XNameContainer_idl__ 32#include <com/sun/star/container/XNameContainer.idl> 33#endif 34 35#ifndef __com_sun_star_container_XContainerListener_idl__ 36#include <com/sun/star/container/XContainerListener.idl> 37#endif 38 39//============================================================================= 40 41module com { module sun { module star { module util { 42 43//============================================================================= 44 45/** A service to support the substitution and resubstitution of path variables. 46 47 <p> 48 A path variable must be specified with the following syntax: "$("<variable-name>")". 49 Path variables are not case sensitive and are always provided as a UCB-complient URL's 50 (for example: "file:///c:/temp" or "file:///usr/install"). This is mandatory to support an 51 optional remote file system.<br> 52 A user defined list of path variables is supported. This list is stored in the Office 53 configuration file (org/openoffice/Office/Substitution.xml). Please have a look at the 54 schema definition file which configuration structure this file uses.<br> 55 There is also a set of variables that have pre-defined values: 56 </p> 57 <dl> 58 <dt>$(inst)</dt> 59 <dd>Installation path of the Office Basis layer.</dd> 60 <dt>$(prog)</dt> 61 <dd>Program path of the Office Basis layer.</dd> 62 <dt>$(brandbaseurl)</dt> 63 <dd>Installation path of the Office Brand layer.</dd> 64 <dt>$(user)</dt> 65 <dd>The user installation directory.</dd> 66 <dt>$(work)</dt> 67 <dd>The work directory of the user. Under Windows this would be the 68 "MyDocuments" subdirectory. Under Unix this would be the home-directory</dd> 69 <dt>$(home)</dt> 70 <dd>The home directory of the user. Under Unix this would be the home- 71 directory. Under Windows this would be the "Documents and Settings\<username>" 72 subdirectory.</dd> 73 <dt>$(temp)</dt> 74 <dd>The current temporary directory.</dd> 75 <dt>$(path)</dt> 76 <dd>The value of PATH environment variable.</dd> 77 <dt>$(lang)</dt> 78 <dd>The country code used by the Office, like 01=english, 49=german.</dd> 79 <dt>$(langid)</dt> 80 <dd>The language code used by the Office, like 0x0009=english, 0x0409=english us.</dd> 81 <dt>$(vlang)</dt> 82 <dd>The language used by the Office as a string. Like "german" for a german Office.</dd> 83 </dl> 84 <p> 85 Attention: Most predefined variables describe an absolute path. 86 The only exceptions are: $(lang), $(langid) and $(vlang). 87 Therefore the service implementation should only substitute variables which 88 are located at the start of a provided path string or are part of a multi-path. 89 This special service is not designed to be a text substitution but shall 90 provide (a) valid substituted path(s). 91 </p> 92 93 @since OpenOffice 1.1.2 94*/ 95 96published service PathSubstitution 97{ 98 //------------------------------------------------------------------------- 99 /** Interface to exchange path variables with defined paths and to resubstitute paths with path variables. 100 101 <p> 102 To resubstitute path variables the caller must provide paths as UCB-compliant URL's. 103 </p> 104 */ 105 interface com::sun::star::util::XStringSubstitution; 106}; 107 108//============================================================================= 109 110}; }; }; }; 111 112#endif 113