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