1 /* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2 #ifndef _GNM_WORKBOOK_PRIV_H_
3 # define _GNM_WORKBOOK_PRIV_H_
6 #include <goffice/goffice.h>
16 GHashTable
*sheet_hash_private
;
17 GHashTable
*sheet_order_dependents
;
18 GHashTable
*sheet_local_functions
;
20 gboolean is_placeholder
;
22 GOFileFormatLevel file_format_level
;
23 GOFileFormatLevel file_export_format_level
;
24 GOFileSaver
*file_saver
;
25 GOFileSaver
*file_exporter
;
26 char *last_export_uri
;
29 GSList
*undo_commands
;
30 GSList
*redo_commands
;
32 GnmNamedExprCollection
*names
;
34 /* Calculation options */
41 GODateConventions
const *date_conv
;
43 gboolean during_destruction
;
44 gboolean being_reordered
;
45 gboolean recursive_dirty_enabled
;
51 void (*sheet_order_changed
) (Workbook
*wb
);
52 void (*sheet_added
) (Workbook
*wb
);
53 void (*sheet_deleted
) (Workbook
*wb
);
56 #define WORKBOOK_FOREACH_VIEW(wb, view, code) \
59 GPtrArray *wb_views = (wb)->wb_views; \
60 if (wb_views != NULL) /* Reverse is important during destruction */ \
61 for (InD = wb_views->len; InD-- > 0; ) { \
62 WorkbookView *view = g_ptr_array_index (wb_views, InD); \
67 #define WORKBOOK_FOREACH_CONTROL(wb, view, control, code) \
68 WORKBOOK_FOREACH_VIEW((wb), view, \
69 WORKBOOK_VIEW_FOREACH_CONTROL(view, control, code);)
72 * Walk the dependents. WARNING: Note, that it is only valid to muck with
73 * the current dependency in the code.
75 #define WORKBOOK_FOREACH_DEPENDENT(wb, dep, code) \
77 /* Maybe external deps here. */ \
79 WORKBOOK_FOREACH_SHEET(wb, _wfd_sheet, { \
80 SHEET_FOREACH_DEPENDENT (_wfd_sheet, dep, code); \
86 #endif /* _GNM_WORKBOOK_PRIV_H_ */