1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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_XOfficeInstallationDirectories_idl__
21 #define __com_sun_star_util_XOfficeInstallationDirectories_idl__
23 #include
<com
/sun
/star
/uno
/XInterface.idl
>
25 module com
{ module sun
{ module star
{ module util
{
27 /** encapsulates access to the current office installation directory and
28 office user data directory, provides functionality to create URLs
29 containing relocatable (not absolute) references to the current office
30 installation directory and user data directory and vice versa.
32 <p>This functionality is useful when data containing references to the
33 current office installation directory must be made persistent and re-read
34 later. In many cases, storing the reference directly would destroy the
35 relocatability of an office installation.
39 published
interface XOfficeInstallationDirectories
: com
::sun
::star
::uno
::XInterface
41 /** returns the absolute URL containing the directory of the current office
42 installation (for example "file:///opt/LibreOffice")
45 the absolute URL containing the directory of the current office
48 string getOfficeInstallationDirectoryURL
();
50 /** returns the absolute URL containing the directory where the current
51 office installation expects its user data (for example
52 "file:///home/kso/.config/libreoffice/4")
55 the absolute URL containing the directory of the current office
58 string getOfficeUserDataDirectoryURL
();
60 /** calculates a relocatable URL from the given URL.
62 <p>If the given URL contains an absolute reference to the current office
63 installation directory or office user data directory, this method will
64 replace the absolute reference by an opaque placeholder string.
65 <code>makeRelocatableURL</code> must be used in order to re-replace the
66 placeholder by an absolute reference.
69 The URL for that a relocatable URL is requested. In case the URL does
70 not contain a reference to the current office installation or to the office
71 user data directory, the input URL will be returned unchanged.
76 string makeRelocatableURL
( [in] string URL
);
78 /** the counterpart of <code>makeRelocatableURL</code>.
80 <p>If the given URL contains a placeholder for an absolute reference to
81 the current office installation directory or for the office user data
82 directory, that was created using <code>makeRelocatableURL</code>, the
83 respective placeholder will be replaced by an absolute reference to the
84 current office installation directory or office user data directory.
87 The URL for that an absolute URL is requested. In case the URL does
88 not contain the opaque relocation placeholder used by
89 <code>makeRelocatableURL</code>, the input URL will be returned
95 string makeAbsoluteURL
( [in] string URL
);
102 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */