diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2024-11-01 11:56:29 +0500 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2024-11-01 09:53:57 +0100 |
commit | 5c2778037f16784482088aa4008a7bf27aa7bd50 (patch) | |
tree | 80222836174166c1560d92003bbd0b4970d2db5b | |
parent | a1dcbd1d1ce6071d48bb5df26d7839aeb21b75a8 (diff) |
Merge ImplInit into ctor
Change-Id: I41ef9a3660cbb897074ec2bb2f234706d8b68de1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175893
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
-rw-r--r-- | include/vcl/graphicfilter.hxx | 1 | ||||
-rw-r--r-- | vcl/source/filter/graphicfilter.cxx | 35 |
2 files changed, 15 insertions, 21 deletions
diff --git a/include/vcl/graphicfilter.hxx b/include/vcl/graphicfilter.hxx index 6d4dcde025f2..2bbece5f486b 100644 --- a/include/vcl/graphicfilter.hxx +++ b/include/vcl/graphicfilter.hxx @@ -338,7 +338,6 @@ private: OUString aFilterPath; FilterConfigCache* pConfig; - SAL_DLLPRIVATE void ImplInit(); SAL_DLLPRIVATE ErrCode ImplSetError( ErrCode nError, const SvStream* pStm = nullptr ); SAL_DLLPRIVATE ErrCode ImpTestOrFindFormat( std::u16string_view rPath, SvStream& rStream, sal_uInt16& rFormat ); diff --git a/vcl/source/filter/graphicfilter.cxx b/vcl/source/filter/graphicfilter.cxx index ecd506a42548..ca8033018be5 100644 --- a/vcl/source/filter/graphicfilter.cxx +++ b/vcl/source/filter/graphicfilter.cxx @@ -277,26 +277,6 @@ static Graphic ImpGetScaledGraphic( const Graphic& rGraphic, FilterConfigItem& r GraphicFilter::GraphicFilter( bool bConfig ) : bUseConfig(bConfig) { - ImplInit(); -} - -GraphicFilter::~GraphicFilter() -{ - { - std::scoped_lock aGuard( getListMutex() ); - auto it = std::find(gaFilterHdlList.begin(), gaFilterHdlList.end(), this); - if( it != gaFilterHdlList.end() ) - gaFilterHdlList.erase( it ); - - if( gaFilterHdlList.empty() ) - delete pConfig; - } - - mxErrorEx.reset(); -} - -void GraphicFilter::ImplInit() -{ { std::scoped_lock aGuard( getListMutex() ); @@ -318,6 +298,21 @@ void GraphicFilter::ImplInit() mxErrorEx = ERRCODE_NONE; } +GraphicFilter::~GraphicFilter() +{ + { + std::scoped_lock aGuard( getListMutex() ); + auto it = std::find(gaFilterHdlList.begin(), gaFilterHdlList.end(), this); + if( it != gaFilterHdlList.end() ) + gaFilterHdlList.erase( it ); + + if( gaFilterHdlList.empty() ) + delete pConfig; + } + + mxErrorEx.reset(); +} + ErrCode GraphicFilter::ImplSetError( ErrCode nError, const SvStream* pStm ) { mxErrorEx = pStm ? pStm->GetError() : ERRCODE_NONE; |