sc/source/core/data/docpool.cxx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
New commits: commit d59395617411f3dcccbcec29f0fe74985d6cf2ad Author: Stephan Bergmann <sberg...@redhat.com> Date: Wed Apr 16 16:28:33 2014 +0200 SfxItemPool(..., ATTR_STARTINDEX, ATTR_ENDINDEX, aItemInfos, ...) off by one ...since d9ef61fb546af443736057557552e3a95c569c11 "API CHANGE: roll back the XStyle changes to add a new Hidden property on Style" bumped ATTR_ENDINDEX for ATTR_HIDDEN but didn't adapt aItemInfos, and mstahl suggests its better to adapt aItemInfos than to use ATTR_ENDINDEX-1 in the SfxItemPool ctor call. Change-Id: Iafdf595091ac300793bad1bcd87d58abba4fda6d diff --git a/sc/source/core/data/docpool.cxx b/sc/source/core/data/docpool.cxx index 880f02d..7027e56b 100644 --- a/sc/source/core/data/docpool.cxx +++ b/sc/source/core/data/docpool.cxx @@ -19,6 +19,8 @@ #include "scitems.hxx" + +#include <boost/static_assert.hpp> #include <comphelper/string.hxx> #include <i18nutil/unicode.hxx> #include <tools/shl.hxx> @@ -182,8 +184,11 @@ static SfxItemInfo const aItemInfos[] = { SID_ATTR_PAGE_FOOTERSET, SFX_ITEM_POOLABLE }, // ATTR_PAGE_FOOTERSET { SID_SCATTR_PAGE_FORMULAS, SFX_ITEM_POOLABLE }, // ATTR_PAGE_FORMULAS { SID_SCATTR_PAGE_NULLVALS, SFX_ITEM_POOLABLE }, // ATTR_PAGE_NULLVALS - { SID_SCATTR_PAGE_SCALETO, SFX_ITEM_POOLABLE } // ATTR_PAGE_SCALETO + { SID_SCATTR_PAGE_SCALETO, SFX_ITEM_POOLABLE }, // ATTR_PAGE_SCALETO + { 0, SFX_ITEM_POOLABLE } // ATTR_HIDDEN }; +BOOST_STATIC_ASSERT( + SAL_N_ELEMENTS(aItemInfos) == ATTR_ENDINDEX - ATTR_STARTINDEX + 1); ScDocumentPool::ScDocumentPool( SfxItemPool* pSecPool) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits