Commit 0ae4c759 authored by Jody Goldberg's avatar Jody Goldberg Committed by Jody Goldberg

clean up includes.


2000-12-25  Jody Goldberg <jgoldberg@home.com>

	* src/ranges.h : clean up includes.
parent 9a9caa4d
......@@ -97,7 +97,6 @@ STF - pasting a single line should not invoke the importer
- Merged Cells
- autofill
- sorting
- undo/redo (even for row/col ins/del)
- width of cell for general format
- selection after row/col ins/del
......
2000-12-25 Jody Goldberg <jgoldberg@home.com>
* src/ranges.h : clean up includes.
2000-12-25 Almer S. Tigelaar <almer1@dds.nl>
* src/clipboard.c : Remove superflous remnants of
......
2000-12-25 Jody Goldberg <jgoldberg@home.com>
* src/ranges.h : clean up includes.
2000-12-25 Almer S. Tigelaar <almer1@dds.nl>
* src/clipboard.c : Remove superflous remnants of
......
2000-12-25 Jody Goldberg <jgoldberg@home.com>
* src/ranges.h : clean up includes.
2000-12-25 Almer S. Tigelaar <almer1@dds.nl>
* src/clipboard.c : Remove superflous remnants of
......
2000-12-25 Jody Goldberg <jgoldberg@home.com>
* src/ranges.h : clean up includes.
2000-12-25 Almer S. Tigelaar <almer1@dds.nl>
* src/clipboard.c : Remove superflous remnants of
......
2000-12-25 Jody Goldberg <jgoldberg@home.com>
* src/ranges.h : clean up includes.
2000-12-25 Almer S. Tigelaar <almer1@dds.nl>
* src/clipboard.c : Remove superflous remnants of
......
......@@ -172,7 +172,7 @@ adopted. This document breaks roughly into two parts. First the 'user'
2.1.1 The 'global' style kludge
Each sheet has a 'global' style; this covers the entire sheet range
sheet_get_full_range (sheet.h). Several routines in sheet-style do
range_init_full_sheet (sheet.h). Several routines in sheet-style do
intricate things to ranges such as splitting, shrinking etc. Invariably
these don't want to do this to the global style. Since this style is
invariably the last entry in the style list several style iterators
......
......@@ -172,7 +172,7 @@ adopted. This document breaks roughly into two parts. First the 'user'
2.1.1 The 'global' style kludge
Each sheet has a 'global' style; this covers the entire sheet range
sheet_get_full_range (sheet.h). Several routines in sheet-style do
range_init_full_sheet (sheet.h). Several routines in sheet-style do
intricate things to ranges such as splitting, shrinking etc. Invariably
these don't want to do this to the global style. Since this style is
invariably the last entry in the style list several style iterators
......
......@@ -22,6 +22,7 @@
#include "ranges.h"
#include "expr-name.h"
#include "style.h"
#include "cell.h"
#include "format.h"
#include "eval.h"
#include "gutils.h"
......
......@@ -98,7 +98,7 @@ palette_from_color (StyleColor *color)
static void
real_set_style (Sheet *sheet, Range *range, MStyle *style)
{
sheet_range_apply_style (sheet, range, style);
sheet_style_apply_range (sheet, range, style);
}
static gboolean
......
......@@ -21,6 +21,7 @@
#include "workbook-control.h"
#include "workbook.h"
#include "ranges.h"
#include "expr.h"
#include "commands.h"
#include "xml-io.h"
......
......@@ -34,6 +34,8 @@
#include "ranges.h"
#include "sort.h"
#include "eval.h"
#include "expr.h"
#include "cell.h"
#include "parse-util.h"
#include "clipboard.h"
#include "selection.h"
......@@ -446,8 +448,7 @@ cmd_set_text_undo (GnumericCommand *cmd, WorkbookControl *wbc)
me->pos.eval.row);
/* Save the new value so we can redo */
new_text = (cell == NULL || cell->value == NULL || cell->value->type == VALUE_EMPTY)
? NULL : cell_get_entered_text (cell);
new_text = cell_is_blank (cell) ? NULL : cell_get_entered_text (cell);
/* Restore the old value if it was not empty */
if (me->text != NULL) {
......@@ -1189,7 +1190,7 @@ cmd_format_redo (GnumericCommand *cmd, WorkbookControl *wbc)
me->borders);
if (me->new_style) {
mstyle_ref (me->new_style);
sheet_range_apply_style (me->sheet, l->data,
sheet_style_apply_range (me->sheet, l->data,
me->new_style);
}
sheet_flag_format_update_range (me->sheet, l->data);
......
......@@ -21,6 +21,8 @@
#include "workbook-control.h"
#include "workbook-view.h"
#include "workbook.h"
#include "expr.h"
#include "cell.h"
typedef enum {
REMOVE_DEPS = 0,
......
......@@ -17,6 +17,7 @@
#include "workbook.h"
#include "workbook-control.h"
#include "func.h"
#include "cell.h"
#include "ranges.h"
#include "analysis-tools.h"
#include "rendered-value.h"
......
......@@ -18,6 +18,7 @@
#include "gnumeric-util.h"
#include "selection.h"
#include "ranges.h"
#include "cell.h"
#include "format.h"
#include "formats.h"
#include "pattern.h"
......
......@@ -4,8 +4,8 @@
* Authors:
* JP Rosevear <jpr@arcavia.com>
* Michael Meeks <michael@imaginator.com>
*
*/
#include <config.h>
#include <gnome.h>
#include <glade/glade.h>
......@@ -23,6 +23,7 @@
#include "workbook.h"
#include "rendered-value.h"
#include "sort.h"
#include "sheet.h"
#define GLADE_FILE "cell-sort.glade"
......
......@@ -21,6 +21,8 @@
#include "workbook-control.h"
#include "workbook-view.h"
#include "workbook.h"
#include "expr.h"
#include "cell.h"
typedef enum {
REMOVE_DEPS = 0,
......
......@@ -14,6 +14,7 @@
#include "eval.h"
#include "format.h"
#include "func.h"
#include "cell.h"
#include "parse-util.h"
#include "ranges.h"
#include "number-match.h"
......
......@@ -1172,7 +1172,7 @@ cb_format_sheet_style (FormatTemplate *ft, Range *r, MStyle *mstyle, Sheet *shee
* We need not unref the mstyle, sheet will
* take care of the mstyle
*/
sheet_range_apply_style (sheet, r, mstyle);
sheet_style_apply_range (sheet, r, mstyle);
}
static void
......
......@@ -17,6 +17,7 @@
#include "selection.h"
#include "parse-util.h"
#include "ranges.h"
#include "sheet.h"
#include "application.h"
#include "workbook-view.h"
#include "workbook-edit.h"
......
......@@ -17,6 +17,7 @@
#include "selection.h"
#include "parse-util.h"
#include "ranges.h"
#include "sheet.h"
#include "application.h"
#include "workbook-view.h"
#include "workbook-edit.h"
......
......@@ -12,6 +12,7 @@
#include "color.h"
#include "clipboard.h"
#include "selection.h"
#include "sheet.h"
#include "workbook.h"
#include "workbook-edit.h"
#include "gnumeric-util.h"
......
......@@ -23,6 +23,7 @@
#include "sheet-control-gui.h"
#include "value.h"
#include "ranges.h"
#include "style.h"
#include "parse-util.h"
#include "workbook.h"
#include "workbook-edit.h"
......
......@@ -34,6 +34,7 @@
#include "print-info.h"
#include "global-gnome-font.h"
#include "auto-format.h"
#include "style.h"
#include "color.h"
#include "../plugins/excel/boot.h"
......
......@@ -34,6 +34,7 @@
#include "print-info.h"
#include "global-gnome-font.h"
#include "auto-format.h"
#include "style.h"
#include "color.h"
#include "../plugins/excel/boot.h"
......
......@@ -27,6 +27,8 @@
#include "sheet.h"
#include "value.h"
#include "ranges.h"
#include "cell.h"
#include "expr.h"
#include "number-match.h"
#include <stdlib.h>
......
......@@ -4,7 +4,6 @@
* Author:
* Miguel de Icaza (miguel@gnu.org).
* Michael Meeks (mmeeks@gnu.org).
*
*/
#include <config.h>
#include <stdlib.h>
......@@ -19,6 +18,8 @@
#include "gnumeric.h"
#include "ranges.h"
#include "value.h"
#include "cell.h"
#include "style.h"
#undef RANGE_DEBUG
......
#ifndef GNUMERIC_RANGES_H
#define GNUMERIC_RANGES_H
#include "sheet.h"
#include "expr.h"
#include "cell.h"
#include "style.h"
#include "gnumeric.h"
/**
* range_equal:
......
......@@ -18,6 +18,7 @@
#include "workbook.h"
#include "commands.h"
#include "value.h"
#include "cell.h"
#include "sheet-control-gui.h"
#include "gnumeric-util.h"
......
......@@ -9,7 +9,7 @@
#include <ctype.h>
#include <gnome.h>
#include <string.h>
#include "gnumeric.h"
#include "sheet.h"
#include "parse-util.h"
#include "gnumeric-util.h"
#include "eval.h"
......@@ -18,6 +18,7 @@
#include "selection.h"
#include "ranges.h"
#include "mstyle.h"
#include "expr.h"
#include "main.h"
#include "border.h"
......@@ -775,32 +776,6 @@ required_updates_for_style (MStyle *style)
: SPANCALC_SIMPLE;
}
/**
* sheet_selection_apply_style:
* @sheet: the sheet in which can be found
* @range: the range to which should be applied
* @style: the style
*
* This routine attaches @style to the range, it swallows
* the style reference. Respans and redraws as necessary.
*/
void
sheet_range_apply_style (Sheet *sheet,
const Range *range,
MStyle *style)
{
SpanCalcFlags const spanflags = required_updates_for_style (style);
sheet_style_attach (sheet, range, style);
sheet_style_optimize (sheet, *range);
sheet_range_calc_spans (sheet, *range, spanflags);
if (spanflags != SPANCALC_SIMPLE)
rows_height_update (sheet, range);
sheet_redraw_range (sheet, range);
}
void
sheet_create_styles (Sheet *sheet)
{
......
......@@ -30,6 +30,7 @@
#include "application.h"
#include "commands.h"
#include "cellspan.h"
#include "cell.h"
#include "dependent.h"
#include "sheet-private.h"
#include "expr-name.h"
......@@ -380,6 +381,32 @@ sheet_cell_calc_span (Cell const *cell, SpanCalcFlags flags)
min_col, max_col);
}
/**
* sheet_style_apply_range :
* @sheet: the sheet in which can be found
* @range: the range to which should be applied
* @style: the style
*
* This routine attaches @style to the range, it swallows
* the style reference. Respans and redraws as necessary.
*/
void
sheet_style_apply_range (Sheet *sheet,
const Range *range,
MStyle *style)
{
SpanCalcFlags const spanflags = required_updates_for_style (style);
sheet_style_attach (sheet, range, style);
sheet_style_optimize (sheet, *range);
sheet_range_calc_spans (sheet, *range, spanflags);
if (spanflags != SPANCALC_SIMPLE)
rows_height_update (sheet, range);
sheet_redraw_range (sheet, range);
}
/****************************************************************************/
/**
......
......@@ -203,7 +203,7 @@ void sheet_style_insert_colrow (Sheet *sheet, int pos, int coun
void sheet_style_delete_colrow (Sheet *sheet, int pos, int count,
gboolean is_col);
void sheet_style_relocate (const ExprRelocateInfo *rinfo);
void sheet_range_apply_style (Sheet *sheet, const Range *r,
void sheet_style_apply_range (Sheet *sheet, const Range *r,
MStyle *style);
void sheet_range_set_border (Sheet *sheet, const Range *r,
MStyleBorder **borders);
......
......@@ -18,6 +18,7 @@
#include "workbook-cmd-format.h"
#include "dialogs.h"
#include "format.h"
#include "sheet.h"
#include "commands.h"
struct closure_colrow_resize {
......
......@@ -47,6 +47,7 @@
#include "ranges.h"
#include "history.h"
#include "str.h"
#include "cell.h"
#ifdef ENABLE_BONOBO
#include "sheet-object-container.h"
......
......@@ -17,6 +17,8 @@
#include "workbook-control-gui-priv.h"
#include "workbook-view.h"
#include "workbook.h"
#include "sheet.h"
#include "cell.h"
#include "application.h"
#include "commands.h"
#include "format.h"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment