summaryrefslogtreecommitdiff
path: root/unotools
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-04-12 12:07:22 +0100
committerMiklos Vajna <vmiklos@collabora.com>2019-04-23 15:11:30 +0200
commitab401b59209ae6bd0d050558063800409278e8c8 (patch)
treefd27687df3845060d00a674d019fc0cd426396db /unotools
parentb929fd7a369630fa70a74eec3040761cea58b660 (diff)
Resolves: tdf#124698 bubble down parent for modal dialog
Change-Id: If03c6ff8043bb39f2efdf4cde19d8277886bf36f Reviewed-on: https://gerrit.libreoffice.org/70677 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'unotools')
-rw-r--r--unotools/source/ucbhelper/ucbstreamhelper.cxx16
1 files changed, 7 insertions, 9 deletions
diff --git a/unotools/source/ucbhelper/ucbstreamhelper.cxx b/unotools/source/ucbhelper/ucbstreamhelper.cxx
index 4cb749306149..33c6529b6a56 100644
--- a/unotools/source/ucbhelper/ucbstreamhelper.cxx
+++ b/unotools/source/ucbhelper/ucbstreamhelper.cxx
@@ -138,27 +138,25 @@ static std::unique_ptr<SvStream> lcl_CreateStream( const OUString& rFileName, St
return pStream;
}
-std::unique_ptr<SvStream> UcbStreamHelper::CreateStream( const OUString& rFileName, StreamMode eOpenMode )
+std::unique_ptr<SvStream> UcbStreamHelper::CreateStream(const OUString& rFileName, StreamMode eOpenMode, css::uno::Reference<css::awt::XWindow> xParentWin)
{
// related tdf#99312
// create a specialized interaction handler to manages Web certificates and Web credentials when needed
Reference< XInteractionHandler > xIH(
- css::task::InteractionHandler::createWithParent( comphelper::getProcessComponentContext(), nullptr ) );
- Reference < XInteractionHandler > xIHScoped( static_cast< XInteractionHandler *> (
- new comphelper::SimpleFileAccessInteraction( xIH ) ) );
+ css::task::InteractionHandler::createWithParent(comphelper::getProcessComponentContext(), xParentWin));
+ Reference<XInteractionHandler> xIHScoped(new comphelper::SimpleFileAccessInteraction(xIH));
return lcl_CreateStream( rFileName, eOpenMode, xIHScoped, true /* bEnsureFileExists */ );
}
-std::unique_ptr<SvStream> UcbStreamHelper::CreateStream( const OUString& rFileName, StreamMode eOpenMode,
- bool bFileExists )
+std::unique_ptr<SvStream> UcbStreamHelper::CreateStream(const OUString& rFileName, StreamMode eOpenMode,
+ bool bFileExists, css::uno::Reference<css::awt::XWindow> xParentWin)
{
// related tdf#99312
// create a specialized interaction handler to manages Web certificates and Web credentials when needed
Reference< XInteractionHandler > xIH(
- css::task::InteractionHandler::createWithParent( comphelper::getProcessComponentContext(), nullptr ) );
- Reference < XInteractionHandler > xIHScoped( static_cast< XInteractionHandler *> (
- new comphelper::SimpleFileAccessInteraction( xIH ) ) );
+ css::task::InteractionHandler::createWithParent(comphelper::getProcessComponentContext(), xParentWin));
+ Reference<XInteractionHandler> xIHScoped(new comphelper::SimpleFileAccessInteraction(xIH));
return lcl_CreateStream( rFileName, eOpenMode, xIHScoped,!bFileExists );
}