1*38d50f7bSAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*38d50f7bSAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*38d50f7bSAndrew Rist * or more contributor license agreements. See the NOTICE file 5*38d50f7bSAndrew Rist * distributed with this work for additional information 6*38d50f7bSAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*38d50f7bSAndrew Rist * to you under the Apache License, Version 2.0 (the 8*38d50f7bSAndrew Rist * "License"); you may not use this file except in compliance 9*38d50f7bSAndrew Rist * with the License. You may obtain a copy of the License at 10*38d50f7bSAndrew Rist * 11*38d50f7bSAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12*38d50f7bSAndrew Rist * 13*38d50f7bSAndrew Rist * Unless required by applicable law or agreed to in writing, 14*38d50f7bSAndrew Rist * software distributed under the License is distributed on an 15*38d50f7bSAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*38d50f7bSAndrew Rist * KIND, either express or implied. See the License for the 17*38d50f7bSAndrew Rist * specific language governing permissions and limitations 18*38d50f7bSAndrew Rist * under the License. 19*38d50f7bSAndrew Rist * 20*38d50f7bSAndrew Rist *************************************************************/ 21*38d50f7bSAndrew Rist 22*38d50f7bSAndrew Rist 23cdf0e10cSrcweir 24cdf0e10cSrcweir #ifndef SC_TABOPPARAMS_HXX 25cdf0e10cSrcweir #define SC_TABOPPARAMS_HXX 26cdf0e10cSrcweir 27cdf0e10cSrcweir #include "global.hxx" 28cdf0e10cSrcweir #include "address.hxx" 29cdf0e10cSrcweir 30cdf0e10cSrcweir #include <vector> 31cdf0e10cSrcweir 32cdf0e10cSrcweir class ScFormulaCell; 33cdf0e10cSrcweir 34cdf0e10cSrcweir struct ScInterpreterTableOpParams 35cdf0e10cSrcweir { 36cdf0e10cSrcweir ScAddress aOld1; 37cdf0e10cSrcweir ScAddress aNew1; 38cdf0e10cSrcweir ScAddress aOld2; 39cdf0e10cSrcweir ScAddress aNew2; 40cdf0e10cSrcweir ScAddress aFormulaPos; 41cdf0e10cSrcweir ::std::vector< ScFormulaCell* > aNotifiedFormulaCells; 42cdf0e10cSrcweir ::std::vector< ScAddress > aNotifiedFormulaPos; 43cdf0e10cSrcweir sal_Bool bValid; 44cdf0e10cSrcweir sal_Bool bRefresh; 45cdf0e10cSrcweir sal_Bool bCollectNotifications; 46cdf0e10cSrcweir ScInterpreterTableOpParamsScInterpreterTableOpParams47cdf0e10cSrcweir ScInterpreterTableOpParams() 48cdf0e10cSrcweir : bValid( sal_False ) 49cdf0e10cSrcweir , bRefresh( sal_False ) 50cdf0e10cSrcweir , bCollectNotifications( sal_True ) 51cdf0e10cSrcweir { 52cdf0e10cSrcweir } 53cdf0e10cSrcweir ScInterpreterTableOpParamsScInterpreterTableOpParams54cdf0e10cSrcweir ScInterpreterTableOpParams( const ScInterpreterTableOpParams& r ) 55cdf0e10cSrcweir : aOld1( r.aOld1 ) 56cdf0e10cSrcweir , aNew1( r.aNew1 ) 57cdf0e10cSrcweir , aOld2( r.aOld2 ) 58cdf0e10cSrcweir , aNew2( r.aNew2 ) 59cdf0e10cSrcweir , aFormulaPos( r.aFormulaPos ) 60cdf0e10cSrcweir //! never copied! , aNotifiedFormulaCells( r.aNotifiedFormulaCells ) 61cdf0e10cSrcweir , aNotifiedFormulaPos( r.aNotifiedFormulaPos ) 62cdf0e10cSrcweir , bValid( r.bValid ) 63cdf0e10cSrcweir , bRefresh( r.bRefresh ) 64cdf0e10cSrcweir , bCollectNotifications( r.bCollectNotifications ) 65cdf0e10cSrcweir { 66cdf0e10cSrcweir } 67cdf0e10cSrcweir operator =ScInterpreterTableOpParams68cdf0e10cSrcweir ScInterpreterTableOpParams& operator =( const ScInterpreterTableOpParams& r ) 69cdf0e10cSrcweir { 70cdf0e10cSrcweir aOld1 = r.aOld1; 71cdf0e10cSrcweir aNew1 = r.aNew1; 72cdf0e10cSrcweir aOld2 = r.aOld2; 73cdf0e10cSrcweir aNew2 = r.aNew2; 74cdf0e10cSrcweir aFormulaPos = r.aFormulaPos; 75cdf0e10cSrcweir //! never copied! aNotifiedFormulaCells = r.aNotifiedFormulaCells; 76cdf0e10cSrcweir //! instead, empty anything eventually present 77cdf0e10cSrcweir ::std::vector< ScFormulaCell* >().swap( aNotifiedFormulaCells ); 78cdf0e10cSrcweir aNotifiedFormulaPos = r.aNotifiedFormulaPos; 79cdf0e10cSrcweir bValid = r.bValid; 80cdf0e10cSrcweir bRefresh = r.bRefresh; 81cdf0e10cSrcweir bCollectNotifications = r.bCollectNotifications; 82cdf0e10cSrcweir return *this; 83cdf0e10cSrcweir } 84cdf0e10cSrcweir operator ==ScInterpreterTableOpParams85cdf0e10cSrcweir sal_Bool operator ==( const ScInterpreterTableOpParams& r ) 86cdf0e10cSrcweir { 87cdf0e10cSrcweir return 88cdf0e10cSrcweir bValid && r.bValid && 89cdf0e10cSrcweir aOld1 == r.aOld1 && 90cdf0e10cSrcweir aOld2 == r.aOld2 && 91cdf0e10cSrcweir aFormulaPos == r.aFormulaPos ; 92cdf0e10cSrcweir // aNotifiedFormula(Cells|Pos), aNew1, aNew2, bRefresh, 93cdf0e10cSrcweir // bCollectNotifications are not compared 94cdf0e10cSrcweir } 95cdf0e10cSrcweir }; 96cdf0e10cSrcweir 97cdf0e10cSrcweir DECLARE_LIST( ScTabOpList, ScInterpreterTableOpParams* ) 98cdf0e10cSrcweir 99cdf0e10cSrcweir #endif // SC_TABOPPARAMS_HXX 100cdf0e10cSrcweir 101