1 #ifndef _GNM_WORKBOOK_PRIV_H_
2 # define _GNM_WORKBOOK_PRIV_H_
5 #include <goffice/goffice.h>
15 GHashTable
*sheet_hash_private
;
16 GHashTable
*sheet_order_dependents
;
17 GHashTable
*sheet_local_functions
;
19 gboolean is_placeholder
;
21 GOFileFormatLevel file_format_level
;
22 GOFileFormatLevel file_export_format_level
;
23 GOFileSaver
*file_saver
;
24 GOFileSaver
*file_exporter
;
25 char *last_export_uri
;
28 GSList
*undo_commands
;
29 GSList
*redo_commands
;
31 GnmNamedExprCollection
*names
;
33 /* Calculation options */
40 GODateConventions
const *date_conv
;
42 gboolean during_destruction
;
43 gboolean being_reordered
;
44 gboolean recursive_dirty_enabled
;
50 void (*sheet_order_changed
) (Workbook
*wb
);
51 void (*sheet_added
) (Workbook
*wb
);
52 void (*sheet_deleted
) (Workbook
*wb
);
55 #define WORKBOOK_FOREACH_VIEW(wb, view, code) \
58 GPtrArray *wb_views = (wb)->wb_views; \
59 if (wb_views != NULL) /* Reverse is important during destruction */ \
60 for (InD = wb_views->len; InD-- > 0; ) { \
61 WorkbookView *view = g_ptr_array_index (wb_views, InD); \
66 #define WORKBOOK_FOREACH_CONTROL(wb, view, control, code) \
67 WORKBOOK_FOREACH_VIEW((wb), view, \
68 WORKBOOK_VIEW_FOREACH_CONTROL(view, control, code);)
71 * Walk the dependents. WARNING: Note, that it is only valid to muck with
72 * the current dependency in the code.
74 #define WORKBOOK_FOREACH_DEPENDENT(wb, dep, code) \
76 /* Maybe external deps here. */ \
78 WORKBOOK_FOREACH_SHEET(wb, _wfd_sheet, { \
79 SHEET_FOREACH_DEPENDENT (_wfd_sheet, dep, code); \
85 #endif /* _GNM_WORKBOOK_PRIV_H_ */