LibreOffice
LibreOffice 6.0 SDK API Reference
List of all members
PathSubstitution Service Referencepublished

A service to support the substitution and resubstitution of path variables. More...

import"PathSubstitution.idl";

Inheritance diagram for PathSubstitution:
XStringSubstitution XInterface

Additional Inherited Members

- Public Member Functions inherited from XStringSubstitution
string substituteVariables ([in] string aText, [in] boolean bSubstRequired) raises ( com::sun::star::container::NoSuchElementException )
 Exchanges variables inside a given text with a substitution text defined for the variables. More...
 
string reSubstituteVariables ([in] string aText)
 Tries to replace parts of aText with variables that represents these sub strings. More...
 
string getSubstituteVariableValue ([in] string variable) raises (::com::sun::star::container::NoSuchElementException )
 Returns the current value of a variable. More...
 
- Public Member Functions inherited from XInterface
any queryInterface ([in] type aType)
 queries for a new interface to an existing UNO object. More...
 
void acquire ()
 increases the reference counter by one. More...
 
void release ()
 decreases the reference counter by one. More...
 

Detailed Description

A service to support the substitution and resubstitution of path variables.

A path variable must be specified with the following syntax: "$("<variable-name>")". Path variables are not case sensitive and are always provided as a UCB-compliant URLs (for example: "file:///c:/temp" or "file:///usr/install"). This is mandatory to support an optional remote file system.
There is a set of variables that have pre-defined values:

$(inst)
Installation path of the Office.
$(prog)
Program path of the Office.
$(user)
The user installation directory.
$(work)
The work directory of the user. Under Windows this would be the "MyDocuments" subdirectory. Under Unix this would be the home-directory
$(home)
The home directory of the user. Under Unix this would be the home- directory. Under Windows this would be the CSIDL_PERSONAL directory, for example "Documents and Settings\<username>\Documents".
$(temp)
The current temporary directory.
$(path)
The value of PATH environment variable.
$(username)
The username (login name) of the currently active user, excluding the domain name on Windows. (Available since LibreOffice 5.2)
$(langid)
The language code used by the Office, like 0x0009=English, 0x0409=English US.
$(vlang)
The language used by the Office as a string. Like "German" for a German Office.

Attention: Most predefined variables describe an absolute path. The only exceptions are: $(username), $(langid) and $(vlang). Therefore the service implementation should only substitute variables which are located at the start of a provided path string or are part of a multi-path. This special service is not designed to be a text substitution but shall provide (a) valid substituted path(s).

Since
OOo 1.1.2

The documentation for this service was generated from the following file: