diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-08-18 16:42:24 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-08-19 06:54:24 +0200 |
commit | b4ac906cd07c06abcda427f70787b9b6c213b354 (patch) | |
tree | 55b529720c17e3b86ef5d0dfcb920ca65b99143a /cui | |
parent | 50acead19bd13a344f8ca9b3879f8e8cb0b24eb7 (diff) |
convert to WB_SAVEAS to flags on SfxAcceleratorConfigPage::StartFileDialog
Change-Id: I52ff0b4ba892a74d1dad9ce8c6c7638e3463affe
Reviewed-on: https://gerrit.libreoffice.org/41303
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/customize/acccfg.cxx | 8 | ||||
-rw-r--r-- | cui/source/inc/acccfg.hxx | 4 |
2 files changed, 7 insertions, 5 deletions
diff --git a/cui/source/customize/acccfg.cxx b/cui/source/customize/acccfg.cxx index 1d0af8c3d45d..04d055a5537b 100644 --- a/cui/source/customize/acccfg.cxx +++ b/cui/source/customize/acccfg.cxx @@ -1054,12 +1054,12 @@ IMPL_LINK_NOARG(SfxAcceleratorConfigPage, SearchUpdateHdl, Edit&, void) IMPL_LINK_NOARG(SfxAcceleratorConfigPage, Load, Button*, void) { // ask for filename, where we should load the new config data from - StartFileDialog( 0, aLoadAccelConfigStr ); + StartFileDialog( StartFileDialogType::Open, aLoadAccelConfigStr ); } IMPL_LINK_NOARG(SfxAcceleratorConfigPage, Save, Button*, void) { - StartFileDialog( WB_SAVEAS, aSaveAccelConfigStr ); + StartFileDialog( StartFileDialogType::SaveAs, aSaveAccelConfigStr ); } IMPL_LINK_NOARG(SfxAcceleratorConfigPage, Default, Button*, void) @@ -1391,9 +1391,9 @@ IMPL_LINK_NOARG(SfxAcceleratorConfigPage, SaveHdl, sfx2::FileDialogHelper*, void } -void SfxAcceleratorConfigPage::StartFileDialog( WinBits nBits, const OUString& rTitle ) +void SfxAcceleratorConfigPage::StartFileDialog( StartFileDialogType nType, const OUString& rTitle ) { - bool bSave = ( ( nBits & WB_SAVEAS ) == WB_SAVEAS ); + bool bSave = nType == StartFileDialogType::SaveAs; short nDialogType = bSave ? ui::dialogs::TemplateDescription::FILESAVE_AUTOEXTENSION : ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE; delete m_pFileDlg; diff --git a/cui/source/inc/acccfg.hxx b/cui/source/inc/acccfg.hxx index adc67e208885..cc78f437d913 100644 --- a/cui/source/inc/acccfg.hxx +++ b/cui/source/inc/acccfg.hxx @@ -103,6 +103,8 @@ namespace sfx2 class FileDialogHelper; } +enum class StartFileDialogType { Open, SaveAs }; + class SfxAcceleratorConfigPage : public SfxTabPage { friend class SfxAccCfgTabListBox_Impl; @@ -159,7 +161,7 @@ private: SvTreeListEntry* applySearchFilter(OUString const & rSearchTerm, SvTreeListBox* rListBox); void InitAccCfg(); sal_uLong MapKeyCodeToPos( const vcl::KeyCode &rCode ) const; - void StartFileDialog( WinBits nBits, const OUString& rTitle ); + void StartFileDialog( StartFileDialogType nType, const OUString& rTitle ); void Init(const css::uno::Reference< css::ui::XAcceleratorConfiguration >& pAccMgr); void ResetConfig(); |