1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef SC_REFUPDAT_HXX
21 #define SC_REFUPDAT_HXX
27 struct ScComplexRefData
;
32 UR_NOTHING
= 0, // keine Anpassungen
33 UR_UPDATED
= 1, // Anpassungen erfolgt
34 UR_INVALID
= 2 // Referenz wurde ungueltig
41 /// What type of reference is to be updated.
44 ALL
, /// all references
45 ABSOLUTE
/// only absolute references
48 static ScRefUpdateRes Update
49 ( ScDocument
* pDoc
, UpdateRefMode eUpdateRefMode
,
50 SCCOL nCol1
, SCROW nRow1
, SCTAB nTab1
,
51 SCCOL nCol2
, SCROW nRow2
, SCTAB nTab2
,
52 SCsCOL nDx
, SCsROW nDy
, SCsTAB nDz
,
53 SCCOL
& theCol1
, SCROW
& theRow1
, SCTAB
& theTab1
,
54 SCCOL
& theCol2
, SCROW
& theRow2
, SCTAB
& theTab2
);
56 static ScRefUpdateRes
Update( UpdateRefMode eUpdateRefMode
,
57 const ScBigRange
& rWhere
,
58 sal_Int32 nDx
, sal_Int32 nDy
, sal_Int32 nDz
,
61 static void MoveRelWrap( ScDocument
* pDoc
, const ScAddress
& rPos
,
62 SCCOL nMaxCol
, SCROW nMaxRow
, ScComplexRefData
& rRef
);
64 static ScRefUpdateRes
UpdateTranspose(
65 ScDocument
* pDoc
, const ScRange
& rSource
, const ScAddress
& rDest
, ScRange
& rRef
);
67 static void DoTranspose( SCsCOL
& rCol
, SCsROW
& rRow
, SCsTAB
& rTab
, ScDocument
* pDoc
,
68 const ScRange
& rSource
, const ScAddress
& rDest
);
70 static ScRefUpdateRes
UpdateGrow(
71 const ScRange
& rArea
, SCCOL nGrowX
, SCROW nGrowY
, ScRange
& rRef
);
77 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */