2 # define _GNM_FORMAT_H_
5 #include <goffice/goffice.h>
6 #include <pango/pango.h>
10 char *format_value (GOFormat
const *format
,
11 GnmValue
const *value
,
13 GODateConventions
const *date_conv
);
15 GOFormatNumberError
format_value_gstring (GString
*str
,
16 GOFormat
const *format
,
17 GnmValue
const *value
,
19 GODateConventions
const *date_conv
);
20 GOFormatNumberError
format_value_layout (PangoLayout
*layout
,
21 GOFormat
const *format
,
22 GnmValue
const *value
,
24 GODateConventions
const *date_conv
);
26 GOFormatNumberError
gnm_format_layout (PangoLayout
*result
,
27 GOFontMetrics
*metrics
,
28 GOFormat
const *format
,
29 GnmValue
const *value
,
31 GODateConventions
const *date_conv
,
32 gboolean unicode_minus
);
34 GOFormat
const * gnm_format_specialize (GOFormat
const *fmt
,
35 GnmValue
const *value
);
37 int gnm_format_is_date_for_value (GOFormat
const *fmt
,
38 GnmValue
const *value
);
39 int gnm_format_is_time_for_value (GOFormat
const *fmt
,
40 GnmValue
const *value
);
42 int gnm_format_month_before_day (GOFormat
const *fmt
,
43 GnmValue
const *value
);
45 char *gnm_format_frob_slashes (const char *s
);
47 GOFormat
*gnm_format_for_date_editing (GnmCell
const *cell
);
49 gboolean
gnm_format_has_hour (GOFormat
const *fmt
,
50 GnmValue
const *value
);
53 GNM_FORMAT_IMPORT_NULL_INVALID
,
54 GNM_FORMAT_IMPORT_PATCHUP_INCOMPLETE
55 } GnmFormatImportFlags
;
57 GOFormat
*gnm_format_import (const char *fmt
,
58 GnmFormatImportFlags flags
);
61 * http://www.unicode.org/charts/PDF/U0080.pdf
62 * http://www.unicode.org/charts/PDF/U2000.pdf
63 * http://www.unicode.org/charts/PDF/U20A0.pdf
64 * http://www.unicode.org/charts/PDF/U2200.pdf
66 #define UNICODE_LOGICAL_NOT_C 0x00AC
67 #define UNICODE_ZERO_WIDTH_SPACE_C 0X200B
68 #define UNICODE_ZERO_WIDTH_SPACE_C_UTF8_LENGTH 3
69 #define UNICODE_EURO_SIGN_C 0x20AC
70 #define UNICODE_MINUS_SIGN_C 0x2212
71 #define UNICODE_DIVISION_SLASH_C 0x2215
72 #define UNICODE_LOGICAL_AND_C 0x2227
73 #define UNICODE_LOGICAL_OR_C 0x2228
74 #define UNICODE_NOT_EQUAL_TO_C 0x2260
75 #define UNICODE_LESS_THAN_OR_EQUAL_TO_C 0x2264
76 #define UNICODE_GREATER_THAN_OR_EQUAL_TO_C 0x2265
80 #endif /* _GNM_FORMAT_H_ */