Object
WeakBase
CalcAddins
- All Implemented Interfaces:
XLocalizable
,XServiceInfo
,XServiceName
,XTypeProvider
,XInterface
,XWeak
- Direct Known Subclasses:
ReferencingFunctions
public abstract class CalcAddins
extends WeakBase
implements XServiceName, XServiceInfo, XLocalizable
Base class for methods to export as formulas in the Apache OpenOffice spread sheet.
- Since:
- 0.8
-
Field Summary
Modifier and TypeFieldDescriptionprotected final XComponentContext
Indirectly provides access to the service manager.Fields inherited from class WeakBase
_mapTypes
Fields inherited from interface XLocalizable
UNOTYPEINFO
Fields inherited from interface XServiceInfo
UNOTYPEINFO
Fields inherited from interface XServiceName
UNOTYPEINFO
Fields inherited from interface XTypeProvider
UNOTYPEINFO
Fields inherited from interface XWeak
UNOTYPEINFO
-
Constructor Summary
ModifierConstructorDescriptionprotected
CalcAddins
(XComponentContext context) Constructs add-ins for Calc. -
Method Summary
Modifier and TypeMethodDescriptionprotected final Locale
Returns the locale as an object from the Java standard SDK.final Locale
Returns the current locale used by this instance.protected final String
getLocalizedMessage
(Throwable exception) Returns the localized message from the specified exception.protected final Logger
Returns the logger to use for logging warnings.abstract String
The service name that can be used to create such an object by a factory.final String[]
Provides the supported service names of the implementation, including also indirect service names.final void
setLocale
(Locale locale) Sets the locale to be used by this object.final boolean
supportsService
(String name) Tests whether the specified service is supported, i.e. implemented by the implementation.Methods inherited from class WeakBase
finalize, getImplementationId, getTypes, queryAdapter
Methods inherited from class Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface XServiceInfo
getImplementationName
-
Field Details
-
context
protected final XComponentContext contextIndirectly provides access to the service manager. For example,com.sun.star.sdb.DatabaseContext
holds databases registered with OpenOffice.
-
-
Constructor Details
-
CalcAddins
protected CalcAddins(XComponentContext context) Constructs add-ins for Calc.- Parameters:
context
- the value to assign to thecontext
field.
-
-
Method Details
-
getServiceName
The service name that can be used to create such an object by a factory.- Specified by:
getServiceName
in interfaceXServiceName
- Returns:
- the service name.
-
getSupportedServiceNames
Provides the supported service names of the implementation, including also indirect service names.- Specified by:
getSupportedServiceNames
in interfaceXServiceInfo
- Returns:
- sequence of service names that are supported.
-
supportsService
Tests whether the specified service is supported, i.e. implemented by the implementation.- Specified by:
supportsService
in interfaceXServiceInfo
- Parameters:
name
- name of service to be tested.- Returns:
true
if the service is supported,false
otherwise.
-
setLocale
public final void setLocale(Locale locale) Sets the locale to be used by this object.- Specified by:
setLocale
in interfaceXLocalizable
- Parameters:
locale
- the new locale.
-
getLocale
public final Locale getLocale()Returns the current locale used by this instance.- Specified by:
getLocale
in interfaceXLocalizable
- Returns:
- the current locale.
-
getJavaLocale
Returns the locale as an object from the Java standard SDK.- Returns:
- the current locale.
-
getLocalizedMessage
Returns the localized message from the specified exception. If no message is available, returns a default string. This method never return a null value.- Parameters:
exception
- the exception for which to get the localized message.- Returns:
- an error message to report to the user.
-
getLogger
Returns the logger to use for logging warnings.- Returns:
- the logger to use.
-