Commit b2383b2b authored by Morten Welinder's avatar Morten Welinder

Namespace

parent 82d41052
......@@ -4615,7 +4615,7 @@ excel_write_other_v8 (ExcelWriteSheet *esheet,
? g_hash_table_lookup (esheet->widget_macroname, so)
: NULL;
if (IS_CELL_COMMENT (so)) {
if (GNM_IS_CELL_COMMENT (so)) {
static double const offset[4] = { .5, .5, .5, .5 };
GnmRange r;
......@@ -4632,7 +4632,7 @@ excel_write_other_v8 (ExcelWriteSheet *esheet,
g_hash_table_insert (esheet->commentshash,
so, GINT_TO_POINTER (esheet->cur_obj));
} else if (IS_GNM_SO_FILLED (so)) {
} else if (GNM_IS_SO_FILLED (so)) {
gboolean is_oval;
type = MSOT_TEXTBOX;
......@@ -5017,9 +5017,9 @@ excel_write_line_v8 (ExcelWriteSheet *esheet, SheetObject *so)
static gsize
excel_write_obj_v8 (ExcelWriteSheet *esheet, SheetObject *so)
{
if (IS_SHEET_OBJECT_GRAPH (so))
if (GNM_IS_SO_GRAPH (so))
return excel_write_chart_v8 (esheet, so);
if (IS_GNM_SO_LINE (so))
if (GNM_IS_SO_LINE (so))
return excel_write_line_v8 (esheet, so);
return excel_write_other_v8 (esheet, so);
}
......@@ -5799,7 +5799,7 @@ excel_sheet_new (ExcelWriteState *ewb, Sheet *sheet,
SheetObject *so = SHEET_OBJECT (l->data);
gboolean handled = FALSE;
if (IS_SHEET_OBJECT_GRAPH (so)) {
if (GNM_IS_SO_GRAPH (so)) {
/* No derivation for now. */
esheet->graphs = g_slist_prepend (esheet->graphs, so);
esheet->objects =
......@@ -5817,14 +5817,14 @@ excel_sheet_new (ExcelWriteState *ewb, Sheet *sheet,
esheet->objects =
g_slist_prepend (esheet->objects, so);
handled = TRUE;
} else if (IS_CELL_COMMENT (so)) {
} else if (GNM_IS_CELL_COMMENT (so)) {
esheet->comments = g_slist_prepend (esheet->comments,
so);
/* Also an object. Is that right for v7? */
esheet->objects =
g_slist_prepend (esheet->objects, so);
handled = TRUE;
} else if (IS_GNM_SO_FILLED (so)) {
} else if (GNM_IS_SO_FILLED (so)) {
esheet->objects =
g_slist_prepend (esheet->objects, so);
handled = TRUE;
......@@ -5842,7 +5842,7 @@ excel_sheet_new (ExcelWriteState *ewb, Sheet *sheet,
so,
create_macroname (so));
handled = TRUE;
} else if (IS_GNM_SO_LINE (so)) {
} else if (GNM_IS_SO_LINE (so)) {
esheet->objects =
g_slist_prepend (esheet->objects, so);
handled = TRUE;
......
......@@ -143,7 +143,7 @@ static void
xlsx_chart_text_start (GsfXMLIn *xin, G_GNUC_UNUSED xmlChar const **attrs)
{
XLSXReadState *state = (XLSXReadState *)xin->user_state;
if (!GOG_IS_LABEL (state->cur_obj) && IS_SHEET_OBJECT_GRAPH (state->so) && NULL == state->series) { /* Hmm, why? */
if (!GOG_IS_LABEL (state->cur_obj) && GNM_IS_SO_GRAPH (state->so) && NULL == state->series) { /* Hmm, why? */
xlsx_push_text_object (state, "Label");
}
}
......@@ -153,7 +153,7 @@ xlsx_chart_text (GsfXMLIn *xin, G_GNUC_UNUSED GsfXMLBlob *blob)
{
XLSXReadState *state = (XLSXReadState *)xin->user_state;
if (IS_GNM_SO_FILLED (state->so))
if (GNM_IS_SO_FILLED (state->so))
g_object_set (G_OBJECT (state->so), "text", state->chart_tx, NULL);
else if (NULL == state->series) {
if (GOG_IS_LABEL (state->cur_obj)) {
......@@ -1894,7 +1894,7 @@ xlsx_chart_line_headtail (GsfXMLIn *xin, xmlChar const **attrs)
}
}
if (IS_GNM_SO_LINE (state->so)) {
if (GNM_IS_SO_LINE (state->so)) {
GOArrow arrow;
GOStyle const *style = state->cur_style;
double width = style->line.auto_width ? 0 : style->line.width;
......@@ -2185,7 +2185,7 @@ xlsx_ext_gostyle (GsfXMLIn *xin, xmlChar const **attrs)
GOStyle *style = state->cur_style;
GOArrow *start_arrow = NULL;
GOArrow *end_arrow = NULL;
gboolean has_arrow = IS_GNM_SO_LINE (state->so);
gboolean has_arrow = GNM_IS_SO_LINE (state->so);
int rev_gradient = 0;
if (!style)
......
......@@ -1228,7 +1228,7 @@ xlsx_write_drawing_objects (XLSXWriteState *state, GsfOutput *sheet_part,
SheetObject *so = obj->data;
const char *rId1;
if (IS_SHEET_OBJECT_GRAPH (so)) {
if (GNM_IS_SO_GRAPH (so)) {
char *name = g_strdup_printf ("chart%u.xml", ++state->chart_dir.count);
GsfOutput *chart_part = gsf_outfile_new_child_full
(xlsx_dir_get (&state->chart_dir), name, FALSE,
......@@ -1301,7 +1301,7 @@ xlsx_write_drawing_objects (XLSXWriteState *state, GsfOutput *sheet_part,
xlsx_write_object_anchor (xml, &anchor->cell_bound.end, "xdr:to",
res_pts[2], res_pts[3]);
if (IS_SHEET_OBJECT_GRAPH (so)) {
if (GNM_IS_SO_GRAPH (so)) {
char *tmp;
gsf_xml_out_start_element (xml, "xdr:graphicFrame");
......@@ -1347,25 +1347,25 @@ xlsx_write_drawing_objects (XLSXWriteState *state, GsfOutput *sheet_part,
gsf_xml_out_end_element (xml); /* </xdr:graphicFrame> */
} else if (GNM_IS_SO_IMAGE (so)) {
/* What? */
} else if (IS_GNM_SO_LINE (so) ||
IS_GNM_SO_FILLED (so)) {
} else if (GNM_IS_SO_LINE (so) ||
GNM_IS_SO_FILLED (so)) {
GOStyle *style = NULL;
XLSXStyleContext sctx;
xlsx_style_context_init (&sctx, state);
sctx.spPr_ns = "xdr";
sctx.must_fill_line = TRUE;
sctx.must_fill_fill = IS_GNM_SO_FILLED (so);
sctx.must_fill_fill = GNM_IS_SO_FILLED (so);
sctx.flipH = (anchor->base.direction & GOD_ANCHOR_DIR_H_MASK) != GOD_ANCHOR_DIR_RIGHT;
sctx.flipV = (anchor->base.direction & GOD_ANCHOR_DIR_V_MASK) != GOD_ANCHOR_DIR_DOWN;
if (IS_GNM_SO_LINE (so)) {
if (GNM_IS_SO_LINE (so)) {
g_object_get (G_OBJECT (so),
"start-arrow", &sctx.start_arrow,
"end-arrow", &sctx.end_arrow,
NULL);
sctx.shapename = "line";
} else if (IS_GNM_SO_FILLED (so)) {
} else if (GNM_IS_SO_FILLED (so)) {
gboolean oval;
g_object_get (so, "is-oval", &oval, NULL);
sctx.shapename = oval ? "ellipse" : "rect";
......
......@@ -2761,11 +2761,11 @@ xlsx_write_sheet (XLSXWriteState *state, GsfOutfile *wb_part, Sheet *sheet)
g_hash_table_insert (zorder, so, GINT_TO_POINTER (z));
if (IS_CELL_COMMENT (so))
if (GNM_IS_CELL_COMMENT (so))
comments = g_slist_prepend (comments, so);
else if (IS_SHEET_OBJECT_GRAPH (so) ||
IS_GNM_SO_LINE (so) ||
IS_GNM_SO_FILLED (so) ||
else if (GNM_IS_SO_GRAPH (so) ||
GNM_IS_SO_LINE (so) ||
GNM_IS_SO_FILLED (so) ||
GNM_IS_SO_IMAGE (so))
drawing_objs = g_slist_prepend (drawing_objs, so);
else if (GNM_IS_SOW_SCROLLBAR (so) || GNM_IS_SOW_SLIDER (so) ||
......
......@@ -8189,7 +8189,7 @@ od_draw_object (GsfXMLIn *xin, xmlChar const **attrs)
int i;
if (state->chart.so != NULL) {
if (IS_SHEET_OBJECT_GRAPH (state->chart.so))
if (GNM_IS_SO_GRAPH (state->chart.so))
/* Only one object per frame! */
return;
/* We prefer objects over images etc. */
......
......@@ -3037,7 +3037,7 @@ odf_write_image (GnmOOExport *state, SheetObject *so, char const *name)
static void
odf_write_frame (GnmOOExport *state, SheetObject *so)
{
if (IS_SHEET_OBJECT_GRAPH (so))
if (GNM_IS_SO_GRAPH (so))
odf_write_graph (state, so, g_hash_table_lookup (state->graphs, so));
else if (GNM_IS_SO_IMAGE (so)) {
gsf_xml_out_start_element (state->xml, DRAW "frame");
......@@ -3253,13 +3253,13 @@ odf_write_objects (GnmOOExport *state, GSList *objects)
continue;
if (id != NULL)
odf_write_control (state, so, id);
else if (IS_CELL_COMMENT (so))
else if (GNM_IS_CELL_COMMENT (so))
odf_write_comment (state, CELL_COMMENT (so));
else if (IS_GNM_SO_FILLED (so))
else if (GNM_IS_SO_FILLED (so))
odf_write_so_filled (state, so);
else if (IS_GNM_SO_LINE (so))
else if (GNM_IS_SO_LINE (so))
odf_write_line (state, so);
else if (IS_GNM_SO_PATH (so))
else if (GNM_IS_SO_PATH (so))
odf_write_custom_shape (state, so);
else
odf_write_frame (state, so);
......
......@@ -5707,7 +5707,7 @@ cmd_object_raise (WorkbookControl *wbc, SheetObject *so, CmdObjectRaiseSelector
{
CmdObjectRaise *me;
g_return_val_if_fail (IS_SHEET_OBJECT (so), TRUE);
g_return_val_if_fail (GNM_IS_SO (so), TRUE);
me = g_object_new (CMD_OBJECT_RAISE_TYPE, NULL);
......@@ -6877,7 +6877,7 @@ cmd_so_graph_config (WorkbookControl *wbc, SheetObject *so,
CmdSOGraphConfig *me;
g_return_val_if_fail (IS_WORKBOOK_CONTROL (wbc), TRUE);
g_return_val_if_fail (IS_SHEET_OBJECT_GRAPH (so), TRUE);
g_return_val_if_fail (GNM_IS_SO_GRAPH (so), TRUE);
g_return_val_if_fail (GOG_IS_GRAPH (n_graph), TRUE);
g_return_val_if_fail (GOG_IS_GRAPH (o_graph), TRUE);
......@@ -6949,7 +6949,7 @@ cmd_so_component_config (WorkbookControl *wbc, SheetObject *so,
CmdSOComponentConfig *me;
g_return_val_if_fail (IS_WORKBOOK_CONTROL (wbc), TRUE);
g_return_val_if_fail (IS_SHEET_OBJECT_COMPONENT (so), TRUE);
g_return_val_if_fail (GNM_IS_SO_COMPONENT (so), TRUE);
g_return_val_if_fail (GO_IS_COMPONENT (n_obj), TRUE);
g_return_val_if_fail (GO_IS_COMPONENT (o_obj), TRUE);
......
......@@ -2599,7 +2599,7 @@ gnm_pane_object_start_resize (GnmPane *pane, int button, guint64 x, gint64 y,
GocItem **ctrl_pts;
GdkEvent *event;
g_return_if_fail (IS_SHEET_OBJECT (so));
g_return_if_fail (GNM_IS_SO (so));
g_return_if_fail (0 <= drag_type);
g_return_if_fail (drag_type < 9);
......
......@@ -7,7 +7,7 @@
G_BEGIN_DECLS
#define GNM_SO_FILLED_TYPE (gnm_so_filled_get_type ())
#define IS_GNM_SO_FILLED(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), GNM_SO_FILLED_TYPE))
#define GNM_IS_SO_FILLED(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), GNM_SO_FILLED_TYPE))
GType gnm_so_filled_get_type (void);
G_END_DECLS
......
......@@ -7,7 +7,7 @@
G_BEGIN_DECLS
#define GNM_SO_LINE_TYPE (gnm_so_line_get_type ())
#define IS_GNM_SO_LINE(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), GNM_SO_LINE_TYPE))
#define GNM_IS_SO_LINE(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), GNM_SO_LINE_TYPE))
GType gnm_so_line_get_type (void);
G_END_DECLS
......
......@@ -195,7 +195,7 @@ static void
gnm_so_path_user_config (SheetObject *so, SheetControl *sc)
{
GnmSOPath *sop = GNM_SO_PATH (so);
dialog_so_styled (scg_wbcg (SHEET_CONTROL_GUI (sc)), G_OBJECT (so),
dialog_so_styled (scg_wbcg (SHEET_CONTROL_GUI (sc)), G_OBJECT (sop),
sop_default_style (),
_("Filled Object Properties"),
SO_STYLED_TEXT);
......@@ -203,8 +203,8 @@ gnm_so_path_user_config (SheetObject *so, SheetControl *sc)
static void
cb_gnm_so_path_changed (GnmSOPath const *sop,
G_GNUC_UNUSED GParamSpec *pspec,
GnmSOPathView *group)
G_GNUC_UNUSED GParamSpec *pspec,
GnmSOPathView *group)
{
GList *ptr = GOC_GROUP (group)->children;
for (; ptr && ptr->data; ptr = ptr->next)
......
......@@ -27,7 +27,7 @@
G_BEGIN_DECLS
#define GNM_SO_PATH_TYPE (gnm_so_path_get_type ())
#define IS_GNM_SO_PATH(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), GNM_SO_PATH_TYPE))
#define GNM_IS_SO_PATH(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), GNM_SO_PATH_TYPE))
GType gnm_so_path_get_type (void);
G_END_DECLS
......
......@@ -863,7 +863,7 @@ pdf_export (GOFileSaver const *fs, GOIOContext *context,
if (objects && objects->len > 0) {
gpointer object_fit = g_object_get_data (G_OBJECT (wb), "pdf-object-fit");
if (object_fit != NULL && GPOINTER_TO_INT (object_fit) == 1
&& IS_SHEET_OBJECT_GRAPH (g_ptr_array_index (objects, 0))) {
&& GNM_IS_SO_GRAPH (g_ptr_array_index (objects, 0))) {
GError *err = NULL;
sheet_object_write_image (g_ptr_array_index (objects, 0), "pdf", 150., output, &err);
if (err != NULL) {
......
......@@ -3076,7 +3076,7 @@ scg_comment_display (SheetControlGUI *scg, GnmComment *cc,
else if (scg->comment.selected != cc)
scg_comment_unselect (scg, scg->comment.selected);
g_return_if_fail (IS_CELL_COMMENT (cc));
g_return_if_fail (GNM_IS_CELL_COMMENT (cc));
if (scg->comment.item == NULL) {
GtkWidget *label, *box;
......
......@@ -397,7 +397,7 @@ GSF_CLASS (GnmComment, cell_comment,
char const *
cell_comment_author_get (GnmComment const *cc)
{
g_return_val_if_fail (IS_CELL_COMMENT (cc), NULL);
g_return_val_if_fail (GNM_IS_CELL_COMMENT (cc), NULL);
return cc->author;
}
......@@ -405,7 +405,7 @@ void
cell_comment_author_set (GnmComment *cc, char const *author)
{
char *tmp;
g_return_if_fail (IS_CELL_COMMENT (cc));
g_return_if_fail (GNM_IS_CELL_COMMENT (cc));
tmp = g_strdup (author);
g_free (cc->author);
......@@ -415,7 +415,7 @@ cell_comment_author_set (GnmComment *cc, char const *author)
char const *
cell_comment_text_get (GnmComment const *cc)
{
g_return_val_if_fail (IS_CELL_COMMENT (cc), NULL);
g_return_val_if_fail (GNM_IS_CELL_COMMENT (cc), NULL);
return cc->text;
}
......@@ -423,7 +423,7 @@ void
cell_comment_text_set (GnmComment *cc, char const *text)
{
char *tmp;
g_return_if_fail (IS_CELL_COMMENT (cc));
g_return_if_fail (GNM_IS_CELL_COMMENT (cc));
tmp = g_strdup (text);
g_free (cc->text);
......@@ -439,7 +439,7 @@ cell_comment_set_pos (GnmComment *cc, GnmCellPos const *pos)
SheetObjectAnchor anchor;
GnmRange r;
g_return_if_fail (IS_CELL_COMMENT (cc));
g_return_if_fail (GNM_IS_CELL_COMMENT (cc));
r.start = r.end = *pos;
sheet_object_anchor_init (&anchor, &r, a_offsets,
......
......@@ -9,7 +9,7 @@ G_BEGIN_DECLS
#define CELL_COMMENT_TYPE (cell_comment_get_type ())
#define CELL_COMMENT(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), CELL_COMMENT_TYPE, GnmComment))
#define CELL_COMMENT_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), CELL_COMMENT_TYPE, CellCommentClass))
#define IS_CELL_COMMENT(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), CELL_COMMENT_TYPE))
#define GNM_IS_CELL_COMMENT(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), CELL_COMMENT_TYPE))
GType cell_comment_get_type (void);
......
......@@ -471,7 +471,7 @@ sheet_object_component_new (GOComponent *component)
GOComponent*
sheet_object_component_get_component (SheetObject *soc)
{
g_return_val_if_fail (IS_SHEET_OBJECT_COMPONENT (soc), NULL);
g_return_val_if_fail (GNM_IS_SO_COMPONENT (soc), NULL);
return ((SheetObjectComponent *) soc)->component;
}
......@@ -483,7 +483,7 @@ sheet_object_component_set_component (SheetObject *so, GOComponent *component)
GList *l = so->realized_list;
GnmPane *pane = (l && l->data)? GNM_PANE (GOC_ITEM (l->data)->canvas): NULL;
g_return_if_fail (IS_SHEET_OBJECT_COMPONENT (so));
g_return_if_fail (GNM_IS_SO_COMPONENT (so));
soc = SHEET_OBJECT_COMPONENT (so);
if (soc->component != NULL) {
go_component_stop_editing (soc->component);
......
......@@ -30,7 +30,7 @@
G_BEGIN_DECLS
#define SHEET_OBJECT_COMPONENT_TYPE (sheet_object_component_get_type ())
#define IS_SHEET_OBJECT_COMPONENT(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), SHEET_OBJECT_COMPONENT_TYPE))
#define GNM_IS_SO_COMPONENT(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), SHEET_OBJECT_COMPONENT_TYPE))
#define SHEET_OBJECT_COMPONENT(o) (G_TYPE_CHECK_INSTANCE_CAST((o), SHEET_OBJECT_COMPONENT_TYPE, SheetObjectComponent))
GType sheet_object_component_get_type (void);
......
......@@ -637,7 +637,7 @@ sheet_object_graph_new (GogGraph *graph)
GogGraph *
sheet_object_graph_get_gog (SheetObject *sog)
{
g_return_val_if_fail (IS_SHEET_OBJECT_GRAPH (sog), NULL);
g_return_val_if_fail (GNM_IS_SO_GRAPH (sog), NULL);
return ((SheetObjectGraph *)sog)->graph;
}
......@@ -656,7 +656,7 @@ sheet_object_graph_set_gog (SheetObject *so, GogGraph *graph)
{
SheetObjectGraph *sog = SHEET_OBJECT_GRAPH (so);
g_return_if_fail (IS_SHEET_OBJECT_GRAPH (so));
g_return_if_fail (GNM_IS_SO_GRAPH (so));
if (graph != NULL) {
if (sog->graph == graph)
......
......@@ -9,7 +9,7 @@
G_BEGIN_DECLS
#define SHEET_OBJECT_GRAPH_TYPE (sheet_object_graph_get_type ())
#define IS_SHEET_OBJECT_GRAPH(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), SHEET_OBJECT_GRAPH_TYPE))
#define GNM_IS_SO_GRAPH(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), SHEET_OBJECT_GRAPH_TYPE))
#define SHEET_OBJECT_GRAPH(o) (G_TYPE_CHECK_INSTANCE_CAST((o), SHEET_OBJECT_GRAPH_TYPE, SheetObjectGraph))
GType sheet_object_graph_get_type (void);
......
......@@ -166,7 +166,7 @@ sheet_object_get_editor (SheetObject *so, SheetControl *sc)
{
WBCGtk *wbcg;
g_return_if_fail (IS_SHEET_OBJECT (so));
g_return_if_fail (GNM_IS_SO (so));
g_return_if_fail (SO_CLASS (so));
g_return_if_fail (IS_SHEET_CONTROL_GUI (sc));
......@@ -197,7 +197,7 @@ cb_so_copy (SheetObject *so, SheetControl *sc)
gboolean
sheet_object_can_print (SheetObject const *so)
{
g_return_val_if_fail (IS_SHEET_OBJECT (so), FALSE);
g_return_val_if_fail (GNM_IS_SO (so), FALSE);
return (so->flags & SHEET_OBJECT_IS_VISIBLE) &&
(so->flags & SHEET_OBJECT_PRINT) &&
SO_CLASS (so)->draw_cairo != NULL;
......@@ -206,21 +206,21 @@ sheet_object_can_print (SheetObject const *so)
gboolean
sheet_object_can_resize (SheetObject const *so)
{
g_return_val_if_fail (IS_SHEET_OBJECT (so), FALSE);
g_return_val_if_fail (GNM_IS_SO (so), FALSE);
return so->flags & SHEET_OBJECT_CAN_RESIZE;
}
gboolean
sheet_object_can_edit (SheetObject const *so)
{
g_return_val_if_fail (IS_SHEET_OBJECT (so), FALSE);
g_return_val_if_fail (GNM_IS_SO (so), FALSE);
return so->flags & SHEET_OBJECT_CAN_EDIT;
}
static gboolean
sheet_object_can_prop (SheetObject const *so)
{
g_return_val_if_fail (IS_SHEET_OBJECT (so), FALSE);
g_return_val_if_fail (GNM_IS_SO (so), FALSE);
return (sheet_object_can_edit (so) && (SO_CLASS(so)->user_config != NULL));
}
......@@ -443,7 +443,7 @@ sheet_object_get_view (SheetObject const *so, SheetObjectViewContainer *containe
{
GList *l;
g_return_val_if_fail (IS_SHEET_OBJECT (so), NULL);
g_return_val_if_fail (GNM_IS_SO (so), NULL);
for (l = so->realized_list; l; l = l->next) {
SheetObjectView *view = SHEET_OBJECT_VIEW (l->data);
......@@ -470,7 +470,7 @@ sheet_object_update_bounds (SheetObject *so, GnmCellPos const *pos)
gboolean is_hidden = TRUE;
int i, end;
g_return_if_fail (IS_SHEET_OBJECT (so));
g_return_if_fail (GNM_IS_SO (so));
if (pos != NULL &&
so->anchor.cell_bound.end.col < pos->col &&
......@@ -507,7 +507,7 @@ sheet_object_update_bounds (SheetObject *so, GnmCellPos const *pos)
Sheet *
sheet_object_get_sheet (SheetObject const *so)
{
g_return_val_if_fail (IS_SHEET_OBJECT (so), NULL);
g_return_val_if_fail (GNM_IS_SO (so), NULL);
return so->sheet;
}
......@@ -533,7 +533,7 @@ cb_create_views (SheetObject *so)
gboolean
sheet_object_set_sheet (SheetObject *so, Sheet *sheet)
{
g_return_val_if_fail (IS_SHEET_OBJECT (so), TRUE);
g_return_val_if_fail (GNM_IS_SO (so), TRUE);
g_return_val_if_fail (IS_SHEET (sheet), TRUE);
if (sheet == so->sheet)
......@@ -575,7 +575,7 @@ sheet_object_clear_sheet (SheetObject *so)
GSList *ptr;
gpointer view_handler;
g_return_if_fail (IS_SHEET_OBJECT (so));
g_return_if_fail (GNM_IS_SO (so));
if (so->sheet == NULL) /* already removed */
return;
......@@ -685,7 +685,7 @@ sheet_object_new_view (SheetObject *so, SheetObjectViewContainer *container)
{
SheetObjectView *view;
g_return_val_if_fail (IS_SHEET_OBJECT (so), NULL);
g_return_val_if_fail (GNM_IS_SO (so), NULL);
g_return_val_if_fail (NULL != container, NULL);
view = sheet_object_get_view (so, container);
......@@ -775,7 +775,7 @@ sheet_object_draw_cairo_sized (SheetObject const *so, cairo_t *cr, double width,
GnmRange const *
sheet_object_get_range (SheetObject const *so)
{
g_return_val_if_fail (IS_SHEET_OBJECT (so), NULL);
g_return_val_if_fail (GNM_IS_SO (so), NULL);
return &so->anchor.cell_bound;
}
......@@ -789,7 +789,7 @@ sheet_object_get_range (SheetObject const *so)
SheetObjectAnchor const *
sheet_object_get_anchor (SheetObject const *so)
{
g_return_val_if_fail (IS_SHEET_OBJECT (so), NULL);
g_return_val_if_fail (GNM_IS_SO (so), NULL);
return &so->anchor;
}
......@@ -797,7 +797,7 @@ sheet_object_get_anchor (SheetObject const *so)
void
sheet_object_set_anchor (SheetObject *so, SheetObjectAnchor const *anchor)
{
g_return_if_fail (IS_SHEET_OBJECT (so));
g_return_if_fail (GNM_IS_SO (so));
so->anchor = *anchor;
if (so->sheet != NULL) {
......@@ -831,7 +831,7 @@ cell_offset_calc_pt (Sheet const *sheet, int i, gboolean is_col, double offset)
void
sheet_object_default_size (SheetObject *so, double *w, double *h)
{
g_return_if_fail (IS_SHEET_OBJECT (so));
g_return_if_fail (GNM_IS_SO (so));
g_return_if_fail (w != NULL);
g_return_if_fail (h != NULL);
......@@ -849,7 +849,7 @@ sheet_object_default_size (SheetObject *so, double *w, double *h)
void
sheet_object_position_pts_get (SheetObject const *so, double *coords)
{
g_return_if_fail (IS_SHEET_OBJECT (so));
g_return_if_fail (GNM_IS_SO (so));
sheet_object_anchor_to_pts (&so->anchor, so->sheet, coords);
}
......
......@@ -27,7 +27,7 @@ GType sheet_object_anchor_get_type (void); /* Boxed type */
#define SHEET_OBJECT_TYPE (sheet_object_get_type ())
#define SHEET_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), SHEET_OBJECT_TYPE, SheetObject))
#define IS_SHEET_OBJECT(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), SHEET_OBJECT_TYPE))
#define GNM_IS_SO(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), SHEET_OBJECT_TYPE))
GType sheet_object_get_type (void);
#define SHEET_OBJECT_IMAGEABLE_TYPE (sheet_object_imageable_get_type ())
......
......@@ -211,7 +211,7 @@ ssindex (char const *file, GOIOContext *ioc)
gsf_xml_out_simple_element (state.output,
"data", str);
g_free (str);
} else if (IS_SHEET_OBJECT_GRAPH (obj))
} else if (GNM_IS_SO_GRAPH (obj))
ssindex_chart (&state,
(GogObject *)sheet_object_graph_get_gog (SHEET_OBJECT (obj)));
}
......
......@@ -1034,7 +1034,7 @@ wbcg_insert_object (WBCGtk *wbcg, SheetObject *so)
SheetControlGUI *scg;
g_return_if_fail (IS_WBC_GTK (wbcg));
g_return_if_fail (IS_SHEET_OBJECT (so));
g_return_if_fail (GNM_IS_SO (so));
wbcg_insert_object_clear (wbcg);
......
......@@ -1230,7 +1230,7 @@ xml_write_objects (GnmOutputXML *state, GSList *objects)
if (klass == NULL || klass->write_xml_sax == NULL)
continue;
if (IS_CELL_COMMENT (so))
if (GNM_IS_CELL_COMMENT (so))
without_zorder = g_slist_prepend (without_zorder, so);
else
with_zorder = g_slist_prepend (with_zorder, so);
......
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