diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-08-01 13:59:52 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-08-01 15:51:58 +0200 |
commit | 64d1b9673260b70e241fa1775a5116be74469b71 (patch) | |
tree | 702941ccc8116b683bfa823ac3bcd9b794debd08 /desktop | |
parent | 19fed74483ea32c10d740a4113a6ee8c96f77930 (diff) |
remove unnecessary code in doc_registerCallback
after
commit 98c0cefb18d8af7aa4732708ba0ae6be2e808d6f
Date: Wed Jul 31 12:40:29 2019 +0200
desktop: fix UB in DesktopLOKTest::testCommentsCallbacksWriter()
Change-Id: I254d8413e707d4525efbfb2050e5b29f70c4bed7
Reviewed-on: https://gerrit.libreoffice.org/76796
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/source/lib/init.cxx | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 89e93d1723a1..2ecf065de95d 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -2828,22 +2828,6 @@ static void doc_registerCallback(LibreOfficeKitDocument* pThis, LibLODocument_Impl* pDocument = static_cast<LibLODocument_Impl*>(pThis); - // This is used by unit-tests to unregister stack-local callback objects where we have multiple views - // so we cannot rely on SfxLokHelper::getView - if (pCallback == nullptr && pData != nullptr) - { - for (auto& pair1 : pDocument->mpCallbackFlushHandlers) - { - int nView = pair1.first; - for (auto& pair2 : pDocument->mpCallbackFlushHandlers) - { - pair2.second->removeViewStates(nView); - } - pDocument->mpCallbackFlushHandlers[nView].reset(new CallbackFlushHandler(pThis, nullptr, nullptr)); - } - return; - } - int nView = SfxLokHelper::getView(); if (nView < 0) return; |