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 INCLUDED_SC_SOURCE_CORE_INC_REFUPDAT_HXX
21 #define INCLUDED_SC_SOURCE_CORE_INC_REFUPDAT_HXX
27 struct ScComplexRefData
;
32 UR_NOTHING
= 0, // keine Anpassungen
33 UR_UPDATED
= 1, // Anpassungen erfolgt
34 UR_INVALID
= 2, // Referenz wurde ungueltig
35 UR_STICKY
= 3 /**< Not updated because the reference is sticky,
36 but would had been updated if it wasn't. For
37 entire columns/rows. Essentially the same as
38 not UR_NOTHING for the caller but allows
46 /// What type of reference is to be updated.
49 ALL
, /// all references
50 ABSOLUTE
/// only absolute references
53 static ScRefUpdateRes Update
54 ( ScDocument
* pDoc
, UpdateRefMode eUpdateRefMode
,
55 SCCOL nCol1
, SCROW nRow1
, SCTAB nTab1
,
56 SCCOL nCol2
, SCROW nRow2
, SCTAB nTab2
,
57 SCsCOL nDx
, SCsROW nDy
, SCsTAB nDz
,
58 SCCOL
& theCol1
, SCROW
& theRow1
, SCTAB
& theTab1
,
59 SCCOL
& theCol2
, SCROW
& theRow2
, SCTAB
& theTab2
);
61 static ScRefUpdateRes
Update( UpdateRefMode eUpdateRefMode
,
62 const ScBigRange
& rWhere
,
63 sal_Int32 nDx
, sal_Int32 nDy
, sal_Int32 nDz
,
66 static void MoveRelWrap( ScDocument
* pDoc
, const ScAddress
& rPos
,
67 SCCOL nMaxCol
, SCROW nMaxRow
, ScComplexRefData
& rRef
);
69 static ScRefUpdateRes
UpdateTranspose(
70 ScDocument
* pDoc
, const ScRange
& rSource
, const ScAddress
& rDest
, ScRange
& rRef
);
72 static void DoTranspose( SCsCOL
& rCol
, SCsROW
& rRow
, SCsTAB
& rTab
, ScDocument
* pDoc
,
73 const ScRange
& rSource
, const ScAddress
& rDest
);
75 static ScRefUpdateRes
UpdateGrow(
76 const ScRange
& rArea
, SCCOL nGrowX
, SCROW nGrowY
, ScRange
& rRef
);
81 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */