summaryrefslogtreecommitdiffstats
path: root/desktop/inc
diff options
context:
space:
mode:
authorMarco Cecchetti <marco.cecchetti@collabora.com>2016-09-07 15:56:09 +0200
committerMarco Cecchetti <mrcekets@gmail.com>2016-09-10 18:08:01 +0000
commit785a7e58c4029dc36b624ef709e790f2fdaddee8 (patch)
tree2667e1dbdcef01a4edfaa30c80b1291db5ae8a60 /desktop/inc
parentupdate MONTHS test case (diff)
downloadcore-785a7e58c4029dc36b624ef709e790f2fdaddee8.tar.gz
core-785a7e58c4029dc36b624ef709e790f2fdaddee8.zip
LOK: tidy up `CallbackFlushHandler::queue`, improved cell view cursor
Rewritten the switch statement in `CallbackFlushHandler::queue`: - Now, the new callback data is emplaced after removing all states overridden by the new one. - View callbacks are checked not only for the same type but even for the same view id: that allowed to fix the following issue: starting from the 3rd view for a spreadsheet it could occur that only the cell cursor of the previous last view was displayed in the new view. Change-Id: I2b63526deb4dca39e3a1f430443ebc5d0f61938d Reviewed-on: https://gerrit.libreoffice.org/28782 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Marco Cecchetti <mrcekets@gmail.com>
Diffstat (limited to 'desktop/inc')
-rw-r--r--desktop/inc/lib/init.hxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/desktop/inc/lib/init.hxx b/desktop/inc/lib/init.hxx
index da03cfaf8843..0d019975a090 100644
--- a/desktop/inc/lib/init.hxx
+++ b/desktop/inc/lib/init.hxx
@@ -46,11 +46,13 @@ namespace desktop {
void setPartTilePainting(const bool bPartPainting) { m_bPartTilePainting = bPartPainting; }
bool isPartTilePainting() const { return m_bPartTilePainting; }
+ typedef std::vector<std::pair<int, std::string>> queue_type;
+
private:
void flush();
- void removeAllButLast(const int type, const bool identical);
+ void removeAll(const std::function<bool (const queue_type::value_type&)>& rTestFunc);
- std::vector<std::pair<int, std::string>> m_queue;
+ queue_type m_queue;
std::map<int, std::string> m_states;
LibreOfficeKitDocument* m_pDocument;
LibreOfficeKitCallback m_pCallback;