|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectWeakBase
Formulas
public abstract class Formulas
Base class for methods to export as formulas in the OpenOffice spread sheet.
Field Summary | |
---|---|
protected static long |
DAY_TO_MILLIS
Factor for conversions of days to milliseconds. |
protected Map |
methods
Informations about exported methods. |
Fields inherited from class WeakBase |
---|
_mapImplementationIds, _mapTypes |
Fields inherited from interface XAddIn |
---|
UNOTYPEINFO |
Fields inherited from interface XServiceName |
---|
UNOTYPEINFO |
Fields inherited from interface XServiceInfo |
---|
UNOTYPEINFO |
Fields inherited from interface XWeak |
---|
UNOTYPEINFO |
Fields inherited from interface XTypeProvider |
---|
UNOTYPEINFO |
Constructor Summary | |
---|---|
protected |
Formulas()
Default constructor. |
Method Summary | |
---|---|
String |
getArgumentDescription(String function,
int argument)
Returns the description of the specified argument. |
String |
getDisplayArgumentName(String function,
int argument)
Returns the user-visible name of the specified argument. |
String |
getDisplayCategoryName(String function)
Returns the user-visible name of the category the function belongs to. |
String |
getDisplayFunctionName(String function)
Returns the user-visible function name for an internal name. |
protected Date |
getEpoch(XPropertySet xOptions)
Returns the spreadsheet epoch. |
protected static double[][] |
getFailure(int rows,
int cols)
Returns a table filled with NaN values. |
String |
getFunctionDescription(String function)
Returns the description of a function. |
String |
getImplementationName()
Provides the implementation name of the service implementation. |
protected Locale |
getJavaLocale()
Returns the locale as an object from the Java standard SDK. |
Locale |
getLocale()
Returns the locale, which is used by this object. |
protected static String |
getLocalizedMessage(Throwable exception)
Returns the localized message from the specified exception. |
protected Logger |
getLogger()
Returns the logger to use for logging warnings. |
String |
getProgrammaticCategoryName(String function)
Returns the programmatic name of the category the function belongs to. |
String |
getProgrammaticFuntionName(String display)
Returns the internal function name for an user-visible name. |
abstract String |
getServiceName()
The service name that can be used to create such an object by a factory. |
protected void |
reportException(String method,
Throwable exception)
Reports an exception. |
void |
setLocale(Locale locale)
Sets the locale to be used by this object. |
protected void |
setTimeZone(String timezone)
Sets the timezone for time values to be provided to toDate(com.sun.star.beans.XPropertySet, double) . |
protected Date |
toDate(XPropertySet xOptions,
double time)
Converts a date from a spreadsheet value to a Java Date object. |
protected double |
toDouble(XPropertySet xOptions,
Date time)
Converts a date from a Java Date object to a spreadsheet value. |
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 |
---|
getSupportedServiceNames, supportsService |
Field Detail |
---|
protected static final long DAY_TO_MILLIS
toDate(com.sun.star.beans.XPropertySet, double)
.
protected final Map methods
Constructor Detail |
---|
protected Formulas()
methods
map.
Method Detail |
---|
public void setLocale(Locale locale)
setLocale
in interface XLocalizable
public Locale getLocale()
getLocale
in interface XLocalizable
protected final Locale getJavaLocale()
public abstract String getServiceName()
private static final String __serviceName;
getServiceName
in interface XServiceName
public String getImplementationName()
getImplementationName
in interface XServiceInfo
public String getProgrammaticCategoryName(String function)
com.sun.star.sheet.XAddIn
interface.
getProgrammaticCategoryName
in interface XAddIn
function
- The exact name of a method within its interface.
public String getDisplayCategoryName(String function)
getDisplayCategoryName
in interface XAddIn
function
- The exact name of a method within its interface.
public String getProgrammaticFuntionName(String display)
Attention: The method name contains a spelling error. Due to compatibility reasons the name cannot be changed.
getProgrammaticFuntionName
in interface XAddIn
display
- The user-visible name of a function.
public String getDisplayFunctionName(String function)
getDisplayFunctionName
in interface XAddIn
function
- The exact name of a method within its interface.
public String getFunctionDescription(String function)
getFunctionDescription
in interface XAddIn
function
- The exact name of a method within its interface.
public String getDisplayArgumentName(String function, int argument)
getDisplayArgumentName
in interface XAddIn
function
- The exact name of a method within its interface.argument
- The index of the argument (0-based).
public String getArgumentDescription(String function, int argument)
getArgumentDescription
in interface XAddIn
function
- The exact name of a method within its interface.argument
- The index of the argument (0-based).
protected void setTimeZone(String timezone)
toDate(com.sun.star.beans.XPropertySet, double)
.
If this method is never invoked, then the default timezone is the locale one.
protected Date getEpoch(XPropertySet xOptions)
setTimeZone(java.lang.String)
. The epoch is used for date conversions
as in toDate(com.sun.star.beans.XPropertySet, double)
.
xOptions
- Provided by OpenOffice.
protected Date toDate(XPropertySet xOptions, double time)
Date
object.
The timezone is the one specified during the last invocation of setTimeZone(java.lang.String)
.
xOptions
- Provided by OpenOffice.time
- The spreadsheet numerical value for a date, by default in the local timezone.
protected double toDouble(XPropertySet xOptions, Date time)
Date
object to a spreadsheet value.
The timezone is the one specified during the last invocation of setTimeZone(java.lang.String)
.
protected static String getLocalizedMessage(Throwable exception)
protected static double[][] getFailure(int rows, int cols)
NaN
values. This method is invoked when
an operation failed for a whole table.
protected void reportException(String method, Throwable exception)
String
object. This method log the stack trace at the FINE level. We don't use
the WARNING level since this is not a program disfunction; the failure is probably caused
by wrong user-specified parameters.
protected Logger getLogger()
org.geotools.openoffice
logger. Subclasses should override this method if they
want to use a different logger.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |