diff options
author | Noel Grandin <noel@peralex.com> | 2015-04-02 10:28:17 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-04-07 13:05:34 +0200 |
commit | 4906c243877681b4559b495c1dfb4dbf8c51cfb8 (patch) | |
tree | 7b813844ffa4325ce75dd765513d6a413c198384 /filter | |
parent | 5af475887a85e0be38869dc36252d36a572b8943 (diff) |
convert SvtModuleOptions::EFactory to enum class
and fix issues in iterating through o3tl::enumarray
Change-Id: Ia59ef9be44d8c92c2e406fa71aa92269578e26e3
Diffstat (limited to 'filter')
-rw-r--r-- | filter/source/xsltdialog/xmlfiltersettingsdialog.cxx | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx b/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx index 57d451d1c81d..271db0b60a38 100644 --- a/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx +++ b/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx @@ -29,6 +29,7 @@ #include <unotools/streamwrap.hxx> #include <unotools/pathoptions.hxx> #include <osl/file.hxx> +#include <o3tl/enumrange.hxx> #include <vcl/msgbox.hxx> #include <sfx2/filedlghelper.hxx> #include "svtools/treelistentry.hxx" @@ -187,16 +188,14 @@ void XMLFilterSettingsDialog::updateStates() filter_info_impl* pInfo = static_cast<filter_info_impl*>(pSelectedEntry->GetUserData()); bIsReadonly = pInfo->mbReadonly; - sal_Int32 nFact = SvtModuleOptions::E_WRITER; - while(nFact <= SvtModuleOptions::E_BASIC) + for( auto nFact : o3tl::enumrange<SvtModuleOptions::EFactory>()) { - OUString sDefault = maModuleOpt.GetFactoryDefaultFilter((SvtModuleOptions::EFactory)nFact); + OUString sDefault = maModuleOpt.GetFactoryDefaultFilter(nFact); if( sDefault == pInfo->maFilterName ) { bIsDefault = true; break; } - ++nFact; } } m_pPBEdit->Enable( bHasSelection && !bMultiSelection && !bIsReadonly); |