diff options
author | Kohei Yoshida <kohei.yoshida@gmail.com> | 2013-05-13 16:13:46 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@gmail.com> | 2013-05-20 20:13:05 -0400 |
commit | 410154e76c229a862b43a9eee6ffc44b845f6ffd (patch) | |
tree | 4388480966555309163b17d51d5d0a4c743d68eb /sc/inc/listenercontext.hxx | |
parent | 180c2fe7432f444fcf8f933c413c63c56dd5c27a (diff) |
Collect all empty broadcasters and remove them in one go later.
This is to avoid repeated calls to set_empty() on the broadcaster array
which causes array reallocation on each call. Instead, we can store the
segments of broadcasters to be deleted later, and call set_empty() on
those segments to reduce the number of calls to set_empty().
The meat of this is not implemented yet, as EndListeningContext is still
empty.
Change-Id: I914bc2881acee3902c4fec0f6c21aaf4d2489df8
Diffstat (limited to 'sc/inc/listenercontext.hxx')
-rw-r--r-- | sc/inc/listenercontext.hxx | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/sc/inc/listenercontext.hxx b/sc/inc/listenercontext.hxx new file mode 100644 index 000000000000..584671342444 --- /dev/null +++ b/sc/inc/listenercontext.hxx @@ -0,0 +1,34 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#ifndef SC_LISTENERCONTEXT_HXX +#define SC_LISTENERCONTEXT_HXX + +#include "address.hxx" + +class ScDocument; + +namespace sc { + +class EndListeningContext +{ + ScDocument& mrDoc; +public: + EndListeningContext(ScDocument& rDoc); + ScDocument& getDoc(); + + void addEmptyBroadcasterPosition(SCCOL nCol, SCROW nRow, SCTAB nTab); + void purgeEmptyBroadcasters(); +}; + +} + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |