diff options
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/Library_vcl.mk | 1 | ||||
-rw-r--r-- | vcl/inc/pch/precompiled_vcl.hxx | 2 | ||||
-rw-r--r-- | vcl/inc/svdata.hxx | 2 | ||||
-rw-r--r-- | vcl/skia/gdiimpl.cxx | 2 | ||||
-rw-r--r-- | vcl/source/app/svmain.cxx | 4 | ||||
-rw-r--r-- | vcl/source/gdi/impglyphitem.cxx | 4 | ||||
-rw-r--r-- | vcl/source/helper/lazydelete.cxx | 58 | ||||
-rw-r--r-- | vcl/source/opengl/x11/context.cxx | 2 | ||||
-rw-r--r-- | vcl/source/outdev/outdev.cxx | 4 | ||||
-rw-r--r-- | vcl/source/outdev/textline.cxx | 4 | ||||
-rw-r--r-- | vcl/source/text/TextLayoutCache.cxx | 4 | ||||
-rw-r--r-- | vcl/source/window/split.cxx | 6 | ||||
-rw-r--r-- | vcl/source/window/window.cxx | 4 |
13 files changed, 18 insertions, 79 deletions
diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk index 8d51d7157bcf..a59285a26dfb 100644 --- a/vcl/Library_vcl.mk +++ b/vcl/Library_vcl.mk @@ -390,7 +390,6 @@ $(eval $(call gb_Library_add_exception_objects,vcl,\ vcl/source/helper/driverblocklist \ vcl/source/helper/evntpost \ vcl/source/helper/idletask \ - vcl/source/helper/lazydelete \ vcl/source/helper/strhelper \ vcl/source/helper/svtaccessiblefactory \ vcl/source/helper/threadex \ diff --git a/vcl/inc/pch/precompiled_vcl.hxx b/vcl/inc/pch/precompiled_vcl.hxx index 00d156760020..6adbba81df4d 100644 --- a/vcl/inc/pch/precompiled_vcl.hxx +++ b/vcl/inc/pch/precompiled_vcl.hxx @@ -348,7 +348,7 @@ #include <vcl/idle.hxx> #include <vcl/image.hxx> #include <vcl/layout.hxx> -#include <vcl/lazydelete.hxx> +#include <tools/lazydelete.hxx> #include <vcl/lineinfo.hxx> #include <vcl/menu.hxx> #include <vcl/metaact.hxx> diff --git a/vcl/inc/svdata.hxx b/vcl/inc/svdata.hxx index 3619de00d25b..584018ccfdbe 100644 --- a/vcl/inc/svdata.hxx +++ b/vcl/inc/svdata.hxx @@ -128,7 +128,6 @@ namespace vcl { class DisplayConnectionDispatch; class SettingsConfigItem; - class DeleteOnDeinitBase; class Window; } @@ -421,7 +420,6 @@ struct ImplSVData css::uno::Reference< css::lang::XComponent > mxAccessBridge; std::unique_ptr<vcl::SettingsConfigItem> mpSettingsConfigItem; - std::vector< vcl::DeleteOnDeinitBase* > maDeinitDeleteList; std::unordered_map< int, OUString > maPaperNames; css::uno::Reference<css::i18n::XCharacterClassification> m_xCharClass; diff --git a/vcl/skia/gdiimpl.cxx b/vcl/skia/gdiimpl.cxx index 83b9fd6810c6..f6c7d21374bf 100644 --- a/vcl/skia/gdiimpl.cxx +++ b/vcl/skia/gdiimpl.cxx @@ -23,7 +23,7 @@ #include <skia/salbmp.hxx> #include <vcl/idle.hxx> #include <vcl/svapp.hxx> -#include <vcl/lazydelete.hxx> +#include <tools/lazydelete.hxx> #include <vcl/gradient.hxx> #include <vcl/skia/SkiaHelper.hxx> #include <skia/utils.hxx> diff --git a/vcl/source/app/svmain.cxx b/vcl/source/app/svmain.cxx index 47df58d33965..a8a2412aa810 100644 --- a/vcl/source/app/svmain.cxx +++ b/vcl/source/app/svmain.cxx @@ -45,7 +45,7 @@ #include <vcl/settings.hxx> #include <vcl/toolkit/unowrap.hxx> #include <configsettings.hxx> -#include <vcl/lazydelete.hxx> +#include <tools/lazydelete.hxx> #include <vcl/embeddedfontshelper.hxx> #include <vcl/toolkit/dialog.hxx> #include <vcl/menu.hxx> @@ -468,7 +468,7 @@ void DeInitVCL() // Some events may need to access objects destroyed in ImplDeleteOnDeInit, so process them first Scheduler::ProcessEventsToIdle(); - vcl::DeleteOnDeinitBase::ImplDeleteOnDeInit(); + tools::DeleteOnDeinitBase::ImplDeleteOnDeInit(); #if OSL_DEBUG_LEVEL > 0 OStringBuffer aBuf( 256 ); diff --git a/vcl/source/gdi/impglyphitem.cxx b/vcl/source/gdi/impglyphitem.cxx index 946230a51762..6001ccd0236b 100644 --- a/vcl/source/gdi/impglyphitem.cxx +++ b/vcl/source/gdi/impglyphitem.cxx @@ -21,7 +21,7 @@ #include <utility> #include <vcl/glyphitemcache.hxx> #include <vcl/vcllayout.hxx> -#include <vcl/lazydelete.hxx> +#include <tools/lazydelete.hxx> #include <tools/stream.hxx> #include <unotools/configmgr.hxx> #include <TextLayoutCache.hxx> @@ -234,7 +234,7 @@ void SalLayoutGlyphsCache::clear() { mCachedGlyphs.clear(); } SalLayoutGlyphsCache* SalLayoutGlyphsCache::self() { - static vcl::DeleteOnDeinit<SalLayoutGlyphsCache> cache( + static tools::DeleteOnDeinit<SalLayoutGlyphsCache> cache( !comphelper::IsFuzzing() ? officecfg::Office::Common::Cache::Font::GlyphsCacheSize::get() : 20000000); return cache.get(); diff --git a/vcl/source/helper/lazydelete.cxx b/vcl/source/helper/lazydelete.cxx deleted file mode 100644 index af1f9fcb3308..000000000000 --- a/vcl/source/helper/lazydelete.cxx +++ /dev/null @@ -1,58 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#include <vcl/lazydelete.hxx> -#include <svdata.hxx> -#include <sal/log.hxx> - -namespace vcl -{ -DeleteOnDeinitBase::~DeleteOnDeinitBase() -{ - ImplSVData* pSVData = ImplGetSVData(); - if (!pSVData) - return; - auto& rList = pSVData->maDeinitDeleteList; - std::erase(rList, this); -} - -void DeleteOnDeinitBase::addDeinitContainer(DeleteOnDeinitBase* i_pContainer) -{ - ImplSVData* pSVData = ImplGetSVData(); - - SAL_WARN_IF(pSVData->mbDeInit, "vcl", "DeleteOnDeinit added after DeiInitVCL !"); - if (pSVData->mbDeInit) - return; - - pSVData->maDeinitDeleteList.push_back(i_pContainer); -} - -void DeleteOnDeinitBase::ImplDeleteOnDeInit() -{ - ImplSVData* pSVData = ImplGetSVData(); - for (auto const& deinitDelete : pSVData->maDeinitDeleteList) - { - deinitDelete->doCleanup(); - } - pSVData->maDeinitDeleteList.clear(); -} - -} // namespace vcl - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/source/opengl/x11/context.cxx b/vcl/source/opengl/x11/context.cxx index 93125f91085a..73dfbaf8cd8f 100644 --- a/vcl/source/opengl/x11/context.cxx +++ b/vcl/source/opengl/x11/context.cxx @@ -8,7 +8,7 @@ */ #include <memory> -#include <vcl/lazydelete.hxx> +#include <tools/lazydelete.hxx> #include <vcl/syschild.hxx> #include <svdata.hxx> diff --git a/vcl/source/outdev/outdev.cxx b/vcl/source/outdev/outdev.cxx index b2ca6382bfac..f177efab6cdb 100644 --- a/vcl/source/outdev/outdev.cxx +++ b/vcl/source/outdev/outdev.cxx @@ -24,7 +24,7 @@ #include <tools/debug.hxx> #include <vcl/graph.hxx> -#include <vcl/lazydelete.hxx> +#include <tools/lazydelete.hxx> #include <vcl/metaact.hxx> #include <vcl/toolkit/unowrap.hxx> #include <vcl/svapp.hxx> @@ -788,7 +788,7 @@ com::sun::star::uno::Reference< css::rendering::XCanvas > OutputDevice::ImplGetC Reference< XComponentContext > xContext = comphelper::getProcessComponentContext(); - static vcl::DeleteUnoReferenceOnDeinit<css::lang::XMultiComponentFactory> xStaticCanvasFactory( + static tools::DeleteUnoReferenceOnDeinit<css::lang::XMultiComponentFactory> xStaticCanvasFactory( css::rendering::CanvasFactory::create( xContext ) ); Reference<css::lang::XMultiComponentFactory> xCanvasFactory(xStaticCanvasFactory.get()); Reference< css::rendering::XCanvas > xCanvas; diff --git a/vcl/source/outdev/textline.cxx b/vcl/source/outdev/textline.cxx index 20315c6c6aaa..42ffa0613aa2 100644 --- a/vcl/source/outdev/textline.cxx +++ b/vcl/source/outdev/textline.cxx @@ -24,7 +24,7 @@ #include <o3tl/hash_combine.hxx> #include <o3tl/lru_map.hxx> #include <comphelper/configuration.hxx> -#include <vcl/lazydelete.hxx> +#include <tools/lazydelete.hxx> #include <vcl/metaact.hxx> #include <vcl/settings.hxx> #include <vcl/virdev.hxx> @@ -1051,7 +1051,7 @@ void OutputDevice::DrawWaveLine(const Point& rStartPos, const Point& rEndPos, to if ( fOrientation == 0.0 ) { - static vcl::DeleteOnDeinit< WavyLineCache > snLineCache {}; + static tools::DeleteOnDeinit< WavyLineCache > snLineCache {}; if ( !snLineCache.get() ) return; WavyLineCache& rLineCache = *snLineCache.get(); diff --git a/vcl/source/text/TextLayoutCache.cxx b/vcl/source/text/TextLayoutCache.cxx index 414ab29f895a..3e3571dfc861 100644 --- a/vcl/source/text/TextLayoutCache.cxx +++ b/vcl/source/text/TextLayoutCache.cxx @@ -24,7 +24,7 @@ #include <o3tl/hash_combine.hxx> #include <o3tl/lru_map.hxx> #include <unotools/configmgr.hxx> -#include <vcl/lazydelete.hxx> +#include <tools/lazydelete.hxx> #include <officecfg/Office/Common.hxx> namespace vcl::text @@ -55,7 +55,7 @@ std::shared_ptr<const TextLayoutCache> TextLayoutCache::Create(OUString const& r typedef o3tl::lru_map<OUString, std::shared_ptr<const TextLayoutCache>, FirstCharsStringHash, FastStringCompareEqual, TextLayoutCacheCost> Cache; - static vcl::DeleteOnDeinit<Cache> cache( + static tools::DeleteOnDeinit<Cache> cache( !comphelper::IsFuzzing() ? officecfg::Office::Common::Cache::Font::TextRunsCacheSize::get() : 100); if (Cache* map = cache.get()) diff --git a/vcl/source/window/split.cxx b/vcl/source/window/split.cxx index d25e2b677e36..adb82ad575c3 100644 --- a/vcl/source/window/split.cxx +++ b/vcl/source/window/split.cxx @@ -27,7 +27,7 @@ #include <vcl/lineinfo.hxx> #include <vcl/settings.hxx> #include <vcl/ptrstyle.hxx> -#include <vcl/lazydelete.hxx> +#include <tools/lazydelete.hxx> #include <window.h> @@ -35,12 +35,12 @@ namespace { Wallpaper& ImplBlackWall() { - static vcl::DeleteOnDeinit< Wallpaper > SINGLETON(COL_BLACK); + static tools::DeleteOnDeinit< Wallpaper > SINGLETON(COL_BLACK); return *SINGLETON.get(); } Wallpaper& ImplWhiteWall() { - static vcl::DeleteOnDeinit< Wallpaper > SINGLETON(COL_LIGHTGRAY); + static tools::DeleteOnDeinit< Wallpaper > SINGLETON(COL_LIGHTGRAY); return *SINGLETON.get(); } } diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx index 10db9fd7a3d2..8cde4c668112 100644 --- a/vcl/source/window/window.cxx +++ b/vcl/source/window/window.cxx @@ -38,7 +38,7 @@ #include <vcl/toolkit/button.hxx> #include <vcl/taskpanelist.hxx> #include <vcl/toolkit/unowrap.hxx> -#include <vcl/lazydelete.hxx> +#include <tools/lazydelete.hxx> #include <vcl/virdev.hxx> #include <vcl/settings.hxx> #include <vcl/sysdata.hxx> @@ -3747,7 +3747,7 @@ Reference< css::rendering::XCanvas > WindowOutputDevice::ImplGetCanvas( bool bSp // Create canvas instance with window handle - static vcl::DeleteUnoReferenceOnDeinit<XMultiComponentFactory> xStaticCanvasFactory( + static tools::DeleteUnoReferenceOnDeinit<XMultiComponentFactory> xStaticCanvasFactory( css::rendering::CanvasFactory::create( xContext ) ); Reference<XMultiComponentFactory> xCanvasFactory(xStaticCanvasFactory.get()); Reference< css::rendering::XCanvas > xCanvas; |