[Libreoffice-commits] core.git: forms/source include/vcl vcl/source
Tomaž Vajngerl (via logerrit)
logerrit at kemper.freedesktop.org
Wed Mar 4 10:32:25 UTC 2020
forms/source/component/imgprod.cxx | 4 ++--
include/vcl/graph.hxx | 4 ++--
vcl/source/filter/graphicfilter.cxx | 8 ++++----
vcl/source/filter/igif/gifread.cxx | 6 +++---
vcl/source/filter/ixbm/xbmread.cxx | 6 +++---
vcl/source/filter/ixpm/xpmread.cxx | 6 +++---
vcl/source/filter/jpeg/jpeg.cxx | 6 +++---
vcl/source/gdi/graph.cxx | 4 ++--
8 files changed, 22 insertions(+), 22 deletions(-)
New commits:
commit ec85ed21a960a198a01778cdb89a91fabcb5d0c0
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
AuthorDate: Tue Mar 3 12:46:19 2020 +0100
Commit: Tomaž Vajngerl <quikee at gmail.com>
CommitDate: Wed Mar 4 11:31:45 2020 +0100
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 at gmail.com>
diff --git a/forms/source/component/imgprod.cxx b/forms/source/component/imgprod.cxx
index e95ce18fc1b9..930fa60c26df 100644
--- a/forms/source/component/imgprod.cxx
+++ b/forms/source/component/imgprod.cxx
@@ -241,7 +241,7 @@ void ImageProducer::setImage( css::uno::Reference< css::io::XInputStream > const
void ImageProducer::NewDataAvailable()
{
- if( ( GraphicType::NONE == mpGraphic->GetType() ) || mpGraphic->GetContext() )
+ if( ( GraphicType::NONE == mpGraphic->GetType() ) || mpGraphic->GetReaderContext() )
startProduction();
}
@@ -257,7 +257,7 @@ void ImageProducer::startProduction()
{
// if we already have a graphic, we don't have to import again;
// graphic is cleared if a new Stream is set
- if( ( mpGraphic->GetType() == GraphicType::NONE ) || mpGraphic->GetContext() )
+ if( ( mpGraphic->GetType() == GraphicType::NONE ) || mpGraphic->GetReaderContext() )
{
if ( ImplImportGraphic( *mpGraphic ) )
maDoneHdl.Call( mpGraphic.get() );
diff --git a/include/vcl/graph.hxx b/include/vcl/graph.hxx
index c1fadb49d9cb..6986f5f9b0b1 100644
--- a/include/vcl/graph.hxx
+++ b/include/vcl/graph.hxx
@@ -182,8 +182,8 @@ public:
public:
- std::shared_ptr<GraphicReader>& GetContext();
- void SetContext( const std::shared_ptr<GraphicReader> &pReader );
+ std::shared_ptr<GraphicReader>& GetReaderContext();
+ void SetReaderContext( const std::shared_ptr<GraphicReader> &pReader );
void SetDummyContext(bool value);
bool IsDummyContext() const;
private:
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 );
}
More information about the Libreoffice-commits
mailing list