summaryrefslogtreecommitdiff
path: root/sfx2
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 /sfx2
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 'sfx2')
-rw-r--r--sfx2/source/appl/appopen.cxx2
-rw-r--r--sfx2/source/appl/lnkbase2.cxx2
-rw-r--r--sfx2/source/appl/opengrf.cxx2
-rw-r--r--sfx2/source/appl/shutdownicon.cxx2
-rw-r--r--sfx2/source/dialog/filedlghelper.cxx22
-rw-r--r--sfx2/source/dialog/filedlgimpl.hxx2
-rw-r--r--sfx2/source/doc/docinsert.cxx8
-rw-r--r--sfx2/source/doc/guisaveas.cxx6
-rw-r--r--sfx2/source/doc/templatedlg.cxx2
9 files changed, 24 insertions, 24 deletions
diff --git a/sfx2/source/appl/appopen.cxx b/sfx2/source/appl/appopen.cxx
index 6d41236c5baa..f1cfc5a2c45c 100644
--- a/sfx2/source/appl/appopen.cxx
+++ b/sfx2/source/appl/appopen.cxx
@@ -630,7 +630,7 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
sal_uIntPtr nErr = sfx2::FileOpenDialog_Impl(
ui::dialogs::TemplateDescription::FILEOPEN_READONLY_VERSION,
- SFXWB_MULTISELECTION, OUString(), aURLList,
+ FileDialogFlags::MultiSelection, OUString(), aURLList,
aFilter, pSet, &aPath, nDialog, sStandardDir, aBlackList );
if ( nErr == ERRCODE_ABORT )
diff --git a/sfx2/source/appl/lnkbase2.cxx b/sfx2/source/appl/lnkbase2.cxx
index 6f869467ab05..7b154c15be45 100644
--- a/sfx2/source/appl/lnkbase2.cxx
+++ b/sfx2/source/appl/lnkbase2.cxx
@@ -539,7 +539,7 @@ FileDialogHelper & SvBaseLink::GetInsertFileDialog(const OUString& rFactory) con
delete pImpl->m_pFileDlg;
pImpl->m_pFileDlg = new FileDialogHelper(
ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE,
- SFXWB_INSERT, rFactory);
+ FileDialogFlags::Insert, rFactory);
return *pImpl->m_pFileDlg;
}
diff --git a/sfx2/source/appl/opengrf.cxx b/sfx2/source/appl/opengrf.cxx
index 2668096f3750..a41e6131618f 100644
--- a/sfx2/source/appl/opengrf.cxx
+++ b/sfx2/source/appl/opengrf.cxx
@@ -83,7 +83,7 @@ struct SvxOpenGrf_Impl
SvxOpenGrf_Impl::SvxOpenGrf_Impl()
: aFileDlg(ui::dialogs::TemplateDescription::FILEOPEN_LINK_PREVIEW,
- SFXWB_GRAPHIC)
+ FileDialogFlags::Graphic)
{
uno::Reference < XFilePicker2 > xFP = aFileDlg.GetFilePicker();
xCtrlAcc.set(xFP, UNO_QUERY);
diff --git a/sfx2/source/appl/shutdownicon.cxx b/sfx2/source/appl/shutdownicon.cxx
index f26e4748df63..d515d40df609 100644
--- a/sfx2/source/appl/shutdownicon.cxx
+++ b/sfx2/source/appl/shutdownicon.cxx
@@ -353,7 +353,7 @@ void ShutdownIcon::StartFileDialog()
if ( !m_pFileDlg )
m_pFileDlg = new FileDialogHelper(
ui::dialogs::TemplateDescription::FILEOPEN_READONLY_VERSION,
- SFXWB_MULTISELECTION, OUString() );
+ FileDialogFlags::MultiSelection, OUString() );
m_pFileDlg->StartExecuteModal( LINK( this, ShutdownIcon, DialogClosedHdl_Impl ) );
}
diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx
index be788616c6a2..17e05c1eb379 100644
--- a/sfx2/source/dialog/filedlghelper.cxx
+++ b/sfx2/source/dialog/filedlghelper.cxx
@@ -847,7 +847,7 @@ static open_or_save_t lcl_OpenOrSave(sal_Int16 const nDialogType)
FileDialogHelper_Impl::FileDialogHelper_Impl(
FileDialogHelper* _pAntiImpl,
sal_Int16 nDialogType,
- sal_Int64 nFlags,
+ FileDialogFlags nFlags,
sal_Int16 nDialog,
vcl::Window* _pPreferredParentWindow,
const OUString& sStandardDir,
@@ -888,12 +888,12 @@ FileDialogHelper_Impl::FileDialogHelper_Impl(
mbHasVersions = false;
mbHasPreview = false;
mbShowPreview = false;
- mbAddGraphicFilter = SFXWB_GRAPHIC == (nFlags & SFXWB_GRAPHIC);
+ mbAddGraphicFilter = bool(nFlags & FileDialogFlags::Graphic);
mbDeleteMatcher = false;
- mbInsert = SFXWB_INSERT == ( nFlags & SFXWB_INSERT );
- mbExport = SFXWB_EXPORT == ( nFlags & SFXWB_EXPORT );
+ mbInsert = bool(nFlags & FileDialogFlags::Insert);
+ mbExport = bool(nFlags & FileDialogFlags::Export);
mbIsSaveDlg = false;
- mbIsSaveACopyDlg = SFXWB_SAVEACOPY == ( nFlags & SFXWB_SAVEACOPY );
+ mbIsSaveACopyDlg = bool(nFlags & FileDialogFlags::SaveACopy);
mbPwdCheckBoxState = false;
mbSelection = false;
mbSelectionEnabled = true;
@@ -1070,7 +1070,7 @@ FileDialogHelper_Impl::FileDialogHelper_Impl(
// set multiselection mode
- if ( nFlags & SFXWB_MULTISELECTION )
+ if ( nFlags & FileDialogFlags::MultiSelection )
mxFileDlg->setMultiSelectionMode( true );
if (mbAddGraphicFilter) // generate graphic filter only on demand
@@ -2210,7 +2210,7 @@ void FileDialogHelper_Impl::SetContext( FileDialogHelper::Context _eNewContext )
FileDialogHelper::FileDialogHelper(
sal_Int16 nDialogType,
- sal_Int64 nFlags,
+ FileDialogFlags nFlags,
const OUString& rFact,
SfxFilterFlags nMust,
SfxFilterFlags nDont )
@@ -2226,7 +2226,7 @@ FileDialogHelper::FileDialogHelper(
FileDialogHelper::FileDialogHelper(
sal_Int16 nDialogType,
- sal_Int64 nFlags,
+ FileDialogFlags nFlags,
const OUString& rFact,
sal_Int16 nDialog,
SfxFilterFlags nMust,
@@ -2246,7 +2246,7 @@ FileDialogHelper::FileDialogHelper(
FileDialogHelper::FileDialogHelper(
sal_Int16 nDialogType,
- sal_Int64 nFlags,
+ FileDialogFlags nFlags,
vcl::Window* _pPreferredParent )
: m_nError(0)
{
@@ -2256,7 +2256,7 @@ FileDialogHelper::FileDialogHelper(
FileDialogHelper::FileDialogHelper(
sal_Int16 nDialogType,
- sal_Int64 nFlags,
+ FileDialogFlags nFlags,
const OUString& aFilterUIName,
const OUString& aExtName,
const OUString& rStandardDir,
@@ -2576,7 +2576,7 @@ void SAL_CALL FileDialogHelper::DialogClosed( const DialogClosedEvent& _rEvent )
}
ErrCode FileOpenDialog_Impl( sal_Int16 nDialogType,
- sal_Int64 nFlags,
+ FileDialogFlags nFlags,
const OUString& rFact,
std::vector<OUString>& rpURLList,
OUString& rFilter,
diff --git a/sfx2/source/dialog/filedlgimpl.hxx b/sfx2/source/dialog/filedlgimpl.hxx
index 01b7c6eadef5..4e63998bfcdf 100644
--- a/sfx2/source/dialog/filedlgimpl.hxx
+++ b/sfx2/source/dialog/filedlgimpl.hxx
@@ -173,7 +173,7 @@ namespace sfx2
FileDialogHelper_Impl(
FileDialogHelper* _pAntiImpl,
const short nDialogType,
- sal_Int64 nFlags,
+ FileDialogFlags nFlags,
sal_Int16 nDialog = SFX2_IMPL_DIALOG_CONFIG,
vcl::Window* _pPreferredParentWindow = nullptr,
const OUString& sStandardDir = OUString(),
diff --git a/sfx2/source/doc/docinsert.cxx b/sfx2/source/doc/docinsert.cxx
index b4b3d74c5eda..1706d1bd992e 100644
--- a/sfx2/source/doc/docinsert.cxx
+++ b/sfx2/source/doc/docinsert.cxx
@@ -53,8 +53,8 @@ DocumentInserter::DocumentInserter(
m_sDocFactory ( rFactory )
, m_nDlgFlags ( (bEnableMultiSelection)
- ? (SFXWB_INSERT|SFXWB_MULTISELECTION)
- : SFXWB_INSERT )
+ ? (FileDialogFlags::Insert|FileDialogFlags::MultiSelection)
+ : FileDialogFlags::Insert )
, m_nError ( ERRCODE_NONE )
, m_pFileDlg ( nullptr )
, m_pItemSet ( nullptr )
@@ -209,7 +209,7 @@ IMPL_LINK_NOARG_TYPED(DocumentInserter, DialogClosedHdl, sfx2::FileDialogHelper*
catch( const IllegalArgumentException& ){}
}
- if ( SFXWB_EXPORT == ( m_nDlgFlags & SFXWB_EXPORT ) )
+ if ( m_nDlgFlags & FileDialogFlags::Export )
{
try
{
@@ -226,7 +226,7 @@ IMPL_LINK_NOARG_TYPED(DocumentInserter, DialogClosedHdl, sfx2::FileDialogHelper*
// set the read-only flag. When inserting a file, this flag is always set
- if ( SFXWB_INSERT == ( m_nDlgFlags & SFXWB_INSERT ) )
+ if ( m_nDlgFlags & FileDialogFlags::Insert )
m_pItemSet->Put( SfxBoolItem( SID_DOC_READONLY, true ) );
else
{
diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx
index 722d951191b5..e528accdcb21 100644
--- a/sfx2/source/doc/guisaveas.cxx
+++ b/sfx2/source/doc/guisaveas.cxx
@@ -835,7 +835,7 @@ bool ModelData_Impl::OutputFileDialog( sal_Int8 nStoreMode,
FILESAVE_AUTOEXTENSION_PASSWORD_FILTEROPTIONS)
: (css::ui::dialogs::TemplateDescription::
FILESAVE_AUTOEXTENSION_PASSWORD);
- sal_Int64 aDialogFlags = 0;
+ FileDialogFlags aDialogFlags = FileDialogFlags::NONE;
if( ( nStoreMode & EXPORT_REQUESTED ) && !( nStoreMode & WIDEEXPORT_REQUESTED ) )
{
@@ -845,12 +845,12 @@ bool ModelData_Impl::OutputFileDialog( sal_Int8 nStoreMode,
else
aDialogMode = css::ui::dialogs::TemplateDescription::
FILESAVE_AUTOEXTENSION_SELECTION;
- aDialogFlags = SFXWB_EXPORT;
+ aDialogFlags = FileDialogFlags::Export;
}
if( ( nStoreMode & EXPORT_REQUESTED ) && ( nStoreMode & SAVEACOPY_REQUESTED ) && ( nStoreMode & WIDEEXPORT_REQUESTED ) )
{
- aDialogFlags = SFXWB_SAVEACOPY;
+ aDialogFlags = FileDialogFlags::SaveACopy;
}
std::unique_ptr<sfx2::FileDialogHelper> pFileDlg;
diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx
index 28e0e415de07..6ef03a886e31 100644
--- a/sfx2/source/doc/templatedlg.cxx
+++ b/sfx2/source/doc/templatedlg.cxx
@@ -872,7 +872,7 @@ void SfxTemplateManagerDlg::OnTemplateImport ()
sal_Int16 nDialogType =
css::ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE;
- sfx2::FileDialogHelper aFileDlg(nDialogType, SFXWB_MULTISELECTION);
+ sfx2::FileDialogHelper aFileDlg(nDialogType, FileDialogFlags::MultiSelection);
// add "All" filter
aFileDlg.AddFilter( SfxResId(STR_SFX_FILTERNAME_ALL).toString(),