diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2018-04-02 18:38:39 +0900 |
---|---|---|
committer | Ashod Nakashian <ashod.nakashian@collabora.co.uk> | 2018-06-09 21:30:46 -0400 |
commit | dcae336143f25a2fb98d4c4adee6df4e5cef4053 (patch) | |
tree | f8af90ffc0dc9cf8d407799aa86b7e85bd389215 | |
parent | c5a524588fc4ec44fc0008517751bb1041b25deb (diff) |
graphic: rename Set{Get,Is}Link to Set{Get,Is}GfxLink
The main reason is to differentiate when we have the GfxLink from
other (url, file) links which use the same terminology.
Reviewed-on: https://gerrit.libreoffice.org/52245
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
(cherry picked from commit 11163faafe718e65b25f0dfea8700d1a18d4dee6)
Change-Id: I805c61e7fb231062340562c51c25a189b2cfc7f7
26 files changed, 60 insertions, 60 deletions
diff --git a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx index 172b82bf00e6..1cb3f94bc920 100644 --- a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx +++ b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx @@ -774,7 +774,7 @@ namespace drawinglayer // svtools/source/graphic/grfmgr.cxx const Graphic& rGraphic = rGraphicPrimitive.getGraphicObject().GetGraphic(); - if(rGraphic.IsLink()) + if(rGraphic.IsGfxLink()) { const GraphicAttr& rAttr = rGraphicPrimitive.getGraphicAttr(); diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx index 9dc283e501ff..5539908e2d9f 100644 --- a/filter/source/msfilter/escherex.cxx +++ b/filter/source/msfilter/escherex.cxx @@ -4228,9 +4228,9 @@ sal_uInt32 EscherGraphicProvider::GetBlibID( SvStream& rPicOutStrm, const OStrin const sal_uInt8* pGraphicAry = nullptr; - if ( p_EscherBlibEntry->mbIsNativeGraphicPossible && aGraphic.IsLink() ) + if ( p_EscherBlibEntry->mbIsNativeGraphicPossible && aGraphic.IsGfxLink() ) { - aGraphicLink = aGraphic.GetLink(); + aGraphicLink = aGraphic.GetGfxLink(); p_EscherBlibEntry->mnSize = aGraphicLink.GetDataSize(); pGraphicAry = aGraphicLink.GetData(); diff --git a/include/vcl/graph.hxx b/include/vcl/graph.hxx index 1902da49d60f..7aec891e05ff 100644 --- a/include/vcl/graph.hxx +++ b/include/vcl/graph.hxx @@ -210,9 +210,9 @@ private: bool IsSwapOut() const; public: - void SetLink( const GfxLink& ); - GfxLink GetLink() const; - bool IsLink() const; + void SetGfxLink(const GfxLink& rGfxLink); + GfxLink GetGfxLink() const; + bool IsGfxLink() const; bool ExportNative( SvStream& rOStream ) const; diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx index 986c71ffee06..7d3414414f69 100644 --- a/oox/source/export/drawingml.cxx +++ b/oox/source/export/drawingml.cxx @@ -839,7 +839,7 @@ const char* DrawingML::GetRelationCompPrefix() OUString DrawingML::WriteImage( const Graphic& rGraphic , bool bRelPathToMedia ) { - GfxLink aLink = rGraphic.GetLink (); + GfxLink aLink = rGraphic.GetGfxLink (); OUString sMediaType; const char* pExtension = ""; OUString sRelId; diff --git a/sd/source/filter/pdf/sdpdffilter.cxx b/sd/source/filter/pdf/sdpdffilter.cxx index 01e6ee5623de..538c4e1ec44a 100644 --- a/sd/source/filter/pdf/sdpdffilter.cxx +++ b/sd/source/filter/pdf/sdpdffilter.cxx @@ -127,7 +127,7 @@ bool SdPdfFilter::Import() Graphic aGraphic(aBitmap); aGraphic.setPdfData(pPdfData); aGraphic.setPageNumber(nPageNumber); - aGraphic.SetLink(aGfxLink); + aGraphic.SetGfxLink(aGfxLink); aGraphic.setOriginURL(aFileName); // Create the page and insert the Graphic. diff --git a/sfx2/source/appl/fileobj.cxx b/sfx2/source/appl/fileobj.cxx index e7ced1bfa4f9..3d8b8d2942e3 100644 --- a/sfx2/source/appl/fileobj.cxx +++ b/sfx2/source/appl/fileobj.cxx @@ -299,9 +299,9 @@ bool SvFileObject::GetGraphic_Impl( Graphic& rGrf, SvStream* pStream ) int nRes; // To avoid that a native link is created - if( !rGrf.IsLink() && + if( !rGrf.IsGfxLink() && !rGrf.GetContext() && !bNativFormat ) - rGrf.SetLink( GfxLink() ); + rGrf.SetGfxLink( GfxLink() ); if( !pStream ) nRes = xMed.Is() ? GRFILTER_OPENERROR diff --git a/svtools/source/graphic/descriptor.cxx b/svtools/source/graphic/descriptor.cxx index 5b00e0215808..0a6728d25bd1 100644 --- a/svtools/source/graphic/descriptor.cxx +++ b/svtools/source/graphic/descriptor.cxx @@ -300,11 +300,11 @@ void GraphicDescriptor::_getPropertyValues( const comphelper::PropertyMapEntry** if( mpGraphic ) { - if( mpGraphic->IsLink() ) + if( mpGraphic->IsGfxLink() ) { const char* pMimeType; - switch( mpGraphic->GetLink().GetType() ) + switch( mpGraphic->GetGfxLink().GetType() ) { case GfxLinkType::NativeGif: pMimeType = MIMETYPE_GIF; break; diff --git a/svtools/source/graphic/grfcache.cxx b/svtools/source/graphic/grfcache.cxx index 8def38eca49f..86171e98de6c 100644 --- a/svtools/source/graphic/grfcache.cxx +++ b/svtools/source/graphic/grfcache.cxx @@ -260,8 +260,8 @@ bool GraphicCacheEntry::ImplInit( const GraphicObject& rObj ) break; } - if( rGraphic.IsLink() ) - maGfxLink = ( (Graphic&) rGraphic ).GetLink(); + if( rGraphic.IsGfxLink() ) + maGfxLink = rGraphic.GetGfxLink(); else maGfxLink = GfxLink(); @@ -280,8 +280,8 @@ void GraphicCacheEntry::ImplFillSubstitute( Graphic& rSubstitute ) const GraphicType eOldType = rSubstitute.GetType(); const bool bDefaultType = ( rSubstitute.GetType() == GraphicType::Default ); - if( rSubstitute.IsLink() && ( GfxLinkType::NONE == maGfxLink.GetType() ) ) - maGfxLink = rSubstitute.GetLink(); + if( rSubstitute.IsGfxLink() && ( GfxLinkType::NONE == maGfxLink.GetType() ) ) + maGfxLink = rSubstitute.GetGfxLink(); if(maSvgData.get()) { @@ -315,7 +315,7 @@ void GraphicCacheEntry::ImplFillSubstitute( Graphic& rSubstitute ) if( GfxLinkType::NONE != maGfxLink.GetType() ) { - rSubstitute.SetLink( maGfxLink ); + rSubstitute.SetGfxLink( maGfxLink ); } if( bDefaultType ) diff --git a/svx/source/core/graphichelper.cxx b/svx/source/core/graphichelper.cxx index 6cc42187a631..355cfc23d3c2 100644 --- a/svx/source/core/graphichelper.cxx +++ b/svx/source/core/graphichelper.cxx @@ -70,7 +70,7 @@ namespace drawing = com::sun::star::drawing; void GraphicHelper::GetPreferredExtension( OUString& rExtension, const Graphic& rGraphic ) { OUString aExtension = "png"; - switch( rGraphic.GetLink().GetType() ) + switch( rGraphic.GetGfxLink().GetType() ) { case GfxLinkType::NativeGif: aExtension = "gif"; diff --git a/svx/source/dialog/compressgraphicdialog.cxx b/svx/source/dialog/compressgraphicdialog.cxx index 4188b85a79e8..b763654933ff 100644 --- a/svx/source/dialog/compressgraphicdialog.cxx +++ b/svx/source/dialog/compressgraphicdialog.cxx @@ -143,7 +143,7 @@ void CompressGraphicsDialog::Initialize() void CompressGraphicsDialog::Update() { - GfxLinkType aLinkType = m_aGraphic.GetLink().GetType(); + GfxLinkType aLinkType = m_aGraphic.GetGfxLink().GetType(); OUString aGraphicTypeString; switch(aLinkType) { diff --git a/svx/source/gallery2/galtheme.cxx b/svx/source/gallery2/galtheme.cxx index 02ea64cd7a2a..adf5194d3bb3 100644 --- a/svx/source/gallery2/galtheme.cxx +++ b/svx/source/gallery2/galtheme.cxx @@ -846,7 +846,7 @@ bool GalleryTheme::InsertGraphic( const Graphic& rGraphic, sal_uIntPtr nInsertPo if( rGraphic.GetType() != GraphicType::NONE ) { ConvertDataFormat nExportFormat = ConvertDataFormat::Unknown; - const GfxLink aGfxLink( ( (Graphic&) rGraphic ).GetLink() ); + const GfxLink aGfxLink( rGraphic.GetGfxLink() ); if( aGfxLink.GetDataSize() ) { diff --git a/svx/source/svdraw/svdograf.cxx b/svx/source/svdraw/svdograf.cxx index 7a8b743c36b6..b4b547e05e36 100644 --- a/svx/source/svdraw/svdograf.cxx +++ b/svx/source/svdraw/svdograf.cxx @@ -1462,10 +1462,10 @@ Reference< XInputStream > SdrGrafObj::getInputStream() if( pModel ) { - if( pGraphic && GetGraphic().IsLink() ) + if( pGraphic && GetGraphic().IsGfxLink() ) { Graphic aGraphic( GetGraphic() ); - GfxLink aLink( aGraphic.GetLink() ); + GfxLink aLink( aGraphic.GetGfxLink() ); sal_uInt32 nSize = aLink.GetDataSize(); const void* pSourceData = static_cast<const void*>(aLink.GetData()); if( nSize && pSourceData ) diff --git a/svx/source/unodraw/unoshap4.cxx b/svx/source/unodraw/unoshap4.cxx index c806e75e27e2..0b3bbafaa801 100644 --- a/svx/source/unodraw/unoshap4.cxx +++ b/svx/source/unodraw/unoshap4.cxx @@ -226,9 +226,9 @@ bool SvxOle2Shape::getPropertyValueImpl( const OUString& rName, const SfxItemPro if( pGraphic ) { bool bIsWMF = false; - if ( pGraphic->IsLink() ) + if ( pGraphic->IsGfxLink() ) { - GfxLink aLnk = pGraphic->GetLink(); + GfxLink aLnk = pGraphic->GetGfxLink(); if ( aLnk.GetType() == GfxLinkType::NativeWmf ) { bIsWMF = true; diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx index ca6d8e9e027a..97fce1a606d3 100644 --- a/svx/source/unodraw/unoshape.cxx +++ b/svx/source/unodraw/unoshape.cxx @@ -2868,9 +2868,9 @@ bool SvxShape::getPropertyValueImpl( const OUString&, const SfxItemPropertySimpl if( pGraphic ) { bool bIsWMF = false; - if ( pGraphic->IsLink() ) + if ( pGraphic->IsGfxLink() ) { - GfxLink aLnk = pGraphic->GetLink(); + GfxLink aLnk = pGraphic->GetGfxLink(); if ( aLnk.GetType() == GfxLinkType::NativeWmf ) { bIsWMF = true; diff --git a/svx/source/xml/xmlgrhlp.cxx b/svx/source/xml/xmlgrhlp.cxx index f14396447995..1add678a67b1 100644 --- a/svx/source/xml/xmlgrhlp.cxx +++ b/svx/source/xml/xmlgrhlp.cxx @@ -109,9 +109,9 @@ SvXMLGraphicInputStream::SvXMLGraphicInputStream( const OUString& rGraphicId ) if( pStm ) { - Graphic aGraphic( (Graphic&) aGrfObject.GetGraphic() ); - const GfxLink aGfxLink( aGraphic.GetLink() ); - bool bRet = false; + Graphic aGraphic(aGrfObject.GetGraphic()); + const GfxLink aGfxLink(aGraphic.GetGfxLink()); + bool bRet = false; if( aGfxLink.GetDataSize() && aGfxLink.GetData() ) { @@ -524,7 +524,7 @@ bool SvXMLGraphicHelper::ImplWriteGraphic( const OUString& rPictureStorageName, if( aStream.xStream.is() ) { Graphic aGraphic( (Graphic&) aGrfObject.GetGraphic() ); - const GfxLink aGfxLink( aGraphic.GetLink() ); + const GfxLink aGfxLink( aGraphic.GetGfxLink() ); const OUString aMimeType( ImplGetGraphicMimeType( rPictureStreamName ) ); uno::Reference < beans::XPropertySet > xProps( aStream.xStream, uno::UNO_QUERY ); @@ -681,7 +681,7 @@ void SvXMLGraphicHelper::ImplInsertGraphicURL( const OUString& rURLStr, sal_uInt { OUString aStreamName( aPictureStreamName ); Graphic aGraphic( (Graphic&) aGrfObject.GetGraphic() ); - const GfxLink aGfxLink( aGraphic.GetLink() ); + const GfxLink aGfxLink( aGraphic.GetGfxLink() ); OUString aExtension; bool bUseGfxLink( true ); diff --git a/svx/source/xoutdev/_xoutbmp.cxx b/svx/source/xoutdev/_xoutbmp.cxx index c033d671f910..6f2a9bb67f45 100644 --- a/svx/source/xoutdev/_xoutbmp.cxx +++ b/svx/source/xoutdev/_xoutbmp.cxx @@ -197,10 +197,10 @@ sal_uInt16 XOutBitmap::WriteGraphic( const Graphic& rGraphic, OUString& rFileNam if( ( nFlags & XOutFlags::UseNativeIfPossible ) && !( nFlags & XOutFlags::MirrorHorz ) && !( nFlags & XOutFlags::MirrorVert ) && - ( rGraphic.GetType() != GraphicType::GdiMetafile ) && rGraphic.IsLink() ) + ( rGraphic.GetType() != GraphicType::GdiMetafile ) && rGraphic.IsGfxLink() ) { // try to write native link - const GfxLink aGfxLink( ( (Graphic&) rGraphic ).GetLink() ); + const GfxLink aGfxLink( rGraphic.GetGfxLink() ); switch( aGfxLink.GetType() ) { @@ -352,7 +352,7 @@ bool XOutBitmap::GraphicToBase64(const Graphic& rGraphic, OUString& rOUString) { SvMemoryStream aOStm; OUString aMimeType; - GfxLink aLink = rGraphic.GetLink(); + GfxLink aLink = rGraphic.GetGfxLink(); ConvertDataFormat aCvtType; switch( aLink.GetType() ) { diff --git a/sw/source/core/doc/notxtfrm.cxx b/sw/source/core/doc/notxtfrm.cxx index fac239e3dea4..1159fbdf3663 100644 --- a/sw/source/core/doc/notxtfrm.cxx +++ b/sw/source/core/doc/notxtfrm.cxx @@ -791,7 +791,7 @@ void paintGraphicUsingPrimitivesHelper(vcl::RenderContext & rOutputDevice, // - it's indeed a jpeg graphic (could be checked by the url ending, but is more reliable to check later) // In all other cases (normal repaint, print, etc...) use the available Graphic with the // already loaded pixel graphic as before this change. - if (rOutputDevice.GetExtOutDevData() && rGrfObj.HasLink() && !rGrfObj.GetGraphic().IsLink()) + if (rOutputDevice.GetExtOutDevData() && rGrfObj.HasLink() && !rGrfObj.GetGraphic().IsGfxLink()) { const vcl::PDFExtOutDevData* pPDFExt = dynamic_cast< const vcl::PDFExtOutDevData* >(rOutputDevice.GetExtOutDevData()); @@ -802,7 +802,7 @@ void paintGraphicUsingPrimitivesHelper(vcl::RenderContext & rOutputDevice, if (GRFILTER_OK == GraphicFilter::GetGraphicFilter().ImportGraphic(aTempGraphic, aURL)) { - if(aTempGraphic.IsLink() && GfxLinkType::NativeJpg == aTempGraphic.GetLink().GetType()) + if(aTempGraphic.IsGfxLink() && GfxLinkType::NativeJpg == aTempGraphic.GetGfxLink().GetType()) { aContent[0] = new drawinglayer::primitive2d::GraphicPrimitive2D( aTargetTransform, diff --git a/sw/source/core/graphic/ndgrf.cxx b/sw/source/core/graphic/ndgrf.cxx index 9739f0aaab2a..82f0678a1843 100644 --- a/sw/source/core/graphic/ndgrf.cxx +++ b/sw/source/core/graphic/ndgrf.cxx @@ -741,7 +741,7 @@ void SwGrfNode::ReleaseLink() { const OUString aFileName(maGrfObj.GetLink()); const Graphic aLocalGraphic(maGrfObj.GetGraphic()); - const bool bHasOriginalData(aLocalGraphic.IsLink()); + const bool bHasOriginalData(aLocalGraphic.IsGfxLink()); { bInSwapIn = true; diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx index 3eaf92920382..0494a605dada 100644 --- a/sw/source/filter/ww8/rtfattributeoutput.cxx +++ b/sw/source/filter/ww8/rtfattributeoutput.cxx @@ -3840,9 +3840,9 @@ void RtfAttributeOutput::FlyFrameGraphic(const SwFlyFrameFormat* pFlyFrameFormat GfxLink aGraphicLink; const sal_Char* pBLIPType = nullptr; - if (rGraphic.IsLink()) + if (rGraphic.IsGfxLink()) { - aGraphicLink = rGraphic.GetLink(); + aGraphicLink = rGraphic.GetGfxLink(); nSize = aGraphicLink.GetDataSize(); pGraphicAry = aGraphicLink.GetData(); switch (aGraphicLink.GetType()) diff --git a/vcl/source/filter/GraphicNativeMetadata.cxx b/vcl/source/filter/GraphicNativeMetadata.cxx index aea930d7174f..e58a449ece68 100644 --- a/vcl/source/filter/GraphicNativeMetadata.cxx +++ b/vcl/source/filter/GraphicNativeMetadata.cxx @@ -34,7 +34,7 @@ GraphicNativeMetadata::~GraphicNativeMetadata() bool GraphicNativeMetadata::read(Graphic& rGraphic) { - GfxLink aLink = rGraphic.GetLink(); + GfxLink aLink = rGraphic.GetGfxLink(); if ( aLink.GetType() != GfxLinkType::NativeJpg ) return false; diff --git a/vcl/source/filter/GraphicNativeTransform.cxx b/vcl/source/filter/GraphicNativeTransform.cxx index fc6143296072..94ab0112cdde 100644 --- a/vcl/source/filter/GraphicNativeTransform.cxx +++ b/vcl/source/filter/GraphicNativeTransform.cxx @@ -36,7 +36,7 @@ GraphicNativeTransform::~GraphicNativeTransform() bool GraphicNativeTransform::canBeRotated() { - GfxLink aLink = mrGraphic.GetLink(); + GfxLink aLink = mrGraphic.GetGfxLink(); // Don't allow rotation on animations for now if (mrGraphic.IsAnimated()) @@ -69,7 +69,7 @@ bool GraphicNativeTransform::rotate(sal_uInt16 aInputRotation) return false; } - GfxLink aLink = mrGraphic.GetLink(); + GfxLink aLink = mrGraphic.GetGfxLink(); if ( aLink.GetType() == GfxLinkType::NativeJpg ) { return rotateJPEG(aRotation); @@ -149,7 +149,7 @@ bool GraphicNativeTransform::rotateJPEG(sal_uInt16 aRotation) } else { - GfxLink aLink = mrGraphic.GetLink(); + GfxLink aLink = mrGraphic.GetGfxLink(); SvMemoryStream aSourceStream; aSourceStream.WriteBytes(aLink.GetData(), aLink.GetDataSize()); diff --git a/vcl/source/filter/graphicfilter.cxx b/vcl/source/filter/graphicfilter.cxx index e91c74df7443..8b57c8085b26 100644 --- a/vcl/source/filter/graphicfilter.cxx +++ b/vcl/source/filter/graphicfilter.cxx @@ -1336,7 +1336,7 @@ sal_uInt16 GraphicFilter::ImportGraphic( Graphic& rGraphic, const OUString& rPat std::shared_ptr<GraphicReader> pContext = rGraphic.GetContext(); GfxLinkType eLinkType = GfxLinkType::NONE; bool bDummyContext = rGraphic.IsDummyContext(); - const bool bLinkSet = rGraphic.IsLink(); + const bool bLinkSet = rGraphic.IsGfxLink(); FilterConfigItem* pFilterConfigItem = nullptr; Size aPreviewSizeHint( 0, 0 ); @@ -1778,7 +1778,7 @@ sal_uInt16 GraphicFilter::ImportGraphic( Graphic& rGraphic, const OUString& rPat } if( nStatus == GRFILTER_OK ) { - rGraphic.SetLink( GfxLink( std::move(pGraphicContent), nGraphicContentSize, eLinkType ) ); + rGraphic.SetGfxLink( GfxLink( std::move(pGraphicContent), nGraphicContentSize, eLinkType ) ); } } diff --git a/vcl/source/gdi/graph.cxx b/vcl/source/gdi/graph.cxx index cbdf5df56ea5..9a84d8370a5e 100644 --- a/vcl/source/gdi/graph.cxx +++ b/vcl/source/gdi/graph.cxx @@ -546,18 +546,18 @@ bool Graphic::IsSwapOut() const return mxImpGraphic->ImplIsSwapOut(); } -void Graphic::SetLink( const GfxLink& rGfxLink ) +void Graphic::SetGfxLink( const GfxLink& rGfxLink ) { ImplTestRefCount(); mxImpGraphic->ImplSetLink( rGfxLink ); } -GfxLink Graphic::GetLink() const +GfxLink Graphic::GetGfxLink() const { return mxImpGraphic->ImplGetLink(); } -bool Graphic::IsLink() const +bool Graphic::IsGfxLink() const { return mxImpGraphic->ImplIsLink(); } diff --git a/vcl/source/gdi/impgraph.cxx b/vcl/source/gdi/impgraph.cxx index 798b7c85f745..0e24562a2119 100644 --- a/vcl/source/gdi/impgraph.cxx +++ b/vcl/source/gdi/impgraph.cxx @@ -1464,7 +1464,7 @@ SvStream& ReadImpGraphic( SvStream& rIStm, ImpGraphic& rImpGraphic ) // set dummy link to avoid creation of additional link after filtering; // we set a default link to avoid unnecessary swapping of native data - aGraphic.SetLink( GfxLink() ); + aGraphic.SetGfxLink( GfxLink() ); if( !rIStm.GetError() && aLink.LoadNative( aGraphic ) ) { diff --git a/vcl/source/gdi/pdfextoutdevdata.cxx b/vcl/source/gdi/pdfextoutdevdata.cxx index 589c381cacbf..f433e9b76cf9 100644 --- a/vcl/source/gdi/pdfextoutdevdata.cxx +++ b/vcl/source/gdi/pdfextoutdevdata.cxx @@ -437,10 +437,10 @@ bool PageSyncData::PlaySyncPageAct( PDFWriter& rWriter, sal_uInt32& rCurGDIMtfAc else if ( aBeg->eAct == PDFExtOutDevDataSync::EndGroupGfxLink ) { Graphic& rGraphic = mGraphics.front(); - if ( rGraphic.IsLink() ) + if ( rGraphic.IsGfxLink() && mParaRects.size() >= 2 ) { - GfxLinkType eType = rGraphic.GetLink().GetType(); - if ( eType == GfxLinkType::NativeJpg && mParaRects.size() >= 2 ) + GfxLinkType eType = rGraphic.GetGfxLink().GetType(); + if ( eType == GfxLinkType::NativeJpg ) { mbGroupIgnoreGDIMtfActions = rOutDevData.HasAdequateCompression( @@ -448,7 +448,7 @@ bool PageSyncData::PlaySyncPageAct( PDFWriter& rWriter, sal_uInt32& rCurGDIMtfAc if ( !mbGroupIgnoreGDIMtfActions ) mCurrentGraphic = rGraphic; } - else if ((eType == GfxLinkType::NativePng || eType == GfxLinkType::NativePdf) && mParaRects.size() >= 2) + else if ( eType == GfxLinkType::NativePng || eType == GfxLinkType::NativePdf ) { if ( rOutDevData.HasAdequateCompression(rGraphic, mParaRects[0], mParaRects[1]) || eType == GfxLinkType::NativePdf ) mCurrentGraphic = rGraphic; @@ -482,7 +482,7 @@ bool PageSyncData::PlaySyncPageAct( PDFWriter& rWriter, sal_uInt32& rCurGDIMtfAc { bool bClippingNeeded = ( aOutputRect != aVisibleOutputRect ) && !aVisibleOutputRect.IsEmpty(); - GfxLink aGfxLink( aGraphic.GetLink() ); + GfxLink aGfxLink( aGraphic.GetGfxLink() ); if ( aGfxLink.GetType() == GfxLinkType::NativeJpg ) { if ( bClippingNeeded ) @@ -862,10 +862,10 @@ bool PDFExtOutDevData::HasAdequateCompression( const Graphic &rGraphic, { bool bReduceResolution = false; - assert(rGraphic.IsLink() && - (rGraphic.GetLink().GetType() == GfxLinkType::NativeJpg || - rGraphic.GetLink().GetType() == GfxLinkType::NativePng || - rGraphic.GetLink().GetType() == GfxLinkType::NativePdf)); + assert(rGraphic.IsGfxLink() && + (rGraphic.GetGfxLink().GetType() == GfxLinkType::NativeJpg || + rGraphic.GetGfxLink().GetType() == GfxLinkType::NativePng || + rGraphic.GetGfxLink().GetType() == GfxLinkType::NativePdf)); // small items better off as PNG anyway if ( rGraphic.GetSizePixel().Width() < 32 && @@ -876,7 +876,7 @@ bool PDFExtOutDevData::HasAdequateCompression( const Graphic &rGraphic, Size aSize = rGraphic.GetSizePixel(); sal_Int32 nCurrentRatio = (100 * aSize.Width() * aSize.Height() * 4) / - rGraphic.GetLink().GetDataSize(); + rGraphic.GetGfxLink().GetDataSize(); if ( GetIsLosslessCompression() ) return !bReduceResolution && !GetIsReduceImageResolution(); diff --git a/vcl/source/gdi/pdfwriter_impl2.cxx b/vcl/source/gdi/pdfwriter_impl2.cxx index c7fd2a4031df..62facafc2a39 100644 --- a/vcl/source/gdi/pdfwriter_impl2.cxx +++ b/vcl/source/gdi/pdfwriter_impl2.cxx @@ -99,7 +99,7 @@ void PDFWriterImpl::implWriteBitmapEx( const Point& i_rPoint, const Size& i_rSiz bool bIsJpeg = false, bIsPng = false; if( i_Graphic.GetType() != GraphicType::NONE && i_Graphic.GetBitmapEx() == aBitmapEx ) { - GfxLinkType eType = i_Graphic.GetLink().GetType(); + GfxLinkType eType = i_Graphic.GetGfxLink().GetType(); bIsJpeg = (eType == GfxLinkType::NativeJpg); bIsPng = (eType == GfxLinkType::NativePng); } |