diff options
author | Ashod Nakashian <ashod.nakashian@collabora.co.uk> | 2018-08-09 23:14:34 -0400 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-07-29 21:21:44 +0200 |
commit | d2bb93e299f42e2ab4ea8940fb4dc5da01a386b6 (patch) | |
tree | b8062a3165f856e22250e8f729011fd102b3dd93 /desktop/source/lib/lokinteractionhandler.cxx | |
parent | ca6574af948f473691d331f0f2ccf17907465c9e (diff) |
sfx2: Re-enable the sidebars for LOK
This re-enables the sidebars for LOK, which were
disabled to avoid overheads.
Also, fixes a regression where editing stopped
when loading a new view because the sidebar window
creation killed the edit view.
Revert "Avoid various desktop GUI elements when used from LibreOfficeKit"
This reverts commit c0b70ec34d5e056bb92a66cbf83838923cb41fee.
Also (added by Noel to the above commit)
(1) Comment out parts DesktopLOKTest::testPaintPartTile test that
trigger a crash. We are installing a callback that points to something
on the stack, and then not removing that callback, resulting in calls
to random stack memory. There is a further problem in the LOK code in
that we cannot uninstall a callback when we have multiple views
because the uninstall code in doc_registerCallback can only remove a
callback for the __current__ view, which I do not fix here.
(2) prevent code from accidentally creating empty entries in the
mpCallbackFlushHandlers map, which is what happens when you use
the index operator on map, which results in a crash in
doc_registerCallback because the std::shared_ptr is empty.
(3) In SdTiledRenderingTest, only turn off LOK via
LibreOfficeKit::setActive(false) once the document has been torn down.
Otherwise, we don't remove entries from the statically allocated
s_pLOKWindowsMap map in vcl/source/window/window.cxx, which
means that at process exit, we have dangling Window objects.
Reviewed-on: https://gerrit.libreoffice.org/71165
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
(cherry picked from commit 88565c3662c6fde240c98a9b4f2ce6dfbcf4094e)
Change-Id: I06b06a990f05c06b1889fa89b698dff6f494e09c
Reviewed-on: https://gerrit.libreoffice.org/76466
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'desktop/source/lib/lokinteractionhandler.cxx')
-rw-r--r-- | desktop/source/lib/lokinteractionhandler.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/desktop/source/lib/lokinteractionhandler.cxx b/desktop/source/lib/lokinteractionhandler.cxx index 4b566d106d01..f15ef67e0052 100644 --- a/desktop/source/lib/lokinteractionhandler.cxx +++ b/desktop/source/lib/lokinteractionhandler.cxx @@ -118,7 +118,7 @@ void LOKInteractionHandler::postError(css::task::InteractionClassification class boost::property_tree::write_json(aStream, aTree); std::size_t nView = SfxViewShell::Current() ? SfxLokHelper::getView() : 0; - if (m_pLOKDocument && m_pLOKDocument->mpCallbackFlushHandlers.size() > nView && m_pLOKDocument->mpCallbackFlushHandlers[nView]) + if (m_pLOKDocument && m_pLOKDocument->mpCallbackFlushHandlers.count(nView)) m_pLOKDocument->mpCallbackFlushHandlers[nView]->queue(LOK_CALLBACK_ERROR, aStream.str().c_str()); else if (m_pLOKit->mpCallback) m_pLOKit->mpCallback(LOK_CALLBACK_ERROR, aStream.str().c_str(), m_pLOKit->mpCallbackData); |