merge the formfield patch from ooo-build
[ooovba.git] / offapi / com / sun / star / resource / OfficeResourceLoader.idl
blob5ba0dee292f184f4be00d4fef5e63be801987faa
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: OfficeResourceLoader.idl,v $
10 * $Revision: 1.4 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef __com_sun_star_resource_OfficeResourceLoader_idl__
32 #define __com_sun_star_resource_OfficeResourceLoader_idl__
34 #ifndef __com_sun_star_resource_XResourceBundleLoader_idl__
35 #include <com/sun/star/resource/XResourceBundleLoader.idl>
36 #endif
38 //=============================================================================
39 module com { module sun { module star { module resource {
40 //=============================================================================
42 /** describes a <type>XResourceBundleLoader</type> which provides access to the OpenOffice.org
43 resource files.
45 <p>An OpenOffice.org installation comes with a number of resource files in an proprietary
46 format, located insisde the installation's program/resource directory. The <type>OfficeResoureLoader</type>
47 singleton (available at a component context as value with the key
48 <code>/singletons/com.sun.star.resource.OfficeResourceLoader</code>), provides access to some
49 types of resources within those files.</p>
51 <p>Clients have to specifiy the resource file base name in the call to
52 <member>XResourceBundleLoader::loadBundle</member> resp. <member>XResourceBundleLoader::loadBundle_Default</member>
53 method. The loader will extent this base name so that the resulting name conforms to the OpenOffice.org
54 resource file naming conventions, and look up the respective resource file, for the requested locale,
55 in OpenOffice.org's installation.</p>
57 <p>The lookup process uses the fallback mechanism as described at the <type>XResourceBundle</type> interface,
58 except that <code>Locale.getDefault()</code> is not used.</p>
60 <p>Resource keys, as passed to the <member>XResourceBundle::getDirectElement</member> or
61 <member scope="com::sun::star::container">XNameAccess::getByName</member>, have the following format:
62 <code>&lt;resource_type&gt;:&lt;numeric_identifier&gt;</code>, where <code>&lt;resource_type&gt; specifies
63 the type of the requested resource (see below) and <code>&lt;numeric_identifier&gt;</code> is the numeric
64 identifier of the resource.</p>
66 <p>The following resource types are currently supported:
67 <ul>
68 <li><em>string</em>: denotes a string resource</li>
69 </ul>
70 </p>
72 <p>Since the numeric resource identifiers are highly build-dependent (e.g. can change with any next
73 OpenOffice.org build), you are <strong>strongly</strong> discouraged from using the <type>OfficeResoureLoader</type>
74 service in a component which targets more than one particular OpenOffice.org build.</p>
76 @since OpenOffice.org 2.0.3
78 singleton OfficeResourceLoader : XResourceBundleLoader;
80 //=============================================================================
81 }; }; }; };
82 //=============================================================================
84 #endif