1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #include "diagramlayoutatoms.hxx"
23 #include <boost/bind.hpp>
25 #include <osl/diagnose.h>
26 #include <basegfx/numeric/ftools.hxx>
28 #include "oox/helper/attributelist.hxx"
29 #include "oox/drawingml/fillproperties.hxx"
30 #include "oox/drawingml/lineproperties.hxx"
31 #include "drawingml/textbody.hxx"
32 #include "drawingml/textparagraph.hxx"
33 #include "drawingml/textrun.hxx"
34 #include "drawingml/customshapeproperties.hxx"
35 #include "layoutnodecontext.hxx"
37 using namespace ::com::sun::star
;
38 using namespace ::com::sun::star::uno
;
39 using namespace ::com::sun::star::xml::sax
;
40 using namespace ::oox::core
;
42 namespace oox
{ namespace drawingml
{
44 IteratorAttr::IteratorAttr( )
47 , mbHideLastTrans( false )
54 void IteratorAttr::loadFromXAttr( const Reference
< XFastAttributeList
>& xAttr
)
56 AttributeList
attr( xAttr
);
57 mnAxis
= xAttr
->getOptionalValueToken( XML_axis
, 0 );
58 mnCnt
= attr
.getInteger( XML_cnt
, -1 );
59 mbHideLastTrans
= attr
.getBool( XML_hideLastTrans
, false );
60 mnPtType
= xAttr
->getOptionalValueToken( XML_ptType
, 0 );
61 mnSt
= attr
.getInteger( XML_st
, 0 );
62 mnStep
= attr
.getInteger( XML_step
, 1 );
65 ConditionAttr::ConditionAttr()
73 void ConditionAttr::loadFromXAttr( const Reference
< XFastAttributeList
>& xAttr
)
75 mnFunc
= xAttr
->getOptionalValueToken( XML_func
, 0 );
76 // mnArg will be -1 for "none" or any other unknown value
77 mnArg
= LayoutNodeContext::tagToVarIdx( xAttr
->getOptionalValueToken( XML_arg
, XML_none
) );
78 mnOp
= xAttr
->getOptionalValueToken( XML_op
, 0 );
79 msVal
= xAttr
->getOptionalValue( XML_val
);
82 void LayoutAtom::dump(int level
)
84 OSL_TRACE( "level = %d - %s of type %s", level
,
85 OUSTRING_TO_CSTR( msName
),
86 typeid(*this).name() );
87 const std::vector
<LayoutAtomPtr
>& pChildren
=getChildren();
88 std::for_each( pChildren
.begin(), pChildren
.end(),
89 boost::bind( &LayoutAtom::dump
, _1
, level
+ 1 ) );
92 ForEachAtom::ForEachAtom(const Reference
< XFastAttributeList
>& xAttributes
)
94 maIter
.loadFromXAttr(xAttributes
);
97 void ForEachAtom::accept( LayoutAtomVisitor
& rVisitor
)
99 rVisitor
.visit(*this);
102 void ChooseAtom::accept( LayoutAtomVisitor
& rVisitor
)
104 rVisitor
.visit(*this);
107 ConditionAtom::ConditionAtom(const Reference
< XFastAttributeList
>& xAttributes
) :
110 maIter
.loadFromXAttr( xAttributes
);
111 maCond
.loadFromXAttr( xAttributes
);
114 const std::vector
<LayoutAtomPtr
>& ConditionAtom::getChildren() const
116 bool bDecisionVar
=true;
118 if( maCond
.mnFunc
== XML_var
&& maCond
.mnArg
== XML_dir
&& maCond
.mnOp
== XML_equ
&& maCond
.msVal
!= "norm" )
124 return mpElseChildNodes
;
127 void ConditionAtom::accept( LayoutAtomVisitor
& rVisitor
)
129 rVisitor
.visit(*this);
132 void ConditionAtom::addChild( const LayoutAtomPtr
& pNode
)
135 mpElseChildNodes
.push_back( pNode
);
137 mpChildNodes
.push_back( pNode
);
140 void ConstraintAtom::accept( LayoutAtomVisitor
& rVisitor
)
142 rVisitor
.visit(*this);
145 void AlgAtom::accept( LayoutAtomVisitor
& rVisitor
)
147 rVisitor
.visit(*this);
150 void AlgAtom::layoutShape( const ShapePtr
& rShape
,
151 const Diagram
& /*rDgm*/,
152 const OUString
& rName
) const
158 if( rShape
->getChildren().empty() )
160 rShape
->setSize(awt::Size(50,50));
164 // just put stuff below each other
165 const sal_Int32 nIncX
=0;
166 const sal_Int32 nIncY
=1;
168 std::vector
<ShapePtr
>::const_iterator aCurrShape
=rShape
->getChildren().begin();
169 const std::vector
<ShapePtr
>::const_iterator aLastShape
=rShape
->getChildren().end();
171 // find biggest shape
173 while( aCurrShape
!= aLastShape
)
175 const awt::Size
& sz
=(*aCurrShape
)->getSize();
177 aMaxSize
.Width
= std::max(
180 aMaxSize
.Height
= std::max(
187 aCurrShape
=rShape
->getChildren().begin();
188 const awt::Point aStartPos
=(*aCurrShape
)->getPosition();
189 awt::Point aCurrPos
=aStartPos
;
190 awt::Size aTotalSize
;
191 aTotalSize
.Width
= aMaxSize
.Width
;
192 while( aCurrShape
!= aLastShape
)
194 const awt::Size
& sz
=(*aCurrShape
)->getSize();
195 (*aCurrShape
)->setPosition(aCurrPos
);
196 (*aCurrShape
)->setSize(
197 awt::Size(aMaxSize
.Width
,
200 aTotalSize
.Height
= std::max(
202 aCurrPos
.Y
+ sz
.Height
);
204 aCurrPos
.X
+= nIncX
*sz
.Width
;
205 aCurrPos
.Y
+= nIncY
*sz
.Height
;
210 rShape
->setSize(aTotalSize
);
219 if( rShape
->getChildren().empty() )
221 rShape
->setSize(awt::Size(50,50));
225 const sal_Int32 nStartAngle
=maMap
.count(XML_stAng
) ? maMap
.find(XML_stAng
)->second
: 0;
226 const sal_Int32 nSpanAngle
=maMap
.count(XML_spanAng
) ? maMap
.find(XML_spanAng
)->second
: 360;
228 std::vector
<ShapePtr
>::const_iterator aCurrShape
=rShape
->getChildren().begin();
229 const std::vector
<ShapePtr
>::const_iterator aLastShape
=rShape
->getChildren().end();
230 const sal_Int32 nShapes
=aLastShape
-aCurrShape
;
232 // find biggest shape
234 while( aCurrShape
!= aLastShape
)
236 const awt::Size
& sz
=(*aCurrShape
)->getSize();
238 aMaxSize
.Width
= std::max(
241 aMaxSize
.Height
= std::max(
249 const sal_Int32 nMaxDim
=std::max(aMaxSize
.Width
,aMaxSize
.Height
);
250 awt::Size aTotalSize
;
251 aCurrShape
=rShape
->getChildren().begin();
252 for( sal_Int32 i
=0; i
<nShapes
; ++i
, ++aCurrShape
)
254 const awt::Size
& sz
=(*aCurrShape
)->getSize();
256 const double r
=nShapes
*nMaxDim
/F_2PI
* 360.0/nSpanAngle
;
257 const awt::Point
aCurrPos(
258 r
+ r
*sin( (double(i
)*nSpanAngle
/nShapes
+ nStartAngle
)*F_PI180
),
259 r
- r
*cos( (double(i
)*nSpanAngle
/nShapes
+ nStartAngle
)*F_PI180
) );
260 (*aCurrShape
)->setPosition(aCurrPos
);
262 aTotalSize
.Width
= std::max(
264 aCurrPos
.X
+ sz
.Width
);
265 aTotalSize
.Height
= std::max(
267 aCurrPos
.Y
+ sz
.Height
);
270 rShape
->setSize(aTotalSize
);
280 if( rShape
->getChildren().empty() )
282 rShape
->setSize(awt::Size(50,50));
286 const sal_Int32 nDir
=maMap
.count(XML_linDir
) ? maMap
.find(XML_linDir
)->second
: XML_fromL
;
287 const sal_Int32 nIncX
=nDir
==XML_fromL
? 1 : (nDir
==XML_fromR
? -1 : 0);
288 const sal_Int32 nIncY
=nDir
==XML_fromT
? 1 : (nDir
==XML_fromB
? -1 : 0);
290 std::vector
<ShapePtr
>::const_iterator aCurrShape
=rShape
->getChildren().begin();
291 const std::vector
<ShapePtr
>::const_iterator aLastShape
=rShape
->getChildren().end();
292 const awt::Point aStartPos
=(*aCurrShape
)->getPosition();
293 awt::Point aCurrPos
=aStartPos
;
294 awt::Size aTotalSize
;
295 while( aCurrShape
!= aLastShape
)
297 const awt::Size
& sz
=(*aCurrShape
)->getSize();
298 (*aCurrShape
)->setPosition(aCurrPos
);
300 aTotalSize
.Width
= std::max(
302 aCurrPos
.X
+ sz
.Width
);
303 aTotalSize
.Height
= std::max(
305 aCurrPos
.Y
+ sz
.Height
);
307 // HACK: the spacing is arbitrary
308 aCurrPos
.X
+= nIncX
*(sz
.Width
+5);
309 aCurrPos
.Y
+= nIncY
*(sz
.Height
+5);
314 rShape
->setSize(aTotalSize
);
323 // HACK. Handled one level higher. Or rather, planned to
328 TextBodyPtr pTextBody
=rShape
->getTextBody();
330 pTextBody
->getParagraphs().empty() ||
331 pTextBody
->getParagraphs().front()->getRuns().empty() )
333 rShape
->setSize(awt::Size(5,5));
337 // HACK - count chars & paragraphs to come up with *some*
338 // notion of necessary size
339 const sal_Int32 nHackyFontHeight
=50;
340 const sal_Int32 nHackyFontWidth
=20;
341 awt::Size aTotalSize
;
342 for( sal_uInt32 nPara
=0; nPara
<pTextBody
->getParagraphs().size(); ++nPara
)
344 aTotalSize
.Height
+= nHackyFontHeight
;
346 sal_Int32 nLocalWidth
=0;
347 for( sal_uInt32 nRun
=0; nRun
<pTextBody
->getParagraphs().at(nPara
)->getRuns().size(); ++nRun
)
349 pTextBody
->getParagraphs().at(nPara
)->getRuns().at(nRun
)->getText().getLength()
352 aTotalSize
.Width
= std::max(
357 rShape
->setSize(aTotalSize
);
366 "Layouting shape " << rName
<< ": (" << rShape
->getPosition().X
<< ","
367 << rShape
->getPosition().Y
<< "," << rShape
->getSize().Width
<< ","
368 << rShape
->getSize().Height
<< ")");
371 void LayoutNode::accept( LayoutAtomVisitor
& rVisitor
)
373 rVisitor
.visit(*this);
376 bool LayoutNode::setupShape( const ShapePtr
& rShape
, const Diagram
& rDgm
, sal_uInt32 nIdx
) const
378 // find the data node to grab text from
379 DiagramData::PointsNameMap::const_iterator aDataNode
=rDgm
.getData()->getPointsPresNameMap().find(msName
);
380 if( aDataNode
!= rDgm
.getData()->getPointsPresNameMap().end() &&
381 aDataNode
->second
.size() > nIdx
)
385 "Filling content from " << nIdx
<< "th layout node named \""
386 << msName
<< "\", modelId \""
387 << aDataNode
->second
.at(nIdx
)->msModelId
<< "\"");
389 // got the presentation node - now, need the actual data node:
390 const DiagramData::StringMap::const_iterator aNodeName
=rDgm
.getData()->getPresOfNameMap().find(
391 aDataNode
->second
.at(nIdx
)->msModelId
);
392 if( aNodeName
!= rDgm
.getData()->getPresOfNameMap().end() )
394 DiagramData::StringMap::value_type::second_type::const_iterator aVecIter
=aNodeName
->second
.begin();
395 const DiagramData::StringMap::value_type::second_type::const_iterator aVecEnd
=aNodeName
->second
.end();
396 while( aVecIter
!= aVecEnd
)
398 DiagramData::PointNameMap
& rMap
= rDgm
.getData()->getPointNameMap();
399 DiagramData::PointNameMap::const_iterator aDataNode2
= rMap
.find(aVecIter
->first
);
400 if (aDataNode2
== rMap
.end())
407 if( aVecIter
->second
== 0 )
409 // grab shape attr from topmost element(s)
410 rShape
->getShapeProperties() = aDataNode2
->second
->mpShape
->getShapeProperties();
411 rShape
->getLineProperties() = aDataNode2
->second
->mpShape
->getLineProperties();
412 rShape
->getFillProperties() = aDataNode2
->second
->mpShape
->getFillProperties();
413 rShape
->getCustomShapeProperties() = aDataNode2
->second
->mpShape
->getCustomShapeProperties();
414 rShape
->setMasterTextListStyle( aDataNode2
->second
->mpShape
->getMasterTextListStyle() );
418 "Custom shape with preset type "
419 << (rShape
->getCustomShapeProperties()
420 ->getShapePresetType())
421 << " added for layout node named \"" << msName
425 // append text with right outline level
426 if( aDataNode2
->second
->mpShape
->getTextBody() &&
427 !aDataNode2
->second
->mpShape
->getTextBody()->getParagraphs().empty() &&
428 !aDataNode2
->second
->mpShape
->getTextBody()->getParagraphs().front()->getRuns().empty() )
430 TextBodyPtr pTextBody
=rShape
->getTextBody();
433 pTextBody
.reset( new TextBody() );
435 // also copy text attrs
436 pTextBody
->getTextListStyle() =
437 aDataNode2
->second
->mpShape
->getTextBody()->getTextListStyle();
438 pTextBody
->getTextProperties() =
439 aDataNode2
->second
->mpShape
->getTextBody()->getTextProperties();
441 rShape
->setTextBody(pTextBody
);
444 TextParagraph
& rPara
=pTextBody
->addParagraph();
445 if( aVecIter
->second
!= -1 )
446 rPara
.getProperties().setLevel(aVecIter
->second
);
449 aDataNode2
->second
->mpShape
->getTextBody()->getParagraphs().front()->getRuns().front());
450 rPara
.getProperties().apply(
451 aDataNode2
->second
->mpShape
->getTextBody()->getParagraphs().front()->getProperties());
461 "ShapeCreationVisitor::visit: no data node name found while"
462 " processing shape type "
463 << rShape
->getCustomShapeProperties()->getShapePresetType()
464 << " for layout node named \"" << msName
<< "\"");
467 // TODO(Q1): apply styling & coloring - taking
468 // layout node's styleLbl for both style & color
469 // now, but docs are a bit unclear on this
470 if( !msStyleLabel
.isEmpty() )
473 "oox.drawingml", "setting style with label " << msStyleLabel
);
475 const DiagramQStyleMap::const_iterator aStyle
=rDgm
.getStyles().find(msStyleLabel
);
476 if( aStyle
!= rDgm
.getStyles().end() )
478 rShape
->getShapeStyleRefs()[XML_fillRef
] = aStyle
->second
.maFillStyle
;
481 "added fill style with id "
482 << aStyle
->second
.maFillStyle
.mnThemedIdx
);
483 rShape
->getShapeStyleRefs()[XML_lnRef
] = aStyle
->second
.maLineStyle
;
486 "added line style with id "
487 << aStyle
->second
.maLineStyle
.mnThemedIdx
);
488 rShape
->getShapeStyleRefs()[XML_effectRef
] = aStyle
->second
.maEffectStyle
;
491 "added effect style with id "
492 << aStyle
->second
.maEffectStyle
.mnThemedIdx
);
493 rShape
->getShapeStyleRefs()[XML_fontRef
] = aStyle
->second
.maTextStyle
;
496 "added fontref style with id "
497 << aStyle
->second
.maTextStyle
.mnThemedIdx
);
498 Color aColor
=aStyle
->second
.maTextStyle
.maPhClr
;
499 OSL_TRACE("added fontref color with alpha %d", aColor
.getTransparency() );
502 const DiagramColorMap::const_iterator aColor
=rDgm
.getColors().find(msStyleLabel
);
503 if( aColor
!= rDgm
.getColors().end() )
505 const DiagramColor
& rColor
=aColor
->second
;
506 if( rColor
.maFillColor
.isUsed() )
507 rShape
->getShapeStyleRefs()[XML_fillRef
].maPhClr
= rColor
.maFillColor
;
508 if( rColor
.maLineColor
.isUsed() )
509 rShape
->getShapeStyleRefs()[XML_lnRef
].maPhClr
= rColor
.maLineColor
;
510 if( rColor
.maEffectColor
.isUsed() )
511 rShape
->getShapeStyleRefs()[XML_effectRef
].maPhClr
= rColor
.maEffectColor
;
512 if( rColor
.maTextFillColor
.isUsed() )
513 rShape
->getShapeStyleRefs()[XML_fontRef
].maPhClr
= rColor
.maTextFillColor
;
517 // even if no data node found, successful anyway. it's
518 // contained at the layoutnode
525 "no text found while processing shape type "
526 << rShape
->getCustomShapeProperties()->getShapePresetType()
527 << " for layout node named \"" << msName
<< "\"");
535 class ShapeLayoutingVisitor
: public LayoutAtomVisitor
537 ShapePtr mpParentShape
;
538 const Diagram
& mrDgm
;
541 virtual void visit(ConstraintAtom
& rAtom
) SAL_OVERRIDE
;
542 virtual void visit(AlgAtom
& rAtom
) SAL_OVERRIDE
;
543 virtual void visit(ForEachAtom
& rAtom
) SAL_OVERRIDE
;
544 virtual void visit(ConditionAtom
& rAtom
) SAL_OVERRIDE
;
545 virtual void visit(ChooseAtom
& rAtom
) SAL_OVERRIDE
;
546 virtual void visit(LayoutNode
& rAtom
) SAL_OVERRIDE
;
549 ShapeLayoutingVisitor(const ShapePtr
& rParentShape
,
551 const OUString
& rName
) :
552 mpParentShape(rParentShape
),
557 void defaultVisit(LayoutAtom
& rAtom
);
560 class ShallowPresNameVisitor
: public LayoutAtomVisitor
562 const Diagram
& mrDgm
;
565 void defaultVisit(LayoutAtom
& rAtom
);
566 virtual void visit(ConstraintAtom
& rAtom
) SAL_OVERRIDE
;
567 virtual void visit(AlgAtom
& rAtom
) SAL_OVERRIDE
;
568 virtual void visit(ForEachAtom
& rAtom
) SAL_OVERRIDE
;
569 virtual void visit(ConditionAtom
& rAtom
) SAL_OVERRIDE
;
570 virtual void visit(ChooseAtom
& rAtom
) SAL_OVERRIDE
;
571 virtual void visit(LayoutNode
& rAtom
) SAL_OVERRIDE
;
574 explicit ShallowPresNameVisitor(const Diagram
& rDgm
) :
579 size_t getCount() const
583 void ShapeCreationVisitor::defaultVisit(LayoutAtom
& rAtom
)
585 const std::vector
<LayoutAtomPtr
>& pChildren
=rAtom
.getChildren();
586 std::for_each( pChildren
.begin(), pChildren
.end(),
587 boost::bind( &LayoutAtom::accept
,
589 boost::ref(*this)) );
592 void ShapeCreationVisitor::visit(ConstraintAtom
& /*rAtom*/)
594 // TODO: eval the constraints
597 void ShapeCreationVisitor::visit(AlgAtom
& rAtom
)
602 void ShapeCreationVisitor::visit(ForEachAtom
& rAtom
)
604 const std::vector
<LayoutAtomPtr
>& pChildren
=rAtom
.getChildren();
606 sal_Int32 nChildren
=1;
607 if( rAtom
.iterator().mnPtType
== XML_node
)
609 // cound child data nodes - check all child Atoms for "name"
610 // attribute that is contained in diagram's
611 // getPointsPresNameMap()
612 ShallowPresNameVisitor
aVisitor(mrDgm
);
613 std::for_each( pChildren
.begin(), pChildren
.end(),
614 boost::bind( &LayoutAtom::accept
,
616 boost::ref(aVisitor
)) );
617 nChildren
= aVisitor
.getCount();
620 const sal_Int32 nCnt
= std::min(
622 rAtom
.iterator().mnCnt
==-1 ? nChildren
: rAtom
.iterator().mnCnt
);
624 const sal_Int32 nOldIdx
=mnCurrIdx
;
625 const sal_Int32 nStep
=rAtom
.iterator().mnStep
;
626 for( mnCurrIdx
=0; mnCurrIdx
<nCnt
&& nStep
>0; mnCurrIdx
+=nStep
)
628 // TODO there is likely some conditions
629 std::for_each( pChildren
.begin(), pChildren
.end(),
630 boost::bind( &LayoutAtom::accept
,
632 boost::ref(*this)) );
639 void ShapeCreationVisitor::visit(ConditionAtom
& rAtom
)
644 void ShapeCreationVisitor::visit(ChooseAtom
& rAtom
)
649 void ShapeCreationVisitor::visit(LayoutNode
& rAtom
)
651 ShapePtr
pCurrParent(mpParentShape
);
652 ShapePtr
pCurrShape(rAtom
.getShape());
657 "processing shape type "
658 << (pCurrShape
->getCustomShapeProperties()
659 ->getShapePresetType()));
661 // TODO(F3): cloned shape shares all properties by reference,
662 // don't change them!
663 ShapePtr
pClonedShape(
664 new Shape( pCurrShape
));
666 if( rAtom
.setupShape(pClonedShape
, mrDgm
, mnCurrIdx
) )
668 pCurrParent
->addChild(pClonedShape
);
669 pCurrParent
= pClonedShape
;
674 OSL_TRACE("ShapeCreationVisitor::visit: no shape set while processing layoutnode named %s",
675 OUSTRING_TO_CSTR( rAtom
.getName() ) );
678 // set new parent for children
679 ShapePtr
pPreviousParent(mpParentShape
);
680 mpParentShape
=pCurrParent
;
686 mpParentShape
=pPreviousParent
;
688 // layout shapes - now all child shapes are created
689 ShapeLayoutingVisitor
aLayoutingVisitor(pCurrParent
,
692 aLayoutingVisitor
.defaultVisit(rAtom
);
695 void ShapeLayoutingVisitor::defaultVisit(LayoutAtom
& rAtom
)
697 // visit all children, one of them needs to be the layout algorithm
698 const std::vector
<LayoutAtomPtr
>& pChildren
=rAtom
.getChildren();
699 std::for_each( pChildren
.begin(), pChildren
.end(),
700 boost::bind( &LayoutAtom::accept
,
702 boost::ref(*this)) );
705 void ShapeLayoutingVisitor::visit(ConstraintAtom
& /*rAtom*/)
710 void ShapeLayoutingVisitor::visit(AlgAtom
& rAtom
)
712 rAtom
.layoutShape(mpParentShape
,mrDgm
,maName
);
715 void ShapeLayoutingVisitor::visit(ForEachAtom
& /*rAtom*/)
720 void ShapeLayoutingVisitor::visit(ConditionAtom
& rAtom
)
725 void ShapeLayoutingVisitor::visit(ChooseAtom
& rAtom
)
730 void ShapeLayoutingVisitor::visit(LayoutNode
& /*rAtom*/)
732 // stop processing - only traverse Condition/Choose atoms
735 void ShallowPresNameVisitor::defaultVisit(LayoutAtom
& rAtom
)
737 // visit all children, at least one of them needs to have proper
739 const std::vector
<LayoutAtomPtr
>& pChildren
=rAtom
.getChildren();
740 std::for_each( pChildren
.begin(), pChildren
.end(),
741 boost::bind( &LayoutAtom::accept
,
743 boost::ref(*this)) );
746 void ShallowPresNameVisitor::visit(ConstraintAtom
& /*rAtom*/)
751 void ShallowPresNameVisitor::visit(AlgAtom
& /*rAtom*/)
756 void ShallowPresNameVisitor::visit(ForEachAtom
& rAtom
)
761 void ShallowPresNameVisitor::visit(ConditionAtom
& rAtom
)
766 void ShallowPresNameVisitor::visit(ChooseAtom
& rAtom
)
771 void ShallowPresNameVisitor::visit(LayoutNode
& rAtom
)
773 DiagramData::PointsNameMap::const_iterator aDataNode
=
774 mrDgm
.getData()->getPointsPresNameMap().find(rAtom
.getName());
775 if( aDataNode
!= mrDgm
.getData()->getPointsPresNameMap().end() )
776 mnCnt
= std::max(mnCnt
,
777 aDataNode
->second
.size());
782 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */