Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inadmissible value or data type. #8

Open
Gnossos opened this issue Nov 17, 2013 · 11 comments
Open

Inadmissible value or data type. #8

Gnossos opened this issue Nov 17, 2013 · 11 comments

Comments

@Gnossos
Copy link

Gnossos commented Nov 17, 2013

In LibreOffice Impress (4.1.3.2)I import a file from Powerpoint 2011 (14.3.8) in pptx format. Then, after doing some cosmetic work, I try to export it with ExpandAnimations: Tools > Add-.Ons > Expand animations. The plugin crashes with this message: "Inadmissible value or data type. Index out of defined range."

@monperrus
Copy link
Owner

Thanks Gnossos for the report.

import a file from Powerpoint 2011 (14.3.8) in pptx format.
would be great if this works.

No time for investigating this in the short-term...

@phrack
Copy link

phrack commented May 1, 2014

Chiming in, I get the same error on the dim visibility line here:

' create a 2-D array giving the visibility of each animated
' shape for each frame in the expanded animation
function getShapeVisibility(slide as Object, nFrames as Integer)
shapes = getAnimatedShapes(slide)
dim visibility(UBound(shapes), nFrames-1) as Boolean

My presentation is and always has been in the LibreOffice ODP format. I can provide the deck on request if you provide me with an email address to send it to.

@mihaic
Copy link

mihaic commented May 20, 2014

Same error as phrack. The plugin worked on a previous version of the same document that had less animations.

@mihaic
Copy link

mihaic commented May 20, 2014

In my case, the error was triggered by a transparency animation. Removing it fixed the issue.

@andreaaraldo
Copy link

Are you sure you have only "Appear" or "Disappear" animations (the only ones supported by ExpandAnimations)?
I had the same problem because I did not remember to remove some "Dissolve" animations

@monperrus
Copy link
Owner

It would be great to raise a popup when an incompatible animation is
detected. Any volunteer for implementing this?

@cbecker
Copy link
Contributor

cbecker commented Dec 4, 2014

Hi all, I have no idea about LibreOffice Basic, but I managed to ignore the slides for which that error appears, below the diff. Feel free to modify/merge.

diff --git a/src/ExpandAnimations.bas b/src/ExpandAnimations.bas
index 05a0551..30c4452 100644
--- a/src/ExpandAnimations.bas
+++ b/src/ExpandAnimations.bas
@@ -135,7 +135,7 @@ function expandDocument(doc as Object)
         slide = doc.drawPages(i)
         if hasAnimation(slide) then
             n = countAnimationSteps(slide)
-            if n > 1 then
+            if n > 1 and not somethingWrong(slide) then
                 origName = slide.Name
                 replicateSlide(doc, slide, n)
                 visArray = getShapeVisibility(slide, n)
@@ -199,12 +199,21 @@ function getAnimatedShapes(slide as Object)
     getAnimatedShapes = shapes
 end function

+function somethingWrong( slide as Object )
+    shapes = getAnimatedShapes(slide)
+    if UBound(shapes) = -1 then
+      somethingWrong = true
+    else
+      somethingWrong = false
+    end if
+end function

@monperrus
Copy link
Owner

Dear Carlos,

Thanks for your contribution, it looks good. Would you create a pull
request?

--Martin

On 12/04/2014 11:13 AM, Carlos Becker wrote:

Hi all, I have no idea about LibreOffice Basic, but I managed to
ignore the slides for which that error appears, below the diff. Feel
free to modify/merge.

diff --git a/src/ExpandAnimations.bas b/src/ExpandAnimations.bas
index 05a0551..30c4452 100644
--- a/src/ExpandAnimations.bas
+++ b/src/ExpandAnimations.bas
@@ -135,7 +135,7 @@ function expandDocument(doc as Object)
slide = doc.drawPages(i)
if hasAnimation(slide) then
n = countAnimationSteps(slide)

  •        if n > 1 then
    
  •        if n > 1 and not somethingWrong(slide) then
             origName = slide.Name
             replicateSlide(doc, slide, n)
             visArray = getShapeVisibility(slide, n)
    
    @@ -199,12 +199,21 @@ function getAnimatedShapes(slide as Object)
    getAnimatedShapes = shapes
    end function

+function somethingWrong( slide as Object )

  • shapes = getAnimatedShapes(slide)
  • if UBound(shapes) = -1 then
  •  somethingWrong = true
    
  • else
  •  somethingWrong = false
    
  • end if
    +end function


Reply to this email directly or view it on GitHub
#8 (comment).

cbecker added a commit to cbecker/ExpandAnimations that referenced this issue Dec 6, 2014
@cbecker
Copy link
Contributor

cbecker commented Dec 6, 2014

@monperrus The pull request is up. Thanks for creating this neat add-on!

monperrus added a commit that referenced this issue Oct 24, 2016
Workaround for issue #8 "Inadmissible value or data type"
@philtroy
Copy link

philtroy commented Sep 1, 2019

Hi

It is 2019 and I ran into the same problem this evening. I tried the fix and it worked.

I do not know how to properly request it but the fix should be put into the codebase (if it is not already there).

Thanks . . .

Phil Troy

@monperrus
Copy link
Owner

This is in the code, see #12 and should be in the latest package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants