1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: rangelst.hxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef SC_RANGELST_HXX
32 #define SC_RANGELST_HXX
41 typedef ScRange
* ScRangePtr
;
42 DECLARE_LIST( ScRangeListBase
, ScRangePtr
)
43 class ScRangeList
: public ScRangeListBase
, public SvRefBase
47 ScRangeList( const ScRangeList
& rList
);
48 virtual ~ScRangeList();
49 ScRangeList
& operator=(const ScRangeList
& rList
);
51 void Append( const ScRange
& rRange
)
53 ScRangePtr pR
= new ScRange( rRange
);
54 Insert( pR
, LIST_APPEND
);
56 USHORT
Parse( const String
&, ScDocument
* = NULL
,
57 USHORT nMask
= SCA_VALID
);
58 void Format( String
&, USHORT nFlags
= 0, ScDocument
* = NULL
) const;
59 void Join( const ScRange
&, BOOL bIsInList
= FALSE
);
60 BOOL
UpdateReference( UpdateRefMode
, ScDocument
*,
61 const ScRange
& rWhere
,
62 short nDx
, short nDy
, short nDz
);
63 /*N*/ BOOL
Load( SvStream
&, USHORT nVer
);
64 /*N*/ BOOL
Store( SvStream
& ) const;
66 SV_DECL_IMPL_REF( ScRangeList
);
69 // RangePairList: erster Range (aRange[0]) eigentlicher Range, zweiter
70 // Range (aRange[1]) Daten zu diesem Range, z.B. Rows eines ColName
71 DECLARE_LIST( ScRangePairListBase
, ScRangePair
* )
72 class ScRangePairList
: public ScRangePairListBase
, public SvRefBase
74 #if defined( ICC ) && defined( OS2 )
79 virtual ~ScRangePairList();
80 ScRangePairList
* Clone() const;
81 void Append( const ScRangePair
& rRangePair
)
83 ScRangePair
* pR
= new ScRangePair( rRangePair
);
84 Insert( pR
, LIST_APPEND
);
86 void Join( const ScRangePair
&, BOOL bIsInList
= FALSE
);
87 BOOL
UpdateReference( UpdateRefMode
, ScDocument
*,
88 const ScRange
& rWhere
,
89 short nDx
, short nDy
, short nDz
);
90 ScRangePair
* Find( const ScRange
& ) const;
91 /*N*/ BOOL
Load( SvStream
&, USHORT nVer
);
92 /*N*/ BOOL
Store( SvStream
& ) const;
94 SV_DECL_IMPL_REF( ScRangePairList
);
96 #if defined( ICC ) && defined( SC_RANGELST_CXX ) && defined( OS2 )
100 } //namespace binfilter