Update ooo320-m1
[ooovba.git] / binfilter / inc / bf_sc / detdata.hxx
blob4e4557a496432b84f5b40178e997dcb053611bc2
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: detdata.hxx,v $
10 * $Revision: 1.7 $
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_DETDATA_HXX
32 #define SC_DETDATA_HXX
34 #ifndef _SVARRAY_HXX //autogen
35 #include <bf_svtools/svarray.hxx>
36 #endif
38 #ifndef SC_SCGLOB_HXX
39 #include "global.hxx"
40 #endif
41 namespace binfilter {
44 //------------------------------------------------------------------------
46 #define SC_DETOP_GROW 4
48 //------------------------------------------------------------------------
49 enum ScDetOpType
51 SCDETOP_ADDSUCC,
52 SCDETOP_DELSUCC,
53 SCDETOP_ADDPRED,
54 SCDETOP_DELPRED,
55 SCDETOP_ADDERROR
58 //------------------------------------------------------------------------
60 class ScDetOpData
62 ScAddress aPos;
63 ScDetOpType eOperation;
65 public:
66 ScDetOpData( const ScAddress& rP, ScDetOpType eOp ) :
67 aPos(rP), eOperation(eOp) {}
69 ScDetOpData( const ScDetOpData& rData ) :
70 aPos(rData.aPos), eOperation(rData.eOperation) {}
72 const ScAddress& GetPos() const { return aPos; }
73 ScDetOpType GetOperation() const { return eOperation; }
75 // fuer UpdateRef:
76 void SetPos(const ScAddress& rNew) { aPos=rNew; }
78 int operator== ( const ScDetOpData& r ) const
79 { return eOperation == r.eOperation && aPos == r.aPos; }
82 //------------------------------------------------------------------------
85 // Liste der Operationen
88 typedef ScDetOpData* ScDetOpDataPtr;
90 SV_DECL_PTRARR_DEL(ScDetOpArr_Impl, ScDetOpDataPtr, SC_DETOP_GROW, SC_DETOP_GROW)//STRIP008 ;
92 class ScDetOpList : public ScDetOpArr_Impl
94 BOOL bHasAddError; // updated in Append
96 public:
97 ScDetOpList() : bHasAddError(FALSE) {}
98 ScDetOpList(const ScDetOpList& rList);
99 ~ScDetOpList() {}
101 /*N*/ void UpdateReference( ScDocument* pDoc, UpdateRefMode eUpdateRefMode,
102 /*N*/ const ScRange& rRange, short nDx, short nDy, short nDz );
105 void Append( ScDetOpData* pData );
107 void Load( SvStream& rStream );
108 void Store( SvStream& rStream ) const;
110 BOOL HasAddError() const { return bHasAddError; }
115 } //namespace binfilter
116 #endif