summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--slideshow/source/engine/animationnodes/animationbasenode.cxx77
-rw-r--r--slideshow/source/engine/slide/slideimpl.cxx8
2 files changed, 49 insertions, 36 deletions
diff --git a/slideshow/source/engine/animationnodes/animationbasenode.cxx b/slideshow/source/engine/animationnodes/animationbasenode.cxx
index c3c8dc6ad4e6..06ec310104ab 100644
--- a/slideshow/source/engine/animationnodes/animationbasenode.cxx
+++ b/slideshow/source/engine/animationnodes/animationbasenode.cxx
@@ -141,42 +141,47 @@ AnimationBaseNode::AnimationBaseNode(
// okay, found a ParagraphTarget with a valid XShape. Does the shape
// provide the given paragraph?
- const DocTreeNode& rTreeNode(
- mpShape->getTreeNodeSupplier().getTreeNode(
- aTarget.Paragraph,
- DocTreeNode::NODETYPE_LOGICAL_PARAGRAPH ) );
-
- // CAUTION: the creation of the subset shape
- // _must_ stay in the node constructor, since
- // Slide::prefetchShow() initializes shape
- // attributes right after animation import (or
- // the Slide class must be changed).
- mpShapeSubset.reset(
- new ShapeSubset( mpShape,
- rTreeNode,
- mpSubsetManager ));
-
- // Override NodeContext, and flag this node as
- // a special independent subset one. This is
- // important when applying initial attributes:
- // independent shape subsets must be setup
- // when the slide starts, since they, as their
- // name suggest, can have state independent to
- // the master shape. The following example
- // might illustrate that: a master shape has
- // no effect, one of the text paragraphs
- // within it has an appear effect. Now, the
- // respective paragraph must be invisible when
- // the slide is initially shown, and become
- // visible only when the effect starts.
- mbIsIndependentSubset = true;
-
- // already enable subset right here, the
- // setup of initial shape attributes of
- // course needs the subset shape
- // generated, to apply e.g. visibility
- // changes.
- mpShapeSubset->enableSubsetShape();
+ if( aTarget.Paragraph >= 0 &&
+ mpShape->getTreeNodeSupplier().getNumberOfTreeNodes(
+ DocTreeNode::NODETYPE_LOGICAL_PARAGRAPH) > aTarget.Paragraph )
+ {
+ const DocTreeNode& rTreeNode(
+ mpShape->getTreeNodeSupplier().getTreeNode(
+ aTarget.Paragraph,
+ DocTreeNode::NODETYPE_LOGICAL_PARAGRAPH ) );
+
+ // CAUTION: the creation of the subset shape
+ // _must_ stay in the node constructor, since
+ // Slide::prefetchShow() initializes shape
+ // attributes right after animation import (or
+ // the Slide class must be changed).
+ mpShapeSubset.reset(
+ new ShapeSubset( mpShape,
+ rTreeNode,
+ mpSubsetManager ));
+
+ // Override NodeContext, and flag this node as
+ // a special independent subset one. This is
+ // important when applying initial attributes:
+ // independent shape subsets must be setup
+ // when the slide starts, since they, as their
+ // name suggest, can have state independent to
+ // the master shape. The following example
+ // might illustrate that: a master shape has
+ // no effect, one of the text paragraphs
+ // within it has an appear effect. Now, the
+ // respective paragraph must be invisible when
+ // the slide is initially shown, and become
+ // visible only when the effect starts.
+ mbIsIndependentSubset = true;
+
+ // already enable subset right here, the
+ // setup of initial shape attributes of
+ // course needs the subset shape
+ // generated, to apply e.g. visibility
+ // changes.
+ mpShapeSubset->enableSubsetShape();
+ }
}
}
}
diff --git a/slideshow/source/engine/slide/slideimpl.cxx b/slideshow/source/engine/slide/slideimpl.cxx
index d7cce3bed5a1..c8a307d2782a 100644
--- a/slideshow/source/engine/slide/slideimpl.cxx
+++ b/slideshow/source/engine/slide/slideimpl.cxx
@@ -1062,6 +1062,14 @@ bool SlideImpl::applyInitialShapeAttributes(
// this up first.
const DocTreeNodeSupplier& rNodeSupplier( pAttrShape->getTreeNodeSupplier() );
+ if( rNodeSupplier.getNumberOfTreeNodes(
+ DocTreeNode::NODETYPE_LOGICAL_PARAGRAPH ) <= nParaIndex )
+ {
+ OSL_FAIL( "SlideImpl::applyInitialShapeAttributes(): shape found does not "
+ "provide a subset for requested paragraph index" );
+ continue;
+ }
+
pAttrShape = pAttrShape->getSubset(
rNodeSupplier.getTreeNode(
nParaIndex,