set parent for insert media file dialog
Change-Id: I71eace1995b229caa75e61df363fd8bad981bed1 Reviewed-on: https://gerrit.libreoffice.org/41851 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
This commit is contained in:
@@ -296,7 +296,7 @@ IMPL_LINK( MediaControl, implSelectHdl, ToolBox*, p, void )
|
|||||||
{
|
{
|
||||||
OUString aURL;
|
OUString aURL;
|
||||||
|
|
||||||
if (MediaWindow::executeMediaURLDialog(aURL, nullptr))
|
if (MediaWindow::executeMediaURLDialog(this, aURL, nullptr))
|
||||||
{
|
{
|
||||||
if( !MediaWindow::isMediaURL( aURL, ""/*TODO?*/, true ) )
|
if( !MediaWindow::isMediaURL( aURL, ""/*TODO?*/, true ) )
|
||||||
MediaWindow::executeFormatErrorBox( this );
|
MediaWindow::executeFormatErrorBox( this );
|
||||||
|
@@ -209,11 +209,12 @@ void MediaWindow::getMediaFilters( FilterNameVector& rFilterNameVector )
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool MediaWindow::executeMediaURLDialog(OUString& rURL, bool *const o_pbLink)
|
bool MediaWindow::executeMediaURLDialog(const vcl::Window* pParent, OUString& rURL, bool *const o_pbLink)
|
||||||
{
|
{
|
||||||
::sfx2::FileDialogHelper aDlg( o_pbLink
|
::sfx2::FileDialogHelper aDlg(o_pbLink
|
||||||
? ui::dialogs::TemplateDescription::FILEOPEN_LINK_PREVIEW
|
? ui::dialogs::TemplateDescription::FILEOPEN_LINK_PREVIEW
|
||||||
: ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE );
|
: ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE,
|
||||||
|
FileDialogFlags::NONE, pParent);
|
||||||
static const char aWildcard[] = "*.";
|
static const char aWildcard[] = "*.";
|
||||||
FilterNameVector aFilters;
|
FilterNameVector aFilters;
|
||||||
static const char aSeparator[] = ";";
|
static const char aSeparator[] = ";";
|
||||||
|
@@ -98,7 +98,7 @@ namespace avmedia
|
|||||||
static void getMediaFilters( FilterNameVector& rFilterNameVector );
|
static void getMediaFilters( FilterNameVector& rFilterNameVector );
|
||||||
/// @param o_pbLink if not 0, this is an "insert" dialog: display link
|
/// @param o_pbLink if not 0, this is an "insert" dialog: display link
|
||||||
/// checkbox and store its state in *o_pbLink
|
/// checkbox and store its state in *o_pbLink
|
||||||
static bool executeMediaURLDialog( OUString& rURL, bool *const o_pbLink );
|
static bool executeMediaURLDialog(const vcl::Window* pParent, OUString& rURL, bool *const o_pbLink);
|
||||||
static void executeFormatErrorBox( vcl::Window* pParent );
|
static void executeFormatErrorBox( vcl::Window* pParent );
|
||||||
static bool isMediaURL( const OUString& rURL, const OUString& rReferer, bool bDeep = false, Size* pPreferredSizePixel = nullptr );
|
static bool isMediaURL( const OUString& rURL, const OUString& rReferer, bool bDeep = false, Size* pPreferredSizePixel = nullptr );
|
||||||
|
|
||||||
|
@@ -290,7 +290,7 @@ FuInsertGraphic::~FuInsertGraphic()
|
|||||||
}
|
}
|
||||||
|
|
||||||
FuInsertMedia::FuInsertMedia( ScTabViewShell* pViewSh,
|
FuInsertMedia::FuInsertMedia( ScTabViewShell* pViewSh,
|
||||||
vcl::Window* pWin,
|
vcl::Window* pWin,
|
||||||
ScDrawView* pViewP,
|
ScDrawView* pViewP,
|
||||||
SdrModel* pDoc,
|
SdrModel* pDoc,
|
||||||
const SfxRequest& rReq ) :
|
const SfxRequest& rReq ) :
|
||||||
@@ -312,8 +312,7 @@ FuInsertMedia::FuInsertMedia( ScTabViewShell* pViewSh,
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool bLink(true);
|
bool bLink(true);
|
||||||
if (bAPI ||
|
if (bAPI || ::avmedia::MediaWindow::executeMediaURLDialog(pWin, aURL, &bLink))
|
||||||
::avmedia::MediaWindow::executeMediaURLDialog(aURL, & bLink))
|
|
||||||
{
|
{
|
||||||
Size aPrefSize;
|
Size aPrefSize;
|
||||||
|
|
||||||
|
@@ -708,8 +708,7 @@ void FuInsertAVMedia::DoExecute( SfxRequest& rReq )
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool bLink(true);
|
bool bLink(true);
|
||||||
if (bAPI ||
|
if (bAPI || ::avmedia::MediaWindow::executeMediaURLDialog(mpWindow, aURL, & bLink))
|
||||||
::avmedia::MediaWindow::executeMediaURLDialog(aURL, & bLink))
|
|
||||||
{
|
{
|
||||||
Size aPrefSize;
|
Size aPrefSize;
|
||||||
|
|
||||||
|
@@ -74,8 +74,7 @@ bool SwTextShell::InsertMediaDlg( SfxRequest const & rReq )
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool bLink(true);
|
bool bLink(true);
|
||||||
if (bAPI ||
|
if (bAPI || ::avmedia::MediaWindow::executeMediaURLDialog(pWindow, aURL, & bLink))
|
||||||
::avmedia::MediaWindow::executeMediaURLDialog(aURL, & bLink))
|
|
||||||
{
|
{
|
||||||
Size aPrefSize;
|
Size aPrefSize;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user