[Libreoffice-commits] core.git: sd/source
Stephan Bergmann
sbergman at redhat.com
Tue Aug 22 16:11:27 UTC 2017
sd/source/core/stlsheet.cxx | 50 +++++++++++++++++---------------------------
1 file changed, 20 insertions(+), 30 deletions(-)
New commits:
commit ca089c7e204a6dec7fc3ee2c83fc0aefbafaecfa
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Tue Aug 22 18:08:48 2017 +0200
Use SfxItemSet ctor that checks WID range correctness at compile time
Change-Id: Iea0d6334181d63f5c3eaf87df395efc158ba825e
diff --git a/sd/source/core/stlsheet.cxx b/sd/source/core/stlsheet.cxx
index 6b26361b3549..8fdd6c2c82fd 100644
--- a/sd/source/core/stlsheet.cxx
+++ b/sd/source/core/stlsheet.cxx
@@ -213,21 +213,16 @@ SfxItemSet& SdStyleSheet::GetItemSet()
// we create the ItemSet 'on demand' if necessary
if (!pSet)
{
- sal_uInt16 const nWhichPairTable[] {
- XATTR_LINE_FIRST, XATTR_LINE_LAST,
- XATTR_FILL_FIRST, XATTR_FILL_LAST,
-
- SDRATTR_SHADOW_FIRST, SDRATTR_SHADOW_LAST,
- SDRATTR_TEXT_MINFRAMEHEIGHT, SDRATTR_TEXT_WORDWRAP,
-
- SDRATTR_EDGE_FIRST, SDRATTR_MEASURE_LAST,
-
- SDRATTR_3D_FIRST, SDRATTR_3D_LAST,
-
- EE_PARA_START, EE_CHAR_END,
- 0, 0 };
-
- pSet = new SfxItemSet(GetPool().GetPool(), nWhichPairTable);
+ pSet = new SfxItemSet(
+ GetPool().GetPool(),
+ svl::Items<
+ XATTR_LINE_FIRST, XATTR_LINE_LAST,
+ XATTR_FILL_FIRST, XATTR_FILL_LAST,
+ SDRATTR_SHADOW_FIRST, SDRATTR_SHADOW_LAST,
+ SDRATTR_TEXT_MINFRAMEHEIGHT, SDRATTR_TEXT_WORDWRAP,
+ SDRATTR_EDGE_FIRST, SDRATTR_MEASURE_LAST,
+ SDRATTR_3D_FIRST, SDRATTR_3D_LAST,
+ EE_PARA_START, EE_CHAR_END>{});
bMySet = true;
}
@@ -238,21 +233,16 @@ SfxItemSet& SdStyleSheet::GetItemSet()
{
if (!pSet)
{
- sal_uInt16 const nWhichPairTable[] {
- XATTR_LINE_FIRST, XATTR_LINE_LAST,
- XATTR_FILL_FIRST, XATTR_FILL_LAST,
-
- SDRATTR_SHADOW_FIRST, SDRATTR_SHADOW_LAST,
- SDRATTR_TEXT_MINFRAMEHEIGHT, SDRATTR_XMLATTRIBUTES,
- SDRATTR_TEXT_WORDWRAP, SDRATTR_TEXT_WORDWRAP,
-
- SDRATTR_TABLE_FIRST, SDRATTR_TABLE_LAST,
-
- EE_PARA_START, EE_CHAR_END,
-
- 0, 0 };
-
- pSet = new SfxItemSet(GetPool().GetPool(), nWhichPairTable);
+ pSet = new SfxItemSet(
+ GetPool().GetPool(),
+ svl::Items<
+ XATTR_LINE_FIRST, XATTR_LINE_LAST,
+ XATTR_FILL_FIRST, XATTR_FILL_LAST,
+ SDRATTR_SHADOW_FIRST, SDRATTR_SHADOW_LAST,
+ SDRATTR_TEXT_MINFRAMEHEIGHT, SDRATTR_XMLATTRIBUTES,
+ SDRATTR_TEXT_WORDWRAP, SDRATTR_TEXT_WORDWRAP,
+ SDRATTR_TABLE_FIRST, SDRATTR_TABLE_LAST,
+ EE_PARA_START, EE_CHAR_END>{});
bMySet = true;
}
More information about the Libreoffice-commits
mailing list