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

Samuel Mehrbrodt (via logerrit) logerrit at kemper.freedesktop.org
Thu Jul 29 11:36:49 UTC 2021


 vcl/source/control/wizardmachine.cxx |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

New commits:
commit 27612dc0d3afad4f7eec7109a09262e877c63399
Author:     Samuel Mehrbrodt <samuel.mehrbrodt at allotropia.de>
AuthorDate: Thu Jul 29 11:16:22 2021 +0200
Commit:     Samuel Mehrbrodt <samuel.mehrbrodt at allotropia.de>
CommitDate: Thu Jul 29 13:36:17 2021 +0200

    Revert "cid#1486241 'Constant' variable guards dead code"
    
    This led to an exception when activating a page via UNO (seen in WollMux):
    
    warn:svtools.uno:211417:211417:svtools/source/uno/wizard/wizardshell.cxx:120: DBG_UNHANDLED_EXCEPTION in enterState exception: com.sun.star.uno.RuntimeException message: [jni_uno bridge error] UNO calling Java method onActivatePage: non-UNO exception occurred: java.lang.ArrayIndexOutOfBoundsException: Index 2 out of bounds for length 1
    java stack trace:
    java.lang.ArrayIndexOutOfBoundsException: Index 2 out of bounds for length 1
            at de.muenchen.allg.itd51.wollmux.dialog.mailmerge.MailmergeWizardController.onActivatePage(MailmergeWizardController.java:170)
            at com.sun.star.bridges.jni_uno.JNI_proxy.dispatch_call(Native Method)
            at com.sun.star.bridges.jni_uno.JNI_proxy.invoke(JNI_proxy.java:185)
            at com.sun.proxy.$Proxy118.execute(Unknown Source)
            at de.muenchen.allg.itd51.wollmux.dialog.mailmerge.MailmergeWizardController.startWizard(MailmergeWizardController.java:199)
            at de.muenchen.allg.itd51.wollmux.sidebar.SeriendruckSidebarContent.lambda$new$5(SeriendruckSidebarContent.java:468)
    
    This reverts commit 23c2c3433dc6bbfff2e1b590b1a89ee7f9c155c0.
    
    Change-Id: I6344a83eaa37b58c46a8b576c65bb15b11855c9c
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119655
    Tested-by: Jenkins
    Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt at allotropia.de>

diff --git a/vcl/source/control/wizardmachine.cxx b/vcl/source/control/wizardmachine.cxx
index cbb414800372..17e172d29736 100644
--- a/vcl/source/control/wizardmachine.cxx
+++ b/vcl/source/control/wizardmachine.cxx
@@ -1038,9 +1038,11 @@ namespace vcl
         return _nCurrentState + 1;
     }
 
-    bool WizardMachine::prepareLeaveCurrentState(WizardTypes::CommitPageReason)
+    bool WizardMachine::prepareLeaveCurrentState( WizardTypes::CommitPageReason _eReason )
     {
-        return true;
+        IWizardPageController* pController = getPageController( GetPage( getCurrentState() ) );
+        ENSURE_OR_RETURN( pController != nullptr, "WizardMachine::prepareLeaveCurrentState: no controller for the current page!", true );
+        return pController->commitPage( _eReason );
     }
 
     bool WizardMachine::skipBackwardUntil(WizardTypes::WizardState _nTargetState)


More information about the Libreoffice-commits mailing list