From c8e49e7a49a99fd76a25ea825319d2243fed5c22 Mon Sep 17 00:00:00 2001 From: Pranam Lashkari Date: Thu, 19 Jan 2023 15:57:26 +0530 Subject: sw: send LOK call back on bookmark deletion this helps with zotero when user deletes a bookmark or use undo without this online will be unaware of any such changes made by user Signed-off-by: Pranam Lashkari Change-Id: Id5ea4ee0ee1d16c399460cd177ec8e33256ce3dd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145777 Tested-by: Jenkins CollaboraOffice Reviewed-by: Miklos Vajna (cherry picked from commit ea112b6d85a6914e1df40e064cd5df6d46248d68) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146022 Tested-by: Jenkins --- sw/source/core/doc/docbm.cxx | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'sw/source/core/doc/docbm.cxx') diff --git a/sw/source/core/doc/docbm.cxx b/sw/source/core/doc/docbm.cxx index cd6afc472350..e074d104b905 100644 --- a/sw/source/core/doc/docbm.cxx +++ b/sw/source/core/doc/docbm.cxx @@ -1262,6 +1262,24 @@ namespace sw::mark switch(IDocumentMarkAccess::GetType(*pMark)) { case IDocumentMarkAccess::MarkType::BOOKMARK: + { + auto const ppBookmark = lcl_FindMark(m_vBookmarks, *ppMark.get()); + if ( ppBookmark != m_vBookmarks.end() ) + { + Bookmark* pBookmark = dynamic_cast(*ppBookmark); + + if(pBookmark) + pBookmark->sendLOKDeleteCallback(); + + m_vBookmarks.erase(ppBookmark); + } + else + { + assert(false && + " - Bookmark not found in Bookmark container."); + } + } + break; case IDocumentMarkAccess::MarkType::CROSSREF_HEADING_BOOKMARK: case IDocumentMarkAccess::MarkType::CROSSREF_NUMITEM_BOOKMARK: { -- cgit n value='distro/collabora/cp-6.2'>distro/collabora/cp-6.2 LibreOffice 界面翻译代码仓库文档基金会
aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Lohmaier <lohmaier+LibreOffice@googlemail.com>2015-05-19 22:09:03 +0200
committerChristian Lohmaier <lohmaier+LibreOffice@googlemail.com>2015-05-19 23:09:38 +0200
commitf7efc4ecf69cba536cd0391d4673e31226b1fe86 (patch)
treef4ccf2ceee59e7cbb7ab866471e3225989cb9ae6
parent625f07e0dc9a40453c54c4dc8ebfbc6062f54f86 (diff)
update translations for 5.0.0 beta1 libreoffice-5-0-branch-point
and force-fix errors using pocheck Change-Id: I295e6d2e6b47a06165cdf8900e2775b7157af809