diff -uNr old/slideshow/source/engine/shapes/drawshape.cxx new/slideshow/source/engine/shapes/drawshape.cxx --- old/slideshow/source/engine/shapes/drawshape.cxx 2008-01-18 18:36:58.906250000 +0800 +++ new/slideshow/source/engine/shapes/drawshape.cxx 2008-01-18 18:54:07.437500000 +0800 @@ -931,6 +931,12 @@ // hyperlink support void DrawShape::prepareHyperlinkIndices() { + if ( !maHyperlinkIndices.empty()) + { + maHyperlinkIndices.clear(); + maHyperlinkRegions.clear(); + } + sal_Int32 nIndex = 0; for ( MetaAction * pCurrAct = mpCurrMtf->FirstAction(); pCurrAct != 0; pCurrAct = mpCurrMtf->NextAction() ) @@ -1301,6 +1307,19 @@ return maSubsetting.getTreeNode( nNodeIndex, eNodeType ); } + DocTreeNode DrawShape::getTreeNode( sal_Int32 nNodeIndex, + DocTreeNode::NodeType eNodeType ) // throw ShapeLoadFailedException + { + ensureVerboseMtfComments(); + + if ( hasHyperlinks()) + { + prepareHyperlinkIndices(); + } + + return maSubsetting.getTreeNode( nNodeIndex, eNodeType ); + } + sal_Int32 DrawShape::getNumberOfSubsetTreeNodes ( const DocTreeNode& rParentNode, DocTreeNode::NodeType eNodeType ) const // throw ShapeLoadFailedException { diff -uNr old/slideshow/source/engine/shapes/drawshape.hxx new/slideshow/source/engine/shapes/drawshape.hxx --- old/slideshow/source/engine/shapes/drawshape.hxx 2008-01-18 18:34:24.875000000 +0800 +++ new/slideshow/source/engine/shapes/drawshape.hxx 2008-01-18 18:33:40.687500000 +0800 @@ -195,6 +195,8 @@ virtual sal_Int32 getNumberOfTreeNodes ( DocTreeNode::NodeType eNodeType ) const; // throw ShapeLoadFailedException; virtual DocTreeNode getTreeNode ( sal_Int32 nNodeIndex, DocTreeNode::NodeType eNodeType ) const; // throw ShapeLoadFailedException; + virtual DocTreeNode getTreeNode ( sal_Int32 nNodeIndex, + DocTreeNode::NodeType eNodeType ); // throw ShapeLoadFailedException; virtual sal_Int32 getNumberOfSubsetTreeNodes ( const DocTreeNode& rParentNode, DocTreeNode::NodeType eNodeType ) const; // throw ShapeLoadFailedException; virtual DocTreeNode getSubsetTreeNode ( const DocTreeNode& rParentNode, @@ -296,7 +298,7 @@ void ensureVerboseMtfComments() const; bool hasIntrinsicAnimation() const; - bool hasHyperlinks() const; + virtual bool hasHyperlinks() const; void prepareHyperlinkIndices(); /// The associated XShape diff -uNr old/slideshow/source/inc/doctreenodesupplier.hxx new/slideshow/source/inc/doctreenodesupplier.hxx --- old/slideshow/source/inc/doctreenodesupplier.hxx 2008-01-18 18:25:23.359375000 +0800 +++ new/slideshow/source/inc/doctreenodesupplier.hxx 2008-01-18 18:24:37.687500000 +0800 @@ -102,6 +102,8 @@ */ virtual DocTreeNode getTreeNode( sal_Int32 nNodeIndex, DocTreeNode::NodeType eNodeType ) const = 0; // throw ShapeLoadFailedException; + virtual DocTreeNode getTreeNode( sal_Int32 nNodeIndex, + DocTreeNode::NodeType eNodeType ) = 0; // throw ShapeLoadFailedException; /** Query number of tree nodes of the given type this subset contains. @@ -150,6 +152,8 @@ virtual DocTreeNode getSubsetTreeNode( const DocTreeNode& rParentNode, sal_Int32 nNodeIndex, DocTreeNode::NodeType eNodeType ) const = 0; // throw ShapeLoadFailedException; + + virtual bool hasHyperlinks() const = 0; }; }