[Libreoffice-commits] core.git: desktop/source

Szymon KÅ‚os (via logerrit) logerrit at kemper.freedesktop.org
Wed Jun 24 09:37:16 UTC 2020


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

New commits:
commit 8aa6c7e1f7ef444978bbbb930e99bfd7e2da0a63
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 Jun 24 11:36:38 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>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96914
    Tested-by: Jenkins

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 4623812f1853..075ca30a08b9 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -3679,6 +3679,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