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_resource_OfficeResourceLoader_idl__
25#define __com_sun_star_resource_OfficeResourceLoader_idl__
26
27#ifndef __com_sun_star_resource_XResourceBundleLoader_idl__
28#include <com/sun/star/resource/XResourceBundleLoader.idl>
29#endif
30
31//=============================================================================
32module com { module sun { module star { module resource {
33//=============================================================================
34
35/** describes a <type>XResourceBundleLoader</type> which provides access to the OpenOffice.org
36    resource files.
37
38    <p>An OpenOffice.org installation comes with a number of resource files in an proprietary
39    format, located insisde the installation's program/resource directory. The <type>OfficeResoureLoader</type>
40    singleton (available at a component context as value with the key
41    <code>/singletons/com.sun.star.resource.OfficeResourceLoader</code>), provides access to some
42    types of resources within those files.</p>
43
44    <p>Clients have to specifiy the resource file base name in the call to
45    <member>XResourceBundleLoader::loadBundle</member> resp. <member>XResourceBundleLoader::loadBundle_Default</member>
46    method. The loader will extent this base name so that the resulting name conforms to the OpenOffice.org
47    resource file naming conventions, and look up the respective resource file, for the requested locale,
48    in OpenOffice.org's installation.</p>
49
50    <p>The lookup process uses the fallback mechanism as described at the <type>XResourceBundle</type> interface,
51    except that <code>Locale.getDefault()</code> is not used.</p>
52
53    <p>Resource keys, as passed to the <member>XResourceBundle::getDirectElement</member> or
54    <member scope="com::sun::star::container">XNameAccess::getByName</member>, have the following format:
55    <code>&lt;resource_type&gt;:&lt;numeric_identifier&gt;</code>, where <code>&lt;resource_type&gt; specifies
56    the type of the requested resource (see below) and <code>&lt;numeric_identifier&gt;</code> is the numeric
57    identifier of the resource.</p>
58
59    <p>The following resource types are currently supported:
60    <ul>
61        <li><em>string</em>: denotes a string resource</li>
62    </ul>
63    </p>
64
65    <p>Since the numeric resource identifiers are highly build-dependent (e.g. can change with any next
66    OpenOffice.org build), you are <strong>strongly</strong> discouraged from using the <type>OfficeResoureLoader</type>
67    service in a component which targets more than one particular OpenOffice.org build.</p>
68
69    @since OOo 2.0.3
70*/
71singleton OfficeResourceLoader : XResourceBundleLoader;
72
73//=============================================================================
74}; }; }; };
75//=============================================================================
76
77#endif
78