summaryrefslogtreecommitdiff
path: root/cui/source
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2017-06-19 09:32:45 +0200
committerStephan Bergmann <sbergman@redhat.com>2017-06-19 09:38:05 +0200
commit1e3a00f0c772a76a1dd76b8272e2c35a1802d574 (patch)
treea1eadac1680f1e46c789964200aa8a61bb659189 /cui/source
parent9fe114e78f1285397dcd2a0d2e3d6afc3024fa66 (diff)
Make SfxItemSet ranges correct by construction: Fix static cases
...with the aid of an extended compilerplugins/clang/store/sfxitemsetrewrite.cxx (which in turn needed a small addition to compilerplugins/clang/check.hxx). Enable svl::detail::validGap check for the static case, but keep it disabled for now for the dynamic case. Change-Id: I4846ba8e99aff94a86518e2cb5044e575093386e
Diffstat (limited to 'cui/source')
-rw-r--r--cui/source/options/treeopt.cxx33
1 files changed, 19 insertions, 14 deletions
diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx
index b82a2a948442..97681f0259da 100644
--- a/cui/source/options/treeopt.cxx
+++ b/cui/source/options/treeopt.cxx
@@ -1124,11 +1124,12 @@ std::unique_ptr<SfxItemSet> OfaTreeOptionsDialog::CreateItemSet( sal_uInt16 nId
{
pRet = o3tl::make_unique<SfxItemSet>(
SfxGetpApp()->GetPool(),
- svl::Items<SID_ATTR_METRIC, SID_ATTR_SPELL,
- SID_AUTOSPELL_CHECK, SID_AUTOSPELL_CHECK,
- SID_ATTR_QUICKLAUNCHER, SID_ATTR_QUICKLAUNCHER,
- SID_ATTR_YEAR2000, SID_ATTR_YEAR2000,
- SID_HTML_MODE, SID_HTML_MODE>{} );
+ svl::Items<
+ SID_HTML_MODE, SID_HTML_MODE,
+ SID_ATTR_METRIC, SID_ATTR_SPELL,
+ SID_AUTOSPELL_CHECK, SID_AUTOSPELL_CHECK,
+ SID_ATTR_QUICKLAUNCHER, SID_ATTR_QUICKLAUNCHER,
+ SID_ATTR_YEAR2000, SID_ATTR_YEAR2000>{} );
SfxItemSet aOptSet( SfxGetpApp()->GetPool(), svl::Items<SID_ATTR_QUICKLAUNCHER, SID_ATTR_QUICKLAUNCHER>{} );
SfxGetpApp()->GetOptions(aOptSet);
@@ -1162,11 +1163,13 @@ std::unique_ptr<SfxItemSet> OfaTreeOptionsDialog::CreateItemSet( sal_uInt16 nId
break;
case SID_LANGUAGE_OPTIONS :
{
- pRet = o3tl::make_unique<SfxItemSet>(SfxGetpApp()->GetPool(),
- svl::Items<SID_ATTR_LANGUAGE, SID_AUTOSPELL_CHECK,
+ pRet = o3tl::make_unique<SfxItemSet>(
+ SfxGetpApp()->GetPool(),
+ svl::Items<
SID_ATTR_CHAR_CJK_LANGUAGE, SID_ATTR_CHAR_CTL_LANGUAGE,
- SID_OPT_LOCALE_CHANGED, SID_OPT_LOCALE_CHANGED,
- SID_SET_DOCUMENT_LANGUAGE, SID_SET_DOCUMENT_LANGUAGE>{} );
+ SID_SET_DOCUMENT_LANGUAGE, SID_SET_DOCUMENT_LANGUAGE,
+ SID_ATTR_LANGUAGE, SID_AUTOSPELL_CHECK,
+ SID_OPT_LOCALE_CHANGED, SID_OPT_LOCALE_CHANGED>{});
// for linguistic
@@ -1239,11 +1242,13 @@ std::unique_ptr<SfxItemSet> OfaTreeOptionsDialog::CreateItemSet( sal_uInt16 nId
SfxGetpApp()->GetOptions(*pRet);
break;
case SID_FILTER_DLG:
- pRet = o3tl::make_unique<SfxItemSet>( SfxGetpApp()->GetPool(),
- svl::Items<SID_ATTR_DOCINFO, SID_ATTR_AUTOSAVEMINUTE,
- SID_SAVEREL_INET, SID_SAVEREL_FSYS,
- SID_ATTR_PRETTYPRINTING, SID_ATTR_PRETTYPRINTING,
- SID_ATTR_WARNALIENFORMAT, SID_ATTR_WARNALIENFORMAT>{} );
+ pRet = o3tl::make_unique<SfxItemSet>(
+ SfxGetpApp()->GetPool(),
+ svl::Items<
+ SID_ATTR_WARNALIENFORMAT, SID_ATTR_WARNALIENFORMAT,
+ SID_ATTR_DOCINFO, SID_ATTR_AUTOSAVEMINUTE,
+ SID_SAVEREL_INET, SID_SAVEREL_FSYS,
+ SID_ATTR_PRETTYPRINTING, SID_ATTR_PRETTYPRINTING>{} );
SfxGetpApp()->GetOptions(*pRet);
break;