Kaydet (Commit) 854dc02f authored tarafından Thorsten Behrens's avatar Thorsten Behrens

Fix for fdo#43837 - prevent invalid shape text indices.

Catch a few cases where an invalid text node index is passed into
the shape subsetter.
üst 643de3b6
......@@ -141,6 +141,10 @@ AnimationBaseNode::AnimationBaseNode(
// okay, found a ParagraphTarget with a valid XShape. Does the shape
// provide the given paragraph?
if( aTarget.Paragraph >= 0 &&
mpShape->getTreeNodeSupplier().getNumberOfTreeNodes(
DocTreeNode::NODETYPE_LOGICAL_PARAGRAPH) > aTarget.Paragraph )
{
const DocTreeNode& rTreeNode(
mpShape->getTreeNodeSupplier().getTreeNode(
aTarget.Paragraph,
......@@ -179,6 +183,7 @@ AnimationBaseNode::AnimationBaseNode(
mpShapeSubset->enableSubsetShape();
}
}
}
}
void AnimationBaseNode::dispose()
......
......@@ -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,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment