diff options
author | Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de> | 2023-11-09 16:18:35 +0100 |
---|---|---|
committer | Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de> | 2023-11-16 08:03:32 +0100 |
commit | 1f874d384228867ee450d3e1d53c821519b51722 (patch) | |
tree | 5888576735cea126c251b9b2822cb193ffa7cc4c /cui/source/dialogs | |
parent | 7f79b0caf194ff9d7dfa2f85379a5c752c905476 (diff) |
expert config: Proper editing support for numbers
Change-Id: Ib97e027cedfdf2c5bb3c956aeee75af25198e498
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159355
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
Diffstat (limited to 'cui/source/dialogs')
-rw-r--r-- | cui/source/dialogs/dlgname.cxx | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/cui/source/dialogs/dlgname.cxx b/cui/source/dialogs/dlgname.cxx index a1f6283d92b5..a96b59290bbd 100644 --- a/cui/source/dialogs/dlgname.cxx +++ b/cui/source/dialogs/dlgname.cxx @@ -60,6 +60,28 @@ IMPL_LINK_NOARG(SvxNameDialog, ModifyHdl, weld::Entry&, void) m_xEdtName->set_tooltip_text(rTip); } +SvxNumberDialog::SvxNumberDialog(weld::Window* pParent, const OUString& rDesc, sal_Int64 nValue, + sal_Int64 nMin, sal_Int64 nMax) + : GenericDialogController(pParent, "cui/ui/numberdialog.ui", "NumberDialog") + , m_xEdtNumber(m_xBuilder->weld_spin_button("number_spinbtn")) + , m_xFtDescription(m_xBuilder->weld_label("description_label")) +{ + m_xFtDescription->set_label(rDesc); + m_xEdtNumber->set_min(nMin); + m_xEdtNumber->set_max(nMax); + m_xEdtNumber->set_value(nValue); +} + +SvxDecimalNumberDialog::SvxDecimalNumberDialog(weld::Window* pParent, const OUString& rDesc, + double fValue) + : GenericDialogController(pParent, "cui/ui/numberdialog.ui", "NumberDialog") + , m_xEdtNumber(m_xBuilder->weld_formatted_spin_button("number_spinbtn")) + , m_xFtDescription(m_xBuilder->weld_label("description_label")) +{ + m_xFtDescription->set_label(rDesc); + m_xEdtNumber->GetFormatter().SetValue(fValue); +} + // #i68101# // Dialog for editing Object Name // plus uniqueness-callback-linkHandler |