summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-05-11 13:07:30 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-05-12 06:57:19 +0000
commit1342818790083ec1324f76c4eb1813827a4f5b72 (patch)
tree998289c3aaeb78f41c10f88d8455f6cc46426886 /sw
parent0f4ac20e0456b32995f7a3aff4e46b59e64704a6 (diff)
convert SFXWB file dialog flags to scoped enum
Change-Id: I1ab5191dc582c46785da58d50b2e68c30b5cbc9b Reviewed-on: https://gerrit.libreoffice.org/24881 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/ui/chrdlg/chardlg.cxx2
-rw-r--r--sw/source/ui/dbui/createaddresslistdialog.cxx2
-rw-r--r--sw/source/ui/dbui/mmdocselectpage.cxx2
-rw-r--r--sw/source/ui/fldui/javaedit.cxx2
-rw-r--r--sw/source/ui/frmdlg/frmpage.cxx4
-rw-r--r--sw/source/ui/index/cnttab.cxx2
-rw-r--r--sw/source/ui/misc/glossary.cxx2
-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/uiview/srcview.cxx2
-rw-r--r--sw/source/uibase/uiview/view2.cxx2
12 files changed, 15 insertions, 15 deletions
diff --git a/sw/source/ui/chrdlg/chardlg.cxx b/sw/source/ui/chrdlg/chardlg.cxx
index 9ebfad1f79c6..860ecf1995eb 100644
--- a/sw/source/ui/chrdlg/chardlg.cxx
+++ b/sw/source/ui/chrdlg/chardlg.cxx
@@ -302,7 +302,7 @@ VclPtr<SfxTabPage> SwCharURLPage::Create( vcl::Window* pParent,
IMPL_LINK_NOARG_TYPED(SwCharURLPage, InsertFileHdl, Button*, void)
{
- FileDialogHelper aDlgHelper( TemplateDescription::FILEOPEN_SIMPLE, 0 );
+ FileDialogHelper aDlgHelper( TemplateDescription::FILEOPEN_SIMPLE );
if( aDlgHelper.Execute() == ERRCODE_NONE )
{
Reference < XFilePicker2 > xFP = aDlgHelper.GetFilePicker();
diff --git a/sw/source/ui/dbui/createaddresslistdialog.cxx b/sw/source/ui/dbui/createaddresslistdialog.cxx
index d1ef267898a2..06d4974c78ed 100644
--- a/sw/source/ui/dbui/createaddresslistdialog.cxx
+++ b/sw/source/ui/dbui/createaddresslistdialog.cxx
@@ -623,7 +623,7 @@ IMPL_LINK_NOARG_TYPED(SwCreateAddressListDialog, OkHdl_Impl, Button*, void)
{
if(m_sURL.isEmpty())
{
- sfx2::FileDialogHelper aDlgHelper( TemplateDescription::FILESAVE_SIMPLE, 0 );
+ sfx2::FileDialogHelper aDlgHelper( TemplateDescription::FILESAVE_SIMPLE );
uno::Reference < XFilePicker2 > xFP = aDlgHelper.GetFilePicker();
const OUString sPath( SvtPathOptions().SubstituteVariable("$(userurl)/database") );
diff --git a/sw/source/ui/dbui/mmdocselectpage.cxx b/sw/source/ui/dbui/mmdocselectpage.cxx
index 31232e600652..22bc4545791c 100644
--- a/sw/source/ui/dbui/mmdocselectpage.cxx
+++ b/sw/source/ui/dbui/mmdocselectpage.cxx
@@ -135,7 +135,7 @@ IMPL_LINK_TYPED(SwMailMergeDocSelectPage, FileSelectHdl, Button*, pButton, void)
if(!bTemplate)
{
- sfx2::FileDialogHelper aDlgHelper( TemplateDescription::FILEOPEN_SIMPLE, 0 );
+ sfx2::FileDialogHelper aDlgHelper( TemplateDescription::FILEOPEN_SIMPLE );
Reference < XFilePicker2 > xFP = aDlgHelper.GetFilePicker();
xFP->setDisplayDirectory( SvtPathOptions().GetWorkPath() );
diff --git a/sw/source/ui/fldui/javaedit.cxx b/sw/source/ui/fldui/javaedit.cxx
index 02e965df8511..df81c3c1cb29 100644
--- a/sw/source/ui/fldui/javaedit.cxx
+++ b/sw/source/ui/fldui/javaedit.cxx
@@ -260,7 +260,7 @@ IMPL_LINK_TYPED( SwJavaEditDialog, InsertFileHdl, Button *, pBtn, void )
pFileDlg = new ::sfx2::FileDialogHelper(
ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE,
- SFXWB_INSERT, OUString("swriter") );
+ FileDialogFlags::Insert, OUString("swriter") );
}
pFileDlg->StartExecuteModal( LINK( this, SwJavaEditDialog, DlgClosedHdl ) );
diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx
index 1944ca989be5..075a0b683565 100644
--- a/sw/source/ui/frmdlg/frmpage.cxx
+++ b/sw/source/ui/frmdlg/frmpage.cxx
@@ -2573,7 +2573,7 @@ IMPL_LINK_NOARG_TYPED(SwGrfExtPage, BrowseHdl, Button*, void)
{
pGrfDlg = new FileDialogHelper(
ui::dialogs::TemplateDescription::FILEOPEN_LINK_PREVIEW,
- SFXWB_GRAPHIC );
+ FileDialogFlags::Graphic );
pGrfDlg->SetTitle(get<VclFrame>("linkframe")->get_label());
}
pGrfDlg->SetDisplayDirectory( m_pConnectED->GetText() );
@@ -2841,7 +2841,7 @@ VclPtr<SfxTabPage> SwFrameURLPage::Create(vcl::Window *pParent, const SfxItemSet
IMPL_LINK_NOARG_TYPED(SwFrameURLPage, InsertFileHdl, Button*, void)
{
- FileDialogHelper aDlgHelper( ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE, 0 );
+ FileDialogHelper aDlgHelper( ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE );
uno::Reference < ui::dialogs::XFilePicker2 > xFP = aDlgHelper.GetFilePicker();
try
diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx
index 20662f2dea2c..4a329ebb372e 100644
--- a/sw/source/ui/index/cnttab.cxx
+++ b/sw/source/ui/index/cnttab.cxx
@@ -100,7 +100,7 @@ static OUString lcl_CreateAutoMarkFileDlg( const OUString& rURL,
OUString sRet;
FileDialogHelper aDlgHelper( bOpen ?
- TemplateDescription::FILEOPEN_SIMPLE : TemplateDescription::FILESAVE_AUTOEXTENSION, 0 );
+ TemplateDescription::FILEOPEN_SIMPLE : TemplateDescription::FILESAVE_AUTOEXTENSION );
uno::Reference < XFilePicker2 > xFP = aDlgHelper.GetFilePicker();
uno::Reference<XFilterManager> xFltMgr(xFP, UNO_QUERY);
diff --git a/sw/source/ui/misc/glossary.cxx b/sw/source/ui/misc/glossary.cxx
index 5043c77d6933..b84742525609 100644
--- a/sw/source/ui/misc/glossary.cxx
+++ b/sw/source/ui/misc/glossary.cxx
@@ -571,7 +571,7 @@ IMPL_LINK_TYPED( SwGlossaryDlg, MenuHdl, Menu *, pMn, bool )
else if (sItemIdent == "import")
{
// call the FileOpenDialog do find WinWord - Files with templates
- FileDialogHelper aDlgHelper( TemplateDescription::FILEOPEN_SIMPLE, 0 );
+ FileDialogHelper aDlgHelper( TemplateDescription::FILEOPEN_SIMPLE );
uno::Reference < XFilePicker2 > xFP = aDlgHelper.GetFilePicker();
SvtPathOptions aPathOpt;
diff --git a/sw/source/uibase/app/docsh2.cxx b/sw/source/uibase/app/docsh2.cxx
index 1273ff71ce67..83fca394af11 100644
--- a/sw/source/uibase/app/docsh2.cxx
+++ b/sw/source/uibase/app/docsh2.cxx
@@ -502,7 +502,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
nRet = pNewFileDlg->Execute();
if(RET_TEMPLATE_LOAD == nRet)
{
- FileDialogHelper aDlgHelper( TemplateDescription::FILEOPEN_SIMPLE, 0 );
+ FileDialogHelper aDlgHelper( TemplateDescription::FILEOPEN_SIMPLE );
uno::Reference < XFilePicker2 > xFP = aDlgHelper.GetFilePicker();
xFP->setDisplayDirectory( aPathOpt.GetWorkPath() );
@@ -614,7 +614,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
}
if(!bLocalHasName)
{
- FileDialogHelper aDlgHelper( TemplateDescription::FILESAVE_AUTOEXTENSION, 0 );
+ FileDialogHelper aDlgHelper( TemplateDescription::FILESAVE_AUTOEXTENSION );
aDlgHelper.AddFilter( pHtmlFlt->GetFilterName(), pHtmlFlt->GetDefaultExtension() );
aDlgHelper.SetCurrentFilter( pHtmlFlt->GetFilterName() );
if( ERRCODE_NONE != aDlgHelper.Execute())
@@ -876,7 +876,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
{
bool bError = false;
- FileDialogHelper aDlgHelper( TemplateDescription::FILESAVE_AUTOEXTENSION_TEMPLATE, 0 );
+ FileDialogHelper aDlgHelper( TemplateDescription::FILESAVE_AUTOEXTENSION_TEMPLATE );
const sal_Int16 nControlIds[] = {
CommonFilePickerElementIds::PUSHBUTTON_OK,
diff --git a/sw/source/uibase/dbui/dbmgr.cxx b/sw/source/uibase/dbui/dbmgr.cxx
index e19412807cba..576a9fa9adac 100644
--- a/sw/source/uibase/dbui/dbmgr.cxx
+++ b/sw/source/uibase/dbui/dbmgr.cxx
@@ -2498,7 +2498,7 @@ uno::Sequence<OUString> SwDBManager::GetExistingDatabaseNames()
OUString SwDBManager::LoadAndRegisterDataSource(SwDocShell* pDocShell)
{
- sfx2::FileDialogHelper aDlgHelper( ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE, 0 );
+ sfx2::FileDialogHelper aDlgHelper( ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE );
uno::Reference < ui::dialogs::XFilePicker2 > xFP = aDlgHelper.GetFilePicker();
OUString sHomePath(SvtPathOptions().GetWorkPath());
diff --git a/sw/source/uibase/dbui/mailmergehelper.cxx b/sw/source/uibase/dbui/mailmergehelper.cxx
index 97f59f5a9601..e8d6c36e42be 100644
--- a/sw/source/uibase/dbui/mailmergehelper.cxx
+++ b/sw/source/uibase/dbui/mailmergehelper.cxx
@@ -55,7 +55,7 @@ namespace SwMailMergeHelper
OUString CallSaveAsDialog(OUString& rFilter)
{
::sfx2::FileDialogHelper aDialog( ui::dialogs::TemplateDescription::FILESAVE_AUTOEXTENSION,
- 0,
+ FileDialogFlags::NONE,
OUString::createFromAscii(SwDocShell::Factory().GetShortName()) );
if (aDialog.Execute()!=ERRCODE_NONE)
diff --git a/sw/source/uibase/uiview/srcview.cxx b/sw/source/uibase/uiview/srcview.cxx
index 8e0b6c48fa16..b369b4e6c70a 100644
--- a/sw/source/uibase/uiview/srcview.cxx
+++ b/sw/source/uibase/uiview/srcview.cxx
@@ -298,7 +298,7 @@ void SwSrcView::Execute(SfxRequest& rReq)
SvtPathOptions aPathOpt;
// filesave dialog with autoextension
FileDialogHelper aDlgHelper(
- TemplateDescription::FILESAVE_AUTOEXTENSION, 0 );
+ TemplateDescription::FILESAVE_AUTOEXTENSION );
uno::Reference < XFilePicker2 > xFP = aDlgHelper.GetFilePicker();
uno::Reference<XFilterManager> xFltMgr(xFP, UNO_QUERY);
diff --git a/sw/source/uibase/uiview/view2.cxx b/sw/source/uibase/uiview/view2.cxx
index 939d0f17ce0e..5d6991b389de 100644
--- a/sw/source/uibase/uiview/view2.cxx
+++ b/sw/source/uibase/uiview/view2.cxx
@@ -300,7 +300,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,
- SFXWB_GRAPHIC ));
+ FileDialogFlags::Graphic ));
pFileDlg->SetTitle(SW_RESSTR(STR_INSERT_GRAPHIC ));
pFileDlg->SetContext( FileDialogHelper::SW_INSERT_GRAPHIC );
uno::Reference < XFilePicker2 > xFP = pFileDlg->GetFilePicker();