diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-07-19 10:02:08 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-07-21 10:43:11 +0200 |
commit | fc4bb1254ef77d29368535c9a810875c8db15b77 (patch) | |
tree | b1ebc10536f79914dd18466292b7c285d57f6572 /sfx2 | |
parent | ff11e4ff92036006851458cc5d935ff946618ae8 (diff) |
sfx2 lok: expose part number in SfxLokHelper::notifyOtherViews()
This way a client can decide if the view cursor it gets is relevant (the
views show the same part) or not.
Change-Id: I7b274b28f0c4f0509df5071831acf50512eff640
Reviewed-on: https://gerrit.libreoffice.org/27311
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
(cherry picked from commit 299b9377469473abd8f58ba7f1054794491bdc56)
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/view/lokhelper.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/view/viewsh.cxx | 5 |
2 files changed, 7 insertions, 0 deletions
diff --git a/sfx2/source/view/lokhelper.cxx b/sfx2/source/view/lokhelper.cxx index d027bad47f15..09d78cf8601d 100644 --- a/sfx2/source/view/lokhelper.cxx +++ b/sfx2/source/view/lokhelper.cxx @@ -108,6 +108,8 @@ void SfxLokHelper::notifyOtherViews(SfxViewShell* pThisView, int nType, const OS boost::property_tree::ptree aTree; aTree.put("viewId", SfxLokHelper::getView(pThisView)); aTree.put(rKey.getStr(), rPayload.getStr()); + aTree.put("part", pThisView->getPart()); + aTree.put(rKey.getStr(), rPayload.getStr()); std::stringstream aStream; boost::property_tree::write_json(aStream, aTree); OString aPayload = aStream.str().c_str(); diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx index a68e8c0ef330..92d3f1a5a7f8 100644 --- a/sfx2/source/view/viewsh.cxx +++ b/sfx2/source/view/viewsh.cxx @@ -1643,6 +1643,11 @@ bool SfxViewShell::isTiledSearching() const return pImp->m_bTiledSearching; } +int SfxViewShell::getPart() const +{ + return 0; +} + bool SfxViewShell::KeyInput( const KeyEvent &rKeyEvent ) /* [Description] |