diff --git a/icon-themes/colibre/sw/res/colbreak.png b/icon-themes/colibre/sw/res/colbreak.png new file mode 100644 index 000000000000..00e28e5e73f6 Binary files /dev/null and b/icon-themes/colibre/sw/res/colbreak.png differ diff --git a/icon-themes/colibre/sw/res/linebreak_full.png b/icon-themes/colibre/sw/res/linebreak_full.png new file mode 100644 index 000000000000..062da32d7838 Binary files /dev/null and b/icon-themes/colibre/sw/res/linebreak_full.png differ diff --git a/icon-themes/colibre/sw/res/linebreak_left.png b/icon-themes/colibre/sw/res/linebreak_left.png new file mode 100644 index 000000000000..80357bc3c926 Binary files /dev/null and b/icon-themes/colibre/sw/res/linebreak_left.png differ diff --git a/icon-themes/colibre/sw/res/linebreak_none.png b/icon-themes/colibre/sw/res/linebreak_none.png new file mode 100644 index 000000000000..813932dc67fb Binary files /dev/null and b/icon-themes/colibre/sw/res/linebreak_none.png differ diff --git a/icon-themes/colibre/sw/res/linebreak_right.png b/icon-themes/colibre/sw/res/linebreak_right.png new file mode 100644 index 000000000000..6f2bd317cd86 Binary files /dev/null and b/icon-themes/colibre/sw/res/linebreak_right.png differ diff --git a/icon-themes/colibre/sw/res/pagebreak.png b/icon-themes/colibre/sw/res/pagebreak.png new file mode 100644 index 000000000000..bff5c452f728 Binary files /dev/null and b/icon-themes/colibre/sw/res/pagebreak.png differ diff --git a/sw/inc/bitmaps.hlst b/sw/inc/bitmaps.hlst index 5dacda42e987..45ef3a2805cd 100644 --- a/sw/inc/bitmaps.hlst +++ b/sw/inc/bitmaps.hlst @@ -120,4 +120,11 @@ inline constexpr OUString RID_BMP_QUERYINSMODE = u"res/queryinsmode.png"_ustr; inline constexpr OUString RID_SVXBMP_LOCKED = u"res/locked.png"_ustr; inline constexpr OUString RID_SVXBMP_UNLOCKED = u"res/unlocked.png"_ustr; +inline constexpr OUString RID_BMP_LINEBREAK_NONE = u"sw/res/linebreak_none.png"_ustr; +inline constexpr OUString RID_BMP_LINEBREAK_LEFT = u"sw/res/linebreak_left.png"_ustr; +inline constexpr OUString RID_BMP_LINEBREAK_RIGHT = u"sw/res/linebreak_right.png"_ustr; +inline constexpr OUString RID_BMP_LINEBREAK_FULL = u"sw/res/linebreak_full.png"_ustr; +inline constexpr OUString RID_BMP_COLBREAK = u"sw/res/colbreak.png"_ustr; +inline constexpr OUString RID_BMP_PAGEBREAK = u"sw/res/pagebreak.png"_ustr; + /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ diff --git a/sw/source/ui/chrdlg/break.cxx b/sw/source/ui/chrdlg/break.cxx index e980467eb0a5..e767456266e1 100644 --- a/sw/source/ui/chrdlg/break.cxx +++ b/sw/source/ui/chrdlg/break.cxx @@ -19,6 +19,7 @@ #include #include +#include #include #include @@ -61,6 +62,7 @@ void SwBreakDlg::rememberResult() IMPL_LINK_NOARG(SwBreakDlg, ToggleHdl, weld::Toggleable&, void) { CheckEnable(); + UpdateImage(); } IMPL_LINK_NOARG(SwBreakDlg, ChangeHdl, weld::ComboBox&, void) @@ -68,6 +70,11 @@ IMPL_LINK_NOARG(SwBreakDlg, ChangeHdl, weld::ComboBox&, void) CheckEnable(); } +IMPL_LINK_NOARG(SwBreakDlg, LineClearHdl, weld::ComboBox&, void) +{ + UpdateImage(); +} + // Handler for Change Page Number IMPL_LINK(SwBreakDlg, PageNumHdl, weld::Toggleable&, rBox, void) { @@ -137,6 +144,7 @@ SwBreakDlg::SwBreakDlg(weld::Window *pParent, SwWrtShell &rS) , m_xPageNumBox(m_xBuilder->weld_check_button(u"pagenumcb"_ustr)) , m_xPageNumEdit(m_xBuilder->weld_spin_button(u"pagenumsb"_ustr)) , m_xOkBtn(m_xBuilder->weld_button(u"ok"_ustr)) + , m_xTypeImage(m_xBuilder->weld_image(u"imType"_ustr)) , m_rSh(rS) , m_nKind(0) , m_bHtmlMode(0 != ::GetHtmlMode(rS.GetView().GetDocShell())) @@ -146,6 +154,7 @@ SwBreakDlg::SwBreakDlg(weld::Window *pParent, SwWrtShell &rS) m_xLineBtn->connect_toggled(aLk); m_xColumnBtn->connect_toggled(aLk); m_xPageCollBox->connect_changed(LINK(this, SwBreakDlg, ChangeHdl)); + m_xLineClearBox->connect_changed(LINK(this, SwBreakDlg, LineClearHdl)); m_xOkBtn->connect_clicked(LINK(this, SwBreakDlg, OkHdl)); m_xPageNumBox->connect_toggled(LINK(this, SwBreakDlg, PageNumHdl)); @@ -172,6 +181,7 @@ SwBreakDlg::SwBreakDlg(weld::Window *pParent, SwWrtShell &rS) ::InsertStringSorted(u""_ustr, aFormatName, *m_xPageCollBox, 1); CheckEnable(); m_xPageNumEdit->set_text(OUString()); + UpdateImage(); } void SwBreakDlg::CheckEnable() @@ -210,4 +220,32 @@ void SwBreakDlg::CheckEnable() m_xPageNumEdit->set_sensitive(bEnable); } +void SwBreakDlg::UpdateImage() +{ + if (m_xLineBtn->get_active()) + { + switch (m_xLineClearBox->get_active()) + { + case 0: + m_xTypeImage->set_from_icon_name(RID_BMP_LINEBREAK_NONE); + break; + case 1: + m_xTypeImage->set_from_icon_name(RID_BMP_LINEBREAK_LEFT); + break; + case 2: + m_xTypeImage->set_from_icon_name(RID_BMP_LINEBREAK_RIGHT); + break; + case 3: + m_xTypeImage->set_from_icon_name(RID_BMP_LINEBREAK_FULL); + break; + } + } + else if (m_xColumnBtn->get_active()) + m_xTypeImage->set_from_icon_name(RID_BMP_COLBREAK); + else if (m_xPageBtn->get_active()) + m_xTypeImage->set_from_icon_name(RID_BMP_PAGEBREAK); + else + m_xTypeImage->set_from_icon_name(""); //clear +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/uibase/inc/break.hxx b/sw/source/uibase/inc/break.hxx index 260229302ed2..62beafb18422 100644 --- a/sw/source/uibase/inc/break.hxx +++ b/sw/source/uibase/inc/break.hxx @@ -37,6 +37,7 @@ class SwBreakDlg final : public weld::GenericDialogController std::unique_ptr m_xPageNumBox; std::unique_ptr m_xPageNumEdit; std::unique_ptr m_xOkBtn; + std::unique_ptr m_xTypeImage; SwWrtShell& m_rSh; OUString m_aTemplate; @@ -48,11 +49,13 @@ class SwBreakDlg final : public weld::GenericDialogController DECL_LINK(ToggleHdl, weld::Toggleable&, void); DECL_LINK(ChangeHdl, weld::ComboBox&, void); + DECL_LINK(LineClearHdl, weld::ComboBox&, void); DECL_LINK(PageNumHdl, weld::Toggleable&, void); DECL_LINK(PageNumModifyHdl, weld::SpinButton&, void); DECL_LINK(OkHdl, weld::Button&, void); void CheckEnable(); + void UpdateImage(); void rememberResult(); public: diff --git a/sw/uiconfig/swriter/ui/insertbreak.ui b/sw/uiconfig/swriter/ui/insertbreak.ui index b52655b369f4..c180afd0d9e1 100644 --- a/sw/uiconfig/swriter/ui/insertbreak.ui +++ b/sw/uiconfig/swriter/ui/insertbreak.ui @@ -1,39 +1,39 @@ - + 55535 1 - 1 - 10 + 1 + 10 - False - 6 + False + 6 Insert Break False True - 0 - 0 - dialog + 0 + 0 + dialog - False + False vertical 12 - False - end + False + end _OK True - True - True - True - True + True + True + True + True True @@ -46,8 +46,8 @@ _Cancel True - True - True + True + True True @@ -60,8 +60,8 @@ _Help True - True - True + True + True True @@ -75,32 +75,34 @@ False True - end + end 0 True - False - 0 - none + False + 0 + none - + + True - False - vertical - 6 + False 12 6 + vertical + 6 + 12 Line break True - True - False - True - True + True + False + True + True pagerb @@ -109,54 +111,51 @@ - False - True - 0 + 0 + 0 True - False - 6 + False + 6 Restart Location: - True - clearlb + True + clearlb 0 - False - True - 1 + 0 + 1 True False - False + False 0 - [None] + Next Line Left Right Next Full Line - False - True - 2 + 0 + 2 Column break True - True - False - True - True + True + False + True + True pagerb @@ -165,20 +164,19 @@ - False - True - 3 + 0 + 3 Page break True - True - False - True + True + False + True True - True + True Inserts a manual page break, and moves the text found to the right of the cursor to the beginning of the next page. The inserted page break is indicated by a nonprinting border at the top of the new page. @@ -186,31 +184,30 @@ - False - True - 4 + 0 + 4 True - False - 6 + False + 6 Page Style: - True - stylelb + True + stylelb 0 - False - True - 5 + 0 + 5 + 2 True - False + False 0 [None] @@ -222,20 +219,20 @@ - False - True - 6 + 0 + 6 + 2 Change page number True - True - False - 6 - True - True + True + False + 6 + True + True Assigns the page number that you specify to the page that follows the manual page break. This option is only available if you assign a different page style to the page that follows manual page break. @@ -243,22 +240,22 @@ - False - True - 7 + 0 + 7 + 2 True - True + True start - True + True + True adjustment1 - True Enter the new page number for the page that follows the manual page break. @@ -266,9 +263,24 @@ - False - True - 8 + 0 + 8 + 2 + + + + + True + False + center + start + True + True + + + 1 + 0 + 5 @@ -276,7 +288,7 @@ True - False + False Type @@ -296,9 +308,6 @@ cancel help - - - Inserts a manual line break, column break or a page break at the current cursor position.