1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 // We need an empty block in here. Otherwise, if the #ifndef INCLUDED_SVL_NRANGES_HXX
21 // line is the first line, the Mac OS X version of the gcc preprocessor will
22 // incorrectly optimize the inclusion process and will never include this file
26 #ifndef INCLUDED_SVL_NRANGES_HXX
27 #define INCLUDED_SVL_NRANGES_HXX
31 sal_uInt16
* _pRanges
; // 0-terminated array of sal_uInt16-pairs
34 SfxUShortRanges() : _pRanges( 0 ) {}
35 SfxUShortRanges( const SfxUShortRanges
&rOrig
);
36 SfxUShortRanges( sal_uInt16 nWhich1
, sal_uInt16 nWhich2
);
37 SfxUShortRanges( const sal_uInt16
* nNumTable
);
39 { delete [] _pRanges
; }
41 bool operator == ( const SfxUShortRanges
& ) const;
42 bool operator != ( const SfxUShortRanges
& rRanges
) const
43 { return !( *this == rRanges
); }
45 SfxUShortRanges
& operator = ( const SfxUShortRanges
& );
47 SfxUShortRanges
& operator += ( const SfxUShortRanges
& );
48 SfxUShortRanges
& operator -= ( const SfxUShortRanges
& );
49 SfxUShortRanges
& operator /= ( const SfxUShortRanges
& );
51 sal_uInt16
Count() const;
53 { return !_pRanges
|| 0 == *_pRanges
; }
55 operator const sal_uInt16
* () const
61 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */