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
FieldsModifier and TypeFieldDescriptionprotected final XComponentContextIndirectly provides access to the service manager.Fields inherited from class WeakBase
_mapTypesFields inherited from interface XLocalizable
UNOTYPEINFOFields inherited from interface XServiceInfo
UNOTYPEINFOFields inherited from interface XServiceName
UNOTYPEINFOFields inherited from interface XTypeProvider
UNOTYPEINFOFields inherited from interface XWeak
UNOTYPEINFO -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCalcAddins(XComponentContext context) Constructs add-ins for Calc. -
Method Summary
Modifier and TypeMethodDescriptionprotected final LocaleReturns the locale as an object from the Java standard SDK.final LocaleReturns the current locale used by this instance.protected final StringgetLocalizedMessage(Throwable exception) Returns the localized message from the specified exception.protected final LoggerReturns the logger to use for logging warnings.abstract StringThe 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 voidsetLocale(Locale locale) Sets the locale to be used by this object.final booleansupportsService(String name) Tests whether the specified service is supported, i.e. implemented by the implementation.Methods inherited from class WeakBase
finalize, getImplementationId, getTypes, queryAdapterMethods inherited from class Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface XServiceInfo
getImplementationName
-
Field Details
-
context
protected final XComponentContext contextIndirectly provides access to the service manager. For example,com.sun.star.sdb.DatabaseContextholds databases registered with OpenOffice.
-
-
Constructor Details
-
CalcAddins
protected CalcAddins(XComponentContext context) Constructs add-ins for Calc.- Parameters:
context- the value to assign to thecontextfield.
-
-
Method Details
-
getServiceName
The service name that can be used to create such an object by a factory.- Specified by:
getServiceNamein interfaceXServiceName- Returns:
- the service name.
-
getSupportedServiceNames
Provides the supported service names of the implementation, including also indirect service names.- Specified by:
getSupportedServiceNamesin 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:
supportsServicein interfaceXServiceInfo- Parameters:
name- name of service to be tested.- Returns:
trueif the service is supported,falseotherwise.
-
setLocale
public final void setLocale(Locale locale) Sets the locale to be used by this object.- Specified by:
setLocalein interfaceXLocalizable- Parameters:
locale- the new locale.
-
getLocale
public final Locale getLocale()Returns the current locale used by this instance.- Specified by:
getLocalein 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.
-