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

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Fri Oct 5 15:13:06 UTC 2018


 svtools/source/filter/SvFilterOptionsDialog.cxx |   18 ++++++++++++++----
 1 file changed, 14 insertions(+), 4 deletions(-)

New commits:
commit a54c1d1a7f7ad7d5d5a0364d01c52ed8f4efe53d
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Fri Oct 5 12:22:42 2018 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Fri Oct 5 17:12:34 2018 +0200

    give SvFilterOptionsDialog a proper parent
    
    Change-Id: Ie6545844546dc78d14e1fabdf28f4e1938cf2dd4
    Reviewed-on: https://gerrit.libreoffice.org/61413
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/svtools/source/filter/SvFilterOptionsDialog.cxx b/svtools/source/filter/SvFilterOptionsDialog.cxx
index 0e9f31c059d7..d4ca22c4d2e7 100644
--- a/svtools/source/filter/SvFilterOptionsDialog.cxx
+++ b/svtools/source/filter/SvFilterOptionsDialog.cxx
@@ -69,6 +69,7 @@ class SvFilterOptionsDialog : public cppu::WeakImplHelper
     uno::Reference< lang::XComponent >
         mxSourceDocument;
 
+    css::uno::Reference<css::awt::XWindow> mxParent;
     OUString        maDialogTitle;
     FieldUnit       meFieldUnit;
     bool            mbExportSelection;
@@ -123,8 +124,19 @@ void SAL_CALL SvFilterOptionsDialog::release() throw()
 }
 
 // XInitialization
-void SAL_CALL SvFilterOptionsDialog::initialize( const uno::Sequence< uno::Any > & )
+void SAL_CALL SvFilterOptionsDialog::initialize(const uno::Sequence<uno::Any>& rArguments)
 {
+    for(const uno::Any& rArgument : rArguments)
+    {
+        beans::PropertyValue aProperty;
+        if (rArgument >>= aProperty)
+        {
+            if( aProperty.Name == "ParentWindow" )
+            {
+                aProperty.Value >>= mxParent;
+            }
+        }
+    }
 }
 
 // XServiceInfo
@@ -222,9 +234,7 @@ sal_Int16 SvFilterOptionsDialog::execute()
         }
         if ( nFormat < nFilterCount )
         {
-            vcl::Window* pParent = Application::GetDefDialogParent();
-            //TODO
-            FltCallDialogParameter aFltCallDlgPara(pParent ? pParent->GetFrameWeld() : nullptr, meFieldUnit);
+            FltCallDialogParameter aFltCallDlgPara(Application::GetFrameWeld(mxParent), meFieldUnit);
             aFltCallDlgPara.aFilterData = maFilterDataSequence;
             aFltCallDlgPara.aFilterExt = aGraphicFilter.GetExportFormatShortName( nFormat );
             bool bIsPixelFormat( aGraphicFilter.IsExportPixelFormat( nFormat ) );


More information about the Libreoffice-commits mailing list