summaryrefslogtreecommitdiff
path: root/sw/source/core/doc/notxtfrm.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/core/doc/notxtfrm.cxx')
-rw-r--r--sw/source/core/doc/notxtfrm.cxx21
1 files changed, 12 insertions, 9 deletions
diff --git a/sw/source/core/doc/notxtfrm.cxx b/sw/source/core/doc/notxtfrm.cxx
index 05935356fc0f..c42d80201065 100644
--- a/sw/source/core/doc/notxtfrm.cxx
+++ b/sw/source/core/doc/notxtfrm.cxx
@@ -609,7 +609,7 @@ sal_Bool SwNoTxtFrm::GetCrsrOfst(SwPosition* pPos, Point& ,
}
#define CLEARCACHE( pNd ) {\
- (pNd)->GetGrfObj().ReleaseFromCache();\
+ (pNd)->ReleaseGraphicFromCache();\
SwFlyFrm* pFly = FindFlyFrm();\
if( pFly && pFly->GetFmt()->GetSurround().IsContour() )\
{\
@@ -907,7 +907,7 @@ void SwNoTxtFrm::PaintPicture( OutputDevice* pOut, const SwRect &rGrfArea ) cons
}
bool bForceSwap = false, bContinue = true;
- GraphicObject& rGrfObj = pGrfNd->GetGrfObj();
+ const GraphicObject& rGrfObj = pGrfNd->GetGrfObj();
GraphicAttr aGrfAttr;
pGrfNd->GetGraphicAttr( aGrfAttr, this );
@@ -944,9 +944,9 @@ void SwNoTxtFrm::PaintPicture( OutputDevice* pOut, const SwRect &rGrfArea ) cons
else if( rGrfObj.IsCached( pOut, aAlignedGrfArea.Pos(),
aAlignedGrfArea.SSize(), &aGrfAttr ))
{
- rGrfObj.DrawWithPDFHandling( *pOut,
- aAlignedGrfArea.Pos(), aAlignedGrfArea.SSize(),
- &aGrfAttr );
+ pGrfNd->DrawGraphicWithPDFHandling(*pOut,
+ aAlignedGrfArea.Pos(), aAlignedGrfArea.SSize(),
+ &aGrfAttr );
bContinue = false;
}
}
@@ -979,7 +979,7 @@ void SwNoTxtFrm::PaintPicture( OutputDevice* pOut, const SwRect &rGrfArea ) cons
pShell->GetViewOptions()->IsPDFExport(),
"pOut should not be a virtual device" );
- rGrfObj.StartAnimation( pOut, aAlignedGrfArea.Pos(),
+ pGrfNd->StartGraphicAnimation(pOut, aAlignedGrfArea.Pos(),
aAlignedGrfArea.SSize(), long(this),
0, GRFMGR_DRAW_STANDARD, pVout );
}
@@ -1012,7 +1012,7 @@ void SwNoTxtFrm::PaintPicture( OutputDevice* pOut, const SwRect &rGrfArea ) cons
if(!bDone)
{
// fallback paint, uses replacement image
- rGrfObj.DrawWithPDFHandling(*pOut, aAlignedGrfArea.Pos(), aAlignedGrfArea.SSize(), &aGrfAttr);
+ pGrfNd->DrawGraphicWithPDFHandling(*pOut, aAlignedGrfArea.Pos(), aAlignedGrfArea.SSize(), &aGrfAttr);
}
}
}
@@ -1170,9 +1170,12 @@ sal_Bool SwNoTxtFrm::IsTransparent() const
void SwNoTxtFrm::StopAnimation( OutputDevice* pOut ) const
{
// Stop animated graphics
- SwGrfNode* pGrfNd = (SwGrfNode*)GetNode()->GetGrfNode();
+ const SwGrfNode* pGrfNd = dynamic_cast< const SwGrfNode* >(GetNode()->GetGrfNode());
+
if( pGrfNd && pGrfNd->IsAnimated() )
- pGrfNd->GetGrfObj().StopAnimation( pOut, long(this) );
+ {
+ const_cast< SwGrfNode* >(pGrfNd)->StopGraphicAnimation( pOut, long(this) );
+ }
}