Update ooo320-m1
[ooovba.git] / sc / source / core / inc / refupdat.hxx
blobe0d2679c6566b32bd68d3532a7da54bfca9db6c5
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: refupdat.hxx,v $
10 * $Revision: 1.5.32.1 $
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_REFUPDAT_HXX
32 #define SC_REFUPDAT_HXX
34 #include "global.hxx"
36 class ScDocument;
37 class ScBigRange;
38 struct ScComplexRefData;
39 class ScAddress;
40 class ScRange;
42 enum ScRefUpdateRes {
43 UR_NOTHING = 0, // keine Anpassungen
44 UR_UPDATED = 1, // Anpassungen erfolgt
45 UR_INVALID = 2 // Referenz wurde ungueltig
48 class ScRefUpdate
50 public:
52 /// What type of reference is to be updated.
53 enum WhatType
55 ALL, /// all references
56 ABSOLUTE /// only absolute references
59 static ScRefUpdateRes Update
60 ( ScDocument* pDoc, UpdateRefMode eUpdateRefMode,
61 SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
62 SCCOL nCol2, SCROW nRow2, SCTAB nTab2,
63 SCsCOL nDx, SCsROW nDy, SCsTAB nDz,
64 SCCOL& theCol1, SCROW& theRow1, SCTAB& theTab1,
65 SCCOL& theCol2, SCROW& theRow2, SCTAB& theTab2 );
67 static ScRefUpdateRes Update( UpdateRefMode eUpdateRefMode,
68 const ScBigRange& rWhere,
69 INT32 nDx, INT32 nDy, INT32 nDz,
70 ScBigRange& rWhat );
72 /// Before calling, the absolute references must be up-to-date!
73 static ScRefUpdateRes Update( ScDocument* pDoc,
74 UpdateRefMode eUpdateRefMode,
75 const ScAddress& rPos, const ScRange& rRange,
76 SCsCOL nDx, SCsROW nDy, SCsTAB nDz,
77 ScComplexRefData& rRef, WhatType eWhat = ALL );
79 /// Before calling, the absolute references must be up-to-date!
80 static ScRefUpdateRes Move( ScDocument* pDoc, const ScAddress& rPos,
81 SCsCOL nDx, SCsROW nDy, SCsTAB nDz,
82 ScComplexRefData& rRef, BOOL bWrap, BOOL bAbsolute );
84 static void MoveRelWrap( ScDocument* pDoc, const ScAddress& rPos,
85 SCCOL nMaxCol, SCROW nMaxRow, ScComplexRefData& rRef );
87 /// Before calling, the absolute references must be up-to-date!
88 static ScRefUpdateRes UpdateTranspose( ScDocument* pDoc,
89 const ScRange& rSource, const ScAddress& rDest,
90 ScComplexRefData& rRef );
92 static void DoTranspose( SCsCOL& rCol, SCsROW& rRow, SCsTAB& rTab, ScDocument* pDoc,
93 const ScRange& rSource, const ScAddress& rDest );
95 /// Before calling, the absolute references must be up-to-date!
96 static ScRefUpdateRes UpdateGrow(
97 const ScRange& rArea, SCCOL nGrowX, SCROW nGrowY,
98 ScComplexRefData& rRef );
102 #endif