Stop leaking all ScPostIt instances.
[LibreOffice.git] / sc / inc / listenercontext.hxx
blob1e7d067f6f9f526b21f9ac0927bdf53767cbc430
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 SC_LISTENERCONTEXT_HXX
11 #define SC_LISTENERCONTEXT_HXX
13 #include "address.hxx"
14 #include "columnspanset.hxx"
16 #include <boost/noncopyable.hpp>
17 #include <boost/scoped_ptr.hpp>
19 class ScDocument;
21 namespace sc {
23 struct ColumnBlockPosition;
24 class ColumnBlockPositionSet;
26 class StartListeningContext : boost::noncopyable
28 ScDocument& mrDoc;
29 boost::scoped_ptr<ColumnBlockPositionSet> mpSet;
30 public:
31 StartListeningContext(ScDocument& rDoc);
32 ScDocument& getDoc();
34 ColumnBlockPosition* getBlockPosition(SCTAB nTab, SCCOL nCol);
37 class EndListeningContext : boost::noncopyable
39 ScDocument& mrDoc;
40 ColumnSpanSet maSet;
41 boost::scoped_ptr<ColumnBlockPositionSet> mpPosSet;
42 public:
43 EndListeningContext(ScDocument& rDoc);
44 ScDocument& getDoc();
46 ColumnBlockPosition* getBlockPosition(SCTAB nTab, SCCOL nCol);
48 void addEmptyBroadcasterPosition(SCTAB nTab, SCCOL nCol, SCROW nRow);
49 void purgeEmptyBroadcasters();
54 #endif
56 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */