[Libreoffice-commits] core.git: include/svx svx/source

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Thu Mar 11 19:26:30 UTC 2021


 include/svx/fmtools.hxx             |    2 +-
 svx/source/form/formcontrolling.cxx |    5 +++--
 svx/source/inc/formcontroller.hxx   |    6 +++---
 3 files changed, 7 insertions(+), 6 deletions(-)

New commits:
commit 76867304b550af5c44c1fd6b82928fb2b69addc7
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Thu Mar 11 11:24:32 2021 +0000
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Thu Mar 11 20:25:41 2021 +0100

    use an explicit parent for error message
    
    Change-Id: Idf5a1c6a4313ab58c2bf6ee0ec02a8d003eee83a
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112335
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/include/svx/fmtools.hxx b/include/svx/fmtools.hxx
index b00b33cb0443..97d6fcff0d05 100644
--- a/include/svx/fmtools.hxx
+++ b/include/svx/fmtools.hxx
@@ -52,7 +52,7 @@ namespace vcl { class Window; }
 void displayException(const css::sdbc::SQLException&, vcl::Window* _pParent);
 SVXCORE_DLLPUBLIC void displayException(const css::sdb::SQLContext&, vcl::Window* _pParent);
 void displayException(const css::sdb::SQLErrorEvent&, vcl::Window* _pParent);
-void displayException(const css::uno::Any&, vcl::Window* _pParent = nullptr);
+void displayException(const css::uno::Any&, vcl::Window* _pParent);
 
 sal_Int32 getElementPos(const css::uno::Reference< css::container::XIndexAccess>& xCont, const css::uno::Reference< css::uno::XInterface>& xElement);
 
diff --git a/svx/source/form/formcontrolling.cxx b/svx/source/form/formcontrolling.cxx
index c18a0f6c373b..456e5a88ffbf 100644
--- a/svx/source/form/formcontrolling.cxx
+++ b/svx/source/form/formcontrolling.cxx
@@ -23,6 +23,7 @@
 #include <fmurl.hxx>
 #include <svx/svxids.hrc>
 #include <fmprop.hxx>
+#include <formcontroller.hxx>
 #include <svx/fmtools.hxx>
 
 #include <com/sun/star/form/runtime/FormOperations.hpp>
@@ -353,9 +354,9 @@ namespace svx
 
         // display the error. Prefer the one reported in errorOccurred over the one caught.
         if ( m_aOperationError.hasValue() )
-            displayException( m_aOperationError );
+            displayException(m_aOperationError, svxform::FormController::getDialogParentWindow(m_xFormOperations->getController()));
         else if ( aError.hasValue() )
-            displayException( aError );
+            displayException(aError, svxform::FormController::getDialogParentWindow(m_xFormOperations->getController()));
         else
             OSL_FAIL( "FormControllerHelper::impl_operateForm_nothrow: no success, but no error?" );
 
diff --git a/svx/source/inc/formcontroller.hxx b/svx/source/inc/formcontroller.hxx
index 6ed3ffeb2c4c..c25dd5d808ac 100644
--- a/svx/source/inc/formcontroller.hxx
+++ b/svx/source/inc/formcontroller.hxx
@@ -197,6 +197,9 @@ namespace svxform
     public:
         FormController( const css::uno::Reference< css::uno::XComponentContext > & _rxORB );
 
+        // returns the window which should be used as parent window for dialogs
+        static vcl::Window* getDialogParentWindow(css::uno::Reference<css::form::runtime::XFormController> xFormController);
+
     private:
         virtual ~FormController() override;
 
@@ -507,9 +510,6 @@ namespace svxform
         bool isLocked() const {return m_bLocked;}
         bool determineLockState() const;
 
-        // returns the window which should be used as parent window for dialogs
-        static vcl::Window* getDialogParentWindow(css::uno::Reference<css::form::runtime::XFormController> xFormController);
-
         css::uno::Reference< css::frame::XDispatchProviderInterceptor>    createInterceptor(const css::uno::Reference< css::frame::XDispatchProviderInterception>& _xInterception);
             // create a new interceptor, register it on the given object
         void                            deleteInterceptor(const css::uno::Reference< css::frame::XDispatchProviderInterception>& _xInterception);


More information about the Libreoffice-commits mailing list