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 _SFXNRANGES_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 _SFXNRANGES_HXX
27 #define _SFXNRANGES_HXX
29 #include <tools/solar.h>
31 //========================================================================
35 sal_uInt16
* _pRanges
; // 0-terminated array of sal_uInt16-pairs
38 SfxUShortRanges() : _pRanges( 0 ) {}
39 SfxUShortRanges( const SfxUShortRanges
&rOrig
);
40 SfxUShortRanges( sal_uInt16 nWhich1
, sal_uInt16 nWhich2
);
41 SfxUShortRanges( const sal_uInt16
* nNumTable
);
43 { delete [] _pRanges
; }
45 bool operator == ( const SfxUShortRanges
& ) const;
46 bool operator != ( const SfxUShortRanges
& rRanges
) const
47 { return !( *this == rRanges
); }
49 SfxUShortRanges
& operator = ( const SfxUShortRanges
& );
51 SfxUShortRanges
& operator += ( const SfxUShortRanges
& );
52 SfxUShortRanges
& operator -= ( const SfxUShortRanges
& );
53 SfxUShortRanges
& operator /= ( const SfxUShortRanges
& );
55 sal_uInt16
Count() const;
57 { return !_pRanges
|| 0 == *_pRanges
; }
59 operator const sal_uInt16
* () const
65 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */