LibreOffice Module sc (master)  1
grouparealistener.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
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  */
9 
10 #ifndef INCLUDED_SC_GROUPAREALISTENER_HXX
11 #define INCLUDED_SC_GROUPAREALISTENER_HXX
12 
13 #include "address.hxx"
14 
15 #include <svl/listener.hxx>
16 
17 #include <vector>
18 
19 class ScFormulaCell;
20 class ScDocument;
21 class ScColumn;
22 
23 namespace sc {
24 
25 class BulkDataHint;
26 
28 {
35  bool mbEndFixed;
36 
37 public:
38 
39  FormulaGroupAreaListener() = delete;
40  FormulaGroupAreaListener( const ScRange& rRange, const ScDocument& rDocument,
41  const ScAddress& rTopCellPos, SCROW nGroupLen, bool bStartFixed, bool bEndFixed );
42 
43  virtual ~FormulaGroupAreaListener() override;
44 
45  ScRange getListeningRange() const;
46 
47  virtual void Notify( const SfxHint& rHint ) override;
48  virtual void Query( QueryBase& rQuery ) const override;
49 
61  void collectFormulaCells( SCTAB nTab, SCCOL nCol, SCROW nRow1, SCROW nRow2, std::vector<ScFormulaCell*>& rCells ) const;
62  void collectFormulaCells( SCROW nRow1, SCROW nRow2, std::vector<ScFormulaCell*>& rCells ) const;
63 
64 private:
65  void notifyCellChange( const SfxHint& rHint, const ScAddress& rPos );
66  void notifyBulkChange( const BulkDataHint& rHint );
67  const ScFormulaCell* getTopCell() const;
68 };
69 
70 }
71 
72 #endif
73 
74 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
const ScFormulaCell * getTopCell() const
virtual void Notify(const SfxHint &rHint) override
virtual void Query(QueryBase &rQuery) const override
sal_Int16 SCCOL
Definition: types.hxx:22
void notifyBulkChange(const BulkDataHint &rHint)
sal_Int32 SCROW
Definition: types.hxx:18
void collectFormulaCells(SCTAB nTab, SCCOL nCol, SCROW nRow1, SCROW nRow2, std::vector< ScFormulaCell * > &rCells) const
Given the row span of changed cells within a single column, collect all formula cells that need to be...
virtual ~FormulaGroupAreaListener() override
void notifyCellChange(const SfxHint &rHint, const ScAddress &rPos)
sal_Int16 SCTAB
Definition: types.hxx:23