:: com :: sun :: star :: resource ::
|
unpublished |
interface XStringResourceResolver |
|
|
- Base Interfaces
XStringResourceResolver
┗ ::com::sun::star::util::XModifyBroadcaster
::com::sun::star::util::XModifyBroadcaster |
- (referenced interface's summary:)
- broadcasts each modification made on the date data of the object which
supports this interface.
|
|
- Usage Restrictions
- not published
- Description
- Interface to access strings in a resource.
The interface is derived from
::com::sun::star::util::XModifyBroadcaster
All registered ::com::sun::star::util::XModifyListener
interfaces will be notified if either the current locale changes or if
a string is added, changed or removed. This usually will only happen if
the implementing object also supports the interface
XStringResourceManager
and is used in the design mode of a Dialog or String table editor.
But also changing the locale at runtime can be supported in this way.
|
Methods' Summary |
resolveString |
Resolves the passed ResoureID for the current locale. This
locale is set during initialization of the object implementing
this interface or - in case that also the interface
XStringResourceManager
is supported - by using the XStringResourceManager::setLocale
method.
|
resolveStringForLocale |
Resolves the passed ResoureID for a specific locale.
It's not recommended to use this method to get the best
performance as the implementation may be optimized for
the use of the current locale.
|
hasEntryForId |
Checks if the resource contains an entry for the given ResourceID
and current locale.
|
hasEntryForIdAndLocale |
Checks if the resource contains an entry for the given ResourceID and locale.
It's not recommended to use this method to get the best
performance as the implementation may be optimized for
the use of the current locale.
|
getResourceIDs |
Returns a sequence of all valid Resource IDs for the current locale
|
getResourceIDsForLocale |
Returns a sequence of all valid Resource IDs for a specific locale
It's not recommended to use this method to get the best
performance as the implementation may be optimized for
the use of the current locale.
|
getCurrentLocale |
Returns the current locale specified in the accessed resource.
If no locale is available, the returned Locale structure
only contains empty strings.
|
getDefaultLocale |
Returns the default locale of the accessed resource. In many
cases this will be the locale of the Office initially used
to create the resource.
|
getLocales |
Returns a sequence of all supported locales
|
Methods' Details |
resolveString
- Description
- Resolves the passed ResoureID for the current locale. This
locale is set during initialization of the object implementing
this interface or - in case that also the interface
XStringResourceManager
is supported - by using the
XStringResourceManager::setLocale
method.
- Parameter ResourceID
- ID to specify the string inside the resource.
The ID can - but not needs to - be a hierarchical
name like "foo.nothing.invalid".
- Returns
- the localized string for the specified ID
- Throws
- ::com::sun::star::resource::MissingResourceException
if no entry exists for the given ResourceID
|
|
resolveStringForLocale
- Description
- Resolves the passed ResoureID for a specific locale.
It's not recommended to use this method to get the best
performance as the implementation may be optimized for
the use of the current locale.
- Parameter ResourceID
- ID to specify the string inside the resource.
The ID can - but not needs to - be a hierarchical
name like "foo.nothing.invalid".
- Parameter locale
- The locale the string should be resolved for.
The locale has to match exactly with one of the locales provided by
getLocales. A closest match search is not supported.
- Returns
- the localized string for the specified ID and Locale
- Throws
- MissingResourceException
if no entry exists for the given ResourceID or locale
|
|
hasEntryForId
boolean |
hasEntryForId( |
[in] string |
ResourceID ); |
- Description
- Checks if the resource contains an entry for the given ResourceID
and current locale.
- Parameter ResourceID
- ID to specify the string inside the resource.
- Returns
- true if an entry exists, otherwise false
|
|
hasEntryForIdAndLocale
boolean |
hasEntryForIdAndLocale( |
[in] string |
ResourceID, |
| [in] ::com::sun::star::lang::Locale |
locale ); |
- Description
- Checks if the resource contains an entry for the given ResourceID and locale.
It's not recommended to use this method to get the best
performance as the implementation may be optimized for
the use of the current locale.
- Parameter ResourceID
- ID to specify the string inside the resource.
- Parameter locale
- The locale the entry should be checked for.
The locale has to match exactly with one of the locales provided by
getLocales. A closest match search is not supported.
- Returns
- true if an entry exists, otherwise false
|
|
getResourceIDs
sequence< string > |
getResourceIDs(); |
- Description
- Returns a sequence of all valid Resource IDs for the current locale
- Returns
- a sequence of all valid Resource IDs
|
|
getResourceIDsForLocale
sequence< string > |
getResourceIDsForLocale( |
[in] ::com::sun::star::lang::Locale |
locale ); |
- Description
- Returns a sequence of all valid Resource IDs for a specific locale
It's not recommended to use this method to get the best
performance as the implementation may be optimized for
the use of the current locale.
- Parameter locale
- The locale the ResourceIDs should be returned for.
The locale has to match exactly with one of the locales provided by
getLocales. A closest match search is not supported.
- Returns
- a sequence of all valid Resource IDs
|
|
getCurrentLocale
::com::sun::star::lang::Locale |
getCurrentLocale(); |
- Description
- Returns the current locale specified in the accessed resource.
If no locale is available, the returned Locale structure
only contains empty strings.
- Returns
- the used locale
|
|
getDefaultLocale
::com::sun::star::lang::Locale |
getDefaultLocale(); |
- Description
- Returns the default locale of the accessed resource. In many
cases this will be the locale of the Office initially used
to create the resource.
- Returns
- the used locale
|
|
getLocales
sequence< ::com::sun::star::lang::Locale > |
getLocales(); |
- Description
- Returns a sequence of all supported locales
- Returns
- a sequence of all supported locales
|
|
Top of Page
Copyright © 2000, 2012 LibreOffice contributors and/or their affiliates. All rights reserved.
LibreOffice was created by The Document Foundation, based on OpenOffice.org, which is Copyright 2000, 2010 Oracle and/or its affiliates.
The Document Foundation acknowledges all community members, please find more info at our website.
Privacy Policy | Impressum (Legal Info) | Copyright information: The source code of LibreOffice is licensed under the GNU Lesser General Public License (LGPLv3). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.