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_resource_OfficeResourceLoader_idl__
21 #define __com_sun_star_resource_OfficeResourceLoader_idl__
23 #include
<com
/sun
/star
/resource
/XResourceBundleLoader.idl
>
25 module com
{ module sun
{ module star
{ module resource
{
27 /** describes a XResourceBundleLoader which provides access to the OpenOffice.org
30 <p>An OpenOffice.org installation comes with a number of resource files in an proprietary
31 format, located inside the installation's program/resource directory. The OfficeResourceLoader
32 singleton (available at a component context as value with the key
33 <code>/singletons/com.sun.star.resource.OfficeResourceLoader</code>), provides access to some
34 types of resources within those files.</p>
36 <p>Clients have to specify the resource file base name in the call to
37 XResourceBundleLoader::loadBundle() resp. XResourceBundleLoader::loadBundle_Default()
38 method. The loader will extent this base name so that the resulting name conforms to the OpenOffice.org
39 resource file naming conventions, and look up the respective resource file, for the requested locale,
40 in OpenOffice.org's installation.</p>
42 <p>The lookup process uses the fallback mechanism as described at the XResourceBundle interface,
43 except that <code>Locale.getDefault()</code> is not used.</p>
45 <p>Resource keys, as passed to the XResourceBundle::getDirectElement() or
46 com::sun::star::container::XNameAccess::getByName(), have the following format:
47 <code><resource_type>:<numeric_identifier></code>, where <code><resource_type></code> specifies
48 the type of the requested resource (see below) and <code><numeric_identifier></code> is the numeric
49 identifier of the resource.</p>
51 <p>The following resource types are currently supported:
53 <li><em>string</em>: denotes a string resource</li>
57 <p>Since the numeric resource identifiers are highly build-dependent (e.g. can change with any next
58 OpenOffice.org build), you are <strong>strongly</strong> discouraged from using the OfficeResoureLoader
59 service in a component which targets more than one particular OpenOffice.org build.</p>
63 singleton OfficeResourceLoader
: XResourceBundleLoader
;
69 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */