Skip to content

Commit

Permalink
fixed bug related to UNO shape objects
Browse files Browse the repository at this point in the history
error description (From Philip):
The error arises because the code expects all animation targets to be UNO shape objects (e.g. SvxShapeText), but animating a text box (even a single-paragraph text box) creates a UNO struct of type com.sun.star.presentation.ParagraphTarget.
  • Loading branch information
Philip Johnson authored and monperrus committed Jan 31, 2013
1 parent 3a911b4 commit cf23f01
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/ExpandAnimations.bas
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,10 @@ function getAnimatedShapes(slide as Object)
animNode = animNodes.nextElement()
if isVisibilityAnimation(animNode) then
target = animNode.target
'special handling for com.sun.star.presentation.ParagraphTarget
if (IsUnoStruct(target)) then
target = target.Shape
end if
' if we haven't seen this shape yet, add it to the array
if not containsObject(shapes, target) then
newUBound = UBound(shapes) + 1
Expand Down Expand Up @@ -233,6 +237,10 @@ function getShapeVisibility(slide as Object, nFrames as Integer)
animNode = animNodes.nextElement()
if isVisibilityAnimation(animNode) then
target = animNode.target
'special handling for com.sun.star.presentation.ParagraphTarget
if (IsUnoStruct(target)) then
target = target.Shape
end if
' if this is the shape we want, check the visibility
if EqualUnoObjects(shape, target) then
visCurrent = animNode.To
Expand Down

0 comments on commit cf23f01

Please sign in to comment.