[Libreoffice-commits] .: sd/inc sd/source
Thorsten Behrens
thorsten at kemper.freedesktop.org
Tue May 8 15:17:03 PDT 2012
sd/inc/CustomAnimationEffect.hxx | 4 +++-
sd/source/core/CustomAnimationEffect.cxx | 17 ++++++++++-------
2 files changed, 13 insertions(+), 8 deletions(-)
New commits:
commit 5c2c03e9062d0c86d385a56c3ce1f536944927a2
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Wed May 9 00:14:32 2012 +0200
Fix fdo#43619 Animating only 2nd level paragraphs hides 1st level
diff --git a/sd/inc/CustomAnimationEffect.hxx b/sd/inc/CustomAnimationEffect.hxx
index 5d0c5e5..860db64 100644
--- a/sd/inc/CustomAnimationEffect.hxx
+++ b/sd/inc/CustomAnimationEffect.hxx
@@ -271,12 +271,14 @@ private:
EffectSequence maEffects;
::com::sun::star::uno::Reference< com::sun::star::drawing::XShape > maTarget;
+ enum { PARA_LEVELS = 5 };
+
sal_Int32 mnTextGrouping;
sal_Bool mbAnimateForm;
sal_Bool mbTextReverse;
double mfGroupingAuto;
sal_Int32 mnLastPara;
- sal_Int8 mnDepthFlags[5];
+ sal_Int8 mnDepthFlags[PARA_LEVELS];
sal_Int32 mnGroupId;
};
diff --git a/sd/source/core/CustomAnimationEffect.cxx b/sd/source/core/CustomAnimationEffect.cxx
index fe4ebdf..ab20da4 100644
--- a/sd/source/core/CustomAnimationEffect.cxx
+++ b/sd/source/core/CustomAnimationEffect.cxx
@@ -2461,8 +2461,10 @@ void CustomAnimationTextGroup::reset()
mfGroupingAuto = -1.0;
mnLastPara = -1; // used to check for TextReverse
- int i = 5;
- while( i-- ) mnDepthFlags[i] = 0;
+ for (int i = 0; i < PARA_LEVELS; ++i)
+ {
+ mnDepthFlags[i] = 0;
+ }
maEffects.clear();
}
@@ -2487,8 +2489,8 @@ void CustomAnimationTextGroup::addEffect( CustomAnimationEffectPtr& pEffect )
const sal_Int32 nParaDepth = pEffect->getParaDepth();
- // only look at the first 5 levels
- if( nParaDepth < 5 )
+ // only look at the first PARA_LEVELS levels
+ if( nParaDepth < PARA_LEVELS )
{
// our first paragraph with this level?
if( mnDepthFlags[nParaDepth] == 0 )
@@ -2504,9 +2506,10 @@ void CustomAnimationTextGroup::addEffect( CustomAnimationEffectPtr& pEffect )
if( pEffect->getNodeType() == EffectNodeType::AFTER_PREVIOUS )
mfGroupingAuto = pEffect->getBegin();
- mnTextGrouping = 0;
- while( (mnTextGrouping < 5) && (mnDepthFlags[mnTextGrouping] > 0) )
- mnTextGrouping++;
+ mnTextGrouping = PARA_LEVELS;
+ while( (mnTextGrouping > 0)
+ && (mnDepthFlags[mnTextGrouping - 1] <= 0) )
+ --mnTextGrouping;
}
}
else
More information about the Libreoffice-commits
mailing list