Class CalcAddins

Object
WeakBase
CalcAddins
All Implemented Interfaces:
XLocalizable, XService­Info, XService­Name, XType­Provider, XInterface, XWeak
Direct Known Subclasses:
Referencing­Functions

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

    Fields
    Modifier and Type
    Field
    Description
    protected final XComponent­Context
    Indirectly provides access to the service manager.

    Fields inherited from class WeakBase

    _map­Types

    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

    Constructors
    Modifier
    Constructor
    Description
    protected
    Calc­Addins(XComponent­Context context)
    Constructs add-ins for Calc.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected 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
    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
    set­Locale(Locale locale)
    Sets the locale to be used by this object.
    final boolean
    Tests whether the specified service is supported, i.e. implemented by the implementation.

    Methods inherited from class WeakBase

    finalize, get­Implementation­Id, get­Types, query­Adapter

    Methods inherited from interface XServiceInfo

    get­Implementation­Name
  • Field Details

    • context

      protected final XComponentContext context
      Indirectly provides access to the service manager. For example, com​.sun​.star​.sdb​.Database­Context holds databases registered with OpenOffice.
  • Constructor Details

    • CalcAddins

      protected CalcAddins(XComponentContext context)
      Constructs add-ins for Calc.
      Parameters:
      context - the value to assign to the context field.
  • Method Details

    • getServiceName

      public abstract String getServiceName()
      The service name that can be used to create such an object by a factory.
      Specified by:
      get­Service­Name in interface XService­Name
      Returns:
      the service name.
    • getSupportedServiceNames

      public final String[] getSupportedServiceNames()
      Provides the supported service names of the implementation, including also indirect service names.
      Specified by:
      get­Supported­Service­Names in interface XService­Info
      Returns:
      sequence of service names that are supported.
    • supportsService

      public final boolean supportsService(String name)
      Tests whether the specified service is supported, i.e. implemented by the implementation.
      Specified by:
      supports­Service in interface XService­Info
      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:
      set­Locale in interface XLocalizable
      Parameters:
      locale - the new locale.
    • getLocale

      public final Locale getLocale()
      Returns the current locale used by this instance.
      Specified by:
      get­Locale in interface XLocalizable
      Returns:
      the current locale.
    • getJavaLocale

      protected final Locale getJavaLocale()
      Returns the locale as an object from the Java standard SDK.
      Returns:
      the current locale.
    • getLocalizedMessage

      protected final String getLocalizedMessage(Throwable exception)
      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

      protected final Logger getLogger()
      Returns the logger to use for logging warnings.
      Returns:
      the logger to use.