Stop leaking all ScPostIt instances.
[LibreOffice.git] / sc / source / core / inc / refupdat.hxx
blob099b1731390d7cbe400198ea8ae6e0be6d77ec4f
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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
23 #include "global.hxx"
25 class ScDocument;
26 class ScBigRange;
27 struct ScComplexRefData;
28 class ScAddress;
29 class ScRange;
31 enum ScRefUpdateRes {
32 UR_NOTHING = 0, // keine Anpassungen
33 UR_UPDATED = 1, // Anpassungen erfolgt
34 UR_INVALID = 2 // Referenz wurde ungueltig
37 class ScRefUpdate
39 public:
41 /// What type of reference is to be updated.
42 enum WhatType
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,
59 ScBigRange& rWhat );
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 );
75 #endif
77 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */