sc/source/ui/condformat/condformateasydlg.cxx | 8 ++------ sc/source/ui/inc/condformateasydlg.hxx | 4 ++-- sc/uiconfig/scalc/ui/conditionaleasydialog.ui | 4 ++-- 3 files changed, 6 insertions(+), 10 deletions(-)
New commits: commit 42811537c8536330e21fd6cee7561294a177836a Author: Szymon Kłos <szymon.k...@collabora.com> AuthorDate: Fri Oct 27 13:02:29 2023 +0200 Commit: Szymon Kłos <szymon.k...@collabora.com> CommitDate: Sun Oct 29 09:14:50 2023 +0100 Allow to enter text in simple conditional formatting dialog We have rules for test values like: "contains text". Better to use formatter which will be used only when needed. But it is possible to use Less or Greater even for text using the lexicographic order. Strings in quotes are interpreted as text. Strings without quotes are interpreted as refs to columns/rows/ranges. Change-Id: I1f63b3f4b2a878e55d405a030dd3ddf47305e220 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158538 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.k...@collabora.com> diff --git a/sc/source/ui/condformat/condformateasydlg.cxx b/sc/source/ui/condformat/condformateasydlg.cxx index 7e07b1a1dc19..d707b7c9f88d 100644 --- a/sc/source/ui/condformat/condformateasydlg.cxx +++ b/sc/source/ui/condformat/condformateasydlg.cxx @@ -64,8 +64,8 @@ ConditionalFormatEasyDialog::ConditionalFormatEasyDialog(SfxBindings* pBindings, "modules/scalc/ui/conditionaleasydialog.ui", "CondFormatEasyDlg") , mpViewData(pViewData) , mpDocument(&mpViewData->GetDocument()) - , mxNumberEntry(m_xBuilder->weld_spin_button("entryNumber")) - , mxNumberEntry2(m_xBuilder->weld_spin_button("entryNumber2")) + , mxNumberEntry(m_xBuilder->weld_entry("entryNumber")) + , mxNumberEntry2(m_xBuilder->weld_entry("entryNumber2")) , mxRangeEntry(new formula::RefEdit(m_xBuilder->weld_entry("entryRange"))) , mxButtonRangeEdit(new formula::RefButton(m_xBuilder->weld_button("rbassign"))) , mxStyles(m_xBuilder->weld_combo_box("themeCombo")) @@ -92,10 +92,6 @@ ConditionalFormatEasyDialog::ConditionalFormatEasyDialog(SfxBindings* pBindings, meMode = *pCurrentMode; } mxNumberEntry2->hide(); - mxNumberEntry->set_range(SAL_MIN_INT64, SAL_MAX_INT64); - mxNumberEntry2->set_range(SAL_MIN_INT64, SAL_MAX_INT64); - mxNumberEntry->set_increments(1, 0); - mxNumberEntry2->set_increments(1, 0); switch (meMode) { case ScConditionMode::Equal: diff --git a/sc/source/ui/inc/condformateasydlg.hxx b/sc/source/ui/inc/condformateasydlg.hxx index 9ca15a11bda9..6d6af1041b49 100644 --- a/sc/source/ui/inc/condformateasydlg.hxx +++ b/sc/source/ui/inc/condformateasydlg.hxx @@ -42,8 +42,8 @@ private: ScAddress maPosition; ScTabViewShell* mpTabViewShell; - std::unique_ptr<weld::SpinButton> mxNumberEntry; - std::unique_ptr<weld::SpinButton> mxNumberEntry2; + std::unique_ptr<weld::Entry> mxNumberEntry; + std::unique_ptr<weld::Entry> mxNumberEntry2; std::unique_ptr<formula::RefEdit> mxRangeEntry; std::unique_ptr<formula::RefButton> mxButtonRangeEdit; std::unique_ptr<weld::ComboBox> mxStyles; diff --git a/sc/uiconfig/scalc/ui/conditionaleasydialog.ui b/sc/uiconfig/scalc/ui/conditionaleasydialog.ui index 2bee383956a9..077610196356 100644 --- a/sc/uiconfig/scalc/ui/conditionaleasydialog.ui +++ b/sc/uiconfig/scalc/ui/conditionaleasydialog.ui @@ -90,7 +90,7 @@ <property name="can-focus">False</property> <property name="spacing">12</property> <child> - <object class="GtkSpinButton" id="entryNumber"> + <object class="GtkEntry" id="entryNumber"> <property name="visible">True</property> <property name="can-focus">True</property> <accessibility> @@ -104,7 +104,7 @@ </packing> </child> <child> - <object class="GtkSpinButton" id="entryNumber2"> + <object class="GtkEntry" id="entryNumber2"> <property name="visible">True</property> <property name="can-focus">True</property> <accessibility>