monperrus / ExpandAnimations

LibreOffice/OpenOffice.org extension to expand animations before exporting to PDF. Looking for maintainers.
https://github.com/monperrus/ExpandAnimations
GNU Lesser General Public License v3.0
235 stars 31 forks source link

shortcircuiting "and" #18

Closed zurzir closed 5 years ago

zurzir commented 7 years ago

I think basic logical "and" behavior is not short circuting, so this code should give an error on a non-existent attribute:

function isVisibilityAnimation(animNode as Object) as Boolean
    isVisibilityAnimation = HasUnoInterfaces(animNode, ANIMSET) and _
                            (animNode.AttributeName = VISATTR)
end function

tried on this:

http://www.psc.org.br/wp-content/uploads/2016/09/sample.ppt

monperrus commented 5 years ago

Would you propose a pull-request?

zurzir commented 5 years ago

Unfortunately, I will not have the time now to prepare a pull. If someone is facing this problem, one could try (untested)

function isVisibilityAnimation(animNode as Object) as Boolean
    isVisibilityAnimation = HasUnoInterfaces(animNode, ANIMSET)
    If isVisibilityAnimation Then
         isVisibilityAnimation = animNode.AttributeName = VISATTR
    End If
end function