[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - desktop/source

Szymon KÅ‚os (via logerrit) logerrit at kemper.freedesktop.org
Wed May 20 15:28:23 UTC 2020


 desktop/source/lib/init.cxx |   17 +++++++++++++++++
 1 file changed, 17 insertions(+)

New commits:
commit 0b53ab935694c956170ceeab1c7cdef1d4e4a9dd
Author:     Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Wed Mar 18 10:31:09 2020 +0100
Commit:     Szymon Kłos <szymon.klos at collabora.com>
CommitDate: Wed May 20 17:27:45 2020 +0200

    jsdialog: implement plus/minus for welded spinfields
    
    Change-Id: I8a0bf4190c09520d7be78c44742902539cb9bf38
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94483
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Szymon Kłos <szymon.klos at collabora.com>

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 62ee41ce8b6b..6afdd5fbe955 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -3684,6 +3684,23 @@ static void doc_sendDialogEvent(LibreOfficeKitDocument* /*pThis*/, unsigned nWin
                             bContinueWithLOKWindow = true;
                     }
                 }
+                else if (sControlType == "spinfield")
+                {
+                    auto pSpinField = dynamic_cast<weld::SpinButton*>(pWidget);
+                    if (pSpinField)
+                    {
+                        if (sAction == "plus")
+                        {
+                            pSpinField->set_value(pSpinField->get_value() + 1);
+                        }
+                        else if (sAction == "minus")
+                        {
+                            pSpinField->set_value(pSpinField->get_value() - 1);
+                        }
+                        else
+                            bContinueWithLOKWindow = true;
+                    }
+                }
                 else
                 {
                     bContinueWithLOKWindow = true;


More information about the Libreoffice-commits mailing list