Version 4.3.0.0.beta1, tag libreoffice-4.3.0.0.beta1
[LibreOffice.git] / sc / inc / refhint.hxx
blob1f927312327bfb346727c48eb9664476e1288cea
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/.
8 */
10 #ifndef INCLUDED_SC_INC_REFHINT_HXX
11 #define INCLUDED_SC_INC_REFHINT_HXX
13 #include "address.hxx"
14 #include "simplehintids.hxx"
16 namespace sc {
18 class RefHint : public SfxSimpleHint
20 public:
21 enum Type { Moved, ColumnReordered };
23 private:
24 Type meType;
26 RefHint(); // disabled
28 protected:
29 RefHint( Type eType );
31 public:
32 virtual ~RefHint() = 0;
34 Type getType() const;
37 class RefMovedHint : public RefHint
39 ScRange maRange;
40 ScAddress maMoveDelta;
42 public:
44 RefMovedHint( const ScRange& rRange, const ScAddress& rMove );
45 virtual ~RefMovedHint();
47 /**
48 * Get the source range from which the references have moved.
50 const ScRange& getRange() const;
52 /**
53 * Get the movement vector.
55 const ScAddress& getDelta() const;
58 class RefColReorderHint : public RefHint
60 const sc::ColReorderMapType& mrColMap;
61 SCTAB mnTab;
62 SCROW mnRow1;
63 SCROW mnRow2;
65 public:
66 RefColReorderHint( const sc::ColReorderMapType& rColMap, SCTAB nTab, SCROW nRow1, SCROW nRow2 );
67 virtual ~RefColReorderHint();
69 const sc::ColReorderMapType& getColMap() const;
71 SCTAB getTab() const;
72 SCROW getStartRow() const;
73 SCROW getEndRow() const;
78 #endif
80 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */