diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2024-10-21 14:36:51 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2024-10-22 08:01:19 +0200 |
commit | 19bc8856c4b5444f80375919c2aed00c7de53a28 (patch) | |
tree | 94256a4db6d6feb4f148e405f1a540c9b0db3869 /sw | |
parent | 76319347a83aecee7a423a614d67287182b31b00 (diff) |
move vcl::DeleteOnDeinit to tools
so we can fix a shutdown use-after-free in sot.
Change-Id: I32f83bd94627d72d7bee7ea2ebd6ab77a7f78435
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175335
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/inc/pch/precompiled_vbaswobj.hxx | 2 | ||||
-rw-r--r-- | sw/inc/viewsh.hxx | 4 | ||||
-rw-r--r-- | sw/source/core/layout/paintfrm.cxx | 20 | ||||
-rw-r--r-- | sw/source/core/txtnode/fntcache.cxx | 4 | ||||
-rw-r--r-- | sw/source/core/view/viewsh.cxx | 2 |
5 files changed, 16 insertions, 16 deletions
diff --git a/sw/inc/pch/precompiled_vbaswobj.hxx b/sw/inc/pch/precompiled_vbaswobj.hxx index 88ac8570d5fe..4139cfe26b1b 100644 --- a/sw/inc/pch/precompiled_vbaswobj.hxx +++ b/sw/inc/pch/precompiled_vbaswobj.hxx @@ -117,7 +117,7 @@ #include <vcl/kernarray.hxx> #include <vcl/keycod.hxx> #include <vcl/keycodes.hxx> -#include <vcl/lazydelete.hxx> +#include <tools/lazydelete.hxx> #include <vcl/mapmod.hxx> #include <vcl/metaactiontypes.hxx> #include <vcl/outdev.hxx> diff --git a/sw/inc/viewsh.hxx b/sw/inc/viewsh.hxx index 896a237b27c4..f453cc375f1d 100644 --- a/sw/inc/viewsh.hxx +++ b/sw/inc/viewsh.hxx @@ -27,7 +27,7 @@ #include <stack> #include <vcl/mapmod.hxx> #include <vcl/vclptr.hxx> -#include <vcl/lazydelete.hxx> +#include <tools/lazydelete.hxx> #include <vcl/window.hxx> namespace com::sun::star::accessibility { class XAccessible; } @@ -193,7 +193,7 @@ class SAL_DLLPUBLIC_RTTI SwViewShell : public sw::Ring<SwViewShell> protected: static ShellResource* spShellRes; ///< Resources for the Shell. - static vcl::DeleteOnDeinit< std::shared_ptr<weld::Window> > spCareDialog; ///< Avoid this window. + static tools::DeleteOnDeinit< std::shared_ptr<weld::Window> > spCareDialog; ///< Avoid this window. SwRect maVisArea; ///< The modern version of VisArea. tools::Rectangle maLOKVisibleArea;///< The visible area in the LibreOfficeKit client. diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index f18503ff07a7..c853a772542d 100644 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -19,7 +19,7 @@ #include <utility> #include <vcl/canvastools.hxx> -#include <vcl/lazydelete.hxx> +#include <tools/lazydelete.hxx> #include <sfx2/docfile.hxx> #include <sfx2/printer.hxx> #include <sfx2/progress.hxx> @@ -6400,19 +6400,19 @@ static void lcl_paintBitmapExToRect(vcl::RenderContext *pOut, const Point& aPoin // #i16816# tagged pdf support SwTaggedPDFHelper aTaggedPDFHelper( nullptr, nullptr, nullptr, *_pViewShell->GetOut() ); - static vcl::DeleteOnDeinit<drawinglayer::primitive2d::DiscreteShadow> shadowMaskObj( + static tools::DeleteOnDeinit<drawinglayer::primitive2d::DiscreteShadow> shadowMaskObj( vcl::bitmap::loadFromName(BMP_PAGE_SHADOW_MASK, ImageLoadFlags::IgnoreDarkTheme | ImageLoadFlags::IgnoreScalingFactor)); drawinglayer::primitive2d::DiscreteShadow& shadowMask = *shadowMaskObj.get(); - static vcl::DeleteOnDeinit< BitmapEx > aPageTopRightShadowObj {}; - static vcl::DeleteOnDeinit< BitmapEx > aPageBottomRightShadowObj {}; - static vcl::DeleteOnDeinit< BitmapEx > aPageBottomLeftShadowObj {}; - static vcl::DeleteOnDeinit< BitmapEx > aPageBottomShadowBaseObj {}; - static vcl::DeleteOnDeinit< BitmapEx > aPageRightShadowBaseObj {}; - static vcl::DeleteOnDeinit< BitmapEx > aPageTopShadowBaseObj {}; - static vcl::DeleteOnDeinit< BitmapEx > aPageTopLeftShadowObj {}; - static vcl::DeleteOnDeinit< BitmapEx > aPageLeftShadowBaseObj {}; + static tools::DeleteOnDeinit< BitmapEx > aPageTopRightShadowObj {}; + static tools::DeleteOnDeinit< BitmapEx > aPageBottomRightShadowObj {}; + static tools::DeleteOnDeinit< BitmapEx > aPageBottomLeftShadowObj {}; + static tools::DeleteOnDeinit< BitmapEx > aPageBottomShadowBaseObj {}; + static tools::DeleteOnDeinit< BitmapEx > aPageRightShadowBaseObj {}; + static tools::DeleteOnDeinit< BitmapEx > aPageTopShadowBaseObj {}; + static tools::DeleteOnDeinit< BitmapEx > aPageTopLeftShadowObj {}; + static tools::DeleteOnDeinit< BitmapEx > aPageLeftShadowBaseObj {}; BitmapEx& aPageTopRightShadow = *aPageTopRightShadowObj.get(); BitmapEx& aPageBottomRightShadow = *aPageBottomRightShadowObj.get(); BitmapEx& aPageBottomLeftShadow = *aPageBottomLeftShadowObj.get(); diff --git a/sw/source/core/txtnode/fntcache.cxx b/sw/source/core/txtnode/fntcache.cxx index e9407b7af9d7..c0ae4b639d81 100644 --- a/sw/source/core/txtnode/fntcache.cxx +++ b/sw/source/core/txtnode/fntcache.cxx @@ -26,7 +26,7 @@ #include <vcl/lineinfo.hxx> #include <vcl/metric.hxx> #include <vcl/svapp.hxx> -#include <vcl/lazydelete.hxx> +#include <tools/lazydelete.hxx> #include <vcl/glyphitemcache.hxx> #include <com/sun/star/i18n/CharacterIteratorMode.hpp> #include <com/sun/star/i18n/WordType.hpp> @@ -72,7 +72,7 @@ constexpr Color gWaveCol(COL_GRAY); tools::Long SwFntObj::s_nPixWidth; MapMode* SwFntObj::s_pPixMap = nullptr; -static vcl::DeleteOnDeinit< VclPtr<OutputDevice> > s_pFntObjPixOut {}; +static tools::DeleteOnDeinit< VclPtr<OutputDevice> > s_pFntObjPixOut {}; void SwFntCache::Flush( ) { diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx index ee06ea0179d7..a1bc4407f664 100644 --- a/sw/source/core/view/viewsh.cxx +++ b/sw/source/core/view/viewsh.cxx @@ -89,7 +89,7 @@ bool SwViewShell::sbLstAct = false; ShellResource *SwViewShell::spShellRes = nullptr; -vcl::DeleteOnDeinit<std::shared_ptr<weld::Window>> SwViewShell::spCareDialog {}; +tools::DeleteOnDeinit<std::shared_ptr<weld::Window>> SwViewShell::spCareDialog {}; static bool bInSizeNotify = false; |