diff options
-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; |