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: markdata.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_MARKDATA_HXX
32 #define SC_MARKDATA_HXX
43 //! Es muss auch die Moeglichkeit geben, MarkArrays pro Tabelle zu halten,
44 //! damit "alle suchen" ueber mehrere Tabellen wieder funktioniert!
50 ScRange aMarkRange
; // Bereich
51 ScRange aMultiRange
; // maximaler Bereich insgesamt
52 ScMarkArray
* pMultiSel
; // Mehrfachselektion
53 BOOL bTabMarked
[MAXTAB
+1]; // Tabelle selektiert
54 BOOL bMarked
; // Rechteck markiert
55 BOOL bMultiMarked
; // mehrfach markiert
57 BOOL bMarking
; // Bereich wird aufgezogen -> kein MarkToMulti
58 BOOL bMarkIsNeg
; // Aufheben bei Mehrfachselektion
62 ScMarkData(const ScMarkData
& rData
);
67 void SetMarkArea( const ScRange
& rRange
);
69 void SetMultiMarkArea( const ScRange
& rRange
, BOOL bMark
= TRUE
);
74 BOOL
IsMarked() const { return bMarked
; }
75 BOOL
IsMultiMarked() const { return bMultiMarked
; }
77 void GetMarkArea( ScRange
& rRange
) const;
78 void GetMultiMarkArea( ScRange
& rRange
) const;
81 void SelectTable( USHORT nTab
, BOOL bNew
) { bTabMarked
[nTab
] = bNew
; }
82 BOOL
GetTableSelect( USHORT nTab
) const { return bTabMarked
[nTab
]; }
84 void SelectOneTable( USHORT nTab
);
85 USHORT
GetSelectCount() const;
86 void SetMarkNegative( BOOL bFlag
) { bMarkIsNeg
= bFlag
; }
87 BOOL
IsMarkNegative() const { return bMarkIsNeg
; }
88 void SetMarking( BOOL bFlag
) { bMarking
= bFlag
; }
89 BOOL
GetMarkingFlag() const { return bMarking
; }
91 // fuer FillInfo / Document etc.
92 const ScMarkArray
* GetArray() const { return pMultiSel
; }
94 BOOL
IsCellMarked( USHORT nCol
, USHORT nRow
, BOOL bNoSimple
= FALSE
) const;
95 void FillRangeListWithMarks( ScRangeList
* pList
, BOOL bClear
) const;
97 void MarkFromRangeList( const ScRangeList
& rList
, BOOL bReset
);
100 BOOL
IsAllMarked( const ScRange
& rRange
) const; // Multi
102 BOOL
HasMultiMarks( USHORT nCol
) const;
103 BOOL
HasAnyMultiMarks() const;
108 } //namespace binfilter