Commit 1350ad42 authored by Miguel de Icaza's avatar Miguel de Icaza Committed by Arturo Espinosa

small touchups.


1999-07-02  Miguel de Icaza  <miguel@gnu.org>

	* doc/Design, doc/translating.sgml: small touchups.

	* src/dialog-printer-setup.c (do_setup_main_dialog): Set the
	window parent here.
	(do_setup_main_dialog): Force destruction of parent widget.

	* src/print.glade: Removed visibility flag from toplevel dialog
	box.

	* doc/C/files.sgml: Updated indentation.

	* src/dialog-printer-setup.c (do_setup_page): Use relative path
	for printing here.

1999-06-30  Miguel de Icaza  <miguel@gnu.org>

	* src/item-grid.c (item_grid_draw_cell): Eliminate warning.

	* src/dialog-printer-setup.c: Adapted to the new setup for keeping
	track of col/rows ranges.
	(do_fetch_page_info): ditto.

	* src/print.c (PrintJobInfo): Use doubles for all the printing
	units.
	(print_sheet_range): Take into account the repeat ranges for
	repeated headers, repeated columns.
	(print_sheet): compute space used by repeated headers and repeated
	columns.
	(print_page): Print repeating top rows and repeating left
	columns on each page.  Loop over printing routines.
	(print_page_cells): new routine: prints a cell range only.
	(print_page_repeated_rows, print_page_repeated_cols): Prints the
	repeating columns and repeating rows.

	* src/dialog-cell-format.c (apply_font_format): Implement
	GnomePrint based version.


	* src/print-info.c (save_range): Updated to reflect the new change
	to PrintRepeatRange.
	(print_info_save): ditto.
	(load_range): ditto.
	(print_info_new): ditto.

	* src/print-info.h: Store ranges as a structure that contains an
	explicit tag for validness instead of overloading the definition
	of Value/CellRange.
parent c3c7ffe1
1999-07-02 Miguel de Icaza <miguel@gnu.org>
* doc/Design, doc/translating.sgml: small touchups.
* src/dialog-printer-setup.c (do_setup_main_dialog): Set the
window parent here.
(do_setup_main_dialog): Force destruction of parent widget.
* src/print.glade: Removed visibility flag from toplevel dialog
box.
* doc/C/files.sgml: Updated indentation.
* src/dialog-printer-setup.c (do_setup_page): Use relative path
for printing here.
1999-06-30 Miguel de Icaza <miguel@gnu.org>
* src/item-grid.c (item_grid_draw_cell): Eliminate warning.
* src/dialog-printer-setup.c: Adapted to the new setup for keeping
track of col/rows ranges.
(do_fetch_page_info): ditto.
* src/print.c (PrintJobInfo): Use doubles for all the printing
units.
(print_sheet_range): Take into account the repeat ranges for
repeated headers, repeated columns.
(print_sheet): compute space used by repeated headers and repeated
columns.
(print_page): Print repeating top rows and repeating left
columns on each page. Loop over printing routines.
(print_page_cells): new routine: prints a cell range only.
(print_page_repeated_rows, print_page_repeated_cols): Prints the
repeating columns and repeating rows.
* src/dialog-cell-format.c (apply_font_format): Implement
GnomePrint based version.
* src/print-info.c (save_range): Updated to reflect the new change
to PrintRepeatRange.
(print_info_save): ditto.
(load_range): ditto.
(print_info_new): ditto.
* src/print-info.h: Store ranges as a structure that contains an
explicit tag for validness instead of overloading the definition
of Value/CellRange.
1999-07-02 Jukka-Pekka Iivonen <iivonen@iki.fi>
* src/anaysis-tools.c: New file for data analysis tools.
......@@ -33,7 +83,7 @@
1999-06-30 Heath Martin <martinh@pegasus.cc.ucf.edu>
* src/cell.[c,h]: (cell_get_comment) New function.
* src/cell.c, src/cell.h: (cell_get_comment) New function.
* src/xml-io.c: (xml_write_cell) Save comments.
(xml_read_cell) Load comments.
......@@ -44,6 +94,7 @@
add a bit about Styles.
1999-06-29 Jody Goldberg <jgoldberg@home.com>
* src/cell.c (cell_set_formula) : Handle special case of array by
setting the entire matrix from the top left corner.
(cell_set_array_formula) : New function.
......
1999-07-02 Miguel de Icaza <miguel@gnu.org>
* doc/Design, doc/translating.sgml: small touchups.
* src/dialog-printer-setup.c (do_setup_main_dialog): Set the
window parent here.
(do_setup_main_dialog): Force destruction of parent widget.
* src/print.glade: Removed visibility flag from toplevel dialog
box.
* doc/C/files.sgml: Updated indentation.
* src/dialog-printer-setup.c (do_setup_page): Use relative path
for printing here.
1999-06-30 Miguel de Icaza <miguel@gnu.org>
* src/item-grid.c (item_grid_draw_cell): Eliminate warning.
* src/dialog-printer-setup.c: Adapted to the new setup for keeping
track of col/rows ranges.
(do_fetch_page_info): ditto.
* src/print.c (PrintJobInfo): Use doubles for all the printing
units.
(print_sheet_range): Take into account the repeat ranges for
repeated headers, repeated columns.
(print_sheet): compute space used by repeated headers and repeated
columns.
(print_page): Print repeating top rows and repeating left
columns on each page. Loop over printing routines.
(print_page_cells): new routine: prints a cell range only.
(print_page_repeated_rows, print_page_repeated_cols): Prints the
repeating columns and repeating rows.
* src/dialog-cell-format.c (apply_font_format): Implement
GnomePrint based version.
* src/print-info.c (save_range): Updated to reflect the new change
to PrintRepeatRange.
(print_info_save): ditto.
(load_range): ditto.
(print_info_new): ditto.
* src/print-info.h: Store ranges as a structure that contains an
explicit tag for validness instead of overloading the definition
of Value/CellRange.
1999-07-02 Jukka-Pekka Iivonen <iivonen@iki.fi>
* src/anaysis-tools.c: New file for data analysis tools.
......@@ -33,7 +83,7 @@
1999-06-30 Heath Martin <martinh@pegasus.cc.ucf.edu>
* src/cell.[c,h]: (cell_get_comment) New function.
* src/cell.c, src/cell.h: (cell_get_comment) New function.
* src/xml-io.c: (xml_write_cell) Save comments.
(xml_read_cell) Load comments.
......@@ -44,6 +94,7 @@
add a bit about Styles.
1999-06-29 Jody Goldberg <jgoldberg@home.com>
* src/cell.c (cell_set_formula) : Handle special case of array by
setting the entire matrix from the top left corner.
(cell_set_array_formula) : New function.
......
1999-07-02 Miguel de Icaza <miguel@gnu.org>
* doc/Design, doc/translating.sgml: small touchups.
* src/dialog-printer-setup.c (do_setup_main_dialog): Set the
window parent here.
(do_setup_main_dialog): Force destruction of parent widget.
* src/print.glade: Removed visibility flag from toplevel dialog
box.
* doc/C/files.sgml: Updated indentation.
* src/dialog-printer-setup.c (do_setup_page): Use relative path
for printing here.
1999-06-30 Miguel de Icaza <miguel@gnu.org>
* src/item-grid.c (item_grid_draw_cell): Eliminate warning.
* src/dialog-printer-setup.c: Adapted to the new setup for keeping
track of col/rows ranges.
(do_fetch_page_info): ditto.
* src/print.c (PrintJobInfo): Use doubles for all the printing
units.
(print_sheet_range): Take into account the repeat ranges for
repeated headers, repeated columns.
(print_sheet): compute space used by repeated headers and repeated
columns.
(print_page): Print repeating top rows and repeating left
columns on each page. Loop over printing routines.
(print_page_cells): new routine: prints a cell range only.
(print_page_repeated_rows, print_page_repeated_cols): Prints the
repeating columns and repeating rows.
* src/dialog-cell-format.c (apply_font_format): Implement
GnomePrint based version.
* src/print-info.c (save_range): Updated to reflect the new change
to PrintRepeatRange.
(print_info_save): ditto.
(load_range): ditto.
(print_info_new): ditto.
* src/print-info.h: Store ranges as a structure that contains an
explicit tag for validness instead of overloading the definition
of Value/CellRange.
1999-07-02 Jukka-Pekka Iivonen <iivonen@iki.fi>
* src/anaysis-tools.c: New file for data analysis tools.
......@@ -33,7 +83,7 @@
1999-06-30 Heath Martin <martinh@pegasus.cc.ucf.edu>
* src/cell.[c,h]: (cell_get_comment) New function.
* src/cell.c, src/cell.h: (cell_get_comment) New function.
* src/xml-io.c: (xml_write_cell) Save comments.
(xml_read_cell) Load comments.
......@@ -44,6 +94,7 @@
add a bit about Styles.
1999-06-29 Jody Goldberg <jgoldberg@home.com>
* src/cell.c (cell_set_formula) : Handle special case of array by
setting the entire matrix from the top left corner.
(cell_set_array_formula) : New function.
......
1999-07-02 Miguel de Icaza <miguel@gnu.org>
* doc/Design, doc/translating.sgml: small touchups.
* src/dialog-printer-setup.c (do_setup_main_dialog): Set the
window parent here.
(do_setup_main_dialog): Force destruction of parent widget.
* src/print.glade: Removed visibility flag from toplevel dialog
box.
* doc/C/files.sgml: Updated indentation.
* src/dialog-printer-setup.c (do_setup_page): Use relative path
for printing here.
1999-06-30 Miguel de Icaza <miguel@gnu.org>
* src/item-grid.c (item_grid_draw_cell): Eliminate warning.
* src/dialog-printer-setup.c: Adapted to the new setup for keeping
track of col/rows ranges.
(do_fetch_page_info): ditto.
* src/print.c (PrintJobInfo): Use doubles for all the printing
units.
(print_sheet_range): Take into account the repeat ranges for
repeated headers, repeated columns.
(print_sheet): compute space used by repeated headers and repeated
columns.
(print_page): Print repeating top rows and repeating left
columns on each page. Loop over printing routines.
(print_page_cells): new routine: prints a cell range only.
(print_page_repeated_rows, print_page_repeated_cols): Prints the
repeating columns and repeating rows.
* src/dialog-cell-format.c (apply_font_format): Implement
GnomePrint based version.
* src/print-info.c (save_range): Updated to reflect the new change
to PrintRepeatRange.
(print_info_save): ditto.
(load_range): ditto.
(print_info_new): ditto.
* src/print-info.h: Store ranges as a structure that contains an
explicit tag for validness instead of overloading the definition
of Value/CellRange.
1999-07-02 Jukka-Pekka Iivonen <iivonen@iki.fi>
* src/anaysis-tools.c: New file for data analysis tools.
......@@ -33,7 +83,7 @@
1999-06-30 Heath Martin <martinh@pegasus.cc.ucf.edu>
* src/cell.[c,h]: (cell_get_comment) New function.
* src/cell.c, src/cell.h: (cell_get_comment) New function.
* src/xml-io.c: (xml_write_cell) Save comments.
(xml_read_cell) Load comments.
......@@ -44,6 +94,7 @@
add a bit about Styles.
1999-06-29 Jody Goldberg <jgoldberg@home.com>
* src/cell.c (cell_set_formula) : Handle special case of array by
setting the entire matrix from the top left corner.
(cell_set_array_formula) : New function.
......
......@@ -27,8 +27,6 @@ Gnumeric Spread Sheet task list
* 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
......
<sect1>
<title>Working with files</title>
<sect2>
<title>Saving files</title>
<para>There are several ways to save a file that is currently open. If the file
has been named and already exists (ie, its not a new worksheet) the Save function
will save the file to the existing name. </para>
<para>The Save procedure can be invoked several ways. It is available in the
Menubar (see <xref linkend="menu-bar">) from <guimenu><accel>F</accel>ile</guimenu>/
<guimenuitem><accel>S</accel>ave</guimenuitem> menuitem. There is also
a buttonbar <guibutton>Save</guibutton> (see <xref linkend="buttonbar-buttons">).
All these methods are equivalent .</para>
<para>There are several ways to save a file that is currently
open. If the file has been named and already exists (ie, its not
a new worksheet) the Save function will save the file to the
existing name. </para>
<para>The Save procedure can be invoked several ways. It is
available in the Menubar (see <xref linkend="menu-bar">) from
<guimenu><accel>F</accel>ile</guimenu>/
<guimenuitem><accel>S</accel>ave</guimenuitem> menuitem. There
is also a buttonbar <guibutton>Save</guibutton> (see <xref
linkend="buttonbar-buttons">). All these methods are equivalent
.
</para>
<!-- FIXME is this proper? -->
<important>
......@@ -34,20 +37,20 @@
</term>
<listitem>
<para>
<guiicon>
<guiicon>
<inlinegraphic fileref="images/stock_save.gif"></inlinegraphic>
Save
</guiicon>
</para>
</listitem>
</varlistentry>
</varlistentry>
<!-- FIXME this is broken, the keycombo actions seem t ge ignored -->
<!-- We need to maek it clear its alt and F _then_ a, and the generated html doesnt do that -->
<varlistentry>
<term>
Keyboard Shortcut
</term>
<listitem>
<listitem>
<para>
<keycombo action=seq>
<keycombo action=simul>
......@@ -57,17 +60,19 @@
</keycombo>
</para>
</listitem>
</varlistentry>
</varlistentry>
</variablelist>
</important>
<para>To save new files, or to rename a file, the <guimenuitem>Save As...</guimenuitem>
is used. This will prompt the user for a new filename and path for the file to be
saved as. </para>
<para>To save new files, or to rename a file, the
<guimenuitem>Save As...</guimenuitem> is used. This will prompt
the user for a new filename and path for the file to be saved
as.
</para>
<important>
<variablelist>
<variablelist>
<title>Invoking a file Save as..</title>
<varlistentry>
<term>Menubar</term>
......@@ -88,15 +93,15 @@
<inlinegraphic fileref="images/stock_save.gif"></inlinegraphic>
Save
</guiicon>
This calls <guimenuitem>Save as...</guimenuitem> for new unnamed files. To rename a file, the menu
or keyboard shortcut needs to be used.
This calls <guimenuitem>Save as...</guimenuitem> for new unnamed files. To rename a file, the menu
or keyboard shortcut needs to be used.
</para>
</listitem>
</varlistentry>
<!-- FIXME this is broken, the keycombo actions seem t ge ignored -->
<!-- We need to maek it clear its alt and F _then_ a, and the generated html doesnt do that -->
<varlistentry>
<term>
<term>
Keyboard Shortcut
</term>
<listitem>
......@@ -107,24 +112,27 @@
</keycombo>
<keycap>a</keycap>
</keycombo>
</para>
</para>
</listitem>
</varlistentry>
</variablelist>
</important>
</sect2>
<sect2>
<title>File format</title>
<para>The default file format an Gnumeric's native format is a xml based file.
The file format is a ascii text based xml format. It is however, typically written
and read in a gzip compressed form. </para>
<para>The uncompressed format is human readable and designed to be easily parsed. It
is very extensible.</para>
</sect2>
<sect2>
<title>File format</title>
<para>The default file format an Gnumeric's native format is a xml
based file. The file format is a ascii text based xml
format. It is however, typically written and read in a gzip
compressed form.
</para>
<para>The uncompressed format is human readable and designed to be
easily parsed. It is very extensible.
</para>
</sect2>
......
......@@ -8,7 +8,9 @@
<!entity worksheet SYSTEM "worksheet.sgml">
<!entity files SYSTEM "files.sgml">
<!entity functions SYSTEM "functions.sgml">
<!entity printing SYSTEM "printing.sgml">
]>
<book id="gnumeric">
<bookinfo>
<title>Gnumeric's user manual</title>
......@@ -82,6 +84,11 @@
&files;
</chapter>
<chapter id="printing">
<title>Printing</title>
&printing;
</chapter>
<chapter id="tutorials">
<title>Tutorials</title>
<para>Nothing yet, will be some walkthroughs eventually.</para>
......
......@@ -4,7 +4,7 @@
<book id="gnumeric-design">
<bookinfo>
<title>The Gnumeric Spreadsheet Internal Design</title>
<releaseinfo>September 2, 1998</releaseinfo>
<releaseinfo>July 2, 1998</releaseinfo>
<author>
<firstname>Miguel</firstname>
<surname>de Icaza</surname>
......@@ -15,7 +15,7 @@
</affiliation>
</author>
<address><email>miguel@gnu.org</email></address>
<date>September 2, 1998</date>
<date>September 2, 1998; July 2, 1999.</date>
</bookinfo>
<chapter>
......@@ -71,156 +71,208 @@
</para>
<itemizedlist>
<listitem><para> Workbooks only take care of keeping various
sheets together and giving a name to them.</para>
<listitem><para>item Sheets are the repository of information:
cells are kept here, information on the columns and rows
is kept here, and the styles attached to the regions is
also kept here.</para>
<para>Sheets might have multiple views, this is required to
support split views and in the future to support the GNOME
document model. The actual front-end to the Sheet object
is the SheetView object: SheetView object each one has a
number of components:</para>
<itemizedlist>
<listitem><para>
Their scrollbars.</para>
<listitem><para> Their cell display engine (more in a
second).</para>
<listitem><para> Their bar display (column and row
display).</para>
</itemizedlist>
<para>The cell display engine is basically a modified
GnomeCanvas that can deal with keystrokes and can do some
extra spreadsheet oriented tasks. This cell display
engine is of type GnumericSheet.</para>
<para>GnumericSheet objects usually contain a number of
Gnome Canvas items specially designed to be used for a
spreadsheet: the Grid Item and the Cursor Item:</para>
<itemizedlist>
<listitem>
<para>
Workbooks only take care of keeping various sheets
together and giving a name to them.
</para>
</listitem>
<listitem><para> The Grid item takes care of rendering the
actual contents of the Sheet object and displaying the
Cells in the way the user requested, this is the
actual "core" display engine.</para>
<listitem><para> The Cursor item is the item that actually
draws the spreadsheet cursor. This item, as every
other Gnome Canvas item can take events and this one
is specially interesting, as it provides the basic
facilities for dragging a region of cells. </para>
<listitem>
<para>
Item Sheets are the repository of information: cells are
kept here, information on the columns and rows is kept
here, and the styles attached to the regions is also
kept here.
</para>
<para>
Sheets might have multiple views, this is required to
support split views and in the future to support the
GNOME document model. The actual front-end to the Sheet
object is the SheetView object: SheetView object each
one has a number of components:
</para>
<itemizedlist>
<listitem><para>
Their scrollbars.</para>
<listitem><para> Their cell display engine (more in a
second).</para>
<listitem><para> Their bar display (column and row
display).</para>
</itemizedlist>
<para>The cell display engine is basically a modified
GnomeCanvas that can deal with keystrokes and can do some
extra spreadsheet oriented tasks. This cell display
engine is of type GnumericSheet.</para>
<para>GnumericSheet objects usually contain a number of
Gnome Canvas items specially designed to be used for a
spreadsheet: the Grid Item and the Cursor Item:</para>
<itemizedlist>
</itemizedlist>
<para>During the course of a user session, Gnumeric will
create Items of type Editor, a special item designed to
display the contents of a cell as it is being typed and it
is syncronized with a GtkEntry (to provide an Excel-like
way of typing text into the cells).</para>
</itemizedlist>
<para> Sheets contain information for columns and rows in doubly
linked lists to facilitate their traversal (in the future,
when bottlenecks are identified, we will provide an alternate
quick access method based on hash tables, but the information
will still be linked forward and backwards).</para>
<para>The column and row information is stored in GList's that
contain ColRowInfo structures. These structures include a
number of interesting bits:</para>
<itemizedlist>
<listitem><para> The Grid item takes care of rendering the
actual contents of the Sheet object and displaying the
Cells in the way the user requested, this is the
actual "core" display engine.</para>
<listitem><para> The Cursor item is the item that actually
draws the spreadsheet cursor. This item, as every
other Gnome Canvas item can take events and this one
is specially interesting, as it provides the basic
facilities for dragging a region of cells. </para>
</itemizedlist>
<para>
During the course of a user session, Gnumeric will
create Items of type Editor, a special item designed to
display the contents of a cell as it is being typed and
it is syncronized with a GtkEntry (to provide an
Excel-like way of typing text into the cells).
</para>
</itemizedlist>
<listitem><para> Their assigned position (or -1 if they are
the "default" style), field name "pos".</para>
<listitem><para> The actual width used in pixels (for the
current magnification setting) as well as their logical
size, plus the margins required in pixels for displaying
various cell adornements.</para>
<para>
Sheets contain information for columns and rows in doubly
linked lists to facilitate their traversal (in the future,
when bottlenecks are identified, we will provide an
alternate quick access method based on hash tables, but the
information will still be linked forward and
backwards).
</para>
<para>
The column and row information is stored in GList's that
contain ColRowInfo structures. These structures include a
number of interesting bits:
</para>
<itemizedlist>
</itemizedlist>
<para>When a cell is allocated, both ColRowInfos (for column and
row) are allocated and properly linked, the cell is made to
point to these new structures.</para>
<listitem>
<para>
Their assigned position (or -1 if they are the "default"
style), field name "pos".
</para>
<listitem>
<para>
The actual width used in pixels (for the current
magnification setting) as well as their logical size,
plus the margins required in pixels for displaying
various cell adornements.
</para>
</listitem>
</itemizedlist>
<para>
When a cell is allocated, both ColRowInfos (for column and
row) are allocated and properly linked, the cell is made to
point to these new structures.
</para>
<para>
The column ColRowInfos have a field called "data", this is a
linked list of Cells for every row where a cell
exists.
</para>
<para>
Cells are stored in a hash table inside the Sheet data
structure for quick retrieval and they are also linked
properly in their respective columns.
</para>
<para>
A cell might display information in more than one column, so
Gnumeric needs to keep track of which cells (column, row
pairs) are being managed by which cell. This information is
kept in a per-row fashion in the data pointer in the
ColRowInfo structure for the rows. The registration and
unregistration of the view areas code is on the cellspan.c
file.</para>
</sect1>
<para>The column ColRowInfos have a field called "data", this is
a linked list of Cells for every row where a cell
exists. </para>
<para>Cells are stored in a hash table inside the Sheet data
structure for quick retrieval and they are also linked
properly in their respective columns. </para>
<para>A cell might display information in more than one column,
so Gnumeric needs to keep track of which cells (column, row
pairs) are being managed by which cell. This information is
kept in a per-row fashion in the data pointer in the
ColRowInfo structure for the rows. The registration and
unregistration of the view areas code is on the cellspan.c
file.
</sect1>
<sect1>
<title>Formula storage</title>
<para>When a formula is encountered, Gnumeric parses the formula
into a tree structure. The tree structure is later used to
evaluate the expression at a given location (each cordinate in a
cell references is stored as either an absolute reference or a
relative reference to the cell position).</para>
<sect1>
<title>Formula storage</title>
<para>
When a formula is encountered, Gnumeric parses the formula
into a tree structure. The tree structure is later used to
evaluate the expression at a given location (each cordinate
in a cell references is stored as either an absolute
reference or a relative reference to the cell position). To
read about the actual implementation of this, look in the
files <filename>gnumeric/src/expr.h</filename>,
<filename>gnumeric/src/expr.c</filename>.
</para>
<para>To speed up formula duplication, Gnumeric reference counts
the parsed expression, this allow for quick duplication of
expressions. It should be noted that some file formats (the