Commit e1a87d5f authored by Jody Goldberg's avatar Jody Goldberg Committed by Jody Goldberg

Handle outline mode. (ms_excel_read_colinfo) : ditto. (ms_excel_read_guts)


2001-03-15  Jody Goldberg <jgoldberg@home.com>

	* ms-excel-read.c (ms_excel_read_row) : Handle outline mode.
	(ms_excel_read_colinfo) : ditto.
	(ms_excel_read_guts) : ditto.

2001-03-16  Jody Goldberg <jgoldberg@home.com>

	* src/item-bar.c (item_bar_calc_size) : rename from
	  item_bar_fonts_init.

	* src/sheet-control-gui.c (scg_set_zoom_factor) : prepare for panes by
	  zooming the col/row header canvases.  We need this as we transition
	  to using gnumeric-sheets instead of canvases to hold the item-bars.

2001-03-15  Jody Goldberg <jgoldberg@home.com>

	* src/colrow.c (colrow_equal) : handle outline&collapse.
	(colrow_copy) : ditto.

	* src/item-bar.c (outline_button_press) : new function.
	(item_bar_event) : used here.

2001-03-15  Jody Goldberg <jgoldberg@home.com>

	* src/item-bar.c (compute_pixels_from_pts) : new function.
	(item_bar_fonts_init) : resize the indent gutters based on the zoom.
	(item_bar_realize) : add another gc for outline drawing.
	(item_bar_unrealize) : ditto.
	(item_bar_draw) : implement drawing for groupings.
	(set_cursor) : handle cursor in the presence of groupings.

2001-03-14  Jody Goldberg <jgoldberg@home.com>

	* Makefile.am : update the handling of the oaf file.

	* src/sheet.c (sheet_col_row_default_calc) : rename from
	  sheet_col_row_default_init.

2001-03-13  Jody Goldberg <jgoldberg@home.com>

	* src/xml-io.c (xml_write_print_repeat_range) : PrintRepeatRange now
	  uses a simple Range.
	(xml_read_print_repeat_range) : ditto.
	* src/print-info.c (print_info_new) : ditto.
	(save_range) : Ditto.
	* src/dialogs/dialog-printer-setup.c (do_fetch_page_info) : ditto.
	* src/print.c (print_range_used_units) : ditto.
	(print_range_right_then_down) : ditto.
	(print_range_down_then_right) : ditto.
	(print_page_repeated_intersect) : ditto.
	(print_page_repeated_cols) : ditto.
	(print_page_repeated_rows) : ditto.
	(print_page) : ditto.

	* src/sheet-control-gui.c (scg_set_zoom_factor) : The sizing has moved
	  into the itembar.

	* src/item-bar.c : s/orientation/is_col_header/
	(item_bar_fonts_init) : Init the ideal cell size.
	(item_bar_update) : Begin to support grouping.
	(item_bar_draw) : ditto.
	(item_bar_init) : init the new members.

	* src/print-cell.c (print_cell) : re-enable halign FILL.
	* src/cell-draw.c (cell_draw) : ditto.
parent fc14aa47
......@@ -7,14 +7,15 @@ release, and longer term bugs.
Release Critical
----------------
- XL import should honour style requests for full columns.
* Format toolbar is too wide. (The foreground colour combo has falled
off the edge for me.)
Long term breakage
------------------
- XL import should honour style requests for full columns.
- Format toolbar is too wide. (The foreground colour combo has fallen
off the edge for me.)
- Tools->Solver leak:
g_strdup [gstrfuncs.c:56]
dialog_solver [dialog-solver.c:735]
......@@ -148,6 +149,7 @@ Printing
Widget polishing
----------------
- extensions to the notebook to enable dragging a tab to reorder and copy
Plugins
-------
......
2001-03-16 Jody Goldberg <jgoldberg@home.com>
* src/item-bar.c (item_bar_calc_size) : rename from
item_bar_fonts_init.
* src/sheet-control-gui.c (scg_set_zoom_factor) : prepare for panes by
zooming the col/row header canvases. We need this as we transition
to using gnumeric-sheets instead of canvases to hold the item-bars.
2001-03-15 Jody Goldberg <jgoldberg@home.com>
* src/colrow.c (colrow_equal) : handle outline&collapse.
(colrow_copy) : ditto.
* src/item-bar.c (outline_button_press) : new function.
(item_bar_event) : used here.
2001-03-15 Jody Goldberg <jgoldberg@home.com>
* src/item-bar.c (compute_pixels_from_pts) : new function.
(item_bar_fonts_init) : resize the indent gutters based on the zoom.
(item_bar_realize) : add another gc for outline drawing.
(item_bar_unrealize) : ditto.
(item_bar_draw) : implement drawing for groupings.
(set_cursor) : handle cursor in the presence of groupings.
2001-03-14 Jody Goldberg <jgoldberg@home.com>
* Makefile.am : update the handling of the oaf file.
* src/sheet.c (sheet_col_row_default_calc) : rename from
sheet_col_row_default_init.
2001-03-13 Jody Goldberg <jgoldberg@home.com>
* src/xml-io.c (xml_write_print_repeat_range) : PrintRepeatRange now
uses a simple Range.
(xml_read_print_repeat_range) : ditto.
* src/print-info.c (print_info_new) : ditto.
(save_range) : Ditto.
* src/dialogs/dialog-printer-setup.c (do_fetch_page_info) : ditto.
* src/print.c (print_range_used_units) : ditto.
(print_range_right_then_down) : ditto.
(print_range_down_then_right) : ditto.
(print_page_repeated_intersect) : ditto.
(print_page_repeated_cols) : ditto.
(print_page_repeated_rows) : ditto.
(print_page) : ditto.
* src/sheet-control-gui.c (scg_set_zoom_factor) : The sizing has moved
into the itembar.
* src/item-bar.c : s/orientation/is_col_header/
(item_bar_fonts_init) : Init the ideal cell size.
(item_bar_update) : Begin to support grouping.
(item_bar_draw) : ditto.
(item_bar_init) : init the new members.
* src/print-cell.c (print_cell) : re-enable halign FILL.
* src/cell-draw.c (cell_draw) : ditto.
2001-03-17 Jody Goldberg <jgoldberg@home.com>
* Release 0.64
......@@ -14,6 +75,8 @@
2001-03-14 Jody Goldberg <jgoldberg@home.com>
* src/item-grid.c (item_grid_event) : don't go past edges
* src/parser.y : Add portability.h to help on Tru64
* src/workbook-control-gui.c : disable validate and freeze for
......
2001-03-16 Jody Goldberg <jgoldberg@home.com>
* src/item-bar.c (item_bar_calc_size) : rename from
item_bar_fonts_init.
* src/sheet-control-gui.c (scg_set_zoom_factor) : prepare for panes by
zooming the col/row header canvases. We need this as we transition
to using gnumeric-sheets instead of canvases to hold the item-bars.
2001-03-15 Jody Goldberg <jgoldberg@home.com>
* src/colrow.c (colrow_equal) : handle outline&collapse.
(colrow_copy) : ditto.
* src/item-bar.c (outline_button_press) : new function.
(item_bar_event) : used here.
2001-03-15 Jody Goldberg <jgoldberg@home.com>
* src/item-bar.c (compute_pixels_from_pts) : new function.
(item_bar_fonts_init) : resize the indent gutters based on the zoom.
(item_bar_realize) : add another gc for outline drawing.
(item_bar_unrealize) : ditto.
(item_bar_draw) : implement drawing for groupings.
(set_cursor) : handle cursor in the presence of groupings.
2001-03-14 Jody Goldberg <jgoldberg@home.com>
* Makefile.am : update the handling of the oaf file.
* src/sheet.c (sheet_col_row_default_calc) : rename from
sheet_col_row_default_init.
2001-03-13 Jody Goldberg <jgoldberg@home.com>
* src/xml-io.c (xml_write_print_repeat_range) : PrintRepeatRange now
uses a simple Range.
(xml_read_print_repeat_range) : ditto.
* src/print-info.c (print_info_new) : ditto.
(save_range) : Ditto.
* src/dialogs/dialog-printer-setup.c (do_fetch_page_info) : ditto.
* src/print.c (print_range_used_units) : ditto.
(print_range_right_then_down) : ditto.
(print_range_down_then_right) : ditto.
(print_page_repeated_intersect) : ditto.
(print_page_repeated_cols) : ditto.
(print_page_repeated_rows) : ditto.
(print_page) : ditto.
* src/sheet-control-gui.c (scg_set_zoom_factor) : The sizing has moved
into the itembar.
* src/item-bar.c : s/orientation/is_col_header/
(item_bar_fonts_init) : Init the ideal cell size.
(item_bar_update) : Begin to support grouping.
(item_bar_draw) : ditto.
(item_bar_init) : init the new members.
* src/print-cell.c (print_cell) : re-enable halign FILL.
* src/cell-draw.c (cell_draw) : ditto.
2001-03-17 Jody Goldberg <jgoldberg@home.com>
* Release 0.64
......@@ -14,6 +75,8 @@
2001-03-14 Jody Goldberg <jgoldberg@home.com>
* src/item-grid.c (item_grid_event) : don't go past edges
* src/parser.y : Add portability.h to help on Tru64
* src/workbook-control-gui.c : disable validate and freeze for
......
2001-03-16 Jody Goldberg <jgoldberg@home.com>
* src/item-bar.c (item_bar_calc_size) : rename from
item_bar_fonts_init.
* src/sheet-control-gui.c (scg_set_zoom_factor) : prepare for panes by
zooming the col/row header canvases. We need this as we transition
to using gnumeric-sheets instead of canvases to hold the item-bars.
2001-03-15 Jody Goldberg <jgoldberg@home.com>
* src/colrow.c (colrow_equal) : handle outline&collapse.
(colrow_copy) : ditto.
* src/item-bar.c (outline_button_press) : new function.
(item_bar_event) : used here.
2001-03-15 Jody Goldberg <jgoldberg@home.com>
* src/item-bar.c (compute_pixels_from_pts) : new function.
(item_bar_fonts_init) : resize the indent gutters based on the zoom.
(item_bar_realize) : add another gc for outline drawing.
(item_bar_unrealize) : ditto.
(item_bar_draw) : implement drawing for groupings.
(set_cursor) : handle cursor in the presence of groupings.
2001-03-14 Jody Goldberg <jgoldberg@home.com>
* Makefile.am : update the handling of the oaf file.
* src/sheet.c (sheet_col_row_default_calc) : rename from
sheet_col_row_default_init.
2001-03-13 Jody Goldberg <jgoldberg@home.com>
* src/xml-io.c (xml_write_print_repeat_range) : PrintRepeatRange now
uses a simple Range.
(xml_read_print_repeat_range) : ditto.
* src/print-info.c (print_info_new) : ditto.
(save_range) : Ditto.
* src/dialogs/dialog-printer-setup.c (do_fetch_page_info) : ditto.
* src/print.c (print_range_used_units) : ditto.
(print_range_right_then_down) : ditto.
(print_range_down_then_right) : ditto.
(print_page_repeated_intersect) : ditto.
(print_page_repeated_cols) : ditto.
(print_page_repeated_rows) : ditto.
(print_page) : ditto.
* src/sheet-control-gui.c (scg_set_zoom_factor) : The sizing has moved
into the itembar.
* src/item-bar.c : s/orientation/is_col_header/
(item_bar_fonts_init) : Init the ideal cell size.
(item_bar_update) : Begin to support grouping.
(item_bar_draw) : ditto.
(item_bar_init) : init the new members.
* src/print-cell.c (print_cell) : re-enable halign FILL.
* src/cell-draw.c (cell_draw) : ditto.
2001-03-17 Jody Goldberg <jgoldberg@home.com>
* Release 0.64
......@@ -14,6 +75,8 @@
2001-03-14 Jody Goldberg <jgoldberg@home.com>
* src/item-grid.c (item_grid_event) : don't go past edges
* src/parser.y : Add portability.h to help on Tru64
* src/workbook-control-gui.c : disable validate and freeze for
......
2001-03-16 Jody Goldberg <jgoldberg@home.com>
* src/item-bar.c (item_bar_calc_size) : rename from
item_bar_fonts_init.
* src/sheet-control-gui.c (scg_set_zoom_factor) : prepare for panes by
zooming the col/row header canvases. We need this as we transition
to using gnumeric-sheets instead of canvases to hold the item-bars.
2001-03-15 Jody Goldberg <jgoldberg@home.com>
* src/colrow.c (colrow_equal) : handle outline&collapse.
(colrow_copy) : ditto.
* src/item-bar.c (outline_button_press) : new function.
(item_bar_event) : used here.
2001-03-15 Jody Goldberg <jgoldberg@home.com>
* src/item-bar.c (compute_pixels_from_pts) : new function.
(item_bar_fonts_init) : resize the indent gutters based on the zoom.
(item_bar_realize) : add another gc for outline drawing.
(item_bar_unrealize) : ditto.
(item_bar_draw) : implement drawing for groupings.
(set_cursor) : handle cursor in the presence of groupings.
2001-03-14 Jody Goldberg <jgoldberg@home.com>
* Makefile.am : update the handling of the oaf file.
* src/sheet.c (sheet_col_row_default_calc) : rename from
sheet_col_row_default_init.
2001-03-13 Jody Goldberg <jgoldberg@home.com>
* src/xml-io.c (xml_write_print_repeat_range) : PrintRepeatRange now
uses a simple Range.
(xml_read_print_repeat_range) : ditto.
* src/print-info.c (print_info_new) : ditto.
(save_range) : Ditto.
* src/dialogs/dialog-printer-setup.c (do_fetch_page_info) : ditto.
* src/print.c (print_range_used_units) : ditto.
(print_range_right_then_down) : ditto.
(print_range_down_then_right) : ditto.
(print_page_repeated_intersect) : ditto.
(print_page_repeated_cols) : ditto.
(print_page_repeated_rows) : ditto.
(print_page) : ditto.
* src/sheet-control-gui.c (scg_set_zoom_factor) : The sizing has moved
into the itembar.
* src/item-bar.c : s/orientation/is_col_header/
(item_bar_fonts_init) : Init the ideal cell size.
(item_bar_update) : Begin to support grouping.
(item_bar_draw) : ditto.
(item_bar_init) : init the new members.
* src/print-cell.c (print_cell) : re-enable halign FILL.
* src/cell-draw.c (cell_draw) : ditto.
2001-03-17 Jody Goldberg <jgoldberg@home.com>
* Release 0.64
......@@ -14,6 +75,8 @@
2001-03-14 Jody Goldberg <jgoldberg@home.com>
* src/item-grid.c (item_grid_event) : don't go past edges
* src/parser.y : Add portability.h to help on Tru64
* src/workbook-control-gui.c : disable validate and freeze for
......
2001-03-16 Jody Goldberg <jgoldberg@home.com>
* src/item-bar.c (item_bar_calc_size) : rename from
item_bar_fonts_init.
* src/sheet-control-gui.c (scg_set_zoom_factor) : prepare for panes by
zooming the col/row header canvases. We need this as we transition
to using gnumeric-sheets instead of canvases to hold the item-bars.
2001-03-15 Jody Goldberg <jgoldberg@home.com>
* src/colrow.c (colrow_equal) : handle outline&collapse.
(colrow_copy) : ditto.
* src/item-bar.c (outline_button_press) : new function.
(item_bar_event) : used here.
2001-03-15 Jody Goldberg <jgoldberg@home.com>
* src/item-bar.c (compute_pixels_from_pts) : new function.
(item_bar_fonts_init) : resize the indent gutters based on the zoom.
(item_bar_realize) : add another gc for outline drawing.
(item_bar_unrealize) : ditto.
(item_bar_draw) : implement drawing for groupings.
(set_cursor) : handle cursor in the presence of groupings.
2001-03-14 Jody Goldberg <jgoldberg@home.com>
* Makefile.am : update the handling of the oaf file.
* src/sheet.c (sheet_col_row_default_calc) : rename from
sheet_col_row_default_init.
2001-03-13 Jody Goldberg <jgoldberg@home.com>
* src/xml-io.c (xml_write_print_repeat_range) : PrintRepeatRange now
uses a simple Range.
(xml_read_print_repeat_range) : ditto.
* src/print-info.c (print_info_new) : ditto.
(save_range) : Ditto.
* src/dialogs/dialog-printer-setup.c (do_fetch_page_info) : ditto.
* src/print.c (print_range_used_units) : ditto.
(print_range_right_then_down) : ditto.
(print_range_down_then_right) : ditto.
(print_page_repeated_intersect) : ditto.
(print_page_repeated_cols) : ditto.
(print_page_repeated_rows) : ditto.
(print_page) : ditto.
* src/sheet-control-gui.c (scg_set_zoom_factor) : The sizing has moved
into the itembar.
* src/item-bar.c : s/orientation/is_col_header/
(item_bar_fonts_init) : Init the ideal cell size.
(item_bar_update) : Begin to support grouping.
(item_bar_draw) : ditto.
(item_bar_init) : init the new members.
* src/print-cell.c (print_cell) : re-enable halign FILL.
* src/cell-draw.c (cell_draw) : ditto.
2001-03-17 Jody Goldberg <jgoldberg@home.com>
* Release 0.64
......@@ -14,6 +75,8 @@
2001-03-14 Jody Goldberg <jgoldberg@home.com>
* src/item-grid.c (item_grid_event) : don't go past edges
* src/parser.y : Add portability.h to help on Tru64
* src/workbook-control-gui.c : disable validate and freeze for
......
2001-03-15 Jody Goldberg <jgoldberg@home.com>
* ms-excel-read.c (ms_excel_read_row) : Handle outline mode.
(ms_excel_read_colinfo) : ditto.
(ms_excel_read_guts) : ditto.
2001-03-17 Jody Goldberg <jgoldberg@home.com>
* Release 0.64
......
......@@ -27,6 +27,7 @@
#include "sheet-merge.h"
#include "format.h"
#include "eval.h"
#include "value.h"
#include "gutils.h"
#include "sheet-object-cell-comment.h"
#include "application.h"
......@@ -2880,9 +2881,7 @@ ms_excel_read_row (BiffQuery *q, ExcelSheet *sheet)
sheet_row_set_size_pts (sheet->gnum_sheet, row, hu, TRUE);
}
/* FIXME : I am not clear on the difference between collapsed, and dyn 0
* Use both for now */
if (flags & 0x30)
if (flags & 0x20)
colrow_set_visibility (sheet->gnum_sheet, FALSE, FALSE, row, row);
if (flags & 0x80) {
......@@ -2894,6 +2893,9 @@ ms_excel_read_row (BiffQuery *q, ExcelSheet *sheet)
}
#endif
}
sheet_col_row_set_outline_level (sheet->gnum_sheet, row, FALSE,
(unsigned)(flags&0x7),
flags & 0x10);
}
/**
......@@ -2914,10 +2916,8 @@ ms_excel_read_colinfo (BiffQuery *q, ExcelSheet *sheet)
guint16 const xf = MS_OLE_GET_GUINT16 (q->data+6);
guint16 const options = MS_OLE_GET_GUINT16 (q->data+8);
gboolean hidden = (options & 0x0001) ? TRUE : FALSE;
#if 0
gboolean const collapsed = (options & 0x1000) ? TRUE : FALSE;
int const outline_level = (options >> 8) & 0x7;
#endif
unsigned const outline_level = (unsigned)((options >> 8) & 0x7);
g_return_if_fail (firstcol < SHEET_MAX_COLS);
......@@ -2949,8 +2949,11 @@ ms_excel_read_colinfo (BiffQuery *q, ExcelSheet *sheet)
/* NOTE : seems like this is inclusive firstcol, inclusive lastcol */
if (lastcol >= SHEET_MAX_COLS)
lastcol = SHEET_MAX_COLS-1;
for (lp = firstcol; lp <= lastcol; ++lp)
for (lp = firstcol; lp <= lastcol; ++lp) {
sheet_col_set_size_pts (sheet->gnum_sheet, lp, col_width, TRUE);
sheet_col_row_set_outline_level (sheet->gnum_sheet, lp, TRUE,
outline_level, collapsed);
}
/* TODO : We should associate a style region with the columns */
if (hidden)
......@@ -3354,23 +3357,12 @@ static void
ms_excel_read_guts (BiffQuery *q, ExcelSheet *sheet)
{
g_return_if_fail (q->length == 8);
{
const guint16 row_gutter = MS_OLE_GET_GUINT16 (q->data);
const guint16 col_gutter = MS_OLE_GET_GUINT16 (q->data+2);
const guint16 max_row_outline = MS_OLE_GET_GUINT16 (q->data+4);
const guint16 max_col_outline = MS_OLE_GET_GUINT16 (q->data+6);
/* TODO : Use this information when gnumeric supports gutters,
* and outlines */
#ifndef NO_DEBUG_EXCEL
if (ms_excel_read_debug > 1) {
printf ("Gutters : row = %hu col = %hu\n"
"Max outline : row %hu col %hu\n",
row_gutter, col_gutter,
max_row_outline, max_col_outline);
}
#endif
}
sheet_col_row_gutter_pts (sheet->gnum_sheet,
MS_OLE_GET_GUINT16 (q->data+2),
MS_OLE_GET_GUINT16 (q->data+6),
MS_OLE_GET_GUINT16 (q->data),
MS_OLE_GET_GUINT16 (q->data+4));
}
/*
......
......@@ -42,6 +42,7 @@
#include "sheet-style.h"
#include "format.h"
#include "main.h"
#include "value.h"
#include "parse-util.h"
#include "print-info.h"
#include "workbook-view.h"
......
......@@ -39,7 +39,6 @@ int ms_excel_object_debug;
#define GR_CHECKBOX_FORMULA 0x14
#define GR_COMMON_OBJ_DATA 0x15
void
ms_destroy_OBJ (MSObj *obj)
{
......@@ -76,7 +75,7 @@ ms_read_TXO (BiffQuery *q)
int const halign = (options >> 1) & 0x7;
int const valign = (options >> 4) & 0x7;
char *text = g_new (char, text_len + 1);
const guint8 unicode_flag = MS_OLE_GET_GUINT8 (q->data + 18);
guint8 const unicode_flag = MS_OLE_GET_GUINT8 (q->data + 18);
guint16 peek_op;
g_return_val_if_fail (orient <= 3, NULL);
......
......@@ -666,8 +666,10 @@ xml2ParseColRow (XML2ParseState *state, CHAR const **attrs, gboolean is_col)
if (xml2ParseAttrDouble (attrs, "Unit", &size)) ;
else if (xml2ParseAttrInt (attrs, "Count", &count)) ;
else if (xml2ParseAttrInt (attrs, "MarginA", &cri->margin_a)) ;
else if (xml2ParseAttrInt (attrs, "MarginB", &cri->margin_b)) ;
else if (xml2ParseAttrInt (attrs, "MarginA", &dummy))
cri->margin_a = dummy;
else if (xml2ParseAttrInt (attrs, "MarginB", &dummy))
cri->margin_b = dummy;
else if (xml2ParseAttrInt (attrs, "HardSize", &dummy))
cri->hard_size = dummy;
else if (xml2ParseAttrInt (attrs, "Hidden", &dummy))
......
......@@ -666,8 +666,10 @@ xml2ParseColRow (XML2ParseState *state, CHAR const **attrs, gboolean is_col)
if (xml2ParseAttrDouble (attrs, "Unit", &size)) ;
else if (xml2ParseAttrInt (attrs, "Count", &count)) ;
else if (xml2ParseAttrInt (attrs, "MarginA", &cri->margin_a)) ;
else if (xml2ParseAttrInt (attrs, "MarginB", &cri->margin_b)) ;
else if (xml2ParseAttrInt (attrs, "MarginA", &dummy))
cri->margin_a = dummy;
else if (xml2ParseAttrInt (attrs, "MarginB", &dummy))
cri->margin_b = dummy;
else if (xml2ParseAttrInt (attrs, "HardSize", &dummy))
cri->hard_size = dummy;
else if (xml2ParseAttrInt (attrs, "Hidden", &dummy))
......
......@@ -273,13 +273,10 @@ cell_draw (Cell const *cell, MStyle const *mstyle,
if (halign != HALIGN_JUSTIFY && valign != VALIGN_JUSTIFY &&
!mstyle_get_wrap_text (mstyle)) {
int x, len = cell_width_pixel;
int x, total, len = cell_width_pixel;
switch (halign) {
case HALIGN_FILL:
g_warning ("FILL!");
/* fall through */
case HALIGN_FILL: /* fall through */
case HALIGN_LEFT:
x = rect.x + indent;
break;
......@@ -298,8 +295,13 @@ cell_draw (Cell const *cell, MStyle const *mstyle,
x = rect.x;
}
draw_text (drawable, font, gc, x, text_base,
text, strlen (text), len, line_offset, num_lines);
total = len; /* don't include partial copies after the first */
do {
draw_text (drawable, font, gc, x, text_base,
text, strlen (text), len, line_offset, num_lines);
x += len;
total += len;
} while (halign == HALIGN_FILL && total < rect.width && len > 0);
} else {
GList *lines, *l;
int line_count;
......
/* vim: set sw=8: */
/*
* colrow.c: Utilities for Rows and Columns
*
* Author:
* Miguel de Icaza (miguel@gnu.org).
* Jody Goldberg (jgoldberg@home.org)
* Copyright (C) 1999, 2000, 2001 Jody Goldberg (jgoldberg@home.com)
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* (C) 1998, 1999, 2000 Miguel de Icaza, Jody Goldberg
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA
*/
#include <config.h>
#include "colrow.h"
......@@ -26,23 +39,26 @@ colrow_equal (ColRowInfo const *a, ColRowInfo const *b)
if (a == NULL || b == NULL)
return FALSE;
return
a->size_pts == b->size_pts &&
a->margin_a == b->margin_a &&
a->margin_b == b->margin_b &&
a->hard_size == b->hard_size &&
a->visible == b->visible;
return a->size_pts == b->size_pts &&
a->margin_a == b->margin_a &&
a->margin_b == b->margin_b &&
a->outline_level == b->outline_level &&
a->is_collapsed == b->is_collapsed &&
a->hard_size == b->hard_size &&
a->visible == b->visible;
}
void
colrow_copy (ColRowInfo *dst, ColRowInfo const *src)
{
dst->margin_a = src->margin_a;
dst->margin_b = src->margin_b;
dst->size_pts = src->size_pts;
dst->size_pixels = src->size_pixels;
dst->hard_size = src->hard_size;
dst->visible = src->visible;
dst->size_pts = src->size_pts;
dst->size_pixels = src->size_pixels;
dst->margin_a = src->