diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2020-03-03 12:46:19 +0100 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2020-03-04 11:31:45 +0100 |
commit | ec85ed21a960a198a01778cdb89a91fabcb5d0c0 (patch) | |
tree | 93e9b167b5a986b49dc7f0533d2f24cb86a7602e /vcl | |
parent | 3e0c5113a298d3ded705706193f8b6b909027b2f (diff) |
vcl: rename GetContext to GetReaderContext in Graphic
GetContext is a very generic method name, so rename it to a more
specific GetReaderContext name. It is easier to find references.
Change-Id: Ieb05ac63080598357107dc3e485b481910cd79cc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89929
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/filter/graphicfilter.cxx | 8 | ||||
-rw-r--r-- | vcl/source/filter/igif/gifread.cxx | 6 | ||||
-rw-r--r-- | vcl/source/filter/ixbm/xbmread.cxx | 6 | ||||
-rw-r--r-- | vcl/source/filter/ixpm/xpmread.cxx | 6 | ||||
-rw-r--r-- | vcl/source/filter/jpeg/jpeg.cxx | 6 | ||||
-rw-r--r-- | vcl/source/gdi/graph.cxx | 4 |
6 files changed, 18 insertions, 18 deletions
diff --git a/vcl/source/filter/graphicfilter.cxx b/vcl/source/filter/graphicfilter.cxx index 9ae7e393c8b7..1c87416115e9 100644 --- a/vcl/source/filter/graphicfilter.cxx +++ b/vcl/source/filter/graphicfilter.cxx @@ -1109,7 +1109,7 @@ void GraphicFilter::ImportGraphics(std::vector< std::shared_ptr<Graphic> >& rGra { rContext.m_pAccess.reset(); - if (rContext.m_nStatus == ERRCODE_NONE && (rContext.m_eLinkType != GfxLinkType::NONE) && !rContext.m_pGraphic->GetContext()) + if (rContext.m_nStatus == ERRCODE_NONE && (rContext.m_eLinkType != GfxLinkType::NONE) && !rContext.m_pGraphic->GetReaderContext()) { std::unique_ptr<sal_uInt8[]> pGraphicContent; @@ -1456,7 +1456,7 @@ ErrCode GraphicFilter::ImportGraphic( Graphic& rGraphic, const OUString& rPath, } } - std::shared_ptr<GraphicReader> pContext = rGraphic.GetContext(); + std::shared_ptr<GraphicReader> pContext = rGraphic.GetReaderContext(); bool bDummyContext = rGraphic.IsDummyContext(); if( !pContext || bDummyContext ) { @@ -1786,7 +1786,7 @@ ErrCode GraphicFilter::ImportGraphic( Graphic& rGraphic, const OUString& rPath, } } - if( nStatus == ERRCODE_NONE && bCreateNativeLink && ( eLinkType != GfxLinkType::NONE ) && !rGraphic.GetContext() && !bLinkSet ) + if( nStatus == ERRCODE_NONE && bCreateNativeLink && ( eLinkType != GfxLinkType::NONE ) && !rGraphic.GetReaderContext() && !bLinkSet ) { if (!pGraphicContent) { @@ -2237,7 +2237,7 @@ IMPL_LINK( GraphicFilter, FilterCallback, ConvertData&, rData, bool ) default: break; } - if( GraphicType::NONE == rData.maGraphic.GetType() || rData.maGraphic.GetContext() ) // Import + if( GraphicType::NONE == rData.maGraphic.GetType() || rData.maGraphic.GetReaderContext() ) // Import { // Import nFormat = GetImportFormatNumberForShortName( OStringToOUString( aShortName, RTL_TEXTENCODING_UTF8) ); diff --git a/vcl/source/filter/igif/gifread.cxx b/vcl/source/filter/igif/gifread.cxx index f940bff2416a..47d9acb53c2a 100644 --- a/vcl/source/filter/igif/gifread.cxx +++ b/vcl/source/filter/igif/gifread.cxx @@ -960,8 +960,8 @@ bool IsGIFAnimated(SvStream & rStm) VCL_DLLPUBLIC bool ImportGIF( SvStream & rStm, Graphic& rGraphic ) { - std::shared_ptr<GraphicReader> pContext = rGraphic.GetContext(); - rGraphic.SetContext(nullptr); + std::shared_ptr<GraphicReader> pContext = rGraphic.GetReaderContext(); + rGraphic.SetReaderContext(nullptr); GIFReader* pGIFReader = dynamic_cast<GIFReader*>( pContext.get() ); if (!pGIFReader) { @@ -983,7 +983,7 @@ VCL_DLLPUBLIC bool ImportGIF( SvStream & rStm, Graphic& rGraphic ) else if (eReadState == GIFREAD_NEED_MORE) { rGraphic = pGIFReader->GetIntermediateGraphic(); - rGraphic.SetContext(pContext); + rGraphic.SetReaderContext(pContext); } rStm.SetEndian(nOldFormat); diff --git a/vcl/source/filter/ixbm/xbmread.cxx b/vcl/source/filter/ixbm/xbmread.cxx index a2febe81b767..11ab30d1a7b6 100644 --- a/vcl/source/filter/ixbm/xbmread.cxx +++ b/vcl/source/filter/ixbm/xbmread.cxx @@ -367,8 +367,8 @@ ReadState XBMReader::ReadXBM( Graphic& rGraphic ) VCL_DLLPUBLIC bool ImportXBM( SvStream& rStm, Graphic& rGraphic ) { - std::shared_ptr<GraphicReader> pContext = rGraphic.GetContext(); - rGraphic.SetContext(nullptr); + std::shared_ptr<GraphicReader> pContext = rGraphic.GetReaderContext(); + rGraphic.SetReaderContext(nullptr); XBMReader* pXBMReader = dynamic_cast<XBMReader*>( pContext.get() ); if (!pXBMReader) { @@ -385,7 +385,7 @@ VCL_DLLPUBLIC bool ImportXBM( SvStream& rStm, Graphic& rGraphic ) bRet = false; } else if( eReadState == XBMREAD_NEED_MORE ) - rGraphic.SetContext( pContext ); + rGraphic.SetReaderContext( pContext ); return bRet; } diff --git a/vcl/source/filter/ixpm/xpmread.cxx b/vcl/source/filter/ixpm/xpmread.cxx index fdf64e0fc51d..efbf2b7f1fcd 100644 --- a/vcl/source/filter/ixpm/xpmread.cxx +++ b/vcl/source/filter/ixpm/xpmread.cxx @@ -669,8 +669,8 @@ bool XPMReader::ImplGetString() VCL_DLLPUBLIC bool ImportXPM( SvStream& rStm, Graphic& rGraphic ) { - std::shared_ptr<GraphicReader> pContext = rGraphic.GetContext(); - rGraphic.SetContext(nullptr); + std::shared_ptr<GraphicReader> pContext = rGraphic.GetReaderContext(); + rGraphic.SetReaderContext(nullptr); XPMReader* pXPMReader = dynamic_cast<XPMReader*>( pContext.get() ); if (!pXPMReader) { @@ -687,7 +687,7 @@ VCL_DLLPUBLIC bool ImportXPM( SvStream& rStm, Graphic& rGraphic ) bRet = false; } else if( eReadState == XPMREAD_NEED_MORE ) - rGraphic.SetContext( pContext ); + rGraphic.SetReaderContext( pContext ); return bRet; } diff --git a/vcl/source/filter/jpeg/jpeg.cxx b/vcl/source/filter/jpeg/jpeg.cxx index 58c18146eb99..eec0e7c3c4a7 100644 --- a/vcl/source/filter/jpeg/jpeg.cxx +++ b/vcl/source/filter/jpeg/jpeg.cxx @@ -27,8 +27,8 @@ VCL_DLLPUBLIC bool ImportJPEG( SvStream& rInputStream, Graphic& rGraphic, Graphi { bool bReturn = true; - std::shared_ptr<GraphicReader> pContext = rGraphic.GetContext(); - rGraphic.SetContext(nullptr); + std::shared_ptr<GraphicReader> pContext = rGraphic.GetReaderContext(); + rGraphic.SetReaderContext(nullptr); JPEGReader* pJPEGReader = dynamic_cast<JPEGReader*>( pContext.get() ); if (!pJPEGReader) { @@ -53,7 +53,7 @@ VCL_DLLPUBLIC bool ImportJPEG( SvStream& rInputStream, Graphic& rGraphic, Graphi } else if( eReadState == JPEGREAD_NEED_MORE ) { - rGraphic.SetContext( pContext ); + rGraphic.SetReaderContext( pContext ); } return bReturn; diff --git a/vcl/source/gdi/graph.cxx b/vcl/source/gdi/graph.cxx index 01e99662ff88..71d876370c80 100644 --- a/vcl/source/gdi/graph.cxx +++ b/vcl/source/gdi/graph.cxx @@ -493,12 +493,12 @@ sal_uInt32 Graphic::GetAnimationLoopCount() const return mxImpGraphic->ImplGetAnimationLoopCount(); } -std::shared_ptr<GraphicReader>& Graphic::GetContext() +std::shared_ptr<GraphicReader>& Graphic::GetReaderContext() { return mxImpGraphic->ImplGetContext(); } -void Graphic::SetContext( const std::shared_ptr<GraphicReader> &pReader ) +void Graphic::SetReaderContext( const std::shared_ptr<GraphicReader> &pReader ) { mxImpGraphic->ImplSetContext( pReader ); } |