diff options
author | Zolnai Tamás <tamas.zolnai@collabora.com> | 2014-11-07 10:42:55 +0100 |
---|---|---|
committer | Zolnai Tamás <tamas.zolnai@collabora.com> | 2014-11-07 10:45:16 +0100 |
commit | 4c9aa743fc83b3f3c5b35eeff79c1ffdae90c1fa (patch) | |
tree | 937ea954937a4c37eadd66684d34eb13f6589575 /svtools/source/graphic | |
parent | 78657d31ca3118759b7e817d12886f3b713aea07 (diff) |
Swapping Graphic is a privilage of GraphicObject.
This means more things:
* Graphic won't swap out itself, so those classes which uses
Graphic without GraphicObject won't need to deal with swapping.
* When a Graphic is queried from GraphicObject the caller won't
need to deal with swapping, because GraphicObject swaps it in
before return.
* GraphicObject will swap in the Graphic always when a swapping
dependent data is queried (e.g. whole graphic, transformed graphic
or AnimationNotifyHdl)
Change-Id: I2bf6e37291ec94146f10aac4a35084682437ed16
Diffstat (limited to 'svtools/source/graphic')
-rw-r--r-- | svtools/source/graphic/grfmgr.cxx | 6 | ||||
-rw-r--r-- | svtools/source/graphic/grfmgr2.cxx | 2 |
2 files changed, 3 insertions, 5 deletions
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() ) { |