sync master with lastest vba changes
[ooovba.git] / sc / inc / tabopparams.hxx
blob3063813ce811d6331a52cc404fbdf523b68feae0
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: tabopparams.hxx,v $
10 * $Revision: 1.8 $
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_TABOPPARAMS_HXX
32 #define SC_TABOPPARAMS_HXX
34 #include "global.hxx"
35 #include "address.hxx"
37 #include <vector>
39 class ScFormulaCell;
41 struct ScInterpreterTableOpParams
43 ScAddress aOld1;
44 ScAddress aNew1;
45 ScAddress aOld2;
46 ScAddress aNew2;
47 ScAddress aFormulaPos;
48 ::std::vector< ScFormulaCell* > aNotifiedFormulaCells;
49 ::std::vector< ScAddress > aNotifiedFormulaPos;
50 BOOL bValid;
51 BOOL bRefresh;
52 BOOL bCollectNotifications;
54 ScInterpreterTableOpParams()
55 : bValid( FALSE )
56 , bRefresh( FALSE )
57 , bCollectNotifications( TRUE )
61 ScInterpreterTableOpParams( const ScInterpreterTableOpParams& r )
62 : aOld1( r.aOld1 )
63 , aNew1( r.aNew1 )
64 , aOld2( r.aOld2 )
65 , aNew2( r.aNew2 )
66 , aFormulaPos( r.aFormulaPos )
67 //! never copied! , aNotifiedFormulaCells( r.aNotifiedFormulaCells )
68 , aNotifiedFormulaPos( r.aNotifiedFormulaPos )
69 , bValid( r.bValid )
70 , bRefresh( r.bRefresh )
71 , bCollectNotifications( r.bCollectNotifications )
75 ScInterpreterTableOpParams& operator =( const ScInterpreterTableOpParams& r )
77 aOld1 = r.aOld1;
78 aNew1 = r.aNew1;
79 aOld2 = r.aOld2;
80 aNew2 = r.aNew2;
81 aFormulaPos = r.aFormulaPos;
82 //! never copied! aNotifiedFormulaCells = r.aNotifiedFormulaCells;
83 //! instead, empty anything eventually present
84 ::std::vector< ScFormulaCell* >().swap( aNotifiedFormulaCells );
85 aNotifiedFormulaPos = r.aNotifiedFormulaPos;
86 bValid = r.bValid;
87 bRefresh = r.bRefresh;
88 bCollectNotifications = r.bCollectNotifications;
89 return *this;
92 sal_Bool operator ==( const ScInterpreterTableOpParams& r )
94 return
95 bValid && r.bValid &&
96 aOld1 == r.aOld1 &&
97 aOld2 == r.aOld2 &&
98 aFormulaPos == r.aFormulaPos ;
99 // aNotifiedFormula(Cells|Pos), aNew1, aNew2, bRefresh,
100 // bCollectNotifications are not compared
104 DECLARE_LIST( ScTabOpList, ScInterpreterTableOpParams* )
106 #endif // SC_TABOPPARAMS_HXX