[Libreoffice-commits] core.git: chart2/source compilerplugins/clang cui/source editeng/source extensions/source include/svl reportdesign/source sc/source sd/source starmath/source svl/source svx/source sw/source
Stephan Bergmann
sbergman at redhat.com
Mon Jun 19 07:38:32 UTC 2017
chart2/source/controller/drawinglayer/DrawViewWrapper.cxx | 12 -
chart2/source/controller/main/DrawCommandDispatch.cxx | 28 +-
chart2/source/controller/main/ShapeController.cxx | 12 -
compilerplugins/clang/check.hxx | 15 +
compilerplugins/clang/store/sfxitemsetrewrite.cxx | 157 ++++++++++++++
cui/source/options/treeopt.cxx | 33 +-
editeng/source/uno/unofdesc.cxx | 13 -
extensions/source/propctrlr/formcomponenthandler.cxx | 8
include/svl/itemset.hxx | 4
reportdesign/source/ui/report/ReportSection.cxx | 26 +-
sc/source/core/data/stlsheet.cxx | 14 -
sc/source/filter/starcalc/scflt.cxx | 14 -
sc/source/ui/app/scmod.cxx | 49 ++--
sc/source/ui/docshell/docsh3.cxx | 6
sc/source/ui/drawfunc/drtxtob1.cxx | 12 -
sc/source/ui/drawfunc/fuconcustomshape.cxx | 26 +-
sc/source/ui/pagedlg/tphf.cxx | 8
sd/source/ui/app/sdmod2.cxx | 22 -
sd/source/ui/func/fuconcs.cxx | 26 +-
sd/source/ui/view/drviews4.cxx | 8
starmath/source/document.cxx | 15 -
starmath/source/smmod.cxx | 16 -
svl/source/items/itemset.cxx | 6
svx/source/sdr/properties/captionproperties.cxx | 20 -
svx/source/sdr/properties/circleproperties.cxx | 22 -
svx/source/sdr/properties/connectorproperties.cxx | 21 -
svx/source/sdr/properties/customshapeproperties.cxx | 30 +-
svx/source/sdr/properties/measureproperties.cxx | 22 -
svx/source/svdraw/svdedtv1.cxx | 10
svx/source/tbxctrls/grafctrl.cxx | 13 -
sw/source/core/access/accpara.cxx | 17 -
sw/source/core/crsr/crstrvl.cxx | 8
sw/source/core/doc/DocumentContentOperationsManager.cxx | 42 +--
sw/source/core/doc/DocumentDeviceManager.cxx | 24 +-
sw/source/core/doc/docfmt.cxx | 10
sw/source/core/doc/docsort.cxx | 8
sw/source/core/edit/autofmt.cxx | 12 -
sw/source/core/txtnode/ndtxt.cxx | 33 +-
sw/source/core/undo/untbl.cxx | 38 ++-
sw/source/core/unocore/unoobj.cxx | 16 -
sw/source/core/unocore/unoport.cxx | 10
sw/source/core/unocore/unosect.cxx | 14 -
sw/source/core/unocore/unotbl.cxx | 29 +-
sw/source/filter/html/css1atr.cxx | 17 -
sw/source/ui/dbui/mmlayoutpage.cxx | 18 -
sw/source/ui/dialog/uiregionsw.cxx | 17 -
sw/source/ui/frmdlg/column.cxx | 10
sw/source/uibase/app/applab.cxx | 8
sw/source/uibase/app/appopt.cxx | 36 +--
sw/source/uibase/app/docstyle.cxx | 51 ++--
sw/source/uibase/dialog/regionsw.cxx | 19 -
sw/source/uibase/docvw/HeaderFooterWin.cxx | 10
sw/source/uibase/docvw/PageBreakWin.cxx | 6
sw/source/uibase/docvw/edtwin.cxx | 14 -
sw/source/uibase/misc/glshell.cxx | 10
sw/source/uibase/ribbar/concustomshape.cxx | 26 +-
sw/source/uibase/shells/annotsh.cxx | 28 +-
sw/source/uibase/shells/drwbassh.cxx | 13 -
sw/source/uibase/shells/drwtxtex.cxx | 19 -
sw/source/uibase/shells/drwtxtsh.cxx | 9
sw/source/uibase/shells/frmsh.cxx | 67 ++---
sw/source/uibase/shells/grfsh.cxx | 60 ++---
sw/source/uibase/shells/tabsh.cxx | 8
sw/source/uibase/shells/textidx.cxx | 16 -
sw/source/uibase/shells/textsh1.cxx | 63 ++---
sw/source/uibase/uiview/formatclipboard.cxx | 85 ++++---
sw/source/uibase/uiview/viewprt.cxx | 12 -
sw/source/uibase/uno/unotxdoc.cxx | 12 -
sw/source/uibase/utlui/glbltree.cxx | 16 -
sw/source/uibase/utlui/numfmtlb.cxx | 15 -
sw/source/uibase/wrtsh/wrtsh1.cxx | 20 -
71 files changed, 920 insertions(+), 694 deletions(-)
New commits:
commit 1e3a00f0c772a76a1dd76b8272e2c35a1802d574
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Mon Jun 19 09:32:45 2017 +0200
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
diff --git a/chart2/source/controller/drawinglayer/DrawViewWrapper.cxx b/chart2/source/controller/drawinglayer/DrawViewWrapper.cxx
index 59cff5f86c18..ff550d587ac1 100644
--- a/chart2/source/controller/drawinglayer/DrawViewWrapper.cxx
+++ b/chart2/source/controller/drawinglayer/DrawViewWrapper.cxx
@@ -283,11 +283,13 @@ SdrOutliner* DrawViewWrapper::getOutliner() const
SfxItemSet DrawViewWrapper::getPositionAndSizeItemSetFromMarkedObject() const
{
- SfxItemSet aFullSet( GetModel()->GetItemPool(),
- svl::Items<SID_ATTR_TRANSFORM_POS_X, SID_ATTR_TRANSFORM_ANGLE,
- SID_ATTR_TRANSFORM_PROTECT_POS, SID_ATTR_TRANSFORM_AUTOHEIGHT,
- SDRATTR_ECKENRADIUS, SDRATTR_ECKENRADIUS,
- SID_ATTR_METRIC, SID_ATTR_METRIC>{});
+ SfxItemSet aFullSet(
+ GetModel()->GetItemPool(),
+ svl::Items<
+ SDRATTR_ECKENRADIUS, SDRATTR_ECKENRADIUS,
+ SID_ATTR_TRANSFORM_POS_X, SID_ATTR_TRANSFORM_ANGLE,
+ SID_ATTR_TRANSFORM_PROTECT_POS, SID_ATTR_TRANSFORM_AUTOHEIGHT,
+ SID_ATTR_METRIC, SID_ATTR_METRIC>{});
SfxItemSet aGeoSet( E3dView::GetGeoAttrFromMarked() );
aFullSet.Put( aGeoSet );
aFullSet.Put( SfxUInt16Item(SID_ATTR_METRIC,static_cast< sal_uInt16 >( ConfigurationAccess::getFieldUnit())));
diff --git a/chart2/source/controller/main/DrawCommandDispatch.cxx b/chart2/source/controller/main/DrawCommandDispatch.cxx
index 92485496c731..53929d720a81 100644
--- a/chart2/source/controller/main/DrawCommandDispatch.cxx
+++ b/chart2/source/controller/main/DrawCommandDispatch.cxx
@@ -135,18 +135,22 @@ void DrawCommandDispatch::setAttributes( SdrObject* pObj )
if ( pSourceObj )
{
const SfxItemSet& rSource = pSourceObj->GetMergedItemSet();
- SfxItemSet aDest( pObj->GetModel()->GetItemPool(), // ranges from SdrAttrObj
- svl::Items<SDRATTR_START, SDRATTR_SHADOW_LAST,
- SDRATTR_MISC_FIRST, SDRATTR_MISC_LAST,
- SDRATTR_TEXTDIRECTION, SDRATTR_TEXTDIRECTION,
- // Graphic Attributes
- SDRATTR_GRAF_FIRST, SDRATTR_GRAF_LAST,
- // 3d Properties
- SDRATTR_3D_FIRST, SDRATTR_3D_LAST,
- // CustomShape properties
- SDRATTR_CUSTOMSHAPE_FIRST, SDRATTR_CUSTOMSHAPE_LAST,
- // range from SdrTextObj
- EE_ITEMS_START, EE_ITEMS_END>{});
+ SfxItemSet aDest(
+ pObj->GetModel()->GetItemPool(),
+ svl::Items<
+ // Ranges from SdrAttrObj:
+ SDRATTR_START, SDRATTR_SHADOW_LAST,
+ SDRATTR_MISC_FIRST,
+ SDRATTR_MISC_LAST,
+ SDRATTR_TEXTDIRECTION,
+ SDRATTR_TEXTDIRECTION,
+ // Graphic attributes, 3D
+ // properties, CustomShape
+ // properties:
+ SDRATTR_GRAF_FIRST,
+ SDRATTR_CUSTOMSHAPE_LAST,
+ // Range from SdrTextObj:
+ EE_ITEMS_START, EE_ITEMS_END>{});
aDest.Set( rSource );
pObj->SetMergedItemSet( aDest );
sal_Int32 nAngle = pSourceObj->GetRotateAngle();
diff --git a/chart2/source/controller/main/ShapeController.cxx b/chart2/source/controller/main/ShapeController.cxx
index 2a3d28f649d9..5404eb6df464 100644
--- a/chart2/source/controller/main/ShapeController.cxx
+++ b/chart2/source/controller/main/ShapeController.cxx
@@ -562,13 +562,11 @@ void ShapeController::executeDispatch_ParagraphDialog()
SfxItemSet aAttr( rPool );
pDrawViewWrapper->GetAttributes( aAttr );
- SfxItemSet aNewAttr( rPool,
- svl::Items<EE_ITEMS_START, EE_ITEMS_END,
- SID_ATTR_PARA_HYPHENZONE, SID_ATTR_PARA_HYPHENZONE,
- SID_ATTR_PARA_PAGEBREAK, SID_ATTR_PARA_PAGEBREAK,
- SID_ATTR_PARA_SPLIT, SID_ATTR_PARA_SPLIT,
- SID_ATTR_PARA_WIDOWS, SID_ATTR_PARA_WIDOWS,
- SID_ATTR_PARA_ORPHANS, SID_ATTR_PARA_ORPHANS>{} );
+ SfxItemSet aNewAttr(
+ rPool,
+ svl::Items<
+ EE_ITEMS_START, EE_ITEMS_END,
+ SID_ATTR_PARA_PAGEBREAK, SID_ATTR_PARA_WIDOWS>{});
aNewAttr.Put( aAttr );
aNewAttr.Put( SvxHyphenZoneItem( false, SID_ATTR_PARA_HYPHENZONE ) );
aNewAttr.Put( SvxFormatBreakItem( SvxBreak::NONE, SID_ATTR_PARA_PAGEBREAK ) );
diff --git a/compilerplugins/clang/check.hxx b/compilerplugins/clang/check.hxx
index cf91dfd2aee2..846cb1472e99 100644
--- a/compilerplugins/clang/check.hxx
+++ b/compilerplugins/clang/check.hxx
@@ -60,6 +60,9 @@ public:
template<std::size_t N> inline ContextCheck Class(char const (& id)[N])
const;
+ template<std::size_t N> inline ContextCheck Struct(char const (& id)[N])
+ const;
+
TypeCheck Typedef() const;
template<std::size_t N> inline ContextCheck Typedef(char const (& id)[N])
@@ -172,6 +175,18 @@ template<std::size_t N> ContextCheck TypeCheck::Class(char const (& id)[N])
return ContextCheck();
}
+template<std::size_t N> ContextCheck TypeCheck::Struct(char const (& id)[N])
+ const
+{
+ if (!type_.isNull()) {
+ auto const t = type_->getAs<clang::RecordType>();
+ if (t != nullptr) {
+ return detail::checkRecordDecl(t->getDecl(), clang::TTK_Struct, id);
+ }
+ }
+ return ContextCheck();
+}
+
template<std::size_t N> ContextCheck TypeCheck::Typedef(char const (& id)[N])
const
{
diff --git a/compilerplugins/clang/store/sfxitemsetrewrite.cxx b/compilerplugins/clang/store/sfxitemsetrewrite.cxx
index db316f861af2..4e3d7c81d322 100644
--- a/compilerplugins/clang/store/sfxitemsetrewrite.cxx
+++ b/compilerplugins/clang/store/sfxitemsetrewrite.cxx
@@ -7,11 +7,18 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
+#include <algorithm>
+#include <sstream>
+#include <tuple>
+#include <vector>
+
#include "check.hxx"
#include "plugin.hxx"
namespace {
+bool gap(APSInt n1, APSInt n2) { return n1 < n2 && n2 - n1 > 1; }
+
class Visitor final:
public RecursiveASTVisitor<Visitor>, public loplugin::RewritePlugin
{
@@ -94,6 +101,120 @@ public:
return true;
}
+ bool VisitTemplateSpecializationTypeLoc(
+ TemplateSpecializationTypeLoc typeLoc)
+ {
+ auto const loc = typeLoc.getBeginLoc();
+ if (loc.isInvalid() || ignoreLocation(loc)) {
+ return true;
+ }
+ if (!loplugin::TypeCheck(typeLoc.getType()).Struct("Items")
+ .Namespace("svl").GlobalNamespace())
+ {
+ return true;
+ }
+ unsigned const numArgs = typeLoc.getNumArgs();
+ if (numArgs == 0) {
+ report(
+ DiagnosticsEngine::Warning,
+ ("unexpected svl::Items specialization with zero template"
+ " arguments"),
+ loc)
+ << typeLoc.getSourceRange();
+ return true;
+ }
+ if (numArgs % 2 == 1) {
+ report(
+ DiagnosticsEngine::Warning,
+ ("unexpected svl::Items specialization with odd number of"
+ " template arguments"),
+ loc)
+ << typeLoc.getSourceRange();
+ return true;
+ }
+ std::vector<Range> ranges;
+ auto good = true;
+ APSInt prev;
+ for (unsigned i = 0; i != numArgs; ++i) {
+ auto const argLoc = typeLoc.getArgLoc(i);
+ auto const & arg = argLoc.getArgument();
+ APSInt v;
+ switch (arg.getKind()) {
+ case TemplateArgument::Integral:
+ v = arg.getAsIntegral();
+ break;
+ case TemplateArgument::Expression:
+ if (arg.getAsExpr()->EvaluateAsInt(v, compiler.getASTContext()))
+ {
+ break;
+ }
+ // [[fallthrough]];
+ default:
+ report(
+ DiagnosticsEngine::Warning,
+ ("unexpected svl::Items specialization with non-integral"
+ " template argument %0"),
+ argLoc.getLocation())
+ << (i + 1)
+ << typeLoc.getSourceRange();
+ return true;
+ }
+ if (i % 2 == 0) {
+ good = good && (i == 0 || gap(prev, v));
+ } else {
+ if (v < prev) {
+ report(
+ DiagnosticsEngine::Warning,
+ ("unexpected svl::Items specialization with template"
+ " argument %0 smaller than previous one, %1 < %2"),
+ argLoc.getLocation())
+ << (i + 1) << v.toString(10) << prev.toString(10)
+ << typeLoc.getSourceRange();
+ return true;
+ }
+ ranges.emplace_back(prev, v, (i / 2) + 1);
+ }
+ prev = v;
+ }
+ if (good) {
+ return true;
+ }
+ std::ostringstream buf1;
+ for (auto const i: ranges) {
+ buf1 << "\n ";
+ printBegin(buf1, typeLoc, i);
+ buf1 << " ... ";
+ printEnd(buf1, typeLoc, i);
+ }
+ std::sort(ranges.begin(), ranges.end());
+ std::ostringstream buf2;
+ for (auto i = ranges.begin(); i != ranges.end();) {
+ buf2 << "\n ";
+ printBegin(buf2, typeLoc, *i);
+ buf2 << " ... ";
+ auto end = *i;
+ for (;;) {
+ auto j = i + 1;
+ if (j == ranges.end() || gap(get<1>(end), get<0>(*j))) {
+ printEnd(buf2, typeLoc, end);
+ i = j;
+ break;
+ }
+ if (get<1>(*j) >= get<1>(end)) {
+ end = *j;
+ }
+ i = j;
+ }
+ }
+ report(
+ DiagnosticsEngine::Warning,
+ ("reorder svl::Items specialization template arguments from:%0\nto:"
+ "%1"),
+ loc)
+ << buf1.str() << buf2.str() << typeLoc.getSourceRange();
+ return true;
+ }
+
private:
void run() override {
if (compiler.getLangOpts().CPlusPlus) {
@@ -123,6 +244,42 @@ private:
return loc;
}
+ using Range = std::tuple<APSInt, APSInt, unsigned>;
+
+ void printSource(
+ std::ostringstream & s, TemplateSpecializationTypeLoc typeLoc, Range r,
+ bool end)
+ {
+ auto const argLoc = typeLoc.getArgLoc(
+ 2 * (get<2>(r) - 1) + (end ? 1 : 0));
+ auto const src1 = argLoc.getSourceRange();
+ auto const src2 = SourceRange(
+ atMacroExpansionStart(src1.getBegin()),
+ Lexer::getLocForEndOfToken(
+ compiler.getSourceManager().getExpansionLoc(
+ atMacroExpansionEnd(src1.getEnd())),
+ 0, compiler.getSourceManager(), compiler.getLangOpts()));
+ s << " '" << Lexer::getSourceText(
+ Lexer::getAsCharRange(
+ src2, compiler.getSourceManager(), compiler.getLangOpts()),
+ compiler.getSourceManager(), compiler.getLangOpts()).str()
+ << "'";
+ }
+
+ void printBegin(
+ std::ostringstream & s, TemplateSpecializationTypeLoc typeLoc, Range r)
+ {
+ s << get<2>(r) << "B: " << get<0>(r).toString(10);
+ printSource(s, typeLoc, r, false);
+ }
+
+ void printEnd(
+ std::ostringstream & s, TemplateSpecializationTypeLoc typeLoc, Range r)
+ {
+ s << get<2>(r) << "E: " << get<1>(r).toString(10);
+ printSource(s, typeLoc, r, true);
+ }
+
void rewrite(
Expr const * expr, bool variadic, bool forward, unsigned numArgs,
Expr const * const * args)
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;
diff --git a/editeng/source/uno/unofdesc.cxx b/editeng/source/uno/unofdesc.cxx
index 7e136e4ae8c4..c7f9b0760c4b 100644
--- a/editeng/source/uno/unofdesc.cxx
+++ b/editeng/source/uno/unofdesc.cxx
@@ -190,13 +190,12 @@ void SvxUnoFontDescriptor::setPropertyToDefault( SfxItemSet& rSet )
uno::Any SvxUnoFontDescriptor::getPropertyDefault( SfxItemPool* pPool )
{
- SfxItemSet aSet( *pPool, svl::Items<EE_CHAR_FONTINFO, EE_CHAR_FONTINFO,
- EE_CHAR_FONTHEIGHT, EE_CHAR_FONTHEIGHT,
- EE_CHAR_ITALIC, EE_CHAR_ITALIC,
- EE_CHAR_UNDERLINE, EE_CHAR_UNDERLINE,
- EE_CHAR_WEIGHT, EE_CHAR_WEIGHT,
- EE_CHAR_STRIKEOUT, EE_CHAR_STRIKEOUT,
- EE_CHAR_WLM, EE_CHAR_WLM>{} );
+ SfxItemSet aSet(
+ *pPool,
+ svl::Items<
+ EE_CHAR_FONTINFO, EE_CHAR_FONTHEIGHT,
+ EE_CHAR_WEIGHT, EE_CHAR_ITALIC,
+ EE_CHAR_WLM, EE_CHAR_WLM>{});
uno::Any aAny;
diff --git a/extensions/source/propctrlr/formcomponenthandler.cxx b/extensions/source/propctrlr/formcomponenthandler.cxx
index ab4dbe5d3368..b3d451142417 100644
--- a/extensions/source/propctrlr/formcomponenthandler.cxx
+++ b/extensions/source/propctrlr/formcomponenthandler.cxx
@@ -2659,9 +2659,11 @@ namespace pcr
try
{
// create the itemset for the dialog
- SfxItemSet aCoreSet(SfxGetpApp()->GetPool(),
- svl::Items<SID_ATTR_NUMBERFORMAT_VALUE, SID_ATTR_NUMBERFORMAT_VALUE,
- SID_ATTR_NUMBERFORMAT_INFO, SID_ATTR_NUMBERFORMAT_INFO>{}); // ripped this somewhere ... don't understand it :(
+ SfxItemSet aCoreSet(
+ SfxGetpApp()->GetPool(),
+ svl::Items<
+ SID_ATTR_NUMBERFORMAT_VALUE, SID_ATTR_NUMBERFORMAT_INFO>{});
+ // ripped this somewhere ... don't understand it :(
// get the number formats supplier
Reference< XNumberFormatsSupplier > xSupplier;
diff --git a/include/svl/itemset.hxx b/include/svl/itemset.hxx
index a1715cc896f5..971444099f31 100644
--- a/include/svl/itemset.hxx
+++ b/include/svl/itemset.hxx
@@ -42,8 +42,8 @@ namespace detail {
constexpr bool validRange(sal_uInt16 wid1, sal_uInt16 wid2)
{ return wid1 != 0 && wid1 <= wid2; }
-constexpr bool validGap(sal_uInt16, sal_uInt16)
-{ return true; } //TODO: wid2 > wid1 && wid2 - wid1 > 1
+constexpr bool validGap(sal_uInt16 wid1, sal_uInt16 wid2)
+{ return wid2 > wid1 && wid2 - wid1 > 1; }
template<sal_uInt16 WID1, sal_uInt16 WID2> constexpr bool validRanges()
{ return validRange(WID1, WID2); }
diff --git a/reportdesign/source/ui/report/ReportSection.cxx b/reportdesign/source/ui/report/ReportSection.cxx
index b84b81973ca7..e5d0228cc989 100644
--- a/reportdesign/source/ui/report/ReportSection.cxx
+++ b/reportdesign/source/ui/report/ReportSection.cxx
@@ -608,18 +608,20 @@ void OReportSection::createDefault(const OUString& _sType,SdrObject* _pObj)
if( pSourceObj )
{
const SfxItemSet& rSource = pSourceObj->GetMergedItemSet();
- SfxItemSet aDest( _pObj->GetModel()->GetItemPool(), // ranges from SdrAttrObj
- svl::Items<SDRATTR_START, SDRATTR_SHADOW_LAST,
- SDRATTR_MISC_FIRST, SDRATTR_MISC_LAST,
- SDRATTR_TEXTDIRECTION, SDRATTR_TEXTDIRECTION,
- // Graphic Attributes
- SDRATTR_GRAF_FIRST, SDRATTR_GRAF_LAST,
- // 3d Properties
- SDRATTR_3D_FIRST, SDRATTR_3D_LAST,
- // CustomShape properties
- SDRATTR_CUSTOMSHAPE_FIRST, SDRATTR_CUSTOMSHAPE_LAST,
- // range from SdrTextObj
- EE_ITEMS_START, EE_ITEMS_END>{});
+ SfxItemSet aDest(
+ _pObj->GetModel()->GetItemPool(),
+ svl::Items<
+ // Ranges from SdrAttrObj:
+ SDRATTR_START, SDRATTR_SHADOW_LAST,
+ SDRATTR_MISC_FIRST, SDRATTR_MISC_LAST,
+ SDRATTR_TEXTDIRECTION,
+ SDRATTR_TEXTDIRECTION,
+ // Graphic attributes, 3D properties,
+ // CustomShape properties:
+ SDRATTR_GRAF_FIRST,
+ SDRATTR_CUSTOMSHAPE_LAST,
+ // Range from SdrTextObj:
+ EE_ITEMS_START, EE_ITEMS_END>{});
aDest.Set( rSource );
_pObj->SetMergedItemSet( aDest );
sal_Int32 nAngle = pSourceObj->GetRotateAngle();
diff --git a/sc/source/core/data/stlsheet.cxx b/sc/source/core/data/stlsheet.cxx
index a04cc9f00309..44bcacd17c2d 100644
--- a/sc/source/core/data/stlsheet.cxx
+++ b/sc/source/core/data/stlsheet.cxx
@@ -138,12 +138,14 @@ SfxItemSet& ScStyleSheet::GetItemSet()
// (== Standard page template)
SfxItemPool& rItemPool = GetPool().GetPool();
- pSet = new SfxItemSet( rItemPool,
- svl::Items<ATTR_BACKGROUND, ATTR_BACKGROUND,
- ATTR_BORDER, ATTR_SHADOW,
- ATTR_LRSPACE, ATTR_PAGE_SCALETO,
- ATTR_WRITINGDIR, ATTR_WRITINGDIR,
- ATTR_USERDEF, ATTR_USERDEF>{} );
+ pSet = new SfxItemSet(
+ rItemPool,
+ svl::Items<
+ ATTR_USERDEF, ATTR_USERDEF,
+ ATTR_WRITINGDIR, ATTR_WRITINGDIR,
+ ATTR_BACKGROUND, ATTR_BACKGROUND,
+ ATTR_BORDER, ATTR_SHADOW,
+ ATTR_LRSPACE, ATTR_PAGE_SCALETO>{} );
// If being loaded also the set is then filled in from the file,
// so the defaults do not need to be set.
diff --git a/sc/source/filter/starcalc/scflt.cxx b/sc/source/filter/starcalc/scflt.cxx
index f07075e483a8..bd41c17c90f7 100644
--- a/sc/source/filter/starcalc/scflt.cxx
+++ b/sc/source/filter/starcalc/scflt.cxx
@@ -759,12 +759,14 @@ void Sc10PageCollection::PutToDoc( ScDocument* pDoc )
delete pObject;
pSet->Put( aHeaderItem );
- SfxItemSet aSetItemItemSet( *pDoc->GetPool(),
- svl::Items<ATTR_BACKGROUND, ATTR_BACKGROUND,
- ATTR_BORDER, ATTR_SHADOW,
- ATTR_PAGE_SIZE, ATTR_PAGE_SIZE,
- ATTR_LRSPACE, ATTR_ULSPACE,
- ATTR_PAGE_ON, ATTR_PAGE_SHARED>{} );
+ SfxItemSet aSetItemItemSet(
+ *pDoc->GetPool(),
+ svl::Items<
+ ATTR_BACKGROUND, ATTR_BACKGROUND,
+ ATTR_BORDER, ATTR_SHADOW,
+ ATTR_LRSPACE, ATTR_ULSPACE,
+ ATTR_PAGE_SIZE, ATTR_PAGE_SIZE,
+ ATTR_PAGE_ON, ATTR_PAGE_SHARED>{});
nColor = pHeadFootLine->BackColor;
Color aBColor( nColor.Red, nColor.Green, nColor.Blue );
nColor = pHeadFootLine->RasterColor;
diff --git a/sc/source/ui/app/scmod.cxx b/sc/source/ui/app/scmod.cxx
index db4637665612..60324562b4d1 100644
--- a/sc/source/ui/app/scmod.cxx
+++ b/sc/source/ui/app/scmod.cxx
@@ -1930,32 +1930,29 @@ std::unique_ptr<SfxItemSet> ScModule::CreateItemSet( sal_uInt16 nId )
std::unique_ptr<SfxItemSet> pRet;
if(SID_SC_EDITOPTIONS == nId)
{
- pRet = o3tl::make_unique<SfxItemSet>( GetPool(),
- // TP_CALC:
- svl::Items<SID_SCDOCOPTIONS, SID_SCDOCOPTIONS,
- // TP_VIEW:
- SID_SCVIEWOPTIONS, SID_SCVIEWOPTIONS,
- SID_SC_OPT_SYNCZOOM, SID_SC_OPT_SYNCZOOM,
- // TP_INPUT:
- SID_SC_INPUT_SELECTION,SID_SC_INPUT_MARK_HEADER,
- SID_SC_INPUT_TEXTWYSIWYG,SID_SC_INPUT_TEXTWYSIWYG,
- SID_SC_INPUT_REPLCELLSWARN,SID_SC_INPUT_REPLCELLSWARN,
- SID_SC_INPUT_LEGACY_CELL_SELECTION,SID_SC_OPT_SORT_REF_UPDATE,
- // TP_USERLISTS:
- SCITEM_USERLIST, SCITEM_USERLIST,
- // TP_PRINT:
- SID_SCPRINTOPTIONS, SID_SCPRINTOPTIONS,
- // TP_GRID:
- SID_ATTR_GRID_OPTIONS, SID_ATTR_GRID_OPTIONS,
-
- SID_ATTR_METRIC, SID_ATTR_METRIC,
- SID_ATTR_DEFTABSTOP, SID_ATTR_DEFTABSTOP,
- // TP_COMPATIBILITY
- SID_SC_OPT_KEY_BINDING_COMPAT, SID_SC_OPT_KEY_BINDING_COMPAT,
- // TP_DEFAULTS
- SID_SCDEFAULTSOPTIONS, SID_SCDEFAULTSOPTIONS,
- // TP_FORMULA
- SID_SCFORMULAOPTIONS, SID_SCFORMULAOPTIONS>{} );
+ pRet = o3tl::make_unique<SfxItemSet>(
+ GetPool(),
+ svl::Items<
+ // TP_USERLISTS:
+ SCITEM_USERLIST, SCITEM_USERLIST,
+ // TP_GRID:
+ SID_ATTR_GRID_OPTIONS, SID_ATTR_GRID_OPTIONS,
+ SID_ATTR_METRIC, SID_ATTR_METRIC,
+ SID_ATTR_DEFTABSTOP, SID_ATTR_DEFTABSTOP,
+ // TP_INPUT:
+ SID_SC_INPUT_LEGACY_CELL_SELECTION, SID_SC_OPT_SORT_REF_UPDATE,
+ // TP_FORMULA, TP_DEFAULTS:
+ SID_SCFORMULAOPTIONS, SID_SCDEFAULTSOPTIONS,
+ // TP_VIEW, TP_CALC:
+ SID_SCVIEWOPTIONS, SID_SCDOCOPTIONS,
+ // TP_PRINT:
+ SID_SCPRINTOPTIONS, SID_SCPRINTOPTIONS,
+ // TP_INPUT:
+ SID_SC_INPUT_SELECTION, SID_SC_INPUT_MARK_HEADER,
+ SID_SC_INPUT_TEXTWYSIWYG, SID_SC_INPUT_TEXTWYSIWYG,
+ SID_SC_INPUT_REPLCELLSWARN, SID_SC_INPUT_REPLCELLSWARN,
+ // TP_VIEW:
+ SID_SC_OPT_SYNCZOOM, SID_SC_OPT_KEY_BINDING_COMPAT>{});
const ScAppOptions& rAppOpt = GetAppOptions();
diff --git a/sc/source/ui/docshell/docsh3.cxx b/sc/source/ui/docshell/docsh3.cxx
index 25d137b30f53..e6b547a6ceee 100644
--- a/sc/source/ui/docshell/docsh3.cxx
+++ b/sc/source/ui/docshell/docsh3.cxx
@@ -644,10 +644,8 @@ void ScDocShell::ExecuteChangeCommentDialog( ScChangeAction* pAction, vcl::Windo
aDate += " ";
aDate += ScGlobal::pLocaleData->getTime( aDT, false );
- SfxItemSet aSet( GetPool(),
- svl::Items<SID_ATTR_POSTIT_AUTHOR, SID_ATTR_POSTIT_AUTHOR,
- SID_ATTR_POSTIT_DATE, SID_ATTR_POSTIT_DATE,
- SID_ATTR_POSTIT_TEXT, SID_ATTR_POSTIT_TEXT>{} );
+ SfxItemSet aSet(
+ GetPool(), svl::Items<SID_ATTR_POSTIT_AUTHOR, SID_ATTR_POSTIT_TEXT>{});
aSet.Put( SvxPostItTextItem ( aComment, SID_ATTR_POSTIT_TEXT ) );
aSet.Put( SvxPostItAuthorItem( aAuthor, SID_ATTR_POSTIT_AUTHOR ) );
diff --git a/sc/source/ui/drawfunc/drtxtob1.cxx b/sc/source/ui/drawfunc/drtxtob1.cxx
index f6c1e339eb6b..bfe52a9d8156 100644
--- a/sc/source/ui/drawfunc/drtxtob1.cxx
+++ b/sc/source/ui/drawfunc/drtxtob1.cxx
@@ -71,13 +71,11 @@ bool ScDrawTextObjectBar::ExecuteParaDlg( const SfxItemSet& rArgs,
SfxItemSet& rOutSet )
{
SfxItemPool* pArgPool = rArgs.GetPool();
- SfxItemSet aNewAttr( *pArgPool,
- svl::Items<EE_ITEMS_START, EE_ITEMS_END,
- SID_ATTR_PARA_HYPHENZONE, SID_ATTR_PARA_HYPHENZONE,
- SID_ATTR_PARA_PAGEBREAK, SID_ATTR_PARA_PAGEBREAK,
- SID_ATTR_PARA_SPLIT, SID_ATTR_PARA_SPLIT,
- SID_ATTR_PARA_WIDOWS, SID_ATTR_PARA_WIDOWS,
- SID_ATTR_PARA_ORPHANS, SID_ATTR_PARA_ORPHANS>{} );
+ SfxItemSet aNewAttr(
+ *pArgPool,
+ svl::Items<
+ EE_ITEMS_START, EE_ITEMS_END,
+ SID_ATTR_PARA_PAGEBREAK, SID_ATTR_PARA_WIDOWS>{});
aNewAttr.Put( rArgs );
// Values have been taken over once to show the dialog.
diff --git a/sc/source/ui/drawfunc/fuconcustomshape.cxx b/sc/source/ui/drawfunc/fuconcustomshape.cxx
index 9cc4cd982c8f..b1ff194f5a13 100644
--- a/sc/source/ui/drawfunc/fuconcustomshape.cxx
+++ b/sc/source/ui/drawfunc/fuconcustomshape.cxx
@@ -167,18 +167,20 @@ void FuConstCustomShape::SetAttributes( SdrObject* pObj )
if( pSourceObj )
{
const SfxItemSet& rSource = pSourceObj->GetMergedItemSet();
- SfxItemSet aDest( pObj->GetModel()->GetItemPool(), // ranges from SdrAttrObj
- svl::Items<SDRATTR_START, SDRATTR_SHADOW_LAST,
- SDRATTR_MISC_FIRST, SDRATTR_MISC_LAST,
- SDRATTR_TEXTDIRECTION, SDRATTR_TEXTDIRECTION,
- // Graphic Attributes
- SDRATTR_GRAF_FIRST, SDRATTR_GRAF_LAST,
- // 3d Properties
- SDRATTR_3D_FIRST, SDRATTR_3D_LAST,
- // CustomShape properties
- SDRATTR_CUSTOMSHAPE_FIRST, SDRATTR_CUSTOMSHAPE_LAST,
- // range from SdrTextObj
- EE_ITEMS_START, EE_ITEMS_END>{});
+ SfxItemSet aDest(
+ pObj->GetModel()->GetItemPool(),
+ svl::Items<
+ // Ranges from SdrAttrObj:
+ SDRATTR_START, SDRATTR_SHADOW_LAST,
+ SDRATTR_MISC_FIRST, SDRATTR_MISC_LAST,
+ SDRATTR_TEXTDIRECTION,
+ SDRATTR_TEXTDIRECTION,
+ // Graphic attributes, 3D properties,
+ // CustomShape properties:
+ SDRATTR_GRAF_FIRST,
+ SDRATTR_CUSTOMSHAPE_LAST,
+ // Range from SdrTextObj:
+ EE_ITEMS_START, EE_ITEMS_END>{});
aDest.Set( rSource );
pObj->SetMergedItemSet( aDest );
sal_Int32 nAngle = pSourceObj->GetRotateAngle();
diff --git a/sc/source/ui/pagedlg/tphf.cxx b/sc/source/ui/pagedlg/tphf.cxx
index 0c6c0b04a157..3392c16a9018 100644
--- a/sc/source/ui/pagedlg/tphf.cxx
+++ b/sc/source/ui/pagedlg/tphf.cxx
@@ -43,9 +43,11 @@
ScHFPage::ScHFPage( vcl::Window* pParent, const SfxItemSet& rSet, sal_uInt16 nSetId )
: SvxHFPage ( pParent, rSet, nSetId ),
- aDataSet ( *rSet.GetPool(),
- svl::Items<ATTR_PAGE_HEADERLEFT, ATTR_PAGE_FOOTERRIGHT,
- ATTR_PAGE, ATTR_PAGE>{} ),
+ aDataSet(
+ *rSet.GetPool(),
+ svl::Items<
+ ATTR_PAGE, ATTR_PAGE,
+ ATTR_PAGE_HEADERLEFT, ATTR_PAGE_FOOTERRIGHT>{}),
nPageUsage ( SvxPageUsage::All ),
pStyleDlg ( nullptr )
{
diff --git a/sd/source/ui/app/sdmod2.cxx b/sd/source/ui/app/sdmod2.cxx
index 2bcf6455ea31..6d72d1fd32e5 100644
--- a/sd/source/ui/app/sdmod2.cxx
+++ b/sd/source/ui/app/sdmod2.cxx
@@ -441,21 +441,13 @@ std::unique_ptr<SfxItemSet> SdModule::CreateItemSet( sal_uInt16 nSlot )
SfxItemPool& rPool = GetPool();
rPool.SetDefaultMetric( MapUnit::Map100thMM );
- auto pRet = o3tl::make_unique<SfxItemSet>( rPool,
- svl::Items<SID_ATTR_METRIC, SID_ATTR_METRIC,
- SID_ATTR_DEFTABSTOP, SID_ATTR_DEFTABSTOP,
-
- ATTR_OPTIONS_LAYOUT, ATTR_OPTIONS_LAYOUT,
- ATTR_OPTIONS_CONTENTS, ATTR_OPTIONS_CONTENTS,
- ATTR_OPTIONS_MISC, ATTR_OPTIONS_MISC,
-
- ATTR_OPTIONS_SNAP, ATTR_OPTIONS_SNAP,
-
- ATTR_OPTIONS_SCALE_START, ATTR_OPTIONS_SCALE_END,
-
- ATTR_OPTIONS_PRINT, ATTR_OPTIONS_PRINT,
-
- SID_ATTR_GRID_OPTIONS, SID_ATTR_GRID_OPTIONS>{} );
+ auto pRet = o3tl::make_unique<SfxItemSet>(
+ rPool,
+ svl::Items<
+ SID_ATTR_GRID_OPTIONS, SID_ATTR_GRID_OPTIONS,
+ SID_ATTR_METRIC, SID_ATTR_METRIC,
+ SID_ATTR_DEFTABSTOP, SID_ATTR_DEFTABSTOP,
+ ATTR_OPTIONS_LAYOUT, ATTR_OPTIONS_SCALE_END>{});
// TP_OPTIONS_LAYOUT:
pRet->Put( SdOptionsLayoutItem( pOptions, pFrameView ) );
diff --git a/sd/source/ui/func/fuconcs.cxx b/sd/source/ui/func/fuconcs.cxx
index 9536a691d1de..086163373eee 100644
--- a/sd/source/ui/func/fuconcs.cxx
+++ b/sd/source/ui/func/fuconcs.cxx
@@ -190,18 +190,20 @@ void FuConstructCustomShape::SetAttributes( SdrObject* pObj )
if( pSourceObj )
{
const SfxItemSet& rSource = pSourceObj->GetMergedItemSet();
- SfxItemSet aDest( pObj->GetModel()->GetItemPool(), // ranges from SdrAttrObj
- svl::Items<SDRATTR_START, SDRATTR_SHADOW_LAST,
- SDRATTR_MISC_FIRST, SDRATTR_MISC_LAST,
- SDRATTR_TEXTDIRECTION, SDRATTR_TEXTDIRECTION,
- // Graphic Attributes
- SDRATTR_GRAF_FIRST, SDRATTR_GRAF_LAST,
- // 3d Properties
- SDRATTR_3D_FIRST, SDRATTR_3D_LAST,
- // CustomShape properties
- SDRATTR_CUSTOMSHAPE_FIRST, SDRATTR_CUSTOMSHAPE_LAST,
- // range from SdrTextObj
- EE_ITEMS_START, EE_ITEMS_END>{});
+ SfxItemSet aDest(
+ pObj->GetModel()->GetItemPool(),
+ svl::Items<
+ // Ranges from SdrAttrObj:
+ SDRATTR_START, SDRATTR_SHADOW_LAST,
+ SDRATTR_MISC_FIRST, SDRATTR_MISC_LAST,
+ SDRATTR_TEXTDIRECTION,
+ SDRATTR_TEXTDIRECTION,
+ // Graphic attributes, 3D properties,
+ // CustomShape properties:
+ SDRATTR_GRAF_FIRST,
+ SDRATTR_CUSTOMSHAPE_LAST,
+ // Range from SdrTextObj:
+ EE_ITEMS_START, EE_ITEMS_END>{});
aDest.Set( rSource );
pObj->SetMergedItemSet( aDest );
sal_Int32 nAngle = pSourceObj->GetRotateAngle();
diff --git a/sd/source/ui/view/drviews4.cxx b/sd/source/ui/view/drviews4.cxx
index 1dcd2aa8f3c5..93f13c1839b1 100644
--- a/sd/source/ui/view/drviews4.cxx
+++ b/sd/source/ui/view/drviews4.cxx
@@ -835,9 +835,11 @@ void DrawViewShell::ShowMousePosInfo(const ::tools::Rectangle& rRect,
OSL_ASSERT (GetViewShell()!=nullptr);
if ( !GetViewShell()->GetUIActiveClient() )
{
- SfxItemSet aSet(GetPool(), svl::Items<SID_CONTEXT, SID_CONTEXT,
- SID_ATTR_POSITION, SID_ATTR_POSITION,
- SID_ATTR_SIZE, SID_ATTR_SIZE>{});
+ SfxItemSet aSet(
+ GetPool(),
+ svl::Items<
+ SID_CONTEXT, SID_CONTEXT,
+ SID_ATTR_POSITION, SID_ATTR_SIZE>{});
GetStatusBarState(aSet);
diff --git a/starmath/source/document.cxx b/starmath/source/document.cxx
index ef1ce59cf0fe..998a648e05eb 100644
--- a/starmath/source/document.cxx
+++ b/starmath/source/document.cxx
@@ -560,15 +560,12 @@ Printer* SmDocShell::GetPrt()
}
else if (!mpPrinter)
{
- auto pOptions = o3tl::make_unique<SfxItemSet>(GetPool(),
- svl::Items<SID_PRINTSIZE, SID_PRINTSIZE,
- SID_PRINTZOOM, SID_PRINTZOOM,
- SID_PRINTTITLE, SID_PRINTTITLE,
- SID_PRINTTEXT, SID_PRINTTEXT,
- SID_PRINTFRAME, SID_PRINTFRAME,
- SID_NO_RIGHT_SPACES, SID_NO_RIGHT_SPACES,
- SID_SAVE_ONLY_USED_SYMBOLS, SID_SAVE_ONLY_USED_SYMBOLS,
- SID_AUTO_CLOSE_BRACKETS, SID_AUTO_CLOSE_BRACKETS>{});
+ auto pOptions = o3tl::make_unique<SfxItemSet>(
+ GetPool(),
+ svl::Items<
+ SID_PRINTTITLE, SID_PRINTZOOM,
+ SID_NO_RIGHT_SPACES, SID_SAVE_ONLY_USED_SYMBOLS,
+ SID_AUTO_CLOSE_BRACKETS, SID_AUTO_CLOSE_BRACKETS>{});
SmModule *pp = SM_MOD();
pp->GetConfig()->ConfigToItemSet(*pOptions);
mpPrinter = VclPtr<SfxPrinter>::Create(std::move(pOptions));
diff --git a/starmath/source/smmod.cxx b/starmath/source/smmod.cxx
index b532073bafac..0c705b7418d5 100644
--- a/starmath/source/smmod.cxx
+++ b/starmath/source/smmod.cxx
@@ -247,16 +247,12 @@ std::unique_ptr<SfxItemSet> SmModule::CreateItemSet( sal_uInt16 nId )
std::unique_ptr<SfxItemSet> pRet;
if(nId == SID_SM_EDITOPTIONS)
{
- pRet = o3tl::make_unique<SfxItemSet>(GetPool(),
- //TP_SMPRINT
- svl::Items<SID_PRINTSIZE, SID_PRINTSIZE,
- SID_PRINTZOOM, SID_PRINTZOOM,
- SID_PRINTTITLE, SID_PRINTTITLE,
- SID_PRINTTEXT, SID_PRINTTEXT,
- SID_PRINTFRAME, SID_PRINTFRAME,
- SID_NO_RIGHT_SPACES, SID_NO_RIGHT_SPACES,
- SID_SAVE_ONLY_USED_SYMBOLS, SID_SAVE_ONLY_USED_SYMBOLS,
- SID_AUTO_CLOSE_BRACKETS, SID_AUTO_CLOSE_BRACKETS>{} );
+ pRet = o3tl::make_unique<SfxItemSet>(
+ GetPool(),
+ svl::Items< //TP_SMPRINT
+ SID_PRINTTITLE, SID_PRINTZOOM,
+ SID_NO_RIGHT_SPACES, SID_SAVE_ONLY_USED_SYMBOLS,
+ SID_AUTO_CLOSE_BRACKETS, SID_AUTO_CLOSE_BRACKETS>{});
GetConfig()->ConfigToItemSet(*pRet);
}
diff --git a/svl/source/items/itemset.cxx b/svl/source/items/itemset.cxx
index 39ec0a18222c..62b1ea3cb8c3 100644
--- a/svl/source/items/itemset.cxx
+++ b/svl/source/items/itemset.cxx
@@ -146,18 +146,18 @@ SfxItemSet::SfxItemSet(
std::size_t i = 0;
std::size_t size = 0;
#if !defined NDEBUG
- sal_uInt16 prev = 0;
+ //TODO: sal_uInt16 prev = 0;
#endif
for (auto const & p: wids) {
assert(svl::detail::validRange(p.wid1, p.wid2));
- assert(prev == 0 || svl::detail::validGap(prev, p.wid1));
+ //TODO: assert(prev == 0 || svl::detail::validGap(prev, p.wid1));
m_pWhichRanges[i++] = p.wid1;
m_pWhichRanges[i++] = p.wid2;
size += svl::detail::rangeSize(p.wid1, p.wid2);
// cannot overflow, assuming std::size_t is no smaller than
// sal_uInt16
#if !defined NDEBUG
- prev = p.wid2;
+ //TODO: prev = p.wid2;
#endif
}
m_pWhichRanges[i] = 0;
diff --git a/svx/source/sdr/properties/captionproperties.cxx b/svx/source/sdr/properties/captionproperties.cxx
index 2a32b8dab720..d092374003b0 100644
--- a/svx/source/sdr/properties/captionproperties.cxx
+++ b/svx/source/sdr/properties/captionproperties.cxx
@@ -35,18 +35,14 @@ namespace sdr
// create a new itemset
std::unique_ptr<SfxItemSet> CaptionProperties::CreateObjectSpecificItemSet(SfxItemPool& rPool)
{
- return o3tl::make_unique<SfxItemSet>(rPool,
-
- // range from SdrAttrObj
- svl::Items<SDRATTR_START, SDRATTR_SHADOW_LAST,
- SDRATTR_MISC_FIRST, SDRATTR_MISC_LAST,
- SDRATTR_TEXTDIRECTION, SDRATTR_TEXTDIRECTION,
-
- // range from SdrCaptionObj
- SDRATTR_CAPTION_FIRST, SDRATTR_CAPTION_LAST,
-
- // range from SdrTextObj
- EE_ITEMS_START, EE_ITEMS_END>{});
+ return o3tl::make_unique<SfxItemSet>(
+ rPool,
+ svl::Items<
+ // Ranges from SdrAttrObj, SdrCaptionObj:
+ SDRATTR_START, SDRATTR_MISC_LAST,
+ SDRATTR_TEXTDIRECTION, SDRATTR_TEXTDIRECTION,
+ // Range from SdrTextObj:
+ EE_ITEMS_START, EE_ITEMS_END>{});
}
CaptionProperties::CaptionProperties(SdrObject& rObj)
diff --git a/svx/source/sdr/properties/circleproperties.cxx b/svx/source/sdr/properties/circleproperties.cxx
index 4782128d79ff..d8eca6fc5ea2 100644
--- a/svx/source/sdr/properties/circleproperties.cxx
+++ b/svx/source/sdr/properties/circleproperties.cxx
@@ -37,18 +37,16 @@ namespace sdr
// create a new itemset
std::unique_ptr<SfxItemSet> CircleProperties::CreateObjectSpecificItemSet(SfxItemPool& rPool)
{
- return o3tl::make_unique<SfxItemSet>(rPool,
-
- // range from SdrAttrObj
- svl::Items<SDRATTR_START, SDRATTR_SHADOW_LAST,
- SDRATTR_MISC_FIRST, SDRATTR_MISC_LAST,
- SDRATTR_TEXTDIRECTION, SDRATTR_TEXTDIRECTION,
-
- // range from SdrCircObj
- SDRATTR_CIRC_FIRST, SDRATTR_CIRC_LAST,
-
- // range from SdrTextObj
- EE_ITEMS_START, EE_ITEMS_END>{});
+ return o3tl::make_unique<SfxItemSet>(
+ rPool,
+ svl::Items<
+ // Ranges from SdrAttrObj, SdrCircObj
+ SDRATTR_START, SDRATTR_SHADOW_LAST,
+ SDRATTR_MISC_FIRST, SDRATTR_MISC_LAST,
+ SDRATTR_CIRC_FIRST, SDRATTR_CIRC_LAST,
+ SDRATTR_TEXTDIRECTION, SDRATTR_TEXTDIRECTION,
+ // Range from SdrTextObj:
+ EE_ITEMS_START, EE_ITEMS_END>{});
}
CircleProperties::CircleProperties(SdrObject& rObj)
diff --git a/svx/source/sdr/properties/connectorproperties.cxx b/svx/source/sdr/properties/connectorproperties.cxx
index fc7b278fdb77..c8f825a5f013 100644
--- a/svx/source/sdr/properties/connectorproperties.cxx
+++ b/svx/source/sdr/properties/connectorproperties.cxx
@@ -35,18 +35,15 @@ namespace sdr
// create a new itemset
std::unique_ptr<SfxItemSet> ConnectorProperties::CreateObjectSpecificItemSet(SfxItemPool& rPool)
{
- return o3tl::make_unique<SfxItemSet>(rPool,
-
- // range from SdrAttrObj
- svl::Items<SDRATTR_START, SDRATTR_SHADOW_LAST,
- SDRATTR_MISC_FIRST, SDRATTR_MISC_LAST,
- SDRATTR_TEXTDIRECTION, SDRATTR_TEXTDIRECTION,
-
- // range from SdrEdgeObj
- SDRATTR_EDGE_FIRST, SDRATTR_EDGE_LAST,
-
- // range from SdrTextObj
- EE_ITEMS_START, EE_ITEMS_END>{});
+ return o3tl::make_unique<SfxItemSet>(
+ rPool,
+ svl::Items<
+ // Ranges from SdrAttrObj, SdrEdgeObj:
+ SDRATTR_START, SDRATTR_SHADOW_LAST,
+ SDRATTR_MISC_FIRST, SDRATTR_EDGE_LAST,
+ SDRATTR_TEXTDIRECTION, SDRATTR_TEXTDIRECTION,
+ // Range from SdrTextObj:
+ EE_ITEMS_START, EE_ITEMS_END>{});
}
ConnectorProperties::ConnectorProperties(SdrObject& rObj)
diff --git a/svx/source/sdr/properties/customshapeproperties.cxx b/svx/source/sdr/properties/customshapeproperties.cxx
index 05e28368f529..24633ee82f99 100644
--- a/svx/source/sdr/properties/customshapeproperties.cxx
+++ b/svx/source/sdr/properties/customshapeproperties.cxx
@@ -64,24 +64,18 @@ namespace sdr
std::unique_ptr<SfxItemSet> CustomShapeProperties::CreateObjectSpecificItemSet(SfxItemPool& rPool)
{
- return o3tl::make_unique<SfxItemSet>(rPool,
-
- // ranges from SdrAttrObj
- svl::Items<SDRATTR_START, SDRATTR_SHADOW_LAST,
- SDRATTR_MISC_FIRST, SDRATTR_MISC_LAST,
- SDRATTR_TEXTDIRECTION, SDRATTR_TEXTDIRECTION,
-
- // Graphic Attributes
- SDRATTR_GRAF_FIRST, SDRATTR_GRAF_LAST,
-
- // 3d Properties
- SDRATTR_3D_FIRST, SDRATTR_3D_LAST,
-
- // CustomShape properties
- SDRATTR_CUSTOMSHAPE_FIRST, SDRATTR_CUSTOMSHAPE_LAST,
-
- // range from SdrTextObj
- EE_ITEMS_START, EE_ITEMS_END>{});
+ return o3tl::make_unique<SfxItemSet>(
+ rPool,
+ svl::Items<
+ // Ranges from SdrAttrObj:
+ SDRATTR_START, SDRATTR_SHADOW_LAST,
+ SDRATTR_MISC_FIRST, SDRATTR_MISC_LAST,
+ SDRATTR_TEXTDIRECTION, SDRATTR_TEXTDIRECTION,
+ // Graphic attributes, 3D properties, CustomShape
+ // properties:
+ SDRATTR_GRAF_FIRST, SDRATTR_CUSTOMSHAPE_LAST,
+ // Range from SdrTextObj:
+ EE_ITEMS_START, EE_ITEMS_END>{});
}
bool CustomShapeProperties::AllowItemChange(const sal_uInt16 nWhich, const SfxPoolItem* pNewItem ) const
diff --git a/svx/source/sdr/properties/measureproperties.cxx b/svx/source/sdr/properties/measureproperties.cxx
index 3b1ae3ee3fda..f000080a27d9 100644
--- a/svx/source/sdr/properties/measureproperties.cxx
+++ b/svx/source/sdr/properties/measureproperties.cxx
@@ -41,18 +41,16 @@ namespace sdr
// create a new itemset
std::unique_ptr<SfxItemSet> MeasureProperties::CreateObjectSpecificItemSet(SfxItemPool& rPool)
{
- return o3tl::make_unique<SfxItemSet>(rPool,
-
- // range from SdrAttrObj
- svl::Items<SDRATTR_START, SDRATTR_SHADOW_LAST,
- SDRATTR_MISC_FIRST, SDRATTR_MISC_LAST,
- SDRATTR_TEXTDIRECTION, SDRATTR_TEXTDIRECTION,
-
- // range from SdrMeasureObj
- SDRATTR_MEASURE_FIRST, SDRATTR_MEASURE_LAST,
-
- // range from SdrTextObj
- EE_ITEMS_START, EE_ITEMS_END>{});
+ return o3tl::make_unique<SfxItemSet>(
+ rPool,
+ svl::Items<
+ // Ranges from SdrAttrObj, SdrMeasureObj:
+ SDRATTR_START, SDRATTR_SHADOW_LAST,
+ SDRATTR_MISC_FIRST, SDRATTR_MISC_LAST,
+ SDRATTR_MEASURE_FIRST, SDRATTR_MEASURE_LAST,
+ SDRATTR_TEXTDIRECTION, SDRATTR_TEXTDIRECTION,
+ // Range from SdrTextObj:
+ EE_ITEMS_START, EE_ITEMS_END>{});
}
MeasureProperties::MeasureProperties(SdrObject& rObj)
diff --git a/svx/source/svdraw/svdedtv1.cxx b/svx/source/svdraw/svdedtv1.cxx
index d45f9ab819c1..3ccc98c14546 100644
--- a/svx/source/svdraw/svdedtv1.cxx
+++ b/svx/source/svdraw/svdedtv1.cxx
@@ -1269,10 +1269,12 @@ bool SdrEditView::SetStyleSheet(SfxStyleSheet* pStyleSheet, bool bDontRemoveHard
SfxItemSet SdrEditView::GetGeoAttrFromMarked() const
{
- SfxItemSet aRetSet(mpModel->GetItemPool(), // SID_ATTR_TRANSFORM_... from s:svxids.hrc
- svl::Items<SID_ATTR_TRANSFORM_POS_X, SID_ATTR_TRANSFORM_ANGLE,
- SID_ATTR_TRANSFORM_PROTECT_POS, SID_ATTR_TRANSFORM_AUTOHEIGHT,
- SDRATTR_ECKENRADIUS, SDRATTR_ECKENRADIUS>{});
+ SfxItemSet aRetSet(
+ mpModel->GetItemPool(),
+ svl::Items< // SID_ATTR_TRANSFORM_... from s:svxids.hrc
+ SDRATTR_ECKENRADIUS, SDRATTR_ECKENRADIUS,
+ SID_ATTR_TRANSFORM_POS_X, SID_ATTR_TRANSFORM_ANGLE,
+ SID_ATTR_TRANSFORM_PROTECT_POS, SID_ATTR_TRANSFORM_AUTOHEIGHT>{});
if (AreObjectsMarked())
{
diff --git a/svx/source/tbxctrls/grafctrl.cxx b/svx/source/tbxctrls/grafctrl.cxx
index e753d7c6f1a6..0759e6c17f6f 100644
--- a/svx/source/tbxctrls/grafctrl.cxx
+++ b/svx/source/tbxctrls/grafctrl.cxx
@@ -677,12 +677,13 @@ void SvxGrafAttrHelper::ExecuteGrafAttr( SfxRequest& rReq, SdrView& rView )
aGrfAttr.Put(pObj->GetMergedItemSet());
rPool.SetDefaultMetric( MapUnit::MapTwip );
- SfxItemSet aCropDlgAttr( rPool,
- svl::Items<SDRATTR_GRAFCROP, SDRATTR_GRAFCROP,
- SID_ATTR_GRAF_GRAPHIC, SID_ATTR_GRAF_GRAPHIC,
- SID_ATTR_PAGE_SIZE, SID_ATTR_PAGE_SIZE,
- SID_ATTR_GRAF_FRMSIZE, SID_ATTR_GRAF_FRMSIZE,
- SID_ATTR_GRAF_CROP, SID_ATTR_GRAF_CROP>{} );
+ SfxItemSet aCropDlgAttr(
+ rPool,
+ svl::Items<
+ SDRATTR_GRAFCROP, SDRATTR_GRAFCROP,
+ SID_ATTR_PAGE_SIZE, SID_ATTR_PAGE_SIZE,
+ SID_ATTR_GRAF_CROP, SID_ATTR_GRAF_FRMSIZE,
+ SID_ATTR_GRAF_GRAPHIC, SID_ATTR_GRAF_GRAPHIC>{});
aCropDlgAttr.Put( SvxBrushItem( pObj->GetGraphic(), GPOS_MM, SID_ATTR_GRAF_GRAPHIC ) );
aCropDlgAttr.Put( SvxSizeItem( SID_ATTR_PAGE_SIZE,
diff --git a/sw/source/core/access/accpara.cxx b/sw/source/core/access/accpara.cxx
index 0decdcd1a448..3721a83df8a3 100644
--- a/sw/source/core/access/accpara.cxx
+++ b/sw/source/core/access/accpara.cxx
@@ -2016,14 +2016,15 @@ void SwAccessibleParagraph::_getSupplementalAttributesImpl(
{
const SwTextNode* pTextNode( GetTextNode() );
std::unique_ptr<SfxItemSet> pSet;
- pSet.reset( new SfxItemSet( const_cast<SwAttrPool&>(pTextNode->GetDoc()->GetAttrPool()),
- svl::Items<RES_PARATR_ADJUST, RES_PARATR_ADJUST,
- RES_PARATR_TABSTOP, RES_PARATR_TABSTOP,
- RES_PARATR_LINESPACING, RES_PARATR_LINESPACING,
- RES_UL_SPACE, RES_UL_SPACE,
- RES_LR_SPACE, RES_LR_SPACE,
- RES_PARATR_NUMRULE, RES_PARATR_NUMRULE,
- RES_PARATR_LIST_BEGIN, RES_PARATR_LIST_END-1>{} ) );
+ pSet.reset(
+ new SfxItemSet(
+ const_cast<SwAttrPool&>(pTextNode->GetDoc()->GetAttrPool()),
+ svl::Items<
+ RES_PARATR_LINESPACING, RES_PARATR_ADJUST,
+ RES_PARATR_TABSTOP, RES_PARATR_TABSTOP,
+ RES_PARATR_NUMRULE, RES_PARATR_NUMRULE,
+ RES_PARATR_LIST_BEGIN, RES_PARATR_LIST_END - 1,
+ RES_LR_SPACE, RES_UL_SPACE>{}));
if ( pTextNode->HasBullet() || pTextNode->HasNumber() )
{
diff --git a/sw/source/core/crsr/crstrvl.cxx b/sw/source/core/crsr/crstrvl.cxx
index 4adb93eb0337..d96f2729dd14 100644
--- a/sw/source/core/crsr/crstrvl.cxx
+++ b/sw/source/core/crsr/crstrvl.cxx
@@ -1927,9 +1927,11 @@ bool SwCursorShell::SetShadowCursorPos( const Point& rPt, SwFillMode eFillMode )
case FILL_INDENT:
if( nullptr != (pCNd = aPos.nNode.GetNode().GetContentNode() ))
{
- SfxItemSet aSet( GetDoc()->GetAttrPool(),
- svl::Items<RES_LR_SPACE, RES_LR_SPACE,
- RES_PARATR_ADJUST, RES_PARATR_ADJUST>{} );
+ SfxItemSet aSet(
+ GetDoc()->GetAttrPool(),
+ svl::Items<
+ RES_PARATR_ADJUST, RES_PARATR_ADJUST,
+ RES_LR_SPACE, RES_LR_SPACE>{});
SvxLRSpaceItem aLR( static_cast<const SvxLRSpaceItem&>(
pCNd->GetAttr( RES_LR_SPACE ) ) );
aLR.SetTextLeft( aFPos.nTabCnt );
diff --git a/sw/source/core/doc/DocumentContentOperationsManager.cxx b/sw/source/core/doc/DocumentContentOperationsManager.cxx
index df72344446a9..f934965cb3b9 100644
--- a/sw/source/core/doc/DocumentContentOperationsManager.cxx
+++ b/sw/source/core/doc/DocumentContentOperationsManager.cxx
@@ -1071,22 +1071,21 @@ namespace //local functions originally from docfmt.cxx
// - The attribute in rChgSet does not belong to one of the above categories
if ( !bCharAttr && !bOtherAttr )
{
- SfxItemSet* pTmpCharItemSet = new SfxItemSet( pDoc->GetAttrPool(),
- svl::Items<RES_CHRATR_BEGIN, RES_CHRATR_END-1,
- RES_TXTATR_AUTOFMT, RES_TXTATR_AUTOFMT,
- RES_TXTATR_INETFMT, RES_TXTATR_INETFMT,
- RES_TXTATR_CHARFMT, RES_TXTATR_CHARFMT,
- RES_TXTATR_UNKNOWN_CONTAINER, RES_TXTATR_UNKNOWN_CONTAINER>{} );
-
- SfxItemSet* pTmpOtherItemSet = new SfxItemSet( pDoc->GetAttrPool(),
- svl::Items<RES_PARATR_BEGIN, RES_PARATR_END-1,
- RES_PARATR_LIST_BEGIN, RES_PARATR_LIST_END-1,
- RES_FRMATR_BEGIN, RES_FRMATR_END-1,
- RES_GRFATR_BEGIN, RES_GRFATR_END-1,
- RES_UNKNOWNATR_BEGIN, RES_UNKNOWNATR_END-1,
-
- // FillAttribute support
- XATTR_FILL_FIRST, XATTR_FILL_LAST>{} );
+ SfxItemSet* pTmpCharItemSet = new SfxItemSet(
+ pDoc->GetAttrPool(),
+ svl::Items<
+ RES_CHRATR_BEGIN, RES_CHRATR_END - 1,
+ RES_TXTATR_AUTOFMT, RES_TXTATR_CHARFMT,
+ RES_TXTATR_UNKNOWN_CONTAINER,
+ RES_TXTATR_UNKNOWN_CONTAINER>{});
+
+ SfxItemSet* pTmpOtherItemSet = new SfxItemSet(
+ pDoc->GetAttrPool(),
+ svl::Items<
+ RES_PARATR_BEGIN, RES_GRFATR_END - 1,
+ RES_UNKNOWNATR_BEGIN, RES_UNKNOWNATR_END - 1,
+ // FillAttribute support:
+ XATTR_FILL_FIRST, XATTR_FILL_LAST>{});
pTmpCharItemSet->Put( rChgSet );
pTmpOtherItemSet->Put( rChgSet );
@@ -1178,11 +1177,12 @@ namespace //local functions originally from docfmt.cxx
{
// CharFormat and URL attributes are treated separately!
// TEST_TEMP ToDo: AutoFormat!
- SfxItemSet aTextSet( pDoc->GetAttrPool(),
- svl::Items<RES_TXTATR_REFMARK, RES_TXTATR_TOXMARK,
- RES_TXTATR_META, RES_TXTATR_METAFIELD,
- RES_TXTATR_CJK_RUBY, RES_TXTATR_CJK_RUBY,
- RES_TXTATR_INPUTFIELD, RES_TXTATR_INPUTFIELD>{} );
+ SfxItemSet aTextSet(
+ pDoc->GetAttrPool(),
+ svl::Items<
+ RES_TXTATR_REFMARK, RES_TXTATR_METAFIELD,
+ RES_TXTATR_CJK_RUBY, RES_TXTATR_CJK_RUBY,
+ RES_TXTATR_INPUTFIELD, RES_TXTATR_INPUTFIELD>{});
aTextSet.Put( rChgSet );
if( aTextSet.Count() )
diff --git a/sw/source/core/doc/DocumentDeviceManager.cxx b/sw/source/core/doc/DocumentDeviceManager.cxx
index f88fceee1680..f6b93727528b 100644
--- a/sw/source/core/doc/DocumentDeviceManager.cxx
+++ b/sw/source/core/doc/DocumentDeviceManager.cxx
@@ -206,11 +206,13 @@ void DocumentDeviceManager::setJobsetup(/*[in]*/ const JobSetup &rJobSetup )
if( !mpPrt )
{
//The ItemSet is deleted by Sfx!
- auto pSet = o3tl::make_unique<SfxItemSet>( m_rDoc.GetAttrPool(),
- svl::Items<FN_PARAM_ADDPRINTER, FN_PARAM_ADDPRINTER,
- SID_HTML_MODE, SID_HTML_MODE,
- SID_PRINTER_NOTFOUND_WARN, SID_PRINTER_NOTFOUND_WARN,
- SID_PRINTER_CHANGESTODOC, SID_PRINTER_CHANGESTODOC>{} );
+ auto pSet = o3tl::make_unique<SfxItemSet>(
+ m_rDoc.GetAttrPool(),
+ svl::Items<
+ SID_PRINTER_NOTFOUND_WARN, SID_PRINTER_NOTFOUND_WARN,
+ SID_PRINTER_CHANGESTODOC, SID_PRINTER_CHANGESTODOC,
+ SID_HTML_MODE, SID_HTML_MODE,
+ FN_PARAM_ADDPRINTER, FN_PARAM_ADDPRINTER>{});
VclPtr<SfxPrinter> p = VclPtr<SfxPrinter>::Create( std::move(pSet), rJobSetup );
if ( bCheckPageDescs )
setPrinter( p, true, true );
@@ -289,11 +291,13 @@ SfxPrinter& DocumentDeviceManager::CreatePrinter_() const
// We create a default SfxPrinter.
// The ItemSet is deleted by Sfx!
- auto pSet = o3tl::make_unique<SfxItemSet>( m_rDoc.GetAttrPool(),
- svl::Items<FN_PARAM_ADDPRINTER, FN_PARAM_ADDPRINTER,
- SID_HTML_MODE, SID_HTML_MODE,
- SID_PRINTER_NOTFOUND_WARN, SID_PRINTER_NOTFOUND_WARN,
- SID_PRINTER_CHANGESTODOC, SID_PRINTER_CHANGESTODOC>{} );
+ auto pSet = o3tl::make_unique<SfxItemSet>(
+ m_rDoc.GetAttrPool(),
+ svl::Items<
+ SID_PRINTER_NOTFOUND_WARN, SID_PRINTER_NOTFOUND_WARN,
+ SID_PRINTER_CHANGESTODOC, SID_PRINTER_CHANGESTODOC,
+ SID_HTML_MODE, SID_HTML_MODE,
+ FN_PARAM_ADDPRINTER, FN_PARAM_ADDPRINTER>{});
VclPtr<SfxPrinter> pNewPrt = VclPtr<SfxPrinter>::Create( std::move(pSet) );
const_cast<DocumentDeviceManager*>(this)->setPrinter( pNewPrt, true, true );
diff --git a/sw/source/core/doc/docfmt.cxx b/sw/source/core/doc/docfmt.cxx
index 4e66dccc6c2a..6ce19ccd6390 100644
--- a/sw/source/core/doc/docfmt.cxx
+++ b/sw/source/core/doc/docfmt.cxx
@@ -110,10 +110,12 @@ static bool lcl_RstAttr( const SwNodePtr& rpNd, void* pArgs )
// remove unused attribute RES_LR_SPACE
// add list attributes
- SfxItemSet aSavedAttrsSet(pDoc->GetAttrPool(), svl::Items<RES_PAGEDESC, RES_BREAK,
- RES_PARATR_NUMRULE, RES_PARATR_NUMRULE,
- RES_PARATR_LIST_BEGIN,
- RES_PARATR_LIST_END - 1>{});
+ SfxItemSet aSavedAttrsSet(
+ pDoc->GetAttrPool(),
+ svl::Items<
+ RES_PARATR_NUMRULE, RES_PARATR_NUMRULE,
+ RES_PARATR_LIST_BEGIN, RES_PARATR_LIST_END - 1,
+ RES_PAGEDESC, RES_BREAK>{});
const SfxItemSet* pAttrSetOfNode = pNode->GetpSwAttrSet();
std::vector<sal_uInt16> aClearWhichIds;
diff --git a/sw/source/core/doc/docsort.cxx b/sw/source/core/doc/docsort.cxx
index c59b2fa7184d..751a80ad12f8 100644
--- a/sw/source/core/doc/docsort.cxx
+++ b/sw/source/core/doc/docsort.cxx
@@ -894,9 +894,11 @@ void FlatFndBox::FillFlat(const FndBox_& rBox, bool bLastBox)
SfxItemState::SET == pFormat->GetItemState( RES_BOXATR_FORMULA ) ||
SfxItemState::SET == pFormat->GetItemState( RES_BOXATR_VALUE ) )
{
- auto pSet = o3tl::make_unique<SfxItemSet>( pDoc->GetAttrPool(),
- svl::Items<RES_BOXATR_FORMAT, RES_BOXATR_VALUE,
- RES_VERT_ORIENT, RES_VERT_ORIENT>{} );
+ auto pSet = o3tl::make_unique<SfxItemSet>(
+ pDoc->GetAttrPool(),
+ svl::Items<
+ RES_VERT_ORIENT, RES_VERT_ORIENT,
+ RES_BOXATR_FORMAT, RES_BOXATR_VALUE>{});
pSet->Put( pFormat->GetAttrSet() );
if( ppItemSets.empty() )
{
diff --git a/sw/source/core/edit/autofmt.cxx b/sw/source/core/edit/autofmt.cxx
index f9e37f7ab433..06fc8d8605a8 100644
--- a/sw/source/core/edit/autofmt.cxx
+++ b/sw/source/core/edit/autofmt.cxx
@@ -986,11 +986,13 @@ void SwAutoFormat::SetColl( sal_uInt16 nId, bool bHdLineOrText )
m_aDelPam.GetPoint()->nContent.Assign( m_pCurTextNd, 0 );
// keep hard tabs, alignment, language, hyphenation, DropCaps and nearly all frame attributes
- SfxItemSet aSet( m_pDoc->GetAttrPool(),
- svl::Items<RES_PARATR_ADJUST, RES_PARATR_ADJUST,
- RES_PARATR_TABSTOP, RES_PARATR_DROP,
- RES_CHRATR_LANGUAGE, RES_CHRATR_LANGUAGE,
- RES_BACKGROUND, RES_SHADOW>{} );
+ SfxItemSet aSet(
+ m_pDoc->GetAttrPool(),
+ svl::Items<
+ RES_CHRATR_LANGUAGE, RES_CHRATR_LANGUAGE,
+ RES_PARATR_ADJUST, RES_PARATR_ADJUST,
+ RES_PARATR_TABSTOP, RES_PARATR_DROP,
+ RES_BACKGROUND, RES_SHADOW>{});
if( m_pCurTextNd->HasSwAttrSet() )
{
diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx
index 3c5f2553a795..544b76390584 100644
--- a/sw/source/core/txtnode/ndtxt.cxx
+++ b/sw/source/core/txtnode/ndtxt.cxx
@@ -1705,11 +1705,12 @@ void SwTextNode::CopyText( SwTextNode *const pDest,
pDest->HasSwAttrSet() ||
nLen != pDest->GetText().getLength()))
{
- SfxItemSet aCharSet( pDest->GetDoc()->GetAttrPool(),
- svl::Items<RES_CHRATR_BEGIN, RES_CHRATR_END-1,
- RES_TXTATR_INETFMT, RES_TXTATR_INETFMT,
- RES_TXTATR_CHARFMT, RES_TXTATR_CHARFMT,
- RES_UNKNOWNATR_BEGIN, RES_UNKNOWNATR_END-1>{} );
+ SfxItemSet aCharSet(
+ pDest->GetDoc()->GetAttrPool(),
+ svl::Items<
+ RES_CHRATR_BEGIN, RES_CHRATR_END - 1,
+ RES_TXTATR_INETFMT, RES_TXTATR_CHARFMT,
+ RES_UNKNOWNATR_BEGIN, RES_UNKNOWNATR_END - 1>{} );
aCharSet.Put( *GetpSwAttrSet() );
if( aCharSet.Count() )
{
@@ -1747,11 +1748,12 @@ void SwTextNode::CopyText( SwTextNode *const pDest,
pDest->HasSwAttrSet() ||
nLen != pDest->GetText().getLength()))
{
- SfxItemSet aCharSet( pDest->GetDoc()->GetAttrPool(),
- svl::Items<RES_CHRATR_BEGIN, RES_CHRATR_END-1,
- RES_TXTATR_INETFMT, RES_TXTATR_INETFMT,
- RES_TXTATR_CHARFMT, RES_TXTATR_CHARFMT,
- RES_UNKNOWNATR_BEGIN, RES_UNKNOWNATR_END-1>{} );
+ SfxItemSet aCharSet(
+ pDest->GetDoc()->GetAttrPool(),
+ svl::Items<
+ RES_CHRATR_BEGIN, RES_CHRATR_END - 1,
+ RES_TXTATR_INETFMT, RES_TXTATR_CHARFMT,
+ RES_UNKNOWNATR_BEGIN, RES_UNKNOWNATR_END - 1>{});
aCharSet.Put( *GetpSwAttrSet() );
if( aCharSet.Count() )
{
@@ -2105,11 +2107,12 @@ void SwTextNode::CutImpl( SwTextNode * const pDest, const SwIndex & rDestStart,
if( nInitSize || pDest->HasSwAttrSet() ||
nLen != pDest->GetText().getLength())
{
- SfxItemSet aCharSet( pDest->GetDoc()->GetAttrPool(),
- svl::Items<RES_CHRATR_BEGIN, RES_CHRATR_END-1,
- RES_TXTATR_INETFMT, RES_TXTATR_INETFMT,
- RES_TXTATR_CHARFMT, RES_TXTATR_CHARFMT,
- RES_UNKNOWNATR_BEGIN, RES_UNKNOWNATR_END-1>{} );
+ SfxItemSet aCharSet(
+ pDest->GetDoc()->GetAttrPool(),
+ svl::Items<
+ RES_CHRATR_BEGIN, RES_CHRATR_END - 1,
+ RES_TXTATR_INETFMT, RES_TXTATR_CHARFMT,
+ RES_UNKNOWNATR_BEGIN, RES_UNKNOWNATR_END - 1>{});
aCharSet.Put( *GetpSwAttrSet() );
if( aCharSet.Count() )
pDest->SetAttr( aCharSet, nDestStart, nDestStart + nLen );
diff --git a/sw/source/core/undo/untbl.cxx b/sw/source/core/undo/untbl.cxx
index 0d65e3caa7d0..c70a3ccc4d2c 100644
--- a/sw/source/core/undo/untbl.cxx
+++ b/sw/source/core/undo/untbl.cxx
@@ -2529,8 +2529,11 @@ void SwUndoTableCpyTable::UndoImpl(::sw::UndoRedoContext & rContext)
aInsIdx = rBox.GetSttIdx() + 1;
rDoc.GetNodes().Delete( aInsIdx );
- SfxItemSet aTmpSet( rDoc.GetAttrPool(), svl::Items<RES_BOXATR_FORMAT, RES_BOXATR_VALUE,
- RES_VERT_ORIENT, RES_VERT_ORIENT>{} );
+ SfxItemSet aTmpSet(
+ rDoc.GetAttrPool(),
+ svl::Items<
+ RES_VERT_ORIENT, RES_VERT_ORIENT,
+ RES_BOXATR_FORMAT, RES_BOXATR_VALUE>{});
aTmpSet.Put( rBox.GetFrameFormat()->GetAttrSet() );
if( aTmpSet.Count() )
{
@@ -2547,9 +2550,11 @@ void SwUndoTableCpyTable::UndoImpl(::sw::UndoRedoContext & rContext)
if( aTmpSet.Count() )
{
- pEntry->pBoxNumAttr = o3tl::make_unique<SfxItemSet>( rDoc.GetAttrPool(),
- svl::Items<RES_BOXATR_FORMAT, RES_BOXATR_VALUE,
- RES_VERT_ORIENT, RES_VERT_ORIENT>{} );
+ pEntry->pBoxNumAttr = o3tl::make_unique<SfxItemSet>(
+ rDoc.GetAttrPool(),
+ svl::Items<
+ RES_VERT_ORIENT, RES_VERT_ORIENT,
+ RES_BOXATR_FORMAT, RES_BOXATR_VALUE>{});
pEntry->pBoxNumAttr->Put( aTmpSet );
}
@@ -2620,8 +2625,11 @@ void SwUndoTableCpyTable::RedoImpl(::sw::UndoRedoContext & rContext)
aInsIdx = rBox.GetSttIdx() + 1;
rDoc.GetNodes().Delete( aInsIdx );
- SfxItemSet aTmpSet( rDoc.GetAttrPool(), svl::Items<RES_BOXATR_FORMAT, RES_BOXATR_VALUE,
- RES_VERT_ORIENT, RES_VERT_ORIENT>{} );
+ SfxItemSet aTmpSet(
+ rDoc.GetAttrPool(),
+ svl::Items<
+ RES_VERT_ORIENT, RES_VERT_ORIENT,
+ RES_BOXATR_FORMAT, RES_BOXATR_VALUE>{});
aTmpSet.Put( rBox.GetFrameFormat()->GetAttrSet() );
if( aTmpSet.Count() )
{
@@ -2637,9 +2645,11 @@ void SwUndoTableCpyTable::RedoImpl(::sw::UndoRedoContext & rContext)
if( aTmpSet.Count() )
{
- pEntry->pBoxNumAttr = o3tl::make_unique<SfxItemSet>( rDoc.GetAttrPool(),
- svl::Items<RES_BOXATR_FORMAT, RES_BOXATR_VALUE,
- RES_VERT_ORIENT, RES_VERT_ORIENT>{} );
+ pEntry->pBoxNumAttr = o3tl::make_unique<SfxItemSet>(
+ rDoc.GetAttrPool(),
+ svl::Items<
+ RES_VERT_ORIENT, RES_VERT_ORIENT,
+ RES_BOXATR_FORMAT, RES_BOXATR_VALUE>{});
pEntry->pBoxNumAttr->Put( aTmpSet );
}
@@ -2668,9 +2678,11 @@ void SwUndoTableCpyTable::AddBoxBefore( const SwTableBox& rBox, bool bDelContent
pEntry->pUndo = o3tl::make_unique<SwUndoDelete>( aPam, true );
}
- pEntry->pBoxNumAttr = o3tl::make_unique<SfxItemSet>( pDoc->GetAttrPool(),
- svl::Items<RES_BOXATR_FORMAT, RES_BOXATR_VALUE,
- RES_VERT_ORIENT, RES_VERT_ORIENT>{} );
+ pEntry->pBoxNumAttr = o3tl::make_unique<SfxItemSet>(
+ pDoc->GetAttrPool(),
+ svl::Items<
+ RES_VERT_ORIENT, RES_VERT_ORIENT,
+ RES_BOXATR_FORMAT, RES_BOXATR_VALUE>{});
pEntry->pBoxNumAttr->Put( rBox.GetFrameFormat()->GetAttrSet() );
if( !pEntry->pBoxNumAttr->Count() )
{
diff --git a/sw/source/core/unocore/unoobj.cxx b/sw/source/core/unocore/unoobj.cxx
index b6ecfa6c8300..cf009a9b4d10 100644
--- a/sw/source/core/unocore/unoobj.cxx
+++ b/sw/source/core/unocore/unoobj.cxx
@@ -1737,10 +1737,11 @@ uno::Any SwUnoCursorHelper::GetPropertyValue(
if (!bDone)
{
- SfxItemSet aSet(rPaM.GetDoc()->GetAttrPool(),
- svl::Items<RES_CHRATR_BEGIN, RES_FRMATR_END - 1,
- RES_TXTATR_UNKNOWN_CONTAINER, RES_TXTATR_UNKNOWN_CONTAINER,
- RES_UNKNOWNATR_CONTAINER, RES_UNKNOWNATR_CONTAINER>{});
+ SfxItemSet aSet(
+ rPaM.GetDoc()->GetAttrPool(),
+ svl::Items<
+ RES_CHRATR_BEGIN, RES_FRMATR_END - 1,
+ RES_UNKNOWNATR_CONTAINER, RES_UNKNOWNATR_CONTAINER>{});
SwUnoCursorHelper::GetCursorAttr(rPaM, aSet);
rPropSet.getPropertyValue(*pEntry, aSet, aAny);
@@ -1925,9 +1926,10 @@ SwUnoCursorHelper::GetPropertyStates(
default:
pSet.reset( new SfxItemSet(
rPaM.GetDoc()->GetAttrPool(),
- svl::Items<RES_CHRATR_BEGIN, RES_FRMATR_END - 1,
- RES_UNKNOWNATR_CONTAINER, RES_UNKNOWNATR_CONTAINER,
- RES_TXTATR_UNKNOWN_CONTAINER, RES_TXTATR_UNKNOWN_CONTAINER>{} ));
+ svl::Items<
+ RES_CHRATR_BEGIN, RES_FRMATR_END - 1,
+ RES_UNKNOWNATR_CONTAINER,
+ RES_UNKNOWNATR_CONTAINER>{}));
}
// #i63870#
SwUnoCursorHelper::GetCursorAttr( rPaM, *pSet );
diff --git a/sw/source/core/unocore/unoport.cxx b/sw/source/core/unocore/unoport.cxx
index 060cb75cdf33..b2d767943640 100644
--- a/sw/source/core/unocore/unoport.cxx
+++ b/sw/source/core/unocore/unoport.cxx
@@ -360,10 +360,12 @@ void SwXTextPortion::GetPropertyValue(
{
if(!pSet)
{
- pSet = o3tl::make_unique<SfxItemSet>(pUnoCursor->GetDoc()->GetAttrPool(),
- svl::Items<RES_CHRATR_BEGIN, RES_FRMATR_END - 1,
- RES_UNKNOWNATR_CONTAINER, RES_UNKNOWNATR_CONTAINER,
- RES_TXTATR_UNKNOWN_CONTAINER, RES_TXTATR_UNKNOWN_CONTAINER>{});
+ pSet = o3tl::make_unique<SfxItemSet>(
+ pUnoCursor->GetDoc()->GetAttrPool(),
+ svl::Items<
+ RES_CHRATR_BEGIN, RES_FRMATR_END - 1,
+ RES_UNKNOWNATR_CONTAINER,
+ RES_UNKNOWNATR_CONTAINER>{});
SwUnoCursorHelper::GetCursorAttr(*pUnoCursor, *pSet);
}
m_pPropSet->getPropertyValue(rEntry, *pSet, rVal);
diff --git a/sw/source/core/unocore/unosect.cxx b/sw/source/core/unocore/unosect.cxx
index a9cf24f28943..8dc370b6c887 100644
--- a/sw/source/core/unocore/unosect.cxx
+++ b/sw/source/core/unocore/unosect.cxx
@@ -351,12 +351,14 @@ SwXTextSection::attach(const uno::Reference< text::XTextRange > & xTextRange)
aSect.SetProtectFlag(m_pImpl->m_pProps->m_bProtect);
aSect.SetEditInReadonlyFlag(m_pImpl->m_pProps->m_bEditInReadonly);
- SfxItemSet aSet(pDoc->GetAttrPool(),
- svl::Items<RES_COL, RES_COL,
- RES_BACKGROUND, RES_BACKGROUND,
- RES_FTN_AT_TXTEND, RES_FRAMEDIR,
- RES_LR_SPACE, RES_LR_SPACE,
- RES_UNKNOWNATR_CONTAINER,RES_UNKNOWNATR_CONTAINER>{});
+ SfxItemSet aSet(
+ pDoc->GetAttrPool(),
+ svl::Items<
+ RES_LR_SPACE, RES_LR_SPACE,
+ RES_BACKGROUND, RES_BACKGROUND,
+ RES_COL, RES_COL,
+ RES_FTN_AT_TXTEND, RES_FRAMEDIR,
+ RES_UNKNOWNATR_CONTAINER,RES_UNKNOWNATR_CONTAINER>{});
if (m_pImpl->m_pProps->m_pBrushItem.get())
{
aSet.Put(*m_pImpl->m_pProps->m_pBrushItem);
diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx
index 2d1c91e219fe..64ceec74719d 100644
--- a/sw/source/core/unocore/unotbl.cxx
+++ b/sw/source/core/unocore/unotbl.cxx
@@ -1825,16 +1825,15 @@ void SwTableProperties_Impl::AddItemToSet(SfxItemSet& rSet, std::function<Tpooli
}
void SwTableProperties_Impl::ApplyTableAttr(const SwTable& rTable, SwDoc& rDoc)
{
- SfxItemSet aSet(rDoc.GetAttrPool(),
- svl::Items<RES_LAYOUT_SPLIT, RES_LAYOUT_SPLIT,
- RES_BACKGROUND, RES_BACKGROUND,
- RES_FRM_SIZE, RES_UL_SPACE,
- RES_HORI_ORIENT, RES_HORI_ORIENT,
- RES_BREAK, RES_BREAK,
- RES_KEEP, RES_KEEP,
- RES_SHADOW, RES_SHADOW,
- RES_PAGEDESC, RES_PAGEDESC>{}
- );
+ SfxItemSet aSet(
+ rDoc.GetAttrPool(),
+ svl::Items<
+ RES_FRM_SIZE, RES_BREAK,
+ RES_HORI_ORIENT, RES_HORI_ORIENT,
+ RES_BACKGROUND, RES_BACKGROUND,
+ RES_SHADOW, RES_SHADOW,
+ RES_KEEP, RES_KEEP,
+ RES_LAYOUT_SPLIT, RES_LAYOUT_SPLIT>{});
const uno::Any* pRepHead;
const SwFrameFormat &rFrameFormat = *rTable.GetFrameFormat();
if(GetProperty(FN_TABLE_HEADLINE_REPEAT, 0xff, pRepHead ))
@@ -3564,10 +3563,12 @@ uno::Any SAL_CALL SwXCellRange::getPropertyValue(const OUString& rPropertyName)
break;
default:
{
- SfxItemSet aSet(m_pImpl->m_pTableCursor->GetDoc()->GetAttrPool(),
- svl::Items<RES_CHRATR_BEGIN, RES_FRMATR_END -1,
- RES_TXTATR_UNKNOWN_CONTAINER, RES_TXTATR_UNKNOWN_CONTAINER,
- RES_UNKNOWNATR_CONTAINER, RES_UNKNOWNATR_CONTAINER>{});
+ SfxItemSet aSet(
+ m_pImpl->m_pTableCursor->GetDoc()->GetAttrPool(),
+ svl::Items<
+ RES_CHRATR_BEGIN, RES_FRMATR_END - 1,
+ RES_UNKNOWNATR_CONTAINER,
+ RES_UNKNOWNATR_CONTAINER>{});
// first look at the attributes of the cursor
SwUnoTableCursor *const pCursor =
dynamic_cast<SwUnoTableCursor*>(&(*m_pImpl->m_pTableCursor));
diff --git a/sw/source/filter/html/css1atr.cxx b/sw/source/filter/html/css1atr.cxx
index 8505dc0a4bf6..1987153b18aa 100644
--- a/sw/source/filter/html/css1atr.cxx
+++ b/sw/source/filter/html/css1atr.cxx
@@ -1223,14 +1223,15 @@ bool SwHTMLWriter::HasScriptDependentItems( const SfxItemSet& rItemSet,
{
//sequence of (start, end) property ranges we want to
//query
- SfxItemSet aTstItemSet( *pDCCharFormat->GetAttrSet().GetPool(),
- svl::Items<RES_CHRATR_FONT, RES_CHRATR_FONT,
- RES_CHRATR_POSTURE, RES_CHRATR_POSTURE,
- RES_CHRATR_WEIGHT, RES_CHRATR_WEIGHT,
- RES_CHRATR_CJK_FONT, RES_CHRATR_CJK_FONT,
- RES_CHRATR_CJK_POSTURE, RES_CHRATR_CJK_WEIGHT,
- RES_CHRATR_CTL_FONT, RES_CHRATR_CTL_FONT,
- RES_CHRATR_CTL_POSTURE, RES_CHRATR_CTL_WEIGHT>{} );
+ SfxItemSet aTstItemSet(
+ *pDCCharFormat->GetAttrSet().GetPool(),
+ svl::Items<
+ RES_CHRATR_FONT, RES_CHRATR_FONT,
+ RES_CHRATR_POSTURE, RES_CHRATR_POSTURE,
+ RES_CHRATR_WEIGHT, RES_CHRATR_WEIGHT,
+ RES_CHRATR_CJK_FONT, RES_CHRATR_CJK_FONT,
+ RES_CHRATR_CJK_POSTURE, RES_CHRATR_CTL_FONT,
+ RES_CHRATR_CTL_POSTURE, RES_CHRATR_CTL_WEIGHT>{});
aTstItemSet.Set( pDCCharFormat->GetAttrSet() );
return HasScriptDependentItems( aTstItemSet, false );
}
diff --git a/sw/source/ui/dbui/mmlayoutpage.cxx b/sw/source/ui/dbui/mmlayoutpage.cxx
index 0cd4bcaf7c02..7afde439fb37 100644
--- a/sw/source/ui/dbui/mmlayoutpage.cxx
+++ b/sw/source/ui/dbui/mmlayoutpage.cxx
@@ -283,12 +283,12 @@ SwFrameFormat* SwMailMergeLayoutPage::InsertAddressFrame(
bool bExample)
{
// insert the address block and the greeting line
- SfxItemSet aSet(rShell.GetAttrPool(), svl::Items<RES_ANCHOR, RES_ANCHOR,
- RES_VERT_ORIENT, RES_VERT_ORIENT,
- RES_HORI_ORIENT, RES_HORI_ORIENT,
- RES_BOX, RES_BOX,
- RES_FRM_SIZE, RES_FRM_SIZE,
- RES_SURROUND, RES_SURROUND>{} );
+ SfxItemSet aSet(
+ rShell.GetAttrPool(),
+ svl::Items<
+ RES_FRM_SIZE, RES_FRM_SIZE,
+ RES_SURROUND, RES_ANCHOR,
+ RES_BOX, RES_BOX>{} );
aSet.Put(SwFormatAnchor(RndStdIds::FLY_AT_PAGE, 1));
if(bAlignLeft)
aSet.Put(SwFormatHoriOrient( 0, text::HoriOrientation::NONE, text::RelOrientation::PAGE_PRINT_AREA ));
@@ -692,9 +692,9 @@ IMPL_LINK_NOARG(SwMailMergeLayoutPage, ChangeAddressHdl_Impl, SpinField&, void)
long nLeft = static_cast< long >(m_pLeftMF->Denormalize(m_pLeftMF->GetValue(FUNIT_TWIP)));
long nTop = static_cast< long >(m_pTopMF->Denormalize(m_pTopMF->GetValue(FUNIT_TWIP)));
- SfxItemSet aSet(m_pExampleWrtShell->GetAttrPool(), svl::Items<RES_ANCHOR, RES_ANCHOR,
- RES_VERT_ORIENT, RES_VERT_ORIENT,
- RES_HORI_ORIENT, RES_HORI_ORIENT>{} );
+ SfxItemSet aSet(
+ m_pExampleWrtShell->GetAttrPool(),
+ svl::Items<RES_VERT_ORIENT, RES_ANCHOR>{});
if(m_pAlignToBodyCB->IsChecked())
aSet.Put(SwFormatHoriOrient( 0, text::HoriOrientation::NONE, text::RelOrientation::PAGE_PRINT_AREA ));
else
diff --git a/sw/source/ui/dialog/uiregionsw.cxx b/sw/source/ui/dialog/uiregionsw.cxx
index bd659c941a1b..e04571585bd9 100644
--- a/sw/source/ui/dialog/uiregionsw.cxx
+++ b/sw/source/ui/dialog/uiregionsw.cxx
@@ -1048,14 +1048,15 @@ IMPL_LINK_NOARG(SwEditRegionDlg, OptionsHdl, Button*, void)
if(pEntry)
{
SectRepr* pSectRepr = static_cast<SectRepr*>(pEntry->GetUserData());
- SfxItemSet aSet(rSh.GetView().GetPool(),
- svl::Items<RES_COL, RES_COL,
- RES_COLUMNBALANCE, RES_FRAMEDIR,
- RES_BACKGROUND, RES_BACKGROUND,
- RES_FRM_SIZE, RES_FRM_SIZE,
- SID_ATTR_PAGE_SIZE, SID_ATTR_PAGE_SIZE,
- RES_LR_SPACE, RES_LR_SPACE,
- RES_FTN_AT_TXTEND, RES_END_AT_TXTEND>{});
+ SfxItemSet aSet(
+ rSh.GetView().GetPool(),
+ svl::Items<
+ RES_FRM_SIZE, RES_FRM_SIZE,
+ RES_LR_SPACE, RES_LR_SPACE,
+ RES_BACKGROUND, RES_BACKGROUND,
+ RES_COL, RES_COL,
+ RES_FTN_AT_TXTEND, RES_FRAMEDIR,
+ SID_ATTR_PAGE_SIZE, SID_ATTR_PAGE_SIZE>{});
aSet.Put( pSectRepr->GetCol() );
aSet.Put( pSectRepr->GetBackground() );
diff --git a/sw/source/ui/frmdlg/column.cxx b/sw/source/ui/frmdlg/column.cxx
index 7a72564183be..809165a1ff45 100644
--- a/sw/source/ui/frmdlg/column.cxx
+++ b/sw/source/ui/frmdlg/column.cxx
@@ -144,10 +144,12 @@ SwColumnDlg::SwColumnDlg(vcl::Window* pParent, SwWrtShell& rSh)
const SwPageDesc* pPageDesc = rWrtShell.GetSelectedPageDescs();
if( pPageDesc )
{
- pPageSet = new SfxItemSet( rWrtShell.GetAttrPool(),
- svl::Items<RES_COL, RES_COL,
- RES_FRM_SIZE, RES_FRM_SIZE,
- RES_LR_SPACE, RES_LR_SPACE>{} );
+ pPageSet = new SfxItemSet(
+ rWrtShell.GetAttrPool(),
+ svl::Items<
+ RES_FRM_SIZE, RES_FRM_SIZE,
+ RES_LR_SPACE, RES_LR_SPACE,
+ RES_COL, RES_COL>{});
const SwFrameFormat &rFormat = pPageDesc->GetMaster();
nPageWidth = rFormat.GetFrameSize().GetSize().Width();
diff --git a/sw/source/uibase/app/applab.cxx b/sw/source/uibase/app/applab.cxx
index 56c5cf609e4a..e463f6fef4db 100644
--- a/sw/source/uibase/app/applab.cxx
+++ b/sw/source/uibase/app/applab.cxx
@@ -84,8 +84,8 @@ static const SwFrameFormat *lcl_InsertBCText( SwWrtShell& rSh, const SwLabItem&
SwFrameFormat &rFormat,
sal_uInt16 nCol, sal_uInt16 nRow )
{
- SfxItemSet aSet(rSh.GetAttrPool(), svl::Items<RES_ANCHOR, RES_ANCHOR,
- RES_VERT_ORIENT, RES_VERT_ORIENT, RES_HORI_ORIENT, RES_HORI_ORIENT>{} );
+ SfxItemSet aSet(
+ rSh.GetAttrPool(), svl::Items<RES_VERT_ORIENT, RES_ANCHOR>{});
sal_uInt16 nPhyPageNum, nVirtPageNum;
rSh.GetPageNum( nPhyPageNum, nVirtPageNum );
@@ -121,8 +121,8 @@ static const SwFrameFormat *lcl_InsertLabText( SwWrtShell& rSh, const SwLabItem&
SwFrameFormat &rFormat, SwFieldMgr& rFieldMgr,
sal_uInt16 nCol, sal_uInt16 nRow, bool bLast )
{
- SfxItemSet aSet(rSh.GetAttrPool(), svl::Items<RES_ANCHOR, RES_ANCHOR,
- RES_VERT_ORIENT, RES_VERT_ORIENT, RES_HORI_ORIENT, RES_HORI_ORIENT>{} );
+ SfxItemSet aSet(
+ rSh.GetAttrPool(), svl::Items<RES_VERT_ORIENT, RES_ANCHOR>{});
sal_uInt16 nPhyPageNum, nVirtPageNum;
rSh.GetPageNum( nPhyPageNum, nVirtPageNum );
diff --git a/sw/source/uibase/app/appopt.cxx b/sw/source/uibase/app/appopt.cxx
index 3db438e1e7c2..6ff4597c21bd 100644
--- a/sw/source/uibase/app/appopt.cxx
+++ b/sw/source/uibase/app/appopt.cxx
@@ -97,23 +97,25 @@ std::unique_ptr<SfxItemSet> SwModule::CreateItemSet( sal_uInt16 nId )
}
// Options/Edit
- auto pRet = o3tl::make_unique<SfxItemSet>(GetPool(), svl::Items<FN_PARAM_DOCDISP, FN_PARAM_ELEM,
- SID_PRINTPREVIEW, SID_PRINTPREVIEW,
- SID_ATTR_GRID_OPTIONS, SID_ATTR_GRID_OPTIONS,
- FN_PARAM_PRINTER, FN_PARAM_STDFONTS,
- FN_PARAM_WRTSHELL, FN_PARAM_WRTSHELL,
- FN_PARAM_ADDPRINTER, FN_PARAM_ADDPRINTER,
- SID_ATTR_METRIC, SID_ATTR_METRIC,
- SID_ATTR_APPLYCHARUNIT, SID_ATTR_APPLYCHARUNIT,
- SID_ATTR_DEFTABSTOP, SID_ATTR_DEFTABSTOP,
- RES_BACKGROUND, RES_BACKGROUND,
- SID_HTML_MODE, SID_HTML_MODE,
- FN_PARAM_SHADOWCURSOR, FN_PARAM_SHADOWCURSOR,
- FN_PARAM_CRSR_IN_PROTECTED, FN_PARAM_CRSR_IN_PROTECTED,
- FN_HSCROLL_METRIC, FN_VSCROLL_METRIC,
- SID_ATTR_LANGUAGE, SID_ATTR_LANGUAGE,
- SID_ATTR_CHAR_CJK_LANGUAGE, SID_ATTR_CHAR_CJK_LANGUAGE,
- SID_ATTR_CHAR_CTL_LANGUAGE, SID_ATTR_CHAR_CTL_LANGUAGE>{});
+ auto pRet = o3tl::make_unique<SfxItemSet>(
+ GetPool(),
+ svl::Items<
+ RES_BACKGROUND, RES_BACKGROUND,
+ SID_PRINTPREVIEW, SID_PRINTPREVIEW,
+ SID_ATTR_GRID_OPTIONS, SID_ATTR_GRID_OPTIONS,
+ SID_HTML_MODE, SID_HTML_MODE,
+ SID_ATTR_CHAR_CJK_LANGUAGE, SID_ATTR_CHAR_CJK_LANGUAGE,
+ SID_ATTR_CHAR_CTL_LANGUAGE, SID_ATTR_CHAR_CTL_LANGUAGE,
+ SID_ATTR_LANGUAGE, SID_ATTR_METRIC,
+ SID_ATTR_DEFTABSTOP, SID_ATTR_DEFTABSTOP,
+ SID_ATTR_APPLYCHARUNIT, SID_ATTR_APPLYCHARUNIT,
+ FN_HSCROLL_METRIC, FN_VSCROLL_METRIC,
+ FN_PARAM_ADDPRINTER, FN_PARAM_ADDPRINTER,
+ FN_PARAM_DOCDISP, FN_PARAM_ELEM,
+ FN_PARAM_PRINTER, FN_PARAM_STDFONTS,
+ FN_PARAM_WRTSHELL, FN_PARAM_WRTSHELL,
+ FN_PARAM_SHADOWCURSOR, FN_PARAM_SHADOWCURSOR,
+ FN_PARAM_CRSR_IN_PROTECTED, FN_PARAM_CRSR_IN_PROTECTED>{});
pRet->Put( SwDocDisplayItem( aViewOpt ) );
pRet->Put( SwElemItem( aViewOpt ) );
diff --git a/sw/source/uibase/app/docstyle.cxx b/sw/source/uibase/app/docstyle.cxx
index 30b7a1da172e..81b3f60bb3b3 100644
--- a/sw/source/uibase/app/docstyle.cxx
+++ b/sw/source/uibase/app/docstyle.cxx
@@ -461,34 +461,29 @@ SwDocStyleSheet::SwDocStyleSheet( SwDoc& rDocument,
pTableFormat(nullptr),
pBoxFormat(nullptr),
rDoc(rDocument),
- aCoreSet(GetPool().GetPool(), // sorted by indices, one double removed
- svl::Items<RES_CHRATR_BEGIN, RES_CHRATR_END - 1, // [1
- RES_PARATR_BEGIN, RES_PARATR_END - 1, // [60
- RES_PARATR_LIST_BEGIN, RES_PARATR_LIST_END - 1, // [77
- RES_FRMATR_BEGIN, RES_FRMATR_END - 1, // [82
- RES_UNKNOWNATR_BEGIN, RES_UNKNOWNATR_END-1, // [143
-
- // FillAttribute support
- XATTR_FILL_FIRST, XATTR_FILL_LAST, // [1014
-
- SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER, // [10023
- SID_ATTR_PAGE, SID_ATTR_PAGE_EXT1, // [10050
- SID_ATTR_PAGE_HEADERSET,SID_ATTR_PAGE_FOOTERSET, // [10058
- SID_ATTR_PARA_MODEL, SID_ATTR_PARA_MODEL, // [10065
-
- // items to hand over XPropertyList things like
- // XColorList, XHatchList, XGradientList and XBitmapList
- // to the Area TabPage
- SID_COLOR_TABLE, SID_PATTERN_LIST, // [10179
-
- SID_SWREGISTER_COLLECTION, SID_SWREGISTER_COLLECTION, // [10451
- SID_ATTR_PARA_PAGENUM, SID_ATTR_PARA_PAGENUM, // [10457
- SID_SWREGISTER_MODE, SID_SWREGISTER_MODE, // [10467
- SID_ATTR_BRUSH_CHAR, SID_ATTR_BRUSH_CHAR, // [10590
- SID_ATTR_NUMBERING_RULE, SID_ATTR_NUMBERING_RULE, // [10855
- SID_ATTR_AUTO_STYLE_UPDATE, SID_ATTR_AUTO_STYLE_UPDATE, // [12065
- FN_PARAM_FTN_INFO, FN_PARAM_FTN_INFO, // [21123
- FN_COND_COLL, FN_COND_COLL>{}), // [22401
+ aCoreSet(
+ GetPool().GetPool(),
+ svl::Items<
+ RES_CHRATR_BEGIN, RES_CHRATR_END - 1,
+ RES_PARATR_BEGIN, RES_FRMATR_END - 1,
+ RES_UNKNOWNATR_BEGIN, RES_UNKNOWNATR_END - 1,
+ // FillAttribute support:
+ XATTR_FILL_FIRST, XATTR_FILL_LAST,
+ SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER,
+ SID_ATTR_PAGE, SID_ATTR_PAGE_EXT1,
+ SID_ATTR_PAGE_HEADERSET, SID_ATTR_PAGE_FOOTERSET,
+ SID_ATTR_PARA_MODEL, SID_ATTR_PARA_MODEL,
+ // Items to hand over XPropertyList things like XColorList,
+ // XHatchList, XGradientList, and XBitmapList to the Area TabPage:
+ SID_COLOR_TABLE, SID_PATTERN_LIST,
+ SID_SWREGISTER_COLLECTION, SID_SWREGISTER_COLLECTION,
+ SID_ATTR_PARA_PAGENUM, SID_ATTR_PARA_PAGENUM,
+ SID_SWREGISTER_MODE, SID_SWREGISTER_MODE,
+ SID_ATTR_BRUSH_CHAR, SID_ATTR_BRUSH_CHAR,
+ SID_ATTR_NUMBERING_RULE, SID_ATTR_NUMBERING_RULE,
+ SID_ATTR_AUTO_STYLE_UPDATE, SID_ATTR_AUTO_STYLE_UPDATE,
+ FN_PARAM_FTN_INFO, FN_PARAM_FTN_INFO,
+ FN_COND_COLL, FN_COND_COLL>{}),
bPhysical(false)
{
nHelpId = UCHAR_MAX;
diff --git a/sw/source/uibase/dialog/regionsw.cxx b/sw/source/uibase/dialog/regionsw.cxx
index 2402b661675d..6335665e2881 100644
--- a/sw/source/uibase/dialog/regionsw.cxx
+++ b/sw/source/uibase/dialog/regionsw.cxx
@@ -61,13 +61,14 @@ void SwBaseShell::InsertRegionDialog(SfxRequest& rReq)
SwWrtShell& rSh = GetShell();
const SfxItemSet *pSet = rReq.GetArgs();
- SfxItemSet aSet(GetPool(),
- svl::Items<RES_COL, RES_COL,
+ SfxItemSet aSet(
+ GetPool(),
+ svl::Items<
+ RES_FRM_SIZE, RES_FRM_SIZE,
RES_LR_SPACE, RES_LR_SPACE,
- RES_COLUMNBALANCE, RES_FRAMEDIR,
RES_BACKGROUND, RES_BACKGROUND,
- RES_FRM_SIZE, RES_FRM_SIZE,
- RES_FTN_AT_TXTEND, RES_END_AT_TXTEND,
+ RES_COL, RES_COL,
+ RES_FTN_AT_TXTEND, RES_FRAMEDIR,
SID_ATTR_PAGE_SIZE, SID_ATTR_PAGE_SIZE>{});
if (!pSet || pSet->Count()==0)
@@ -179,10 +180,12 @@ IMPL_LINK( SwWrtShell, InsertRegionDialog, void*, p, void )
std::unique_ptr<SwSectionData> xSectionData(pSect);
if (xSectionData.get())
{
- SfxItemSet aSet(GetView().GetPool(),
- svl::Items<RES_COL, RES_COL,
- RES_BACKGROUND, RES_BACKGROUND,
+ SfxItemSet aSet(
+ GetView().GetPool(),
+ svl::Items<
RES_FRM_SIZE, RES_FRM_SIZE,
+ RES_BACKGROUND, RES_BACKGROUND,
+ RES_COL, RES_COL,
SID_ATTR_PAGE_SIZE, SID_ATTR_PAGE_SIZE>{});
SwRect aRect;
CalcBoundRect(aRect, RndStdIds::FLY_AS_CHAR);
diff --git a/sw/source/uibase/docvw/HeaderFooterWin.cxx b/sw/source/uibase/docvw/HeaderFooterWin.cxx
index 0feb53f1e972..ca5c7857d96c 100644
--- a/sw/source/uibase/docvw/HeaderFooterWin.cxx
+++ b/sw/source/uibase/docvw/HeaderFooterWin.cxx
@@ -418,11 +418,11 @@ void SwHeaderFooterWin::ExecuteCommand(const OString& rIdent)
pHFFormat = const_cast< SwFrameFormat* >( rMaster.GetHeader().GetHeaderFormat() );
SfxItemPool* pPool = pHFFormat->GetAttrSet().GetPool();
- SfxItemSet aSet( *pPool,
- svl::Items<RES_BACKGROUND, RES_BACKGROUND,
- RES_BOX, RES_BOX,
- SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER,
- RES_SHADOW, RES_SHADOW>{} );
+ SfxItemSet aSet(
+ *pPool,
+ svl::Items<
+ RES_BACKGROUND, RES_SHADOW,
+ SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER>{});
aSet.Put( pHFFormat->GetAttrSet() );
diff --git a/sw/source/uibase/docvw/PageBreakWin.cxx b/sw/source/uibase/docvw/PageBreakWin.cxx
index 0aabe5fe728f..5615b3f8cd9f 100644
--- a/sw/source/uibase/docvw/PageBreakWin.cxx
+++ b/sw/source/uibase/docvw/PageBreakWin.cxx
@@ -282,9 +282,9 @@ void SwPageBreakWin::Select()
pNd->GetDoc()->GetIDocumentUndoRedo( ).StartUndo( SwUndoId::UI_DELETE_PAGE_BREAK, nullptr );
- SfxItemSet aSet( GetEditWin()->GetView().GetWrtShell().GetAttrPool(),
- svl::Items<RES_PAGEDESC, RES_PAGEDESC,
- RES_BREAK, RES_BREAK>{} );
+ SfxItemSet aSet(
+ GetEditWin()->GetView().GetWrtShell().GetAttrPool(),
+ svl::Items<RES_PAGEDESC, RES_BREAK>{});
aSet.Put( SvxFormatBreakItem( SvxBreak::NONE, RES_BREAK ) );
aSet.Put( SwFormatPageDesc( nullptr ) );
diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx
index 225ddc2f7943..892a0b724249 100644
--- a/sw/source/uibase/docvw/edtwin.cxx
+++ b/sw/source/uibase/docvw/edtwin.cxx
@@ -1008,12 +1008,14 @@ void SwEditWin::ChangeFly( sal_uInt8 nDir, bool bWeb )
if( aTmp.HasArea() &&
rSh.IsSelObjProtected( FlyProtectFlags::Pos ) == FlyProtectFlags::NONE )
{
- SfxItemSet aSet(rSh.GetAttrPool(),
- svl::Items<RES_FRM_SIZE, RES_FRM_SIZE,
- RES_VERT_ORIENT, RES_ANCHOR,
- RES_COL, RES_COL,
- RES_PROTECT, RES_PROTECT,
- RES_FOLLOW_TEXT_FLOW, RES_FOLLOW_TEXT_FLOW>{});
+ SfxItemSet aSet(
+ rSh.GetAttrPool(),
+ svl::Items<
+ RES_FRM_SIZE, RES_FRM_SIZE,
+ RES_PROTECT, RES_PROTECT,
+ RES_VERT_ORIENT, RES_ANCHOR,
+ RES_COL, RES_COL,
+ RES_FOLLOW_TEXT_FLOW, RES_FOLLOW_TEXT_FLOW>{});
rSh.GetFlyFrameAttr( aSet );
RndStdIds eAnchorId = static_cast<const SwFormatAnchor&>(aSet.Get(RES_ANCHOR)).GetAnchorId();
Size aSnap;
diff --git a/sw/source/uibase/misc/glshell.cxx b/sw/source/uibase/misc/glshell.cxx
index 66125ad7189e..6e678dd00bab 100644
--- a/sw/source/uibase/misc/glshell.cxx
+++ b/sw/source/uibase/misc/glshell.cxx
@@ -240,10 +240,12 @@ SwDocShellRef SwGlossaries::EditGroupDoc( const OUString& rGroup, const OUString
{
// we create a default SfxPrinter.
// ItemSet is deleted by Sfx!
- auto pSet = o3tl::make_unique<SfxItemSet>( xDocSh->GetDoc()->GetAttrPool(),
- svl::Items<FN_PARAM_ADDPRINTER, FN_PARAM_ADDPRINTER,
- SID_PRINTER_NOTFOUND_WARN, SID_PRINTER_NOTFOUND_WARN,
- SID_PRINTER_CHANGESTODOC, SID_PRINTER_CHANGESTODOC>{} );
+ auto pSet = o3tl::make_unique<SfxItemSet>(
+ xDocSh->GetDoc()->GetAttrPool(),
+ svl::Items<
+ SID_PRINTER_NOTFOUND_WARN, SID_PRINTER_NOTFOUND_WARN,
+ SID_PRINTER_CHANGESTODOC, SID_PRINTER_CHANGESTODOC,
+ FN_PARAM_ADDPRINTER, FN_PARAM_ADDPRINTER>{});
VclPtr<SfxPrinter> pPrinter = VclPtr<SfxPrinter>::Create( std::move(pSet) );
// and append it to the document.
diff --git a/sw/source/uibase/ribbar/concustomshape.cxx b/sw/source/uibase/ribbar/concustomshape.cxx
index 31baef25178e..a0a3c061ade4 100644
--- a/sw/source/uibase/ribbar/concustomshape.cxx
+++ b/sw/source/uibase/ribbar/concustomshape.cxx
@@ -127,18 +127,20 @@ void ConstCustomShape::SetAttributes( SdrObject* pObj )
if( pSourceObj )
{
const SfxItemSet& rSource = pSourceObj->GetMergedItemSet();
- SfxItemSet aDest( pObj->GetModel()->GetItemPool(), // ranges from SdrAttrObj
- svl::Items<SDRATTR_START, SDRATTR_SHADOW_LAST,
- SDRATTR_MISC_FIRST, SDRATTR_MISC_LAST,
- SDRATTR_TEXTDIRECTION, SDRATTR_TEXTDIRECTION,
- // Graphic Attributes
- SDRATTR_GRAF_FIRST, SDRATTR_GRAF_LAST,
- // 3d Properties
- SDRATTR_3D_FIRST, SDRATTR_3D_LAST,
- // CustomShape properties
- SDRATTR_CUSTOMSHAPE_FIRST, SDRATTR_CUSTOMSHAPE_LAST,
- // range from SdrTextObj
- EE_ITEMS_START, EE_ITEMS_END>{});
+ SfxItemSet aDest(
+ pObj->GetModel()->GetItemPool(),
+ svl::Items<
+ // Ranges from SdrAttrObj:
+ SDRATTR_START, SDRATTR_SHADOW_LAST,
+ SDRATTR_MISC_FIRST, SDRATTR_MISC_LAST,
+ SDRATTR_TEXTDIRECTION,
+ SDRATTR_TEXTDIRECTION,
+ // Graphic attributes, 3D properties,
+ // CustomShape properties:
+ SDRATTR_GRAF_FIRST,
+ SDRATTR_CUSTOMSHAPE_LAST,
+ // Range from SdrTextObj:
+ EE_ITEMS_START, EE_ITEMS_END>{});
aDest.Set( rSource );
pObj->SetMergedItemSet( aDest );
sal_Int32 nAngle = pSourceObj->GetRotateAngle();
diff --git a/sw/source/uibase/shells/annotsh.cxx b/sw/source/uibase/shells/annotsh.cxx
index 1428a8c772dc..99d421fe64fd 100644
--- a/sw/source/uibase/shells/annotsh.cxx
+++ b/sw/source/uibase/shells/annotsh.cxx
@@ -524,12 +524,11 @@ void SwAnnotationShell::Exec( SfxRequest &rReq )
FieldUnit eMetric = ::GetDfltMetric(dynamic_cast<SwWebView*>( pView) != nullptr );
SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, eMetric));
*/
- SfxItemSet aDlgAttr(GetPool(),
- svl::Items<EE_ITEMS_START, EE_ITEMS_END,
- SID_ATTR_PARA_HYPHENZONE, SID_ATTR_PARA_HYPHENZONE,
- SID_ATTR_PARA_SPLIT, SID_ATTR_PARA_SPLIT,
- SID_ATTR_PARA_WIDOWS, SID_ATTR_PARA_WIDOWS,
- SID_ATTR_PARA_ORPHANS, SID_ATTR_PARA_ORPHANS>{});
+ SfxItemSet aDlgAttr(
+ GetPool(),
+ svl::Items<
+ EE_ITEMS_START, EE_ITEMS_END,
+ SID_ATTR_PARA_HYPHENZONE, SID_ATTR_PARA_WIDOWS>{});
aDlgAttr.Put(aEditAttr);
@@ -574,9 +573,11 @@ void SwAnnotationShell::Exec( SfxRequest &rReq )
if( !static_cast<const SfxBoolItem*>(pPoolItem)->GetValue() )
bLeftToRight = !bLeftToRight;
}
- SfxItemSet aAttr( *aNewAttr.GetPool(),
- svl::Items<EE_PARA_JUST, EE_PARA_JUST,
- EE_PARA_WRITINGDIR, EE_PARA_WRITINGDIR>{} );
+ SfxItemSet aAttr(
+ *aNewAttr.GetPool(),
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list