diff options
Diffstat (limited to 'slideshow/source/engine/shapes/drawshapesubsetting.cxx')
-rw-r--r-- | slideshow/source/engine/shapes/drawshapesubsetting.cxx | 116 |
1 files changed, 58 insertions, 58 deletions
diff --git a/slideshow/source/engine/shapes/drawshapesubsetting.cxx b/slideshow/source/engine/shapes/drawshapesubsetting.cxx index 62dc22ea3dc0..889e9566c76e 100644 --- a/slideshow/source/engine/shapes/drawshapesubsetting.cxx +++ b/slideshow/source/engine/shapes/drawshapesubsetting.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -255,14 +255,14 @@ namespace slideshow maCurrentSubsets(), mbNodeTreeInitialized( false ) { - ENSURE_OR_THROW( mpMtf, + ENSURE_OR_THROW( mpMtf, "DrawShapeSubsetting::DrawShapeSubsetting(): Invalid metafile" ); initCurrentSubsets(); } - DrawShapeSubsetting::DrawShapeSubsetting( const DocTreeNode& rShapeSubset, - const GDIMetaFileSharedPtr& rMtf ) : + DrawShapeSubsetting::DrawShapeSubsetting( const DocTreeNode& rShapeSubset, + const GDIMetaFileSharedPtr& rMtf ) : maActionClassVector(), mpMtf( rMtf ), maSubset( rShapeSubset ), @@ -272,7 +272,7 @@ namespace slideshow maCurrentSubsets(), mbNodeTreeInitialized( false ) { - ENSURE_OR_THROW( mpMtf, + ENSURE_OR_THROW( mpMtf, "DrawShapeSubsetting::DrawShapeSubsetting(): Invalid metafile" ); initCurrentSubsets(); @@ -333,9 +333,9 @@ namespace slideshow // subset shape already created for this DocTreeNode? SubsetEntry aEntry; - - aEntry.mnStartActionIndex = rTreeNode.getStartIndex(); - aEntry.mnEndActionIndex = rTreeNode.getEndIndex(); + + aEntry.mnStartActionIndex = rTreeNode.getStartIndex(); + aEntry.mnEndActionIndex = rTreeNode.getEndIndex(); ShapeSet::const_iterator aIter; if( (aIter=maSubsetShapes.find( aEntry )) != maSubsetShapes.end() ) @@ -354,9 +354,9 @@ namespace slideshow // subset shape already created for this DocTreeNode? SubsetEntry aEntry; const DocTreeNode& rEffectiveSubset( rShape->getSubsetNode() ); - - aEntry.mnStartActionIndex = rEffectiveSubset.getStartIndex(); - aEntry.mnEndActionIndex = rEffectiveSubset.getEndIndex(); + + aEntry.mnStartActionIndex = rEffectiveSubset.getStartIndex(); + aEntry.mnEndActionIndex = rEffectiveSubset.getEndIndex(); ShapeSet::const_iterator aIter; if( (aIter=maSubsetShapes.find( aEntry )) != maSubsetShapes.end() ) @@ -372,9 +372,9 @@ namespace slideshow // not yet created, init entry aEntry.mnSubsetQueriedCount = 1; aEntry.mpShape = rShape; - + maSubsetShapes.insert( aEntry ); - + // update cached subset borders updateSubsetBounds( aEntry ); updateSubsets(); @@ -388,9 +388,9 @@ namespace slideshow // lookup subset shape SubsetEntry aEntry; const DocTreeNode& rEffectiveSubset( rShape->getSubsetNode() ); - - aEntry.mnStartActionIndex = rEffectiveSubset.getStartIndex(); - aEntry.mnEndActionIndex = rEffectiveSubset.getEndIndex(); + + aEntry.mnStartActionIndex = rEffectiveSubset.getStartIndex(); + aEntry.mnEndActionIndex = rEffectiveSubset.getEndIndex(); ShapeSet::iterator aIter; if( (aIter=maSubsetShapes.find( aEntry )) == maSubsetShapes.end() ) @@ -430,7 +430,7 @@ namespace slideshow mnMinSubsetActionIndex = SAL_MAX_INT32; mnMaxSubsetActionIndex = 0; - // TODO(P2): This is quite expensive, when + // TODO(P2): This is quite expensive, when // after every subset effect end, we have to scan // the whole shape set @@ -467,8 +467,8 @@ namespace slideshow element (i.e. the iterators from the start to the end of this element). <pre> - bool operator()( IndexClassificator eCurrElemClassification - sal_Int32 nCurrElemCount, + bool operator()( IndexClassificator eCurrElemClassification + sal_Int32 nCurrElemCount, const IndexClassificatorVector::const_iterator& rCurrElemBegin, const IndexClassificatorVector::const_iterator& rCurrElemEnd ); </pre> @@ -487,7 +487,7 @@ namespace slideshow @return the number of shapes found in the metafile */ template< typename FunctorT > void iterateActionClassifications( - FunctorT& io_rFunctor, + FunctorT& io_rFunctor, const DrawShapeSubsetting::IndexClassificatorVector::const_iterator& rBegin, const DrawShapeSubsetting::IndexClassificatorVector::const_iterator& rEnd ) { @@ -540,7 +540,7 @@ namespace slideshow case DrawShapeSubsetting::CLASS_SHAPE_END: if( !io_rFunctor( DrawShapeSubsetting::CLASS_SHAPE_END, - nCurrShapeCount, + nCurrShapeCount, aLastShapeStart, aNext ) ) { @@ -552,7 +552,7 @@ namespace slideshow // ends lines case DrawShapeSubsetting::CLASS_PARAGRAPH_END: if( !io_rFunctor( DrawShapeSubsetting::CLASS_PARAGRAPH_END, - nCurrParaCount, + nCurrParaCount, aLastParaStart, aNext ) ) { @@ -565,7 +565,7 @@ namespace slideshow // ends line case DrawShapeSubsetting::CLASS_LINE_END: if( !io_rFunctor( DrawShapeSubsetting::CLASS_LINE_END, - nCurrLineCount, + nCurrLineCount, aLastLineStart, aNext ) ) { @@ -592,7 +592,7 @@ namespace slideshow // FALLTHROUGH intended case DrawShapeSubsetting::CLASS_SENTENCE_END: if( !io_rFunctor( DrawShapeSubsetting::CLASS_SENTENCE_END, - nCurrSentenceCount, + nCurrSentenceCount, aLastSentenceStart, aNext ) ) { @@ -604,7 +604,7 @@ namespace slideshow // FALLTHROUGH intended case DrawShapeSubsetting::CLASS_WORD_END: if( !io_rFunctor( DrawShapeSubsetting::CLASS_WORD_END, - nCurrWordCount, + nCurrWordCount, aLastWordStart, aNext ) ) { @@ -616,7 +616,7 @@ namespace slideshow // FALLTHROUGH intended case DrawShapeSubsetting::CLASS_CHARACTER_CELL_END: if( !io_rFunctor( DrawShapeSubsetting::CLASS_CHARACTER_CELL_END, - nCurrCharCount, + nCurrCharCount, aLastCharStart, aNext ) ) { @@ -669,16 +669,16 @@ namespace slideshow class CountClassFunctor { public: - CountClassFunctor( DrawShapeSubsetting::IndexClassificator eClass ) : + CountClassFunctor( DrawShapeSubsetting::IndexClassificator eClass ) : meClass( eClass ), mnCurrCount(0) { } - bool operator()( DrawShapeSubsetting::IndexClassificator eCurrElemClassification, - sal_Int32 /*nCurrElemCount*/, - const DrawShapeSubsetting::IndexClassificatorVector::const_iterator& /*rCurrElemBegin*/, - const DrawShapeSubsetting::IndexClassificatorVector::const_iterator& /*rCurrElemEnd*/ ) + bool operator()( DrawShapeSubsetting::IndexClassificator eCurrElemClassification, + sal_Int32 /*nCurrElemCount*/, + const DrawShapeSubsetting::IndexClassificatorVector::const_iterator& /*rCurrElemBegin*/, + const DrawShapeSubsetting::IndexClassificatorVector::const_iterator& /*rCurrElemEnd*/ ) { if( eCurrElemClassification == meClass ) ++mnCurrCount; @@ -693,15 +693,15 @@ namespace slideshow private: DrawShapeSubsetting::IndexClassificator meClass; - sal_Int32 mnCurrCount; + sal_Int32 mnCurrCount; }; } sal_Int32 DrawShapeSubsetting::implGetNumberOfTreeNodes( const DrawShapeSubsetting::IndexClassificatorVector::const_iterator& rBegin, const DrawShapeSubsetting::IndexClassificatorVector::const_iterator& rEnd, - DocTreeNode::NodeType eNodeType ) const + DocTreeNode::NodeType eNodeType ) const { - const IndexClassificator eRequestedClass( + const IndexClassificator eRequestedClass( mapDocTreeNode( eNodeType ) ); // create a counting functor for the requested class of @@ -736,17 +736,17 @@ namespace slideshow class FindNthElementFunctor { public: - FindNthElementFunctor( sal_Int32 nNodeIndex, - DrawShapeSubsetting::IndexClassificator eClass ) : + FindNthElementFunctor( sal_Int32 nNodeIndex, + DrawShapeSubsetting::IndexClassificator eClass ) : mnNodeIndex( nNodeIndex ), meClass( eClass ) { } - bool operator()( DrawShapeSubsetting::IndexClassificator eCurrElemClassification, - sal_Int32 nCurrElemCount, - const DrawShapeSubsetting::IndexClassificatorVector::const_iterator& rCurrElemBegin, - const DrawShapeSubsetting::IndexClassificatorVector::const_iterator& rCurrElemEnd ) + bool operator()( DrawShapeSubsetting::IndexClassificator eCurrElemClassification, + sal_Int32 nCurrElemCount, + const DrawShapeSubsetting::IndexClassificatorVector::const_iterator& rCurrElemBegin, + const DrawShapeSubsetting::IndexClassificatorVector::const_iterator& rCurrElemEnd ) { if( eCurrElemClassification == meClass && nCurrElemCount == mnNodeIndex ) @@ -773,16 +773,16 @@ namespace slideshow } private: - sal_Int32 mnNodeIndex; - DrawShapeSubsetting::IndexClassificatorVector::const_iterator maLastBegin; - DrawShapeSubsetting::IndexClassificatorVector::const_iterator maLastEnd; - DrawShapeSubsetting::IndexClassificator meClass; + sal_Int32 mnNodeIndex; + DrawShapeSubsetting::IndexClassificatorVector::const_iterator maLastBegin; + DrawShapeSubsetting::IndexClassificatorVector::const_iterator maLastEnd; + DrawShapeSubsetting::IndexClassificator meClass; }; DocTreeNode makeTreeNode( const DrawShapeSubsetting::IndexClassificatorVector::const_iterator& rBegin, const DrawShapeSubsetting::IndexClassificatorVector::const_iterator& rStart, const DrawShapeSubsetting::IndexClassificatorVector::const_iterator& rEnd, - DocTreeNode::NodeType eNodeType ) + DocTreeNode::NodeType eNodeType ) { return DocTreeNode( ::std::distance(rBegin, rStart), @@ -792,12 +792,12 @@ namespace slideshow } } - DocTreeNode DrawShapeSubsetting::implGetTreeNode( const IndexClassificatorVector::const_iterator& rBegin, - const IndexClassificatorVector::const_iterator& rEnd, - sal_Int32 nNodeIndex, - DocTreeNode::NodeType eNodeType ) const + DocTreeNode DrawShapeSubsetting::implGetTreeNode( const IndexClassificatorVector::const_iterator& rBegin, + const IndexClassificatorVector::const_iterator& rEnd, + sal_Int32 nNodeIndex, + DocTreeNode::NodeType eNodeType ) const { - const IndexClassificator eRequestedClass( + const IndexClassificator eRequestedClass( mapDocTreeNode( eNodeType ) ); // create a nth element functor for the requested class of @@ -814,8 +814,8 @@ namespace slideshow eNodeType ); } - DocTreeNode DrawShapeSubsetting::getTreeNode( sal_Int32 nNodeIndex, - DocTreeNode::NodeType eNodeType ) const + DocTreeNode DrawShapeSubsetting::getTreeNode( sal_Int32 nNodeIndex, + DocTreeNode::NodeType eNodeType ) const { ensureInitializedNodeTree(); @@ -825,8 +825,8 @@ namespace slideshow eNodeType ); } - sal_Int32 DrawShapeSubsetting::getNumberOfSubsetTreeNodes( const DocTreeNode& rParentNode, - DocTreeNode::NodeType eNodeType ) const + sal_Int32 DrawShapeSubsetting::getNumberOfSubsetTreeNodes( const DocTreeNode& rParentNode, + DocTreeNode::NodeType eNodeType ) const { ensureInitializedNodeTree(); @@ -840,9 +840,9 @@ namespace slideshow eNodeType ); } - DocTreeNode DrawShapeSubsetting::getSubsetTreeNode( const DocTreeNode& rParentNode, - sal_Int32 nNodeIndex, - DocTreeNode::NodeType eNodeType ) const + DocTreeNode DrawShapeSubsetting::getSubsetTreeNode( const DocTreeNode& rParentNode, + sal_Int32 nNodeIndex, + DocTreeNode::NodeType eNodeType ) const { ensureInitializedNodeTree(); @@ -861,7 +861,7 @@ namespace slideshow { return maCurrentSubsets; } - + } } |