summaryrefslogtreecommitdiff
path: root/sw/source/uibase
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/uibase')
-rw-r--r--sw/source/uibase/app/docsh2.cxx6
-rw-r--r--sw/source/uibase/dbui/dbmgr.cxx2
-rw-r--r--sw/source/uibase/dbui/mailmergehelper.cxx2
-rw-r--r--sw/source/uibase/docvw/romenu.cxx2
-rw-r--r--sw/source/uibase/inc/mailmergehelper.hxx2
-rw-r--r--sw/source/uibase/shells/drawsh.cxx2
-rw-r--r--sw/source/uibase/shells/grfsh.cxx4
-rw-r--r--sw/source/uibase/shells/grfshex.cxx22
-rw-r--r--sw/source/uibase/uiview/srcview.cxx2
-rw-r--r--sw/source/uibase/uiview/uivwimp.cxx2
-rw-r--r--sw/source/uibase/uiview/view2.cxx2
-rw-r--r--sw/source/uibase/utlui/glbltree.cxx2
12 files changed, 21 insertions, 29 deletions
diff --git a/sw/source/uibase/app/docsh2.cxx b/sw/source/uibase/app/docsh2.cxx
index 472c68a584eb..7f7df1db893e 100644
--- a/sw/source/uibase/app/docsh2.cxx
+++ b/sw/source/uibase/app/docsh2.cxx
@@ -509,7 +509,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
if(RET_TEMPLATE_LOAD == nRet)
{
FileDialogHelper aDlgHelper(TemplateDescription::FILEOPEN_SIMPLE,
- FileDialogFlags::NONE, &GetView()->GetViewFrame()->GetWindow());
+ FileDialogFlags::NONE, GetView()->GetViewFrame()->GetWindow().GetFrameWeld());
uno::Reference < XFilePicker3 > xFP = aDlgHelper.GetFilePicker();
xFP->setDisplayDirectory( aPathOpt.GetWorkPath() );
@@ -622,7 +622,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
{
FileDialogHelper aDlgHelper(TemplateDescription::FILESAVE_AUTOEXTENSION,
FileDialogFlags::NONE,
- &GetView()->GetViewFrame()->GetWindow());
+ GetView()->GetViewFrame()->GetWindow().GetFrameWeld());
aDlgHelper.AddFilter( pHtmlFlt->GetFilterName(), pHtmlFlt->GetDefaultExtension() );
aDlgHelper.SetCurrentFilter( pHtmlFlt->GetFilterName() );
if( ERRCODE_NONE != aDlgHelper.Execute())
@@ -882,7 +882,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
bool bError = false;
FileDialogHelper aDlgHelper(TemplateDescription::FILESAVE_AUTOEXTENSION_TEMPLATE, FileDialogFlags::NONE,
- &GetView()->GetViewFrame()->GetWindow());
+ GetView()->GetViewFrame()->GetWindow().GetFrameWeld());
const sal_Int16 nControlIds[] = {
CommonFilePickerElementIds::PUSHBUTTON_OK,
diff --git a/sw/source/uibase/dbui/dbmgr.cxx b/sw/source/uibase/dbui/dbmgr.cxx
index ff6bf6a16b2b..31925ff0ce64 100644
--- a/sw/source/uibase/dbui/dbmgr.cxx
+++ b/sw/source/uibase/dbui/dbmgr.cxx
@@ -2832,7 +2832,7 @@ OUString ConstructVndSunStarPkgUrl(const OUString& rMainURL, const OUString& rSt
}
}
-OUString SwDBManager::LoadAndRegisterDataSource(const vcl::Window* pParent, SwDocShell* pDocShell)
+OUString SwDBManager::LoadAndRegisterDataSource(weld::Window* pParent, SwDocShell* pDocShell)
{
sfx2::FileDialogHelper aDlgHelper(ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE, FileDialogFlags::NONE, pParent);
uno::Reference < ui::dialogs::XFilePicker3 > xFP = aDlgHelper.GetFilePicker();
diff --git a/sw/source/uibase/dbui/mailmergehelper.cxx b/sw/source/uibase/dbui/mailmergehelper.cxx
index f42ace586ebb..7345797b1d67 100644
--- a/sw/source/uibase/dbui/mailmergehelper.cxx
+++ b/sw/source/uibase/dbui/mailmergehelper.cxx
@@ -52,7 +52,7 @@ using namespace ::com::sun::star::sdbcx;
namespace SwMailMergeHelper
{
-OUString CallSaveAsDialog(const vcl::Window* pParent, OUString& rFilter)
+OUString CallSaveAsDialog(weld::Window* pParent, OUString& rFilter)
{
::sfx2::FileDialogHelper aDialog( ui::dialogs::TemplateDescription::FILESAVE_AUTOEXTENSION,
FileDialogFlags::NONE,
diff --git a/sw/source/uibase/docvw/romenu.cxx b/sw/source/uibase/docvw/romenu.cxx
index 0a1e8f5b5345..d38fc606b38f 100644
--- a/sw/source/uibase/docvw/romenu.cxx
+++ b/sw/source/uibase/docvw/romenu.cxx
@@ -373,7 +373,7 @@ OUString SwReadOnlyPopup::SaveGraphic(sal_uInt16 nId)
else
return OUString();
}
- return GraphicHelper::ExportGraphic(m_rView.GetWindow(), m_aGraphic, m_sGrfName);
+ return GraphicHelper::ExportGraphic(m_rView.GetFrameWeld(), m_aGraphic, m_sGrfName);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/uibase/inc/mailmergehelper.hxx b/sw/source/uibase/inc/mailmergehelper.hxx
index 053f409fc921..a627dc590d6d 100644
--- a/sw/source/uibase/inc/mailmergehelper.hxx
+++ b/sw/source/uibase/inc/mailmergehelper.hxx
@@ -42,7 +42,7 @@ namespace com { namespace sun { namespace star { namespace mail {
namespace SwMailMergeHelper
{
- SW_DLLPUBLIC OUString CallSaveAsDialog(const vcl::Window* pParent, OUString& rFilter);
+ SW_DLLPUBLIC OUString CallSaveAsDialog(weld::Window* pParent, OUString& rFilter);
SW_DLLPUBLIC bool CheckMailAddress(const OUString& rMailAddress);
SW_DLLPUBLIC css::uno::Reference<css::mail::XSmtpService> ConnectToSmtpServer(
SwMailMergeConfigItem const & rConfigItem,
diff --git a/sw/source/uibase/shells/drawsh.cxx b/sw/source/uibase/shells/drawsh.cxx
index d3876b4efc58..2f84dc2fed6c 100644
--- a/sw/source/uibase/shells/drawsh.cxx
+++ b/sw/source/uibase/shells/drawsh.cxx
@@ -122,7 +122,7 @@ void SwDrawShell::InsertPictureFromFile(SdrObject& rObject)
if(pSdrView)
{
- SvxOpenGraphicDialog aDlg(SwResId(STR_INSERT_GRAPHIC), &GetView().GetViewFrame()->GetWindow());
+ SvxOpenGraphicDialog aDlg(SwResId(STR_INSERT_GRAPHIC), GetView().GetViewFrame()->GetWindow().GetFrameWeld());
if (ERRCODE_NONE == aDlg.Execute())
{
diff --git a/sw/source/uibase/shells/grfsh.cxx b/sw/source/uibase/shells/grfsh.cxx
index a91688561fb4..b4b460cc4c82 100644
--- a/sw/source/uibase/shells/grfsh.cxx
+++ b/sw/source/uibase/shells/grfsh.cxx
@@ -177,7 +177,7 @@ void SwGrfShell::Execute(SfxRequest &rReq)
OUString sGrfNm;
OUString sFilterNm;
rSh.GetGrfNms( &sGrfNm, &sFilterNm );
- GraphicHelper::ExportGraphic(&GetView().GetViewFrame()->GetWindow(), aGraphic, sGrfNm);
+ GraphicHelper::ExportGraphic(GetView().GetViewFrame()->GetWindow().GetFrameWeld(), aGraphic, sGrfNm);
}
}
else if (nState == RET_NO)
@@ -188,7 +188,7 @@ void SwGrfShell::Execute(SfxRequest &rReq)
OUString sGrfNm;
OUString sFilterNm;
rSh.GetGrfNms( &sGrfNm, &sFilterNm );
- GraphicHelper::ExportGraphic(&GetView().GetViewFrame()->GetWindow(), *pGraphic, sGrfNm);
+ GraphicHelper::ExportGraphic(GetView().GetViewFrame()->GetWindow().GetFrameWeld(), *pGraphic, sGrfNm);
}
}
}
diff --git a/sw/source/uibase/shells/grfshex.cxx b/sw/source/uibase/shells/grfshex.cxx
index 7b2562b0ee99..6536cf576d97 100644
--- a/sw/source/uibase/shells/grfshex.cxx
+++ b/sw/source/uibase/shells/grfshex.cxx
@@ -60,7 +60,7 @@ bool SwTextShell::InsertMediaDlg( SfxRequest const & rReq )
{
OUString aURL;
const SfxItemSet* pReqArgs = rReq.GetArgs();
- vcl::Window* pWindow = &GetView().GetViewFrame()->GetWindow();
+ vcl::Window& rWindow = GetView().GetViewFrame()->GetWindow();
bool bAPI = false, bRet = false;
if( pReqArgs )
@@ -74,20 +74,18 @@ bool SwTextShell::InsertMediaDlg( SfxRequest const & rReq )
}
bool bLink(true);
- if (bAPI || ::avmedia::MediaWindow::executeMediaURLDialog(pWindow, aURL, & bLink))
+ if (bAPI || ::avmedia::MediaWindow::executeMediaURLDialog(rWindow.GetFrameWeld(), aURL, & bLink))
{
Size aPrefSize;
- if( pWindow )
- pWindow->EnterWait();
+ rWindow.EnterWait();
if( !::avmedia::MediaWindow::isMediaURL( aURL, "", true, &aPrefSize ) )
{
- if( pWindow )
- pWindow->LeaveWait();
+ rWindow.LeaveWait();
if( !bAPI )
- ::avmedia::MediaWindow::executeFormatErrorBox(pWindow ? pWindow->GetFrameWeld() : nullptr);
+ ::avmedia::MediaWindow::executeFormatErrorBox(rWindow.GetFrameWeld());
}
else
{
@@ -108,12 +106,7 @@ bool SwTextShell::InsertMediaDlg( SfxRequest const & rReq )
aPos.setY( aDocSz.Height() / 2 + rVisArea.Top() );
if( aPrefSize.Width() && aPrefSize.Height() )
- {
- if( pWindow )
- aSize = pWindow->PixelToLogic(aPrefSize, MapMode(MapUnit::MapTwip));
- else
- aSize = Application::GetDefaultDevice()->PixelToLogic(aPrefSize, MapMode(MapUnit::MapTwip));
- }
+ aSize = rWindow.PixelToLogic(aPrefSize, MapMode(MapUnit::MapTwip));
else
aSize = Size( 2835, 2835 );
@@ -138,8 +131,7 @@ bool SwTextShell::InsertMediaDlg( SfxRequest const & rReq )
rSh.SwFEShell::InsertDrawObj( *pObj, aPos );
bRet = true;
- if( pWindow )
- pWindow->LeaveWait();
+ rWindow.LeaveWait();
}
}
diff --git a/sw/source/uibase/uiview/srcview.cxx b/sw/source/uibase/uiview/srcview.cxx
index 5e263e45f808..84a3dd598a72 100644
--- a/sw/source/uibase/uiview/srcview.cxx
+++ b/sw/source/uibase/uiview/srcview.cxx
@@ -291,7 +291,7 @@ void SwSrcView::Execute(SfxRequest& rReq)
// filesave dialog with autoextension
FileDialogHelper aDlgHelper(
TemplateDescription::FILESAVE_AUTOEXTENSION,
- FileDialogFlags::NONE, aEditWin);
+ FileDialogFlags::NONE, aEditWin->GetFrameWeld());
uno::Reference < XFilePicker3 > xFP = aDlgHelper.GetFilePicker();
uno::Reference<XFilterManager> xFltMgr(xFP, UNO_QUERY);
diff --git a/sw/source/uibase/uiview/uivwimp.cxx b/sw/source/uibase/uiview/uivwimp.cxx
index 4a3678340125..70d688111a4b 100644
--- a/sw/source/uibase/uiview/uivwimp.cxx
+++ b/sw/source/uibase/uiview/uivwimp.cxx
@@ -262,7 +262,7 @@ void SwView_Impl::StartDocumentInserter(
}
delete m_pDocInserter;
- m_pDocInserter = new ::sfx2::DocumentInserter(pView->GetWindow(), rFactory, mode);
+ m_pDocInserter = new ::sfx2::DocumentInserter(pView->GetFrameWeld(), rFactory, mode);
m_pDocInserter->StartExecuteModal( rEndDialogHdl );
}
diff --git a/sw/source/uibase/uiview/view2.cxx b/sw/source/uibase/uiview/view2.cxx
index 8e5f4c376d64..713e369d7148 100644
--- a/sw/source/uibase/uiview/view2.cxx
+++ b/sw/source/uibase/uiview/view2.cxx
@@ -287,7 +287,7 @@ bool SwView::InsertGraphicDlg( SfxRequest& rReq )
// when in HTML mode insert only as a link
std::unique_ptr<FileDialogHelper> pFileDlg(new FileDialogHelper(
ui::dialogs::TemplateDescription::FILEOPEN_LINK_PREVIEW_IMAGE_TEMPLATE,
- FileDialogFlags::Graphic, GetWindow()));
+ FileDialogFlags::Graphic, GetFrameWeld()));
pFileDlg->SetTitle(SwResId(STR_INSERT_GRAPHIC ));
pFileDlg->SetContext( FileDialogHelper::SW_INSERT_GRAPHIC );
uno::Reference < XFilePicker3 > xFP = pFileDlg->GetFilePicker();
diff --git a/sw/source/uibase/utlui/glbltree.cxx b/sw/source/uibase/utlui/glbltree.cxx
index 8c15eb15d787..65d78987406b 100644
--- a/sw/source/uibase/utlui/glbltree.cxx
+++ b/sw/source/uibase/utlui/glbltree.cxx
@@ -741,7 +741,7 @@ void SwGlobalTree::InsertRegion( const SwGlblDocContent* pCont, const OUString*
if ( !pFileName )
{
delete m_pDocInserter;
- m_pDocInserter = new ::sfx2::DocumentInserter(this, "swriter", sfx2::DocumentInserter::Mode::InsertMulti);
+ m_pDocInserter = new ::sfx2::DocumentInserter(GetFrameWeld(), "swriter", sfx2::DocumentInserter::Mode::InsertMulti);
m_pDocInserter->StartExecuteModal( LINK( this, SwGlobalTree, DialogClosedHdl ) );
}
else if ( !pFileName->isEmpty() )