[Libreoffice-commits] core.git: 3 commits - avmedia/source cui/source dbaccess/source extensions/source filter/source forms/source fpicker/source include/sfx2 include/svtools reportdesign/source sc/source sd/source sfx2/source svtools/source svx/source sw/source
Noel Grandin
noel at peralex.com
Thu May 12 07:03:31 UTC 2016
avmedia/source/viewer/mediawindow.cxx | 4
cui/source/customize/acccfg.cxx | 2
cui/source/customize/cfg.cxx | 2
cui/source/dialogs/hldoctp.cxx | 2
cui/source/dialogs/insdlg.cxx | 2
cui/source/options/doclinkdialog.cxx | 2
cui/source/options/optinet2.cxx | 4
cui/source/options/optjava.cxx | 2
cui/source/tabpages/numpages.cxx | 2
cui/source/tabpages/tpbitmap.cxx | 4
cui/source/tabpages/tpcolor.cxx | 4
cui/source/tabpages/tpgradnt.cxx | 4
cui/source/tabpages/tphatch.cxx | 4
cui/source/tabpages/tplnedef.cxx | 4
cui/source/tabpages/tplneend.cxx | 4
dbaccess/source/ui/app/AppController.cxx | 2
dbaccess/source/ui/dlg/ConnectionHelper.cxx | 14 +-
dbaccess/source/ui/dlg/dbwizsetup.cxx | 2
dbaccess/source/ui/dlg/generalpage.cxx | 2
extensions/source/dbpilots/commonpagesdbp.cxx | 2
extensions/source/propctrlr/formcomponenthandler.cxx | 6 -
filter/source/xsltdialog/xmlfiltersettingsdialog.cxx | 5 -
filter/source/xsltdialog/xmlfiltertabpagexslt.cxx | 2
filter/source/xsltdialog/xmlfiltertestdialog.cxx | 5 -
forms/source/component/ImageControl.cxx | 2
forms/source/richtext/richtextvclcontrol.cxx | 2
fpicker/source/office/OfficeFilePicker.cxx | 26 ++---
fpicker/source/office/OfficeFilePicker.hxx | 4
fpicker/source/office/fpdialogbase.hxx | 24 +++-
fpicker/source/office/iodlg.cxx | 22 ++--
fpicker/source/office/iodlg.hxx | 4
include/sfx2/docinsert.hxx | 3
include/sfx2/filedlghelper.hxx | 27 +++--
include/svtools/ruler.hxx | 64 ++++++-------
reportdesign/source/ui/report/ReportController.cxx | 2
sc/source/ui/miscdlgs/datastreamdlg.cxx | 2
sc/source/ui/view/tabvwshb.cxx | 2
sd/source/ui/dlg/PhotoAlbumDialog.cxx | 2
sd/source/ui/dlg/dlgass.cxx | 2
sd/source/ui/dlg/filedlg.cxx | 2
sd/source/ui/dlg/tpaction.cxx | 2
sd/source/ui/func/fuinsert.cxx | 2
sd/source/ui/func/fuinsfil.cxx | 2
sd/source/ui/view/sdruler.cxx | 2
sfx2/source/appl/appopen.cxx | 2
sfx2/source/appl/lnkbase2.cxx | 2
sfx2/source/appl/opengrf.cxx | 2
sfx2/source/appl/shutdownicon.cxx | 2
sfx2/source/dialog/filedlghelper.cxx | 22 ++--
sfx2/source/dialog/filedlgimpl.hxx | 2
sfx2/source/doc/docinsert.cxx | 8 -
sfx2/source/doc/guisaveas.cxx | 6 -
sfx2/source/doc/templatedlg.cxx | 2
svtools/source/control/ruler.cxx | 60 ++++++------
svx/source/core/graphichelper.cxx | 4
svx/source/dialog/imapdlg.cxx | 4
svx/source/dialog/svxruler.cxx | 93 +++++++++----------
svx/source/form/databaselocationinput.cxx | 2
svx/source/form/datanavi.cxx | 2
sw/source/ui/chrdlg/chardlg.cxx | 2
sw/source/ui/dbui/createaddresslistdialog.cxx | 2
sw/source/ui/dbui/mmdocselectpage.cxx | 2
sw/source/ui/fldui/javaedit.cxx | 2
sw/source/ui/frmdlg/frmpage.cxx | 4
sw/source/ui/index/cnttab.cxx | 2
sw/source/ui/misc/glossary.cxx | 2
sw/source/uibase/app/docsh2.cxx | 6 -
sw/source/uibase/dbui/dbmgr.cxx | 2
sw/source/uibase/dbui/mailmergehelper.cxx | 2
sw/source/uibase/docvw/edtwin3.cxx | 8 -
sw/source/uibase/uiview/srcview.cxx | 2
sw/source/uibase/uiview/view2.cxx | 2
sw/source/uibase/uiview/viewmdi.cxx | 10 +-
73 files changed, 275 insertions(+), 270 deletions(-)
New commits:
commit 6bc3c2bdc5279314881b7e950d76d4d813470d11
Author: Noel Grandin <noel at peralex.com>
Date: Wed May 11 13:18:56 2016 +0200
Convert SFX_EXTRA to scoped enum
Change-Id: I57fa684d91d10a132c718152ca646edd1c7bd189
Reviewed-on: https://gerrit.libreoffice.org/24882
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin at gmail.com>
diff --git a/fpicker/source/office/OfficeFilePicker.cxx b/fpicker/source/office/OfficeFilePicker.cxx
index 8f531d0..8dea1cbf 100644
--- a/fpicker/source/office/OfficeFilePicker.cxx
+++ b/fpicker/source/office/OfficeFilePicker.cxx
@@ -226,11 +226,11 @@ IMPL_LINK_TYPED( SvtFilePicker, DialogClosedHdl, Dialog&, rDlg, void )
// SvtFilePicker
-WinBits SvtFilePicker::getWinBits( WinBits& rExtraBits )
+WinBits SvtFilePicker::getWinBits( PickerExtraBits& rExtraBits )
{
// set the winbits for creating the filedialog
WinBits nBits = 0L;
- rExtraBits = 0L;
+ rExtraBits = PickerExtraBits::NONE;
// set the standard bits according to the service name
if ( m_nServiceType == TemplateDescription::FILEOPEN_SIMPLE )
@@ -244,48 +244,48 @@ WinBits SvtFilePicker::getWinBits( WinBits& rExtraBits )
else if ( m_nServiceType == TemplateDescription::FILESAVE_AUTOEXTENSION )
{
nBits = WB_SAVEAS;
- rExtraBits = SFX_EXTRA_AUTOEXTENSION;
+ rExtraBits = PickerExtraBits::AutoExtension;
}
else if ( m_nServiceType == TemplateDescription::FILESAVE_AUTOEXTENSION_PASSWORD )
{
nBits = WB_SAVEAS | SFXWB_PASSWORD;
- rExtraBits = SFX_EXTRA_AUTOEXTENSION;
+ rExtraBits = PickerExtraBits::AutoExtension;
}
else if ( m_nServiceType == TemplateDescription::FILESAVE_AUTOEXTENSION_PASSWORD_FILTEROPTIONS )
{
nBits = WB_SAVEAS | SFXWB_PASSWORD;
- rExtraBits = SFX_EXTRA_AUTOEXTENSION | SFX_EXTRA_FILTEROPTIONS;
+ rExtraBits = PickerExtraBits::AutoExtension | PickerExtraBits::FilterOptions;
}
else if ( m_nServiceType == TemplateDescription::FILESAVE_AUTOEXTENSION_TEMPLATE )
{
nBits = WB_SAVEAS;
- rExtraBits = SFX_EXTRA_AUTOEXTENSION | SFX_EXTRA_TEMPLATES;
+ rExtraBits = PickerExtraBits::AutoExtension | PickerExtraBits::Templates;
}
else if ( m_nServiceType == TemplateDescription::FILESAVE_AUTOEXTENSION_SELECTION )
{
nBits = WB_SAVEAS;
- rExtraBits = SFX_EXTRA_AUTOEXTENSION | SFX_EXTRA_SELECTION;
+ rExtraBits = PickerExtraBits::AutoExtension | PickerExtraBits::Selection;
}
else if ( m_nServiceType == TemplateDescription::FILEOPEN_LINK_PREVIEW_IMAGE_TEMPLATE )
{
nBits = WB_OPEN;
- rExtraBits = SFX_EXTRA_INSERTASLINK | SFX_EXTRA_SHOWPREVIEW | SFX_EXTRA_IMAGE_TEMPLATE;
+ rExtraBits = PickerExtraBits::InsertAsLink | PickerExtraBits::ShowPreview | PickerExtraBits::ImageTemplate;
}
else if ( m_nServiceType == TemplateDescription::FILEOPEN_PLAY )
{
nBits = WB_OPEN;
- rExtraBits = SFX_EXTRA_PLAYBUTTON;
+ rExtraBits = PickerExtraBits::PlayButton;
}
else if ( m_nServiceType == TemplateDescription::FILEOPEN_READONLY_VERSION )
{
nBits = WB_OPEN | SFXWB_READONLY;
- rExtraBits = SFX_EXTRA_SHOWVERSIONS;
+ rExtraBits = PickerExtraBits::ShowVersions;
}
else if ( m_nServiceType == TemplateDescription::FILEOPEN_LINK_PREVIEW )
{
nBits = WB_OPEN;
- rExtraBits = SFX_EXTRA_INSERTASLINK | SFX_EXTRA_SHOWPREVIEW;
+ rExtraBits = PickerExtraBits::InsertAsLink | PickerExtraBits::ShowPreview;
}
if ( m_bMultiSelection && ( ( nBits & WB_OPEN ) == WB_OPEN ) )
nBits |= SFXWB_MULTISELECTION;
@@ -448,7 +448,7 @@ sal_Int16 SvtFilePicker::implExecutePicker( )
VclPtr<SvtFileDialog_Base> SvtFilePicker::implCreateDialog( vcl::Window* _pParent )
{
- WinBits nExtraBits;
+ PickerExtraBits nExtraBits;
WinBits nBits = getWinBits( nExtraBits );
VclPtrInstance<SvtFileDialog> dialog( _pParent, nBits, nExtraBits );
@@ -1146,7 +1146,7 @@ SvtRemoteFilePicker::SvtRemoteFilePicker()
VclPtr<SvtFileDialog_Base> SvtRemoteFilePicker::implCreateDialog( vcl::Window* _pParent )
{
- WinBits nExtraBits;
+ PickerExtraBits nExtraBits;
WinBits nBits = getWinBits( nExtraBits );
VclPtrInstance<RemoteFilesDialog> dialog( _pParent, nBits); // TODO: extrabits
diff --git a/fpicker/source/office/OfficeFilePicker.hxx b/fpicker/source/office/OfficeFilePicker.hxx
index d049ffa..9b4abbf 100644
--- a/fpicker/source/office/OfficeFilePicker.hxx
+++ b/fpicker/source/office/OfficeFilePicker.hxx
@@ -37,9 +37,9 @@
#include <list>
class Dialog;
-
struct FilterEntry;
struct ElementEntry_Impl;
+enum class PickerExtraBits;
typedef ::std::list< FilterEntry > FilterList; // can be maintained more effectively
typedef ::std::list < ElementEntry_Impl > ElementList;
@@ -212,7 +212,7 @@ protected:
) override;
protected:
- WinBits getWinBits( WinBits& rExtraBits );
+ WinBits getWinBits( PickerExtraBits& rExtraBits );
virtual void notify( sal_Int16 _nEventId, sal_Int16 _nControlId ) override;
bool FilterNameExists( const OUString& rTitle );
diff --git a/fpicker/source/office/fpdialogbase.hxx b/fpicker/source/office/fpdialogbase.hxx
index 69091ae..9f88847 100644
--- a/fpicker/source/office/fpdialogbase.hxx
+++ b/fpicker/source/office/fpdialogbase.hxx
@@ -42,15 +42,21 @@ class SvtFileDialogFilter_Impl;
#define SFXWB_CLASSPATH ( 0x08000000L | SFXWB_PATHDIALOG )
#define SFXWB_MULTISELECTION 0x20000000L // activate Multiselection
-#define SFX_EXTRA_AUTOEXTENSION 0x00000001L
-#define SFX_EXTRA_FILTEROPTIONS 0x00000002L
-#define SFX_EXTRA_SHOWVERSIONS 0x00000004L
-#define SFX_EXTRA_INSERTASLINK 0x00000008L
-#define SFX_EXTRA_SHOWPREVIEW 0x00000010L
-#define SFX_EXTRA_TEMPLATES 0x00000020L
-#define SFX_EXTRA_PLAYBUTTON 0x00000040L
-#define SFX_EXTRA_SELECTION 0x00000080L
-#define SFX_EXTRA_IMAGE_TEMPLATE 0x00000100L
+enum class PickerExtraBits {
+ NONE = 0x0000,
+ AutoExtension = 0x0001,
+ FilterOptions = 0x0002,
+ ShowVersions = 0x0004,
+ InsertAsLink = 0x0008,
+ ShowPreview = 0x0010,
+ Templates = 0x0020,
+ PlayButton = 0x0040,
+ Selection = 0x0080,
+ ImageTemplate = 0x0100
+};
+namespace o3tl {
+ template<> struct typed_flags<PickerExtraBits> : is_typed_flags<PickerExtraBits, 0x01ff> {};
+}
#define FILEDIALOG_FILTER_ALL "*.*"
diff --git a/fpicker/source/office/iodlg.cxx b/fpicker/source/office/iodlg.cxx
index 38415f3..abc4371 100644
--- a/fpicker/source/office/iodlg.cxx
+++ b/fpicker/source/office/iodlg.cxx
@@ -296,7 +296,7 @@ SvtFileDialog::SvtFileDialog
(
vcl::Window* _pParent,
WinBits nBits,
- WinBits nExtraBits
+ PickerExtraBits nExtraBits
) :
SvtFileDialog_Base( _pParent, "ExplorerFileDialog", "fps/ui/explorerfiledialog.ui" )
@@ -332,7 +332,7 @@ SvtFileDialog::SvtFileDialog ( vcl::Window* _pParent, WinBits nBits )
,_pFileView( nullptr )
,_pFileNotifier( nullptr )
,_pImp( new SvtExpFileDlg_Impl( nBits ) )
- ,_nExtraBits( 0L )
+ ,_nExtraBits( PickerExtraBits::NONE )
,_bIsInExecute( false )
,m_bHasFilename( false )
{
@@ -2484,7 +2484,7 @@ void SvtFileDialog::enableControl( sal_Int16 _nControlId, bool _bEnable )
void SvtFileDialog::AddControls_Impl( )
{
// create the "insert as link" checkbox, if needed
- if ( _nExtraBits & SFX_EXTRA_INSERTASLINK )
+ if ( _nExtraBits & PickerExtraBits::InsertAsLink )
{
_pCbLinkBox ->SetText( SvtResId( STR_SVT_FILEPICKER_INSERT_AS_LINK ) );
_pCbLinkBox ->SetHelpId( HID_FILEDLG_LINK_CB );
@@ -2493,7 +2493,7 @@ void SvtFileDialog::AddControls_Impl( )
}
// create the "show preview" checkbox ( and the preview window, too ), if needed
- if ( _nExtraBits & SFX_EXTRA_SHOWPREVIEW )
+ if ( _nExtraBits & PickerExtraBits::ShowPreview )
{
_pImp->_aIniKey = "ImportGraphicDialog";
// because the "<All Formats> (*.bmp,*...)" entry is to wide,
@@ -2517,7 +2517,7 @@ void SvtFileDialog::AddControls_Impl( )
_pPrevBmp->SetAccessibleName(SVT_RESSTR(STR_PREVIEW));
}
- if ( _nExtraBits & SFX_EXTRA_AUTOEXTENSION )
+ if ( _nExtraBits & PickerExtraBits::AutoExtension )
{
_pImp->_pCbAutoExtension->SetText( SvtResId( STR_SVT_FILEPICKER_AUTO_EXTENSION ) );
_pImp->_pCbAutoExtension->Check();
@@ -2525,21 +2525,21 @@ void SvtFileDialog::AddControls_Impl( )
_pImp->_pCbAutoExtension->Show();
}
- if ( _nExtraBits & SFX_EXTRA_FILTEROPTIONS )
+ if ( _nExtraBits & PickerExtraBits::FilterOptions )
{
_pImp->_pCbOptions->SetText( SvtResId( STR_SVT_FILEPICKER_FILTER_OPTIONS ) );
_pImp->_pCbOptions->SetClickHdl( LINK( this, SvtFileDialog, ClickHdl_Impl ) );
_pImp->_pCbOptions->Show();
}
- if ( _nExtraBits & SFX_EXTRA_SELECTION )
+ if ( _nExtraBits & PickerExtraBits::Selection )
{
_pCbSelection->SetText( SvtResId( STR_SVT_FILEPICKER_SELECTION ) );
_pCbSelection->SetClickHdl( LINK( this, SvtFileDialog, ClickHdl_Impl ) );
_pCbSelection->Show();
}
- if ( _nExtraBits & SFX_EXTRA_PLAYBUTTON )
+ if ( _nExtraBits & PickerExtraBits::PlayButton )
{
_pPbPlay->SetText( SvtResId( STR_SVT_FILEPICKER_PLAY ) );
_pPbPlay->SetHelpId( HID_FILESAVE_DOPLAY );
@@ -2547,7 +2547,7 @@ void SvtFileDialog::AddControls_Impl( )
_pPbPlay->Show();
}
- if ( _nExtraBits & SFX_EXTRA_SHOWVERSIONS )
+ if ( _nExtraBits & PickerExtraBits::ShowVersions )
{
_pImp->_pFtFileVersion->SetText( SvtResId( STR_SVT_FILEPICKER_VERSION ) );
_pImp->_pFtFileVersion->Show();
@@ -2555,7 +2555,7 @@ void SvtFileDialog::AddControls_Impl( )
_pImp->_pLbFileVersion->SetHelpId( HID_FILEOPEN_VERSION );
_pImp->_pLbFileVersion->Show();
}
- else if ( _nExtraBits & SFX_EXTRA_TEMPLATES )
+ else if ( _nExtraBits & PickerExtraBits::Templates )
{
_pImp->_pFtTemplates->SetText( SvtResId( STR_SVT_FILEPICKER_TEMPLATES ) );
_pImp->_pFtTemplates->Show();
@@ -2566,7 +2566,7 @@ void SvtFileDialog::AddControls_Impl( )
// is set in the "Templates mode". This was hidden in the previous implementation.
// Shouldn't this be a more meaningfull help id.
}
- else if ( _nExtraBits & SFX_EXTRA_IMAGE_TEMPLATE )
+ else if ( _nExtraBits & PickerExtraBits::ImageTemplate )
{
_pImp->_pFtImageTemplates->SetText( SvtResId( STR_SVT_FILEPICKER_IMAGE_TEMPLATE ) );
_pImp->_pFtImageTemplates->Show();
diff --git a/fpicker/source/office/iodlg.hxx b/fpicker/source/office/iodlg.hxx
index a83da18..6b0b935 100644
--- a/fpicker/source/office/iodlg.hxx
+++ b/fpicker/source/office/iodlg.hxx
@@ -66,7 +66,7 @@ private:
VclPtr<Splitter> _pSplitter;
::svt::IFilePickerListener* _pFileNotifier;
SvtExpFileDlg_Impl* _pImp;
- WinBits _nExtraBits;
+ PickerExtraBits _nExtraBits;
bool _bIsInExecute : 1;
ImageList m_aImages;
@@ -159,7 +159,7 @@ protected:
short PrepareExecute();
public:
- SvtFileDialog( vcl::Window* _pParent, WinBits nBits, WinBits nExtraBits );
+ SvtFileDialog( vcl::Window* _pParent, WinBits nBits, PickerExtraBits nExtraBits );
SvtFileDialog( vcl::Window* _pParent, WinBits nBits );
virtual ~SvtFileDialog();
virtual void dispose() override;
commit 1342818790083ec1324f76c4eb1813827a4f5b72
Author: Noel Grandin <noel at peralex.com>
Date: Wed May 11 13:07:30 2016 +0200
convert SFXWB file dialog flags to scoped enum
Change-Id: I1ab5191dc582c46785da58d50b2e68c30b5cbc9b
Reviewed-on: https://gerrit.libreoffice.org/24881
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin at gmail.com>
diff --git a/avmedia/source/viewer/mediawindow.cxx b/avmedia/source/viewer/mediawindow.cxx
index f28db42..110730c 100644
--- a/avmedia/source/viewer/mediawindow.cxx
+++ b/avmedia/source/viewer/mediawindow.cxx
@@ -211,9 +211,9 @@ void MediaWindow::getMediaFilters( FilterNameVector& rFilterNameVector )
bool MediaWindow::executeMediaURLDialog(vcl::Window*,
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_SIMPLE, 0 );
+ : ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE );
static const char aWildcard[] = "*.";
FilterNameVector aFilters;
static const char aSeparator[] = ";";
diff --git a/cui/source/customize/acccfg.cxx b/cui/source/customize/acccfg.cxx
index 758975b..b12b59c 100644
--- a/cui/source/customize/acccfg.cxx
+++ b/cui/source/customize/acccfg.cxx
@@ -1423,7 +1423,7 @@ void SfxAcceleratorConfigPage::StartFileDialog( WinBits nBits, const OUString& r
short nDialogType = bSave ? ui::dialogs::TemplateDescription::FILESAVE_AUTOEXTENSION
: ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE;
delete m_pFileDlg;
- m_pFileDlg = new sfx2::FileDialogHelper( nDialogType, 0 );
+ m_pFileDlg = new sfx2::FileDialogHelper( nDialogType );
m_pFileDlg->SetTitle( rTitle );
m_pFileDlg->AddFilter( aFilterAllStr, FILEDIALOG_FILTER_ALL );
diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx
index c9c770a..6a41380 100644
--- a/cui/source/customize/cfg.cxx
+++ b/cui/source/customize/cfg.cxx
@@ -5210,7 +5210,7 @@ IMPL_LINK_NOARG_TYPED( SvxIconSelectorDialog, ImportHdl, Button *, void)
{
sfx2::FileDialogHelper aImportDialog(
css::ui::dialogs::TemplateDescription::FILEOPEN_LINK_PREVIEW,
- SFXWB_GRAPHIC | SFXWB_MULTISELECTION );
+ FileDialogFlags::Graphic | FileDialogFlags::MultiSelection );
// disable the link checkbox in the dialog
uno::Reference< css::ui::dialogs::XFilePickerControlAccess >
diff --git a/cui/source/dialogs/hldoctp.cxx b/cui/source/dialogs/hldoctp.cxx
index 4deb11d..4d1665f 100644
--- a/cui/source/dialogs/hldoctp.cxx
+++ b/cui/source/dialogs/hldoctp.cxx
@@ -197,7 +197,7 @@ IMPL_LINK_NOARG_TYPED(SvxHyperlinkDocTp, ClickFileopenHdl_Impl, Button*, void)
{
// Open Fileopen-Dialog
::sfx2::FileDialogHelper aDlg(
- css::ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE, 0,
+ css::ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE, FileDialogFlags::NONE,
GetParent() );
OUString aOldURL( GetCurrentURL() );
if( aOldURL.startsWithIgnoreAsciiCase( sFileScheme ) )
diff --git a/cui/source/dialogs/insdlg.cxx b/cui/source/dialogs/insdlg.cxx
index bfa1437..a5008d2 100644
--- a/cui/source/dialogs/insdlg.cxx
+++ b/cui/source/dialogs/insdlg.cxx
@@ -628,7 +628,7 @@ IMPL_LINK_NOARG_TYPED( SfxInsertFloatingFrameDialog, OpenHdl, Button*, void)
// create the file dialog
sfx2::FileDialogHelper aFileDlg(
- ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE, 0, OUString() );
+ ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE, FileDialogFlags::NONE, OUString() );
// set the title
aFileDlg.SetTitle(CUI_RESSTR(RID_SVXSTR_SELECT_FILE_IFRAME));
diff --git a/cui/source/options/doclinkdialog.cxx b/cui/source/options/doclinkdialog.cxx
index de5f1e8..b056e48 100644
--- a/cui/source/options/doclinkdialog.cxx
+++ b/cui/source/options/doclinkdialog.cxx
@@ -163,7 +163,7 @@ namespace svx
IMPL_LINK_NOARG_TYPED(ODocumentLinkDialog, OnBrowseFile, Button*, void)
{
::sfx2::FileDialogHelper aFileDlg(
- ui::dialogs::TemplateDescription::FILEOPEN_READONLY_VERSION, 0);
+ ui::dialogs::TemplateDescription::FILEOPEN_READONLY_VERSION);
std::shared_ptr<const SfxFilter> pFilter = SfxFilter::GetFilterByName("StarOffice XML (Base)");
if ( pFilter )
{
diff --git a/cui/source/options/optinet2.cxx b/cui/source/options/optinet2.cxx
index be551b5..9ca93fc 100644
--- a/cui/source/options/optinet2.cxx
+++ b/cui/source/options/optinet2.cxx
@@ -1065,9 +1065,7 @@ IMPL_LINK_TYPED( SvxEMailTabPage, FileDialogHdl_Impl, Button*, pButton, void )
{
if (m_pMailerURLPB == pButton && !pImpl->bROProgram)
{
- FileDialogHelper aHelper(
- css::ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE,
- 0 );
+ FileDialogHelper aHelper( css::ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE );
OUString sPath = m_pMailerURLED->GetText();
if ( sPath.isEmpty() )
sPath = "/usr/bin";
diff --git a/cui/source/options/optjava.cxx b/cui/source/options/optjava.cxx
index c995591..b7c2dde 100644
--- a/cui/source/options/optjava.cxx
+++ b/cui/source/options/optjava.cxx
@@ -994,7 +994,7 @@ void SvxJavaClassPathDlg::dispose()
IMPL_LINK_NOARG_TYPED(SvxJavaClassPathDlg, AddArchiveHdl_Impl, Button*, void)
{
- sfx2::FileDialogHelper aDlg( TemplateDescription::FILEOPEN_SIMPLE, 0 );
+ sfx2::FileDialogHelper aDlg( TemplateDescription::FILEOPEN_SIMPLE );
aDlg.SetTitle( CUI_RES( RID_SVXSTR_ARCHIVE_TITLE ) );
aDlg.AddFilter( CUI_RES( RID_SVXSTR_ARCHIVE_HEADLINE ), "*.jar;*.zip" );
OUString sFolder;
diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx
index 763e701..22d23e0 100644
--- a/cui/source/tabpages/numpages.cxx
+++ b/cui/source/tabpages/numpages.cxx
@@ -998,7 +998,7 @@ IMPL_LINK_NOARG_TYPED(SvxBitmapPickTabPage, DoubleClickHdl_Impl, ValueSet*, void
IMPL_LINK_NOARG_TYPED(SvxBitmapPickTabPage, ClickAddBrowseHdl_Impl, Button*, void)
{
- sfx2::FileDialogHelper aFileDialog(0, 0);
+ sfx2::FileDialogHelper aFileDialog(0);
aFileDialog.SetTitle(CUI_RES(RID_SVXSTR_ADD_IMAGE));
if ( aFileDialog.Execute() != ERRCODE_NONE )
return;
diff --git a/cui/source/tabpages/tpbitmap.cxx b/cui/source/tabpages/tpbitmap.cxx
index 163c0cf..093348a 100644
--- a/cui/source/tabpages/tpbitmap.cxx
+++ b/cui/source/tabpages/tpbitmap.cxx
@@ -770,7 +770,7 @@ IMPL_LINK_NOARG_TYPED(SvxBitmapTabPage, ClickLoadHdl_Impl, Button*, void)
if ( nReturn != RET_CANCEL )
{
- ::sfx2::FileDialogHelper aDlg( css::ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE, 0 );
+ ::sfx2::FileDialogHelper aDlg( css::ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE );
OUString aStrFilterType( "*.sob" );
aDlg.AddFilter( aStrFilterType, aStrFilterType );
OUString aPalettePath(SvtPathOptions().GetPalettePath());
@@ -856,7 +856,7 @@ IMPL_LINK_NOARG_TYPED(SvxBitmapTabPage, ClickLoadHdl_Impl, Button*, void)
IMPL_LINK_NOARG_TYPED(SvxBitmapTabPage, ClickSaveHdl_Impl, Button*, void)
{
- ::sfx2::FileDialogHelper aDlg( css::ui::dialogs::TemplateDescription::FILESAVE_SIMPLE, 0 );
+ ::sfx2::FileDialogHelper aDlg( css::ui::dialogs::TemplateDescription::FILESAVE_SIMPLE );
OUString aStrFilterType( "*.sob" );
aDlg.AddFilter( aStrFilterType, aStrFilterType );
diff --git a/cui/source/tabpages/tpcolor.cxx b/cui/source/tabpages/tpcolor.cxx
index a84a182..de43664 100644
--- a/cui/source/tabpages/tpcolor.cxx
+++ b/cui/source/tabpages/tpcolor.cxx
@@ -135,7 +135,7 @@ IMPL_LINK_NOARG_TYPED(SvxColorTabPage, ClickLoadHdl_Impl, Button*, void)
if ( nReturn != RET_CANCEL )
{
- ::sfx2::FileDialogHelper aDlg( css::ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE, 0 );
+ ::sfx2::FileDialogHelper aDlg( css::ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE );
OUString aStrFilterType( XPropertyList::GetDefaultExtFilter( meType ) );
aDlg.AddFilter( aStrFilterType, aStrFilterType );
@@ -200,7 +200,7 @@ void SvxColorTabPage::EnableSave( bool bCanSave )
IMPL_LINK_NOARG_TYPED(SvxColorTabPage, ClickSaveHdl_Impl, Button*, void)
{
::sfx2::FileDialogHelper aDlg(
- css::ui::dialogs::TemplateDescription::FILESAVE_SIMPLE, 0 );
+ css::ui::dialogs::TemplateDescription::FILESAVE_SIMPLE );
OUString aStrFilterType( XPropertyList::GetDefaultExtFilter( meType ) );
aDlg.AddFilter( aStrFilterType, aStrFilterType );
diff --git a/cui/source/tabpages/tpgradnt.cxx b/cui/source/tabpages/tpgradnt.cxx
index e235640..c87694a 100644
--- a/cui/source/tabpages/tpgradnt.cxx
+++ b/cui/source/tabpages/tpgradnt.cxx
@@ -643,7 +643,7 @@ IMPL_LINK_NOARG_TYPED(SvxGradientTabPage, ClickLoadHdl_Impl, Button*, void)
if ( nReturn != RET_CANCEL )
{
- ::sfx2::FileDialogHelper aDlg( css::ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE, 0 );
+ ::sfx2::FileDialogHelper aDlg( css::ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE );
OUString aStrFilterType( "*.sog" );
aDlg.AddFilter( aStrFilterType, aStrFilterType );
OUString aPalettePath(SvtPathOptions().GetPalettePath());
@@ -733,7 +733,7 @@ IMPL_LINK_NOARG_TYPED(SvxGradientTabPage, ClickLoadHdl_Impl, Button*, void)
IMPL_LINK_NOARG_TYPED(SvxGradientTabPage, ClickSaveHdl_Impl, Button*, void)
{
::sfx2::FileDialogHelper aDlg(
- css::ui::dialogs::TemplateDescription::FILESAVE_SIMPLE, 0 );
+ css::ui::dialogs::TemplateDescription::FILESAVE_SIMPLE );
OUString aStrFilterType( "*.sog" );
aDlg.AddFilter( aStrFilterType, aStrFilterType );
diff --git a/cui/source/tabpages/tphatch.cxx b/cui/source/tabpages/tphatch.cxx
index 766ac7a..f5d863e 100644
--- a/cui/source/tabpages/tphatch.cxx
+++ b/cui/source/tabpages/tphatch.cxx
@@ -677,7 +677,7 @@ IMPL_LINK_NOARG_TYPED(SvxHatchTabPage, ClickLoadHdl_Impl, Button*, void)
if ( nReturn != RET_CANCEL )
{
- ::sfx2::FileDialogHelper aDlg( css::ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE, 0 );
+ ::sfx2::FileDialogHelper aDlg( css::ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE );
OUString aStrFilterType( "*.soh" );
aDlg.AddFilter( aStrFilterType, aStrFilterType );
OUString aPalettePath(SvtPathOptions().GetPalettePath());
@@ -756,7 +756,7 @@ IMPL_LINK_NOARG_TYPED(SvxHatchTabPage, ClickLoadHdl_Impl, Button*, void)
IMPL_LINK_NOARG_TYPED(SvxHatchTabPage, ClickSaveHdl_Impl, Button*, void)
{
- ::sfx2::FileDialogHelper aDlg( css::ui::dialogs::TemplateDescription::FILESAVE_SIMPLE, 0 );
+ ::sfx2::FileDialogHelper aDlg( css::ui::dialogs::TemplateDescription::FILESAVE_SIMPLE );
OUString aStrFilterType( "*.soh" );
aDlg.AddFilter( aStrFilterType, aStrFilterType );
diff --git a/cui/source/tabpages/tplnedef.cxx b/cui/source/tabpages/tplnedef.cxx
index daa5b3e..3eab7de 100644
--- a/cui/source/tabpages/tplnedef.cxx
+++ b/cui/source/tabpages/tplnedef.cxx
@@ -736,7 +736,7 @@ IMPL_LINK_NOARG_TYPED(SvxLineDefTabPage, ClickLoadHdl_Impl, Button*, void)
if ( nReturn != RET_CANCEL )
{
- ::sfx2::FileDialogHelper aDlg( css::ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE, 0 );
+ ::sfx2::FileDialogHelper aDlg( css::ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE );
OUString aStrFilterType( "*.sod" );
aDlg.AddFilter( aStrFilterType, aStrFilterType );
OUString aPalettePath(SvtPathOptions().GetPalettePath());
@@ -802,7 +802,7 @@ IMPL_LINK_NOARG_TYPED(SvxLineDefTabPage, ClickLoadHdl_Impl, Button*, void)
IMPL_LINK_NOARG_TYPED(SvxLineDefTabPage, ClickSaveHdl_Impl, Button*, void)
{
- ::sfx2::FileDialogHelper aDlg( css::ui::dialogs::TemplateDescription::FILESAVE_SIMPLE, 0 );
+ ::sfx2::FileDialogHelper aDlg( css::ui::dialogs::TemplateDescription::FILESAVE_SIMPLE );
OUString aStrFilterType( "*.sod" );
aDlg.AddFilter( aStrFilterType, aStrFilterType );
diff --git a/cui/source/tabpages/tplneend.cxx b/cui/source/tabpages/tplneend.cxx
index 03f2a1e..3364d3e 100644
--- a/cui/source/tabpages/tplneend.cxx
+++ b/cui/source/tabpages/tplneend.cxx
@@ -550,7 +550,7 @@ IMPL_LINK_NOARG_TYPED(SvxLineEndDefTabPage, ClickLoadHdl_Impl, Button*, void)
if ( nReturn != RET_CANCEL )
{
- ::sfx2::FileDialogHelper aDlg(css::ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE, 0 );
+ ::sfx2::FileDialogHelper aDlg(css::ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE );
OUString aStrFilterType( "*.soe" );
aDlg.AddFilter( aStrFilterType, aStrFilterType );
@@ -617,7 +617,7 @@ IMPL_LINK_NOARG_TYPED(SvxLineEndDefTabPage, ClickLoadHdl_Impl, Button*, void)
IMPL_LINK_NOARG_TYPED(SvxLineEndDefTabPage, ClickSaveHdl_Impl, Button*, void)
{
- ::sfx2::FileDialogHelper aDlg( css::ui::dialogs::TemplateDescription::FILESAVE_SIMPLE, 0 );
+ ::sfx2::FileDialogHelper aDlg( css::ui::dialogs::TemplateDescription::FILESAVE_SIMPLE );
OUString aStrFilterType( "*.soe" );
aDlg.AddFilter( aStrFilterType, aStrFilterType );
diff --git a/dbaccess/source/ui/app/AppController.cxx b/dbaccess/source/ui/app/AppController.cxx
index 351dfa1..01fe86d 100644
--- a/dbaccess/source/ui/app/AppController.cxx
+++ b/dbaccess/source/ui/app/AppController.cxx
@@ -1127,7 +1127,7 @@ void OApplicationController::Execute(sal_uInt16 _nId, const Sequence< PropertyVa
::sfx2::FileDialogHelper aFileDlg(
ui::dialogs::TemplateDescription::FILESAVE_AUTOEXTENSION,
- 0, getView());
+ FileDialogFlags::NONE, getView());
aFileDlg.SetDisplayDirectory( sUrl );
std::shared_ptr<const SfxFilter> pFilter = getStandardDatabaseFilter();
diff --git a/dbaccess/source/ui/dlg/ConnectionHelper.cxx b/dbaccess/source/ui/dlg/ConnectionHelper.cxx
index e237f4a..49be4ca 100644
--- a/dbaccess/source/ui/dlg/ConnectionHelper.cxx
+++ b/dbaccess/source/ui/dlg/ConnectionHelper.cxx
@@ -222,7 +222,7 @@ namespace dbaui
SvtModuleOptions aModule;
::sfx2::FileDialogHelper aFileDlg(
ui::dialogs::TemplateDescription::FILEOPEN_READONLY_VERSION,
- 0,
+ FileDialogFlags::NONE,
aModule.GetFactoryEmptyDocumentURL(SvtModuleOptions::EFactory::CALC)
,SfxFilterFlags::IMPORT);
askForFileName(aFileDlg);
@@ -233,8 +233,7 @@ namespace dbaui
const OUString sExt("*.mdb;*.mde");
OUString sFilterName(ModuleRes (STR_MSACCESS_FILTERNAME));
::sfx2::FileDialogHelper aFileDlg(
- ui::dialogs::TemplateDescription::FILEOPEN_READONLY_VERSION,
- 0);
+ ui::dialogs::TemplateDescription::FILEOPEN_READONLY_VERSION);
aFileDlg.AddFilter(sFilterName,sExt);
aFileDlg.SetCurrentFilter(sFilterName);
askForFileName(aFileDlg);
@@ -245,8 +244,7 @@ namespace dbaui
const OUString sAccdb("*.accdb;*.accde");
OUString sFilterName2(ModuleRes (STR_MSACCESS_2007_FILTERNAME));
::sfx2::FileDialogHelper aFileDlg(
- ui::dialogs::TemplateDescription::FILEOPEN_READONLY_VERSION,
- 0);
+ ui::dialogs::TemplateDescription::FILEOPEN_READONLY_VERSION);
aFileDlg.AddFilter(sFilterName2,sAccdb);
aFileDlg.SetCurrentFilter(sFilterName2);
askForFileName(aFileDlg);
@@ -326,8 +324,7 @@ namespace dbaui
const OUString sExt("*.fdb");
OUString sFilterName(ModuleRes (STR_FIREBIRD_FILTERNAME));
::sfx2::FileDialogHelper aFileDlg(
- ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE,
- 0);
+ ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE);
aFileDlg.AddFilter(sFilterName,sExt);
aFileDlg.SetCurrentFilter(sFilterName);
askForFileName(aFileDlg);
@@ -351,8 +348,7 @@ namespace dbaui
const OUString sExt("*.fdb");
OUString sFilterName(ModuleRes (STR_FIREBIRD_FILTERNAME));
::sfx2::FileDialogHelper aFileDlg(
- ui::dialogs::TemplateDescription::FILESAVE_AUTOEXTENSION,
- 0);
+ ui::dialogs::TemplateDescription::FILESAVE_AUTOEXTENSION);
aFileDlg.AddFilter(sFilterName,sExt);
aFileDlg.SetCurrentFilter(sFilterName);
askForFileName(aFileDlg);
diff --git a/dbaccess/source/ui/dlg/dbwizsetup.cxx b/dbaccess/source/ui/dlg/dbwizsetup.cxx
index 5c31f87..37e89b5 100644
--- a/dbaccess/source/ui/dlg/dbwizsetup.cxx
+++ b/dbaccess/source/ui/dlg/dbwizsetup.cxx
@@ -794,7 +794,7 @@ bool ODbTypeWizDialogSetup::SaveDatabaseDocument()
bool bRet = false;
::sfx2::FileDialogHelper aFileDlg(
ui::dialogs::TemplateDescription::FILESAVE_AUTOEXTENSION,
- 0, this);
+ FileDialogFlags::NONE, this);
std::shared_ptr<const SfxFilter> pFilter = getStandardDatabaseFilter();
if ( pFilter )
{
diff --git a/dbaccess/source/ui/dlg/generalpage.cxx b/dbaccess/source/ui/dlg/generalpage.cxx
index f6371cc..570302e 100644
--- a/dbaccess/source/ui/dlg/generalpage.cxx
+++ b/dbaccess/source/ui/dlg/generalpage.cxx
@@ -717,7 +717,7 @@ namespace dbaui
{
::sfx2::FileDialogHelper aFileDlg(
ui::dialogs::TemplateDescription::FILEOPEN_READONLY_VERSION,
- 0, OUString("sdatabase") );
+ FileDialogFlags::NONE, OUString("sdatabase") );
std::shared_ptr<const SfxFilter> pFilter = getStandardDatabaseFilter();
if ( pFilter )
{
diff --git a/extensions/source/dbpilots/commonpagesdbp.cxx b/extensions/source/dbpilots/commonpagesdbp.cxx
index 3a7b53c..aec9558 100644
--- a/extensions/source/dbpilots/commonpagesdbp.cxx
+++ b/extensions/source/dbpilots/commonpagesdbp.cxx
@@ -196,7 +196,7 @@ namespace dbp
IMPL_LINK_NOARG_TYPED( OTableSelectionPage, OnSearchClicked, Button*, void )
{
::sfx2::FileDialogHelper aFileDlg(
- ui::dialogs::TemplateDescription::FILEOPEN_READONLY_VERSION, 0);
+ ui::dialogs::TemplateDescription::FILEOPEN_READONLY_VERSION);
aFileDlg.SetDisplayDirectory( SvtPathOptions().GetWorkPath() );
std::shared_ptr<const SfxFilter> pFilter = SfxFilter::GetFilterByName("StarOffice XML (Base)");
diff --git a/extensions/source/propctrlr/formcomponenthandler.cxx b/extensions/source/propctrlr/formcomponenthandler.cxx
index 4f32e20..4f9f9eb 100644
--- a/extensions/source/propctrlr/formcomponenthandler.cxx
+++ b/extensions/source/propctrlr/formcomponenthandler.cxx
@@ -2767,7 +2767,7 @@ namespace pcr
::sfx2::FileDialogHelper aFileDlg(
ui::dialogs::TemplateDescription::FILEOPEN_LINK_PREVIEW,
- SFXWB_GRAPHIC);
+ FileDialogFlags::Graphic);
aFileDlg.SetTitle(aStrTrans);
// non-linked images ( e.g. those located in the document
@@ -2834,7 +2834,7 @@ namespace pcr
bool FormComponentPropertyHandler::impl_browseForTargetURL_nothrow( Any& _out_rNewValue, ::osl::ClearableMutexGuard& _rClearBeforeDialog ) const
{
::sfx2::FileDialogHelper aFileDlg(
- ui::dialogs::TemplateDescription::FILEOPEN_READONLY_VERSION, 0);
+ ui::dialogs::TemplateDescription::FILEOPEN_READONLY_VERSION);
OUString sURL;
OSL_VERIFY( impl_getPropertyValue_throw( PROPERTY_TARGET_URL ) >>= sURL );
@@ -2888,7 +2888,7 @@ namespace pcr
bool FormComponentPropertyHandler::impl_browseForDatabaseDocument_throw( Any& _out_rNewValue, ::osl::ClearableMutexGuard& _rClearBeforeDialog ) const
{
::sfx2::FileDialogHelper aFileDlg(
- ui::dialogs::TemplateDescription::FILEOPEN_READONLY_VERSION, 0,
+ ui::dialogs::TemplateDescription::FILEOPEN_READONLY_VERSION, FileDialogFlags::NONE,
OUString("sdatabase"));
OUString sDataSource;
diff --git a/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx b/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx
index 8583483..506f76e 100644
--- a/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx
+++ b/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx
@@ -877,8 +877,7 @@ void XMLFilterSettingsDialog::onSave()
// Open Fileopen-Dialog
::sfx2::FileDialogHelper aDlg(
- css::ui::dialogs::TemplateDescription::FILESAVE_AUTOEXTENSION,
- 0 );
+ css::ui::dialogs::TemplateDescription::FILESAVE_AUTOEXTENSION );
OUString aExtensions( "*.jar" );
OUString aFilterName(RESIDSTR(STR_FILTER_PACKAGE));
@@ -920,7 +919,7 @@ void XMLFilterSettingsDialog::onOpen()
// Open Fileopen-Dialog
::sfx2::FileDialogHelper aDlg(
- css::ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE, 0 );
+ css::ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE );
OUString aExtensions( "*.jar" );
OUString aFilterName(RESIDSTR(STR_FILTER_PACKAGE));
diff --git a/filter/source/xsltdialog/xmlfiltertabpagexslt.cxx b/filter/source/xsltdialog/xmlfiltertabpagexslt.cxx
index 47e24a9..2fbf0e8 100644
--- a/filter/source/xsltdialog/xmlfiltertabpagexslt.cxx
+++ b/filter/source/xsltdialog/xmlfiltertabpagexslt.cxx
@@ -170,7 +170,7 @@ IMPL_LINK_TYPED ( XMLFilterTabPageXSLT, ClickBrowseHdl_Impl, Button *, pButton,
// Open Fileopen-Dialog
::sfx2::FileDialogHelper aDlg(
- css::ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE, 0 );
+ css::ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE );
aDlg.SetDisplayDirectory( GetURL( pURLBox ) );
diff --git a/filter/source/xsltdialog/xmlfiltertestdialog.cxx b/filter/source/xsltdialog/xmlfiltertestdialog.cxx
index 8262449..1deae62 100644
--- a/filter/source/xsltdialog/xmlfiltertestdialog.cxx
+++ b/filter/source/xsltdialog/xmlfiltertestdialog.cxx
@@ -311,8 +311,7 @@ void XMLFilterTestDialog::onExportBrowse()
{
// Open Fileopen-Dialog
::sfx2::FileDialogHelper aDlg(
- css::ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE,
- 0 );
+ css::ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE );
Reference< XNameAccess > xFilterContainer( mxContext->getServiceManager()->createInstanceWithContext( "com.sun.star.document.FilterFactory", mxContext ), UNO_QUERY );
Reference< XNameAccess > xTypeDetection( mxContext->getServiceManager()->createInstanceWithContext( "com.sun.star.document.TypeDetection", mxContext ), UNO_QUERY );
@@ -546,7 +545,7 @@ void XMLFilterTestDialog::onImportBrowse()
{
// Open Fileopen-Dialog
::sfx2::FileDialogHelper aDlg(
- css::ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE, 0 );
+ css::ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE );
OUString aFilterName( m_pFilterInfo->maInterfaceName );
OUString aExtensions;
diff --git a/forms/source/component/ImageControl.cxx b/forms/source/component/ImageControl.cxx
index cc3be59..2410dc7 100644
--- a/forms/source/component/ImageControl.cxx
+++ b/forms/source/component/ImageControl.cxx
@@ -794,7 +794,7 @@ bool OImageControlControl::implInsertGraphics()
// build some arguments for the upcoming dialog
try
{
- ::sfx2::FileDialogHelper aDialog( TemplateDescription::FILEOPEN_LINK_PREVIEW, SFXWB_GRAPHIC );
+ ::sfx2::FileDialogHelper aDialog( TemplateDescription::FILEOPEN_LINK_PREVIEW, FileDialogFlags::Graphic );
aDialog.SetTitle( sTitle );
Reference< XFilePickerControlAccess > xController( aDialog.GetFilePicker(), UNO_QUERY_THROW );
diff --git a/forms/source/richtext/richtextvclcontrol.cxx b/forms/source/richtext/richtextvclcontrol.cxx
index ca56651..53076ee 100644
--- a/forms/source/richtext/richtextvclcontrol.cxx
+++ b/forms/source/richtext/richtextvclcontrol.cxx
@@ -235,7 +235,7 @@ namespace frm
{ "Text (*.txt)", "*.txt", EE_FORMAT_TEXT }
};
- ::sfx2::FileDialogHelper aFP( bLoad ? css::ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE : css::ui::dialogs::TemplateDescription::FILESAVE_AUTOEXTENSION, 0, this );
+ ::sfx2::FileDialogHelper aFP( bLoad ? css::ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE : css::ui::dialogs::TemplateDescription::FILESAVE_AUTOEXTENSION, FileDialogFlags::NONE, this );
for (auto & aExportFormat : aExportFormats)
{
diff --git a/include/sfx2/docinsert.hxx b/include/sfx2/docinsert.hxx
index dfc423a..7365776 100644
--- a/include/sfx2/docinsert.hxx
+++ b/include/sfx2/docinsert.hxx
@@ -29,6 +29,7 @@
namespace sfx2 { class FileDialogHelper; }
class SfxMedium;
class SfxItemSet;
+enum class FileDialogFlags;
typedef ::std::vector< SfxMedium* > SfxMediumList;
@@ -41,7 +42,7 @@ private:
OUString m_sFilter;
Link<sfx2::FileDialogHelper*,void> m_aDialogClosedLink;
- sal_Int64 const m_nDlgFlags;
+ FileDialogFlags const m_nDlgFlags;
ErrCode m_nError;
sfx2::FileDialogHelper* m_pFileDlg;
diff --git a/include/sfx2/filedlghelper.hxx b/include/sfx2/filedlghelper.hxx
index d8a8fe97..952bd17 100644
--- a/include/sfx2/filedlghelper.hxx
+++ b/include/sfx2/filedlghelper.hxx
@@ -58,12 +58,17 @@ namespace com
class SfxItemSet;
namespace vcl { class Window; }
-// the SFXWB constants are for the nFlags parameter of the constructor
-#define SFXWB_INSERT 0x04000000L // turn Open into Insert dialog
-#define SFXWB_EXPORT 0x40000000L // turn Save into Export dialog
-#define SFXWB_SAVEACOPY 0x00400000L // turn Save into Save a Copy dialog
-#define SFXWB_MULTISELECTION 0x20000000L
-#define SFXWB_GRAPHIC 0x00800000L // register graphic formats
+enum class FileDialogFlags {
+ NONE = 0x00,
+ Insert = 0x01, // turn Open into Insert dialog
+ Export = 0x02, // turn Save into Export dialog
+ SaveACopy = 0x04, // turn Save into Save a Copy dialog
+ MultiSelection = 0x08,
+ Graphic = 0x10 // register graphic formats
+};
+namespace o3tl {
+ template<> struct typed_flags<FileDialogFlags> : is_typed_flags<FileDialogFlags, 0x1f> {};
+}
#define FILEDIALOG_FILTER_ALL "*.*"
@@ -101,17 +106,17 @@ private:
public:
FileDialogHelper( sal_Int16 nDialogType,
- sal_Int64 nFlags,
+ FileDialogFlags nFlags = FileDialogFlags::NONE,
vcl::Window* _pPreferredParent = nullptr );
FileDialogHelper( sal_Int16 nDialogType,
- sal_Int64 nFlags,
+ FileDialogFlags nFlags,
const OUString& rFactory,
SfxFilterFlags nMust = SfxFilterFlags::NONE,
SfxFilterFlags nDont = SfxFilterFlags::NONE );
FileDialogHelper( sal_Int16 nDialogType,
- sal_Int64 nFlags,
+ FileDialogFlags nFlags,
const OUString& rFactory,
sal_Int16 nDialog,
SfxFilterFlags nMust,
@@ -121,7 +126,7 @@ public:
vcl::Window* _pPreferredParent = nullptr);
FileDialogHelper( sal_Int16 nDialogType,
- sal_Int64 nFlags,
+ FileDialogFlags nFlags,
const OUString& aFilterUIName,
const OUString& aExtName,
const OUString& rStandardDir,
@@ -240,7 +245,7 @@ public:
#define SFX2_IMPL_DIALOG_REMOTE 3
ErrCode FileOpenDialog_Impl( sal_Int16 nDialogType,
- sal_Int64 nFlags,
+ FileDialogFlags nFlags,
const OUString& rFact,
std::vector<OUString>& rpURLList,
OUString& rFilter,
diff --git a/reportdesign/source/ui/report/ReportController.cxx b/reportdesign/source/ui/report/ReportController.cxx
index 0125f60..1138d2e 100644
--- a/reportdesign/source/ui/report/ReportController.cxx
+++ b/reportdesign/source/ui/report/ReportController.cxx
@@ -3032,7 +3032,7 @@ void OReportController::insertGraphic()
try
{
uno::Reference< report::XSection> xSection = getDesignView()->getCurrentSection();
- ::sfx2::FileDialogHelper aDialog( ui::dialogs::TemplateDescription::FILEOPEN_LINK_PREVIEW, SFXWB_GRAPHIC );
+ ::sfx2::FileDialogHelper aDialog( ui::dialogs::TemplateDescription::FILEOPEN_LINK_PREVIEW, FileDialogFlags::Graphic );
aDialog.SetTitle( sTitle );
uno::Reference< ui::dialogs::XFilePickerControlAccess > xController(aDialog.GetFilePicker(), UNO_QUERY_THROW);
diff --git a/sc/source/ui/miscdlgs/datastreamdlg.cxx b/sc/source/ui/miscdlgs/datastreamdlg.cxx
index ddd2102..432ae7e 100644
--- a/sc/source/ui/miscdlgs/datastreamdlg.cxx
+++ b/sc/source/ui/miscdlgs/datastreamdlg.cxx
@@ -81,7 +81,7 @@ void DataStreamDlg::dispose()
IMPL_LINK_NOARG_TYPED(DataStreamDlg, BrowseHdl, Button*, void)
{
- sfx2::FileDialogHelper aFileDialog(0, 0);
+ sfx2::FileDialogHelper aFileDialog(0);
if ( aFileDialog.Execute() != ERRCODE_NONE )
return;
diff --git a/sc/source/ui/view/tabvwshb.cxx b/sc/source/ui/view/tabvwshb.cxx
index 8aa8c4b..ec7ce83 100644
--- a/sc/source/ui/view/tabvwshb.cxx
+++ b/sc/source/ui/view/tabvwshb.cxx
@@ -302,7 +302,7 @@ void ScTabViewShell::ExecDrawIns(SfxRequest& rReq)
try
{
sfx2::FileDialogHelper aDlg(ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE,
- 0, OUString("com.sun.star.chart2.ChartDocument"));
+ FileDialogFlags::NONE, OUString("com.sun.star.chart2.ChartDocument"));
if(aDlg.Execute() == ERRCODE_NONE )
{
INetURLObject aURLObj( aDlg.GetPath() );
diff --git a/sd/source/ui/dlg/PhotoAlbumDialog.cxx b/sd/source/ui/dlg/PhotoAlbumDialog.cxx
index 54389ad..04a7b80 100644
--- a/sd/source/ui/dlg/PhotoAlbumDialog.cxx
+++ b/sd/source/ui/dlg/PhotoAlbumDialog.cxx
@@ -477,7 +477,7 @@ IMPL_LINK_NOARG_TYPED(SdPhotoAlbumDialog, FileHdl, Button*, void)
{
::sfx2::FileDialogHelper aDlg(
css::ui::dialogs::TemplateDescription::FILEOPEN_LINK_PREVIEW,
- SFXWB_GRAPHIC | SFXWB_MULTISELECTION
+ FileDialogFlags::Graphic | FileDialogFlags::MultiSelection
);
// Read configuration
OUString sUrl(officecfg::Office::Impress::Pictures::Path::get());
diff --git a/sd/source/ui/dlg/dlgass.cxx b/sd/source/ui/dlg/dlgass.cxx
index ec125ef..50581e0 100644
--- a/sd/source/ui/dlg/dlgass.cxx
+++ b/sd/source/ui/dlg/dlgass.cxx
@@ -1755,7 +1755,7 @@ void AssistentDlg::FinishHdl()
if (aFileToOpen.isEmpty())
{
sfx2::FileDialogHelper aFileDlg(
- ui::dialogs::TemplateDescription::FILEOPEN_READONLY_VERSION, 0,
+ ui::dialogs::TemplateDescription::FILEOPEN_READONLY_VERSION, FileDialogFlags::NONE,
OUString("simpress") );
if ( aFileDlg.Execute() == ERRCODE_NONE )
diff --git a/sd/source/ui/dlg/filedlg.cxx b/sd/source/ui/dlg/filedlg.cxx
index 4776b10..df68e87 100644
--- a/sd/source/ui/dlg/filedlg.cxx
+++ b/sd/source/ui/dlg/filedlg.cxx
@@ -214,7 +214,7 @@ void SdFileDialog_Imp::CheckSelectionState()
}
SdFileDialog_Imp::SdFileDialog_Imp( const short nDialogType ) :
- FileDialogHelper( nDialogType, 0 ),
+ FileDialogHelper( nDialogType ),
mnPlaySoundEvent( nullptr ),
mbUsableSelection( false ),
mbLabelPlaying(false)
diff --git a/sd/source/ui/dlg/tpaction.cxx b/sd/source/ui/dlg/tpaction.cxx
index dda6c66..99175db 100644
--- a/sd/source/ui/dlg/tpaction.cxx
+++ b/sd/source/ui/dlg/tpaction.cxx
@@ -445,7 +445,7 @@ void SdTPAction::OpenFileDialog()
else
{
sfx2::FileDialogHelper aFileDialog(
- ui::dialogs::TemplateDescription::FILEOPEN_READONLY_VERSION, 0);
+ ui::dialogs::TemplateDescription::FILEOPEN_READONLY_VERSION);
if (bDocument && aFile.isEmpty())
aFile = SvtPathOptions().GetWorkPath();
diff --git a/sd/source/ui/func/fuinsert.cxx b/sd/source/ui/func/fuinsert.cxx
index 268336f..63410aa 100644
--- a/sd/source/ui/func/fuinsert.cxx
+++ b/sd/source/ui/func/fuinsert.cxx
@@ -770,7 +770,7 @@ rtl::Reference<FuPoor> FuInsert3DModel::Create( ViewShell* pViewSh, ::sd::Window
void FuInsert3DModel::DoExecute( SfxRequest& )
{
- sfx2::FileDialogHelper aDlg( ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE, 0 );
+ sfx2::FileDialogHelper aDlg( ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE );
aDlg.SetTitle( SD_RESSTR( STR_INSERT_3D_MODEL_TITLE ) );
diff --git a/sd/source/ui/func/fuinsfil.cxx b/sd/source/ui/func/fuinsfil.cxx
index 706b957..badd3ed 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,
- SFXWB_INSERT );
+ FileDialogFlags::Insert );
Reference< XFilePicker > xFilePicker( aFileDialog.GetFilePicker(), UNO_QUERY );
Reference< XFilterManager > xFilterManager( xFilePicker, UNO_QUERY );
OUString aOwnCont;
diff --git a/sfx2/source/appl/appopen.cxx b/sfx2/source/appl/appopen.cxx
index 6d41236..f1cfc5a 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 6f86946..7b154c1 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 2668096..a41e613 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 f26e474..d515d40 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 be78861..17e05c1 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 01b7c6e..4e63998 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 b4b3d74..1706d1b 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 722d951..e528acc 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 28e0e41..6ef03a8 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(),
diff --git a/svx/source/core/graphichelper.cxx b/svx/source/core/graphichelper.cxx
index abfbaa0..b051cbd 100644
--- a/svx/source/core/graphichelper.cxx
+++ b/svx/source/core/graphichelper.cxx
@@ -98,7 +98,7 @@ OUString GraphicHelper::ExportGraphic( const Graphic& rGraphic, const OUString&
SvtPathOptions aPathOpt;
OUString sGraphicsPath( aPathOpt.GetGraphicPath() );
- FileDialogHelper aDialogHelper( TemplateDescription::FILESAVE_AUTOEXTENSION, 0 );
+ FileDialogHelper aDialogHelper( TemplateDescription::FILESAVE_AUTOEXTENSION );
Reference < XFilePicker2 > xFilePicker = aDialogHelper.GetFilePicker();
INetURLObject aPath;
@@ -211,7 +211,7 @@ void GraphicHelper::SaveShapeAsGraphic( const Reference< drawing::XShape >& xSha
SvtPathOptions aPathOpt;
OUString sGraphicPath( aPathOpt.GetGraphicPath() );
- FileDialogHelper aDialogHelper( TemplateDescription::FILESAVE_AUTOEXTENSION, 0 );
+ FileDialogHelper aDialogHelper( TemplateDescription::FILESAVE_AUTOEXTENSION );
Reference < XFilePicker2 > xFilePicker = aDialogHelper.GetFilePicker();
aDialogHelper.SetTitle( "Save as Image" );
diff --git a/svx/source/dialog/imapdlg.cxx b/svx/source/dialog/imapdlg.cxx
index f9d44dc..4cd862a3f 100644
--- a/svx/source/dialog/imapdlg.cxx
+++ b/svx/source/dialog/imapdlg.cxx
@@ -459,7 +459,7 @@ IMPL_LINK_TYPED( SvxIMapDlg, TbxClickHdl, ToolBox*, pTbx, void )
void SvxIMapDlg::DoOpen()
{
::sfx2::FileDialogHelper aDlg(
- css::ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE, 0 );
+ css::ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE );
ImageMap aLoadIMap;
const OUString aFilter( IMAP_ALL_FILTER );
@@ -498,7 +498,7 @@ void SvxIMapDlg::DoOpen()
bool SvxIMapDlg::DoSave()
{
::sfx2::FileDialogHelper aDlg(
- css::ui::dialogs::TemplateDescription::FILESAVE_SIMPLE, 0 );
+ css::ui::dialogs::TemplateDescription::FILESAVE_SIMPLE );
const OUString aBinFilter( IMAP_BINARY_FILTER );
const OUString aCERNFilter( IMAP_CERN_FILTER );
diff --git a/svx/source/form/databaselocationinput.cxx b/svx/source/form/databaselocationinput.cxx
index 80d8459..019bbc0 100644
--- a/svx/source/form/databaselocationinput.cxx
+++ b/svx/source/form/databaselocationinput.cxx
@@ -230,7 +230,7 @@ namespace svx
{
::sfx2::FileDialogHelper aFileDlg(
TemplateDescription::FILESAVE_AUTOEXTENSION,
- 0,
+ FileDialogFlags::NONE,
m_rLocationInput.GetSystemWindow()
);
aFileDlg.SetDisplayDirectory( impl_getCurrentURL() );
diff --git a/svx/source/form/datanavi.cxx b/svx/source/form/datanavi.cxx
index 5f5c943..a76caa7 100644
--- a/svx/source/form/datanavi.cxx
+++ b/svx/source/form/datanavi.cxx
@@ -3402,7 +3402,7 @@ namespace svxform
IMPL_LINK_NOARG_TYPED(AddInstanceDialog, FilePickerHdl, Button*, void)
{
::sfx2::FileDialogHelper aDlg(
- css::ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE, 0 );
+ css::ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE );
INetURLObject aFile( SvtPathOptions().GetWorkPath() );
aDlg.AddFilter( m_sAllFilterName, FILEDIALOG_FILTER_ALL );
diff --git a/sw/source/ui/chrdlg/chardlg.cxx b/sw/source/ui/chrdlg/chardlg.cxx
index 9ebfad1..860ecf1 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 d1ef267..06d4974 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 31232e6..22bc454 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 02e965d..df81c3c 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 1944ca9..075a0b6 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 20662f2..4a329eb 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 5043c77..b847425 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 1273ff7..83fca39 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 e194128..576a9fa 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 97f59f5..e8d6c36 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 8e0b6c4..b369b4e 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 939d0f1..5d6991b 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();
commit 0f4ac20e0456b32995f7a3aff4e46b59e64704a6
Author: Noel Grandin <noel at peralex.com>
Date: Wed May 11 10:37:46 2016 +0200
Convert RulerType to scoped enum
Change-Id: I2233b70e5413bfa3156011e1b3306d539003795b
Reviewed-on: https://gerrit.libreoffice.org/24879
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin at gmail.com>
diff --git a/include/svtools/ruler.hxx b/include/svtools/ruler.hxx
index d18ae42..60436bb 100644
--- a/include/svtools/ruler.hxx
+++ b/include/svtools/ruler.hxx
@@ -244,11 +244,11 @@ it has been dragged. There are the following query methods:
- GetDragType()
Returns what has been dragged.
- RULER_TYPE_MARGIN1
- RULER_TYPE_MARGIN2
- RULER_TYPE_BORDER
- RULER_TYPE_INDENT
- RULER_TYPE_TAB
+ RulerType::Margin1
+ RulerType::Margin2
+ RulerType::Border
+ RulerType::Indent
+ RulerType::Tab
- GetDragPos()
Returns the pixel position to which the user has moved the mouse
@@ -298,13 +298,13 @@ it has been dragged. There are the following query methods:
- GetClickType()
Returns what is applied by double click:
- RULER_TYPE_DONTKNOW (no element in the ruler area)
- RULER_TYPE_OUTSIDE (outside of the ruler area)
- RULER_TYPE_MARGIN1 (only Margin1 border)
- RULER_TYPE_MARGIN2 (only Margin2 border)
- RULER_TYPE_BORDER (Border: GetClickAryPos())
- RULER_TYPE_INDENT (indent: GetClickAryPos())
- RULER_TYPE_TAB (Tab: GetClickAryPos())
+ RulerType::DontKnow (no element in the ruler area)
+ RulerType::Outside (outside of the ruler area)
+ RulerType::Margin1 (only Margin1 border)
+ RulerType::Margin2 (only Margin2 border)
+ RulerType::Border (Border: GetClickAryPos())
+ RulerType::Indent (indent: GetClickAryPos())
+ RulerType::Tab (Tab: GetClickAryPos())
- GetClickAryPos()
Returns the index in the array if a Border, an Indent or a Tab
@@ -318,13 +318,13 @@ it has been dragged. There are the following query methods:
sal_uInt16 are passed, in order to determine the array position
of a Tab, an Indent, or a Border. The following values are
returned as type:
- RULER_TYPE_DONTKNOW (no element in the ruler area)
- RULER_TYPE_OUTSIDE (outside of the ruler area)
- RULER_TYPE_MARGIN1 (only Margin1 border)
- RULER_TYPE_MARGIN2 (only Margin2 border)
- RULER_TYPE_BORDER (Border: GetClickAryPos())
- RULER_TYPE_INDENT (indent: GetClickAryPos())
- RULER_TYPE_TAB (Tab: GetClickAryPos())
+ RulerType::DontKnow (no element in the ruler area)
+ RulerType::Outside (outside of the ruler area)
+ RulerType::Margin1 (only Margin1 border)
+ RulerType::Margin2 (only Margin2 border)
+ RulerType::Border (Border: GetClickAryPos())
+ RulerType::Indent (indent: GetClickAryPos())
+ RulerType::Tab (Tab: GetClickAryPos())
If the drag process should be canceled, this can be done using CancelDrag().
There are the following methods for controlling the Drag:
@@ -342,7 +342,7 @@ methods:
- StartDocDrag()
This method is passed the MouseEvent of the document window
- and what should be dragged. If RULER_TYPE_DONTKNOW is passed
+ and what should be dragged. If RulerType::DontKnow is passed
as DragType, the ruler decides what should be dragged. In case
of the other types, the Drag is only started if a respective
element was found at the given position.
@@ -435,22 +435,22 @@ Tips for the use of the ruler:
multiple of one value because the screen resolution is very imprecise.
- DoubleClicks should be handled in the following way (GetClickType()):
- - RULER_TYPE_DONTKNOW
- RULER_TYPE_MARGIN1
- RULER_TYPE_MARGIN2
+ - RulerType::DontKnow
+ RulerType::Margin1
+ RulerType::Margin2
If the conditions GetClickPos() <= GetMargin1() or
GetClickPos() >= GetMargin2() are met or the type is equal to
- RULER_TYPE_MARGIN1 or RULER_TYPE_MARGIN2, a side dialog should
+ RulerType::Margin1 or RulerType::Margin2, a side dialog should
be displayed in which the focus is at the respective border.
- - RULER_TYPE_BORDER
+ - RulerType::Border
A column or table dialog should be shown in which the focus
is at the respective column that can be queried using
GetClickAryPos().
- - RULER_TYPE_INDENT
+ - RulerType::Indent
The dialog, in which the indents can be configured, should be
shown. In this, the focus should be on the indent which can
be queried using GetClickAryPos().
- - RULER_TYPE_TAB
+ - RulerType::Tab
A TabDialog should be displayed in which the Tab, that can be
queried using GetClickAryPos(), should be selected.
@@ -462,9 +462,9 @@ Tips for the use of the ruler:
#define WB_STDRULER WB_HORZ
-enum RulerType { RULER_TYPE_DONTKNOW, RULER_TYPE_OUTSIDE,
- RULER_TYPE_MARGIN1, RULER_TYPE_MARGIN2,
- RULER_TYPE_BORDER, RULER_TYPE_INDENT, RULER_TYPE_TAB };
+enum class RulerType { DontKnow, Outside,
+ Margin1, Margin2,
+ Border, Indent, Tab };
enum class RulerExtra { DontKnow, NullOffset, Tab };
@@ -561,7 +561,7 @@ struct RulerSelection
RulerSelection()
: nPos(0)
- , eType(RULER_TYPE_DONTKNOW)
+ , eType(RulerType::DontKnow)
, nAryPos(0)
, mnDragSize(RulerDragSize::Move)
, bSize(false)
@@ -750,7 +750,7 @@ public:
void SetExtraType( RulerExtra eNewExtraType, sal_uInt16 nStyle = 0 );
bool StartDocDrag( const MouseEvent& rMEvt,
- RulerType eDragType = RULER_TYPE_DONTKNOW );
+ RulerType eDragType = RulerType::DontKnow );
RulerType GetDragType() const { return meDragType; }
long GetDragPos() const { return mnDragPos; }
sal_uInt16 GetDragAryPos() const { return mnDragAryPos; }
diff --git a/sd/source/ui/view/sdruler.cxx b/sd/source/ui/view/sdruler.cxx
index 5f3bebf..19efdac 100644
--- a/sd/source/ui/view/sdruler.cxx
+++ b/sd/source/ui/view/sdruler.cxx
@@ -111,7 +111,7 @@ void Ruler::MouseButtonDown(const MouseEvent& rMEvt)
if ( !pDrViewShell->GetView()->IsTextEdit() &&
rMEvt.IsLeft() && rMEvt.GetClicks() == 1 &&
- (eType == RULER_TYPE_DONTKNOW || eType == RULER_TYPE_OUTSIDE) )
+ (eType == RulerType::DontKnow || eType == RulerType::Outside) )
{
pDrViewShell->StartRulerDrag(*this, rMEvt);
}
diff --git a/svtools/source/control/ruler.cxx b/svtools/source/control/ruler.cxx
index 2c9abac..aa2bf9d 100644
--- a/svtools/source/control/ruler.cxx
+++ b/svtools/source/control/ruler.cxx
@@ -254,7 +254,7 @@ void Ruler::ImplInit( WinBits nWinBits )
mnUpdateFlags = 0; // What needs to be updated
mpData = mpSaveData; // Pointer to normal data
meExtraType = RulerExtra::DontKnow; // What is in extra field
- meDragType = RULER_TYPE_DONTKNOW; // Which element is dragged
+ meDragType = RulerType::DontKnow; // Which element is dragged
// Initialize Units
mnUnitIndex = RULER_UNIT_CM;
@@ -854,11 +854,11 @@ void Ruler::ImplDrawIndents(vcl::RenderContext& rRenderContext, long nMin, long
if (RulerIndentStyle::Border != nIndentStyle)
{
bool bIsHit = false;
- if(mxCurrentHitTest.get() != nullptr && mxCurrentHitTest->eType == RULER_TYPE_INDENT)
+ if(mxCurrentHitTest.get() != nullptr && mxCurrentHitTest->eType == RulerType::Indent)
{
bIsHit = mxCurrentHitTest->nAryPos == j;
}
- else if(mbDrag && meDragType == RULER_TYPE_INDENT)
+ else if(mbDrag && meDragType == RulerType::Indent)
{
bIsHit = mnDragAryPos == j;
}
@@ -1520,13 +1520,13 @@ bool Ruler::ImplHitTest( const Point& rPos, RulerSelection* pHitTest,
(nY > nHitBottom) )
{
pHitTest->nPos = 0;
- pHitTest->eType = RULER_TYPE_OUTSIDE;
+ pHitTest->eType = RulerType::Outside;
return false;
}
nX -= mpData->nNullVirOff;
pHitTest->nPos = nX;
- pHitTest->eType = RULER_TYPE_DONTKNOW;
+ pHitTest->eType = RulerType::DontKnow;
// first test the tabs
Rectangle aRect;
@@ -1565,7 +1565,7 @@ bool Ruler::ImplHitTest( const Point& rPos, RulerSelection* pHitTest,
if ( aRect.IsInside( Point( nX, nY ) ) )
{
- pHitTest->eType = RULER_TYPE_TAB;
+ pHitTest->eType = RulerType::Tab;
pHitTest->nAryPos = i;
return true;
}
@@ -1605,7 +1605,7 @@ bool Ruler::ImplHitTest( const Point& rPos, RulerSelection* pHitTest,
if ( aRect.IsInside( Point( nX, nY ) ) )
{
- pHitTest->eType = RULER_TYPE_INDENT;
+ pHitTest->eType = RulerType::Indent;
pHitTest->nAryPos = i-1;
return true;
}
@@ -1617,7 +1617,7 @@ bool Ruler::ImplHitTest( const Point& rPos, RulerSelection* pHitTest,
if ( (nXTemp < mpData->nRulVirOff) || (nXTemp > mpData->nRulVirOff+mpData->nRulWidth) )
{
pHitTest->nPos = 0;
- pHitTest->eType = RULER_TYPE_OUTSIDE;
+ pHitTest->eType = RulerType::Outside;
return false;
}
@@ -1646,7 +1646,7 @@ bool Ruler::ImplHitTest( const Point& rPos, RulerSelection* pHitTest,
RulerBorderStyle nBorderStyle = mpData->pBorders[i-1].nStyle;
if ( !(nBorderStyle & RulerBorderStyle::Invisible) )
{
- pHitTest->eType = RULER_TYPE_BORDER;
+ pHitTest->eType = RulerType::Border;
pHitTest->nAryPos = i-1;
if ( !(nBorderStyle & RulerBorderStyle::Sizeable) )
@@ -1704,7 +1704,7 @@ bool Ruler::ImplHitTest( const Point& rPos, RulerSelection* pHitTest,
n1 = mpData->nMargin1;
if ( (nX >= n1 - nMarginTolerance) && (nX <= n1 + nMarginTolerance) )
{
- pHitTest->eType = RULER_TYPE_MARGIN1;
+ pHitTest->eType = RulerType::Margin1;
pHitTest->bSize = true;
return true;
}
@@ -1714,7 +1714,7 @@ bool Ruler::ImplHitTest( const Point& rPos, RulerSelection* pHitTest,
n1 = mpData->nMargin2;
if ( (nX >= n1 - nMarginTolerance) && (nX <= n1 + nMarginTolerance) )
{
- pHitTest->eType = RULER_TYPE_MARGIN2;
+ pHitTest->eType = RulerType::Margin2;
pHitTest->bSize = true;
return true;
}
@@ -1759,7 +1759,7 @@ bool Ruler::ImplHitTest( const Point& rPos, RulerSelection* pHitTest,
if ( aRect.IsInside( Point( nX, nY ) ) )
{
- pHitTest->eType = RULER_TYPE_TAB;
+ pHitTest->eType = RulerType::Tab;
pHitTest->nAryPos = i;
return true;
}
@@ -1778,7 +1778,7 @@ bool Ruler::ImplDocHitTest( const Point& rPos, RulerType eDragType,
bool bRequiredStyle = false;
RulerIndentStyle nRequiredStyle = RulerIndentStyle::Top;
- if (eDragType == RULER_TYPE_INDENT)
+ if (eDragType == RulerType::Indent)
{
bRequiredStyle = true;
nRequiredStyle = RulerIndentStyle::Bottom;
@@ -1789,7 +1789,7 @@ bool Ruler::ImplDocHitTest( const Point& rPos, RulerType eDragType,
else
aPos.Y() += mnWinOff;
- if ( (eDragType == RULER_TYPE_INDENT) || (eDragType == RULER_TYPE_DONTKNOW) )
+ if ( (eDragType == RulerType::Indent) || (eDragType == RulerType::DontKnow) )
{
if ( mnWinStyle & WB_HORZ )
aPos.Y() = RULER_OFF + 1;
@@ -1798,14 +1798,14 @@ bool Ruler::ImplDocHitTest( const Point& rPos, RulerType eDragType,
if ( ImplHitTest( aPos, pHitTest, bRequiredStyle, nRequiredStyle ) )
{
- if ( (pHitTest->eType == eDragType) || (eDragType == RULER_TYPE_DONTKNOW) )
+ if ( (pHitTest->eType == eDragType) || (eDragType == RulerType::DontKnow) )
return true;
}
}
- if ( (eDragType == RULER_TYPE_INDENT) ||
- (eDragType == RULER_TYPE_TAB) ||
- (eDragType == RULER_TYPE_DONTKNOW) )
+ if ( (eDragType == RulerType::Indent) ||
+ (eDragType == RulerType::Tab) ||
+ (eDragType == RulerType::DontKnow) )
{
if ( mnWinStyle & WB_HORZ )
aPos.Y() = mnHeight - RULER_OFF - 1;
@@ -1814,13 +1814,13 @@ bool Ruler::ImplDocHitTest( const Point& rPos, RulerType eDragType,
if ( ImplHitTest( aPos, pHitTest, bRequiredStyle, nRequiredStyle ) )
{
- if ( (pHitTest->eType == eDragType) || (eDragType == RULER_TYPE_DONTKNOW) )
+ if ( (pHitTest->eType == eDragType) || (eDragType == RulerType::DontKnow) )
return true;
}
}
- if ( (eDragType == RULER_TYPE_MARGIN1) || (eDragType == RULER_TYPE_MARGIN2) ||
- (eDragType == RULER_TYPE_BORDER) || (eDragType == RULER_TYPE_DONTKNOW) )
+ if ( (eDragType == RulerType::Margin1) || (eDragType == RulerType::Margin2) ||
+ (eDragType == RulerType::Border) || (eDragType == RulerType::DontKnow) )
{
if ( mnWinStyle & WB_HORZ )
aPos.Y() = RULER_OFF + (mnVirHeight / 2);
@@ -1829,12 +1829,12 @@ bool Ruler::ImplDocHitTest( const Point& rPos, RulerType eDragType,
if ( ImplHitTest( aPos, pHitTest ) )
{
- if ( (pHitTest->eType == eDragType) || (eDragType == RULER_TYPE_DONTKNOW) )
+ if ( (pHitTest->eType == eDragType) || (eDragType == RulerType::DontKnow) )
return true;
}
}
- pHitTest->eType = RULER_TYPE_DONTKNOW;
+ pHitTest->eType = RulerType::DontKnow;
return false;
}
@@ -1842,7 +1842,7 @@ bool Ruler::ImplDocHitTest( const Point& rPos, RulerType eDragType,
bool Ruler::ImplStartDrag( RulerSelection* pHitTest, sal_uInt16 nModifier )
{
// don't trigger drag if a border that was clicked can not be changed
- if ( (pHitTest->eType == RULER_TYPE_BORDER) &&
+ if ( (pHitTest->eType == RulerType::Border) &&
!pHitTest->bSize && !pHitTest->bSizeBar )
return false;
@@ -1868,7 +1868,7 @@ bool Ruler::ImplStartDrag( RulerSelection* pHitTest, sal_uInt16 nModifier )
else
{
// otherwise reset the data
- meDragType = RULER_TYPE_DONTKNOW;
+ meDragType = RulerType::DontKnow;
mnDragPos = 0;
mnDragAryPos = 0;
mnDragSize = RulerDragSize::Move;
@@ -1969,7 +1969,7 @@ void Ruler::ImplEndDrag()
EndDrag();
// reset drag values
- meDragType = RULER_TYPE_DONTKNOW;
+ meDragType = RulerType::DontKnow;
mnDragPos = 0;
mnDragAryPos = 0;
mnDragSize = RulerDragSize::Move;
@@ -2018,7 +2018,7 @@ void Ruler::MouseButtonDown( const MouseEvent& rMEvt )
else
{
// calculate position inside of ruler area
- if ( pHitTest->eType == RULER_TYPE_DONTKNOW )
+ if ( pHitTest->eType == RulerType::DontKnow )
{
mnDragPos = pHitTest->nPos;
Click();
@@ -2041,7 +2041,7 @@ void Ruler::MouseButtonDown( const MouseEvent& rMEvt )
DoubleClick();
- meDragType = RULER_TYPE_DONTKNOW;
+ meDragType = RulerType::DontKnow;
mnDragPos = 0;
mnDragAryPos = 0;
}
@@ -2057,7 +2057,7 @@ void Ruler::MouseMove( const MouseEvent& rMEvt )
mxCurrentHitTest.reset(new RulerSelection);
- maHoverSelection.eType = RULER_TYPE_DONTKNOW;
+ maHoverSelection.eType = RulerType::DontKnow;
if (ImplHitTest( rMEvt.GetPosPixel(), mxCurrentHitTest.get() ))
{
@@ -2314,7 +2314,7 @@ bool Ruler::StartDocDrag( const MouseEvent& rMEvt, RulerType eDragType )
sal_uInt16 nMouseModifier = rMEvt.GetModifier();
RulerSelection aHitTest;
- if(eDragType != RULER_TYPE_DONTKNOW)
+ if(eDragType != RulerType::DontKnow)
aHitTest.bExpandTest = true;
// update ruler
diff --git a/svx/source/dialog/svxruler.cxx b/svx/source/dialog/svxruler.cxx
index cce37b1..bdbfa86 100644
--- a/svx/source/dialog/svxruler.cxx
+++ b/svx/source/dialog/svxruler.cxx
@@ -597,7 +597,7 @@ void SvxRuler::MouseMove( const MouseEvent& rMEvt )
RulerSelection aSelection = GetHoverSelection();
- if (aSelection.eType == RULER_TYPE_DONTKNOW)
+ if (aSelection.eType == RulerType::DontKnow)
{
SetQuickHelpText("");
return;
@@ -610,7 +610,7 @@ void SvxRuler::MouseMove( const MouseEvent& rMEvt )
switch (aSelection.eType)
{
- case RULER_TYPE_INDENT:
+ case RulerType::Indent:
{
if (!mxParaItem.get())
break;
@@ -631,7 +631,7 @@ void SvxRuler::MouseMove( const MouseEvent& rMEvt )
SetQuickHelpText(OUString::number(fValue) + " " + sUnit);
break;
}
- case RULER_TYPE_BORDER:
+ case RulerType::Border:
{
if (mxColumnItem.get() == nullptr)
break;
@@ -651,7 +651,7 @@ void SvxRuler::MouseMove( const MouseEvent& rMEvt )
OUString::number(fEnd) + " " + sUnit );
break;
}
- case RULER_TYPE_MARGIN1:
+ case RulerType::Margin1:
{
long nLeft = 0.0;
if (mxLRSpaceItem.get())
@@ -667,7 +667,7 @@ void SvxRuler::MouseMove( const MouseEvent& rMEvt )
break;
}
- case RULER_TYPE_MARGIN2:
+ case RulerType::Margin2:
{
long nRight = 0.0;
if (mxLRSpaceItem.get())
@@ -1745,7 +1745,7 @@ void SvxRuler::DragBorders()
bool bRightIndentsCorrected = false;
int nIndex;
- if(GetDragType() == RULER_TYPE_BORDER)
+ if(GetDragType() == RulerType::Border)
{
DrawLine_Impl(lTabPos, 7, bHorz);
nIndex = GetDragAryPos();
@@ -1766,10 +1766,10 @@ void SvxRuler::DragBorders()
case RulerDragSize::Move:
{
ADD_DEBUG_TEXT("lLastLMargin: ", OUString::number(mxRulerImpl->lLastLMargin))
- if(GetDragType() == RULER_TYPE_BORDER)
+ if(GetDragType() == RulerType::Border)
lDiff = lPos - nDragOffset - mpBorders[nIndex].nPos;
else
- lDiff = GetDragType() == RULER_TYPE_MARGIN1 ? lPos - mxRulerImpl->lLastLMargin : lPos - mxRulerImpl->lLastRMargin;
+ lDiff = GetDragType() == RulerType::Margin1 ? lPos - mxRulerImpl->lLastLMargin : lPos - mxRulerImpl->lLastRMargin;
if(nDragType & SvxRulerDragFlags::OBJECT_SIZE_LINEAR)
{
@@ -1804,7 +1804,7 @@ ADD_DEBUG_TEXT("lLastLMargin: ", OUString::number(mxRulerImpl->lLastLMargin))
default: ;//prevent warning
OSL_FAIL("svx::SvxRuler::DragBorders(), unknown drag type!" );
SAL_FALLTHROUGH;
- case RULER_TYPE_BORDER:
+ case RulerType::Border:
if(mxRulerImpl->bIsTableRows)
{
mpBorders[nIndex].nPos += lDiff;
@@ -1830,12 +1830,12 @@ ADD_DEBUG_TEXT("lLastLMargin: ", OUString::number(mxRulerImpl->lLastLMargin))
mxRulerImpl->nTotalDist -= lDiff;
}
break;
- case RULER_TYPE_MARGIN1:
+ case RulerType::Margin1:
nLimit = 0;
lLeft = mxRulerImpl->lLastLMargin + lDiff;
mxRulerImpl->nTotalDist -= lDiff;
break;
- case RULER_TYPE_MARGIN2:
+ case RulerType::Margin2:
nLimit = 0;
lLeft= 0;
nStartLimit = mpBorders.size() - 2;
@@ -1893,7 +1893,7 @@ ADD_DEBUG_TEXT("lLastLMargin: ", OUString::number(mxRulerImpl->lLastLMargin))
//This includes the left border when the table is not limited
//to a lower frame border.
int nLimit;
- if(GetDragType()==RULER_TYPE_BORDER)
+ if(GetDragType()==RulerType::Border)
{
nLimit = nIndex + 1;
mpBorders[nIndex].nPos += lDiff;
@@ -2348,11 +2348,11 @@ void SvxRuler::PrepareProportional_Impl(RulerType eType)
proportional share of the total width in parts per thousand.
*/
mxRulerImpl->nTotalDist = GetMargin2();
- switch((int)eType)
+ switch(eType)
{
- case RULER_TYPE_MARGIN2:
- case RULER_TYPE_MARGIN1:
- case RULER_TYPE_BORDER:
+ case RulerType::Margin2:
+ case RulerType::Margin1:
+ case RulerType::Border:
{
DBG_ASSERT(mxColumnItem.get(), "no ColumnItem");
@@ -2366,7 +2366,7 @@ void SvxRuler::PrepareProportional_Impl(RulerType eType)
long lActBorderSum;
long lOrigLPos;
- if(eType != RULER_TYPE_BORDER)
+ if(eType != RulerType::Border)
{
lOrigLPos = GetMargin1();
nStart = 0;
@@ -2390,7 +2390,7 @@ void SvxRuler::PrepareProportional_Impl(RulerType eType)
//in horizontal mode the percentage value has to be
//calculated on a "current change" position base
//because the height of the table changes while dragging
- if(mxRulerImpl->bIsTableRows && RULER_TYPE_BORDER == eType)
+ if(mxRulerImpl->bIsTableRows && RulerType::Border == eType)
{
sal_uInt16 nStartBorder;
sal_uInt16 nEndBorder;
@@ -2451,7 +2451,7 @@ void SvxRuler::PrepareProportional_Impl(RulerType eType)
}
}
break;
- case RULER_TYPE_TAB:
+ case RulerType::Tab:
{
const sal_uInt16 nIdx = GetDragAryPos()+TAB_GAP;
mxRulerImpl->nTotalDist -= mpTabs[nIdx].nPos;
@@ -2464,6 +2464,7 @@ void SvxRuler::PrepareProportional_Impl(RulerType eType)
}
break;
}
+ default: break;
}
}
@@ -2501,10 +2502,10 @@ void SvxRuler::EvalModifier()
{
const RulerType eType = GetDragType();
nDragType = SvxRulerDragFlags::OBJECT_SIZE_PROPORTIONAL;
- if( RULER_TYPE_TAB == eType ||
- ( ( RULER_TYPE_BORDER == eType ||
- RULER_TYPE_MARGIN1 == eType ||
- RULER_TYPE_MARGIN2 == eType ) &&
+ if( RulerType::Tab == eType ||
+ ( ( RulerType::Border == eType ||
+ RulerType::Margin1 == eType ||
+ RulerType::Margin2 == eType ) &&
mxColumnItem.get() ) )
{
PrepareProportional_Impl(eType);
@@ -2512,8 +2513,8 @@ void SvxRuler::EvalModifier()
}
break;
case KEY_MOD1 | KEY_SHIFT:
- if( GetDragType() != RULER_TYPE_MARGIN1 &&
- GetDragType() != RULER_TYPE_MARGIN2 )
+ if( GetDragType() != RulerType::Margin1 &&
+ GetDragType() != RulerType::Margin2 )
{
nDragType = SvxRulerDragFlags::OBJECT_ACTLINE_ONLY;
}
@@ -2595,7 +2596,7 @@ void SvxRuler::CalcMinMax()
mxRulerImpl->lMaxLeftLogic=mxRulerImpl->lMaxRightLogic=-1;
switch(GetDragType())
{
- case RULER_TYPE_MARGIN1:
+ case RulerType::Margin1:
{ // left edge of the surrounding Frame
// DragPos - NOf between left - right
mxRulerImpl->lMaxLeftLogic = GetLeftMin();
@@ -2684,7 +2685,7 @@ void SvxRuler::CalcMinMax()
}
break;
}
- case RULER_TYPE_MARGIN2:
+ case RulerType::Margin2:
{ // right edge of the surrounding Frame
mxRulerImpl->lMaxRightLogic =
mxMinMaxItem.get() ?
@@ -2765,7 +2766,7 @@ void SvxRuler::CalcMinMax()
}
break;
}
- case RULER_TYPE_BORDER:
+ case RulerType::Border:
{ // Table, column (Modifier)
const sal_uInt16 nIdx = GetDragAryPos();
switch(GetDragSize())
@@ -3014,7 +3015,7 @@ void SvxRuler::CalcMinMax()
nMaxRight += nDragOffset;
break;
}
- case RULER_TYPE_INDENT:
+ case RulerType::Indent:
{
const sal_uInt16 nIdx = GetDragAryPos();
switch(nIdx) {
@@ -3103,7 +3104,7 @@ void SvxRuler::CalcMinMax()
}
break;
}
- case RULER_TYPE_TAB: // Tabs (Modifier)
+ case RulerType::Tab: // Tabs (Modifier)
/* left = NOf + Max(LAR, EZ)
right = NOf + RAR */
@@ -3144,8 +3145,8 @@ bool SvxRuler::StartDrag()
lInitialDragPos = GetDragPos();
switch(GetDragType())
{
- case RULER_TYPE_MARGIN1: // left edge of the surrounding Frame
- case RULER_TYPE_MARGIN2: // right edge of the surrounding Frame
+ case RulerType::Margin1: // left edge of the surrounding Frame
+ case RulerType::Margin2: // right edge of the surrounding Frame
if((bHorz && mxLRSpaceItem.get()) || (!bHorz && mxULSpaceItem.get()))
{
if(!mxColumnItem.get())
@@ -3158,7 +3159,7 @@ bool SvxRuler::StartDrag()
bOk = false;
}
break;
- case RULER_TYPE_BORDER: // Table, column (Modifier)
+ case RulerType::Border: // Table, column (Modifier)
if(mxColumnItem.get())
{
nDragOffset = 0;
@@ -3169,7 +3170,7 @@ bool SvxRuler::StartDrag()
else
nDragOffset = 0;
break;
- case RULER_TYPE_INDENT: // Paragraph indents (Modifier)
+ case RulerType::Indent: // Paragraph indents (Modifier)
{
if( bContentProtected )
return false;
@@ -3185,7 +3186,7 @@ bool SvxRuler::StartDrag()
mpIndents[1] = mpIndents[GetDragAryPos() + INDENT_GAP];
break;
}
- case RULER_TYPE_TAB: // Tabs (Modifier)
+ case RulerType::Tab: // Tabs (Modifier)
if( bContentProtected )
return false;
EvalModifier();
@@ -3211,24 +3212,24 @@ void SvxRuler::Drag()
return;
}
switch(GetDragType()) {
- case RULER_TYPE_MARGIN1: // left edge of the surrounding Frame
+ case RulerType::Margin1: // left edge of the surrounding Frame
DragMargin1();
mxRulerImpl->lLastLMargin = GetMargin1();
break;
- case RULER_TYPE_MARGIN2: // right edge of the surrounding Frame
+ case RulerType::Margin2: // right edge of the surrounding Frame
DragMargin2();
mxRulerImpl->lLastRMargin = GetMargin2();
break;
- case RULER_TYPE_INDENT: // Paragraph indents
+ case RulerType::Indent: // Paragraph indents
DragIndents();
break;
- case RULER_TYPE_BORDER: // Table, columns
+ case RulerType::Border: // Table, columns
if(mxColumnItem.get())
DragBorders();
else if(mxObjectItem.get())
DragObjectBorder();
break;
- case RULER_TYPE_TAB: // Tabs
+ case RulerType::Tab: // Tabs
DragTabs();
break;
default:
@@ -3253,8 +3254,8 @@ void SvxRuler::EndDrag()
{
switch(GetDragType())
{
- case RULER_TYPE_MARGIN1: // upper left edge of the surrounding Frame
- case RULER_TYPE_MARGIN2: // lower right edge of the surrounding Frame
+ case RulerType::Margin1: // upper left edge of the surrounding Frame
+ case RulerType::Margin2: // lower right edge of the surrounding Frame
{
if(!mxColumnItem.get() || !mxColumnItem->IsTable())
ApplyMargins();
@@ -3266,7 +3267,7 @@ void SvxRuler::EndDrag()
}
break;
- case RULER_TYPE_BORDER: // Table, columns
+ case RulerType::Border: // Table, columns
if(lInitialDragPos != lPos ||
(mxRulerImpl->bIsTableRows && bHorz)) //special case - the null offset is changed here
{
@@ -3280,12 +3281,12 @@ void SvxRuler::EndDrag()
ApplyObject();
}
break;
- case RULER_TYPE_INDENT: // Paragraph indents
+ case RulerType::Indent: // Paragraph indents
if(lInitialDragPos != lPos)
ApplyIndents();
SetIndents(INDENT_COUNT, &mpIndents[0] + INDENT_GAP);
break;
- case RULER_TYPE_TAB: // Tabs
+ case RulerType::Tab: // Tabs
{
ApplyTabs();
mpTabs[GetDragAryPos()].nStyle &= ~RULER_STYLE_INVISIBLE;
@@ -3382,7 +3383,7 @@ void SvxRuler::Command( const CommandEvent& rCommandEvent )
CancelDrag();
bool bRTL = mxRulerImpl->pTextRTLItem && mxRulerImpl->pTextRTLItem->GetValue();
if ( !mpTabs.empty() &&
- RULER_TYPE_TAB ==
+ RulerType::Tab ==
GetType( rCommandEvent.GetMousePosPixel(), &mxRulerImpl->nIdx ) &&
mpTabs[mxRulerImpl->nIdx + TAB_GAP].nStyle < RULER_TAB_DEFAULT )
{
diff --git a/sw/source/uibase/docvw/edtwin3.cxx b/sw/source/uibase/docvw/edtwin3.cxx
index 07037d5..745bbd4 100644
--- a/sw/source/uibase/docvw/edtwin3.cxx
+++ b/sw/source/uibase/docvw/edtwin3.cxx
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list