[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

@@ -515,6 +515,9 @@ enum SeparatorItemPos {
II_sip = 2,
RH_sip = 3,
TI_sip = 4,
BI_sip = 5,
SepratorItemPosSize
};
@@ -1314,6 +1317,7 @@ fort_status_t set_default_cell_property(uint32_t property, int value)
/* separator_chars */ \
{ \
"+", "-", "+", "+", \
"+", "+", \
}, \
}
@@ -1337,6 +1341,7 @@ fort_status_t set_default_cell_property(uint32_t property, int value)
/* separator_chars */ \
{ \
"+", "-", "+", "+", \
"+", "+", \
}, \
}
@@ -1360,6 +1365,7 @@ fort_status_t set_default_cell_property(uint32_t property, int value)
/* separator_chars */ \
{ \
" ", "-", " ", " ", \
" ", " ", \
}, \
}
@@ -1383,6 +1389,7 @@ fort_status_t set_default_cell_property(uint32_t property, int value)
/* separator_chars */ \
{ \
" ", "-", "-", " ", \
"-", "-", \
}, \
}
@@ -1406,6 +1413,7 @@ fort_status_t set_default_cell_property(uint32_t property, int value)
/* separator_chars */ \
{ \
":", ".", ":", ":", \
":", ":", \
}, \
}
@@ -1429,6 +1437,7 @@ fort_status_t set_default_cell_property(uint32_t property, int value)
/* separator_chars */ \
{ \
" ", " ", " ", " ", \
" ", " ", \
}, \
}
@@ -1453,6 +1462,7 @@ fort_status_t set_default_cell_property(uint32_t property, int value)
/* separator_chars */ \
{ \
"├", "─", "┼", "┤", \
"┬", "┴", \
}, \
}
@@ -1476,6 +1486,7 @@ fort_status_t set_default_cell_property(uint32_t property, int value)
/* separator_chars */ \
{ \
"├", "─", "┼", "┤", \
"┬", "┴", \
}, \
}
@@ -1500,6 +1511,7 @@ fort_status_t set_default_cell_property(uint32_t property, int value)
/* separator_chars */ \
{ \
"╠", "═", "╬", "╣", \
"╦", "╩", \
}, \
}
@@ -1524,6 +1536,7 @@ fort_status_t set_default_cell_property(uint32_t property, int value)
/* separator_chars */ \
{ \
"╠", "═", "╪", "╣", \
"╤", "╧", \
}, \
}
@@ -1548,6 +1561,7 @@ fort_status_t set_default_cell_property(uint32_t property, int value)
/* separator_chars */ \
{ \
"┣", "━", "╋", "┫", \
"┳", "┻", \
}, \
}
@@ -1571,6 +1585,7 @@ fort_status_t set_default_cell_property(uint32_t property, int value)
/* separator_chars */ \
{ \
"┣", "━", "┿", "┫", \
"┯", "┷", \
}, \
}
@@ -1594,6 +1609,7 @@ fort_status_t set_default_cell_property(uint32_t property, int value)
/* separator_chars */ \
{ \
"▌", "━", "╋", "▐", \
"╋", "╋", \
}, \
}
@@ -2989,6 +3005,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;
@@ -4518,9 +4535,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:
@@ -4693,9 +4718,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: