Kaydet (Commit) 20f2a6b3 authored tarafından Jochen Nitschke's avatar Jochen Nitschke Kaydeden (comit) Noel Grandin

untangle .cxx include in itemset.cxx

Change-Id: I0102ad82d82c8f0e9f8939512bae83424613c54e
Reviewed-on: https://gerrit.libreoffice.org/30281Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst e5c1e15e
......@@ -16,16 +16,12 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#ifdef MACOSX
// We need an empty block in here. Otherwise, if the #ifndef INCLUDED_SVL_NRANGES_HXX
// line is the first line, the Mac OS X version of the gcc preprocessor will
// incorrectly optimize the inclusion process and will never include this file
// a second time
#endif
#ifndef INCLUDED_SVL_NRANGES_HXX
#define INCLUDED_SVL_NRANGES_HXX
#include <cstdarg>
#include <sal/types.h>
class SfxUShortRanges
{
sal_uInt16* _pRanges; // 0-terminated array of sal_uInt16-pairs
......@@ -48,6 +44,30 @@ public:
{ return _pRanges; }
};
/**
* Creates a sal_uInt16-ranges-array in 'rpRanges' using 'nWh1' and 'nWh2' as
* first range, 'nNull' as terminator or start of 2nd range and 'pArgs' as
* remainder.
*
* It returns the number of sal_uInt16s which are contained in the described
* set of sal_uInt16s.
*/
sal_uInt16 InitializeRanges_Impl( sal_uInt16 *&rpRanges, va_list pArgs,
sal_uInt16 nWh1, sal_uInt16 nWh2, sal_uInt16 nNull );
/**
* Determines the number of sal_uInt16s in a 0-terminated array of pairs of
* sal_uInt16s.
* The terminating 0 is not included in the count.
*/
sal_uInt16 Count_Impl( const sal_uInt16 *pRanges );
/**
* Determines the total number of sal_uInt16s described in a 0-terminated
* array of pairs of sal_uInt16s, each representing an range of sal_uInt16s.
*/
sal_uInt16 Capacity_Impl( const sal_uInt16 *pRanges );
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -91,6 +91,7 @@ $(eval $(call gb_Library_add_exception_objects,svl,\
svl/source/items/itemset \
svl/source/items/lckbitem \
svl/source/items/macitem \
svl/source/items/nranges \
svl/source/items/poolcach \
svl/source/items/poolio \
svl/source/items/poolitem \
......
......@@ -36,10 +36,10 @@
#include <tools/solar.h>
#include <rtl/string.hxx>
static const sal_uInt16 nInitCount = 10; // Single USHORTs => 5 pairs without '0'
#include "nranges.cxx"
#include "poolio.hxx"
static const sal_uInt16 nInitCount = 10; // Single USHORTs => 5 pairs without '0'
/**
* Ctor for a SfxItemSet with exactly the Which Ranges, which are known to
* the supplied SfxItemPool.
......
......@@ -16,13 +16,14 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include <svl/nranges.hxx>
#include <cassert>
#include <cstring>
#include <vector>
// compiled via include from itemset.cxx only!
#include <memory>
#include <osl/diagnose.h>
#include <tools/debug.hxx>
#ifdef DBG_UTIL
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment