sw/source/core/inc/noteurl.hxx | 2 +- sw/source/core/layout/paintfrm.cxx | 4 ++-- sw/source/core/text/noteurl.cxx | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-)
New commits: commit c85c534befc1a68f405fc2ad508ae9363d7ebb91 Author: Mike Kaganski <mike.kagan...@collabora.com> AuthorDate: Wed May 1 10:00:25 2024 +0500 Commit: Mike Kaganski <mike.kagan...@collabora.com> CommitDate: Wed May 1 08:35:25 2024 +0200 Make pNoteURL thread-local, just in case Change-Id: I27247a85f0d7497f70c5d97a8955b68a29be1176 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166946 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com> diff --git a/sw/source/core/inc/noteurl.hxx b/sw/source/core/inc/noteurl.hxx index eeae15642a43..b575b60d20a0 100644 --- a/sw/source/core/inc/noteurl.hxx +++ b/sw/source/core/inc/noteurl.hxx @@ -59,7 +59,7 @@ public: }; // globale Variable, in NoteURL.Cxx angelegt -extern SwNoteURL* pNoteURL; +extern thread_local SwNoteURL* pNoteURL; #endif diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index 1e8600d83094..1d27f9406c0c 100644 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -8054,7 +8054,7 @@ Graphic SwFlyFrameFormat::MakeGraphic( ImageMap* pMap, const sal_uInt32 /*nMaxim SfxItemState::SET != GetAttrSet().GetItemState( RES_URL ); if( bNoteURL ) { - OSL_ENSURE( !pNoteURL, "MakeGraphic: pNoteURL already used? " ); + assert(!pNoteURL); pNoteURL = new SwNoteURL; } SwFlyFrame *pFly = static_cast<SwFlyFrame*>(pFirst); @@ -8135,7 +8135,7 @@ Graphic SwFlyFrameFormat::MakeGraphic( ImageMap* pMap, const sal_uInt32 /*nMaxim if( bNoteURL ) { - OSL_ENSURE( pNoteURL, "MakeGraphic: Good Bye, NoteURL." ); + assert(pNoteURL); pNoteURL->FillImageMap(pMap, pFly->getFrameArea().Pos(), aMap); delete pNoteURL; pNoteURL = nullptr; diff --git a/sw/source/core/text/noteurl.cxx b/sw/source/core/text/noteurl.cxx index ae52e1c29a91..d66736280bb5 100644 --- a/sw/source/core/text/noteurl.cxx +++ b/sw/source/core/text/noteurl.cxx @@ -25,7 +25,7 @@ #include <vcl/outdev.hxx> // Global variable -SwNoteURL* pNoteURL = nullptr; +thread_local SwNoteURL* pNoteURL = nullptr; void SwNoteURL::InsertURLNote(const OUString& rURL, const OUString& rTarget, const SwRect& rRect) {