projects
/
pspp
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
d523d6f
)
output: Rename a few struct members for consistency.
author
Ben Pfaff
<blp@cs.stanford.edu>
Wed, 26 Dec 2018 22:14:51 +0000
(14:14 -0800)
committer
Ben Pfaff
<blp@cs.stanford.edu>
Tue, 1 Jan 2019 06:19:40 +0000
(22:19 -0800)
src/output/cairo.c
patch
|
blob
|
history
src/output/table-provider.h
patch
|
blob
|
history
src/output/table.c
patch
|
blob
|
history
src/output/text-item.c
patch
|
blob
|
history
src/output/text-item.h
patch
|
blob
|
history
diff --git
a/src/output/cairo.c
b/src/output/cairo.c
index 32369a7a0e5071e609cfbf863fc3981e676c8d8a..4584181d32a3a779365e7993682010c2231fe544 100644
(file)
--- a/
src/output/cairo.c
+++ b/
src/output/cairo.c
@@
-1225,11
+1225,11
@@
xr_layout_cell_text (struct xr_driver *xr, const struct table_cell *cell,
: options & TAB_EMPH ? &xr->fonts[XR_FONT_EMPHASIS]
: &xr->fonts[XR_FONT_PROPORTIONAL]);
struct xr_font local_font;
: options & TAB_EMPH ? &xr->fonts[XR_FONT_EMPHASIS]
: &xr->fonts[XR_FONT_PROPORTIONAL]);
struct xr_font local_font;
- if (cell->style->
font
)
+ if (cell->style->
typeface
)
{
PangoFontDescription *desc = parse_font (
{
PangoFontDescription *desc = parse_font (
- style->
font
,
- style->
font_size ? style->font_
size * 1000 * 72 / 128 : 10000,
+ style->
typeface
,
+ style->
size ? style->
size * 1000 * 72 / 128 : 10000,
style->bold, style->italic);
if (desc)
{
style->bold, style->italic);
if (desc)
{
diff --git
a/src/output/table-provider.h
b/src/output/table-provider.h
index 14c3656e4a2958b02c5dcf27e03138919f4a312a..ab39b4b25c5fc7d1e848726a98b1e457ca0feda2 100644
(file)
--- a/
src/output/table-provider.h
+++ b/
src/output/table-provider.h
@@
-50,8
+50,8
@@
struct cell_style
{
struct cell_color fg[2], bg[2];
int margin[TABLE_N_AXES][2];
{
struct cell_color fg[2], bg[2];
int margin[TABLE_N_AXES][2];
- char *
font
;
- int
font_
size;
+ char *
typeface
;
+ int size;
bool bold, italic, underline;
};
bool bold, italic, underline;
};
@@
-61,8
+61,8
@@
struct cell_style
.bg = { [0] = CELL_COLOR_WHITE, [1] = CELL_COLOR_WHITE}, \
.margin = { [TABLE_HORZ][0] = 8, [TABLE_HORZ][1] = 11, \
[TABLE_VERT][0] = 1, [TABLE_VERT][1] = 1 }, \
.bg = { [0] = CELL_COLOR_WHITE, [1] = CELL_COLOR_WHITE}, \
.margin = { [TABLE_HORZ][0] = 8, [TABLE_HORZ][1] = 11, \
[TABLE_VERT][0] = 1, [TABLE_VERT][1] = 1 }, \
- .
font = NULL,
\
- .
font_size = 0,
\
+ .
typeface = NULL,
\
+ .
size = 0,
\
.bold = false, \
.italic = false, \
.underline = false, \
.bold = false, \
.italic = false, \
.underline = false, \
diff --git
a/src/output/table.c
b/src/output/table.c
index b83d66fb20898ccf6148198cb61dc114e9a06f07..f909bf3ade90f925be4b13f70762a8a3ee0c8c1b 100644
(file)
--- a/
src/output/table.c
+++ b/
src/output/table.c
@@
-135,8
+135,8
@@
cell_style_clone (struct pool *pool, const struct cell_style *old)
{
struct cell_style *new = pool_malloc (pool, sizeof *new);
*new = *old;
{
struct cell_style *new = pool_malloc (pool, sizeof *new);
*new = *old;
- if (new->
font
)
- new->
font = pool_strdup (pool, new->font
);
+ if (new->
typeface
)
+ new->
typeface = pool_strdup (pool, new->typeface
);
return new;
}
return new;
}
@@
-145,7
+145,7
@@
cell_style_free (struct cell_style *style)
{
if (style)
{
{
if (style)
{
- free (style->
font
);
+ free (style->
typeface
);
free (style);
}
}
free (style);
}
}
diff --git
a/src/output/text-item.c
b/src/output/text-item.c
index 231a5c1fb7e87008160f03b8433f58880115421d..5b18e54c5d4618c693865fb5e9d624accc8ef852 100644
(file)
--- a/
src/output/text-item.c
+++ b/
src/output/text-item.c
@@
-101,9
+101,9
@@
text_item_to_table_item (struct text_item *text_item)
struct cell_style *style = pool_alloc (tab->container, sizeof *style);
*style = (struct cell_style) CELL_STYLE_INITIALIZER;
struct cell_style *style = pool_alloc (tab->container, sizeof *style);
*style = (struct cell_style) CELL_STYLE_INITIALIZER;
- if (text_item->
font
)
- style->
font = pool_strdup (tab->container, text_item->font
);
- style->
font_size = text_item->font_
size;
+ if (text_item->
typeface
)
+ style->
typeface = pool_strdup (tab->container, text_item->typeface
);
+ style->
size = text_item->
size;
style->bold = text_item->bold;
style->italic = text_item->italic;
style->underline = text_item->underline;
style->bold = text_item->bold;
style->italic = text_item->italic;
style->underline = text_item->underline;
@@
-118,13
+118,14
@@
text_item_to_table_item (struct text_item *text_item)
struct table_item *table_item = table_item_create (&tab->table, NULL, NULL);
text_item_unref (text_item);
return table_item;
struct table_item *table_item = table_item_create (&tab->table, NULL, NULL);
text_item_unref (text_item);
return table_item;
-}
\f
+}
+
\f
static void
text_item_destroy (struct output_item *output_item)
{
struct text_item *item = to_text_item (output_item);
free (item->text);
static void
text_item_destroy (struct output_item *output_item)
{
struct text_item *item = to_text_item (output_item);
free (item->text);
- free (item->
font
);
+ free (item->
typeface
);
free (item);
}
free (item);
}
diff --git
a/src/output/text-item.h
b/src/output/text-item.h
index 659a28bd0f8bf418da8433e14d909df5e1d32236..a8f1e493e92fdb7382c91d947d1fe59b6ed62479 100644
(file)
--- a/
src/output/text-item.h
+++ b/
src/output/text-item.h
@@
-50,8
+50,8
@@
struct text_item
struct output_item output_item;
char *text; /* The content. */
enum text_item_type type; /* Type. */
struct output_item output_item;
char *text; /* The content. */
enum text_item_type type; /* Type. */
- char *
font
;
- int
font_
size;
+ char *
typeface
;
+ int size;
bool bold, italic, underline, markup;
};
bool bold, italic, underline, markup;
};