[Libreoffice-commits] core.git: sc/inc sc/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Sat Feb 2 21:57:53 UTC 2019
sc/inc/filtuno.hxx | 6 ++++++
sc/source/ui/unoobj/filtuno.cxx | 12 +++++++++++-
2 files changed, 17 insertions(+), 1 deletion(-)
New commits:
commit 573a473275ad7c76d0cada9b7e73d4923e7a79d5
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Sat Feb 2 17:30:52 2019 +0000
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Sat Feb 2 22:57:31 2019 +0100
set parent for ascii import options dialog in calc
Change-Id: I039ac4bfda4b36f76b66f043187beada4af0cacd
Reviewed-on: https://gerrit.libreoffice.org/67294
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sc/inc/filtuno.hxx b/sc/inc/filtuno.hxx
index dd6b55950d09..fc3d3981b126 100644
--- a/sc/inc/filtuno.hxx
+++ b/sc/inc/filtuno.hxx
@@ -24,6 +24,7 @@
#include <com/sun/star/ui/dialogs/XExecutableDialog.hpp>
#include <com/sun/star/document/XImporter.hpp>
#include <com/sun/star/document/XExporter.hpp>
+#include <com/sun/star/lang/XInitialization.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <cppuhelper/implbase.hxx>
@@ -36,6 +37,7 @@ class ScFilterOptionsObj : public ::cppu::WeakImplHelper<
css::ui::dialogs::XExecutableDialog,
css::document::XImporter,
css::document::XExporter,
+ css::lang::XInitialization,
css::lang::XServiceInfo >
{
private:
@@ -43,6 +45,7 @@ private:
OUString aFilterName;
OUString aFilterOptions;
css::uno::Reference< css::io::XInputStream > xInputStream;
+ css::uno::Reference< css::awt::XWindow > xDialogParent;
bool bExport;
public:
@@ -65,6 +68,9 @@ public:
// XExporter
virtual void SAL_CALL setSourceDocument( const css::uno::Reference< css::lang::XComponent >& xDoc ) override;
+ // XInitialization
+ virtual void SAL_CALL initialize(const css::uno::Sequence<css::uno::Any>& rArguments) override;
+
// XServiceInfo
virtual OUString SAL_CALL getImplementationName() override;
virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
diff --git a/sc/source/ui/unoobj/filtuno.cxx b/sc/source/ui/unoobj/filtuno.cxx
index 73f319263992..947f59869903 100644
--- a/sc/source/ui/unoobj/filtuno.cxx
+++ b/sc/source/ui/unoobj/filtuno.cxx
@@ -40,6 +40,7 @@
#include <optutil.hxx>
#include <com/sun/star/uno/Any.hxx>
#include <com/sun/star/uno/Sequence.hxx>
+#include <comphelper/namedvaluecollection.hxx>
#include <comphelper/propertysequence.hxx>
#include <memory>
@@ -208,7 +209,7 @@ sal_Int16 SAL_CALL ScFilterOptionsObj::execute()
{
// HTML import.
ScopedVclPtr<AbstractScTextImportOptionsDlg> pDlg(
- pFact->CreateScTextImportOptionsDlg(nullptr));
+ pFact->CreateScTextImportOptionsDlg(Application::GetFrameWeld(xDialogParent)));
if (pDlg->Execute() == RET_OK)
{
@@ -354,4 +355,13 @@ void SAL_CALL ScFilterOptionsObj::setSourceDocument( const uno::Reference<lang::
bExport = true;
}
+// XInitialization
+
+void SAL_CALL ScFilterOptionsObj::initialize(const uno::Sequence<uno::Any>& rArguments)
+{
+ ::comphelper::NamedValueCollection aProperties(rArguments);
+ if (aProperties.has("ParentWindow"))
+ aProperties.get("ParentWindow") >>= xDialogParent;
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
More information about the Libreoffice-commits
mailing list