sw/source/core/doc/docbm.cxx | 26 -------------------------- 1 file changed, 26 deletions(-)
New commits: commit db4b012f2efa2244e5bfb570c5601b5e4cd9a00a Author: Mike Kaganski <[email protected]> AuthorDate: Tue Oct 28 11:54:59 2025 +0500 Commit: Mike Kaganski <[email protected]> CommitDate: Tue Oct 28 12:10:42 2025 +0100 Drop a template specialization, it should not fail dynamic casts The specialization only differed by not using IsCrossRefBookmark; and the latter uses typeid. Change-Id: I75c032e6b2be3064a530ff0ac14770b9d77ee849 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193070 Tested-by: Jenkins Reviewed-by: Mike Kaganski <[email protected]> diff --git a/sw/source/core/doc/docbm.cxx b/sw/source/core/doc/docbm.cxx index 28ac878e2825..f8e22f580aed 100644 --- a/sw/source/core/doc/docbm.cxx +++ b/sw/source/core/doc/docbm.cxx @@ -113,32 +113,6 @@ namespace return bCRFirst; // cross-ref sorts *before* } - // specialise to avoid loplugin:faileddyncast - template<> - bool lcl_MarkOrderingByStart(const AnnotationMark *const pFirst, - const AnnotationMark *const pSecond) - { - SwPosition const& rFirstStart(pFirst->GetMarkStart()); - SwPosition const& rSecondStart(pSecond->GetMarkStart()); - if (rFirstStart.GetNode() != rSecondStart.GetNode()) - { - return rFirstStart.GetNode() < rSecondStart.GetNode(); - } - const sal_Int32 nFirstContent = rFirstStart.GetContentIndex(); - const sal_Int32 nSecondContent = rSecondStart.GetContentIndex(); - if (nFirstContent != 0 || nSecondContent != 0) - { - return nFirstContent < nSecondContent; - } - SwContentNode const*const pFirstNode(rFirstStart.nContent.GetContentNode()); - SwContentNode const*const pSecondNode(rSecondStart.nContent.GetContentNode()); - if ((pFirstNode != nullptr) != (pSecondNode != nullptr)) - { // consistency with SwPosition::operator< - return pSecondNode != nullptr; - } - return false; // equal - } - template<class MarkT> bool lcl_MarkOrderingByEnd(const MarkT *const pFirst, const MarkT *const pSecond)
