diff options
Diffstat (limited to 'sfx2/source/doc/guisaveas.cxx')
-rw-r--r-- | sfx2/source/doc/guisaveas.cxx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx index cbdde2efbb52..428d9d35128f 100644 --- a/sfx2/source/doc/guisaveas.cxx +++ b/sfx2/source/doc/guisaveas.cxx @@ -867,6 +867,7 @@ bool ModelData_Impl::OutputFileDialog( sal_Int16 nStoreMode, SfxFilterFlags nDont = getDontFlags( nStoreMode ); sfx2::FileDialogHelper::Context eCtxt = sfx2::FileDialogHelper::UNKNOWN_CONTEXT; vcl::Window* pWin = SfxStoringHelper::GetModelWindow( m_xModel ); + weld::Window* pFrameWin = pWin ? pWin->GetFrameWeld() : nullptr; if ( ( nStoreMode & EXPORT_REQUESTED ) && !( nStoreMode & WIDEEXPORT_REQUESTED ) ) { if ( ( nStoreMode & PDFEXPORT_REQUESTED ) && !aPreselectedFilterPropsHM.empty() ) @@ -874,20 +875,20 @@ bool ModelData_Impl::OutputFileDialog( sal_Int16 nStoreMode, // this is a PDF export // the filter options has been shown already const OUString aFilterUIName = aPreselectedFilterPropsHM.getUnpackedValueOrDefault( "UIName", OUString() ); - pFileDlg.reset(new sfx2::FileDialogHelper( aDialogMode, aDialogFlags, aFilterUIName, "pdf", rStandardDir, rBlackList, pWin )); + pFileDlg.reset(new sfx2::FileDialogHelper( aDialogMode, aDialogFlags, aFilterUIName, "pdf", rStandardDir, rBlackList, pFrameWin )); pFileDlg->SetCurrentFilter( aFilterUIName ); } else if ((nStoreMode & EPUBEXPORT_REQUESTED) && !aPreselectedFilterPropsHM.empty()) { // This is an EPUB export, the filter options has been shown already. const OUString aFilterUIName = aPreselectedFilterPropsHM.getUnpackedValueOrDefault( "UIName", OUString() ); - pFileDlg.reset(new sfx2::FileDialogHelper(aDialogMode, aDialogFlags, aFilterUIName, "epub", rStandardDir, rBlackList, pWin)); + pFileDlg.reset(new sfx2::FileDialogHelper(aDialogMode, aDialogFlags, aFilterUIName, "epub", rStandardDir, rBlackList, pFrameWin)); pFileDlg->SetCurrentFilter(aFilterUIName); } else { // This is the normal dialog - pFileDlg.reset(new sfx2::FileDialogHelper( aDialogMode, aDialogFlags, aDocServiceName, nDialog, nMust, nDont, rStandardDir, rBlackList, pWin )); + pFileDlg.reset(new sfx2::FileDialogHelper( aDialogMode, aDialogFlags, aDocServiceName, nDialog, nMust, nDont, rStandardDir, rBlackList, pFrameWin )); } if ( aDocServiceName == "com.sun.star.drawing.DrawingDocument" ) @@ -916,7 +917,7 @@ bool ModelData_Impl::OutputFileDialog( sal_Int16 nStoreMode, { // This is the normal dialog pFileDlg.reset(new sfx2::FileDialogHelper( aDialogMode, aDialogFlags, aDocServiceName, nDialog, - nMust, nDont, rStandardDir, rBlackList, pWin )); + nMust, nDont, rStandardDir, rBlackList, pFrameWin )); pFileDlg->CreateMatcher( aDocServiceName ); } |