[F] Fixed separator style

This commit is contained in:
seleznevae
2018-11-15 23:14:18 +03:00
parent f62eb92597
commit 50774eb359
7 changed files with 167 additions and 8 deletions

View File

@@ -922,6 +922,7 @@ static void set_border_props_for_props(fort_table_properties_t *properties, cons
}
SEP_CHARS[LH_sip] = SEP_CHARS[RH_sip] = SEP_CHARS[II_sip] = header_border_chs->out_intersect_ch;
SEP_CHARS[TI_sip] = SEP_CHARS[BI_sip] = header_border_chs->out_intersect_ch;
SEP_CHARS[IH_sip] = style->hor_separator_char;

View File

@@ -523,6 +523,7 @@ fort_status_t set_default_cell_property(uint32_t property, int value)
/* separator_chars */ \
{ \
"+", "-", "+", "+", \
"+", "+", \
}, \
}
@@ -546,6 +547,7 @@ fort_status_t set_default_cell_property(uint32_t property, int value)
/* separator_chars */ \
{ \
"+", "-", "+", "+", \
"+", "+", \
}, \
}
@@ -569,6 +571,7 @@ fort_status_t set_default_cell_property(uint32_t property, int value)
/* separator_chars */ \
{ \
" ", "-", " ", " ", \
" ", " ", \
}, \
}
@@ -592,6 +595,7 @@ fort_status_t set_default_cell_property(uint32_t property, int value)
/* separator_chars */ \
{ \
" ", "-", "-", " ", \
"-", "-", \
}, \
}
@@ -615,6 +619,7 @@ fort_status_t set_default_cell_property(uint32_t property, int value)
/* separator_chars */ \
{ \
":", ".", ":", ":", \
":", ":", \
}, \
}
@@ -638,6 +643,7 @@ fort_status_t set_default_cell_property(uint32_t property, int value)
/* separator_chars */ \
{ \
" ", " ", " ", " ", \
" ", " ", \
}, \
}
@@ -662,6 +668,7 @@ fort_status_t set_default_cell_property(uint32_t property, int value)
/* separator_chars */ \
{ \
"├", "─", "┼", "┤", \
"┬", "┴", \
}, \
}
@@ -685,6 +692,7 @@ fort_status_t set_default_cell_property(uint32_t property, int value)
/* separator_chars */ \
{ \
"├", "─", "┼", "┤", \
"┬", "┴", \
}, \
}
@@ -709,6 +717,7 @@ fort_status_t set_default_cell_property(uint32_t property, int value)
/* separator_chars */ \
{ \
"╠", "═", "╬", "╣", \
"╦", "╩", \
}, \
}
@@ -733,6 +742,7 @@ fort_status_t set_default_cell_property(uint32_t property, int value)
/* separator_chars */ \
{ \
"╠", "═", "╪", "╣", \
"╤", "╧", \
}, \
}
@@ -757,6 +767,7 @@ fort_status_t set_default_cell_property(uint32_t property, int value)
/* separator_chars */ \
{ \
"┣", "━", "╋", "┫", \
"┳", "┻", \
}, \
}
@@ -780,6 +791,7 @@ fort_status_t set_default_cell_property(uint32_t property, int value)
/* separator_chars */ \
{ \
"┣", "━", "┿", "┫", \
"┯", "┷", \
}, \
}
@@ -803,6 +815,7 @@ fort_status_t set_default_cell_property(uint32_t property, int value)
/* separator_chars */ \
{ \
"▌", "━", "╋", "▐", \
"╋", "╋", \
}, \
}

View File

@@ -142,6 +142,9 @@ enum SeparatorItemPos {
II_sip = 2,
RH_sip = 3,
TI_sip = 4,
BI_sip = 5,
SepratorItemPosSize
};

View File

@@ -306,9 +306,17 @@ int print_row_separator(char *buffer, size_t buffer_sz,
IV = &(context->table_properties->border_style.separator_chars[II_sip]);
R = &(context->table_properties->border_style.separator_chars[RH_sip]);
IT = &(context->table_properties->border_style.separator_chars[II_sip]);
IB = &(context->table_properties->border_style.separator_chars[II_sip]);
IT = &(context->table_properties->border_style.separator_chars[TI_sip]);
IB = &(context->table_properties->border_style.separator_chars[BI_sip]);
II = &(context->table_properties->border_style.separator_chars[IH_sip]);
if (lower_row == NULL) {
L = &(*border_chars)[BL_bip];
R = &(*border_chars)[BR_bip];
} else if (upper_row == NULL) {
L = &(*border_chars)[TL_bip];
R = &(*border_chars)[TR_bip];
}
} else {
switch (separatorPos) {
case TopSeparator:
@@ -481,9 +489,17 @@ int wprint_row_separator(wchar_t *buffer, size_t buffer_sz,
IV = &(context->table_properties->border_style.separator_chars[II_sip]);
R = &(context->table_properties->border_style.separator_chars[RH_sip]);
IT = &(context->table_properties->border_style.separator_chars[II_sip]);
IB = &(context->table_properties->border_style.separator_chars[II_sip]);
IT = &(context->table_properties->border_style.separator_chars[TI_sip]);
IB = &(context->table_properties->border_style.separator_chars[BI_sip]);
II = &(context->table_properties->border_style.separator_chars[IH_sip]);
if (lower_row == NULL) {
L = &(*border_chars)[BL_bip];
R = &(*border_chars)[BR_bip];
} else if (upper_row == NULL) {
L = &(*border_chars)[TL_bip];
R = &(*border_chars)[TR_bip];
}
} else {
switch (separatorPos) {
case TopSeparator: