summaryrefslogtreecommitdiff
path: root/sw/source/ui/index
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2021-04-27 17:11:00 +0200
committerMiklos Vajna <vmiklos@collabora.com>2021-04-28 08:24:49 +0200
commitd524f5b28e2b9bcf7ab681eb6ad93a4da3f5663d (patch)
treea8a5a3a2c0f3068f73a7acd4c899ca7f483dd6a0 /sw/source/ui/index
parentc9c6b0d75bcbb6ff3343502a19fb3448d361d335 (diff)
sw bibliography, refer to a page: add insert/delete UI
If the toggle button's activate state changes, adapt the sensitivity of the next spinbutton, this way a new page number can be added and an old one can be deleted. Change-Id: I97067182e8cd42a02b164ac941598bada2630e07 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114750 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
Diffstat (limited to 'sw/source/ui/index')
-rw-r--r--sw/source/ui/index/swuiidxmrk.cxx17
1 files changed, 17 insertions, 0 deletions
diff --git a/sw/source/ui/index/swuiidxmrk.cxx b/sw/source/ui/index/swuiidxmrk.cxx
index 58cd9e0e2bc3..7b988a4cbec6 100644
--- a/sw/source/ui/index/swuiidxmrk.cxx
+++ b/sw/source/ui/index/swuiidxmrk.cxx
@@ -1091,6 +1091,7 @@ class SwCreateAuthEntryDlg_Impl : public weld::GenericDialogController
DECL_LINK(ShortNameHdl, weld::Entry&, void);
DECL_LINK(EnableHdl, weld::ComboBox&, void);
DECL_LINK(BrowseHdl, weld::Button&, void);
+ DECL_LINK(PageNumHdl, weld::ToggleButton&, void);
public:
SwCreateAuthEntryDlg_Impl(weld::Window* pParent,
@@ -1673,6 +1674,8 @@ SwCreateAuthEntryDlg_Impl::SwCreateAuthEntryDlg_Impl(weld::Window* pParent,
m_xBrowseButton = m_aBuilders.back()->weld_button("browse");
m_xBrowseButton->connect_clicked(LINK(this, SwCreateAuthEntryDlg_Impl, BrowseHdl));
m_xPageCB = m_aBuilders.back()->weld_check_button("pagecb");
+ // Distinguish different instances of this for ui-testing.
+ m_xPageCB->set_buildable_name(m_xPageCB->get_buildable_name() + "-visible");
m_xPageSB = m_aBuilders.back()->weld_spin_button("pagesb");
}
@@ -1718,6 +1721,7 @@ SwCreateAuthEntryDlg_Impl::SwCreateAuthEntryDlg_Impl(weld::Window* pParent,
m_xBrowseButton->show();
}
m_xPageCB->show();
+ m_xPageCB->connect_toggled(LINK(this, SwCreateAuthEntryDlg_Impl, PageNumHdl));
m_xPageSB->show();
}
@@ -1852,6 +1856,19 @@ IMPL_LINK_NOARG(SwCreateAuthEntryDlg_Impl, BrowseHdl, weld::Button&, void)
}
};
+IMPL_LINK_NOARG(SwCreateAuthEntryDlg_Impl, PageNumHdl, weld::ToggleButton&, void)
+{
+ if (m_xPageCB->get_active())
+ {
+ m_xPageSB->set_sensitive(true);
+ m_xPageSB->set_value(1);
+ }
+ else
+ {
+ m_xPageSB->set_sensitive(false);
+ }
+}
+
SwAuthMarkFloatDlg::SwAuthMarkFloatDlg(SfxBindings* _pBindings,
SfxChildWindow* pChild,
weld::Window *pParent,