summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/svtools/grfmgr.hxx2
-rw-r--r--include/vcl/graph.hxx3
-rw-r--r--oox/source/export/drawingml.cxx13
-rw-r--r--svtools/source/graphic/grfmgr.cxx6
-rw-r--r--svtools/source/graphic/grfmgr2.cxx2
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.cxx5
-rw-r--r--vcl/source/gdi/cvtgrf.cxx2
7 files changed, 7 insertions, 26 deletions
diff --git a/include/svtools/grfmgr.hxx b/include/svtools/grfmgr.hxx
index d9c19544c548..d51577345347 100644
--- a/include/svtools/grfmgr.hxx
+++ b/include/svtools/grfmgr.hxx
@@ -412,7 +412,7 @@ public:
bool IsAnimated() const { return mbAnimated; }
bool IsEPS() const { return mbEPS; }
- Link GetAnimationNotifyHdl() const { return maGraphic.GetAnimationNotifyHdl(); }
+ Link GetAnimationNotifyHdl() const { return GetGraphic().GetAnimationNotifyHdl(); }
bool SwapOut();
bool SwapOut( SvStream* pOStm );
diff --git a/include/vcl/graph.hxx b/include/vcl/graph.hxx
index b55e79015cec..8727b9c13e2b 100644
--- a/include/vcl/graph.hxx
+++ b/include/vcl/graph.hxx
@@ -176,6 +176,8 @@ public:
const OUString& GetDocFileName() const;
sal_uLong GetDocFilePos() const;
+private:
+ friend class GraphicObject;
bool SwapOut();
void SwapOutAsLink();
bool SwapOut( SvStream* pOStm );
@@ -183,6 +185,7 @@ public:
bool SwapIn( SvStream* pIStm );
bool IsSwapOut() const;
+public:
void SetLink( const GfxLink& );
GfxLink GetLink() const;
bool IsLink() const;
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index 7a9689b8a91a..6b0e4dc73ff0 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -866,19 +866,6 @@ OUString DrawingML::WriteImage( const Graphic& rGraphic , bool bRelPathToMedia )
GraphicType aType = rGraphic.GetType();
if ( aType == GRAPHIC_BITMAP || aType == GRAPHIC_GDIMETAFILE)
{
- bool bSwapped = rGraphic.IsSwapOut();
-
- //Warn rather than just happily swap in because of the comments
- //in the sw export filters about needing to go through the
- //hairy SwGrfNode::SwapIn which we would subvert by swapping in
- //without it knowing about it, so while those ones are fixed we
- //probably have to assume that we should ideally be presented
- //here with already swapped in graphics.
- SAL_WARN_IF(bSwapped, "oox", "attempted to output swapped out graphic");
-
- if (bSwapped)
- const_cast<Graphic&>(rGraphic).SwapIn();
-
if ( aType == GRAPHIC_BITMAP )
{
GraphicConverter::Export( aStream, rGraphic, CVT_PNG );
diff --git a/svtools/source/graphic/grfmgr.cxx b/svtools/source/graphic/grfmgr.cxx
index fa87a2ec8c4f..63a3b9d7183e 100644
--- a/svtools/source/graphic/grfmgr.cxx
+++ b/svtools/source/graphic/grfmgr.cxx
@@ -694,9 +694,7 @@ void GraphicObject::StopAnimation( OutputDevice* pOut, long nExtraData )
const Graphic& GraphicObject::GetGraphic() const
{
GraphicObject *pThis = const_cast<GraphicObject*>(this);
-
- if (mbAutoSwapped)
- pThis->ImplAutoSwapIn();
+ pThis->SwapIn();
//fdo#50697 If we've been asked to provide the graphic, then reset
//the cache timeout to start from now and not remain at the
@@ -736,7 +734,7 @@ void GraphicObject::SetGraphic( const Graphic& rGraphic, const OUString& rLink )
Graphic GraphicObject::GetTransformedGraphic( const Size& rDestSize, const MapMode& rDestMap, const GraphicAttr& rAttr ) const
{
// #104550# Extracted from svx/source/svdraw/svdograf.cxx
- Graphic aTransGraphic( maGraphic );
+ Graphic aTransGraphic( GetGraphic() );
const GraphicType eType = GetType();
const Size aSrcSize( aTransGraphic.GetPrefSize() );
diff --git a/svtools/source/graphic/grfmgr2.cxx b/svtools/source/graphic/grfmgr2.cxx
index 7f93bf96f9d7..d054ab36053d 100644
--- a/svtools/source/graphic/grfmgr2.cxx
+++ b/svtools/source/graphic/grfmgr2.cxx
@@ -279,7 +279,7 @@ bool GraphicManager::ImplDraw( OutputDevice* pOut, const Point& rPt,
const Graphic& rGraphic = rObj.GetGraphic();
bool bRet = false;
- if( rGraphic.IsSupportedGraphic() && !rGraphic.IsSwapOut() )
+ if( rGraphic.IsSupportedGraphic() && !rObj.IsSwappedOut() )
{
if( GRAPHIC_BITMAP == rGraphic.GetType() )
{
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index c563f6aeb9c6..e7305fd21e82 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -4089,11 +4089,6 @@ void DocxAttributeOutput::FlyFrameGraphic( const SwGrfNode* pGrfNode, const Size
// Not in cache, then need to write it.
m_rDrawingML.SetFS( m_pSerializer ); // to be sure that we write to the right stream
- if (pGraphic->IsSwapOut() && !pGrfNode)
- {
- const_cast<Graphic*>(pGraphic)->SwapIn();
- }
-
OUString aImageId = m_rDrawingML.WriteImage( *pGraphic );
aRelId = OUStringToOString( aImageId, RTL_TEXTENCODING_UTF8 );
diff --git a/vcl/source/gdi/cvtgrf.cxx b/vcl/source/gdi/cvtgrf.cxx
index 68e4e076449f..65cc9193292b 100644
--- a/vcl/source/gdi/cvtgrf.cxx
+++ b/vcl/source/gdi/cvtgrf.cxx
@@ -56,8 +56,6 @@ sal_uLong GraphicConverter::Import( SvStream& rIStm, Graphic& rGraphic, sal_uLon
sal_uLong GraphicConverter::Export( SvStream& rOStm, const Graphic& rGraphic, sal_uLong nFormat )
{
- SAL_WARN_IF(rGraphic.IsSwapOut(), "vcl.filter", "exporting a swapped out graphic!");
-
GraphicConverter* pCvt = ImplGetSVData()->maGDIData.mpGrfConverter;
sal_uLong nRet = ERRCODE_IO_GENERAL;