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