Commit 47be8c9a authored by Michael Meeks's avatar Michael Meeks

Updated ( but still not working name support )

parent e567ed93
Changes between version 0.26 and 0.27
Change between versions 0.27 and 0.28
Miguel:
Print support (imported from the GNUMERIC_PRINT branch).
Pattern selector works again.
Jukka has added the following functions:
* SEARCH(), ADDRESS(), CHITEST(), BETAINV(), PERCENTRANK(),
* SERIESSUM(), SUMA(), SUBTOTAL(), SLOPE(), AVERAGEA(),
* MAXA(), MINA(), STDEVA(), STDEVPA(), VARA(), and VARPA().
Jukka:
* Added the following functions:
- FORECAST() and INTERCEPT().
And fixed these:
* BETADIST(), NORMDIST(), and POISSON().
* And fixed these functions:
- SUMIF() and N().
Morten:
* Found everyone else's bugs.
* Reworked the insert/delete column/row again.
* Reworked the Goal Seek function to produce more accurate
result faster, and fail less often.
* Improved the recalculation engine.
* Shined up date calculations.
* WEEKDAY(), DAYS360, TIMEVALUE().
Miguel
* Worked on other things
Sean
Michael
* Re-wrote the OLE block layer again...
* Tentative alpha Excel sheet writing
- StarOffice is only tested importer
- Only Excel 95 likely to work
- only basic numbers and text are stored.
* Fix writing code to preserve sheet order.
* Added 'name' support.
Nick Lamb
* Lots of work adding excel function mappings.
* Fixed absolute shared formulae cell references.
Jody Goldberg
* Worked on embryonic Excel chart code
Several translations updated: thanks to our translators
......
This diff is collapsed.
This diff is collapsed.
Email: miguel@kernel.org
-*-outline-*-
GNOME Spread Sheet task list
Gnumeric Spread Sheet task list
* Cell editing
......@@ -9,11 +9,36 @@ GNOME Spread Sheet task list
A4 -> $A$4 -> $A4 -> A$4 -> A4
* Even More Functions
GROWTH, LINEST, LOGEST, PERCENTILE, MMULT, MDETERM,
QUARTILE, TREND, ERROR.TYPE.
(This is not a claim that these are all.)
* Printing
* Screen layout is broken for right justified text.
* Save print information in workbook
* Load print information from workbook
* Preview
* Print setup:
* Implement Print Preview, Options buttons
* Improve layout
* Provide GUI for margin editing.
* Add headers and footers
* Add left, middle right header/footer support
* Add "repeat on top" support.
* Add font selector to the cell format.
* Add the missing options to the Print Dialog
* Display printing status (pages to go).
* Add column/row title printing
* Add color printing support.
* Cell range naming
Finish implementing.
* Cell dimensio computation is broken on font change for multilines.
* Cell dimension computation is broken on font change for multilines.
* Number formatting
......@@ -31,6 +56,10 @@ GNOME Spread Sheet task list
* Auditing
Write the sheet auditing code.
* Searching
Searching text on the spreadhseet.
* EDITION
** Object Clipboard
......@@ -104,6 +133,21 @@ GNOME Spread Sheet task list
Get Nested OLE object streams working nicely.
* OLE
<<<<<<< TODO
Integrate into libvfs.
Update to better understanding of file, see wine.
* Sheets
When adding a sheet or renaming a sheet, should we reparse everything?
* Clipboard
Perhaps make a global clipboard and remove all the hacks in the
current clipboard code to find the clipboard.=======
=======
Integrate into libvfs.
Update to better understanding of file, see wine.
......@@ -118,3 +162,4 @@ Perhaps make a global clipboard and remove all the hacks in the
current clipboard code to find the clipboard.=======
>>>>>>> 1.38.4.4
......@@ -8,6 +8,8 @@ PKG_NAME="Gnumeric"
if test -d ${srcdir}/libglade; then
> ${srcdir}/libglade/NO-AUTO-GEN
> ${srcdir}/libglade/libglade.spec
> ${srcdir}/libglade/libgladeConf.sh
else
echo you need to checkout gnumeric again
exit 1
......
......@@ -38,7 +38,7 @@ dnl
dnl Check doc/translating.sgml for a description of how to translate
dnl and why we have so many translations.
dnl
ALL_LINGUAS="cs de en_GB es es_DO es_GT es_HN es_MX es_PA es_PE es_SV fr hu it ja ko no pt ru pl sk"
ALL_LINGUAS="cs de en_GB es es_DO es_GT es_HN es_MX es_PA es_PE es_SV fi fr hu hr it ja ko no pt ru pl sk zh_TW.Big5 sv"
AM_GNU_GETTEXT
AC_LINK_FILES($nls_cv_header_libgt, $nls_cv_header_intl)
......@@ -130,6 +130,14 @@ AM_PATH_BONOBO(0.1.0, [
])
AM_CONDITIONAL(BONOBO, $have_bonobo)
dnl ******************************
dnl GnomePrint checking
dnl ******************************
GNOME_PRINT_LIBS=`gnome-config --libs print`
GNOME_PRINT_CFLAGS=`gnome-config --cflags print`
AC_SUBST(GNOME_PRINT_LIBS)
AC_SUBST(GNOME_PRINT_CFLAGS)
dnl ******************************************
dnl LibGlade tests:
dnl These duplicate the things
......@@ -152,6 +160,7 @@ AC_SUBST(XML_CFLAGS)
AC_OUTPUT([
gnumeric.spec
Makefile
icons/Makefile
src/Makefile
wizards/Makefile
wizards/graphics/Makefile
......@@ -174,6 +183,7 @@ plugins/stat/Makefile
plugins/guile/Makefile
plugins/ff-csv/Makefile
plugins/text/Makefile
plugins/xbase/Makefile
intl/Makefile
po/Makefile.in
macros/Makefile
......
gnumeric (0.27-1) unstable; urgency=low
* New upstream version.
* Recompiled against newer gnome libraries.
-- Vincent Renardias <vincent@debian.org> Fri, 25 Jun 1999 12:24:51 +0200
gnumeric (0.25-2) unstable; urgency=low
* corrected menu file; closes: #38873.
-- Vincent Renardias <vincent@debian.org> Thu, 3 Jun 1999 18:48:12 +0200
gnumeric (0.25-1) unstable; urgency=low
* New upstream version.
* Recompiled against newer gnome libraries.
-- Vincent Renardias <vincent@debian.org> Tue, 18 May 1999 16:14:21 +0200
gnumeric (0.24-1) unstable; urgency=low
* New upstream version.
-- Vincent Renardias <vincent@debian.org> Fri, 23 Apr 1999 13:33:55 +0200
gnumeric (0.15-1) unstable; urgency=low
* New upstream version.
......
?package(gnumeric):needs=X11 section=Apps/Math\
title="gnumeric" command="/usr/X11R6/bin/gnumeric"
title="gnumeric" command="/usr/bin/gnumeric"
......@@ -10,9 +10,9 @@ build: build-stamp
build-stamp:
dh_testdir
./configure --prefix=/usr
./configure --prefix=/usr --sysconfdir=/etc
# Add here commands to compile the package.
make CFLAGS="-O2 -g -Wall"
make #CFLAGS="-O2 -g -Wall"
touch build-stamp
......@@ -23,7 +23,8 @@ clean:
# Add here commands to clean up after the build process.
-$(MAKE) distclean
rm -f libglade/macros/Makefile libglade/doc/Makefile plugins/perl/ext/Makefile.PL plugins/perl/ext/Makefile \
plugins/perl/xsinit.c plugins/guile/Makefile gnumeric.keys
dh_clean
# Build architecture-independent files here.
......@@ -41,6 +42,7 @@ binary-arch: build
# Add here commands to install the files into debian/tmp
$(MAKE) install prefix=`pwd`/debian/tmp/usr
rm -f `find ./debian/tmp/usr/ -name \*.a`
dh_installdocs
dh_installexamples
dh_installmenu
......
......@@ -43,22 +43,23 @@ EXTRA_DIST = \
all:
gnumeric.html: gnumeric/gnumeric.html
-cp gnumeric/gnumeric.html .
-cd $(srcdir) && cp gnumeric/gnumeric.html .
gnumeric/gnumeric.html: $(SGML_FILES)
-db2html gnumeric.sgml
-cd $(srcdir) && db2html gnumeric.sgml
functions.sgml: func-list.sgml func-index.sgml func-header.sgml func-footer.sgml
cat $(srcdir)/func-header.sgml func-index.sgml func-list.sgml $(srcdir)/func-footer.sgml > functions.sgml
cd $(srcdir) && cat func-header.sgml func-index.sgml func-list.sgml func-footer.sgml > functions.sgml
func-list.sgml: func.defs $(srcdir)/make-docbook.pl
perl $(srcdir)/make-docbook.pl func.defs > func-list.sgml
func-list.sgml: func.defs make-docbook.pl
cd $(srcdir) && perl make-docbook.pl func.defs > func-list.sgml
func-index.sgml: func.defs $(srcdir)/make-index.pl
perl $(srcdir)/make-index.pl func.defs > func-index.sgml
func-index.sgml: func.defs make-index.pl
cd $(srcdir) && perl make-index.pl func.defs > func-index.sgml
make-func.defs:
$(top_srcdir)/src/$(gnumeric) --dump-func-defs=func.defs
gnumericdir=`cd $(top_builddir)/src && pwd`; \
cd $(srcdir) && $$gnumericdir/gnumeric --dump-func-defs=func.defs
dist-hook:
mkdir $(distdir)/gnumeric
......@@ -71,10 +72,10 @@ install-data-local: gnumeric.html
$(mkinstalldirs) $(gnumeric_helpdir)/images
-for file in $(srcdir)/gnumeric/*.html $(srcdir)/gnumeric/*.css; do \
basefile=`basename $$file`; \
$(INSTALL_DATA) $(srcdir)/$$file $(gnumeric_helpdir)/$$basefile; \
$(INSTALL_DATA) $$file $(gnumeric_helpdir)/$$basefile; \
done
-for file in $(srcdir)/images/*.jpg $(srcdir)/images/*.gif; do \
$(INSTALL_DATA) $(srcdir)/$$file $(gnumeric_helpdir)/images;\
$(INSTALL_DATA) $$file $(gnumeric_helpdir)/images;\
done
gnumeric.ps: gnumeric.sgml
......
......@@ -4,12 +4,13 @@ SUBDIRS = C
# 'es' subdirectory seems not yet to be ready; functions.sgml is missing
EXTRA_DIST = \
translating.sgml \
Design \
Future-Roadmap \
README \
saving.txt \
writing-functions.sgml
EXTRA_DIST = \
translating.sgml \
Design \
Future-Roadmap \
README \
saving.txt \
writing-functions.sgml \
linux-expo-99-gnumeric.tex
......@@ -2,49 +2,50 @@
Writing builtin functions for Gnumeric:
---------------------------------------
Functions in Gnumeric should be registered in the symbol table, to
register a function you just need to prepare a function definition
record.
Functions in Gnumeric should be registered in a category, to do this
you must get a category handle:
For example, a simple routine to sum two numbers, you would do:
FunctionCategory *cat = function_get_category (_("My functions"));
char *help_add2numbers = "ADD2NUMBERS: Adds two numbers";
If the category already exists it will be returned, otherwise a new
category will be created. Then, you will have to add your functions
individualy to the category. For example, a simple routine to sum
two numbers, you would do:
FunctionDefinition add_two_numbers =
{ "add2numers", "ff", "number1,number2", help_add2numbers, NULL, add2numbers }
char *help_add2numbers = "ADD2NUMBERS: Adds two numbers";
The first C declaration defines the HELP associated with this
This C declaration defines the HELP associated with this
function.
The second declaration is our function definition record: the name of
the function is the first parameter (this is how the function will be
exposed to Gnumeric), the next parameter tells gnumeric that we are
expecting two floating point arguments. The third parameter describes
the symbolic names for the arguments (in case our function supports
them, this allows users to specify named paramters); The fourth
parameter links in the help description.
function_add_args (cat, "add2numbers", "ff", "number1,number2",
help_add2numbers, add2numbers);
[ NB. there are several types of function; more of this later ]
This defines our function, the paramters in order are:
'cat' The category handle obtained earlier
'add2numbers' The function name ( as used in gnumeric )
'ff' The argument token type string, this tells gnumeric that
we are expecting two floating point arguments.
'number1,...' Symbolic names for the arguments (in case our function
supports them, this allows users to specify named paramters)
'help_add2..' This links in the help text
'add2numbers' This is the name of the function that gnumeric will call
to evaluate the function.
Now, our routine is pretty simple: it will always require two arguments
to be passed, so we can let Gnumeric deal with argument count and we
can let the Gnumeric engine compute the values in the expression for
us. So, for this case we leave the fift parameter set as NULL and set
the sixth parameter to point to the function that will do the function
evaluation.
Now, to register the function we just do:
register_add2numbers ()
{
symbol_install (global_symbol_table, add_two_numbers.name,
SYMBOL_FUNCTION, &add_two_numbers);
}
us. If we had a more complex function we would need to use
function_add_nodes ( more later ).
When the user calls the function "ADD2NUMBERS" in a Gnumeric
expression, our routine will be invoked, this is how the add2numbers
function signature looks like:
static Value *
add2numbers (FunctionDefinition *fn_def, Value *argv [], char **error_string)
add2numbers (FunctionEvalInfo *ei, Value *argv [])
{
}
......@@ -54,17 +55,36 @@ Arguments are passed in the argv array and they contain Value
structures (look in gnumeric/src/expr.h for the definition of the
Value structure).
The first parameter, fn_def is a pointer to the FunctionDefinition
structure that was used to define this function. This is normally
ignored, but some functions might want to access this (for example, a
single function callback might implement various functions and can
figure how it was invoked by poking at this value)
The first parameter, ei is a pointer to the FunctionEvalInfo
structure, this looks like this: ( from expr.h )
struct _FunctionEvalInfo {
EvalPosition pos;
ErrorMessage *error;
FunctionDefinition *func_def;
};
EvalPosition - Position at which the function is being evaluated.
ErrorMessage - Standard error passing interface.
NB. Unless you are doing something _extremely_ clever the correct way to
return an error is thus:
if (foo && bar)
return function_error (ei, _("My error"));
FunctionDefinition - This returns a handle to a magic structure that
should not be used. In future this will allow for
extra function attributes to be set. This is normally
ignored, but some functions might want to access this
(for example, a single function callback might implement
various functions and can figure how it was invoked by
poking at this value).
Here is the actual implementation:
static Value *
add2numbers (FunctionDefinition *fn_def, Value *argv [], char **error_string)
add2numbers (FunctionEvalPos *ei, Value *argv [])
{
Value *result;
float number_a, number_b;
......@@ -79,8 +99,7 @@ add2numbers (FunctionDefinition *fn_def, Value *argv [], char **error_string)
break;
default:
*error_string = "Invalid argument type";
return NULL;
return function_error (ei, "Invalid argument type");
}
switch (argv [1].type){
......@@ -93,8 +112,7 @@ add2numbers (FunctionDefinition *fn_def, Value *argv [], char **error_string)
break;
default:
*error_string = "Invalid argument type";
return NULL;
return function_error (ei, "Invalid argument type");
}
result = value_float (number_a + number_b);
......@@ -106,48 +124,29 @@ Note that although typechecking is done in upper layers, both INTEGER
and FLOAT types are passed through the 'f' function declaration token.
It is of course good practice to provide a sensible default: case.
If there is an error during the function processing, *error_string
should be set to the error message describing what went wrong and the
NULL value should be returned.
If there is an error during the function processing, the ei->error
field must be set using an error_message_set* routine, and NULL must
be returned. Since this is liable to change instead the:
Return values and Strings.
--------------------------
There are a couple of utility functions provided by Gnumeric to create
Values: these are value_float and value_int, they take respectively
a double and an integer as their first parameter.
Other value types have to be created manually (there is no utility
function yet). Sometimes you might want to do something more complex,
so you might want as well create the Value yourself even if the result
is a float or an integer (for performance reasons, reuse reasons, or
the way your procedure is used), you can use this code snippet to
create a Value Float as well:
/*
* the line below is equivalent to:
* result = (Value *) malloc (sizeof (Value));
*
*/
result = g_new (Value, 1);
result->type = VALUE_FLOAT;
result->v.v_float = your_number
Values of type string are created like this:
Value *function_error (FunctionEvalInfo *fe,
char *error_string); and
Value *function_error_alloc (FunctionEvalInfo *fe,
char *error_string);
Value *value_string;
functions should be used to return errors ( as above ), use the latter if
you have a particularly flowery error to return:
value_string = g_new (Value, 1);
v->v.str = string_get ("String");
return function_error_alloc (ei, g_strdup_printf ("%s (%s), %d",
"foo", "bar", 2));
Notice that the field "v.str" is of type (String *) not of type char
*. Strings unlike char * are read-only structures, you should under
no circustance modify the value returned by string_get. They are
designed to be shared between various Gnumeric components, so they
keep a reference count.
Return values and Strings.
--------------------------
When you are done with a String, you should call the string_unref
routine on the String.
There are a several utility functions provided by Gnumeric to create
Values: value_new_float, value_new_int, value_new_bool, value_new_string,
value_new_cellrange. [ the nomenclature is as of different constructors
for the same class: Value ]. All Values should idealy be created with
these routines.
Functions with some optional arguments
......@@ -168,7 +167,8 @@ standard type checking the argument can be specified as optional,
and if unspecified a NULL will be passed in the appropriate
argv[] entry. Hence for erf (fn-eng.c):
{ "erf", "f|f", "lower,upper", &help_erf, NULL, gnumeric_erf },
function_add_args (cat, "erf", "f|f", "lower,upper",
&help_erf, gnumeric_erf );
Note "f|f" specifying 'upper' is optional. Any arguments that
appear after a '|' symbol in the function definition string are
......@@ -178,7 +178,7 @@ deemed optional.
before assuming they are valid hence:
static Value *
gnumeric_erf (struct FunctionDefinition *i, Value *argv [], char **error_string)
gnumeric_erf (FunctionEvalInfo *ei, Value **argv)
{
float_t ans, lower, upper=0.0 ;
......@@ -206,7 +206,10 @@ the fifth parameter, like this:
char *help_factadd = "Adds all of its arguments";
{ "addall", "", "", help_addall, addall, NULL }
function_add_nodes (cat, "addall", "", "...", &help_addall,
addall);
NB. _add_nodes not _add_all.
We will now implement addall, a function that takes any number and
kind of arguments: strings, integers, floating point numbers, arrays
......@@ -223,17 +226,25 @@ addall (a1:a3,1) returns 9
Here is the function signature for addall:
Value *
addall (void *sheet, GList *expr_node_list, int eval_col,
int eval_row, char **error_string)
addall (FunctionEvalInfo *ei, GList *expr_node_list)
As usual, this routine would return a newly allocated Value or NULL if
an error is found (and in that case, error_string would be set to
point to a message describing the problem).
The first argument points to a (Sheet *) structure, and the second
The first argument points to the usual EvalInfo structure, and the second
argument is a linked list (a GList) that contains (ExprTree *) nodes.
The eval_col and eval_row parameters are used to inform the function
The ei->pos structure can be used to determine position ( as normal )
struct _EvalPosition {
Sheet *sheet;
int eval_col;
int eval_row;
};
'sheet' points to the sheet in which the function is being evaluated.
The 'eval_col' and 'eval_row' parameters are used to inform the function
in which context the expression should be evaluated (ie, from which
cell it is being invoked) and it is used when invoking the expr_eval
function.
......
......@@ -17,4 +17,4 @@ else
GUILE_DIR =
endif
SUBDIRS = sample stat excel ff-csv text $(PYTHON) $(PERL) $(GUILE_DIR)
SUBDIRS = sample stat excel ff-csv text $(PYTHON) $(PERL) $(GUILE_DIR) xbase
This diff is collapsed.
......@@ -26,7 +26,9 @@ libexcel_a_SOURCES = \
ms-formula-read.c \
ms-formula-read.h \
ms-obj.c \
ms-obj.h
ms-obj.h \
ms-chart.h \
ms-chart.c
noinst_PROGRAMS = \
ole
......
......@@ -34,5 +34,4 @@ or
TODO: