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: detdata.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_DETDATA_HXX
32 #define SC_DETDATA_HXX
34 #ifndef _SVARRAY_HXX //autogen
35 #include <bf_svtools/svarray.hxx>
44 //------------------------------------------------------------------------
46 #define SC_DETOP_GROW 4
48 //------------------------------------------------------------------------
58 //------------------------------------------------------------------------
63 ScDetOpType eOperation
;
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
; }
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
97 ScDetOpList() : bHasAddError(FALSE
) {}
98 ScDetOpList(const ScDetOpList
& rList
);
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