diff options
author | Armin Weiss <aw@openoffice.org> | 2002-05-15 12:20:33 +0000 |
---|---|---|
committer | Armin Weiss <aw@openoffice.org> | 2002-05-15 12:20:33 +0000 |
commit | b22cb79814d301c96270d3e3f2c3191901d58d36 (patch) | |
tree | b1688309952ac6750a0ffdf8eeb450dd74fded66 /svx/source | |
parent | 8a78a143b6eabce5d702d6b4a3d6db91f96b02dc (diff) |
#98825# Text animation is initialized and strted from this Paint() no one seems to use StartTextAnimation(...) or StopTextAnimation(...) at all. Thus, I need to stop text animation here when necessary.
Diffstat (limited to 'svx/source')
-rw-r--r-- | svx/source/svdraw/svdotext.cxx | 38 |
1 files changed, 35 insertions, 3 deletions
diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx index 463b6159e832..25d0d9c50dec 100644 --- a/svx/source/svdraw/svdotext.cxx +++ b/svx/source/svdraw/svdotext.cxx @@ -2,9 +2,9 @@ * * $RCSfile: svdotext.cxx,v $ * - * $Revision: 1.45 $ + * $Revision: 1.46 $ * - * last change: $Author: cl $ $Date: 2002-05-08 09:35:14 $ + * last change: $Author: aw $ $Date: 2002-05-15 13:20:33 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -1109,7 +1109,37 @@ FASTBOOL SdrTextObj::Paint(ExtOutputDevice& rXOut, const SdrPaintInfoRec& rInfoR } FASTBOOL bAnimated=GetTextAniKind()!=SDRTEXTANI_NONE; OutputDevice* pOutDev=rXOut.GetOutDev(); - if (bPrinter || (rInfoRec.nPaintMode & SDRPAINTMODE_ANILIKEPRN) !=0 || !bAnimated) + + // #98825# Text animation is initialized and strted from this Paint() + // no one seems to use StartTextAnimation(...) or StopTextAnimation(...) + // at all. Thus, I need to stop text animation here when necessary. + sal_Bool bDoNotPaintAnimatedText = + bPrinter || (rInfoRec.nPaintMode & SDRPAINTMODE_ANILIKEPRN) !=0 || !bAnimated; + + if(!bDoNotPaintAnimatedText) + { + // if animated text is disabled, do not start it here... + if(0L != rInfoRec.pPV) + { + const SdrView& rTargetView = rInfoRec.pPV->GetView(); + const SvtAccessibilityOptions& rOpt = ((SdrView&)rTargetView).getAccessibilityOptions(); + sal_Bool bIsAllowedAnimatedText = rOpt.GetIsAllowAnimatedText(); + + if(!bIsAllowedAnimatedText) + { + bDoNotPaintAnimatedText = sal_True; + + if(pPlusData && pPlusData->pAnimator) + { + pPlusData->pAnimator->Stop(); + delete pPlusData->pAnimator; + pPlusData->pAnimator = 0L; + } + } + } + } + + if(bDoNotPaintAnimatedText) { if (!bAnimated && pPlusData!=NULL && pPlusData->pAnimator!=NULL) { @@ -1213,7 +1243,9 @@ FASTBOOL SdrTextObj::Paint(ExtOutputDevice& rXOut, const SdrPaintInfoRec& rInfoR } } else + { ImpPaintAnimatedText(*rXOut.GetOutDev(),rXOut.GetOffset(),rOutliner,aAnchorRect,aPaintRect,rInfoRec); + } rOutliner.Clear(); } |