summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-04-04 14:33:16 +0100
committerCaolán McNamara <caolanm@redhat.com>2018-04-06 16:48:12 +0200
commit8ed2fb306ffa8c7fef336b858fc5074c309c3c9f (patch)
tree8699322ccfd3bfef66af56437bb9dabfa249a719 /sd
parent79ae6cc6b3b19252473f6987106ea7d8aa17a5ea (diff)
weld linkeditdialog
which enables changing FileDialogHelper over to welded Change-Id: I988342a6574cb7ed09b2724929e8c7117474a56c Reviewed-on: https://gerrit.libreoffice.org/52388 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/animations/CustomAnimationDialog.cxx2
-rw-r--r--sd/source/ui/animations/SlideTransitionPane.cxx2
-rw-r--r--sd/source/ui/dlg/PhotoAlbumDialog.cxx3
-rw-r--r--sd/source/ui/dlg/filedlg.cxx14
-rw-r--r--sd/source/ui/dlg/tpaction.cxx4
-rw-r--r--sd/source/ui/func/fuinsert.cxx4
-rw-r--r--sd/source/ui/func/fuinsfil.cxx2
-rw-r--r--sd/source/ui/func/fupage.cxx4
-rw-r--r--sd/source/ui/inc/filedlg.hxx2
-rw-r--r--sd/source/ui/inc/fupage.hxx2
-rw-r--r--sd/source/ui/view/drviews2.cxx5
11 files changed, 21 insertions, 23 deletions
diff --git a/sd/source/ui/animations/CustomAnimationDialog.cxx b/sd/source/ui/animations/CustomAnimationDialog.cxx
index 05cc70385499..457ab8c8ba9e 100644
--- a/sd/source/ui/animations/CustomAnimationDialog.cxx
+++ b/sd/source/ui/animations/CustomAnimationDialog.cxx
@@ -1494,7 +1494,7 @@ sal_Int32 CustomAnimationEffectTabPage::getSoundObject( const OUString& rStr )
void CustomAnimationEffectTabPage::openSoundFileDialog()
{
- SdOpenSoundFileDialog aFileDialog(this);
+ SdOpenSoundFileDialog aFileDialog(GetFrameWeld());
OUString aFile( SvtPathOptions().GetWorkPath() );
aFileDialog.SetPath( aFile );
diff --git a/sd/source/ui/animations/SlideTransitionPane.cxx b/sd/source/ui/animations/SlideTransitionPane.cxx
index f830ecc8c355..1ada6a56eac5 100644
--- a/sd/source/ui/animations/SlideTransitionPane.cxx
+++ b/sd/source/ui/animations/SlideTransitionPane.cxx
@@ -733,7 +733,7 @@ void SlideTransitionPane::openSoundFileDialog()
if( ! mpLB_SOUND->IsEnabled())
return;
- SdOpenSoundFileDialog aFileDialog(this);
+ SdOpenSoundFileDialog aFileDialog(GetFrameWeld());
OUString aFile;
DBG_ASSERT( mpLB_SOUND->GetSelectedEntryPos() == 2,
diff --git a/sd/source/ui/dlg/PhotoAlbumDialog.cxx b/sd/source/ui/dlg/PhotoAlbumDialog.cxx
index 739548ce570d..513dc00781c5 100644
--- a/sd/source/ui/dlg/PhotoAlbumDialog.cxx
+++ b/sd/source/ui/dlg/PhotoAlbumDialog.cxx
@@ -547,8 +547,7 @@ IMPL_LINK_NOARG(SdPhotoAlbumDialog, FileHdl, Button*, void)
{
::sfx2::FileDialogHelper aDlg(
css::ui::dialogs::TemplateDescription::FILEOPEN_PREVIEW,
- FileDialogFlags::Graphic | FileDialogFlags::MultiSelection, this
- );
+ FileDialogFlags::Graphic | FileDialogFlags::MultiSelection, GetFrameWeld());
// Read configuration
OUString sUrl(officecfg::Office::Impress::Pictures::Path::get());
diff --git a/sd/source/ui/dlg/filedlg.cxx b/sd/source/ui/dlg/filedlg.cxx
index 2b41dbb4886a..25f07dca28e3 100644
--- a/sd/source/ui/dlg/filedlg.cxx
+++ b/sd/source/ui/dlg/filedlg.cxx
@@ -57,7 +57,7 @@ private:
DECL_LINK( IsMusicStoppedHdl, Timer *, void );
public:
- explicit SdFileDialog_Imp(const vcl::Window *pParent);
+ explicit SdFileDialog_Imp(weld::Window *pParent);
virtual ~SdFileDialog_Imp() override;
// overwritten from FileDialogHelper, to receive user feedback
@@ -172,10 +172,10 @@ IMPL_LINK_NOARG(SdFileDialog_Imp, IsMusicStoppedHdl, Timer *, void)
}
}
-SdFileDialog_Imp::SdFileDialog_Imp(const vcl::Window* pParent) :
- FileDialogHelper(css::ui::dialogs::TemplateDescription::FILEOPEN_LINK_PLAY, FileDialogFlags::NONE, pParent),
- mnPlaySoundEvent( nullptr ),
- mbLabelPlaying(false)
+SdFileDialog_Imp::SdFileDialog_Imp(weld::Window* pParent)
+ : FileDialogHelper(css::ui::dialogs::TemplateDescription::FILEOPEN_LINK_PLAY, FileDialogFlags::NONE, pParent)
+ , mnPlaySoundEvent(nullptr)
+ , mbLabelPlaying(false)
{
maUpdateIdle.SetInvokeHandler(LINK(this, SdFileDialog_Imp, IsMusicStoppedHdl));
maUpdateIdle.SetDebugName( "SdFileDialog_Imp maUpdateIdle" );
@@ -210,8 +210,8 @@ SdFileDialog_Imp::~SdFileDialog_Imp()
// ----------- SdOpenSoundFileDialog -----------------------
// these are simple forwarders
-SdOpenSoundFileDialog::SdOpenSoundFileDialog(const vcl::Window *pParent) :
- mpImpl( new SdFileDialog_Imp(pParent) )
+SdOpenSoundFileDialog::SdOpenSoundFileDialog(weld::Window *pParent)
+ : mpImpl(new SdFileDialog_Imp(pParent))
{
OUString aDescr;
aDescr = SdResId(STR_ALL_FILES);
diff --git a/sd/source/ui/dlg/tpaction.cxx b/sd/source/ui/dlg/tpaction.cxx
index d0d31a001f26..643a7c6fa460 100644
--- a/sd/source/ui/dlg/tpaction.cxx
+++ b/sd/source/ui/dlg/tpaction.cxx
@@ -409,7 +409,7 @@ void SdTPAction::OpenFileDialog()
if (bSound)
{
- SdOpenSoundFileDialog aFileDialog(this);
+ SdOpenSoundFileDialog aFileDialog(GetFrameWeld());
if( aFile.isEmpty() )
aFile = SvtPathOptions().GetWorkPath();
@@ -436,7 +436,7 @@ void SdTPAction::OpenFileDialog()
{
sfx2::FileDialogHelper aFileDialog(
ui::dialogs::TemplateDescription::FILEOPEN_READONLY_VERSION,
- FileDialogFlags::NONE, this);
+ FileDialogFlags::NONE, GetFrameWeld());
if (bDocument && aFile.isEmpty())
aFile = SvtPathOptions().GetWorkPath();
diff --git a/sd/source/ui/func/fuinsert.cxx b/sd/source/ui/func/fuinsert.cxx
index 312a03d4c557..0cdd22da3807 100644
--- a/sd/source/ui/func/fuinsert.cxx
+++ b/sd/source/ui/func/fuinsert.cxx
@@ -139,7 +139,7 @@ void FuInsertGraphic::DoExecute( SfxRequest& rReq )
}
else
{
- SvxOpenGraphicDialog aDlg(SdResId(STR_INSERTGRAPHIC), mpWindow);
+ SvxOpenGraphicDialog aDlg(SdResId(STR_INSERTGRAPHIC), mpWindow ? mpWindow->GetFrameWeld() : nullptr);
if( aDlg.Execute() != ERRCODE_NONE )
return; // cancel dialog
@@ -707,7 +707,7 @@ void FuInsertAVMedia::DoExecute( SfxRequest& rReq )
bool bLink(true);
if (bAPI
#if HAVE_FEATURE_AVMEDIA
- || ::avmedia::MediaWindow::executeMediaURLDialog(mpWindow, aURL, & bLink)
+ || ::avmedia::MediaWindow::executeMediaURLDialog(mpWindow ? mpWindow->GetFrameWeld() : nullptr, aURL, & bLink)
#endif
)
{
diff --git a/sd/source/ui/func/fuinsfil.cxx b/sd/source/ui/func/fuinsfil.cxx
index bc1956e2993a..fae84526e97f 100644
--- a/sd/source/ui/func/fuinsfil.cxx
+++ b/sd/source/ui/func/fuinsfil.cxx
@@ -138,7 +138,7 @@ void FuInsertFile::DoExecute( SfxRequest& rReq )
{
sfx2::FileDialogHelper aFileDialog(
ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE,
- FileDialogFlags::Insert, mpWindow);
+ FileDialogFlags::Insert, mpWindow ? mpWindow->GetFrameWeld() : nullptr);
Reference< XFilePicker > xFilePicker( aFileDialog.GetFilePicker(), UNO_QUERY );
Reference< XFilterManager > xFilterManager( xFilePicker, UNO_QUERY );
OUString aOwnCont;
diff --git a/sd/source/ui/func/fupage.cxx b/sd/source/ui/func/fupage.cxx
index 18931db2369a..17527c912d3f 100644
--- a/sd/source/ui/func/fupage.cxx
+++ b/sd/source/ui/func/fupage.cxx
@@ -145,7 +145,7 @@ void FuPage::DoExecute( SfxRequest& )
if( !mpArgs )
{
mpView->SdrEndTextEdit();
- mpArgs = ExecuteDialog(mpWindow);
+ mpArgs = ExecuteDialog(mpWindow ? mpWindow->GetFrameWeld() : nullptr);
}
// if we now have arguments, apply them to current page
@@ -203,7 +203,7 @@ void MergePageBackgroundFilling(SdPage *pPage, SdStyleSheet *pStyleSheet, bool b
}
}
-const SfxItemSet* FuPage::ExecuteDialog( vcl::Window const * pParent )
+const SfxItemSet* FuPage::ExecuteDialog(weld::Window* pParent)
{
if (!mpDrawViewShell)
return nullptr;
diff --git a/sd/source/ui/inc/filedlg.hxx b/sd/source/ui/inc/filedlg.hxx
index 619195e01089..36da05e13933 100644
--- a/sd/source/ui/inc/filedlg.hxx
+++ b/sd/source/ui/inc/filedlg.hxx
@@ -44,7 +44,7 @@ class SD_DLLPUBLIC SdOpenSoundFileDialog
SdOpenSoundFileDialog & operator= (const SdOpenSoundFileDialog &) = delete;
public:
- SdOpenSoundFileDialog(const vcl::Window* pParent);
+ SdOpenSoundFileDialog(weld::Window* pParent);
~SdOpenSoundFileDialog();
ErrCode Execute();
diff --git a/sd/source/ui/inc/fupage.hxx b/sd/source/ui/inc/fupage.hxx
index b1912e3576fa..b2e19efa4245 100644
--- a/sd/source/ui/inc/fupage.hxx
+++ b/sd/source/ui/inc/fupage.hxx
@@ -41,7 +41,7 @@ class FuPage
virtual void Activate() override;
virtual void Deactivate() override;
- const SfxItemSet* ExecuteDialog( vcl::Window const * pParent );
+ const SfxItemSet* ExecuteDialog(weld::Window* pParent);
protected:
virtual ~FuPage() override;
diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx
index 04631d87f861..f61052b4cb68 100644
--- a/sd/source/ui/view/drviews2.cxx
+++ b/sd/source/ui/view/drviews2.cxx
@@ -1286,7 +1286,6 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
const SdrGrafObj* pObj = dynamic_cast<const SdrGrafObj*>(rMarkList.GetMark(0)->GetMarkedSdrObj());
if (pObj && pObj->GetGraphicType() == GraphicType::Bitmap)
{
- vcl::Window* pWin = GetActiveWindow();
weld::Window* pFrame = GetFrameWeld();
GraphicAttr aGraphicAttr = pObj->GetGraphicAttr();
short nState = RET_CANCEL;
@@ -1304,12 +1303,12 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
if (nState == RET_YES)
{
- GraphicHelper::ExportGraphic(pWin, pObj->GetTransformedGraphic(), "");
+ GraphicHelper::ExportGraphic(pFrame, pObj->GetTransformedGraphic(), "");
}
else if (nState == RET_NO)
{
GraphicObject aGraphicObject(pObj->GetGraphicObject());
- GraphicHelper::ExportGraphic(pWin, aGraphicObject.GetGraphic(), "");
+ GraphicHelper::ExportGraphic(pFrame, aGraphicObject.GetGraphic(), "");
}
}
}