These are chat archives for PHPOffice/PHPPresentation

30th
Jul 2015
JewrassicPark
@JewrassicPark
Jul 30 2015 12:49 UTC
I took a swing at getting animations to work http://www.filedropper.com/phppowerpoint-editing-7-29-2015
It only does simple appear onclick
Added /src/PhpPresentation/Slide/Animation.php , made a few changes to /src/PhpPresentation/Slide.php and the Slide writer for PP2007
This is basically how I'm using it
    public function addAnimation($shapes = ARRAY()){
        $animation = new Animation();
        $currentSlide = $this->pp->getActiveSlide();
        $currentSlide->addAnimation($animation);         

        foreach($shapes as $s){
            $animation->addShape($s);
        }

        return $animation;

    }
Each slide has N animations, each animation has M shapes
The function above is just part of my wrapper class for phppowerpoint
The only logic I really had to change in the slide writer is that the shape ids have to start at 2 instead of 1, 1 seems to correspond to the slide itself not any shapes so the animation wasn't working correctly. Tested in Powerpoint 2013