diff --git a/lib/images/tabular-feature_set-all-lines.png b/lib/images/tabular-feature_set-all-lines.png index b12a588826..777bf52dd7 100644 Binary files a/lib/images/tabular-feature_set-all-lines.png and b/lib/images/tabular-feature_set-all-lines.png differ diff --git a/lib/images/tabular-feature_set-border-lines.png b/lib/images/tabular-feature_set-border-lines.png new file mode 100644 index 0000000000..a9e3b23654 Binary files /dev/null and b/lib/images/tabular-feature_set-border-lines.png differ diff --git a/lib/images/tabular-feature_toggle-line-bottom.png b/lib/images/tabular-feature_toggle-line-bottom.png index 0fddb0af3b..042fcbe079 100644 Binary files a/lib/images/tabular-feature_toggle-line-bottom.png and b/lib/images/tabular-feature_toggle-line-bottom.png differ diff --git a/lib/images/tabular-feature_toggle-line-left.png b/lib/images/tabular-feature_toggle-line-left.png index a620514d8d..fdd4edd824 100644 Binary files a/lib/images/tabular-feature_toggle-line-left.png and b/lib/images/tabular-feature_toggle-line-left.png differ diff --git a/lib/images/tabular-feature_toggle-line-right.png b/lib/images/tabular-feature_toggle-line-right.png index 39d53a891a..304ca0b1e9 100644 Binary files a/lib/images/tabular-feature_toggle-line-right.png and b/lib/images/tabular-feature_toggle-line-right.png differ diff --git a/lib/images/tabular-feature_toggle-line-top.png b/lib/images/tabular-feature_toggle-line-top.png index 665c7069bf..9da176270c 100644 Binary files a/lib/images/tabular-feature_toggle-line-top.png and b/lib/images/tabular-feature_toggle-line-top.png differ diff --git a/lib/images/tabular-feature_unset-all-lines.png b/lib/images/tabular-feature_unset-all-lines.png index 2760ad6277..710367ed0d 100644 Binary files a/lib/images/tabular-feature_unset-all-lines.png and b/lib/images/tabular-feature_unset-all-lines.png differ diff --git a/lib/ui/stdtoolbars.inc b/lib/ui/stdtoolbars.inc index ac4a7e80b8..272c62d0bb 100644 --- a/lib/ui/stdtoolbars.inc +++ b/lib/ui/stdtoolbars.inc @@ -122,6 +122,7 @@ ToolbarSet Item "Set bottom line" "tabular-feature toggle-line-bottom" Item "Set left line" "tabular-feature toggle-line-left" Item "Set right line" "tabular-feature toggle-line-right" + Item "Set border lines" "tabular-feature set-border-lines" Item "Set all lines" "tabular-feature set-all-lines" Item "Unset all lines" "tabular-feature unset-all-lines" Separator diff --git a/src/insets/InsetTabular.cpp b/src/insets/InsetTabular.cpp index 6a5ae84361..1b6c587766 100644 --- a/src/insets/InsetTabular.cpp +++ b/src/insets/InsetTabular.cpp @@ -157,6 +157,7 @@ TabularFeature tabularFeature[] = { Tabular::SET_TOP_SPACE, "set-top-space" }, { Tabular::SET_BOTTOM_SPACE, "set-bottom-space" }, { Tabular::SET_INTERLINE_SPACE, "set-interline-space" }, + { Tabular::SET_BORDER_LINES, "set-border-lines" }, { Tabular::LAST_ACTION, "" } }; @@ -3607,6 +3608,7 @@ bool InsetTabular::getStatus(Cursor & cur, FuncRequest const & cmd, case Tabular::SET_TOP_SPACE: case Tabular::SET_BOTTOM_SPACE: case Tabular::SET_INTERLINE_SPACE: + case Tabular::SET_BORDER_LINES: status.clear(); return true; @@ -4343,6 +4345,17 @@ void InsetTabular::tabularFeatures(Cursor & cur, tabular.cellIndex(i,j), setLines); break; + case Tabular::SET_BORDER_LINES: + for (row_type i = sel_row_start; i <= sel_row_end; ++i) { + tabular.setLeftLine(tabular.cellIndex(i, sel_col_start), true); + tabular.setRightLine(tabular.cellIndex(i, sel_col_end), true); + } + for (col_type j = sel_col_start; j <= sel_col_end; ++j) { + tabular.setTopLine(tabular.cellIndex(sel_row_start, j), true); + tabular.setBottomLine(tabular.cellIndex(sel_row_end, j), true); + } + break; + case Tabular::SET_LONGTABULAR: tabular.setLongTabular(true); break; diff --git a/src/insets/InsetTabular.h b/src/insets/InsetTabular.h index 777dbed7d9..829c9e9e6c 100644 --- a/src/insets/InsetTabular.h +++ b/src/insets/InsetTabular.h @@ -175,6 +175,8 @@ public: /// SET_INTERLINE_SPACE, /// + SET_BORDER_LINES, + /// LAST_ACTION }; ///