summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-12-10 12:27:50 +0200
committerNoel Grandin <noel@peralex.com>2015-12-11 10:11:23 +0200
commit58d8d8ac67aa9b907f1304a48efa0f7a473d9de4 (patch)
treea0d88f3c8a57ce9d08d97c803ea0ec83a3dd8b62
parent44ad6aca0dee29841ec7cd15c6d0ad9b3dcaedbe (diff)
tdf#69977: uno::Sequence is expensive
when used as a mutable data-structure. Plain std::vector halves the time taken to display the chart dialog Create a class to represent the std::vector we are going to be passing around, and move some of the utility methods into it to make the code prettier. Also create an optimised append(&&) method for the common case of appending small temporaries. Change-Id: I7f5b43fb4a8a84e40e6a52fcb7e9f974091b4485
-rw-r--r--drawinglayer/source/drawinglayeruno/xprimitive2drenderer.cxx4
-rw-r--r--drawinglayer/source/primitive2d/animatedprimitive2d.cxx26
-rw-r--r--drawinglayer/source/primitive2d/backgroundcolorprimitive2d.cxx14
-rw-r--r--drawinglayer/source/primitive2d/baseprimitive2d.cxx120
-rw-r--r--drawinglayer/source/primitive2d/borderlineprimitive2d.cxx10
-rw-r--r--drawinglayer/source/primitive2d/controlprimitive2d.cxx12
-rw-r--r--drawinglayer/source/primitive2d/cropprimitive2d.cxx14
-rw-r--r--drawinglayer/source/primitive2d/discretebitmapprimitive2d.cxx6
-rw-r--r--drawinglayer/source/primitive2d/discreteshadowprimitive2d.cxx8
-rw-r--r--drawinglayer/source/primitive2d/embedded3dprimitive2d.cxx8
-rw-r--r--drawinglayer/source/primitive2d/epsprimitive2d.cxx6
-rw-r--r--drawinglayer/source/primitive2d/fillgradientprimitive2d.cxx16
-rw-r--r--drawinglayer/source/primitive2d/fillgraphicprimitive2d.cxx8
-rw-r--r--drawinglayer/source/primitive2d/fillhatchprimitive2d.cxx8
-rw-r--r--drawinglayer/source/primitive2d/graphicprimitive2d.cxx12
-rw-r--r--drawinglayer/source/primitive2d/graphicprimitivehelper2d.cxx32
-rw-r--r--drawinglayer/source/primitive2d/gridprimitive2d.cxx14
-rw-r--r--drawinglayer/source/primitive2d/groupprimitive2d.cxx6
-rw-r--r--drawinglayer/source/primitive2d/helplineprimitive2d.cxx12
-rw-r--r--drawinglayer/source/primitive2d/hiddengeometryprimitive2d.cxx8
-rw-r--r--drawinglayer/source/primitive2d/invertprimitive2d.cxx2
-rw-r--r--drawinglayer/source/primitive2d/markerarrayprimitive2d.cxx6
-rw-r--r--drawinglayer/source/primitive2d/maskprimitive2d.cxx2
-rw-r--r--drawinglayer/source/primitive2d/mediaprimitive2d.cxx11
-rw-r--r--drawinglayer/source/primitive2d/metafileprimitive2d.cxx64
-rw-r--r--drawinglayer/source/primitive2d/modifiedcolorprimitive2d.cxx2
-rw-r--r--drawinglayer/source/primitive2d/objectinfoprimitive2d.cxx2
-rw-r--r--drawinglayer/source/primitive2d/pagepreviewprimitive2d.cxx16
-rw-r--r--drawinglayer/source/primitive2d/patternfillprimitive2d.cxx20
-rw-r--r--drawinglayer/source/primitive2d/polygonprimitive2d.cxx34
-rw-r--r--drawinglayer/source/primitive2d/polypolygonprimitive2d.cxx54
-rw-r--r--drawinglayer/source/primitive2d/primitivetools2d.cxx36
-rw-r--r--drawinglayer/source/primitive2d/sceneprimitive2d.cxx31
-rw-r--r--drawinglayer/source/primitive2d/sdrdecompositiontools2d.cxx2
-rw-r--r--drawinglayer/source/primitive2d/shadowprimitive2d.cxx14
-rw-r--r--drawinglayer/source/primitive2d/structuretagprimitive2d.cxx2
-rw-r--r--drawinglayer/source/primitive2d/svggradientprimitive2d.cxx82
-rw-r--r--drawinglayer/source/primitive2d/textbreakuphelper.cxx10
-rw-r--r--drawinglayer/source/primitive2d/textdecoratedprimitive2d.cxx24
-rw-r--r--drawinglayer/source/primitive2d/texteffectprimitive2d.cxx24
-rw-r--r--drawinglayer/source/primitive2d/texthierarchyprimitive2d.cxx12
-rw-r--r--drawinglayer/source/primitive2d/textlineprimitive2d.cxx11
-rw-r--r--drawinglayer/source/primitive2d/textprimitive2d.cxx8
-rw-r--r--drawinglayer/source/primitive2d/textstrikeoutprimitive2d.cxx10
-rw-r--r--drawinglayer/source/primitive2d/transformprimitive2d.cxx4
-rw-r--r--drawinglayer/source/primitive2d/transparenceprimitive2d.cxx4
-rw-r--r--drawinglayer/source/primitive2d/unifiedtransparenceprimitive2d.cxx14
-rw-r--r--drawinglayer/source/primitive2d/wallpaperprimitive2d.cxx12
-rw-r--r--drawinglayer/source/primitive2d/wrongspellprimitive2d.cxx4
-rw-r--r--drawinglayer/source/processor2d/baseprocessor2d.cxx9
-rw-r--r--drawinglayer/source/processor2d/contourextractor2d.cxx8
-rw-r--r--drawinglayer/source/processor2d/hittestprocessor2d.cxx4
-rw-r--r--drawinglayer/source/processor2d/textaspolygonextractor2d.cxx2
-rw-r--r--drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx28
-rw-r--r--drawinglayer/source/processor2d/vclmetafileprocessor2d.hxx2
-rw-r--r--drawinglayer/source/processor2d/vclpixelprocessor2d.cxx6
-rw-r--r--drawinglayer/source/processor2d/vclprocessor2d.cxx12
-rw-r--r--drawinglayer/source/processor3d/geometry2dextractor.cxx4
-rw-r--r--drawinglayer/source/processor3d/shadow3dextractor.cxx16
-rw-r--r--drawinglayer/source/tools/converters.cxx10
-rw-r--r--include/drawinglayer/primitive2d/animatedprimitive2d.hxx12
-rw-r--r--include/drawinglayer/primitive2d/backgroundcolorprimitive2d.hxx4
-rw-r--r--include/drawinglayer/primitive2d/baseprimitive2d.hxx34
-rw-r--r--include/drawinglayer/primitive2d/borderlineprimitive2d.hxx2
-rw-r--r--include/drawinglayer/primitive2d/controlprimitive2d.hxx4
-rw-r--r--include/drawinglayer/primitive2d/cropprimitive2d.hxx4
-rw-r--r--include/drawinglayer/primitive2d/discretebitmapprimitive2d.hxx2
-rw-r--r--include/drawinglayer/primitive2d/discreteshadowprimitive2d.hxx2
-rw-r--r--include/drawinglayer/primitive2d/embedded3dprimitive2d.hxx4
-rw-r--r--include/drawinglayer/primitive2d/epsprimitive2d.hxx2
-rw-r--r--include/drawinglayer/primitive2d/fillgradientprimitive2d.hxx8
-rw-r--r--include/drawinglayer/primitive2d/fillgraphicprimitive2d.hxx2
-rw-r--r--include/drawinglayer/primitive2d/fillhatchprimitive2d.hxx4
-rw-r--r--include/drawinglayer/primitive2d/graphicprimitive2d.hxx2
-rw-r--r--include/drawinglayer/primitive2d/graphicprimitivehelper2d.hxx6
-rw-r--r--include/drawinglayer/primitive2d/gridprimitive2d.hxx4
-rw-r--r--include/drawinglayer/primitive2d/groupprimitive2d.hxx8
-rw-r--r--include/drawinglayer/primitive2d/helplineprimitive2d.hxx4
-rw-r--r--include/drawinglayer/primitive2d/hiddengeometryprimitive2d.hxx4
-rw-r--r--include/drawinglayer/primitive2d/invertprimitive2d.hxx2
-rw-r--r--include/drawinglayer/primitive2d/markerarrayprimitive2d.hxx2
-rw-r--r--include/drawinglayer/primitive2d/maskprimitive2d.hxx2
-rw-r--r--include/drawinglayer/primitive2d/mediaprimitive2d.hxx2
-rw-r--r--include/drawinglayer/primitive2d/metafileprimitive2d.hxx2
-rw-r--r--include/drawinglayer/primitive2d/modifiedcolorprimitive2d.hxx2
-rw-r--r--include/drawinglayer/primitive2d/objectinfoprimitive2d.hxx2
-rw-r--r--include/drawinglayer/primitive2d/pagepreviewprimitive2d.hxx8
-rw-r--r--include/drawinglayer/primitive2d/patternfillprimitive2d.hxx8
-rw-r--r--include/drawinglayer/primitive2d/polygonprimitive2d.hxx10
-rw-r--r--include/drawinglayer/primitive2d/polypolygonprimitive2d.hxx14
-rw-r--r--include/drawinglayer/primitive2d/primitivetools2d.hxx8
-rw-r--r--include/drawinglayer/primitive2d/sceneprimitive2d.hxx10
-rw-r--r--include/drawinglayer/primitive2d/shadowprimitive2d.hxx4
-rw-r--r--include/drawinglayer/primitive2d/structuretagprimitive2d.hxx2
-rw-r--r--include/drawinglayer/primitive2d/svggradientprimitive2d.hxx32
-rw-r--r--include/drawinglayer/primitive2d/textbreakuphelper.hxx6
-rw-r--r--include/drawinglayer/primitive2d/textdecoratedprimitive2d.hxx2
-rw-r--r--include/drawinglayer/primitive2d/texteffectprimitive2d.hxx10
-rw-r--r--include/drawinglayer/primitive2d/texthierarchyprimitive2d.hxx12
-rw-r--r--include/drawinglayer/primitive2d/textlineprimitive2d.hxx2
-rw-r--r--include/drawinglayer/primitive2d/textprimitive2d.hxx2
-rw-r--r--include/drawinglayer/primitive2d/textstrikeoutprimitive2d.hxx4
-rw-r--r--include/drawinglayer/primitive2d/transformprimitive2d.hxx2
-rw-r--r--include/drawinglayer/primitive2d/transparenceprimitive2d.hxx8
-rw-r--r--include/drawinglayer/primitive2d/unifiedtransparenceprimitive2d.hxx4
-rw-r--r--include/drawinglayer/primitive2d/wallpaperprimitive2d.hxx2
-rw-r--r--include/drawinglayer/primitive2d/wrongspellprimitive2d.hxx2
-rw-r--r--include/drawinglayer/processor2d/baseprocessor2d.hxx2
-rw-r--r--include/drawinglayer/processor3d/geometry2dextractor.hxx4
-rw-r--r--include/drawinglayer/processor3d/shadow3dextractor.hxx6
-rw-r--r--include/drawinglayer/tools/converters.hxx2
-rw-r--r--include/sfx2/thumbnailviewitem.hxx2
-rw-r--r--include/svx/charthelper.hxx2
-rw-r--r--include/svx/framelink.hxx6
-rw-r--r--include/svx/sdr/animation/animationstate.hxx4
-rw-r--r--include/svx/sdr/attribute/sdrallfillattributeshelper.hxx4
-rw-r--r--include/svx/sdr/contact/viewcontact.hxx16
-rw-r--r--include/svx/sdr/contact/viewcontactofe3d.hxx4
-rw-r--r--include/svx/sdr/contact/viewcontactofe3dscene.hxx4
-rw-r--r--include/svx/sdr/contact/viewcontactofpageobj.hxx2
-rw-r--r--include/svx/sdr/contact/viewcontactofsdrmediaobj.hxx2
-rw-r--r--include/svx/sdr/contact/viewcontactofsdrobj.hxx4
-rw-r--r--include/svx/sdr/contact/viewcontactofsdrrectobj.hxx2
-rw-r--r--include/svx/sdr/contact/viewcontactofvirtobj.hxx2
-rw-r--r--include/svx/sdr/contact/viewobjectcontact.hxx16
-rw-r--r--include/svx/sdr/contact/viewobjectcontactofpageobj.hxx2
-rw-r--r--include/svx/sdr/contact/viewobjectcontactredirector.hxx2
-rw-r--r--include/svx/sdr/overlay/overlayanimatedbitmapex.hxx2
-rw-r--r--include/svx/sdr/overlay/overlaybitmapex.hxx2
-rw-r--r--include/svx/sdr/overlay/overlayobject.hxx16
-rw-r--r--include/svx/sdr/overlay/overlayobjectcell.hxx2
-rw-r--r--include/svx/sdr/overlay/overlaypolypolygon.hxx2
-rw-r--r--include/svx/sdr/overlay/overlayprimitive2dsequenceobject.hxx8
-rw-r--r--include/svx/sdr/overlay/overlayselection.hxx6
-rw-r--r--include/svx/sdr/overlay/overlaytriangle.hxx2
-rw-r--r--include/svx/sdr/primitive2d/sdrdecompositiontools.hxx4
-rw-r--r--include/svx/svddrgmt.hxx16
-rw-r--r--include/svx/svdotext.hxx12
-rw-r--r--include/svx/svdpage.hxx2
-rw-r--r--include/test/primitive2dxmldump.hxx4
-rw-r--r--include/vcl/svgdata.hxx6
-rw-r--r--sc/source/ui/inc/overlayobject.hxx2
-rw-r--r--sc/source/ui/view/overlayobject.cxx6
-rw-r--r--sd/source/core/CustomAnimationEffect.cxx4
-rw-r--r--sd/source/ui/animations/motionpathtag.cxx2
-rw-r--r--sd/source/ui/tools/PreviewRenderer.cxx10
-rw-r--r--sd/source/ui/unoidl/unomodel.cxx10
-rw-r--r--sd/source/ui/view/sdview.cxx13
-rw-r--r--sfx2/source/control/recentdocsviewitem.cxx2
-rw-r--r--sfx2/source/control/templateabstractview.cxx2
-rw-r--r--sfx2/source/control/templatecontaineritem.cxx2
-rw-r--r--sfx2/source/control/templateviewitem.cxx2
-rw-r--r--sfx2/source/control/thumbnailview.cxx2
-rw-r--r--sfx2/source/control/thumbnailviewitem.cxx8
-rw-r--r--sfx2/source/dialog/infobar.cxx4
-rw-r--r--svgio/inc/svgio/svgreader/svgcharacternode.hxx4
-rw-r--r--svgio/inc/svgio/svgreader/svgcirclenode.hxx2
-rw-r--r--svgio/inc/svgio/svgreader/svgclippathnode.hxx4
-rw-r--r--svgio/inc/svgio/svgreader/svgellipsenode.hxx2
-rw-r--r--svgio/inc/svgio/svgreader/svggnode.hxx2
-rw-r--r--svgio/inc/svgio/svgreader/svgimagenode.hxx2
-rw-r--r--svgio/inc/svgio/svgreader/svglinenode.hxx2
-rw-r--r--svgio/inc/svgio/svgreader/svgmarkernode.hxx4
-rw-r--r--svgio/inc/svgio/svgreader/svgmasknode.hxx4
-rw-r--r--svgio/inc/svgio/svgreader/svgnode.hxx2
-rw-r--r--svgio/inc/svgio/svgreader/svgpathnode.hxx2
-rw-r--r--svgio/inc/svgio/svgreader/svgpatternnode.hxx4
-rw-r--r--svgio/inc/svgio/svgreader/svgpolynode.hxx2
-rw-r--r--svgio/inc/svgio/svgreader/svgrectnode.hxx2
-rw-r--r--svgio/inc/svgio/svgreader/svgstyleattributes.hxx24
-rw-r--r--svgio/inc/svgio/svgreader/svgsvgnode.hxx2
-rw-r--r--svgio/inc/svgio/svgreader/svgtextnode.hxx8
-rw-r--r--svgio/inc/svgio/svgreader/svgtextpathnode.hxx4
-rw-r--r--svgio/inc/svgio/svgreader/svgusenode.hxx2
-rw-r--r--svgio/qa/cppunit/SvgImportTest.cxx6
-rw-r--r--svgio/source/svgreader/svgcharacternode.cxx12
-rw-r--r--svgio/source/svgreader/svgcirclenode.cxx6
-rw-r--r--svgio/source/svgreader/svgclippathnode.cxx32
-rw-r--r--svgio/source/svgreader/svgellipsenode.cxx6
-rw-r--r--svgio/source/svgreader/svggnode.cxx6
-rw-r--r--svgio/source/svgreader/svgimagenode.cxx24
-rw-r--r--svgio/source/svgreader/svglinenode.cxx6
-rw-r--r--svgio/source/svgreader/svgmarkernode.cxx4
-rw-r--r--svgio/source/svgreader/svgmasknode.cxx37
-rw-r--r--svgio/source/svgreader/svgnode.cxx12
-rw-r--r--svgio/source/svgreader/svgpathnode.cxx6
-rw-r--r--svgio/source/svgreader/svgpatternnode.cxx6
-rw-r--r--svgio/source/svgreader/svgpolynode.cxx6
-rw-r--r--svgio/source/svgreader/svgrectnode.cxx6
-rw-r--r--svgio/source/svgreader/svgstyleattributes.cxx98
-rw-r--r--svgio/source/svgreader/svgsvgnode.cxx50
-rw-r--r--svgio/source/svgreader/svgtextnode.cxx38
-rw-r--r--svgio/source/svgreader/svgtextpathnode.cxx14
-rw-r--r--svgio/source/svgreader/svgusenode.cxx10
-rw-r--r--svgio/source/svguno/xsvgparser.cxx5
-rw-r--r--svx/inc/sdr/contact/viewcontactofgraphic.hxx6
-rw-r--r--svx/inc/sdr/contact/viewcontactofgroup.hxx2
-rw-r--r--svx/inc/sdr/contact/viewcontactofmasterpagedescriptor.hxx2
-rw-r--r--svx/inc/sdr/contact/viewcontactofopenglobj.hxx2
-rw-r--r--svx/inc/sdr/contact/viewcontactofsdrcaptionobj.hxx2
-rw-r--r--svx/inc/sdr/contact/viewcontactofsdrcircobj.hxx2
-rw-r--r--svx/inc/sdr/contact/viewcontactofsdredgeobj.hxx2
-rw-r--r--svx/inc/sdr/contact/viewcontactofsdrmeasureobj.hxx2
-rw-r--r--svx/inc/sdr/contact/viewcontactofsdrobjcustomshape.hxx2
-rw-r--r--svx/inc/sdr/contact/viewcontactofsdrole2obj.hxx4
-rw-r--r--svx/inc/sdr/contact/viewcontactofsdrpage.hxx20
-rw-r--r--svx/inc/sdr/contact/viewcontactofsdrpathobj.hxx2
-rw-r--r--svx/inc/sdr/contact/viewcontactofunocontrol.hxx2
-rw-r--r--svx/inc/sdr/contact/viewobjectcontactofe3d.hxx2
-rw-r--r--svx/inc/sdr/contact/viewobjectcontactofe3dscene.hxx4
-rw-r--r--svx/inc/sdr/contact/viewobjectcontactofgraphic.hxx2
-rw-r--r--svx/inc/sdr/contact/viewobjectcontactofgroup.hxx2
-rw-r--r--svx/inc/sdr/contact/viewobjectcontactofmasterpagedescriptor.hxx2
-rw-r--r--svx/inc/sdr/contact/viewobjectcontactofsdrole2obj.hxx2
-rw-r--r--svx/inc/sdr/contact/viewobjectcontactofsdrpage.hxx12
-rw-r--r--svx/inc/sdr/contact/viewobjectcontactofunocontrol.hxx4
-rw-r--r--svx/inc/sdr/overlay/overlaycrosshair.hxx2
-rw-r--r--svx/inc/sdr/overlay/overlayhandle.hxx2
-rw-r--r--svx/inc/sdr/overlay/overlayhelpline.hxx2
-rw-r--r--svx/inc/sdr/overlay/overlayline.hxx2
-rw-r--r--svx/inc/sdr/overlay/overlayrectangle.hxx2
-rw-r--r--svx/inc/sdr/overlay/overlayrollingrectangle.hxx2
-rw-r--r--svx/inc/sdr/overlay/overlaytools.hxx12
-rw-r--r--svx/inc/sdr/primitive2d/sdrcaptionprimitive2d.hxx2
-rw-r--r--svx/inc/sdr/primitive2d/sdrconnectorprimitive2d.hxx2
-rw-r--r--svx/inc/sdr/primitive2d/sdrcustomshapeprimitive2d.hxx8
-rw-r--r--svx/inc/sdr/primitive2d/sdrellipseprimitive2d.hxx4
-rw-r--r--svx/inc/sdr/primitive2d/sdrgrafprimitive2d.hxx2
-rw-r--r--svx/inc/sdr/primitive2d/sdrmeasureprimitive2d.hxx2
-rw-r--r--svx/inc/sdr/primitive2d/sdrole2primitive2d.hxx8
-rw-r--r--svx/inc/sdr/primitive2d/sdrolecontentprimitive2d.hxx2
-rw-r--r--svx/inc/sdr/primitive2d/sdrpathprimitive2d.hxx2
-rw-r--r--svx/inc/sdr/primitive2d/sdrrectangleprimitive2d.hxx2
-rw-r--r--svx/inc/sdr/primitive2d/sdrtextprimitive2d.hxx16
-rw-r--r--svx/source/dialog/framelink.cxx10
-rw-r--r--svx/source/dialog/pagectrl.cxx6
-rw-r--r--svx/source/engine3d/view3d.cxx14
-rw-r--r--svx/source/sdr/animation/animationstate.cxx6
-rw-r--r--svx/source/sdr/attribute/sdrallfillattributeshelper.cxx10
-rw-r--r--svx/source/sdr/contact/objectcontactofobjlistpainter.cxx7
-rw-r--r--svx/source/sdr/contact/objectcontactofpageview.cxx8
-rw-r--r--svx/source/sdr/contact/viewcontact.cxx20
-rw-r--r--svx/source/sdr/contact/viewcontactofe3d.cxx12
-rw-r--r--svx/source/sdr/contact/viewcontactofe3dscene.cxx12
-rw-r--r--svx/source/sdr/contact/viewcontactofgraphic.cxx31
-rw-r--r--svx/source/sdr/contact/viewcontactofgroup.cxx10
-rw-r--r--svx/source/sdr/contact/viewcontactofmasterpagedescriptor.cxx6
-rw-r--r--svx/source/sdr/contact/viewcontactofpageobj.cxx4
-rw-r--r--svx/source/sdr/contact/viewcontactofsdrcaptionobj.cxx8
-rw-r--r--svx/source/sdr/contact/viewcontactofsdrcircobj.cxx6
-rw-r--r--svx/source/sdr/contact/viewcontactofsdredgeobj.cxx4
-rw-r--r--svx/source/sdr/contact/viewcontactofsdrmeasureobj.cxx4
-rw-r--r--svx/source/sdr/contact/viewcontactofsdrmediaobj.cxx4
-rw-r--r--svx/source/sdr/contact/viewcontactofsdrobj.cxx13
-rw-r--r--svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx16
-rw-r--r--svx/source/sdr/contact/viewcontactofsdrole2obj.cxx19
-rw-r--r--svx/source/sdr/contact/viewcontactofsdrpage.cxx70
-rw-r--r--svx/source/sdr/contact/viewcontactofsdrpathobj.cxx4
-rw-r--r--svx/source/sdr/contact/viewcontactofsdrrectobj.cxx4
-rw-r--r--svx/source/sdr/contact/viewcontactofunocontrol.cxx6
-rw-r--r--svx/source/sdr/contact/viewcontactofvirtobj.cxx12
-rw-r--r--svx/source/sdr/contact/viewobjectcontact.cxx56
-rw-r--r--svx/source/sdr/contact/viewobjectcontactofe3d.cxx5
-rw-r--r--svx/source/sdr/contact/viewobjectcontactofe3dscene.cxx16
-rw-r--r--svx/source/sdr/contact/viewobjectcontactofgraphic.cxx8
-rw-r--r--svx/source/sdr/contact/viewobjectcontactofgroup.cxx10
-rw-r--r--svx/source/sdr/contact/viewobjectcontactofmasterpagedescriptor.cxx15
-rw-r--r--svx/source/sdr/contact/viewobjectcontactofpageobj.cxx24
-rw-r--r--svx/source/sdr/contact/viewobjectcontactofsdrole2obj.cxx7
-rw-r--r--svx/source/sdr/contact/viewobjectcontactofsdrpage.cxx44
-rw-r--r--svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx27
-rw-r--r--svx/source/sdr/contact/viewobjectcontactredirector.cxx2
-rw-r--r--svx/source/sdr/overlay/overlayanimatedbitmapex.cxx6
-rw-r--r--svx/source/sdr/overlay/overlaybitmapex.cxx6
-rw-r--r--svx/source/sdr/overlay/overlaycrosshair.cxx6
-rw-r--r--svx/source/sdr/overlay/overlayhandle.cxx4
-rw-r--r--svx/source/sdr/overlay/overlayhelpline.cxx6
-rw-r--r--svx/source/sdr/overlay/overlayline.cxx6
-rw-r--r--svx/source/sdr/overlay/overlaymanager.cxx4
-rw-r--r--svx/source/sdr/overlay/overlayobject.cxx16
-rw-r--r--svx/source/sdr/overlay/overlayobjectcell.cxx10
-rw-r--r--svx/source/sdr/overlay/overlayobjectlist.cxx4
-rw-r--r--svx/source/sdr/overlay/overlaypolypolygon.cxx8
-rw-r--r--svx/source/sdr/overlay/overlayprimitive2dsequenceobject.cxx4
-rw-r--r--svx/source/sdr/overlay/overlayrectangle.cxx4
-rw-r--r--svx/source/sdr/overlay/overlayrollingrectangle.cxx8
-rw-r--r--svx/source/sdr/overlay/overlayselection.cxx20
-rw-r--r--svx/source/sdr/overlay/overlaytools.cxx46
-rw-r--r--svx/source/sdr/overlay/overlaytriangle.cxx4
-rw-r--r--svx/source/sdr/primitive2d/primitivefactory2d.cxx5
-rw-r--r--svx/source/sdr/primitive2d/sdrcaptionprimitive2d.cxx18
-rw-r--r--svx/source/sdr/primitive2d/sdrconnectorprimitive2d.cxx10
-rw-r--r--svx/source/sdr/primitive2d/sdrcustomshapeprimitive2d.cxx10
-rw-r--r--svx/source/sdr/primitive2d/sdrdecompositiontools.cxx29
-rw-r--r--svx/source/sdr/primitive2d/sdrellipseprimitive2d.cxx24
-rw-r--r--svx/source/sdr/primitive2d/sdrgrafprimitive2d.cxx14
-rw-r--r--svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx24
-rw-r--r--svx/source/sdr/primitive2d/sdrole2primitive2d.cxx20
-rw-r--r--svx/source/sdr/primitive2d/sdrolecontentprimitive2d.cxx10
-rw-r--r--svx/source/sdr/primitive2d/sdrpathprimitive2d.cxx14
-rw-r--r--svx/source/sdr/primitive2d/sdrrectangleprimitive2d.cxx14
-rw-r--r--svx/source/sdr/primitive2d/sdrtextprimitive2d.cxx36
-rw-r--r--svx/source/svdraw/charthelper.cxx12
-rw-r--r--svx/source/svdraw/sdrhittesthelper.cxx4
-rw-r--r--svx/source/svdraw/svdcrtv.cxx2
-rw-r--r--svx/source/svdraw/svddrgmt.cxx59
-rw-r--r--svx/source/svdraw/svdedxv.cxx2
-rw-r--r--svx/source/svdraw/svdhdl.cxx6
-rw-r--r--svx/source/svdraw/svdobj.cxx18
-rw-r--r--svx/source/svdraw/svdograf.cxx4
-rw-r--r--svx/source/svdraw/svdotextdecomposition.cxx30
-rw-r--r--svx/source/svdraw/svdotextpathdecomposition.cxx30
-rw-r--r--svx/source/svdraw/svdotxtr.cxx4
-rw-r--r--svx/source/svdraw/svdpage.cxx4
-rw-r--r--svx/source/svdraw/svdpntv.cxx2
-rw-r--r--svx/source/svdraw/svdxcgv.cxx7
-rw-r--r--svx/source/table/tablehandles.cxx12
-rw-r--r--svx/source/table/viewcontactoftableobj.cxx40
-rw-r--r--svx/source/table/viewcontactoftableobj.hxx2
-rw-r--r--svx/source/unodraw/UnoGraphicExporter.cxx6
-rw-r--r--svx/source/xoutdev/xtabdash.cxx2
-rw-r--r--svx/source/xoutdev/xtabgrdt.cxx2
-rw-r--r--svx/source/xoutdev/xtabhtch.cxx2
-rw-r--r--svx/source/xoutdev/xtablend.cxx2
-rw-r--r--sw/source/core/crsr/overlayrangesoutline.cxx6
-rw-r--r--sw/source/core/crsr/overlayrangesoutline.hxx2
-rw-r--r--sw/source/core/doc/notxtfrm.cxx10
-rw-r--r--sw/source/core/draw/dcontact.cxx22
-rw-r--r--sw/source/core/draw/dflyobj.cxx26
-rw-r--r--sw/source/core/graphic/ndgrf.cxx4
-rw-r--r--sw/source/core/inc/frame.hxx2
-rw-r--r--sw/source/core/layout/paintfrm.cxx78
-rw-r--r--sw/source/uibase/docvw/AnchorOverlayObject.cxx26
-rw-r--r--sw/source/uibase/docvw/AnchorOverlayObject.hxx2
-rw-r--r--sw/source/uibase/docvw/DashedLine.cxx6
-rw-r--r--sw/source/uibase/docvw/HeaderFooterWin.cxx8
-rw-r--r--sw/source/uibase/docvw/OverlayRanges.cxx10
-rw-r--r--sw/source/uibase/docvw/OverlayRanges.hxx2
-rw-r--r--sw/source/uibase/docvw/PageBreakWin.cxx8
-rw-r--r--sw/source/uibase/docvw/ShadowOverlayObject.cxx16
-rw-r--r--sw/source/uibase/docvw/ShadowOverlayObject.hxx2
-rw-r--r--test/source/primitive2dxmldump.cxx6
-rw-r--r--vcl/source/gdi/svgdata.cxx19
343 files changed, 1812 insertions, 1728 deletions
diff --git a/drawinglayer/source/drawinglayeruno/xprimitive2drenderer.cxx b/drawinglayer/source/drawinglayeruno/xprimitive2drenderer.cxx
index 70cae59dffdd..f4adb26da181 100644
--- a/drawinglayer/source/drawinglayeruno/xprimitive2drenderer.cxx
+++ b/drawinglayer/source/drawinglayeruno/xprimitive2drenderer.cxx
@@ -161,8 +161,8 @@ namespace drawinglayer
const primitive2d::Primitive2DReference xEmbedRef(
new primitive2d::TransformPrimitive2D(
aEmbedding,
- Primitive2DSequence));
- const primitive2d::Primitive2DSequence xEmbedSeq(&xEmbedRef, 1);
+ primitive2d::Primitive2DContainer()));
+ const primitive2d::Primitive2DContainer xEmbedSeq { xEmbedRef };
BitmapEx aBitmapEx(
tools::convertToBitmapEx(
diff --git a/drawinglayer/source/primitive2d/animatedprimitive2d.cxx b/drawinglayer/source/primitive2d/animatedprimitive2d.cxx
index d8c088315c74..a6d23de24e3e 100644
--- a/drawinglayer/source/primitive2d/animatedprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/animatedprimitive2d.cxx
@@ -35,7 +35,7 @@ namespace drawinglayer
{
AnimatedSwitchPrimitive2D::AnimatedSwitchPrimitive2D(
const animation::AnimationEntry& rAnimationEntry,
- const Primitive2DSequence& rChildren,
+ const Primitive2DContainer& rChildren,
bool bIsTextAnimation)
: GroupPrimitive2D(rChildren),
mpAnimationEntry(nullptr),
@@ -63,12 +63,12 @@ namespace drawinglayer
return false;
}
- Primitive2DSequence AnimatedSwitchPrimitive2D::get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const
+ Primitive2DContainer AnimatedSwitchPrimitive2D::get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const
{
- if(getChildren().hasElements())
+ if(!getChildren().empty())
{
const double fState(getAnimationEntry().getStateAtTime(rViewInformation.getViewTime()));
- const sal_uInt32 nLen(getChildren().getLength());
+ const sal_uInt32 nLen(getChildren().size());
sal_uInt32 nIndex(basegfx::fround(fState * (double)nLen));
if(nIndex >= nLen)
@@ -77,10 +77,10 @@ namespace drawinglayer
}
const Primitive2DReference xRef(getChildren()[nIndex], uno::UNO_QUERY_THROW);
- return Primitive2DSequence(&xRef, 1L);
+ return Primitive2DContainer { xRef };
}
- return Primitive2DSequence();
+ return Primitive2DContainer();
}
// provide unique ID
@@ -97,15 +97,15 @@ namespace drawinglayer
{
AnimatedBlinkPrimitive2D::AnimatedBlinkPrimitive2D(
const animation::AnimationEntry& rAnimationEntry,
- const Primitive2DSequence& rChildren,
+ const Primitive2DContainer& rChildren,
bool bIsTextAnimation)
: AnimatedSwitchPrimitive2D(rAnimationEntry, rChildren, bIsTextAnimation)
{
}
- Primitive2DSequence AnimatedBlinkPrimitive2D::get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const
+ Primitive2DContainer AnimatedBlinkPrimitive2D::get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const
{
- if(getChildren().hasElements())
+ if(!getChildren().empty())
{
const double fState(getAnimationEntry().getStateAtTime(rViewInformation.getViewTime()));
@@ -115,7 +115,7 @@ namespace drawinglayer
}
}
- return Primitive2DSequence();
+ return Primitive2DContainer();
}
// provide unique ID
@@ -133,7 +133,7 @@ namespace drawinglayer
AnimatedInterpolatePrimitive2D::AnimatedInterpolatePrimitive2D(
const std::vector< basegfx::B2DHomMatrix >& rmMatrixStack,
const animation::AnimationEntry& rAnimationEntry,
- const Primitive2DSequence& rChildren,
+ const Primitive2DContainer& rChildren,
bool bIsTextAnimation)
: AnimatedSwitchPrimitive2D(rAnimationEntry, rChildren, bIsTextAnimation),
maMatrixStack()
@@ -148,7 +148,7 @@ namespace drawinglayer
}
}
- Primitive2DSequence AnimatedInterpolatePrimitive2D::get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const
+ Primitive2DContainer AnimatedInterpolatePrimitive2D::get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const
{
const sal_uInt32 nSize(maMatrixStack.size());
@@ -195,7 +195,7 @@ namespace drawinglayer
// create new transform primitive reference, return new sequence
const Primitive2DReference xRef(new TransformPrimitive2D(aTargetTransform, getChildren()));
- return Primitive2DSequence(&xRef, 1L);
+ return Primitive2DContainer { xRef };
}
else
{
diff --git a/drawinglayer/source/primitive2d/backgroundcolorprimitive2d.cxx b/drawinglayer/source/primitive2d/backgroundcolorprimitive2d.cxx
index ea10d205e2d8..90b5bbdc4adc 100644
--- a/drawinglayer/source/primitive2d/backgroundcolorprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/backgroundcolorprimitive2d.cxx
@@ -35,17 +35,17 @@ namespace drawinglayer
{
namespace primitive2d
{
- Primitive2DSequence BackgroundColorPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const
+ Primitive2DContainer BackgroundColorPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const
{
if(!rViewInformation.getViewport().isEmpty())
{
const basegfx::B2DPolygon aOutline(basegfx::tools::createPolygonFromRect(rViewInformation.getViewport()));
const Primitive2DReference xRef(new PolyPolygonColorPrimitive2D(basegfx::B2DPolyPolygon(aOutline), getBColor()));
- return Primitive2DSequence(&xRef, 1L);
+ return Primitive2DContainer { xRef };
}
else
{
- return Primitive2DSequence();
+ return Primitive2DContainer();
}
}
@@ -77,17 +77,17 @@ namespace drawinglayer
return rViewInformation.getViewport();
}
- Primitive2DSequence BackgroundColorPrimitive2D::get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const
+ Primitive2DContainer BackgroundColorPrimitive2D::get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const
{
::osl::MutexGuard aGuard( m_aMutex );
- if(getBuffered2DDecomposition().hasElements() && (maLastViewport != rViewInformation.getViewport()))
+ if(!getBuffered2DDecomposition().empty() && (maLastViewport != rViewInformation.getViewport()))
{
// conditions of last local decomposition have changed, delete
- const_cast< BackgroundColorPrimitive2D* >(this)->setBuffered2DDecomposition(Primitive2DSequence());
+ const_cast< BackgroundColorPrimitive2D* >(this)->setBuffered2DDecomposition(Primitive2DContainer());
}
- if(!getBuffered2DDecomposition().hasElements())
+ if(getBuffered2DDecomposition().empty())
{
// remember ViewRange
const_cast< BackgroundColorPrimitive2D* >(this)->maLastViewport = rViewInformation.getViewport();
diff --git a/drawinglayer/source/primitive2d/baseprimitive2d.cxx b/drawinglayer/source/primitive2d/baseprimitive2d.cxx
index aba65aac7f2d..361cd22df805 100644
--- a/drawinglayer/source/primitive2d/baseprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/baseprimitive2d.cxx
@@ -21,6 +21,7 @@
#include <drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx>
#include <drawinglayer/geometry/viewinformation2d.hxx>
#include <basegfx/tools/canvastools.hxx>
+#include <comphelper/sequence.hxx>
@@ -48,18 +49,18 @@ namespace drawinglayer
basegfx::B2DRange BasePrimitive2D::getB2DRange(const geometry::ViewInformation2D& rViewInformation) const
{
- return getB2DRangeFromPrimitive2DSequence(get2DDecomposition(rViewInformation), rViewInformation);
+ return get2DDecomposition(rViewInformation).getB2DRange(rViewInformation);
}
- Primitive2DSequence BasePrimitive2D::get2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const
+ Primitive2DContainer BasePrimitive2D::get2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const
{
- return Primitive2DSequence();
+ return Primitive2DContainer();
}
Primitive2DSequence SAL_CALL BasePrimitive2D::getDecomposition( const uno::Sequence< beans::PropertyValue >& rViewParameters ) throw ( uno::RuntimeException, std::exception )
{
const geometry::ViewInformation2D aViewInformation(rViewParameters);
- return get2DDecomposition(aViewInformation);
+ return comphelper::containerToSequence(get2DDecomposition(aViewInformation));
}
css::geometry::RealRectangle2D SAL_CALL BasePrimitive2D::getRange( const uno::Sequence< beans::PropertyValue >& rViewParameters ) throw ( uno::RuntimeException, std::exception )
@@ -76,9 +77,9 @@ namespace drawinglayer
{
namespace primitive2d
{
- Primitive2DSequence BufferedDecompositionPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const
+ Primitive2DContainer BufferedDecompositionPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const
{
- return Primitive2DSequence();
+ return Primitive2DContainer();
}
BufferedDecompositionPrimitive2D::BufferedDecompositionPrimitive2D()
@@ -87,13 +88,13 @@ namespace drawinglayer
{
}
- Primitive2DSequence BufferedDecompositionPrimitive2D::get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const
+ Primitive2DContainer BufferedDecompositionPrimitive2D::get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const
{
::osl::MutexGuard aGuard( m_aMutex );
- if(!getBuffered2DDecomposition().hasElements())
+ if(getBuffered2DDecomposition().empty())
{
- const Primitive2DSequence aNewSequence(create2DDecomposition(rViewInformation));
+ const Primitive2DContainer aNewSequence(create2DDecomposition(rViewInformation));
const_cast< BufferedDecompositionPrimitive2D* >(this)->setBuffered2DDecomposition(aNewSequence);
}
@@ -110,7 +111,7 @@ namespace drawinglayer
namespace primitive2d
{
// convert helper stl vector of primitives to Primitive2DSequence
- Primitive2DSequence Primitive2DVectorToPrimitive2DSequence(const Primitive2DVector& rSource, bool bInvert)
+ Primitive2DSequence Primitive2DContainerToPrimitive2DSequence(const Primitive2DContainer& rSource, bool bInvert)
{
const sal_uInt32 nSize(rSource.size());
Primitive2DSequence aRetval;
@@ -125,7 +126,26 @@ namespace drawinglayer
// all entries taken over to Uno References as owners. To avoid
// errors with users of this mechanism to delete pointers to BasePrimitive2D
// itself, clear given vector
- const_cast< Primitive2DVector& >(rSource).clear();
+ const_cast< Primitive2DContainer& >(rSource).clear();
+
+ return aRetval;
+ }
+ Primitive2DContainer Primitive2DContainer::maybeInvert(bool bInvert) const
+ {
+ const sal_uInt32 nSize(size());
+ Primitive2DContainer aRetval;
+
+ aRetval.resize(nSize);
+
+ for(sal_uInt32 a(0); a < nSize; a++)
+ {
+ aRetval[bInvert ? nSize - 1 - a : a] = (*this)[a];
+ }
+
+ // all entries taken over to Uno References as owners. To avoid
+ // errors with users of this mechanism to delete pointers to BasePrimitive2D
+ // itself, clear given vector
+ const_cast< Primitive2DContainer& >(*this).clear();
return aRetval;
}
@@ -157,13 +177,29 @@ namespace drawinglayer
}
// get B2DRange from a given Primitive2DSequence
- basegfx::B2DRange getB2DRangeFromPrimitive2DSequence(const Primitive2DSequence& rCandidate, const geometry::ViewInformation2D& aViewInformation)
+ basegfx::B2DRange Primitive2DContainer::getB2DRange(const geometry::ViewInformation2D& aViewInformation) const
{
basegfx::B2DRange aRetval;
- if(rCandidate.hasElements())
+ if(!empty())
{
- const sal_Int32 nCount(rCandidate.getLength());
+ const sal_Int32 nCount(this->size());
+
+ for(sal_Int32 a(0L); a < nCount; a++)
+ {
+ aRetval.expand(getB2DRangeFromPrimitive2DReference((*this)[a], aViewInformation));
+ }
+ }
+
+ return aRetval;
+ }
+ basegfx::B2DRange getB2DRangeFromPrimitive2DSequence(const Primitive2DContainer& rCandidate, const geometry::ViewInformation2D& aViewInformation)
+ {
+ basegfx::B2DRange aRetval;
+
+ if(!rCandidate.empty())
+ {
+ const sal_Int32 nCount(rCandidate.size());
for(sal_Int32 a(0L); a < nCount; a++)
{
@@ -237,6 +273,38 @@ namespace drawinglayer
return true;
}
+ bool Primitive2DContainer::operator==(const Primitive2DContainer& rB) const
+ {
+ const bool bAHasElements(!empty());
+
+ if(bAHasElements != !rB.empty())
+ {
+ return false;
+ }
+
+ if(!bAHasElements)
+ {
+ return true;
+ }
+
+ const size_t nCount(size());
+
+ if(nCount != rB.size())
+ {
+ return false;
+ }
+
+ for(size_t a(0L); a < nCount; a++)
+ {
+ if(!arePrimitive2DReferencesEqual((*this)[a], rB[a]))
+ {
+ return false;
+ }
+ }
+
+ return true;
+ }
+
// concatenate sequence
void appendPrimitive2DSequenceToPrimitive2DSequence(Primitive2DSequence& rDest, const Primitive2DSequence& rSource)
{
@@ -271,6 +339,30 @@ namespace drawinglayer
}
}
+ void appendPrimitive2DSequenceToPrimitive2DSequence(Primitive2DSequence& rDest, const Primitive2DContainer& rSource)
+ {
+ appendPrimitive2DSequenceToPrimitive2DSequence(rDest, comphelper::containerToSequence(rSource));
+ }
+
+ void Primitive2DContainer::append(const Primitive2DContainer& rSource)
+ {
+ insert(end(), rSource.begin(), rSource.end());
+ }
+/*
+ void Primitive2DContainer::append(Primitive2DContainer&& rSource)
+ {
+ resize(size() + rSource.size());
+ memcpy(data() + size(),
+ rSource.data(),
+ rSource.size() * sizeof(Primitive2DReference));
+ memset(reinterpret_cast<void*>(rSource.data()), 0, rSource.size() * sizeof(Primitive2DReference));
+ }
+*/
+ void Primitive2DContainer::append(const Primitive2DSequence& rSource)
+ {
+ std::copy(rSource.begin(), rSource.end(), std::back_inserter(*this));
+ }
+
// concatenate single Primitive2D
void appendPrimitive2DReferenceToPrimitive2DSequence(Primitive2DSequence& rDest, const Primitive2DReference& rSource)
{
diff --git a/drawinglayer/source/primitive2d/borderlineprimitive2d.cxx b/drawinglayer/source/primitive2d/borderlineprimitive2d.cxx
index 30e656d99866..038e3e928be6 100644
--- a/drawinglayer/source/primitive2d/borderlineprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/borderlineprimitive2d.cxx
@@ -161,9 +161,9 @@ primitive2d::Primitive2DReference makeSolidLinePrimitive(
return basegfx::B2DPolyPolygon( clipPolygon );
}
- Primitive2DSequence BorderLinePrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const
+ Primitive2DContainer BorderLinePrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const
{
- Primitive2DSequence xRetval;
+ Primitive2DContainer xRetval;
if(!getStart().equal(getEnd()) && ( isInsideUsed() || isOutsideUsed() ) )
{
@@ -181,7 +181,7 @@ primitive2d::Primitive2DReference makeSolidLinePrimitive(
const basegfx::B2DPoint aTmpStart(getStart() - (fExt * aVector));
const basegfx::B2DPoint aTmpEnd(getEnd() + (fExt * aVector));
- xRetval.realloc(2);
+ xRetval.resize(2);
double fLeftWidth = getLeftWidth();
bool bLeftHairline = lcl_UseHairline(fLeftWidth, getStart(), getEnd(), rViewInformation);
@@ -239,7 +239,7 @@ primitive2d::Primitive2DReference makeSolidLinePrimitive(
aPolygon.append( getStart() );
aPolygon.append( getEnd() );
- xRetval.realloc(1);
+ xRetval.resize(1);
xRetval[0] = Primitive2DReference(new PolygonHairlinePrimitive2D(
aPolygon,
aColor));
@@ -276,7 +276,7 @@ primitive2d::Primitive2DReference makeSolidLinePrimitive(
}
sal_uInt32 n = aDashed.count();
- xRetval.realloc(n);
+ xRetval.resize(n);
for (sal_uInt32 i = 0; i < n; ++i)
{
basegfx::B2DPolygon aDash = aDashed.getB2DPolygon(i);
diff --git a/drawinglayer/source/primitive2d/controlprimitive2d.cxx b/drawinglayer/source/primitive2d/controlprimitive2d.cxx
index d782962fa11d..1367692b8f3c 100644
--- a/drawinglayer/source/primitive2d/controlprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/controlprimitive2d.cxx
@@ -237,7 +237,7 @@ namespace drawinglayer
return xRetval;
}
- Primitive2DSequence ControlPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const
+ Primitive2DContainer ControlPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const
{
// try to create a bitmap decomposition. If that fails for some reason,
// at least create a replacement decomposition.
@@ -248,7 +248,7 @@ namespace drawinglayer
xReference = createPlaceholderDecomposition(rViewInformation);
}
- return Primitive2DSequence(&xReference, 1L);
+ return Primitive2DContainer { xReference };
}
ControlPrimitive2D::ControlPrimitive2D(
@@ -329,23 +329,23 @@ namespace drawinglayer
return aRetval;
}
- Primitive2DSequence ControlPrimitive2D::get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const
+ Primitive2DContainer ControlPrimitive2D::get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const
{
// this primitive is view-dependent related to the scaling. If scaling has changed,
// destroy existing decomposition. To detect change, use size of unit size in view coordinates
::osl::MutexGuard aGuard( m_aMutex );
const basegfx::B2DVector aNewScaling(rViewInformation.getObjectToViewTransformation() * basegfx::B2DVector(1.0, 1.0));
- if(getBuffered2DDecomposition().hasElements())
+ if(!getBuffered2DDecomposition().empty())
{
if(!maLastViewScaling.equal(aNewScaling))
{
// conditions of last local decomposition have changed, delete
- const_cast< ControlPrimitive2D* >(this)->setBuffered2DDecomposition(Primitive2DSequence());
+ const_cast< ControlPrimitive2D* >(this)->setBuffered2DDecomposition(Primitive2DContainer());
}
}
- if(!getBuffered2DDecomposition().hasElements())
+ if(getBuffered2DDecomposition().empty())
{
// remember ViewTransformation
const_cast< ControlPrimitive2D* >(this)->maLastViewScaling = aNewScaling;
diff --git a/drawinglayer/source/primitive2d/cropprimitive2d.cxx b/drawinglayer/source/primitive2d/cropprimitive2d.cxx
index b2a7ea4f535d..6a76d4ef419b 100644
--- a/drawinglayer/source/primitive2d/cropprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/cropprimitive2d.cxx
@@ -37,7 +37,7 @@ namespace drawinglayer
namespace primitive2d
{
CropPrimitive2D::CropPrimitive2D(
- const Primitive2DSequence& rChildren,
+ const Primitive2DContainer& rChildren,
const basegfx::B2DHomMatrix& rTransformation,
double fCropLeft,
double fCropTop,
@@ -68,11 +68,11 @@ namespace drawinglayer
return false;
}
- Primitive2DSequence CropPrimitive2D::get2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const
+ Primitive2DContainer CropPrimitive2D::get2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const
{
- Primitive2DSequence xRetval;
+ Primitive2DContainer xRetval;
- if(getChildren().hasElements())
+ if(!getChildren().empty())
{
// get original object scale in unit coordinates (no mirroring)
const basegfx::B2DVector aObjectScale(basegfx::absolute(getTransformation() * basegfx::B2DVector(1.0, 1.0)));
@@ -130,7 +130,7 @@ namespace drawinglayer
{
// the new range is completely inside the old range (unit range),
// so no masking is needed
- xRetval = Primitive2DSequence(&xTransformPrimitive, 1);
+ xRetval = Primitive2DContainer { xTransformPrimitive };
}
else
{
@@ -142,9 +142,9 @@ namespace drawinglayer
const Primitive2DReference xMask(
new MaskPrimitive2D(
aMaskPolyPolygon,
- Primitive2DSequence(&xTransformPrimitive, 1)));
+ Primitive2DContainer { xTransformPrimitive }));
- xRetval = Primitive2DSequence(&xMask, 1);
+ xRetval = Primitive2DContainer { xMask };
}
}
}
diff --git a/drawinglayer/source/primitive2d/discretebitmapprimitive2d.cxx b/drawinglayer/source/primitive2d/discretebitmapprimitive2d.cxx
index e406a3b506b1..06d481d6709a 100644
--- a/drawinglayer/source/primitive2d/discretebitmapprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/discretebitmapprimitive2d.cxx
@@ -27,12 +27,12 @@ namespace drawinglayer
{
namespace primitive2d
{
- Primitive2DSequence DiscreteBitmapPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const
+ Primitive2DContainer DiscreteBitmapPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const
{
// use getViewTransformation() and getObjectTransformation() from
// ObjectAndViewTransformationDependentPrimitive2D to create a BitmapPrimitive2D
// with the correct mapping
- Primitive2DSequence xRetval;
+ Primitive2DContainer xRetval;
if(!getBitmapEx().IsEmpty())
{
@@ -67,7 +67,7 @@ namespace drawinglayer
// create BitmapPrimitive2D with now object-local coordinate data
const Primitive2DReference xRef(new BitmapPrimitive2D(getBitmapEx(), aObjectTransform));
- xRetval = Primitive2DSequence(&xRef, 1);
+ xRetval = Primitive2DContainer { xRef };
}
return xRetval;
diff --git a/drawinglayer/source/primitive2d/discreteshadowprimitive2d.cxx b/drawinglayer/source/primitive2d/discreteshadowprimitive2d.cxx
index b845602c4fb9..0f663a4345f2 100644
--- a/drawinglayer/source/primitive2d/discreteshadowprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/discreteshadowprimitive2d.cxx
@@ -163,9 +163,9 @@ namespace drawinglayer
{
namespace primitive2d
{
- Primitive2DSequence DiscreteShadowPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const
+ Primitive2DContainer DiscreteShadowPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const
{
- Primitive2DSequence xRetval;
+ Primitive2DContainer xRetval;
if(!getDiscreteShadow().getBitmapEx().IsEmpty())
{
@@ -178,7 +178,7 @@ namespace drawinglayer
const double fBigLenX((fBorderX * 2.0) + fSingleX);
const double fBigLenY((fBorderY * 2.0) + fSingleY);
- xRetval.realloc(8);
+ xRetval.resize(8);
// TopLeft
xRetval[0] = Primitive2DReference(
@@ -266,7 +266,7 @@ namespace drawinglayer
getTransform(),
xRetval));
- xRetval = Primitive2DSequence(&xTransformed, 1);
+ xRetval = Primitive2DContainer { xTransformed };
}
return xRetval;
diff --git a/drawinglayer/source/primitive2d/embedded3dprimitive2d.cxx b/drawinglayer/source/primitive2d/embedded3dprimitive2d.cxx
index d3538f45b9ed..284b91c0f4b7 100644
--- a/drawinglayer/source/primitive2d/embedded3dprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/embedded3dprimitive2d.cxx
@@ -62,10 +62,10 @@ namespace drawinglayer
}
// return if there are shadow primitives
- return maShadowPrimitives.hasElements();
+ return !maShadowPrimitives.empty();
}
- Primitive2DSequence Embedded3DPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const
+ Primitive2DContainer Embedded3DPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const
{
// use info to create a yellow 2d rectangle, similar to empty 3d scenes and/or groups
const basegfx::B2DRange aLocal2DRange(getB2DRange(rViewInformation));
@@ -73,7 +73,7 @@ namespace drawinglayer
const basegfx::BColor aYellow(1.0, 1.0, 0.0);
const Primitive2DReference xRef(new PolygonHairlinePrimitive2D(aOutline, aYellow));
- return Primitive2DSequence(&xRef, 1L);
+ return Primitive2DContainer { xRef };
}
Embedded3DPrimitive2D::Embedded3DPrimitive2D(
@@ -132,7 +132,7 @@ namespace drawinglayer
// taken into account
if(impGetShadow3D(rViewInformation))
{
- const basegfx::B2DRange aShadow2DRange(getB2DRangeFromPrimitive2DSequence(maShadowPrimitives, rViewInformation));
+ const basegfx::B2DRange aShadow2DRange(maShadowPrimitives.getB2DRange(rViewInformation));
if(!aShadow2DRange.isEmpty())
{
diff --git a/drawinglayer/source/primitive2d/epsprimitive2d.cxx b/drawinglayer/source/primitive2d/epsprimitive2d.cxx
index a2d5cf63f5c3..6d29e7a5afbb 100644
--- a/drawinglayer/source/primitive2d/epsprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/epsprimitive2d.cxx
@@ -25,9 +25,9 @@ namespace drawinglayer
{
namespace primitive2d
{
- Primitive2DSequence EpsPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const
+ Primitive2DContainer EpsPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const
{
- Primitive2DSequence xRetval;
+ Primitive2DContainer xRetval;
const GDIMetaFile& rSubstituteContent = getMetaFile();
if( rSubstituteContent.GetActionSize() )
@@ -35,7 +35,7 @@ namespace drawinglayer
// the default decomposition will use the Metafile replacement visualisation.
// To really use the Eps data, a renderer has to know and interpret this primitive
// directly.
- xRetval.realloc(1);
+ xRetval.resize(1);
xRetval[0] = Primitive2DReference(
new MetafilePrimitive2D(
diff --git a/drawinglayer/source/primitive2d/fillgradientprimitive2d.cxx b/drawinglayer/source/primitive2d/fillgradientprimitive2d.cxx
index 7f506eea8f2d..cc7a1a0cdfec 100644
--- a/drawinglayer/source/primitive2d/fillgradientprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/fillgradientprimitive2d.cxx
@@ -150,13 +150,14 @@ namespace drawinglayer
}
}
- Primitive2DSequence FillGradientPrimitive2D::createOverlappingFill(
+ Primitive2DContainer FillGradientPrimitive2D::createOverlappingFill(
const std::vector< drawinglayer::texture::B2DHomMatrixAndBColor >& rEntries,
const basegfx::BColor& rOuterColor,
const basegfx::B2DPolygon& rUnitPolygon) const
{
// prepare return value
- Primitive2DSequence aRetval(rEntries.size() + 1);
+ Primitive2DContainer aRetval;
+ aRetval.resize(rEntries.size() + 1);
// create solid fill with outmost color
aRetval[0] = Primitive2DReference(
@@ -183,13 +184,14 @@ namespace drawinglayer
return aRetval;
}
- Primitive2DSequence FillGradientPrimitive2D::createNonOverlappingFill(
+ Primitive2DContainer FillGradientPrimitive2D::createNonOverlappingFill(
const std::vector< drawinglayer::texture::B2DHomMatrixAndBColor >& rEntries,
const basegfx::BColor& rOuterColor,
const basegfx::B2DPolygon& rUnitPolygon) const
{
// prepare return value
- Primitive2DSequence aRetval(rEntries.size() + 1);
+ Primitive2DContainer aRetval;
+ aRetval.resize(rEntries.size() + 1);
// get outmost visible range from object
basegfx::B2DRange aOutmostRange(getOutputRange());
@@ -245,7 +247,7 @@ namespace drawinglayer
return aRetval;
}
- Primitive2DSequence FillGradientPrimitive2D::createFill(bool bOverlapping) const
+ Primitive2DContainer FillGradientPrimitive2D::createFill(bool bOverlapping) const
{
// prepare shape of the Unit Polygon
basegfx::B2DPolygon aUnitPolygon;
@@ -282,7 +284,7 @@ namespace drawinglayer
}
}
- Primitive2DSequence FillGradientPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const
+ Primitive2DContainer FillGradientPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const
{
// default creates overlapping fill which works with AntiAliasing and without.
// The non-overlapping version does not create single filled polygons, but
@@ -299,7 +301,7 @@ namespace drawinglayer
}
else
{
- return Primitive2DSequence();
+ return Primitive2DContainer();
}
}
diff --git a/drawinglayer/source/primitive2d/fillgraphicprimitive2d.cxx b/drawinglayer/source/primitive2d/fillgraphicprimitive2d.cxx
index 0bb39f53494e..21117e283572 100644
--- a/drawinglayer/source/primitive2d/fillgraphicprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/fillgraphicprimitive2d.cxx
@@ -39,9 +39,9 @@ namespace drawinglayer
{
namespace primitive2d
{
- Primitive2DSequence FillGraphicPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const
+ Primitive2DContainer FillGraphicPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const
{
- Primitive2DSequence aRetval;
+ Primitive2DContainer aRetval;
const attribute::FillGraphicAttribute& rAttribute = getFillGraphic();
if(!rAttribute.isDefault())
@@ -66,10 +66,10 @@ namespace drawinglayer
// get matrices and realloc retval
aTiling.appendTransformations(aMatrices);
- aRetval.realloc(aMatrices.size());
+ aRetval.resize(aMatrices.size());
// prepare content primitive
- const Primitive2DSequence xSeq = create2DDecompositionOfGraphic(
+ const Primitive2DContainer xSeq = create2DDecompositionOfGraphic(
rGraphic,
basegfx::B2DHomMatrix());
diff --git a/drawinglayer/source/primitive2d/fillhatchprimitive2d.cxx b/drawinglayer/source/primitive2d/fillhatchprimitive2d.cxx
index 886c1b26327f..1c34c1140f67 100644
--- a/drawinglayer/source/primitive2d/fillhatchprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/fillhatchprimitive2d.cxx
@@ -37,9 +37,9 @@ namespace drawinglayer
{
namespace primitive2d
{
- Primitive2DSequence FillHatchPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const
+ Primitive2DContainer FillHatchPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const
{
- Primitive2DSequence aRetval;
+ Primitive2DContainer aRetval;
if(!getFillHatch().isDefault())
{
@@ -105,7 +105,7 @@ namespace drawinglayer
// prepare return value
const bool bFillBackground(getFillHatch().isFillBackground());
- aRetval.realloc(bFillBackground ? aMatrices.size() + 1L : aMatrices.size());
+ aRetval.resize(bFillBackground ? aMatrices.size() + 1L : aMatrices.size());
// evtl. create filled background
if(bFillBackground)
@@ -185,7 +185,7 @@ namespace drawinglayer
return getOutputRange();
}
- Primitive2DSequence FillHatchPrimitive2D::get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const
+ Primitive2DContainer FillHatchPrimitive2D::get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const
{
::osl::MutexGuard aGuard( m_aMutex );
bool bAdaptDistance(0 != getFillHatch().getMinimalDiscreteDistance());
diff --git a/drawinglayer/source/primitive2d/graphicprimitive2d.cxx b/drawinglayer/source/primitive2d/graphicprimitive2d.cxx
index 4a0607a0e6e2..d2e9c882922c 100644
--- a/drawinglayer/source/primitive2d/graphicprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/graphicprimitive2d.cxx
@@ -32,10 +32,10 @@ namespace drawinglayer
{
namespace primitive2d
{
- Primitive2DSequence GraphicPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D&
+ Primitive2DContainer GraphicPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D&
) const
{
- Primitive2DSequence aRetval;
+ Primitive2DContainer aRetval;
if(255L == getGraphicAttr().GetTransparency())
{
@@ -110,7 +110,7 @@ namespace drawinglayer
aTransformedGraphic,
aTransform);
- if(!aRetval.getLength())
+ if(!aRetval.size())
{
// content is invisible, done
return aRetval;
@@ -131,7 +131,7 @@ namespace drawinglayer
basegfx::clamp(aSuppressGraphicAttr.GetGamma(), 0.0, 10.0),
aSuppressGraphicAttr.IsInvert());
- if(!aRetval.getLength())
+ if(!aRetval.size())
{
// content is invisible, done
return aRetval;
@@ -150,7 +150,7 @@ namespace drawinglayer
aRetval,
fTransparency));
- aRetval = Primitive2DSequence(&aUnifiedTransparence, 1);
+ aRetval = Primitive2DContainer { aUnifiedTransparence };
}
}
@@ -179,7 +179,7 @@ namespace drawinglayer
getGraphicAttr().GetRightCrop() * aCropScaleFactor.getX(),
getGraphicAttr().GetBottomCrop() * aCropScaleFactor.getY()));
- aRetval = Primitive2DSequence(&xPrimitive, 1);
+ aRetval = Primitive2DContainer { xPrimitive };
}
return aRetval;
diff --git a/drawinglayer/source/primitive2d/graphicprimitivehelper2d.cxx b/drawinglayer/source/primitive2d/graphicprimitivehelper2d.cxx
index be7ff6541fa7..a924b3dd6454 100644
--- a/drawinglayer/source/primitive2d/graphicprimitivehelper2d.cxx
+++ b/drawinglayer/source/primitive2d/graphicprimitivehelper2d.cxx
@@ -193,11 +193,11 @@ namespace drawinglayer
{
namespace primitive2d
{
- Primitive2DSequence create2DDecompositionOfGraphic(
+ Primitive2DContainer create2DDecompositionOfGraphic(
const Graphic& rGraphic,
const basegfx::B2DHomMatrix& rTransform)
{
- Primitive2DSequence aRetval;
+ Primitive2DContainer aRetval;
switch(rGraphic.GetType())
{
@@ -212,7 +212,7 @@ namespace drawinglayer
{
// create sub-primitives for animated bitmap and the needed animation loop
animation::AnimationEntryLoop aAnimationLoop(aData.loopCount() ? aData.loopCount() : 0xffff);
- Primitive2DSequence aBitmapPrimitives(aData.count());
+ Primitive2DContainer aBitmapPrimitives(aData.count());
for(sal_uInt32 a(0); a < aData.count(); a++)
{
@@ -228,7 +228,7 @@ namespace drawinglayer
aAnimationList.append(aAnimationLoop);
// create and add animated switch primitive
- aRetval.realloc(1);
+ aRetval.resize(1);
aRetval[0] = new AnimatedSwitchPrimitive2D(
aAnimationList,
aBitmapPrimitives,
@@ -256,7 +256,7 @@ namespace drawinglayer
aEmbedSvg = rTransform * aEmbedSvg;
// add Svg primitives embedded
- aRetval.realloc(1);
+ aRetval.resize(1);
aRetval[0] = new TransformPrimitive2D(
aEmbedSvg,
rGraphic.getSvgData()->getPrimitive2DSequence());
@@ -264,7 +264,7 @@ namespace drawinglayer
}
else
{
- aRetval.realloc(1);
+ aRetval.resize(1);
aRetval[0] = new BitmapPrimitive2D(
rGraphic.GetBitmapEx(),
rTransform);
@@ -278,7 +278,7 @@ namespace drawinglayer
// create MetafilePrimitive2D
const GDIMetaFile& rMetafile = rGraphic.GetGDIMetaFile();
- aRetval.realloc(1);
+ aRetval.resize(1);
aRetval[0] = new MetafilePrimitive2D(
rTransform,
rMetafile);
@@ -316,8 +316,8 @@ namespace drawinglayer
return aRetval;
}
- Primitive2DSequence create2DColorModifierEmbeddingsAsNeeded(
- const Primitive2DSequence& rChildren,
+ Primitive2DContainer create2DColorModifierEmbeddingsAsNeeded(
+ const Primitive2DContainer& rChildren,
GraphicDrawMode aGraphicDrawMode,
double fLuminance,
double fContrast,
@@ -327,9 +327,9 @@ namespace drawinglayer
double fGamma,
bool bInvert)
{
- Primitive2DSequence aRetval;
+ Primitive2DContainer aRetval;
- if(!rChildren.getLength())
+ if(!rChildren.size())
{
// no child content, done
return aRetval;
@@ -363,7 +363,7 @@ namespace drawinglayer
basegfx::BColorModifierSharedPtr(
new basegfx::BColorModifier_gray())));
- aRetval = Primitive2DSequence(&aPrimitiveGrey, 1);
+ aRetval = Primitive2DContainer { aPrimitiveGrey };
break;
}
case GRAPHICDRAWMODE_MONO:
@@ -375,7 +375,7 @@ namespace drawinglayer
basegfx::BColorModifierSharedPtr(
new basegfx::BColorModifier_black_and_white(0.5))));
- aRetval = Primitive2DSequence(&aPrimitiveBlackAndWhite, 1);
+ aRetval = Primitive2DContainer { aPrimitiveBlackAndWhite };
break;
}
// coverity[dead_error_begin] - intentional dead case
@@ -410,7 +410,7 @@ namespace drawinglayer
fLuminance,
fContrast))));
- aRetval = Primitive2DSequence(&aPrimitiveRGBLuminannceContrast, 1);
+ aRetval = Primitive2DContainer { aPrimitiveRGBLuminannceContrast };
}
// gamma (boolean)
@@ -423,7 +423,7 @@ namespace drawinglayer
new basegfx::BColorModifier_gamma(
fGamma))));
- aRetval = Primitive2DSequence(&aPrimitiveGamma, 1);
+ aRetval = Primitive2DContainer { aPrimitiveGamma };
}
// invert (boolean)
@@ -435,7 +435,7 @@ namespace drawinglayer
basegfx::BColorModifierSharedPtr(
new basegfx::BColorModifier_invert())));
- aRetval = Primitive2DSequence(&aPrimitiveInvert, 1);
+ aRetval = Primitive2DContainer { aPrimitiveInvert };
}
return aRetval;
diff --git a/drawinglayer/source/primitive2d/gridprimitive2d.cxx b/drawinglayer/source/primitive2d/gridprimitive2d.cxx
index b83ed34dccce..69ce961c3517 100644
--- a/drawinglayer/source/primitive2d/gridprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/gridprimitive2d.cxx
@@ -35,9 +35,9 @@ namespace drawinglayer
{
namespace primitive2d
{
- Primitive2DSequence GridPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const
+ Primitive2DContainer GridPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const
{
- Primitive2DSequence aRetval;
+ Primitive2DContainer aRetval;
if(!rViewInformation.getViewport().isEmpty() && getWidth() > 0.0 && getHeight() > 0.0)
{
@@ -234,7 +234,7 @@ namespace drawinglayer
const sal_uInt32 nRetvalCount((nCountPoint ? 1 : 0) + (nCountCross ? 1 : 0));
sal_uInt32 nInsertCounter(0);
- aRetval.realloc(nRetvalCount);
+ aRetval.resize(nRetvalCount);
// add PointArrayPrimitive2D if point markers were added
if(nCountPoint)
@@ -319,20 +319,20 @@ namespace drawinglayer
return aUnitRange;
}
- Primitive2DSequence GridPrimitive2D::get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const
+ Primitive2DContainer GridPrimitive2D::get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const
{
::osl::MutexGuard aGuard( m_aMutex );
- if(getBuffered2DDecomposition().hasElements())
+ if(!getBuffered2DDecomposition().empty())
{
if(maLastViewport != rViewInformation.getViewport() || maLastObjectToViewTransformation != rViewInformation.getObjectToViewTransformation())
{
// conditions of last local decomposition have changed, delete
- const_cast< GridPrimitive2D* >(this)->setBuffered2DDecomposition(Primitive2DSequence());
+ const_cast< GridPrimitive2D* >(this)->setBuffered2DDecomposition(Primitive2DContainer());
}
}
- if(!getBuffered2DDecomposition().hasElements())
+ if(getBuffered2DDecomposition().empty())
{
// remember ViewRange and ViewTransformation
const_cast< GridPrimitive2D* >(this)->maLastObjectToViewTransformation = rViewInformation.getObjectToViewTransformation();
diff --git a/drawinglayer/source/primitive2d/groupprimitive2d.cxx b/drawinglayer/source/primitive2d/groupprimitive2d.cxx
index eae9502cf5c4..6ad6e7759f83 100644
--- a/drawinglayer/source/primitive2d/groupprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/groupprimitive2d.cxx
@@ -30,7 +30,7 @@ namespace drawinglayer
{
namespace primitive2d
{
- GroupPrimitive2D::GroupPrimitive2D( const Primitive2DSequence& rChildren )
+ GroupPrimitive2D::GroupPrimitive2D( const Primitive2DContainer& rChildren )
: BasePrimitive2D(),
maChildren(rChildren)
{
@@ -46,14 +46,14 @@ namespace drawinglayer
{
const GroupPrimitive2D& rCompare = static_cast< const GroupPrimitive2D& >(rPrimitive);
- return (arePrimitive2DSequencesEqual(getChildren(), rCompare.getChildren()));
+ return getChildren() == rCompare.getChildren();
}
return false;
}
/// default: just return children, so all renderers not supporting group will use it's content
- Primitive2DSequence GroupPrimitive2D::get2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const
+ Primitive2DContainer GroupPrimitive2D::get2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const
{
return getChildren();
}
diff --git a/drawinglayer/source/primitive2d/helplineprimitive2d.cxx b/drawinglayer/source/primitive2d/helplineprimitive2d.cxx
index 3962f65c0f8b..83977cf4e870 100644
--- a/drawinglayer/source/primitive2d/helplineprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/helplineprimitive2d.cxx
@@ -35,7 +35,7 @@ namespace drawinglayer
{
namespace primitive2d
{
- Primitive2DSequence HelplinePrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const
+ Primitive2DContainer HelplinePrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const
{
std::vector< BasePrimitive2D* > aTempPrimitiveTarget;
@@ -130,7 +130,7 @@ namespace drawinglayer
}
// prepare return value
- Primitive2DSequence aRetval(aTempPrimitiveTarget.size());
+ Primitive2DContainer aRetval(aTempPrimitiveTarget.size());
for(size_t a(0); a < aTempPrimitiveTarget.size(); a++)
{
@@ -177,20 +177,20 @@ namespace drawinglayer
return false;
}
- Primitive2DSequence HelplinePrimitive2D::get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const
+ Primitive2DContainer HelplinePrimitive2D::get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const
{
::osl::MutexGuard aGuard( m_aMutex );
- if(getBuffered2DDecomposition().hasElements())
+ if(!getBuffered2DDecomposition().empty())
{
if(maLastViewport != rViewInformation.getViewport() || maLastObjectToViewTransformation != rViewInformation.getObjectToViewTransformation())
{
// conditions of last local decomposition have changed, delete
- const_cast< HelplinePrimitive2D* >(this)->setBuffered2DDecomposition(Primitive2DSequence());
+ const_cast< HelplinePrimitive2D* >(this)->setBuffered2DDecomposition(Primitive2DContainer());
}
}
- if(!getBuffered2DDecomposition().hasElements())
+ if(getBuffered2DDecomposition().empty())
{
// remember ViewRange and ViewTransformation
const_cast< HelplinePrimitive2D* >(this)->maLastObjectToViewTransformation = rViewInformation.getObjectToViewTransformation();
diff --git a/drawinglayer/source/primitive2d/hiddengeometryprimitive2d.cxx b/drawinglayer/source/primitive2d/hiddengeometryprimitive2d.cxx
index 0723b2952abf..e5d9e38e1a44 100644
--- a/drawinglayer/source/primitive2d/hiddengeometryprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/hiddengeometryprimitive2d.cxx
@@ -31,19 +31,19 @@ namespace drawinglayer
namespace primitive2d
{
HiddenGeometryPrimitive2D::HiddenGeometryPrimitive2D(
- const Primitive2DSequence& rChildren)
+ const Primitive2DContainer& rChildren)
: GroupPrimitive2D(rChildren)
{
}
basegfx::B2DRange HiddenGeometryPrimitive2D::getB2DRange(const geometry::ViewInformation2D& rViewInformation) const
{
- return getB2DRangeFromPrimitive2DSequence(getChildren(), rViewInformation);
+ return getChildren().getB2DRange(rViewInformation);
}
- Primitive2DSequence HiddenGeometryPrimitive2D::get2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const
+ Primitive2DContainer HiddenGeometryPrimitive2D::get2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const
{
- return Primitive2DSequence();
+ return Primitive2DContainer();
}
// provide unique ID
diff --git a/drawinglayer/source/primitive2d/invertprimitive2d.cxx b/drawinglayer/source/primitive2d/invertprimitive2d.cxx
index e5cb6e80254e..e7554ed0ab0f 100644
--- a/drawinglayer/source/primitive2d/invertprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/invertprimitive2d.cxx
@@ -31,7 +31,7 @@ namespace drawinglayer
namespace primitive2d
{
InvertPrimitive2D::InvertPrimitive2D(
- const Primitive2DSequence& rChildren)
+ const Primitive2DContainer& rChildren)
: GroupPrimitive2D(rChildren)
{
}
diff --git a/drawinglayer/source/primitive2d/markerarrayprimitive2d.cxx b/drawinglayer/source/primitive2d/markerarrayprimitive2d.cxx
index 1d0bbae6545c..d96ac229f346 100644
--- a/drawinglayer/source/primitive2d/markerarrayprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/markerarrayprimitive2d.cxx
@@ -36,9 +36,9 @@ namespace drawinglayer
{
namespace primitive2d
{
- Primitive2DSequence MarkerArrayPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const
+ Primitive2DContainer MarkerArrayPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const
{
- Primitive2DSequence xRetval;
+ Primitive2DContainer xRetval;
const std::vector< basegfx::B2DPoint >& rPositions = getPositions();
const sal_uInt32 nMarkerCount(rPositions.size());
@@ -57,7 +57,7 @@ namespace drawinglayer
aLogicHalfSize *= 0.5;
// number of primitives is known; realloc accordingly
- xRetval.realloc(nMarkerCount);
+ xRetval.resize(nMarkerCount);
for(sal_uInt32 a(0); a < nMarkerCount; a++)
{
diff --git a/drawinglayer/source/primitive2d/maskprimitive2d.cxx b/drawinglayer/source/primitive2d/maskprimitive2d.cxx
index 530ff008675a..618c93f7e6e2 100644
--- a/drawinglayer/source/primitive2d/maskprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/maskprimitive2d.cxx
@@ -32,7 +32,7 @@ namespace drawinglayer
{
MaskPrimitive2D::MaskPrimitive2D(
const basegfx::B2DPolyPolygon& rMask,
- const Primitive2DSequence& rChildren)
+ const Primitive2DContainer& rChildren)
: GroupPrimitive2D(rChildren),
maMask(rMask)
{
diff --git a/drawinglayer/source/primitive2d/mediaprimitive2d.cxx b/drawinglayer/source/primitive2d/mediaprimitive2d.cxx
index 1140228ed582..bf21d18b95f5 100644
--- a/drawinglayer/source/primitive2d/mediaprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/mediaprimitive2d.cxx
@@ -34,9 +34,10 @@ namespace drawinglayer
{
namespace primitive2d
{
- Primitive2DSequence MediaPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const
+ Primitive2DContainer MediaPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const
{
- Primitive2DSequence xRetval(1);
+ Primitive2DContainer xRetval;
+ xRetval.resize(1);
// create background object
basegfx::B2DPolygon aBackgroundPolygon(basegfx::tools::createUnitPolygon());
@@ -51,7 +52,7 @@ namespace drawinglayer
{
const GraphicObject aGraphicObject(maSnapshot);
const GraphicAttr aGraphicAttr;
- xRetval.realloc(2);
+ xRetval.resize(2);
xRetval[0] = xRefBackground;
xRetval[1] = Primitive2DReference(new GraphicPrimitive2D(getTransform(), aGraphicObject, aGraphicAttr));
}
@@ -74,7 +75,7 @@ namespace drawinglayer
// invisible content for HitTest and BoundRect
const Primitive2DReference xHiddenLines(new HiddenGeometryPrimitive2D(xRetval));
- xRetval = Primitive2DSequence(&xHiddenLines, 1);
+ xRetval = Primitive2DContainer { xHiddenLines, };
}
else
{
@@ -86,7 +87,7 @@ namespace drawinglayer
// add transform primitive
const Primitive2DReference aScaled(new TransformPrimitive2D(aTransform, xRetval));
- xRetval = Primitive2DSequence(&aScaled, 1L);
+ xRetval = Primitive2DContainer { aScaled };
}
}
diff --git a/drawinglayer/source/primitive2d/metafileprimitive2d.cxx b/drawinglayer/source/primitive2d/metafileprimitive2d.cxx
index 4a641d60891c..167eb712a75f 100644
--- a/drawinglayer/source/primitive2d/metafileprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/metafileprimitive2d.cxx
@@ -428,10 +428,10 @@ namespace
}
}
- drawinglayer::primitive2d::Primitive2DSequence getPrimitive2DSequence(const PropertyHolder& rPropertyHolder)
+ drawinglayer::primitive2d::Primitive2DContainer getPrimitive2DSequence(const PropertyHolder& rPropertyHolder)
{
const sal_uInt32 nCount(aTargets.size());
- drawinglayer::primitive2d::Primitive2DSequence xRetval(nCount);
+ drawinglayer::primitive2d::Primitive2DContainer xRetval(nCount);
for(sal_uInt32 a(0); a < nCount; a++)
{
@@ -444,7 +444,7 @@ namespace
// the buffer to not delete them in the destructor.
aTargets.clear();
- if(xRetval.hasElements() && rPropertyHolder.getClipPolyPolygonActive())
+ if(!xRetval.empty() && rPropertyHolder.getClipPolyPolygonActive())
{
const basegfx::B2DPolyPolygon& rClipPolyPolygon = rPropertyHolder.getClipPolyPolygon();
@@ -455,7 +455,7 @@ namespace
rClipPolyPolygon,
xRetval));
- xRetval = drawinglayer::primitive2d::Primitive2DSequence(&xMask, 1);
+ xRetval = drawinglayer::primitive2d::Primitive2DContainer { xMask };
}
}
@@ -538,7 +538,7 @@ namespace drawinglayer
{
protected:
/// local decomposition.
- virtual Primitive2DSequence create2DDecomposition(
+ virtual Primitive2DContainer create2DDecomposition(
const geometry::ViewInformation2D& rViewInformation) const override;
public:
@@ -551,7 +551,7 @@ namespace drawinglayer
}
};
- Primitive2DSequence NonOverlappingFillGradientPrimitive2D::create2DDecomposition(
+ Primitive2DContainer NonOverlappingFillGradientPrimitive2D::create2DDecomposition(
const geometry::ViewInformation2D& /*rViewInformation*/) const
{
if(!getFillGradient().isDefault())
@@ -560,7 +560,7 @@ namespace drawinglayer
}
else
{
- return Primitive2DSequence();
+ return Primitive2DContainer();
}
}
} // end of namespace primitive2d
@@ -990,7 +990,7 @@ namespace
// MaskPrimitive2D accordingly.
if(rPropertyHolders.Current().getClipPolyPolygonActive() && rTargetHolders.size() > 1)
{
- drawinglayer::primitive2d::Primitive2DSequence aSubContent;
+ drawinglayer::primitive2d::Primitive2DContainer aSubContent;
if(rPropertyHolders.Current().getClipPolyPolygon().count()
&& rTargetHolders.Current().size())
@@ -1001,7 +1001,7 @@ namespace
rTargetHolders.Pop();
- if(aSubContent.hasElements())
+ if(!aSubContent.empty())
{
rTargetHolders.Current().append(
new drawinglayer::primitive2d::GroupPrimitive2D(
@@ -1036,7 +1036,7 @@ namespace
// check if currently active
if(rPropertyHolders.Current().isRasterOpActive() && rTargetHolders.size() > 1)
{
- drawinglayer::primitive2d::Primitive2DSequence aSubContent;
+ drawinglayer::primitive2d::Primitive2DContainer aSubContent;
if(rTargetHolders.Current().size())
{
@@ -1045,7 +1045,7 @@ namespace
rTargetHolders.Pop();
- if(aSubContent.hasElements())
+ if(!aSubContent.empty())
{
if(rPropertyHolders.Current().isRasterOpForceBlack())
{
@@ -1120,7 +1120,7 @@ namespace
if(!rPropertyHolder.getTransformation().isIdentity())
{
const drawinglayer::primitive2d::Primitive2DReference xPrim(pRetval);
- const drawinglayer::primitive2d::Primitive2DSequence xSeq(&xPrim, 1);
+ const drawinglayer::primitive2d::Primitive2DContainer xSeq { xPrim };
pRetval = new drawinglayer::primitive2d::TransformPrimitive2D(
rPropertyHolder.getTransformation(),
@@ -1196,7 +1196,7 @@ namespace
rTarget.append(
new drawinglayer::primitive2d::TransformPrimitive2D(
rProperty.getTransformation(),
- drawinglayer::primitive2d::Primitive2DSequence(&xPrim, 1)));
+ drawinglayer::primitive2d::Primitive2DContainer { xPrim }));
}
}
@@ -1425,7 +1425,7 @@ namespace
aTextTransform.translate(rTextStartPosition.X(), rTextStartPosition.Y());
// prepare Primitive2DSequence, put text in foreground
- drawinglayer::primitive2d::Primitive2DSequence aSequence(2);
+ drawinglayer::primitive2d::Primitive2DContainer aSequence(2);
aSequence[1] = drawinglayer::primitive2d::Primitive2DReference(pResult);
// prepare filled polygon
@@ -1457,7 +1457,7 @@ namespace
rTarget.append(
new drawinglayer::primitive2d::TransformPrimitive2D(
rProperty.getTransformation(),
- drawinglayer::primitive2d::Primitive2DSequence(&aReference, 1)));
+ drawinglayer::primitive2d::Primitive2DContainer { aReference }));
}
}
}
@@ -1575,7 +1575,7 @@ namespace
else
{
// when a transformation is set, embed to it
- drawinglayer::primitive2d::Primitive2DSequence xTargets(aTargetVector.size());
+ drawinglayer::primitive2d::Primitive2DContainer xTargets(aTargetVector.size());
for(size_t a(0); a < aTargetVector.size(); a++)
{
@@ -2116,7 +2116,7 @@ namespace
if(aGDIMetaFile.GetActionSize())
{
// create sub-content
- drawinglayer::primitive2d::Primitive2DSequence xSubContent;
+ drawinglayer::primitive2d::Primitive2DContainer xSubContent;
{
rTargetHolders.Push();
@@ -2132,7 +2132,7 @@ namespace
rTargetHolders.Pop();
}
- if(xSubContent.hasElements())
+ if(!xSubContent.empty())
{
// add with transformation
rTargetHolders.Current().append(
@@ -2299,7 +2299,7 @@ namespace
{
// really a gradient
aRange.transform(rPropertyHolders.Current().getTransformation());
- drawinglayer::primitive2d::Primitive2DSequence xGradient(1);
+ drawinglayer::primitive2d::Primitive2DContainer xGradient(1);
if(rPropertyHolders.Current().isRasterOpInvert())
{
@@ -2356,7 +2356,7 @@ namespace
rTargetHolders.Current().append(
new drawinglayer::primitive2d::MaskPrimitive2D(
aOutline,
- drawinglayer::primitive2d::Primitive2DSequence(&aFillHatch, 1)));
+ drawinglayer::primitive2d::Primitive2DContainer { aFillHatch }));
}
break;
@@ -2859,13 +2859,13 @@ namespace
// create primitives there and get them
createHairlineAndFillPrimitive(aOutline, rTargetHolders.Current(), rPropertyHolders.Current());
- const drawinglayer::primitive2d::Primitive2DSequence aSubContent(
+ const drawinglayer::primitive2d::Primitive2DContainer aSubContent(
rTargetHolders.Current().getPrimitive2DSequence(rPropertyHolders.Current()));
// back to old target
rTargetHolders.Pop();
- if(aSubContent.hasElements())
+ if(!aSubContent.empty())
{
rTargetHolders.Current().append(
new drawinglayer::primitive2d::UnifiedTransparencePrimitive2D(
@@ -2967,7 +2967,7 @@ namespace
{
// create the sub-content with no embedding specific to the
// sub-metafile, this seems not to be used.
- drawinglayer::primitive2d::Primitive2DSequence xSubContent;
+ drawinglayer::primitive2d::Primitive2DContainer xSubContent;
{
rTargetHolders.Push();
// #i# for sub-Mteafile contents, do start with new, default render state
@@ -2978,7 +2978,7 @@ namespace
rTargetHolders.Pop();
}
- if(xSubContent.hasElements())
+ if(!xSubContent.empty())
{
// prepare sub-content transform
basegfx::B2DHomMatrix aSubTransform;
@@ -3011,7 +3011,7 @@ namespace
aSubTransform,
xSubContent));
- xSubContent = drawinglayer::primitive2d::Primitive2DSequence(&aEmbeddedTransform, 1);
+ xSubContent = drawinglayer::primitive2d::Primitive2DContainer { aEmbeddedTransform };
}
// check if gradient is a real gradient
@@ -3042,7 +3042,7 @@ namespace
rTargetHolders.Current().append(
new drawinglayer::primitive2d::TransparencePrimitive2D(
xSubContent,
- drawinglayer::primitive2d::Primitive2DSequence(&xTransparence, 1)));
+ drawinglayer::primitive2d::Primitive2DContainer { xTransparence }));
}
}
}
@@ -3176,7 +3176,7 @@ namespace drawinglayer
{
namespace primitive2d
{
- Primitive2DSequence MetafilePrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const
+ Primitive2DContainer MetafilePrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const
{
// prepare target and porperties; each will have one default entry
TargetHolders aTargetHolders;
@@ -3190,19 +3190,19 @@ namespace drawinglayer
// get the content. There should be only one target, as in the start condition,
// but iterating will be the right thing to do when some push/pop is not closed
- Primitive2DSequence xRetval;
+ Primitive2DContainer xRetval;
while(aTargetHolders.size() > 1)
{
- appendPrimitive2DSequenceToPrimitive2DSequence(xRetval,
+ xRetval.append(
aTargetHolders.Current().getPrimitive2DSequence(aPropertyHolders.Current()));
aTargetHolders.Pop();
}
- appendPrimitive2DSequenceToPrimitive2DSequence(xRetval,
+ xRetval.append(
aTargetHolders.Current().getPrimitive2DSequence(aPropertyHolders.Current()));
- if(xRetval.hasElements())
+ if(!xRetval.empty())
{
// get target size
const Rectangle aMtfTarget(getMetaFile().GetPrefMapMode().GetOrigin(), getMetaFile().GetPrefSize());
@@ -3222,7 +3222,7 @@ namespace drawinglayer
aAdaptedTransform,
xRetval));
- xRetval = Primitive2DSequence(&aEmbeddedTransform, 1);
+ xRetval = Primitive2DContainer { aEmbeddedTransform };
}
return xRetval;
diff --git a/drawinglayer/source/primitive2d/modifiedcolorprimitive2d.cxx b/drawinglayer/source/primitive2d/modifiedcolorprimitive2d.cxx
index 4e370379594c..f87e27118387 100644
--- a/drawinglayer/source/primitive2d/modifiedcolorprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/modifiedcolorprimitive2d.cxx
@@ -31,7 +31,7 @@ namespace drawinglayer
namespace primitive2d
{
ModifiedColorPrimitive2D::ModifiedColorPrimitive2D(
- const Primitive2DSequence& rChildren,
+ const Primitive2DContainer& rChildren,
const basegfx::BColorModifierSharedPtr& rColorModifier)
: GroupPrimitive2D(rChildren),
maColorModifier(rColorModifier)
diff --git a/drawinglayer/source/primitive2d/objectinfoprimitive2d.cxx b/drawinglayer/source/primitive2d/objectinfoprimitive2d.cxx
index ea77adab7563..60468257f779 100644
--- a/drawinglayer/source/primitive2d/objectinfoprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/objectinfoprimitive2d.cxx
@@ -26,7 +26,7 @@ namespace drawinglayer
namespace primitive2d
{
ObjectInfoPrimitive2D::ObjectInfoPrimitive2D(
- const Primitive2DSequence& rChildren,
+ const Primitive2DContainer& rChildren,
const OUString& rName,
const OUString& rTitle,
const OUString& rDesc)
diff --git a/drawinglayer/source/primitive2d/pagepreviewprimitive2d.cxx b/drawinglayer/source/primitive2d/pagepreviewprimitive2d.cxx
index c4fd3f03d105..bacbd4bd485c 100644
--- a/drawinglayer/source/primitive2d/pagepreviewprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/pagepreviewprimitive2d.cxx
@@ -35,12 +35,12 @@ namespace drawinglayer
{
namespace primitive2d
{
- Primitive2DSequence PagePreviewPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const
+ Primitive2DContainer PagePreviewPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const
{
- Primitive2DSequence xRetval;
- Primitive2DSequence aContent(getPageContent());
+ Primitive2DContainer xRetval;
+ Primitive2DContainer aContent(getPageContent());
- if(aContent.hasElements()
+ if(!aContent.empty()
&& basegfx::fTools::more(getContentWidth(), 0.0)
&& basegfx::fTools::more(getContentHeight(), 0.0))
{
@@ -53,7 +53,7 @@ namespace drawinglayer
{
// check if content overlaps with target size and needs to be embedded with a
// clipping primitive
- const basegfx::B2DRange aRealContentRange(getB2DRangeFromPrimitive2DSequence(aContent, rViewInformation));
+ const basegfx::B2DRange aRealContentRange(aContent.getB2DRange(rViewInformation));
const basegfx::B2DRange aAllowedContentRange(0.0, 0.0, getContentWidth(), getContentHeight());
if(!aAllowedContentRange.isInside(aRealContentRange))
@@ -62,7 +62,7 @@ namespace drawinglayer
new MaskPrimitive2D(
basegfx::B2DPolyPolygon(
basegfx::tools::createPolygonFromRect(aAllowedContentRange)), aContent));
- aContent = Primitive2DSequence(&xReferenceA, 1);
+ aContent = Primitive2DContainer { xReferenceA };
}
// create a mapping from content to object.
@@ -112,7 +112,7 @@ namespace drawinglayer
// embed in necessary transformation to map from SdrPage to SdrPageObject
const Primitive2DReference xReferenceB(new TransformPrimitive2D(aPageTrans, aContent));
- xRetval = Primitive2DSequence(&xReferenceB, 1);
+ xRetval = Primitive2DContainer { xReferenceB };
}
}
@@ -124,7 +124,7 @@ namespace drawinglayer
const basegfx::B2DHomMatrix& rTransform,
double fContentWidth,
double fContentHeight,
- const Primitive2DSequence& rPageContent,
+ const Primitive2DContainer& rPageContent,
bool bKeepAspectRatio)
: BufferedDecompositionPrimitive2D(),
mxDrawPage(rxDrawPage),
diff --git a/drawinglayer/source/primitive2d/patternfillprimitive2d.cxx b/drawinglayer/source/primitive2d/patternfillprimitive2d.cxx
index 19140d977308..e2f1bcbb4420 100644
--- a/drawinglayer/source/primitive2d/patternfillprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/patternfillprimitive2d.cxx
@@ -36,11 +36,11 @@ namespace drawinglayer
{
namespace primitive2d
{
- Primitive2DSequence PatternFillPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const
+ Primitive2DContainer PatternFillPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const
{
- Primitive2DSequence aRetval;
+ Primitive2DContainer aRetval;
- if(getChildren().hasElements())
+ if(!getChildren().empty())
{
if(!getReferenceRange().isEmpty() && getReferenceRange().getWidth() > 0.0 && getReferenceRange().getHeight() > 0.0)
{
@@ -56,8 +56,8 @@ namespace drawinglayer
// check if content needs to be clipped
const basegfx::B2DRange aUnitRange(0.0, 0.0, 1.0, 1.0);
- const basegfx::B2DRange aContentRange(getB2DRangeFromPrimitive2DSequence(getChildren(), rViewInformation));
- Primitive2DSequence aContent(getChildren());
+ const basegfx::B2DRange aContentRange(getChildren().getB2DRange(rViewInformation));
+ Primitive2DContainer aContent(getChildren());
if(!aUnitRange.isInside(aContentRange))
{
@@ -66,11 +66,11 @@ namespace drawinglayer
basegfx::B2DPolyPolygon(basegfx::tools::createPolygonFromRect(aUnitRange)),
aContent));
- aContent = Primitive2DSequence(&xRef, 1);
+ aContent = Primitive2DContainer { xRef };
}
// resize result
- aRetval.realloc(aMatrices.size());
+ aRetval.resize(aMatrices.size());
// create one primitive for each matrix
for(size_t a(0); a < aMatrices.size(); a++)
@@ -92,7 +92,7 @@ namespace drawinglayer
aMaskTransform,
aRetval));
- aRetval = Primitive2DSequence(&xRef, 1);
+ aRetval = Primitive2DContainer { xRef };
}
// embed result in mask
@@ -102,7 +102,7 @@ namespace drawinglayer
getMask(),
aRetval));
- aRetval = Primitive2DSequence(&xRef, 1);
+ aRetval = Primitive2DContainer { xRef };
}
}
@@ -114,7 +114,7 @@ namespace drawinglayer
PatternFillPrimitive2D::PatternFillPrimitive2D(
const basegfx::B2DPolyPolygon& rMask,
- const Primitive2DSequence& rChildren,
+ const Primitive2DContainer& rChildren,
const basegfx::B2DRange& rReferenceRange)
: BufferedDecompositionPrimitive2D(),
maMask(rMask),
diff --git a/drawinglayer/source/primitive2d/polygonprimitive2d.cxx b/drawinglayer/source/primitive2d/polygonprimitive2d.cxx
index dfc4aa4a8f52..d69efacea6b9 100644
--- a/drawinglayer/source/primitive2d/polygonprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/polygonprimitive2d.cxx
@@ -92,7 +92,7 @@ namespace drawinglayer
{
namespace primitive2d
{
- Primitive2DSequence PolygonMarkerPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const
+ Primitive2DContainer PolygonMarkerPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const
{
// calculate logic DashLength
const basegfx::B2DVector aDashVector(rViewInformation.getInverseObjectToViewTransformation() * basegfx::B2DVector(getDiscreteDashLength(), 0.0));
@@ -110,7 +110,7 @@ namespace drawinglayer
basegfx::tools::applyLineDashing(getB2DPolygon(), aDash, &aDashedPolyPolyA, &aDashedPolyPolyB, 2.0 * fLogicDashLength);
// prepare return value
- Primitive2DSequence aRetval(2);
+ Primitive2DContainer aRetval(2);
aRetval[0] = Primitive2DReference(new PolyPolygonHairlinePrimitive2D(aDashedPolyPolyA, getRGBColorA()));
aRetval[1] = Primitive2DReference(new PolyPolygonHairlinePrimitive2D(aDashedPolyPolyB, getRGBColorB()));
@@ -120,7 +120,7 @@ namespace drawinglayer
else
{
const Primitive2DReference xRef(new PolygonHairlinePrimitive2D(getB2DPolygon(), getRGBColorA()));
- return Primitive2DSequence(&xRef, 1L);
+ return Primitive2DContainer { xRef };
}
}
@@ -175,12 +175,12 @@ namespace drawinglayer
return aRetval;
}
- Primitive2DSequence PolygonMarkerPrimitive2D::get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const
+ Primitive2DContainer PolygonMarkerPrimitive2D::get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const
{
::osl::MutexGuard aGuard( m_aMutex );
bool bNeedNewDecomposition(false);
- if(getBuffered2DDecomposition().hasElements())
+ if(!getBuffered2DDecomposition().empty())
{
if(rViewInformation.getInverseObjectToViewTransformation() != maLastInverseObjectToViewTransformation)
{
@@ -191,10 +191,10 @@ namespace drawinglayer
if(bNeedNewDecomposition)
{
// conditions of last local decomposition have changed, delete
- const_cast< PolygonMarkerPrimitive2D* >(this)->setBuffered2DDecomposition(Primitive2DSequence());
+ const_cast< PolygonMarkerPrimitive2D* >(this)->setBuffered2DDecomposition(Primitive2DContainer());
}
- if(!getBuffered2DDecomposition().hasElements())
+ if(getBuffered2DDecomposition().empty())
{
// remember last used InverseObjectToViewTransformation
PolygonMarkerPrimitive2D* pThat = const_cast< PolygonMarkerPrimitive2D* >(this);
@@ -223,7 +223,7 @@ namespace drawinglayer
namespace primitive2d
{
- Primitive2DSequence PolygonStrokePrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const
+ Primitive2DContainer PolygonStrokePrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const
{
if(getB2DPolygon().count())
{
@@ -265,7 +265,7 @@ namespace drawinglayer
}
// prepare return value
- Primitive2DSequence aRetval(aAreaPolyPolygon.count());
+ Primitive2DContainer aRetval(aAreaPolyPolygon.count());
// create primitive
for(sal_uInt32 b(0L); b < aAreaPolyPolygon.count(); b++)
@@ -292,12 +292,12 @@ namespace drawinglayer
aHairLinePolyPolygon,
getLineAttribute().getColor()));
- return Primitive2DSequence(&xRef, 1);
+ return Primitive2DContainer { xRef };
}
}
else
{
- return Primitive2DSequence();
+ return Primitive2DContainer();
}
}
@@ -408,9 +408,9 @@ namespace drawinglayer
{
namespace primitive2d
{
- Primitive2DSequence PolygonWavePrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const
+ Primitive2DContainer PolygonWavePrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const
{
- Primitive2DSequence aRetval;
+ Primitive2DContainer aRetval;
if(getB2DPolygon().count())
{
@@ -422,13 +422,13 @@ namespace drawinglayer
// create waveline curve
const basegfx::B2DPolygon aWaveline(basegfx::tools::createWaveline(getB2DPolygon(), getWaveWidth(), getWaveHeight()));
const Primitive2DReference xRef(new PolygonStrokePrimitive2D(aWaveline, getLineAttribute(), getStrokeAttribute()));
- aRetval = Primitive2DSequence(&xRef, 1);
+ aRetval = Primitive2DContainer { xRef };
}
else
{
// flat waveline, decompose to simple line primitive
const Primitive2DReference xRef(new PolygonStrokePrimitive2D(getB2DPolygon(), getLineAttribute(), getStrokeAttribute()));
- aRetval = Primitive2DSequence(&xRef, 1);
+ aRetval = Primitive2DContainer { xRef };
}
}
@@ -521,7 +521,7 @@ namespace drawinglayer
{
namespace primitive2d
{
- Primitive2DSequence PolygonStrokeArrowPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const
+ Primitive2DContainer PolygonStrokeArrowPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const
{
// copy local polygon, it may be changed
basegfx::B2DPolygon aLocalPolygon(getB2DPolygon());
@@ -569,7 +569,7 @@ namespace drawinglayer
}
// prepare return value
- Primitive2DSequence aRetval(1L + (aArrowA.count() ? 1L : 0L) + (aArrowB.count() ? 1L : 0L));
+ Primitive2DContainer aRetval(1L + (aArrowA.count() ? 1L : 0L) + (aArrowB.count() ? 1L : 0L));
sal_uInt32 nInd(0L);
// add shaft
diff --git a/drawinglayer/source/primitive2d/polypolygonprimitive2d.cxx b/drawinglayer/source/primitive2d/polypolygonprimitive2d.cxx
index ec18be6997b0..adaf4ddec411 100644
--- a/drawinglayer/source/primitive2d/polypolygonprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/polypolygonprimitive2d.cxx
@@ -42,14 +42,14 @@ namespace drawinglayer
{
namespace primitive2d
{
- Primitive2DSequence PolyPolygonHairlinePrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const
+ Primitive2DContainer PolyPolygonHairlinePrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const
{
const basegfx::B2DPolyPolygon aPolyPolygon(getB2DPolyPolygon());
const sal_uInt32 nCount(aPolyPolygon.count());
if(nCount)
{
- Primitive2DSequence aRetval(nCount);
+ Primitive2DContainer aRetval(nCount);
for(sal_uInt32 a(0L); a < nCount; a++)
{
@@ -60,7 +60,7 @@ namespace drawinglayer
}
else
{
- return Primitive2DSequence();
+ return Primitive2DContainer();
}
}
@@ -102,14 +102,14 @@ namespace drawinglayer
{
namespace primitive2d
{
- Primitive2DSequence PolyPolygonMarkerPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const
+ Primitive2DContainer PolyPolygonMarkerPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const
{
const basegfx::B2DPolyPolygon aPolyPolygon(getB2DPolyPolygon());
const sal_uInt32 nCount(aPolyPolygon.count());
if(nCount)
{
- Primitive2DSequence aRetval(nCount);
+ Primitive2DContainer aRetval(nCount);
for(sal_uInt32 a(0L); a < nCount; a++)
{
@@ -125,7 +125,7 @@ namespace drawinglayer
}
else
{
- return Primitive2DSequence();
+ return Primitive2DContainer();
}
}
@@ -175,14 +175,14 @@ namespace drawinglayer
{
namespace primitive2d
{
- Primitive2DSequence PolyPolygonStrokePrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const
+ Primitive2DContainer PolyPolygonStrokePrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const
{
const basegfx::B2DPolyPolygon aPolyPolygon(getB2DPolyPolygon());
const sal_uInt32 nCount(aPolyPolygon.count());
if(nCount)
{
- Primitive2DSequence aRetval(nCount);
+ Primitive2DContainer aRetval(nCount);
for(sal_uInt32 a(0L); a < nCount; a++)
{
@@ -195,7 +195,7 @@ namespace drawinglayer
}
else
{
- return Primitive2DSequence();
+ return Primitive2DContainer();
}
}
@@ -300,7 +300,7 @@ namespace drawinglayer
{
namespace primitive2d
{
- Primitive2DSequence PolyPolygonGradientPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const
+ Primitive2DContainer PolyPolygonGradientPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const
{
if(!getFillGradient().isDefault())
{
@@ -311,17 +311,17 @@ namespace drawinglayer
getDefinitionRange(),
getFillGradient());
const Primitive2DReference xSubRef(pNewGradient);
- const Primitive2DSequence aSubSequence(&xSubRef, 1L);
+ const Primitive2DContainer aSubSequence { xSubRef };
// create mask primitive
MaskPrimitive2D* pNewMask = new MaskPrimitive2D(getB2DPolyPolygon(), aSubSequence);
const Primitive2DReference xRef(pNewMask);
- return Primitive2DSequence(&xRef, 1);
+ return Primitive2DContainer { xRef };
}
else
{
- return Primitive2DSequence();
+ return Primitive2DContainer();
}
}
@@ -372,7 +372,7 @@ namespace drawinglayer
{
namespace primitive2d
{
- Primitive2DSequence PolyPolygonHatchPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const
+ Primitive2DContainer PolyPolygonHatchPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const
{
if(!getFillHatch().isDefault())
{
@@ -384,17 +384,17 @@ namespace drawinglayer
getBackgroundColor(),
getFillHatch());
const Primitive2DReference xSubRef(pNewHatch);
- const Primitive2DSequence aSubSequence(&xSubRef, 1L);
+ const Primitive2DContainer aSubSequence { xSubRef };
// create mask primitive
MaskPrimitive2D* pNewMask = new MaskPrimitive2D(getB2DPolyPolygon(), aSubSequence);
const Primitive2DReference xRef(pNewMask);
- return Primitive2DSequence(&xRef, 1);
+ return Primitive2DContainer { xRef };
}
else
{
- return Primitive2DSequence();
+ return Primitive2DContainer();
}
}
@@ -450,7 +450,7 @@ namespace drawinglayer
{
namespace primitive2d
{
- Primitive2DSequence PolyPolygonGraphicPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const
+ Primitive2DContainer PolyPolygonGraphicPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const
{
if(!getFillGraphic().isDefault())
{
@@ -521,14 +521,14 @@ namespace drawinglayer
const Primitive2DReference xRef(
new MaskPrimitive2D(
getB2DPolyPolygon(),
- Primitive2DSequence(&xSubRef, 1)));
+ Primitive2DContainer { xSubRef }));
- return Primitive2DSequence(&xRef, 1);
+ return Primitive2DContainer { xRef };
}
}
}
- return Primitive2DSequence();
+ return Primitive2DContainer();
}
PolyPolygonGraphicPrimitive2D::PolyPolygonGraphicPrimitive2D(
@@ -578,9 +578,9 @@ namespace drawinglayer
{
namespace primitive2d
{
- Primitive2DSequence PolyPolygonSelectionPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const
+ Primitive2DContainer PolyPolygonSelectionPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const
{
- Primitive2DSequence aRetval;
+ Primitive2DContainer aRetval;
if(getTransparence() < 1.0 && getB2DPolyPolygon().count())
{
@@ -592,7 +592,7 @@ namespace drawinglayer
getB2DPolyPolygon(),
getColor()));
- aRetval = Primitive2DSequence(&aFill, 1);
+ aRetval = Primitive2DContainer { aFill };
}
if(getDiscreteGrow() > 0.0)
@@ -605,18 +605,18 @@ namespace drawinglayer
getB2DPolyPolygon(),
aLineAttribute));
- appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, aFatLine);
+ aRetval.push_back(aFatLine);
}
// embed filled to transparency (if used)
- if(aRetval.getLength() && getTransparence() > 0.0)
+ if(!aRetval.empty() && getTransparence() > 0.0)
{
const Primitive2DReference aTrans(
new UnifiedTransparencePrimitive2D(
aRetval,
getTransparence()));
- aRetval = Primitive2DSequence(&aTrans, 1);
+ aRetval = Primitive2DContainer { aTrans };
}
}
diff --git a/drawinglayer/source/primitive2d/primitivetools2d.cxx b/drawinglayer/source/primitive2d/primitivetools2d.cxx
index 228b63a2d7bd..9b44f4edb231 100644
--- a/drawinglayer/source/primitive2d/primitivetools2d.cxx
+++ b/drawinglayer/source/primitive2d/primitivetools2d.cxx
@@ -27,7 +27,7 @@ namespace drawinglayer
{
namespace primitive2d
{
- Primitive2DSequence DiscreteMetricDependentPrimitive2D::get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const
+ Primitive2DContainer DiscreteMetricDependentPrimitive2D::get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const
{
::osl::MutexGuard aGuard( m_aMutex );
@@ -35,13 +35,13 @@ namespace drawinglayer
const basegfx::B2DVector aDiscreteVector(rViewInformation.getInverseObjectToViewTransformation() * basegfx::B2DVector(1.0, 1.0));
const double fDiscreteUnit(std::min(fabs(aDiscreteVector.getX()), fabs(aDiscreteVector.getY())));
- if(getBuffered2DDecomposition().hasElements() && !basegfx::fTools::equal(fDiscreteUnit, getDiscreteUnit()))
+ if(!getBuffered2DDecomposition().empty() && !basegfx::fTools::equal(fDiscreteUnit, getDiscreteUnit()))
{
// conditions of last local decomposition have changed, delete
- const_cast< DiscreteMetricDependentPrimitive2D* >(this)->setBuffered2DDecomposition(Primitive2DSequence());
+ const_cast< DiscreteMetricDependentPrimitive2D* >(this)->setBuffered2DDecomposition(Primitive2DContainer());
}
- if(!getBuffered2DDecomposition().hasElements())
+ if(getBuffered2DDecomposition().empty())
{
// remember new valid DiscreteUnit
const_cast< DiscreteMetricDependentPrimitive2D* >(this)->updateDiscreteUnit(fDiscreteUnit);
@@ -59,20 +59,20 @@ namespace drawinglayer
{
namespace primitive2d
{
- Primitive2DSequence ViewportDependentPrimitive2D::get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const
+ Primitive2DContainer ViewportDependentPrimitive2D::get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const
{
::osl::MutexGuard aGuard( m_aMutex );
// get the current Viewport
const basegfx::B2DRange& rViewport = rViewInformation.getViewport();
- if(getBuffered2DDecomposition().hasElements() && !rViewport.equal(getViewport()))
+ if(!getBuffered2DDecomposition().empty() && !rViewport.equal(getViewport()))
{
// conditions of last local decomposition have changed, delete
- const_cast< ViewportDependentPrimitive2D* >(this)->setBuffered2DDecomposition(Primitive2DSequence());
+ const_cast< ViewportDependentPrimitive2D* >(this)->setBuffered2DDecomposition(Primitive2DContainer());
}
- if(!getBuffered2DDecomposition().hasElements())
+ if(getBuffered2DDecomposition().empty())
{
// remember new valid DiscreteUnit
const_cast< ViewportDependentPrimitive2D* >(this)->maViewport = rViewport;
@@ -90,20 +90,20 @@ namespace drawinglayer
{
namespace primitive2d
{
- Primitive2DSequence ViewTransformationDependentPrimitive2D::get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const
+ Primitive2DContainer ViewTransformationDependentPrimitive2D::get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const
{
::osl::MutexGuard aGuard( m_aMutex );
// get the current ViewTransformation
const basegfx::B2DHomMatrix& rViewTransformation = rViewInformation.getViewTransformation();
- if(getBuffered2DDecomposition().hasElements() && rViewTransformation != getViewTransformation())
+ if(!getBuffered2DDecomposition().empty() && rViewTransformation != getViewTransformation())
{
// conditions of last local decomposition have changed, delete
- const_cast< ViewTransformationDependentPrimitive2D* >(this)->setBuffered2DDecomposition(Primitive2DSequence());
+ const_cast< ViewTransformationDependentPrimitive2D* >(this)->setBuffered2DDecomposition(Primitive2DContainer());
}
- if(!getBuffered2DDecomposition().hasElements())
+ if(getBuffered2DDecomposition().empty())
{
// remember new valid ViewTransformation
const_cast< ViewTransformationDependentPrimitive2D* >(this)->maViewTransformation = rViewTransformation;
@@ -121,29 +121,29 @@ namespace drawinglayer
{
namespace primitive2d
{
- Primitive2DSequence ObjectAndViewTransformationDependentPrimitive2D::get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const
+ Primitive2DContainer ObjectAndViewTransformationDependentPrimitive2D::get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const
{
::osl::MutexGuard aGuard( m_aMutex );
// get the current ViewTransfromation
const basegfx::B2DHomMatrix& rViewTransformation = rViewInformation.getViewTransformation();
- if(getBuffered2DDecomposition().hasElements() && rViewTransformation != getViewTransformation())
+ if(!getBuffered2DDecomposition().empty() && rViewTransformation != getViewTransformation())
{
// conditions of last local decomposition have changed, delete
- const_cast< ObjectAndViewTransformationDependentPrimitive2D* >(this)->setBuffered2DDecomposition(Primitive2DSequence());
+ const_cast< ObjectAndViewTransformationDependentPrimitive2D* >(this)->setBuffered2DDecomposition(Primitive2DContainer());
}
// get the current ObjectTransformation
const basegfx::B2DHomMatrix& rObjectTransformation = rViewInformation.getObjectTransformation();
- if(getBuffered2DDecomposition().hasElements() && rObjectTransformation != getObjectTransformation())
+ if(!getBuffered2DDecomposition().empty() && rObjectTransformation != getObjectTransformation())
{
// conditions of last local decomposition have changed, delete
- const_cast< ObjectAndViewTransformationDependentPrimitive2D* >(this)->setBuffered2DDecomposition(Primitive2DSequence());
+ const_cast< ObjectAndViewTransformationDependentPrimitive2D* >(this)->setBuffered2DDecomposition(Primitive2DContainer());
}
- if(!getBuffered2DDecomposition().hasElements())
+ if(getBuffered2DDecomposition().empty())
{
// remember new valid ViewTransformation, and ObjectTransformation
const_cast< ObjectAndViewTransformationDependentPrimitive2D* >(this)->maViewTransformation = rViewTransformation;
diff --git a/drawinglayer/source/primitive2d/sceneprimitive2d.cxx b/drawinglayer/source/primitive2d/sceneprimitive2d.cxx
index f3042c034f85..5aaf906826ac 100644
--- a/drawinglayer/source/primitive2d/sceneprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/sceneprimitive2d.cxx
@@ -78,7 +78,7 @@ namespace drawinglayer
}
// return if there are shadow primitives
- return maShadowPrimitives.hasElements();
+ return !maShadowPrimitives.empty();
}
void ScenePrimitive2D::calculateDiscreteSizes(
@@ -128,17 +128,16 @@ namespace drawinglayer
}
}
- Primitive2DSequence ScenePrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const
+ Primitive2DContainer ScenePrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const
{
- Primitive2DSequence aRetval;
+ Primitive2DContainer aRetval;
// create 2D shadows from contained 3D primitives. This creates the shadow primitives on demand and tells if
// there are some or not. Do this at start, the shadow might still be visible even when the scene is not
if(impGetShadow3D(rViewInformation))
{
// test visibility
- const basegfx::B2DRange aShadow2DRange(
- getB2DRangeFromPrimitive2DSequence(maShadowPrimitives, rViewInformation));
+ const basegfx::B2DRange aShadow2DRange(maShadowPrimitives.getB2DRange(rViewInformation));
const basegfx::B2DRange aViewRange(
rViewInformation.getViewport());
@@ -298,7 +297,7 @@ namespace drawinglayer
// create bitmap primitive and add
const Primitive2DReference xRef(new BitmapPrimitive2D(maOldRenderedBitmap, aNew2DTransform));
- appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, xRef);
+ aRetval.push_back(xRef);
// test: Allow to add an outline in the debugger when tests are needed
static bool bAddOutlineToCreated3DSceneRepresentation(false);
@@ -308,7 +307,7 @@ namespace drawinglayer
basegfx::B2DPolygon aOutline(basegfx::tools::createUnitPolygon());
aOutline.transform(aNew2DTransform);
const Primitive2DReference xRef2(new PolygonHairlinePrimitive2D(aOutline, basegfx::BColor(1.0, 0.0, 0.0)));
- appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, xRef2);
+ aRetval.push_back(xRef2);
}
}
}
@@ -316,9 +315,9 @@ namespace drawinglayer
return aRetval;
}
- Primitive2DSequence ScenePrimitive2D::getGeometry2D() const
+ Primitive2DContainer ScenePrimitive2D::getGeometry2D() const
{
- Primitive2DSequence aRetval;
+ Primitive2DContainer aRetval;
// create 2D projected geometry from 3D geometry
if(getChildren3D().hasElements())
@@ -338,9 +337,9 @@ namespace drawinglayer
return aRetval;
}
- Primitive2DSequence ScenePrimitive2D::getShadow2D(const geometry::ViewInformation2D& rViewInformation) const
+ Primitive2DContainer ScenePrimitive2D::getShadow2D(const geometry::ViewInformation2D& rViewInformation) const
{
- Primitive2DSequence aRetval;
+ Primitive2DContainer aRetval;
// create 2D shadows from contained 3D primitives
if(impGetShadow3D(rViewInformation))
@@ -446,7 +445,7 @@ namespace drawinglayer
// expand by evtl. existing shadow primitives
if(impGetShadow3D(rViewInformation))
{
- const basegfx::B2DRange aShadow2DRange(getB2DRangeFromPrimitive2DSequence(maShadowPrimitives, rViewInformation));
+ const basegfx::B2DRange aShadow2DRange(maShadowPrimitives.getB2DRange(rViewInformation));
if(!aShadow2DRange.isEmpty())
{
@@ -457,7 +456,7 @@ namespace drawinglayer
return aRetval;
}
- Primitive2DSequence ScenePrimitive2D::get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const
+ Primitive2DContainer ScenePrimitive2D::get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const
{
::osl::MutexGuard aGuard( m_aMutex );
@@ -467,7 +466,7 @@ namespace drawinglayer
bool bNeedNewDecomposition(false);
bool bDiscreteSizesAreCalculated(false);
- if(getBuffered2DDecomposition().hasElements())
+ if(!getBuffered2DDecomposition().empty())
{
basegfx::B2DRange aVisibleDiscreteRange;
calculateDiscreteSizes(rViewInformation, aDiscreteRange, aVisibleDiscreteRange, aUnitVisibleRange);
@@ -495,10 +494,10 @@ namespace drawinglayer
if(bNeedNewDecomposition)
{
// conditions of last local decomposition have changed, delete
- const_cast< ScenePrimitive2D* >(this)->setBuffered2DDecomposition(Primitive2DSequence());
+ const_cast< ScenePrimitive2D* >(this)->setBuffered2DDecomposition(Primitive2DContainer());
}
- if(!getBuffered2DDecomposition().hasElements())
+ if(getBuffered2DDecomposition().empty())
{
if(!bDiscreteSizesAreCalculated)
{
diff --git a/drawinglayer/source/primitive2d/sdrdecompositiontools2d.cxx b/drawinglayer/source/primitive2d/sdrdecompositiontools2d.cxx
index 11025b456822..c285ec1b414a 100644
--- a/drawinglayer/source/primitive2d/sdrdecompositiontools2d.cxx
+++ b/drawinglayer/source/primitive2d/sdrdecompositiontools2d.cxx
@@ -102,7 +102,7 @@ namespace drawinglayer
// create HiddenGeometryPrimitive2D
return Primitive2DReference(
- new HiddenGeometryPrimitive2D(Primitive2DSequence(&xReference, 1)));
+ new HiddenGeometryPrimitive2D(Primitive2DContainer { xReference }));
}
} // end of namespace primitive2d
} // end of namespace drawinglayer
diff --git a/drawinglayer/source/primitive2d/shadowprimitive2d.cxx b/drawinglayer/source/primitive2d/shadowprimitive2d.cxx
index abdce86fcbcb..3467d95b295c 100644
--- a/drawinglayer/source/primitive2d/shadowprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/shadowprimitive2d.cxx
@@ -39,7 +39,7 @@ namespace drawinglayer
ShadowPrimitive2D::ShadowPrimitive2D(
const basegfx::B2DHomMatrix& rShadowTransform,
const basegfx::BColor& rShadowColor,
- const Primitive2DSequence& rChildren)
+ const Primitive2DContainer& rChildren)
: GroupPrimitive2D(rChildren),
maShadowTransform(rShadowTransform),
maShadowColor(rShadowColor)
@@ -61,16 +61,16 @@ namespace drawinglayer
basegfx::B2DRange ShadowPrimitive2D::getB2DRange(const geometry::ViewInformation2D& rViewInformation) const
{
- basegfx::B2DRange aRetval(getB2DRangeFromPrimitive2DSequence(getChildren(), rViewInformation));
+ basegfx::B2DRange aRetval(getChildren().getB2DRange(rViewInformation));
aRetval.transform(getShadowTransform());
return aRetval;
}
- Primitive2DSequence ShadowPrimitive2D::get2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const
+ Primitive2DContainer ShadowPrimitive2D::get2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const
{
- Primitive2DSequence aRetval;
+ Primitive2DContainer aRetval;
- if(getChildren().hasElements())
+ if(!getChildren().empty())
{
// create a modifiedColorPrimitive containing the shadow color and the content
const basegfx::BColorModifierSharedPtr aBColorModifier(
@@ -80,11 +80,11 @@ namespace drawinglayer
new ModifiedColorPrimitive2D(
getChildren(),
aBColorModifier));
- const Primitive2DSequence aSequenceB(&xRefA, 1L);
+ const Primitive2DContainer aSequenceB { xRefA };
// build transformed primitiveVector with shadow offset and add to target
const Primitive2DReference xRefB(new TransformPrimitive2D(getShadowTransform(), aSequenceB));
- aRetval = Primitive2DSequence(&xRefB, 1L);
+ aRetval = Primitive2DContainer { xRefB };
}
return aRetval;
diff --git a/drawinglayer/source/primitive2d/structuretagprimitive2d.cxx b/drawinglayer/source/primitive2d/structuretagprimitive2d.cxx
index d26ac9b95e6d..5d659ec6547a 100644
--- a/drawinglayer/source/primitive2d/structuretagprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/structuretagprimitive2d.cxx
@@ -32,7 +32,7 @@ namespace drawinglayer
{
StructureTagPrimitive2D::StructureTagPrimitive2D(
const vcl::PDFWriter::StructElement& rStructureElement,
- const Primitive2DSequence& rChildren)
+ const Primitive2DContainer& rChildren)
: GroupPrimitive2D(rChildren),
maStructureElement(rStructureElement)
{
diff --git a/drawinglayer/source/primitive2d/svggradientprimitive2d.cxx b/drawinglayer/source/primitive2d/svggradientprimitive2d.cxx
index 4bc3994f5ec5..17a134d47939 100644
--- a/drawinglayer/source/primitive2d/svggradientprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/svggradientprimitive2d.cxx
@@ -65,11 +65,11 @@ namespace drawinglayer
{
namespace primitive2d
{
- Primitive2DSequence SvgGradientHelper::createSingleGradientEntryFill() const
+ Primitive2DContainer SvgGradientHelper::createSingleGradientEntryFill() const
{
const SvgGradientEntryVector& rEntries = getGradientEntries();
const sal_uInt32 nCount(rEntries.size());
- Primitive2DSequence xRetval;
+ Primitive2DContainer xRetval;
if(nCount)
{
@@ -85,7 +85,7 @@ namespace drawinglayer
if(fOpacity < 1.0)
{
- const Primitive2DSequence aContent(&xRef, 1);
+ const Primitive2DContainer aContent { xRef };
xRef = Primitive2DReference(
new UnifiedTransparencePrimitive2D(
@@ -93,7 +93,7 @@ namespace drawinglayer
1.0 - fOpacity));
}
- xRetval = Primitive2DSequence(&xRef, 1);
+ xRetval = Primitive2DContainer { xRef };
}
}
else
@@ -184,8 +184,8 @@ namespace drawinglayer
}
double SvgGradientHelper::createRun(
- Primitive2DVector& rTargetColor,
- Primitive2DVector& rTargetOpacity,
+ Primitive2DContainer& rTargetColor,
+ Primitive2DContainer& rTargetOpacity,
double fPos,
double fMax,
const SvgGradientEntryVector& rEntries,
@@ -238,21 +238,21 @@ namespace drawinglayer
return fPos;
}
- Primitive2DSequence SvgGradientHelper::createResult(
- const Primitive2DVector& rTargetColor,
- const Primitive2DVector& rTargetOpacity,
+ Primitive2DContainer SvgGradientHelper::createResult(
+ const Primitive2DContainer& rTargetColor,
+ const Primitive2DContainer& rTargetOpacity,
const basegfx::B2DHomMatrix& rUnitGradientToObject,
bool bInvert) const
{
- Primitive2DSequence xRetval;
- const Primitive2DSequence aTargetColorEntries(Primitive2DVectorToPrimitive2DSequence(rTargetColor, bInvert));
- const Primitive2DSequence aTargetOpacityEntries(Primitive2DVectorToPrimitive2DSequence(rTargetOpacity, bInvert));
+ Primitive2DContainer xRetval;
+ const Primitive2DContainer aTargetColorEntries(rTargetColor.maybeInvert(bInvert));
+ const Primitive2DContainer aTargetOpacityEntries(rTargetOpacity.maybeInvert(bInvert));
- if(aTargetColorEntries.hasElements())
+ if(!aTargetColorEntries.empty())
{
Primitive2DReference xRefContent;
- if(aTargetOpacityEntries.hasElements())
+ if(!aTargetOpacityEntries.empty())
{
const Primitive2DReference xRefOpacity = new TransparencePrimitive2D(
aTargetColorEntries,
@@ -260,7 +260,7 @@ namespace drawinglayer
xRefContent = new TransformPrimitive2D(
rUnitGradientToObject,
- Primitive2DSequence(&xRefOpacity, 1));
+ Primitive2DContainer { xRefOpacity });
}
else
{
@@ -271,9 +271,9 @@ namespace drawinglayer
xRefContent = new MaskPrimitive2D(
getPolyPolygon(),
- Primitive2DSequence(&xRefContent, 1));
+ Primitive2DContainer { xRefContent });
- xRetval = Primitive2DSequence(&xRefContent, 1);
+ xRetval = Primitive2DContainer { xRefContent };
}
return xRetval;
@@ -343,8 +343,8 @@ namespace drawinglayer
}
void SvgLinearGradientPrimitive2D::createAtom(
- Primitive2DVector& rTargetColor,
- Primitive2DVector& rTargetOpacity,
+ Primitive2DContainer& rTargetColor,
+ Primitive2DContainer& rTargetOpacity,
const SvgGradientEntry& rFrom,
const SvgGradientEntry& rTo,
sal_Int32 nOffset) const
@@ -376,9 +376,9 @@ namespace drawinglayer
}
}
- Primitive2DSequence SvgLinearGradientPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const
+ Primitive2DContainer SvgLinearGradientPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const
{
- Primitive2DSequence xRetval;
+ Primitive2DContainer xRetval;
if(!getPreconditionsChecked())
{
@@ -454,8 +454,8 @@ namespace drawinglayer
const basegfx::B2DRange aUnitRange(aUnitPoly.getB2DRange());
// prepare result vectors
- Primitive2DVector aTargetColor;
- Primitive2DVector aTargetOpacity;
+ Primitive2DContainer aTargetColor;
+ Primitive2DContainer aTargetOpacity;
if(basegfx::fTools::more(aUnitRange.getWidth(), 0.0))
{
@@ -476,17 +476,17 @@ namespace drawinglayer
// else the start and end pads are already created and fPos == aUnitRange.getMaxX().
// Its possible to express the repeated linear gradient by adding the
// transformed central run. Create it this way
- Primitive2DSequence aTargetColorEntries(Primitive2DVectorToPrimitive2DSequence(aTargetColor));
- Primitive2DSequence aTargetOpacityEntries(Primitive2DVectorToPrimitive2DSequence(aTargetOpacity));
+ Primitive2DContainer aTargetColorEntries(aTargetColor.maybeInvert());
+ Primitive2DContainer aTargetOpacityEntries(aTargetOpacity.maybeInvert());
aTargetColor.clear();
aTargetOpacity.clear();
- if(aTargetColorEntries.hasElements())
+ if(!aTargetColorEntries.empty())
{
// add original central run as group primitive
aTargetColor.push_back(new GroupPrimitive2D(aTargetColorEntries));
- if(aTargetOpacityEntries.hasElements())
+ if(!aTargetOpacityEntries.empty())
{
aTargetOpacity.push_back(new GroupPrimitive2D(aTargetOpacityEntries));
}
@@ -515,7 +515,7 @@ namespace drawinglayer
aTargetColor.push_back(new TransformPrimitive2D(aTransform, aTargetColorEntries));
- if(aTargetOpacityEntries.hasElements())
+ if(!aTargetOpacityEntries.empty())
{
aTargetOpacity.push_back(new TransformPrimitive2D(aTransform, aTargetOpacityEntries));
}
@@ -542,7 +542,7 @@ namespace drawinglayer
aTargetColor.push_back(new TransformPrimitive2D(aTransform, aTargetColorEntries));
- if(aTargetOpacityEntries.hasElements())
+ if(!aTargetOpacityEntries.empty())
{
aTargetOpacity.push_back(new TransformPrimitive2D(aTransform, aTargetOpacityEntries));
}
@@ -627,8 +627,8 @@ namespace drawinglayer
}
void SvgRadialGradientPrimitive2D::createAtom(
- Primitive2DVector& rTargetColor,
- Primitive2DVector& rTargetOpacity,
+ Primitive2DContainer& rTargetColor,
+ Primitive2DContainer& rTargetOpacity,
const SvgGradientEntry& rFrom,
const SvgGradientEntry& rTo,
sal_Int32 nOffset) const
@@ -720,9 +720,9 @@ namespace drawinglayer
}
}
- Primitive2DSequence SvgRadialGradientPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const
+ Primitive2DContainer SvgRadialGradientPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const
{
- Primitive2DSequence xRetval;
+ Primitive2DContainer xRetval;
if(!getPreconditionsChecked())
{
@@ -800,8 +800,8 @@ namespace drawinglayer
fMax = std::max(fMax, basegfx::B2DVector(aUnitRange.getMaxX(), aUnitRange.getMinY()).getLength());
// prepare result vectors
- Primitive2DVector aTargetColor;
- Primitive2DVector aTargetOpacity;
+ Primitive2DContainer aTargetColor;
+ Primitive2DContainer aTargetOpacity;
if(0.0 < fMax)
{
@@ -924,9 +924,9 @@ namespace drawinglayer
{
namespace primitive2d
{
- Primitive2DSequence SvgLinearAtomPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const
+ Primitive2DContainer SvgLinearAtomPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const
{
- Primitive2DSequence xRetval;
+ Primitive2DContainer xRetval;
const double fDelta(getOffsetB() - getOffsetA());
if(!basegfx::fTools::equalZero(fDelta))
@@ -951,7 +951,7 @@ namespace drawinglayer
const double fUnitStep(1.0 / nSteps);
// prepare result set (known size)
- xRetval.realloc(nSteps);
+ xRetval.resize(nSteps);
for(sal_uInt32 a(0); a < nSteps; a++, fUnitScale += fUnitStep)
{
@@ -1011,9 +1011,9 @@ namespace drawinglayer
{
namespace primitive2d
{
- Primitive2DSequence SvgRadialAtomPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const
+ Primitive2DContainer SvgRadialAtomPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const
{
- Primitive2DSequence xRetval;
+ Primitive2DContainer xRetval;
const double fDeltaScale(getScaleB() - getScaleA());
if(!basegfx::fTools::equalZero(fDeltaScale))
@@ -1029,7 +1029,7 @@ namespace drawinglayer
const double fUnitStep(1.0 / nSteps);
// prepare result set (known size)
- xRetval.realloc(nSteps);
+ xRetval.resize(nSteps);
for(sal_uInt32 a(0); a < nSteps; a++, fUnitScale += fUnitStep)
{
diff --git a/drawinglayer/source/primitive2d/textbreakuphelper.cxx b/drawinglayer/source/primitive2d/textbreakuphelper.cxx
index b3dfbeee09d5..fb2bc5b3e157 100644
--- a/drawinglayer/source/primitive2d/textbreakuphelper.cxx
+++ b/drawinglayer/source/primitive2d/textbreakuphelper.cxx
@@ -57,7 +57,7 @@ namespace drawinglayer
{
}
- void TextBreakupHelper::breakupPortion(Primitive2DVector& rTempResult, sal_Int32 nIndex, sal_Int32 nLength, bool bWordLineMode)
+ void TextBreakupHelper::breakupPortion(Primitive2DContainer& rTempResult, sal_Int32 nIndex, sal_Int32 nLength, bool bWordLineMode)
{
if(nLength && !(nIndex == mrSource.getTextPosition() && nLength == mrSource.getTextLength()))
{
@@ -189,7 +189,7 @@ namespace drawinglayer
{
if(mrSource.getTextLength())
{
- Primitive2DVector aTempResult;
+ Primitive2DContainer aTempResult;
static css::uno::Reference< css::i18n::XBreakIterator > xBreakIterator;
if(!xBreakIterator.is())
@@ -281,13 +281,13 @@ namespace drawinglayer
}
}
- mxResult = Primitive2DVectorToPrimitive2DSequence(aTempResult);
+ mxResult = aTempResult;
}
}
- const Primitive2DSequence& TextBreakupHelper::getResult(BreakupUnit aBreakupUnit) const
+ const Primitive2DContainer& TextBreakupHelper::getResult(BreakupUnit aBreakupUnit) const
{
- if(!mxResult.hasElements())
+ if(mxResult.empty())
{
const_cast< TextBreakupHelper* >(this)->breakup(aBreakupUnit);
}
diff --git a/drawinglayer/source/primitive2d/textdecoratedprimitive2d.cxx b/drawinglayer/source/primitive2d/textdecoratedprimitive2d.cxx
index 93e9ba1f0450..c414640a34c8 100644
--- a/drawinglayer/source/primitive2d/textdecoratedprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/textdecoratedprimitive2d.cxx
@@ -155,16 +155,16 @@ namespace drawinglayer
// TODO: Handle Font Emphasis Above/Below
}
- Primitive2DSequence TextDecoratedPortionPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const
+ Primitive2DContainer TextDecoratedPortionPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const
{
if(getWordLineMode())
{
// support for single word mode; split to single word primitives
// using TextBreakupHelper
const TextBreakupHelper aTextBreakupHelper(*this);
- const Primitive2DSequence aBroken(aTextBreakupHelper.getResult(BreakupUnit_word));
+ const Primitive2DContainer aBroken(aTextBreakupHelper.getResult(BreakupUnit_word));
- if(aBroken.hasElements())
+ if(!aBroken.empty())
{
// was indeed split to several words, use as result
return aBroken;
@@ -177,7 +177,7 @@ namespace drawinglayer
}
std::vector< Primitive2DReference > aNewPrimitives;
basegfx::tools::B2DHomMatrixBufferedOnDemandDecompose aDecTrans(getTextTransform());
- Primitive2DSequence aRetval;
+ Primitive2DContainer aRetval;
// create basic geometry such as SimpleTextPrimitive, Overline, Underline,
// Strikeout, etc...
@@ -189,7 +189,7 @@ namespace drawinglayer
getFontAttribute().getSymbol(),
getFontAttribute().getVertical(),
getFontAttribute().getItalic(),
- getFontAttribute().getMonospaced(),
+ getFontAttribute().getMonospaced(),
false, // no outline anymore, handled locally
getFontAttribute().getRTL(),
getFontAttribute().getBiDiStrong());
@@ -202,7 +202,7 @@ namespace drawinglayer
if(nMemberCount)
{
- aRetval.realloc(nMemberCount);
+ aRetval.resize(nMemberCount);
for(sal_uInt32 a(0); a < nMemberCount; a++)
{
@@ -211,7 +211,7 @@ namespace drawinglayer
}
// Handle Shadow, Outline and TextRelief
- if(aRetval.hasElements())
+ if(!aRetval.empty())
{
// outline AND shadow depend on NO TextRelief (see dialog)
const bool bHasTextRelief(TEXT_RELIEF_NONE != getTextRelief());
@@ -279,7 +279,7 @@ namespace drawinglayer
aDecTrans.getTranslate(),
aDecTrans.getRotate(),
aTextEffectStyle2D));
- aRetval = Primitive2DSequence(&aNewTextEffect, 1);
+ aRetval = Primitive2DContainer { aNewTextEffect };
}
else if(bHasOutline)
{
@@ -290,16 +290,16 @@ namespace drawinglayer
aDecTrans.getTranslate(),
aDecTrans.getRotate(),
TEXTEFFECTSTYLE2D_OUTLINE));
- aRetval = Primitive2DSequence(&aNewTextEffect, 1);
+ aRetval = Primitive2DContainer { aNewTextEffect };
}
if(aShadow.is())
{
// put shadow in front if there is one to paint timely before
// but placed behind content
- const Primitive2DSequence aContent(aRetval);
- aRetval = Primitive2DSequence(&aShadow, 1);
- appendPrimitive2DSequenceToPrimitive2DSequence(aRetval, aContent);
+ const Primitive2DContainer aContent(aRetval);
+ aRetval = Primitive2DContainer { aShadow };
+ aRetval.append(aContent);
}
}
}
diff --git a/drawinglayer/source/primitive2d/texteffectprimitive2d.cxx b/drawinglayer/source/primitive2d/texteffectprimitive2d.cxx
index f55d1dbaacba..64cfc35bc2e8 100644
--- a/drawinglayer/source/primitive2d/texteffectprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/texteffectprimitive2d.cxx
@@ -32,9 +32,9 @@ namespace drawinglayer
{
static double fDiscreteSize(1.1);
- Primitive2DSequence TextEffectPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const
+ Primitive2DContainer TextEffectPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const
{
- Primitive2DSequence aRetval;
+ Primitive2DContainer aRetval;
// get the distance of one discrete units from target display. Use between 1.0 and sqrt(2) to
// have good results on rotated objects, too
@@ -66,7 +66,7 @@ namespace drawinglayer
TEXTEFFECTSTYLE2D_RELIEF_EMBOSSED_DEFAULT == getTextEffectStyle2D()
|| TEXTEFFECTSTYLE2D_RELIEF_ENGRAVED_DEFAULT == getTextEffectStyle2D());
basegfx::B2DHomMatrix aTransform(aBackTransform);
- aRetval.realloc(2);
+ aRetval.resize(2);
if(bEmbossed)
{
@@ -95,7 +95,7 @@ namespace drawinglayer
aRetval[0] = Primitive2DReference(
new TransformPrimitive2D(
aTransform,
- Primitive2DSequence(&xModifiedColor, 1)));
+ Primitive2DContainer { xModifiedColor }));
// add original, too
const basegfx::BColorModifierSharedPtr aBColorModifierToWhite(
@@ -121,7 +121,7 @@ namespace drawinglayer
aRetval[0] = Primitive2DReference(
new TransformPrimitive2D(
aTransform,
- Primitive2DSequence(&xModifiedColor, 1)));
+ Primitive2DContainer { xModifiedColor }));
// add original, too
aRetval[1] = Primitive2DReference(new GroupPrimitive2D(getTextContent()));
@@ -133,7 +133,7 @@ namespace drawinglayer
{
// create transform primitives in all directions
basegfx::B2DHomMatrix aTransform;
- aRetval.realloc(9);
+ aRetval.resize(9);
aTransform.set(0, 2, aDistance.getX());
aTransform.set(1, 2, 0.0);
@@ -184,7 +184,7 @@ namespace drawinglayer
}
TextEffectPrimitive2D::TextEffectPrimitive2D(
- const Primitive2DSequence& rTextContent,
+ const Primitive2DContainer& rTextContent,
const basegfx::B2DPoint& rRotationCenter,
double fDirection,
TextEffectStyle2D eTextEffectStyle2D)
@@ -218,26 +218,26 @@ namespace drawinglayer
// then will ask 9 times at nearly the same content. This may even be refined here using the
// TextEffectStyle information, e.g. for TEXTEFFECTSTYLE2D_RELIEF the grow needs only to
// be in two directions
- basegfx::B2DRange aRetval(getB2DRangeFromPrimitive2DSequence(getTextContent(), rViewInformation));
+ basegfx::B2DRange aRetval(getTextContent().getB2DRange(rViewInformation));
aRetval.grow(fDiscreteSize);
return aRetval;
}
- Primitive2DSequence TextEffectPrimitive2D::get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const
+ Primitive2DContainer TextEffectPrimitive2D::get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const
{
::osl::MutexGuard aGuard( m_aMutex );
- if(getBuffered2DDecomposition().hasElements())
+ if(!getBuffered2DDecomposition().empty())
{
if(maLastObjectToViewTransformation != rViewInformation.getObjectToViewTransformation())
{
// conditions of last local decomposition have changed, delete
- const_cast< TextEffectPrimitive2D* >(this)->setBuffered2DDecomposition(Primitive2DSequence());
+ const_cast< TextEffectPrimitive2D* >(this)->setBuffered2DDecomposition(Primitive2DContainer());
}
}
- if(!getBuffered2DDecomposition().hasElements())
+ if(getBuffered2DDecomposition().empty())
{
// remember ViewRange and ViewTransformation
const_cast< TextEffectPrimitive2D* >(this)->maLastObjectToViewTransformation = rViewInformation.getObjectToViewTransformation();
diff --git a/drawinglayer/source/primitive2d/texthierarchyprimitive2d.cxx b/drawinglayer/source/primitive2d/texthierarchyprimitive2d.cxx
index f69d4766d014..71e0e03df636 100644
--- a/drawinglayer/source/primitive2d/texthierarchyprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/texthierarchyprimitive2d.cxx
@@ -30,7 +30,7 @@ namespace drawinglayer
{
namespace primitive2d
{
- TextHierarchyLinePrimitive2D::TextHierarchyLinePrimitive2D(const Primitive2DSequence& rChildren)
+ TextHierarchyLinePrimitive2D::TextHierarchyLinePrimitive2D(const Primitive2DContainer& rChildren)
: GroupPrimitive2D(rChildren)
{
}
@@ -47,7 +47,7 @@ namespace drawinglayer
{
namespace primitive2d
{
- TextHierarchyParagraphPrimitive2D::TextHierarchyParagraphPrimitive2D(const Primitive2DSequence& rChildren)
+ TextHierarchyParagraphPrimitive2D::TextHierarchyParagraphPrimitive2D(const Primitive2DContainer& rChildren)
: GroupPrimitive2D(rChildren)
{
}
@@ -64,7 +64,7 @@ namespace drawinglayer
{
namespace primitive2d
{
- TextHierarchyBulletPrimitive2D::TextHierarchyBulletPrimitive2D(const Primitive2DSequence& rChildren)
+ TextHierarchyBulletPrimitive2D::TextHierarchyBulletPrimitive2D(const Primitive2DContainer& rChildren)
: GroupPrimitive2D(rChildren)
{
}
@@ -81,7 +81,7 @@ namespace drawinglayer
{
namespace primitive2d
{
- TextHierarchyBlockPrimitive2D::TextHierarchyBlockPrimitive2D(const Primitive2DSequence& rChildren)
+ TextHierarchyBlockPrimitive2D::TextHierarchyBlockPrimitive2D(const Primitive2DContainer& rChildren)
: GroupPrimitive2D(rChildren)
{
}
@@ -99,7 +99,7 @@ namespace drawinglayer
namespace primitive2d
{
TextHierarchyFieldPrimitive2D::TextHierarchyFieldPrimitive2D(
- const Primitive2DSequence& rChildren,
+ const Primitive2DContainer& rChildren,
const FieldType& rFieldType,
const OUString& rString)
: GroupPrimitive2D(rChildren),
@@ -132,7 +132,7 @@ namespace drawinglayer
{
namespace primitive2d
{
- TextHierarchyEditPrimitive2D::TextHierarchyEditPrimitive2D(const Primitive2DSequence& rChildren)
+ TextHierarchyEditPrimitive2D::TextHierarchyEditPrimitive2D(const Primitive2DContainer& rChildren)
: GroupPrimitive2D(rChildren)
{
}
diff --git a/drawinglayer/source/primitive2d/textlineprimitive2d.cxx b/drawinglayer/source/primitive2d/textlineprimitive2d.cxx
index e5d58548766b..1c3c25f55dd2 100644
--- a/drawinglayer/source/primitive2d/textlineprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/textlineprimitive2d.cxx
@@ -31,9 +31,9 @@ namespace drawinglayer
{
namespace primitive2d
{
- Primitive2DSequence TextLinePrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const
+ Primitive2DContainer TextLinePrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const
{
- Primitive2DSequence xRetval;
+ Primitive2DContainer xRetval;
if(TEXT_LINE_NONE != getTextLine())
{
@@ -219,7 +219,7 @@ namespace drawinglayer
}
// add primitive
- appendPrimitive2DReferenceToPrimitive2DSequence(xRetval, aNewPrimitive);
+ xRetval.push_back(aNewPrimitive);
if(bDoubleLine)
{
@@ -245,9 +245,8 @@ namespace drawinglayer
aTransform.translate(aTranslate.getX(), aTranslate.getY());
// add transform primitive
- const Primitive2DSequence aContent(&aNewPrimitive, 1);
- appendPrimitive2DReferenceToPrimitive2DSequence(xRetval,
- Primitive2DReference(new TransformPrimitive2D(aTransform, aContent)));
+ const Primitive2DContainer aContent { aNewPrimitive };
+ xRetval.push_back( Primitive2DReference(new TransformPrimitive2D(aTransform, aContent)));
}
}
diff --git a/drawinglayer/source/primitive2d/textprimitive2d.cxx b/drawinglayer/source/primitive2d/textprimitive2d.cxx
index 43aaa2bc0758..b8adefb3baf9 100644
--- a/drawinglayer/source/primitive2d/textprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/textprimitive2d.cxx
@@ -167,9 +167,9 @@ namespace drawinglayer
}
}
- Primitive2DSequence TextSimplePortionPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const
+ Primitive2DContainer TextSimplePortionPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const
{
- Primitive2DSequence aRetval;
+ Primitive2DContainer aRetval;
if(getTextLength())
{
@@ -185,7 +185,7 @@ namespace drawinglayer
if(nCount)
{
// alloc space for the primitives
- aRetval.realloc(nCount);
+ aRetval.resize(nCount);
// color-filled polypolygons
for(sal_uInt32 a(0L); a < nCount; a++)
@@ -210,7 +210,7 @@ namespace drawinglayer
fRotate,
TEXTEFFECTSTYLE2D_OUTLINE));
- aRetval = Primitive2DSequence(&aNewTextEffect, 1);
+ aRetval = Primitive2DContainer { aNewTextEffect };
}
}
}
diff --git a/drawinglayer/source/primitive2d/textstrikeoutprimitive2d.cxx b/drawinglayer/source/primitive2d/textstrikeoutprimitive2d.cxx
index b65c54cbc6bc..fc518d1ac9a1 100644
--- a/drawinglayer/source/primitive2d/textstrikeoutprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/textstrikeoutprimitive2d.cxx
@@ -66,7 +66,7 @@ namespace drawinglayer
{
namespace primitive2d
{
- Primitive2DSequence TextCharacterStrikeoutPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const
+ Primitive2DContainer TextCharacterStrikeoutPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const
{
// strikeout with character
const OUString aSingleCharString(getStrikeoutChar());
@@ -108,7 +108,7 @@ namespace drawinglayer
getLocale(),
getFontColor()));
- return Primitive2DSequence(&xReference, 1);
+ return Primitive2DContainer { xReference };
}
TextCharacterStrikeoutPrimitive2D::TextCharacterStrikeoutPrimitive2D(
@@ -151,7 +151,7 @@ namespace drawinglayer
{
namespace primitive2d
{
- Primitive2DSequence TextGeometryStrikeoutPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const
+ Primitive2DContainer TextGeometryStrikeoutPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const
{
OSL_ENSURE(TEXT_STRIKEOUT_SLASH != getTextStrikeout() && TEXT_STRIKEOUT_X != getTextStrikeout(),
"Wrong TEXT_STRIKEOUT type; a TextCharacterStrikeoutPrimitive2D should be used (!)");
@@ -205,7 +205,7 @@ namespace drawinglayer
// add primitive
const attribute::LineAttribute aLineAttribute(getFontColor(), fStrikeoutHeight, basegfx::B2DLineJoin::NONE);
- Primitive2DSequence xRetval(1);
+ Primitive2DContainer xRetval(1);
xRetval[0] = Primitive2DReference(new PolygonStrokePrimitive2D(aStrikeoutLine, aLineAttribute));
if(bDoubleLine)
@@ -227,7 +227,7 @@ namespace drawinglayer
aTransform.translate(aTranslate.getX(), aTranslate.getY());
// add transform primitive
- appendPrimitive2DReferenceToPrimitive2DSequence(xRetval,
+ xRetval.push_back(
Primitive2DReference(
new TransformPrimitive2D(
aTransform,
diff --git a/drawinglayer/source/primitive2d/transformprimitive2d.cxx b/drawinglayer/source/primitive2d/transformprimitive2d.cxx
index b70c0b6a4d67..b1d5cbf53a6b 100644
--- a/drawinglayer/source/primitive2d/transformprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/transformprimitive2d.cxx
@@ -33,7 +33,7 @@ namespace drawinglayer
{
TransformPrimitive2D::TransformPrimitive2D(
const basegfx::B2DHomMatrix& rTransformation,
- const Primitive2DSequence& rChildren)
+ const Primitive2DContainer& rChildren)
: GroupPrimitive2D(rChildren),
maTransformation(rTransformation)
{
@@ -53,7 +53,7 @@ namespace drawinglayer
basegfx::B2DRange TransformPrimitive2D::getB2DRange(const geometry::ViewInformation2D& rViewInformation) const
{
- basegfx::B2DRange aRetval(getB2DRangeFromPrimitive2DSequence(getChildren(), rViewInformation));
+ basegfx::B2DRange aRetval(getChildren().getB2DRange(rViewInformation));
aRetval.transform(getTransformation());
return aRetval;
}
diff --git a/drawinglayer/source/primitive2d/transparenceprimitive2d.cxx b/drawinglayer/source/primitive2d/transparenceprimitive2d.cxx
index 193674d9ad8e..fe6ba1cb5521 100644
--- a/drawinglayer/source/primitive2d/transparenceprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/transparenceprimitive2d.cxx
@@ -31,8 +31,8 @@ namespace drawinglayer
namespace primitive2d
{
TransparencePrimitive2D::TransparencePrimitive2D(
- const Primitive2DSequence& rChildren,
- const Primitive2DSequence& rTransparence)
+ const Primitive2DContainer& rChildren,
+ const Primitive2DContainer& rTransparence)
: GroupPrimitive2D(rChildren),
maTransparence(rTransparence)
{
diff --git a/drawinglayer/source/primitive2d/unifiedtransparenceprimitive2d.cxx b/drawinglayer/source/primitive2d/unifiedtransparenceprimitive2d.cxx
index 111ecda61cd4..595d33670738 100644
--- a/drawinglayer/source/primitive2d/unifiedtransparenceprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/unifiedtransparenceprimitive2d.cxx
@@ -37,7 +37,7 @@ namespace drawinglayer
namespace primitive2d
{
UnifiedTransparencePrimitive2D::UnifiedTransparencePrimitive2D(
- const Primitive2DSequence& rChildren,
+ const Primitive2DContainer& rChildren,
double fTransparence)
: GroupPrimitive2D(rChildren),
mfTransparence(fTransparence)
@@ -60,10 +60,10 @@ namespace drawinglayer
{
// do not use the fallback to decomposition here since for a correct BoundRect we also
// need invisible (1.0 == getTransparence()) geometry; these would be deleted in the decomposition
- return getB2DRangeFromPrimitive2DSequence(getChildren(), rViewInformation);
+ return getChildren().getB2DRange( rViewInformation);
}
- Primitive2DSequence UnifiedTransparencePrimitive2D::get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const
+ Primitive2DContainer UnifiedTransparencePrimitive2D::get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const
{
if(0.0 == getTransparence())
{
@@ -88,22 +88,22 @@ namespace drawinglayer
// I will take the last one here. The small overhead of two primitives will only be
// used when UnifiedTransparencePrimitive2D is not handled directly.
- const basegfx::B2DRange aPolygonRange(getB2DRangeFromPrimitive2DSequence(getChildren(), rViewInformation));
+ const basegfx::B2DRange aPolygonRange(getChildren().getB2DRange(rViewInformation));
const basegfx::B2DPolygon aPolygon(basegfx::tools::createPolygonFromRect(aPolygonRange));
const basegfx::BColor aGray(getTransparence(), getTransparence(), getTransparence());
- Primitive2DSequence aTransparenceContent(2);
+ Primitive2DContainer aTransparenceContent(2);
aTransparenceContent[0] = Primitive2DReference(new PolyPolygonColorPrimitive2D(basegfx::B2DPolyPolygon(aPolygon), aGray));
aTransparenceContent[1] = Primitive2DReference(new PolygonHairlinePrimitive2D(aPolygon, aGray));
// create sub-transparence group with a gray-colored rectangular fill polygon
const Primitive2DReference xRefB(new TransparencePrimitive2D(getChildren(), aTransparenceContent));
- return Primitive2DSequence(&xRefB, 1L);
+ return Primitive2DContainer { xRefB };
}
else
{
// completely transparent or invalid definition, add nothing
- return Primitive2DSequence();
+ return Primitive2DContainer();
}
}
diff --git a/drawinglayer/source/primitive2d/wallpaperprimitive2d.cxx b/drawinglayer/source/primitive2d/wallpaperprimitive2d.cxx
index 4f631c9788f1..2c4e9b14103a 100644
--- a/drawinglayer/source/primitive2d/wallpaperprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/wallpaperprimitive2d.cxx
@@ -33,9 +33,9 @@ namespace drawinglayer
{
namespace primitive2d
{
- Primitive2DSequence WallpaperBitmapPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const
+ Primitive2DContainer WallpaperBitmapPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const
{
- Primitive2DSequence aRetval;
+ Primitive2DContainer aRetval;
if(!getLocalObjectRange().isEmpty() && !getBitmapEx().IsEmpty())
{
@@ -59,7 +59,7 @@ namespace drawinglayer
getBitmapEx(),
aObjectTransform));
- aRetval = Primitive2DSequence(&xReference, 1);
+ aRetval = Primitive2DContainer { xReference };
}
else
{
@@ -157,7 +157,7 @@ namespace drawinglayer
new BitmapPrimitive2D(
getBitmapEx(),
aObjectTransform));
- aRetval = Primitive2DSequence(&xReference, 1);
+ aRetval = Primitive2DContainer { xReference };
// clip when not completely inside object range
bNeedsClipping = !getLocalObjectRange().isInside(aTargetRange);
@@ -194,7 +194,7 @@ namespace drawinglayer
new drawinglayer::primitive2d::FillGraphicPrimitive2D(
aObjectTransform,
aFillGraphicAttribute));
- aRetval = Primitive2DSequence(&xFillBitmap, 1);
+ aRetval = Primitive2DContainer { xFillBitmap };
// always embed tiled fill to clipping
bNeedsClipping = true;
@@ -209,7 +209,7 @@ namespace drawinglayer
new drawinglayer::primitive2d::MaskPrimitive2D(
aPolyPolygon,
aRetval));
- aRetval = Primitive2DSequence(&xClippedFill, 1);
+ aRetval = Primitive2DContainer { xClippedFill };
}
}
}
diff --git a/drawinglayer/source/primitive2d/wrongspellprimitive2d.cxx b/drawinglayer/source/primitive2d/wrongspellprimitive2d.cxx
index e488422a653e..cfc9478b4660 100644
--- a/drawinglayer/source/primitive2d/wrongspellprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/wrongspellprimitive2d.cxx
@@ -29,7 +29,7 @@ namespace drawinglayer
{
namespace primitive2d
{
- Primitive2DSequence WrongSpellPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const
+ Primitive2DContainer WrongSpellPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const
{
// ATM this decompose is view-independent, what the original VCL-Display is not. To mimic
// the old behaviour here if wanted it is necessary to add get2DDecomposition and implement
@@ -68,7 +68,7 @@ namespace drawinglayer
// create the waveline primitive
Primitive2DReference xPrimitive(new PolygonWavePrimitive2D(aPolygon, aLineAttribute, fWaveWidth, 0.5 * fWaveWidth));
- Primitive2DSequence xRetval(&xPrimitive, 1);
+ Primitive2DContainer xRetval { xPrimitive };
return xRetval;
}
diff --git a/drawinglayer/source/processor2d/baseprocessor2d.cxx b/drawinglayer/source/processor2d/baseprocessor2d.cxx
index d5d4ea492bcc..49b2d551b2f3 100644
--- a/drawinglayer/source/processor2d/baseprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/baseprocessor2d.cxx
@@ -18,6 +18,7 @@
*/
#include <drawinglayer/processor2d/baseprocessor2d.hxx>
+#include <comphelper/sequence.hxx>
@@ -42,11 +43,11 @@ namespace drawinglayer
{
}
- void BaseProcessor2D::process(const primitive2d::Primitive2DSequence& rSource)
+ void BaseProcessor2D::process(const primitive2d::Primitive2DContainer& rSource)
{
- if(rSource.hasElements())
+ if(!rSource.empty())
{
- const sal_Int32 nCount(rSource.getLength());
+ const sal_Int32 nCount(rSource.size());
for(sal_Int32 a(0L); a < nCount; a++)
{
@@ -67,7 +68,7 @@ namespace drawinglayer
{
// unknown implementation, use UNO API call instead and process recursively
const uno::Sequence< beans::PropertyValue >& rViewParameters(getViewInformation2D().getViewInformationSequence());
- process(xReference->getDecomposition(rViewParameters));
+ process(comphelper::sequenceToContainer<primitive2d::Primitive2DContainer>(xReference->getDecomposition(rViewParameters)));
}
}
}
diff --git a/drawinglayer/source/processor2d/contourextractor2d.cxx b/drawinglayer/source/processor2d/contourextractor2d.cxx
index 62896bb13331..8ea370b3162e 100644
--- a/drawinglayer/source/processor2d/contourextractor2d.cxx
+++ b/drawinglayer/source/processor2d/contourextractor2d.cxx
@@ -149,17 +149,17 @@ namespace drawinglayer
{
// 2D Scene primitive containing 3D stuff; extract 2D contour in world coordinates
const primitive2d::ScenePrimitive2D& rScenePrimitive2DCandidate(static_cast< const primitive2d::ScenePrimitive2D& >(rCandidate));
- const primitive2d::Primitive2DSequence xExtracted2DSceneGeometry(rScenePrimitive2DCandidate.getGeometry2D());
- const primitive2d::Primitive2DSequence xExtracted2DSceneShadow(rScenePrimitive2DCandidate.getShadow2D(getViewInformation2D()));
+ const primitive2d::Primitive2DContainer xExtracted2DSceneGeometry(rScenePrimitive2DCandidate.getGeometry2D());
+ const primitive2d::Primitive2DContainer xExtracted2DSceneShadow(rScenePrimitive2DCandidate.getShadow2D(getViewInformation2D()));
// process content
- if(xExtracted2DSceneGeometry.hasElements())
+ if(!xExtracted2DSceneGeometry.empty())
{
process(xExtracted2DSceneGeometry);
}
// process content
- if(xExtracted2DSceneShadow.hasElements())
+ if(!xExtracted2DSceneShadow.empty())
{
process(xExtracted2DSceneShadow);
}
diff --git a/drawinglayer/source/processor2d/hittestprocessor2d.cxx b/drawinglayer/source/processor2d/hittestprocessor2d.cxx
index 4e59773a9cb0..cda04f3df7a8 100644
--- a/drawinglayer/source/processor2d/hittestprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/hittestprocessor2d.cxx
@@ -506,9 +506,9 @@ namespace drawinglayer
// so force this primitive to process its children directly if the switch is set
// (which is the default). Else, ignore invisible content
const primitive2d::HiddenGeometryPrimitive2D& rHiddenGeometry(static_cast< const primitive2d::HiddenGeometryPrimitive2D& >(rCandidate));
- const primitive2d::Primitive2DSequence& rChildren = rHiddenGeometry.getChildren();
+ const primitive2d::Primitive2DContainer& rChildren = rHiddenGeometry.getChildren();
- if(rChildren.hasElements())
+ if(!rChildren.empty())
{
if(getUseInvisiblePrimitiveContent())
{
diff --git a/drawinglayer/source/processor2d/textaspolygonextractor2d.cxx b/drawinglayer/source/processor2d/textaspolygonextractor2d.cxx
index 1805d23a05c0..14e2df882867 100644
--- a/drawinglayer/source/processor2d/textaspolygonextractor2d.cxx
+++ b/drawinglayer/source/processor2d/textaspolygonextractor2d.cxx
@@ -161,7 +161,7 @@ namespace drawinglayer
{
const primitive2d::ModifiedColorPrimitive2D& rModifiedColorCandidate(static_cast< const primitive2d::ModifiedColorPrimitive2D& >(rCandidate));
- if(rModifiedColorCandidate.getChildren().hasElements())
+ if(!rModifiedColorCandidate.getChildren().empty())
{
maBColorModifierStack.push(rModifiedColorCandidate.getColorModifier());
process(rModifiedColorCandidate.getChildren());
diff --git a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
index 86591ac593c8..f5d97280305f 100644
--- a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
@@ -237,13 +237,13 @@ namespace drawinglayer
namespace processor2d
{
Rectangle VclMetafileProcessor2D::impDumpToMetaFile(
- const primitive2d::Primitive2DSequence& rContent,
+ const primitive2d::Primitive2DContainer& rContent,
GDIMetaFile& o_rContentMetafile)
{
// Prepare VDev, MetaFile and connections
OutputDevice* pLastOutputDevice = mpOutputDevice;
GDIMetaFile* pLastMetafile = mpMetaFile;
- basegfx::B2DRange aPrimitiveRange(primitive2d::getB2DRangeFromPrimitive2DSequence(rContent, getViewInformation2D()));
+ basegfx::B2DRange aPrimitiveRange(rContent.getB2DRange(getViewInformation2D()));
// transform primitive range with current transformation (e.g shadow offset)
aPrimitiveRange.transform(maCurrentTransformation);
@@ -1006,7 +1006,7 @@ namespace drawinglayer
}
// process recursively
- const primitive2d::Primitive2DSequence rContent = rFieldPrimitive.get2DDecomposition(getViewInformation2D());
+ const primitive2d::Primitive2DContainer rContent = rFieldPrimitive.get2DDecomposition(getViewInformation2D());
process(rContent);
// for the end comment the type is not relevant yet, they are all the same. Just add.
@@ -1015,7 +1015,7 @@ namespace drawinglayer
if(mpPDFExtOutDevData && drawinglayer::primitive2d::FIELD_TYPE_URL == rFieldPrimitive.getType())
{
// emulate data handling from ImpEditEngine::Paint
- const basegfx::B2DRange aViewRange(primitive2d::getB2DRangeFromPrimitive2DSequence(rContent, getViewInformation2D()));
+ const basegfx::B2DRange aViewRange(rContent.getB2DRange(getViewInformation2D()));
const Rectangle aRectLogic(
(sal_Int32)floor(aViewRange.getMinX()), (sal_Int32)floor(aViewRange.getMinY()),
(sal_Int32)ceil(aViewRange.getMaxX()), (sal_Int32)ceil(aViewRange.getMaxY()));
@@ -1476,7 +1476,7 @@ namespace drawinglayer
aLocalPolyPolygon,
rHatchCandidate.getBackgroundColor()));
- process(primitive2d::Primitive2DSequence(&xBackground, 1));
+ process(primitive2d::Primitive2DContainer { xBackground });
}
SvtGraphicFill* pSvtGraphicFill = nullptr;
@@ -1752,7 +1752,7 @@ namespace drawinglayer
// mask group. Special handling for MetaFiles.
const primitive2d::MaskPrimitive2D& rMaskCandidate = static_cast< const primitive2d::MaskPrimitive2D& >(rCandidate);
- if(rMaskCandidate.getChildren().hasElements())
+ if(!rMaskCandidate.getChildren().empty())
{
basegfx::B2DPolyPolygon aMask(rMaskCandidate.getMask());
@@ -1820,9 +1820,9 @@ namespace drawinglayer
// - uses DrawTransparent for single PolyPoylgons directly. Can be detected by
// checking the content for single PolyPolygonColorPrimitive2D
const primitive2d::UnifiedTransparencePrimitive2D& rUniTransparenceCandidate = static_cast< const primitive2d::UnifiedTransparencePrimitive2D& >(rCandidate);
- const primitive2d::Primitive2DSequence rContent = rUniTransparenceCandidate.getChildren();
+ const primitive2d::Primitive2DContainer rContent = rUniTransparenceCandidate.getChildren();
- if(rContent.hasElements())
+ if(!rContent.empty())
{
if(0.0 == rUniTransparenceCandidate.getTransparence())
{
@@ -1836,7 +1836,7 @@ namespace drawinglayer
const primitive2d::PolyPolygonColorPrimitive2D* pPoPoColor = nullptr;
static bool bForceToMetafile(false);
- if(!bForceToMetafile && 1 == rContent.getLength())
+ if(!bForceToMetafile && 1 == rContent.size())
{
const primitive2d::Primitive2DReference xReference(rContent[0]);
pPoPoColor = dynamic_cast< const primitive2d::PolyPolygonColorPrimitive2D* >(xReference.get());
@@ -1960,17 +1960,17 @@ namespace drawinglayer
// If that detection goes wrong, I have to create an transparence-blended bitmap. Eventually
// do that in stripes, else RenderTransparencePrimitive2D may just be used
const primitive2d::TransparencePrimitive2D& rTransparenceCandidate = static_cast< const primitive2d::TransparencePrimitive2D& >(rCandidate);
- const primitive2d::Primitive2DSequence rContent = rTransparenceCandidate.getChildren();
- const primitive2d::Primitive2DSequence rTransparence = rTransparenceCandidate.getTransparence();
+ const primitive2d::Primitive2DContainer& rContent = rTransparenceCandidate.getChildren();
+ const primitive2d::Primitive2DContainer& rTransparence = rTransparenceCandidate.getTransparence();
- if(rContent.hasElements() && rTransparence.hasElements())
+ if(!rContent.empty() && !rTransparence.empty())
{
// try to identify a single FillGradientPrimitive2D in the
// transparence part of the primitive
const primitive2d::FillGradientPrimitive2D* pFiGradient = nullptr;
static bool bForceToBigTransparentVDev(false);
- if(!bForceToBigTransparentVDev && 1 == rTransparence.getLength())
+ if(!bForceToBigTransparentVDev && 1 == rTransparence.size())
{
const primitive2d::Primitive2DReference xReference(rTransparence[0]);
pFiGradient = dynamic_cast< const primitive2d::FillGradientPrimitive2D* >(xReference.get());
@@ -2007,7 +2007,7 @@ namespace drawinglayer
// transparence primitives with non-trivial transparence content) i will for now not
// refine to tiling here.
- basegfx::B2DRange aViewRange(primitive2d::getB2DRangeFromPrimitive2DSequence(rContent, getViewInformation2D()));
+ basegfx::B2DRange aViewRange(rContent.getB2DRange(getViewInformation2D()));
aViewRange.transform(maCurrentTransformation);
const Rectangle aRectLogic(
(sal_Int32)floor(aViewRange.getMinX()), (sal_Int32)floor(aViewRange.getMinY()),
diff --git a/drawinglayer/source/processor2d/vclmetafileprocessor2d.hxx b/drawinglayer/source/processor2d/vclmetafileprocessor2d.hxx
index 0f7c71ff38e8..80fce399dd34 100644
--- a/drawinglayer/source/processor2d/vclmetafileprocessor2d.hxx
+++ b/drawinglayer/source/processor2d/vclmetafileprocessor2d.hxx
@@ -74,7 +74,7 @@ namespace drawinglayer
private:
/// local helper(s)
Rectangle impDumpToMetaFile(
- const primitive2d::Primitive2DSequence& rContent,
+ const primitive2d::Primitive2DContainer& rContent,
GDIMetaFile& o_rContentMetafile);
void impConvertFillGradientAttributeToVCLGradient(
Gradient& o_rVCLGradient,
diff --git a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
index 8dcd74e77ac5..d955451c0277 100644
--- a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
@@ -867,9 +867,9 @@ namespace drawinglayer
// Detect if a single PolyPolygonColorPrimitive2D is contained; in that case,
// use the faster OutputDevice::DrawTransparent method
const primitive2d::UnifiedTransparencePrimitive2D& rUniTransparenceCandidate = static_cast< const primitive2d::UnifiedTransparencePrimitive2D& >(rCandidate);
- const primitive2d::Primitive2DSequence rContent = rUniTransparenceCandidate.getChildren();
+ const primitive2d::Primitive2DContainer rContent = rUniTransparenceCandidate.getChildren();
- if(rContent.hasElements())
+ if(!rContent.empty())
{
if(0.0 == rUniTransparenceCandidate.getTransparence())
{
@@ -884,7 +884,7 @@ namespace drawinglayer
// natively), so i am now enabling this shortcut
static bool bAllowUsingDrawTransparent(true);
- if(bAllowUsingDrawTransparent && 1 == rContent.getLength())
+ if(bAllowUsingDrawTransparent && 1 == rContent.size())
{
const primitive2d::Primitive2DReference xReference(rContent[0]);
const primitive2d::BasePrimitive2D* pBasePrimitive = dynamic_cast< const primitive2d::BasePrimitive2D* >(xReference.get());
diff --git a/drawinglayer/source/processor2d/vclprocessor2d.cxx b/drawinglayer/source/processor2d/vclprocessor2d.cxx
index b6edfa4a3d7d..2d411f38e14e 100644
--- a/drawinglayer/source/processor2d/vclprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclprocessor2d.cxx
@@ -864,7 +864,7 @@ namespace drawinglayer
// mask group. Force output to VDev and create mask from given mask
void VclProcessor2D::RenderMaskPrimitive2DPixel(const primitive2d::MaskPrimitive2D& rMaskCandidate)
{
- if(rMaskCandidate.getChildren().hasElements())
+ if(!rMaskCandidate.getChildren().empty())
{
basegfx::B2DPolyPolygon aMask(rMaskCandidate.getMask());
@@ -917,7 +917,7 @@ namespace drawinglayer
// modified color group. Force output to unified color.
void VclProcessor2D::RenderModifiedColorPrimitive2D(const primitive2d::ModifiedColorPrimitive2D& rModifiedCandidate)
{
- if(rModifiedCandidate.getChildren().hasElements())
+ if(!rModifiedCandidate.getChildren().empty())
{
maBColorModifierStack.push(rModifiedCandidate.getColorModifier());
process(rModifiedCandidate.getChildren());
@@ -930,7 +930,7 @@ namespace drawinglayer
{
static bool bForceToDecomposition(false);
- if(rTransCandidate.getChildren().hasElements())
+ if(!rTransCandidate.getChildren().empty())
{
if(bForceToDecomposition)
{
@@ -947,7 +947,7 @@ namespace drawinglayer
else if(rTransCandidate.getTransparence() > 0.0 && rTransCandidate.getTransparence() < 1.0)
{
// transparence is in visible range
- basegfx::B2DRange aRange(primitive2d::getB2DRangeFromPrimitive2DSequence(rTransCandidate.getChildren(), getViewInformation2D()));
+ basegfx::B2DRange aRange(rTransCandidate.getChildren().getB2DRange(getViewInformation2D()));
aRange.transform(maCurrentTransformation);
impBufferDevice aBufferDevice(*mpOutputDevice, aRange, true);
@@ -974,9 +974,9 @@ namespace drawinglayer
// sub-transparence group. Draw to VDev first.
void VclProcessor2D::RenderTransparencePrimitive2D(const primitive2d::TransparencePrimitive2D& rTransCandidate)
{
- if(rTransCandidate.getChildren().hasElements())
+ if(!rTransCandidate.getChildren().empty())
{
- basegfx::B2DRange aRange(primitive2d::getB2DRangeFromPrimitive2DSequence(rTransCandidate.getChildren(), getViewInformation2D()));
+ basegfx::B2DRange aRange(rTransCandidate.getChildren().getB2DRange(getViewInformation2D()));
aRange.transform(maCurrentTransformation);
impBufferDevice aBufferDevice(*mpOutputDevice, aRange, true);
diff --git a/drawinglayer/source/processor3d/geometry2dextractor.cxx b/drawinglayer/source/processor3d/geometry2dextractor.cxx
index 82216ac65917..f7155b1dc335 100644
--- a/drawinglayer/source/processor3d/geometry2dextractor.cxx
+++ b/drawinglayer/source/processor3d/geometry2dextractor.cxx
@@ -94,7 +94,7 @@ namespace drawinglayer
a2DHairline.transform(getObjectTransformation());
const basegfx::BColor aModifiedColor(maBColorModifierStack.getModifiedColor(rPrimitive.getBColor()));
const primitive2d::Primitive2DReference xRef(new primitive2d::PolygonHairlinePrimitive2D(a2DHairline, aModifiedColor));
- primitive2d::appendPrimitive2DReferenceToPrimitive2DSequence(maPrimitive2DSequence, xRef);
+ maPrimitive2DSequence.push_back(xRef);
}
break;
}
@@ -109,7 +109,7 @@ namespace drawinglayer
a2DFill.transform(getObjectTransformation());
const basegfx::BColor aModifiedColor(maBColorModifierStack.getModifiedColor(rPrimitive.getMaterial().getColor()));
const primitive2d::Primitive2DReference xRef(new primitive2d::PolyPolygonColorPrimitive2D(a2DFill, aModifiedColor));
- primitive2d::appendPrimitive2DReferenceToPrimitive2DSequence(maPrimitive2DSequence, xRef);
+ maPrimitive2DSequence.push_back(xRef);
}
break;
}
diff --git a/drawinglayer/source/processor3d/shadow3dextractor.cxx b/drawinglayer/source/processor3d/shadow3dextractor.cxx
index 7598fe44bc53..0235d530dd2d 100644
--- a/drawinglayer/source/processor3d/shadow3dextractor.cxx
+++ b/drawinglayer/source/processor3d/shadow3dextractor.cxx
@@ -53,8 +53,8 @@ namespace drawinglayer
const primitive3d::ShadowPrimitive3D& rPrimitive = static_cast< const primitive3d::ShadowPrimitive3D& >(rCandidate);
// set new target
- primitive2d::Primitive2DVector aNewSubList;
- primitive2d::Primitive2DVector* pLastTargetSequence = mpPrimitive2DSequence;
+ primitive2d::Primitive2DContainer aNewSubList;
+ primitive2d::Primitive2DContainer* pLastTargetSequence = mpPrimitive2DSequence;
mpPrimitive2DSequence = &aNewSubList;
// activate convert
@@ -78,13 +78,13 @@ namespace drawinglayer
primitive2d::BasePrimitive2D* pNew = new primitive2d::ShadowPrimitive2D(
rPrimitive.getShadowTransform(),
rPrimitive.getShadowColor(),
- primitive2d::Primitive2DVectorToPrimitive2DSequence(aNewSubList));
+ aNewSubList);
if(basegfx::fTools::more(rPrimitive.getShadowTransparence(), 0.0))
{
// create simpleTransparencePrimitive, add created primitives
const primitive2d::Primitive2DReference xRef(pNew);
- const primitive2d::Primitive2DSequence aNewTransPrimitiveVector(&xRef, 1);
+ const primitive2d::Primitive2DContainer aNewTransPrimitiveVector { xRef };
pNew = new primitive2d::UnifiedTransparencePrimitive2D(
aNewTransPrimitiveVector,
@@ -253,10 +253,6 @@ namespace drawinglayer
{
OSL_ENSURE(0 == maPrimitive2DSequence.size(),
"OOps, someone used Shadow3DExtractingProcessor, but did not fetch the results (!)");
- for(size_t a(0); a < maPrimitive2DSequence.size(); a++)
- {
- delete maPrimitive2DSequence[a];
- }
}
basegfx::B2DPolygon Shadow3DExtractingProcessor::impDoShadowProjection(const basegfx::B3DPolygon& rSource)
@@ -300,9 +296,9 @@ namespace drawinglayer
return aRetval;
}
- const primitive2d::Primitive2DSequence Shadow3DExtractingProcessor::getPrimitive2DSequence() const
+ const primitive2d::Primitive2DContainer& Shadow3DExtractingProcessor::getPrimitive2DSequence() const
{
- return Primitive2DVectorToPrimitive2DSequence(maPrimitive2DSequence);
+ return maPrimitive2DSequence;
}
} // end of namespace processor3d
diff --git a/drawinglayer/source/tools/converters.cxx b/drawinglayer/source/tools/converters.cxx
index c903a5f5f31e..5fc04550cf05 100644
--- a/drawinglayer/source/tools/converters.cxx
+++ b/drawinglayer/source/tools/converters.cxx
@@ -37,7 +37,7 @@ namespace drawinglayer
namespace tools
{
BitmapEx convertToBitmapEx(
- const drawinglayer::primitive2d::Primitive2DSequence& rSeq,
+ const drawinglayer::primitive2d::Primitive2DContainer& rSeq,
const geometry::ViewInformation2D& rViewInformation2D,
sal_uInt32 nDiscreteWidth,
sal_uInt32 nDiscreteHeight,
@@ -48,12 +48,12 @@ namespace drawinglayer
static bool bDoSaveForVisualControl(false);
#endif
- if(rSeq.hasElements() && nDiscreteWidth && nDiscreteHeight)
+ if(!rSeq.empty() && nDiscreteWidth && nDiscreteHeight)
{
// get destination size in pixels
const MapMode aMapModePixel(MAP_PIXEL);
const sal_uInt32 nViewVisibleArea(nDiscreteWidth * nDiscreteHeight);
- drawinglayer::primitive2d::Primitive2DSequence aSequence(rSeq);
+ drawinglayer::primitive2d::Primitive2DContainer aSequence(rSeq);
if(nViewVisibleArea > nMaxQuadratPixels)
{
@@ -67,7 +67,7 @@ namespace drawinglayer
basegfx::tools::createScaleB2DHomMatrix(fReduceFactor, fReduceFactor),
rSeq));
- aSequence = drawinglayer::primitive2d::Primitive2DSequence(&aEmbed, 1);
+ aSequence = drawinglayer::primitive2d::Primitive2DContainer { aEmbed };
}
const Point aEmptyPoint;
@@ -120,7 +120,7 @@ namespace drawinglayer
basegfx::BColorModifierSharedPtr(
new basegfx::BColorModifier_replace(
basegfx::BColor(0.0, 0.0, 0.0)))));
- const primitive2d::Primitive2DSequence xSeq(&xRef, 1);
+ const primitive2d::Primitive2DContainer xSeq { xRef };
// render
pContentProcessor->process(xSeq);
diff --git a/include/drawinglayer/primitive2d/animatedprimitive2d.hxx b/include/drawinglayer/primitive2d/animatedprimitive2d.hxx
index 9e13a8e60584..38ae5623b512 100644
--- a/include/drawinglayer/primitive2d/animatedprimitive2d.hxx
+++ b/include/drawinglayer/primitive2d/animatedprimitive2d.hxx
@@ -71,7 +71,7 @@ namespace drawinglayer
/// constructor
AnimatedSwitchPrimitive2D(
const animation::AnimationEntry& rAnimationEntry,
- const Primitive2DSequence& rChildren,
+ const Primitive2DContainer& rChildren,
bool bIsTextAnimation);
/// destructor - needed due to mpAnimationEntry
@@ -92,7 +92,7 @@ namespace drawinglayer
depends on the point in time, so the default implementation is
not useful here, it needs to be handled locally
*/
- virtual Primitive2DSequence get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
+ virtual Primitive2DContainer get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
};
} // end of namespace primitive2d
} // end of namespace drawinglayer
@@ -116,11 +116,11 @@ namespace drawinglayer
/// constructor
AnimatedBlinkPrimitive2D(
const animation::AnimationEntry& rAnimationEntry,
- const Primitive2DSequence& rChildren,
+ const Primitive2DContainer& rChildren,
bool bIsTextAnimation);
/// create local decomposition
- virtual Primitive2DSequence get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
+ virtual Primitive2DContainer get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
/// provide unique ID
DeclPrimitive2DIDBlock()
@@ -153,11 +153,11 @@ namespace drawinglayer
AnimatedInterpolatePrimitive2D(
const std::vector< basegfx::B2DHomMatrix >& rmMatrixStack,
const animation::AnimationEntry& rAnimationEntry,
- const Primitive2DSequence& rChildren,
+ const Primitive2DContainer& rChildren,
bool bIsTextAnimation);
/// create local decomposition
- virtual Primitive2DSequence get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
+ virtual Primitive2DContainer get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
/// provide unique ID
DeclPrimitive2DIDBlock()
diff --git a/include/drawinglayer/primitive2d/backgroundcolorprimitive2d.hxx b/include/drawinglayer/primitive2d/backgroundcolorprimitive2d.hxx
index e58d31c5fbdc..e712ffe18080 100644
--- a/include/drawinglayer/primitive2d/backgroundcolorprimitive2d.hxx
+++ b/include/drawinglayer/primitive2d/backgroundcolorprimitive2d.hxx
@@ -55,7 +55,7 @@ namespace drawinglayer
protected:
/// create local decomposition
- virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
+ virtual Primitive2DContainer create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
public:
/// constructor
@@ -77,7 +77,7 @@ namespace drawinglayer
DeclPrimitive2DIDBlock()
/// Override standard getDecomposition call to be view-dependent here
- virtual Primitive2DSequence get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
+ virtual Primitive2DContainer get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
};
} // end of namespace primitive2d
} // end of namespace drawinglayer
diff --git a/include/drawinglayer/primitive2d/baseprimitive2d.hxx b/include/drawinglayer/primitive2d/baseprimitive2d.hxx
index 860b9a422c99..c21c59cb51c0 100644
--- a/include/drawinglayer/primitive2d/baseprimitive2d.hxx
+++ b/include/drawinglayer/primitive2d/baseprimitive2d.hxx
@@ -52,6 +52,24 @@ namespace drawinglayer { namespace primitive2d {
typedef cppu::WeakComponentImplHelper1< css::graphic::XPrimitive2D > BasePrimitive2DImplBase;
typedef css::uno::Reference< css::graphic::XPrimitive2D > Primitive2DReference;
typedef css::uno::Sequence< Primitive2DReference > Primitive2DSequence;
+
+
+ class DRAWINGLAYER_DLLPUBLIC SAL_WARN_UNUSED Primitive2DContainer : public std::vector< Primitive2DReference >
+ {
+ public:
+ explicit Primitive2DContainer() {}
+ explicit Primitive2DContainer( size_type count ) : std::vector< Primitive2DReference >(count) {}
+ Primitive2DContainer( const Primitive2DContainer& other ) : std::vector< Primitive2DReference >(other) {}
+ Primitive2DContainer( const std::vector< Primitive2DReference >& other ) : std::vector< Primitive2DReference >(other) {}
+ Primitive2DContainer( std::initializer_list<Primitive2DReference> init ) : std::vector< Primitive2DReference >(init) {}
+
+ void append(const Primitive2DContainer& rSource);
+ void append(const Primitive2DSequence& rSource);
+ bool operator==(const Primitive2DContainer& rB) const;
+ bool operator!=(const Primitive2DContainer& rB) const { return !operator==(rB); }
+ basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& aViewInformation) const;
+ Primitive2DContainer maybeInvert(bool bInvert = false) const;
+ };
}}
@@ -163,7 +181,7 @@ namespace drawinglayer
virtual sal_uInt32 getPrimitive2DID() const = 0;
/// The default implementation will return an empty sequence
- virtual Primitive2DSequence get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const;
+ virtual Primitive2DContainer get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const;
// Methods from XPrimitive2D
@@ -223,20 +241,20 @@ namespace drawinglayer
{
private:
/// a sequence used for buffering the last create2DDecomposition() result
- Primitive2DSequence maBuffered2DDecomposition;
+ Primitive2DContainer maBuffered2DDecomposition;
protected:
/** access methods to maBuffered2DDecomposition. The usage of this methods may allow
later thread-safe stuff to be added if needed. Only to be used by getDecomposition()
implementations for buffering the last decomposition.
*/
- const Primitive2DSequence& getBuffered2DDecomposition() const { return maBuffered2DDecomposition; }
- void setBuffered2DDecomposition(const Primitive2DSequence& rNew) { maBuffered2DDecomposition = rNew; }
+ const Primitive2DContainer& getBuffered2DDecomposition() const { return maBuffered2DDecomposition; }
+ void setBuffered2DDecomposition(const Primitive2DContainer& rNew) { maBuffered2DDecomposition = rNew; }
/** method which is to be used to implement the local decomposition of a 2D primitive. The default
implementation will just return an empty decomposition
*/
- virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const;
+ virtual Primitive2DContainer create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const;
public:
// constructor/destructor
@@ -248,7 +266,7 @@ namespace drawinglayer
overridden and the ViewInformation2D for the last decomposition need to be remembered, too, and
be used in the next call to decide if the buffered decomposition may be reused or not.
*/
- virtual Primitive2DSequence get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
+ virtual Primitive2DContainer get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
};
} // end of namespace primitive2d
} // end of namespace drawinglayer
@@ -261,8 +279,7 @@ namespace drawinglayer
namespace primitive2d
{
/// support to handle a sequence of primitives as stl vector and convert it during creation
- typedef ::std::vector< BasePrimitive2D* > Primitive2DVector;
- Primitive2DSequence DRAWINGLAYER_DLLPUBLIC Primitive2DVectorToPrimitive2DSequence(const Primitive2DVector& rSource, bool bInvert = false);
+ Primitive2DSequence DRAWINGLAYER_DLLPUBLIC Primitive2DVectorToPrimitive2DSequence(const Primitive2DContainer& rSource, bool bInvert = false);
/// get B2DRange from a given Primitive2DReference
basegfx::B2DRange DRAWINGLAYER_DLLPUBLIC getB2DRangeFromPrimitive2DReference(const Primitive2DReference& rCandidate, const geometry::ViewInformation2D& aViewInformation);
@@ -280,6 +297,7 @@ namespace drawinglayer
/// concatenate sequence
void DRAWINGLAYER_DLLPUBLIC appendPrimitive2DSequenceToPrimitive2DSequence(Primitive2DSequence& rDest, const Primitive2DSequence& rSource);
+ void DRAWINGLAYER_DLLPUBLIC appendPrimitive2DSequenceToPrimitive2DSequence(Primitive2DSequence& rDest, const Primitive2DContainer& rSource);
/// concatenate single Primitive2D
void DRAWINGLAYER_DLLPUBLIC appendPrimitive2DReferenceToPrimitive2DSequence(Primitive2DSequence& rDest, const Primitive2DReference& rSource);
diff --git a/include/drawinglayer/primitive2d/borderlineprimitive2d.hxx b/include/drawinglayer/primitive2d/borderlineprimitive2d.hxx
index 72e04d5321f1..bc6bf6bafd76 100644
--- a/include/drawinglayer/primitive2d/borderlineprimitive2d.hxx
+++ b/include/drawinglayer/primitive2d/borderlineprimitive2d.hxx
@@ -95,7 +95,7 @@ namespace drawinglayer
const geometry::ViewInformation2D& rViewInformation) const;
/// create local decomposition
- virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
+ virtual Primitive2DContainer create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
public:
/// constructor
diff --git a/include/drawinglayer/primitive2d/controlprimitive2d.hxx b/include/drawinglayer/primitive2d/controlprimitive2d.hxx
index 8e305e834221..a7d310150533 100644
--- a/include/drawinglayer/primitive2d/controlprimitive2d.hxx
+++ b/include/drawinglayer/primitive2d/controlprimitive2d.hxx
@@ -64,7 +64,7 @@ namespace drawinglayer
protected:
/// local decomposition
- virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
+ virtual Primitive2DContainer create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
public:
/// constructor
@@ -101,7 +101,7 @@ namespace drawinglayer
DeclPrimitive2DIDBlock()
/// Override standard getDecomposition to be view-dependent here
- virtual Primitive2DSequence get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
+ virtual Primitive2DContainer get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
};
} // end of namespace primitive2d
} // end of namespace drawinglayer
diff --git a/include/drawinglayer/primitive2d/cropprimitive2d.hxx b/include/drawinglayer/primitive2d/cropprimitive2d.hxx
index ec2d46929db0..fcfb7f9506f8 100644
--- a/include/drawinglayer/primitive2d/cropprimitive2d.hxx
+++ b/include/drawinglayer/primitive2d/cropprimitive2d.hxx
@@ -69,7 +69,7 @@ namespace drawinglayer
public:
/// constructor
CropPrimitive2D(
- const Primitive2DSequence& rChildren,
+ const Primitive2DContainer& rChildren,
const basegfx::B2DHomMatrix& rTransformation,
double fCropLeft,
double fCropTop,
@@ -87,7 +87,7 @@ namespace drawinglayer
virtual bool operator==(const BasePrimitive2D& rPrimitive) const override;
/// local decomposition
- virtual Primitive2DSequence get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
+ virtual Primitive2DContainer get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
/// provide unique ID
DeclPrimitive2DIDBlock()
diff --git a/include/drawinglayer/primitive2d/discretebitmapprimitive2d.hxx b/include/drawinglayer/primitive2d/discretebitmapprimitive2d.hxx
index 61657dc77cae..c69142072dbe 100644
--- a/include/drawinglayer/primitive2d/discretebitmapprimitive2d.hxx
+++ b/include/drawinglayer/primitive2d/discretebitmapprimitive2d.hxx
@@ -50,7 +50,7 @@ namespace drawinglayer
protected:
/// local decomposition.
- virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
+ virtual Primitive2DContainer create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
public:
/// constructor
diff --git a/include/drawinglayer/primitive2d/discreteshadowprimitive2d.hxx b/include/drawinglayer/primitive2d/discreteshadowprimitive2d.hxx
index c080c633b86f..a39c35d60028 100644
--- a/include/drawinglayer/primitive2d/discreteshadowprimitive2d.hxx
+++ b/include/drawinglayer/primitive2d/discreteshadowprimitive2d.hxx
@@ -90,7 +90,7 @@ namespace drawinglayer
protected:
/// create local decomposition
- virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
+ virtual Primitive2DContainer create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
public:
/// constructor
diff --git a/include/drawinglayer/primitive2d/embedded3dprimitive2d.hxx b/include/drawinglayer/primitive2d/embedded3dprimitive2d.hxx
index 72ada3d42488..850cc363f447 100644
--- a/include/drawinglayer/primitive2d/embedded3dprimitive2d.hxx
+++ b/include/drawinglayer/primitive2d/embedded3dprimitive2d.hxx
@@ -67,7 +67,7 @@ namespace drawinglayer
basegfx::B3DRange maScene3DRange;
/// the primitiveSequence for on-demand created shadow primitives (see mbShadow3DChecked)
- Primitive2DSequence maShadowPrimitives;
+ Primitive2DContainer maShadowPrimitives;
/// #i96669# add simple range buffering for this primitive
basegfx::B2DRange maB2DRange;
@@ -83,7 +83,7 @@ namespace drawinglayer
protected:
/// local decomposition.
- virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
+ virtual Primitive2DContainer create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
public:
/// constructor
diff --git a/include/drawinglayer/primitive2d/epsprimitive2d.hxx b/include/drawinglayer/primitive2d/epsprimitive2d.hxx
index af740af1c083..1b871d5af2bb 100644
--- a/include/drawinglayer/primitive2d/epsprimitive2d.hxx
+++ b/include/drawinglayer/primitive2d/epsprimitive2d.hxx
@@ -46,7 +46,7 @@ namespace drawinglayer
protected:
/// create local decomposition
- virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
+ virtual Primitive2DContainer create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
public:
/// constructor
diff --git a/include/drawinglayer/primitive2d/fillgradientprimitive2d.hxx b/include/drawinglayer/primitive2d/fillgradientprimitive2d.hxx
index 92104cd9a172..c7a8a0e39494 100644
--- a/include/drawinglayer/primitive2d/fillgradientprimitive2d.hxx
+++ b/include/drawinglayer/primitive2d/fillgradientprimitive2d.hxx
@@ -69,21 +69,21 @@ namespace drawinglayer
void generateMatricesAndColors(
std::vector< drawinglayer::texture::B2DHomMatrixAndBColor >& rEntries,
basegfx::BColor& rOuterColor) const;
- Primitive2DSequence createOverlappingFill(
+ Primitive2DContainer createOverlappingFill(
const std::vector< drawinglayer::texture::B2DHomMatrixAndBColor >& rEntries,
const basegfx::BColor& rOuterColor,
const basegfx::B2DPolygon& rUnitPolygon) const;
- Primitive2DSequence createNonOverlappingFill(
+ Primitive2DContainer createNonOverlappingFill(
const std::vector< drawinglayer::texture::B2DHomMatrixAndBColor >& rEntries,
const basegfx::BColor& rOuterColor,
const basegfx::B2DPolygon& rUnitPolygon) const;
protected:
/// local helper
- Primitive2DSequence createFill(bool bOverlapping) const;
+ Primitive2DContainer createFill(bool bOverlapping) const;
/// local decomposition.
- virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
+ virtual Primitive2DContainer create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
public:
/// constructors. The one without definition range will use output range as definition range
diff --git a/include/drawinglayer/primitive2d/fillgraphicprimitive2d.hxx b/include/drawinglayer/primitive2d/fillgraphicprimitive2d.hxx
index 22acf73e9e65..b0d1077730bd 100644
--- a/include/drawinglayer/primitive2d/fillgraphicprimitive2d.hxx
+++ b/include/drawinglayer/primitive2d/fillgraphicprimitive2d.hxx
@@ -56,7 +56,7 @@ namespace drawinglayer
protected:
/// local decomposition.
- virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
+ virtual Primitive2DContainer create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
public:
/// constructor
diff --git a/include/drawinglayer/primitive2d/fillhatchprimitive2d.hxx b/include/drawinglayer/primitive2d/fillhatchprimitive2d.hxx
index 76916853e328..8a08ce859193 100644
--- a/include/drawinglayer/primitive2d/fillhatchprimitive2d.hxx
+++ b/include/drawinglayer/primitive2d/fillhatchprimitive2d.hxx
@@ -66,7 +66,7 @@ namespace drawinglayer
protected:
/// local decomposition.
- virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
+ virtual Primitive2DContainer create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
public:
/// constructors. The one without definition range will use output range as definition range
@@ -93,7 +93,7 @@ namespace drawinglayer
virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const override;
/// Override standard getDecomposition to be view-dependent here
- virtual Primitive2DSequence get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
+ virtual Primitive2DContainer get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
/// provide unique ID
DeclPrimitive2DIDBlock()
diff --git a/include/drawinglayer/primitive2d/graphicprimitive2d.hxx b/include/drawinglayer/primitive2d/graphicprimitive2d.hxx
index 20c3da3e7ca6..eb5e5df8fd93 100644
--- a/include/drawinglayer/primitive2d/graphicprimitive2d.hxx
+++ b/include/drawinglayer/primitive2d/graphicprimitive2d.hxx
@@ -61,7 +61,7 @@ namespace drawinglayer
protected:
/// local decomposition
- virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
+ virtual Primitive2DContainer create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
public:
/// constructor(s)
diff --git a/include/drawinglayer/primitive2d/graphicprimitivehelper2d.hxx b/include/drawinglayer/primitive2d/graphicprimitivehelper2d.hxx
index 7234f7c68deb..1a322e0e7e4f 100644
--- a/include/drawinglayer/primitive2d/graphicprimitivehelper2d.hxx
+++ b/include/drawinglayer/primitive2d/graphicprimitivehelper2d.hxx
@@ -42,7 +42,7 @@ namespace drawinglayer
Bitmaps (with the sub-categories animated bitmap, and SVG),
and Metafiles.
*/
- Primitive2DSequence create2DDecompositionOfGraphic(
+ Primitive2DContainer create2DDecompositionOfGraphic(
const Graphic& rGraphic,
const basegfx::B2DHomMatrix& rTransform);
@@ -50,8 +50,8 @@ namespace drawinglayer
of ModifiedColorPrimitive2D's to get all the needed modifications
applied.
*/
- Primitive2DSequence create2DColorModifierEmbeddingsAsNeeded(
- const Primitive2DSequence& rChildren,
+ Primitive2DContainer create2DColorModifierEmbeddingsAsNeeded(
+ const Primitive2DContainer& rChildren,
GraphicDrawMode aGraphicDrawMode = GRAPHICDRAWMODE_STANDARD,
double fLuminance = 0.0, // [-1.0 .. 1.0]
double fContrast = 0.0, // [-1.0 .. 1.0]
diff --git a/include/drawinglayer/primitive2d/gridprimitive2d.hxx b/include/drawinglayer/primitive2d/gridprimitive2d.hxx
index 83067a98bd01..ad7cca17b90c 100644
--- a/include/drawinglayer/primitive2d/gridprimitive2d.hxx
+++ b/include/drawinglayer/primitive2d/gridprimitive2d.hxx
@@ -71,7 +71,7 @@ namespace drawinglayer
protected:
/// create local decomposition
- virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
+ virtual Primitive2DContainer create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
public:
/// constructor
@@ -107,7 +107,7 @@ namespace drawinglayer
DeclPrimitive2DIDBlock()
/// Override standard getDecomposition to be view-dependent here
- virtual Primitive2DSequence get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
+ virtual Primitive2DContainer get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
};
} // end of namespace primitive2d
} // end of namespace drawinglayer
diff --git a/include/drawinglayer/primitive2d/groupprimitive2d.hxx b/include/drawinglayer/primitive2d/groupprimitive2d.hxx
index 0cb63500e769..731d7af4c94e 100644
--- a/include/drawinglayer/primitive2d/groupprimitive2d.hxx
+++ b/include/drawinglayer/primitive2d/groupprimitive2d.hxx
@@ -67,20 +67,20 @@ namespace drawinglayer
{
private:
/// the children. Declared private since this shall never be changed at all after construction
- Primitive2DSequence maChildren;
+ Primitive2DContainer maChildren;
public:
/// constructor
- explicit GroupPrimitive2D(const Primitive2DSequence& rChildren);
+ explicit GroupPrimitive2D(const Primitive2DContainer& rChildren);
/// data read access
- const Primitive2DSequence& getChildren() const { return maChildren; }
+ const Primitive2DContainer& getChildren() const { return maChildren; }
/// compare operator
virtual bool operator==( const BasePrimitive2D& rPrimitive ) const override;
/// local decomposition. Implementation will just return children
- virtual Primitive2DSequence get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
+ virtual Primitive2DContainer get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
/// provide unique ID
DeclPrimitive2DIDBlock()
diff --git a/include/drawinglayer/primitive2d/helplineprimitive2d.hxx b/include/drawinglayer/primitive2d/helplineprimitive2d.hxx
index dc3fb972dc8a..f64a27609a4b 100644
--- a/include/drawinglayer/primitive2d/helplineprimitive2d.hxx
+++ b/include/drawinglayer/primitive2d/helplineprimitive2d.hxx
@@ -75,7 +75,7 @@ namespace drawinglayer
protected:
/// create local decomposition
- virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
+ virtual Primitive2DContainer create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
public:
/// constructor
@@ -102,7 +102,7 @@ namespace drawinglayer
DeclPrimitive2DIDBlock()
/// Override standard getDecomposition to be view-dependent here
- virtual Primitive2DSequence get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
+ virtual Primitive2DContainer get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
};
} // end of namespace primitive2d
} // end of namespace drawinglayer
diff --git a/include/drawinglayer/primitive2d/hiddengeometryprimitive2d.hxx b/include/drawinglayer/primitive2d/hiddengeometryprimitive2d.hxx
index ed2cfa27aee2..820c34f73eda 100644
--- a/include/drawinglayer/primitive2d/hiddengeometryprimitive2d.hxx
+++ b/include/drawinglayer/primitive2d/hiddengeometryprimitive2d.hxx
@@ -41,7 +41,7 @@ namespace drawinglayer
class DRAWINGLAYER_DLLPUBLIC HiddenGeometryPrimitive2D : public GroupPrimitive2D
{
public:
- explicit HiddenGeometryPrimitive2D(const Primitive2DSequence& rChildren);
+ explicit HiddenGeometryPrimitive2D(const Primitive2DContainer& rChildren);
// despite returning an empty decomposition since it's no visualisation data,
// range calculation is intended to use hidden geometry, so
@@ -49,7 +49,7 @@ namespace drawinglayer
virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const override;
/// local decomposition. Implementation will return empty Primitive2DSequence
- virtual Primitive2DSequence get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
+ virtual Primitive2DContainer get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
// provide unique ID
DeclPrimitive2DIDBlock()
diff --git a/include/drawinglayer/primitive2d/invertprimitive2d.hxx b/include/drawinglayer/primitive2d/invertprimitive2d.hxx
index 1351cc3c7a30..7070b9597792 100644
--- a/include/drawinglayer/primitive2d/invertprimitive2d.hxx
+++ b/include/drawinglayer/primitive2d/invertprimitive2d.hxx
@@ -44,7 +44,7 @@ namespace drawinglayer
{
public:
/// constructor
- explicit InvertPrimitive2D(const Primitive2DSequence& rChildren);
+ explicit InvertPrimitive2D(const Primitive2DContainer& rChildren);
/// provide unique ID
DeclPrimitive2DIDBlock()
diff --git a/include/drawinglayer/primitive2d/markerarrayprimitive2d.hxx b/include/drawinglayer/primitive2d/markerarrayprimitive2d.hxx
index 966cc86e935a..b2c1afacd97d 100644
--- a/include/drawinglayer/primitive2d/markerarrayprimitive2d.hxx
+++ b/include/drawinglayer/primitive2d/markerarrayprimitive2d.hxx
@@ -57,7 +57,7 @@ namespace drawinglayer
protected:
/// create local decomposition
- virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
+ virtual Primitive2DContainer create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
public:
/// constructor
diff --git a/include/drawinglayer/primitive2d/maskprimitive2d.hxx b/include/drawinglayer/primitive2d/maskprimitive2d.hxx
index 042097e3eb25..423fe65e19d4 100644
--- a/include/drawinglayer/primitive2d/maskprimitive2d.hxx
+++ b/include/drawinglayer/primitive2d/maskprimitive2d.hxx
@@ -55,7 +55,7 @@ namespace drawinglayer
/// constructor
MaskPrimitive2D(
const basegfx::B2DPolyPolygon& rMask,
- const Primitive2DSequence& rChildren);
+ const Primitive2DContainer& rChildren);
/// data read access
const basegfx::B2DPolyPolygon& getMask() const { return maMask; }
diff --git a/include/drawinglayer/primitive2d/mediaprimitive2d.hxx b/include/drawinglayer/primitive2d/mediaprimitive2d.hxx
index 4d4cce6fcc27..dfa984fb1868 100644
--- a/include/drawinglayer/primitive2d/mediaprimitive2d.hxx
+++ b/include/drawinglayer/primitive2d/mediaprimitive2d.hxx
@@ -61,7 +61,7 @@ namespace drawinglayer
protected:
/// local decomposition
- virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
+ virtual Primitive2DContainer create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
public:
/// constructor
diff --git a/include/drawinglayer/primitive2d/metafileprimitive2d.hxx b/include/drawinglayer/primitive2d/metafileprimitive2d.hxx
index adb14339de21..cf42cf7c1485 100644
--- a/include/drawinglayer/primitive2d/metafileprimitive2d.hxx
+++ b/include/drawinglayer/primitive2d/metafileprimitive2d.hxx
@@ -64,7 +64,7 @@ namespace drawinglayer
protected:
/// local decomposition.
- virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
+ virtual Primitive2DContainer create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
public:
/// constructor
MetafilePrimitive2D(
diff --git a/include/drawinglayer/primitive2d/modifiedcolorprimitive2d.hxx b/include/drawinglayer/primitive2d/modifiedcolorprimitive2d.hxx
index d5f84b04af8c..73301cd7a74b 100644
--- a/include/drawinglayer/primitive2d/modifiedcolorprimitive2d.hxx
+++ b/include/drawinglayer/primitive2d/modifiedcolorprimitive2d.hxx
@@ -59,7 +59,7 @@ namespace drawinglayer
public:
/// constructor
ModifiedColorPrimitive2D(
- const Primitive2DSequence& rChildren,
+ const Primitive2DContainer& rChildren,
const basegfx::BColorModifierSharedPtr& rColorModifier);
/// data read access
diff --git a/include/drawinglayer/primitive2d/objectinfoprimitive2d.hxx b/include/drawinglayer/primitive2d/objectinfoprimitive2d.hxx
index d9c9a92a4f6e..3c0f1b684df2 100644
--- a/include/drawinglayer/primitive2d/objectinfoprimitive2d.hxx
+++ b/include/drawinglayer/primitive2d/objectinfoprimitive2d.hxx
@@ -45,7 +45,7 @@ namespace drawinglayer
public:
/// constructor
ObjectInfoPrimitive2D(
- const Primitive2DSequence& rChildren,
+ const Primitive2DContainer& rChildren,
const OUString& rName,
const OUString& rTitle,
const OUString& rDesc);
diff --git a/include/drawinglayer/primitive2d/pagepreviewprimitive2d.hxx b/include/drawinglayer/primitive2d/pagepreviewprimitive2d.hxx
index 03795aa406f9..764f7cdf8c64 100644
--- a/include/drawinglayer/primitive2d/pagepreviewprimitive2d.hxx
+++ b/include/drawinglayer/primitive2d/pagepreviewprimitive2d.hxx
@@ -50,7 +50,7 @@ namespace drawinglayer
const css::uno::Reference< css::drawing::XDrawPage > mxDrawPage;
/// the PageContent
- Primitive2DSequence maPageContent;
+ Primitive2DContainer maPageContent;
/// the own geometry
basegfx::B2DHomMatrix maTransform;
@@ -65,7 +65,7 @@ namespace drawinglayer
protected:
/// local decomposition. Implementation will just return children
- virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
+ virtual Primitive2DContainer create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
public:
/// constructor
@@ -74,12 +74,12 @@ namespace drawinglayer
const basegfx::B2DHomMatrix& rTransform,
double fContentWidth,
double fContentHeight,
- const Primitive2DSequence& rPageContent,
+ const Primitive2DContainer& rPageContent,
bool bKeepAspectRatio);
/// data read access
const css::uno::Reference< css::drawing::XDrawPage >& getXDrawPage() const { return mxDrawPage; }
- const Primitive2DSequence& getPageContent() const { return maPageContent; }
+ const Primitive2DContainer& getPageContent() const { return maPageContent; }
const basegfx::B2DHomMatrix& getTransform() const { return maTransform; }
double getContentWidth() const { return mfContentWidth; }
double getContentHeight() const { return mfContentHeight; }
diff --git a/include/drawinglayer/primitive2d/patternfillprimitive2d.hxx b/include/drawinglayer/primitive2d/patternfillprimitive2d.hxx
index e9d8b388cbf0..64d0bf520342 100644
--- a/include/drawinglayer/primitive2d/patternfillprimitive2d.hxx
+++ b/include/drawinglayer/primitive2d/patternfillprimitive2d.hxx
@@ -43,23 +43,23 @@ namespace drawinglayer
{
private:
const basegfx::B2DPolyPolygon maMask;
- const Primitive2DSequence maChildren;
+ const Primitive2DContainer maChildren;
const basegfx::B2DRange maReferenceRange;
protected:
/// create local decomposition
- virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
+ virtual Primitive2DContainer create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
public:
/// constructor
PatternFillPrimitive2D(
const basegfx::B2DPolyPolygon& rMask,
- const Primitive2DSequence& rChildren,
+ const Primitive2DContainer& rChildren,
const basegfx::B2DRange& rReferenceRange);
/// data read access
const basegfx::B2DPolyPolygon& getMask() const { return maMask; }
- const Primitive2DSequence& getChildren() const { return maChildren; }
+ const Primitive2DContainer& getChildren() const { return maChildren; }
const basegfx::B2DRange& getReferenceRange() const { return maReferenceRange; }
/// compare operator
diff --git a/include/drawinglayer/primitive2d/polygonprimitive2d.hxx b/include/drawinglayer/primitive2d/polygonprimitive2d.hxx
index 4d8d05a4923d..c5914827ba2b 100644
--- a/include/drawinglayer/primitive2d/polygonprimitive2d.hxx
+++ b/include/drawinglayer/primitive2d/polygonprimitive2d.hxx
@@ -110,7 +110,7 @@ namespace drawinglayer
protected:
/// local decomposition.
- virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
+ virtual Primitive2DContainer create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
public:
/// constructor
@@ -133,7 +133,7 @@ namespace drawinglayer
virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const override;
/// Override standard getDecomposition to be view-dependent here
- virtual Primitive2DSequence get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
+ virtual Primitive2DContainer get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
/// provide unique ID
DeclPrimitive2DIDBlock()
@@ -168,7 +168,7 @@ namespace drawinglayer
protected:
/// local decomposition.
- virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
+ virtual Primitive2DContainer create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
public:
/// constructor
@@ -220,7 +220,7 @@ namespace drawinglayer
protected:
/// local decomposition.
- virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
+ virtual Primitive2DContainer create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
public:
/// constructor
@@ -276,7 +276,7 @@ namespace drawinglayer
protected:
/// local decomposition.
- virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
+ virtual Primitive2DContainer create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
public:
/// constructor
diff --git a/include/drawinglayer/primitive2d/polypolygonprimitive2d.hxx b/include/drawinglayer/primitive2d/polypolygonprimitive2d.hxx
index 7698f1359e81..57f88dbcc3de 100644
--- a/include/drawinglayer/primitive2d/polypolygonprimitive2d.hxx
+++ b/include/drawinglayer/primitive2d/polypolygonprimitive2d.hxx
@@ -57,7 +57,7 @@ namespace drawinglayer
protected:
/// local decomposition.
- virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
+ virtual Primitive2DContainer create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
public:
/// constructor
@@ -107,7 +107,7 @@ namespace drawinglayer
protected:
/// local decomposition.
- virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
+ virtual Primitive2DContainer create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
public:
/// constructor
@@ -162,7 +162,7 @@ namespace drawinglayer
protected:
/// local decomposition.
- virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
+ virtual Primitive2DContainer create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
public:
/// constructor
@@ -263,7 +263,7 @@ namespace drawinglayer
protected:
/// local decomposition.
- virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
+ virtual Primitive2DContainer create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
public:
/// constructors. The one without definition range will use output range as definition range
@@ -319,7 +319,7 @@ namespace drawinglayer
protected:
/// local decomposition.
- virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
+ virtual Primitive2DContainer create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
public:
/// constructors. The one without definition range will use output range as definition range
@@ -375,7 +375,7 @@ namespace drawinglayer
protected:
/// local decomposition.
- virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
+ virtual Primitive2DContainer create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
public:
/// constructors. The one without definition range will use output range as definition range
@@ -435,7 +435,7 @@ namespace drawinglayer
protected:
/// local decomposition.
- virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
+ virtual Primitive2DContainer create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
public:
/// constructor
diff --git a/include/drawinglayer/primitive2d/primitivetools2d.hxx b/include/drawinglayer/primitive2d/primitivetools2d.hxx
index 26e60d10d071..6c02ee4ad1fb 100644
--- a/include/drawinglayer/primitive2d/primitivetools2d.hxx
+++ b/include/drawinglayer/primitive2d/primitivetools2d.hxx
@@ -66,7 +66,7 @@ namespace drawinglayer
double getDiscreteUnit() const { return mfDiscreteUnit; }
/// Override standard getDecomposition to be view-dependent here
- virtual Primitive2DSequence get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
+ virtual Primitive2DContainer get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
};
} // end of namespace primitive2d
} // end of namespace drawinglayer
@@ -105,7 +105,7 @@ namespace drawinglayer
const basegfx::B2DRange& getViewport() const { return maViewport; }
/// Override standard getDecomposition to be view-dependent here
- virtual Primitive2DSequence get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
+ virtual Primitive2DContainer get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
};
} // end of namespace primitive2d
} // end of namespace drawinglayer
@@ -144,7 +144,7 @@ namespace drawinglayer
const basegfx::B2DHomMatrix& getViewTransformation() const { return maViewTransformation; }
/// Override standard getDecomposition to be view-dependent here
- virtual Primitive2DSequence get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
+ virtual Primitive2DContainer get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
};
} // end of namespace primitive2d
} // end of namespace drawinglayer
@@ -187,7 +187,7 @@ namespace drawinglayer
const basegfx::B2DHomMatrix& getObjectTransformation() const { return maObjectTransformation; }
/// Override standard getDecomposition to be view-dependent here
- virtual Primitive2DSequence get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
+ virtual Primitive2DContainer get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
};
} // end of namespace primitive2d
} // end of namespace drawinglayer
diff --git a/include/drawinglayer/primitive2d/sceneprimitive2d.hxx b/include/drawinglayer/primitive2d/sceneprimitive2d.hxx
index 9c3fb8e9d846..be2681f5f4e6 100644
--- a/include/drawinglayer/primitive2d/sceneprimitive2d.hxx
+++ b/include/drawinglayer/primitive2d/sceneprimitive2d.hxx
@@ -72,7 +72,7 @@ namespace drawinglayer
geometry::ViewInformation3D maViewInformation3D;
/// the primitiveSequence for on-demand created shadow primitives (see mbShadow3DChecked)
- Primitive2DSequence maShadowPrimitives;
+ Primitive2DContainer maShadowPrimitives;
/// bitfield
/** flag if given 3D geometry is already cheched for shadow definitions and 2d shadows
@@ -100,7 +100,7 @@ namespace drawinglayer
protected:
/// local decomposition.
- virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
+ virtual Primitive2DContainer create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
public:
/// public helpers
@@ -108,8 +108,8 @@ namespace drawinglayer
the 3D content is not converted to a bitmap visualisation but to projected 2D geometry. This
helper is useful e.g. for Contour extraction or HitTests.
*/
- Primitive2DSequence getGeometry2D() const;
- Primitive2DSequence getShadow2D(const geometry::ViewInformation2D& rViewInformation) const;
+ Primitive2DContainer getGeometry2D() const;
+ Primitive2DContainer getShadow2D(const geometry::ViewInformation2D& rViewInformation) const;
/** Fast HitTest which uses the last buffered BitmapEx from the last
rendered area if available. The return value describes if the check
@@ -147,7 +147,7 @@ namespace drawinglayer
DeclPrimitive2DIDBlock()
/// get local decomposition. Override since this decomposition is view-dependent
- virtual Primitive2DSequence get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
+ virtual Primitive2DContainer get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
};
} // end of namespace primitive2d
} // end of namespace drawinglayer
diff --git a/include/drawinglayer/primitive2d/shadowprimitive2d.hxx b/include/drawinglayer/primitive2d/shadowprimitive2d.hxx
index d4bcc7189710..e0a5fb4045ba 100644
--- a/include/drawinglayer/primitive2d/shadowprimitive2d.hxx
+++ b/include/drawinglayer/primitive2d/shadowprimitive2d.hxx
@@ -60,7 +60,7 @@ namespace drawinglayer
ShadowPrimitive2D(
const basegfx::B2DHomMatrix& rShadowTransform,
const basegfx::BColor& rShadowColor,
- const Primitive2DSequence& rChildren);
+ const Primitive2DContainer& rChildren);
/// data read access
const basegfx::B2DHomMatrix& getShadowTransform() const { return maShadowTransform; }
@@ -73,7 +73,7 @@ namespace drawinglayer
virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const override;
/// create decomposition
- virtual Primitive2DSequence get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
+ virtual Primitive2DContainer get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
/// provide unique ID
DeclPrimitive2DIDBlock()
diff --git a/include/drawinglayer/primitive2d/structuretagprimitive2d.hxx b/include/drawinglayer/primitive2d/structuretagprimitive2d.hxx
index 1e6115b1461c..a5d24e5287d4 100644
--- a/include/drawinglayer/primitive2d/structuretagprimitive2d.hxx
+++ b/include/drawinglayer/primitive2d/structuretagprimitive2d.hxx
@@ -53,7 +53,7 @@ namespace drawinglayer
/// constructor
StructureTagPrimitive2D(
const vcl::PDFWriter::StructElement& rStructureElement,
- const Primitive2DSequence& rChildren);
+ const Primitive2DContainer& rChildren);
/// data read access
const vcl::PDFWriter::StructElement& getStructureElement() const { return maStructureElement; }
diff --git a/include/drawinglayer/primitive2d/svggradientprimitive2d.hxx b/include/drawinglayer/primitive2d/svggradientprimitive2d.hxx
index 98a15967f790..ffbcf306a12d 100644
--- a/include/drawinglayer/primitive2d/svggradientprimitive2d.hxx
+++ b/include/drawinglayer/primitive2d/svggradientprimitive2d.hxx
@@ -121,24 +121,24 @@ namespace drawinglayer
protected:
/// local helpers
- Primitive2DSequence createSingleGradientEntryFill() const;
+ Primitive2DContainer createSingleGradientEntryFill() const;
virtual void createAtom(
- Primitive2DVector& rTargetColor,
- Primitive2DVector& rTargetOpacity,
+ Primitive2DContainer& rTargetColor,
+ Primitive2DContainer& rTargetOpacity,
const SvgGradientEntry& rFrom,
const SvgGradientEntry& rTo,
sal_Int32 nOffset) const = 0;
double createRun(
- Primitive2DVector& rTargetColor,
- Primitive2DVector& rTargetOpacity,
+ Primitive2DContainer& rTargetColor,
+ Primitive2DContainer& rTargetOpacity,
double fPos,
double fMax,
const SvgGradientEntryVector& rEntries,
sal_Int32 nOffset) const;
virtual void checkPreconditions();
- Primitive2DSequence createResult(
- const Primitive2DVector& rTargetColor,
- const Primitive2DVector& rTargetOpacity,
+ Primitive2DContainer createResult(
+ const Primitive2DContainer& rTargetColor,
+ const Primitive2DContainer& rTargetOpacity,
const basegfx::B2DHomMatrix& rUnitGradientToObject,
bool bInvert = false) const;
bool getCreatesContent() const { return mbCreatesContent; }
@@ -189,15 +189,15 @@ namespace drawinglayer
protected:
/// local helpers
virtual void createAtom(
- Primitive2DVector& rTargetColor,
- Primitive2DVector& rTargetOpacity,
+ Primitive2DContainer& rTargetColor,
+ Primitive2DContainer& rTargetOpacity,
const SvgGradientEntry& rFrom,
const SvgGradientEntry& rTo,
sal_Int32 nOffset) const override;
virtual void checkPreconditions() override;
/// local decomposition.
- virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
+ virtual Primitive2DContainer create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
public:
/// constructor
@@ -258,15 +258,15 @@ namespace drawinglayer
protected:
/// local helpers
virtual void createAtom(
- Primitive2DVector& rTargetColor,
- Primitive2DVector& rTargetOpacity,
+ Primitive2DContainer& rTargetColor,
+ Primitive2DContainer& rTargetOpacity,
const SvgGradientEntry& rFrom,
const SvgGradientEntry& rTo,
sal_Int32 nOffset) const override;
virtual void checkPreconditions() override;
/// local decomposition.
- virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
+ virtual Primitive2DContainer create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
public:
/// constructor
@@ -321,7 +321,7 @@ namespace drawinglayer
protected:
/// local decomposition.
- virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
+ virtual Primitive2DContainer create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
public:
/// constructor
@@ -383,7 +383,7 @@ namespace drawinglayer
protected:
/// local decomposition.
- virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
+ virtual Primitive2DContainer create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
public:
/// constructor
diff --git a/include/drawinglayer/primitive2d/textbreakuphelper.hxx b/include/drawinglayer/primitive2d/textbreakuphelper.hxx
index 1f6d598f08fa..811b38fa043b 100644
--- a/include/drawinglayer/primitive2d/textbreakuphelper.hxx
+++ b/include/drawinglayer/primitive2d/textbreakuphelper.hxx
@@ -42,7 +42,7 @@ namespace drawinglayer
{
private:
const TextSimplePortionPrimitive2D& mrSource;
- Primitive2DSequence mxResult;
+ Primitive2DContainer mxResult;
TextLayouterDevice maTextLayouter;
basegfx::tools::B2DHomMatrixBufferedOnDemandDecompose maDecTrans;
@@ -50,7 +50,7 @@ namespace drawinglayer
bool mbNoDXArray : 1;
/// create a portion from nIndex to nLength and append to rTempResult
- void breakupPortion(Primitive2DVector& rTempResult, sal_Int32 nIndex, sal_Int32 nLength, bool bWordLineMode);
+ void breakupPortion(Primitive2DContainer& rTempResult, sal_Int32 nIndex, sal_Int32 nLength, bool bWordLineMode);
/// breakup complete primitive
void breakup(BreakupUnit aBreakupUnit);
@@ -70,7 +70,7 @@ namespace drawinglayer
virtual ~TextBreakupHelper();
/// get result
- const Primitive2DSequence& getResult(BreakupUnit aBreakupUnit = BreakupUnit_character) const;
+ const Primitive2DContainer& getResult(BreakupUnit aBreakupUnit = BreakupUnit_character) const;
};
} // end of namespace primitive2d
diff --git a/include/drawinglayer/primitive2d/textdecoratedprimitive2d.hxx b/include/drawinglayer/primitive2d/textdecoratedprimitive2d.hxx
index c919cfc8158d..671b73246261 100644
--- a/include/drawinglayer/primitive2d/textdecoratedprimitive2d.hxx
+++ b/include/drawinglayer/primitive2d/textdecoratedprimitive2d.hxx
@@ -75,7 +75,7 @@ namespace drawinglayer
protected:
/// local decomposition.
- virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
+ virtual Primitive2DContainer create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
public:
/// constructor
diff --git a/include/drawinglayer/primitive2d/texteffectprimitive2d.hxx b/include/drawinglayer/primitive2d/texteffectprimitive2d.hxx
index c7c1d24fba97..6baeffac8d0c 100644
--- a/include/drawinglayer/primitive2d/texteffectprimitive2d.hxx
+++ b/include/drawinglayer/primitive2d/texteffectprimitive2d.hxx
@@ -51,7 +51,7 @@ namespace drawinglayer
{
private:
/// the text (or other) content
- Primitive2DSequence maTextContent;
+ Primitive2DContainer maTextContent;
/// the style to apply, the direction and the rotation center
const basegfx::B2DPoint maRotationCenter;
@@ -65,18 +65,18 @@ namespace drawinglayer
protected:
/// create local decomposition
- virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
+ virtual Primitive2DContainer create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
public:
/// construcor
TextEffectPrimitive2D(
- const Primitive2DSequence& rTextContent,
+ const Primitive2DContainer& rTextContent,
const basegfx::B2DPoint& rRotationCenter,
double fDirection,
TextEffectStyle2D eTextEffectStyle2D);
/// data read access
- const Primitive2DSequence& getTextContent() const { return maTextContent; }
+ const Primitive2DContainer& getTextContent() const { return maTextContent; }
const basegfx::B2DPoint& getRotationCenter() const { return maRotationCenter; }
double getDirection() const { return mfDirection; }
TextEffectStyle2D getTextEffectStyle2D() const { return meTextEffectStyle2D; }
@@ -94,7 +94,7 @@ namespace drawinglayer
DeclPrimitive2DIDBlock()
/// Override standard getDecomposition to be view-dependent here
- virtual Primitive2DSequence get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
+ virtual Primitive2DContainer get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
};
} // end of namespace primitive2d
} // end of namespace drawinglayer
diff --git a/include/drawinglayer/primitive2d/texthierarchyprimitive2d.hxx b/include/drawinglayer/primitive2d/texthierarchyprimitive2d.hxx
index a21e36490f50..0abf1f21637e 100644
--- a/include/drawinglayer/primitive2d/texthierarchyprimitive2d.hxx
+++ b/include/drawinglayer/primitive2d/texthierarchyprimitive2d.hxx
@@ -45,7 +45,7 @@ namespace drawinglayer
private:
public:
/// constructor
- explicit TextHierarchyLinePrimitive2D(const Primitive2DSequence& rChildren);
+ explicit TextHierarchyLinePrimitive2D(const Primitive2DContainer& rChildren);
/// provide unique ID
DeclPrimitive2DIDBlock()
@@ -68,7 +68,7 @@ namespace drawinglayer
private:
public:
/// constructor
- explicit TextHierarchyBulletPrimitive2D(const Primitive2DSequence& rChildren);
+ explicit TextHierarchyBulletPrimitive2D(const Primitive2DContainer& rChildren);
/// provide unique ID
DeclPrimitive2DIDBlock()
@@ -91,7 +91,7 @@ namespace drawinglayer
private:
public:
/// constructor
- explicit TextHierarchyParagraphPrimitive2D(const Primitive2DSequence& rChildren);
+ explicit TextHierarchyParagraphPrimitive2D(const Primitive2DContainer& rChildren);
/// provide unique ID
DeclPrimitive2DIDBlock()
@@ -114,7 +114,7 @@ namespace drawinglayer
private:
public:
/// constructor
- explicit TextHierarchyBlockPrimitive2D(const Primitive2DSequence& rChildren);
+ explicit TextHierarchyBlockPrimitive2D(const Primitive2DContainer& rChildren);
/// provide unique ID
DeclPrimitive2DIDBlock()
@@ -159,7 +159,7 @@ namespace drawinglayer
public:
/// constructor
TextHierarchyFieldPrimitive2D(
- const Primitive2DSequence& rChildren,
+ const Primitive2DContainer& rChildren,
const FieldType& rFieldType,
const OUString& rString);
@@ -197,7 +197,7 @@ namespace drawinglayer
private:
public:
/// constructor
- explicit TextHierarchyEditPrimitive2D(const Primitive2DSequence& rChildren);
+ explicit TextHierarchyEditPrimitive2D(const Primitive2DContainer& rChildren);
/// provide unique ID
DeclPrimitive2DIDBlock()
diff --git a/include/drawinglayer/primitive2d/textlineprimitive2d.hxx b/include/drawinglayer/primitive2d/textlineprimitive2d.hxx
index b465c008513c..48fa635fbbff 100644
--- a/include/drawinglayer/primitive2d/textlineprimitive2d.hxx
+++ b/include/drawinglayer/primitive2d/textlineprimitive2d.hxx
@@ -48,7 +48,7 @@ namespace drawinglayer
protected:
/// local decomposition.
- virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
+ virtual Primitive2DContainer create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
public:
/// constructor
diff --git a/include/drawinglayer/primitive2d/textprimitive2d.hxx b/include/drawinglayer/primitive2d/textprimitive2d.hxx
index bfd4f20eca24..1513e543934f 100644
--- a/include/drawinglayer/primitive2d/textprimitive2d.hxx
+++ b/include/drawinglayer/primitive2d/textprimitive2d.hxx
@@ -136,7 +136,7 @@ namespace drawinglayer
protected:
/// local decomposition.
- virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
+ virtual Primitive2DContainer create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
public:
/// constructor
diff --git a/include/drawinglayer/primitive2d/textstrikeoutprimitive2d.hxx b/include/drawinglayer/primitive2d/textstrikeoutprimitive2d.hxx
index 8582e4d71b04..10100009c78f 100644
--- a/include/drawinglayer/primitive2d/textstrikeoutprimitive2d.hxx
+++ b/include/drawinglayer/primitive2d/textstrikeoutprimitive2d.hxx
@@ -78,7 +78,7 @@ namespace drawinglayer
protected:
/// local decomposition.
- virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
+ virtual Primitive2DContainer create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
public:
/// constructor
@@ -119,7 +119,7 @@ namespace drawinglayer
protected:
/// local decomposition.
- virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
+ virtual Primitive2DContainer create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
public:
/// constructor
diff --git a/include/drawinglayer/primitive2d/transformprimitive2d.hxx b/include/drawinglayer/primitive2d/transformprimitive2d.hxx
index c0f7cf89fa21..9f09dcd6dc97 100644
--- a/include/drawinglayer/primitive2d/transformprimitive2d.hxx
+++ b/include/drawinglayer/primitive2d/transformprimitive2d.hxx
@@ -60,7 +60,7 @@ namespace drawinglayer
/// constructor
TransformPrimitive2D(
const basegfx::B2DHomMatrix& rTransformation,
- const Primitive2DSequence& rChildren);
+ const Primitive2DContainer& rChildren);
/// data read access
const basegfx::B2DHomMatrix& getTransformation() const { return maTransformation; }
diff --git a/include/drawinglayer/primitive2d/transparenceprimitive2d.hxx b/include/drawinglayer/primitive2d/transparenceprimitive2d.hxx
index af932ed07354..7effb04df6bc 100644
--- a/include/drawinglayer/primitive2d/transparenceprimitive2d.hxx
+++ b/include/drawinglayer/primitive2d/transparenceprimitive2d.hxx
@@ -51,7 +51,7 @@ namespace drawinglayer
{
private:
/// The transparence-Mask who's RGB-Values are interpreted as Luminance
- Primitive2DSequence maTransparence;
+ Primitive2DContainer maTransparence;
public:
/** constructor
@@ -66,11 +66,11 @@ namespace drawinglayer
using the common RGB_to_luminance definitions
*/
TransparencePrimitive2D(
- const Primitive2DSequence& rChildren,
- const Primitive2DSequence& rTransparence);
+ const Primitive2DContainer& rChildren,
+ const Primitive2DContainer& rTransparence);
/// data read access
- const Primitive2DSequence& getTransparence() const { return maTransparence; }
+ const Primitive2DContainer& getTransparence() const { return maTransparence; }
/// compare operator
virtual bool operator==(const BasePrimitive2D& rPrimitive) const override;
diff --git a/include/drawinglayer/primitive2d/unifiedtransparenceprimitive2d.hxx b/include/drawinglayer/primitive2d/unifiedtransparenceprimitive2d.hxx
index 2b23527cda56..4a67adb467f0 100644
--- a/include/drawinglayer/primitive2d/unifiedtransparenceprimitive2d.hxx
+++ b/include/drawinglayer/primitive2d/unifiedtransparenceprimitive2d.hxx
@@ -48,7 +48,7 @@ namespace drawinglayer
public:
/// constructor
UnifiedTransparencePrimitive2D(
- const Primitive2DSequence& rChildren,
+ const Primitive2DContainer& rChildren,
double fTransparence);
/// data read access
@@ -61,7 +61,7 @@ namespace drawinglayer
virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const override;
/// create decomposition
- virtual Primitive2DSequence get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
+ virtual Primitive2DContainer get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
/// provide unique ID
DeclPrimitive2DIDBlock()
diff --git a/include/drawinglayer/primitive2d/wallpaperprimitive2d.hxx b/include/drawinglayer/primitive2d/wallpaperprimitive2d.hxx
index 5fc00a5d53d9..5ed17c311518 100644
--- a/include/drawinglayer/primitive2d/wallpaperprimitive2d.hxx
+++ b/include/drawinglayer/primitive2d/wallpaperprimitive2d.hxx
@@ -54,7 +54,7 @@ namespace drawinglayer
protected:
/// create local decomposition
- virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
+ virtual Primitive2DContainer create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
public:
/// constructor
diff --git a/include/drawinglayer/primitive2d/wrongspellprimitive2d.hxx b/include/drawinglayer/primitive2d/wrongspellprimitive2d.hxx
index aa530dae845d..db0aa914b8b5 100644
--- a/include/drawinglayer/primitive2d/wrongspellprimitive2d.hxx
+++ b/include/drawinglayer/primitive2d/wrongspellprimitive2d.hxx
@@ -60,7 +60,7 @@ namespace drawinglayer
protected:
/// create local decomposition
- virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
+ virtual Primitive2DContainer create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
public:
/// constructor
diff --git a/include/drawinglayer/processor2d/baseprocessor2d.hxx b/include/drawinglayer/processor2d/baseprocessor2d.hxx
index b2e0ce895e62..274fd5f61d98 100644
--- a/include/drawinglayer/processor2d/baseprocessor2d.hxx
+++ b/include/drawinglayer/processor2d/baseprocessor2d.hxx
@@ -181,7 +181,7 @@ namespace drawinglayer
virtual ~BaseProcessor2D();
/// the central processing method
- void process(const primitive2d::Primitive2DSequence& rSource);
+ void process(const primitive2d::Primitive2DContainer& rSource);
/// data read access
const geometry::ViewInformation2D& getViewInformation2D() const { return maViewInformation2D; }
diff --git a/include/drawinglayer/processor3d/geometry2dextractor.hxx b/include/drawinglayer/processor3d/geometry2dextractor.hxx
index d900139184cc..b4111aa032df 100644
--- a/include/drawinglayer/processor3d/geometry2dextractor.hxx
+++ b/include/drawinglayer/processor3d/geometry2dextractor.hxx
@@ -44,7 +44,7 @@ namespace drawinglayer
{
private:
/// result holding vector (2D)
- primitive2d::Primitive2DSequence maPrimitive2DSequence;
+ primitive2d::Primitive2DContainer maPrimitive2DSequence;
/// object transformation for scene for 2d definition
basegfx::B2DHomMatrix maObjectTransformation;
@@ -63,7 +63,7 @@ namespace drawinglayer
const basegfx::B2DHomMatrix& rObjectTransformation);
// data read access
- const primitive2d::Primitive2DSequence& getPrimitive2DSequence() const { return maPrimitive2DSequence; }
+ const primitive2d::Primitive2DContainer& getPrimitive2DSequence() const { return maPrimitive2DSequence; }
const basegfx::B2DHomMatrix& getObjectTransformation() const { return maObjectTransformation; }
};
} // end of namespace processor3d
diff --git a/include/drawinglayer/processor3d/shadow3dextractor.hxx b/include/drawinglayer/processor3d/shadow3dextractor.hxx
index 8919f51f3729..9e4ca9f9908f 100644
--- a/include/drawinglayer/processor3d/shadow3dextractor.hxx
+++ b/include/drawinglayer/processor3d/shadow3dextractor.hxx
@@ -49,8 +49,8 @@ namespace drawinglayer
{
private:
/// result holding vector (2D) and target vector for stacking (inited to &maPrimitive2DSequence)
- primitive2d::Primitive2DVector maPrimitive2DSequence;
- primitive2d::Primitive2DVector* mpPrimitive2DSequence;
+ primitive2d::Primitive2DContainer maPrimitive2DSequence;
+ primitive2d::Primitive2DContainer* mpPrimitive2DSequence;
/// object transformation for scene for 2d definition
basegfx::B2DHomMatrix maObjectTransformation;
@@ -97,7 +97,7 @@ namespace drawinglayer
virtual ~Shadow3DExtractingProcessor();
/// data read access
- const primitive2d::Primitive2DSequence getPrimitive2DSequence() const;
+ const primitive2d::Primitive2DContainer& getPrimitive2DSequence() const;
const basegfx::B2DHomMatrix& getObjectTransformation() const { return maObjectTransformation; }
const basegfx::B3DHomMatrix& getWorldToEye() const { return maWorldToEye; }
const basegfx::B3DHomMatrix& getEyeToView() const { return maEyeToView; }
diff --git a/include/drawinglayer/tools/converters.hxx b/include/drawinglayer/tools/converters.hxx
index c004e25a7a3c..0a29a13d2032 100644
--- a/include/drawinglayer/tools/converters.hxx
+++ b/include/drawinglayer/tools/converters.hxx
@@ -31,7 +31,7 @@ namespace drawinglayer
namespace tools
{
BitmapEx DRAWINGLAYER_DLLPUBLIC convertToBitmapEx(
- const drawinglayer::primitive2d::Primitive2DSequence& rSeq,
+ const drawinglayer::primitive2d::Primitive2DContainer& rSeq,
const geometry::ViewInformation2D& rViewInformation2D,
sal_uInt32 nDiscreteWidth,
sal_uInt32 nDiscreteHeight,
diff --git a/include/sfx2/thumbnailviewitem.hxx b/include/sfx2/thumbnailviewitem.hxx
index 310804030844..2cdf02f8b6d3 100644
--- a/include/sfx2/thumbnailviewitem.hxx
+++ b/include/sfx2/thumbnailviewitem.hxx
@@ -121,7 +121,7 @@ public:
virtual void Paint (drawinglayer::processor2d::BaseProcessor2D *pProcessor,
const ThumbnailItemAttributes *pAttrs);
- void addTextPrimitives (const OUString& rText, const ThumbnailItemAttributes *pAttrs, Point aPos, drawinglayer::primitive2d::Primitive2DSequence& rSeq);
+ void addTextPrimitives (const OUString& rText, const ThumbnailItemAttributes *pAttrs, Point aPos, drawinglayer::primitive2d::Primitive2DContainer& rSeq);
static drawinglayer::primitive2d::PolygonHairlinePrimitive2D*
createBorderLine (const basegfx::B2DPolygon &rPolygon);
diff --git a/include/svx/charthelper.hxx b/include/svx/charthelper.hxx
index 766bebac34c5..4a868e0515e0 100644
--- a/include/svx/charthelper.hxx
+++ b/include/svx/charthelper.hxx
@@ -41,7 +41,7 @@ public:
// as sequence of primitives. Return range of primitives (chart size) in rRange;
// it will be used to embed the chart to the SdrObject transformation. This
// allows to define possible distances between chart and SDrObject bounds here
- static drawinglayer::primitive2d::Primitive2DSequence tryToGetChartContentAsPrimitive2DSequence(
+ static drawinglayer::primitive2d::Primitive2DContainer tryToGetChartContentAsPrimitive2DSequence(
const css::uno::Reference< css::frame::XModel >& rXModel,
basegfx::B2DRange& rRange);
diff --git a/include/svx/framelink.hxx b/include/svx/framelink.hxx
index e8596b495d93..1638459f1e90 100644
--- a/include/svx/framelink.hxx
+++ b/include/svx/framelink.hxx
@@ -439,7 +439,7 @@ SVX_DLLPUBLIC bool CheckFrameBorderConnectable(
| \ / |
rLFromB \ / rRFromB
*/
-SVX_DLLPUBLIC drawinglayer::primitive2d::Primitive2DSequence CreateBorderPrimitives(
+SVX_DLLPUBLIC drawinglayer::primitive2d::Primitive2DContainer CreateBorderPrimitives(
const Point& rLPos, /// Reference point for left end of the processed frame border.
const Point& rRPos, /// Reference point for right end of the processed frame border.
const Style& rBorder, /// Style of the processed frame border.
@@ -461,7 +461,7 @@ SVX_DLLPUBLIC drawinglayer::primitive2d::Primitive2DSequence CreateBorderPrimiti
const long& rRotationB = 9000 /// Angle of the bottom slanted frames in 100th of degree
);
-SVX_DLLPUBLIC drawinglayer::primitive2d::Primitive2DSequence CreateBorderPrimitives(
+SVX_DLLPUBLIC drawinglayer::primitive2d::Primitive2DContainer CreateBorderPrimitives(
const Point& rLPos, /// Reference point for left end of the processed frame border.
const Point& rRPos, /// Reference point for right end of the processed frame border.
const Style& rBorder, /// Style of the processed frame border.
@@ -479,7 +479,7 @@ SVX_DLLPUBLIC drawinglayer::primitive2d::Primitive2DSequence CreateBorderPrimiti
const long& rRotationB = 9000 /// Angle of the bottom slanted frame in 100th of degrees
);
-SVX_DLLPUBLIC drawinglayer::primitive2d::Primitive2DSequence CreateClippedBorderPrimitives (
+SVX_DLLPUBLIC drawinglayer::primitive2d::Primitive2DContainer CreateClippedBorderPrimitives (
const Point& rStart, const Point& rEnd, const Style& rBorder,
const Rectangle& rClipRect );
diff --git a/include/svx/sdr/animation/animationstate.hxx b/include/svx/sdr/animation/animationstate.hxx
index e072a02f983a..7b83945169d7 100644
--- a/include/svx/sdr/animation/animationstate.hxx
+++ b/include/svx/sdr/animation/animationstate.hxx
@@ -44,7 +44,7 @@ namespace sdr
sdr::contact::ViewObjectContact& mrVOContact;
// the vetor of animated primitives
- drawinglayer::primitive2d::Primitive2DSequence maAnimatedPrimitives;
+ drawinglayer::primitive2d::Primitive2DContainer maAnimatedPrimitives;
// local helpers
double getSmallestNextTime(double fCurrentTime);
@@ -52,7 +52,7 @@ namespace sdr
public:
// basic constructor.
- PrimitiveAnimation(sdr::contact::ViewObjectContact& rVOContact, const drawinglayer::primitive2d::Primitive2DSequence& rAnimatedPrimitives);
+ PrimitiveAnimation(sdr::contact::ViewObjectContact& rVOContact, const drawinglayer::primitive2d::Primitive2DContainer& rAnimatedPrimitives);
// destructor
virtual ~PrimitiveAnimation();
diff --git a/include/svx/sdr/attribute/sdrallfillattributeshelper.hxx b/include/svx/sdr/attribute/sdrallfillattributeshelper.hxx
index 580bee23966c..64ac5d21dfdf 100644
--- a/include/svx/sdr/attribute/sdrallfillattributeshelper.hxx
+++ b/include/svx/sdr/attribute/sdrallfillattributeshelper.hxx
@@ -40,7 +40,7 @@ namespace drawinglayer
basegfx::B2DRange maLastDefineRange;
std::shared_ptr< drawinglayer::attribute::SdrFillAttribute > maFillAttribute;
std::shared_ptr< drawinglayer::attribute::FillGradientAttribute > maFillGradientAttribute;
- drawinglayer::primitive2d::Primitive2DSequence maPrimitives;
+ drawinglayer::primitive2d::Primitive2DContainer maPrimitives;
void createPrimitive2DSequence(
const basegfx::B2DRange& rPaintRange,
@@ -59,7 +59,7 @@ namespace drawinglayer
const drawinglayer::attribute::SdrFillAttribute& getFillAttribute() const;
const drawinglayer::attribute::FillGradientAttribute& getFillGradientAttribute() const;
- const drawinglayer::primitive2d::Primitive2DSequence& getPrimitive2DSequence(
+ const drawinglayer::primitive2d::Primitive2DContainer& getPrimitive2DSequence(
const basegfx::B2DRange& rPaintRange,
const basegfx::B2DRange& rDefineRange) const;
diff --git a/include/svx/sdr/contact/viewcontact.hxx b/include/svx/sdr/contact/viewcontact.hxx
index c34f5e9304df..a70c2530cd5c 100644
--- a/include/svx/sdr/contact/viewcontact.hxx
+++ b/include/svx/sdr/contact/viewcontact.hxx
@@ -46,10 +46,10 @@ private:
// Registering and de-registering is done in the VOC constructors/destructors.
std::vector< ViewObjectContact* > maViewObjectContactVector;
- // Primitive2DSequence of the ViewContact. This contains all necessary information
+ // Primitive2DContainer of the ViewContact. This contains all necessary information
// for the graphical visualisation and needs to be supported by all VCs which
// can be visualized.
- drawinglayer::primitive2d::Primitive2DSequence mxViewIndependentPrimitive2DSequence;
+ drawinglayer::primitive2d::Primitive2DContainer mxViewIndependentPrimitive2DSequence;
// A new ViewObjectContact was created and shall be remembered.
void AddViewObjectContact(ViewObjectContact& rVOContact);
@@ -77,10 +77,10 @@ protected:
// visualisation method and will also be used for BoundRect computations in the long run.
// This means it's always an error when the default implementation is called and thus gets
// asserted there
- virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const;
+ virtual drawinglayer::primitive2d::Primitive2DContainer createViewIndependentPrimitive2DSequence() const;
- // method for flushing View Independent Primitive2DSequence for VOC implementations
- void flushViewIndependentPrimitive2DSequence() { mxViewIndependentPrimitive2DSequence.realloc(0); }
+ // method for flushing View Independent Primitive2DContainer for VOC implementations
+ void flushViewIndependentPrimitive2DSequence() { mxViewIndependentPrimitive2DSequence.clear(); }
// basic constructor. Since this is a base class only, it shall
// never be called directly
@@ -122,15 +122,15 @@ public:
// access to the local primitive. This will ensure that the primitive is
// current in comparing the local one with a fresh created incarnation
- drawinglayer::primitive2d::Primitive2DSequence getViewIndependentPrimitive2DSequence() const;
+ drawinglayer::primitive2d::Primitive2DContainer getViewIndependentPrimitive2DSequence() const;
// add Gluepoints (if available)
- virtual drawinglayer::primitive2d::Primitive2DSequence createGluePointPrimitive2DSequence() const;
+ virtual drawinglayer::primitive2d::Primitive2DContainer createGluePointPrimitive2DSequence() const;
// allow embedding if needed (e.g. for SdrObjects, evtl. Name, Title and description get added). This
// is a helper normally used from getViewIndependentPrimitive2DSequence(), but there is one exception
// for 3D scenes
- virtual drawinglayer::primitive2d::Primitive2DSequence embedToObjectSpecificInformation(const drawinglayer::primitive2d::Primitive2DSequence& rSource) const;
+ virtual drawinglayer::primitive2d::Primitive2DContainer embedToObjectSpecificInformation(const drawinglayer::primitive2d::Primitive2DContainer& rSource) const;
virtual basegfx::B2DRange getRange( const drawinglayer::geometry::ViewInformation2D& rViewInfo2D ) const;
diff --git a/include/svx/sdr/contact/viewcontactofe3d.hxx b/include/svx/sdr/contact/viewcontactofe3d.hxx
index 1b0aee383c5a..eed59dded3d6 100644
--- a/include/svx/sdr/contact/viewcontactofe3d.hxx
+++ b/include/svx/sdr/contact/viewcontactofe3d.hxx
@@ -56,7 +56,7 @@ public:
}
// public helpers
- drawinglayer::primitive2d::Primitive2DSequence impCreateWithGivenPrimitive3DSequence(
+ drawinglayer::primitive2d::Primitive2DContainer impCreateWithGivenPrimitive3DSequence(
const drawinglayer::primitive3d::Primitive3DSequence& rxContent3D) const;
@@ -76,7 +76,7 @@ protected:
// This method is responsible for creating the graphical visualisation data derived ONLY from
// the model data. The default implementation will try to create a 3D to 2D embedding (will work
// when scene is known) which can then be used for 2D processing concerning ranges
- virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const override;
+ virtual drawinglayer::primitive2d::Primitive2DContainer createViewIndependentPrimitive2DSequence() const override;
public:
// access to the local primitive without the object's local 3D transform. This is e.g. needed
diff --git a/include/svx/sdr/contact/viewcontactofe3dscene.hxx b/include/svx/sdr/contact/viewcontactofe3dscene.hxx
index b860417bedd4..ce9e85113963 100644
--- a/include/svx/sdr/contact/viewcontactofe3dscene.hxx
+++ b/include/svx/sdr/contact/viewcontactofe3dscene.hxx
@@ -66,7 +66,7 @@ public:
// scene primitive creators. If pLayerVisibility is given, a visibility test with the LayerID and the
// given SetOfByte is done.
- drawinglayer::primitive2d::Primitive2DSequence createScenePrimitive2DSequence(const SetOfByte* pLayerVisibility) const;
+ drawinglayer::primitive2d::Primitive2DContainer createScenePrimitive2DSequence(const SetOfByte* pLayerVisibility) const;
// helpers to get the sequence of all contained 3D primitives and its range,
// regardless of layer or visibility constraints and using a neutral ViewInformation3D
@@ -94,7 +94,7 @@ protected:
// This method is responsible for creating the graphical visualisation data
// ONLY based on model data
- virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const override;
+ virtual drawinglayer::primitive2d::Primitive2DContainer createViewIndependentPrimitive2DSequence() const override;
};
}}
diff --git a/include/svx/sdr/contact/viewcontactofpageobj.hxx b/include/svx/sdr/contact/viewcontactofpageobj.hxx
index 874b2140d4f8..b8d995bc52ab 100644
--- a/include/svx/sdr/contact/viewcontactofpageobj.hxx
+++ b/include/svx/sdr/contact/viewcontactofpageobj.hxx
@@ -36,7 +36,7 @@ protected:
virtual ViewObjectContact& CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact) override;
// create graphical visualisation data
- virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const override;
+ virtual drawinglayer::primitive2d::Primitive2DContainer createViewIndependentPrimitive2DSequence() const override;
public:
// basic constructor, used from SdrObject.
explicit ViewContactOfPageObj(SdrPageObj& rPageObj);
diff --git a/include/svx/sdr/contact/viewcontactofsdrmediaobj.hxx b/include/svx/sdr/contact/viewcontactofsdrmediaobj.hxx
index e440ee67a4af..3ecf81ed7441 100644
--- a/include/svx/sdr/contact/viewcontactofsdrmediaobj.hxx
+++ b/include/svx/sdr/contact/viewcontactofsdrmediaobj.hxx
@@ -64,7 +64,7 @@ protected:
protected:
// This method is responsible for creating the graphical visualisation data
// ONLY based on model data
- virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const override;
+ virtual drawinglayer::primitive2d::Primitive2DContainer createViewIndependentPrimitive2DSequence() const override;
};
}}
diff --git a/include/svx/sdr/contact/viewcontactofsdrobj.hxx b/include/svx/sdr/contact/viewcontactofsdrobj.hxx
index 724865ed8905..2dbfdea043e8 100644
--- a/include/svx/sdr/contact/viewcontactofsdrobj.hxx
+++ b/include/svx/sdr/contact/viewcontactofsdrobj.hxx
@@ -72,12 +72,12 @@ public:
// primitive stuff
// add Gluepoints (if available)
- virtual drawinglayer::primitive2d::Primitive2DSequence createGluePointPrimitive2DSequence() const override;
+ virtual drawinglayer::primitive2d::Primitive2DContainer createGluePointPrimitive2DSequence() const override;
// allow embedding if needed (e.g. for SdrObjects, evtl. Name, Title and description get added). This
// is a helper normally used from getViewIndependentPrimitive2DSequence(), but there is one exception
// for 3D scenes
- virtual drawinglayer::primitive2d::Primitive2DSequence embedToObjectSpecificInformation(const drawinglayer::primitive2d::Primitive2DSequence& rSource) const override;
+ virtual drawinglayer::primitive2d::Primitive2DContainer embedToObjectSpecificInformation(const drawinglayer::primitive2d::Primitive2DContainer& rSource) const override;
};
}}
diff --git a/include/svx/sdr/contact/viewcontactofsdrrectobj.hxx b/include/svx/sdr/contact/viewcontactofsdrrectobj.hxx
index c5fad1af395e..5892952808cd 100644
--- a/include/svx/sdr/contact/viewcontactofsdrrectobj.hxx
+++ b/include/svx/sdr/contact/viewcontactofsdrrectobj.hxx
@@ -42,7 +42,7 @@ public:
protected:
// This method is responsible for creating the graphical visualisation data
// ONLY based on model data
- virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const override;
+ virtual drawinglayer::primitive2d::Primitive2DContainer createViewIndependentPrimitive2DSequence() const override;
};
}}
diff --git a/include/svx/sdr/contact/viewcontactofvirtobj.hxx b/include/svx/sdr/contact/viewcontactofvirtobj.hxx
index 96b0da316d8a..65b50fb0a1d8 100644
--- a/include/svx/sdr/contact/viewcontactofvirtobj.hxx
+++ b/include/svx/sdr/contact/viewcontactofvirtobj.hxx
@@ -44,7 +44,7 @@ public:
protected:
// This method is responsible for creating the graphical visualisation data
// ONLY based on model data
- virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const override;
+ virtual drawinglayer::primitive2d::Primitive2DContainer createViewIndependentPrimitive2DSequence() const override;
};
}}
diff --git a/include/svx/sdr/contact/viewobjectcontact.hxx b/include/svx/sdr/contact/viewobjectcontact.hxx
index 9e8b4e972ffd..ddf54b437477 100644
--- a/include/svx/sdr/contact/viewobjectcontact.hxx
+++ b/include/svx/sdr/contact/viewobjectcontact.hxx
@@ -52,9 +52,9 @@ private:
// PrimitiveSequence of the ViewContact. This contains all necessary information
// for the graphical visualisation and needs to be supported by all VCs which
// can be visualized.
- drawinglayer::primitive2d::Primitive2DSequence mxPrimitive2DSequence;
+ drawinglayer::primitive2d::Primitive2DContainer mxPrimitive2DSequence;
- // the PrimitiveAnimation if Primitive2DSequence contains animations
+ // the PrimitiveAnimation if Primitive2DContainer contains animations
sdr::animation::PrimitiveAnimation* mpPrimitiveAnimation;
// bitfield
@@ -75,10 +75,10 @@ protected:
// from the ViewContact using ViewContact::getViewIndependentPrimitive2DSequence(), takes care of
// visibility, handles glue and ghosted.
// This method will not handle included hierarchies and not check geometric visibility.
- virtual drawinglayer::primitive2d::Primitive2DSequence createPrimitive2DSequence(const DisplayInfo& rDisplayInfo) const;
+ virtual drawinglayer::primitive2d::Primitive2DContainer createPrimitive2DSequence(const DisplayInfo& rDisplayInfo) const;
- // method for flushing Primitive2DSequence for VOC implementations
- void flushPrimitive2DSequence() { mxPrimitive2DSequence.realloc(0); }
+ // method for flushing Primitive2DContainer for VOC implementations
+ void flushPrimitive2DSequence() { mxPrimitive2DSequence.clear(); }
public:
// basic constructor.
@@ -110,7 +110,7 @@ public:
// access to the local primitive. This will ensure that the local primitive is
// current in comparing the local one with a fresh created incarnation
// This method will not handle included hierarchies and not check visibility.
- drawinglayer::primitive2d::Primitive2DSequence getPrimitive2DSequence(const DisplayInfo& rDisplayInfo) const;
+ drawinglayer::primitive2d::Primitive2DContainer getPrimitive2DSequence(const DisplayInfo& rDisplayInfo) const;
// test this VOC for visibility concerning model-view stuff like e.g. Layer
virtual bool isPrimitiveVisible(const DisplayInfo& rDisplayInfo) const;
@@ -120,10 +120,10 @@ public:
// process this primitive: Eventually also recursively travel an existing hierarchy,
// e.g. for group objects, scenes or pages. This method will test geometrical visibility.
- virtual drawinglayer::primitive2d::Primitive2DSequence getPrimitive2DSequenceHierarchy(DisplayInfo& rDisplayInfo) const;
+ virtual drawinglayer::primitive2d::Primitive2DContainer getPrimitive2DSequenceHierarchy(DisplayInfo& rDisplayInfo) const;
// just process the sub-hierarchy, used as tooling from getPrimitive2DSequenceHierarchy
- drawinglayer::primitive2d::Primitive2DSequence getPrimitive2DSequenceSubHierarchy(DisplayInfo& rDisplayInfo) const;
+ drawinglayer::primitive2d::Primitive2DContainer getPrimitive2DSequenceSubHierarchy(DisplayInfo& rDisplayInfo) const;
};
}}
diff --git a/include/svx/sdr/contact/viewobjectcontactofpageobj.hxx b/include/svx/sdr/contact/viewobjectcontactofpageobj.hxx
index a4d3ff3e616f..28eb5d7cdd36 100644
--- a/include/svx/sdr/contact/viewobjectcontactofpageobj.hxx
+++ b/include/svx/sdr/contact/viewobjectcontactofpageobj.hxx
@@ -38,7 +38,7 @@ protected:
// This method is responsible for creating the graphical visualisation data which is
// stored/cached in the local primitive.
// This method will not handle included hierarchies and not check geometric visibility.
- virtual drawinglayer::primitive2d::Primitive2DSequence createPrimitive2DSequence(const DisplayInfo& rDisplayInfo) const override;
+ virtual drawinglayer::primitive2d::Primitive2DContainer createPrimitive2DSequence(const DisplayInfo& rDisplayInfo) const override;
public:
ViewObjectContactOfPageObj(ObjectContact& rObjectContact, ViewContact& rViewContact);
diff --git a/include/svx/sdr/contact/viewobjectcontactredirector.hxx b/include/svx/sdr/contact/viewobjectcontactredirector.hxx
index 6dee41409975..7679564028ff 100644
--- a/include/svx/sdr/contact/viewobjectcontactredirector.hxx
+++ b/include/svx/sdr/contact/viewobjectcontactredirector.hxx
@@ -43,7 +43,7 @@ public:
// all default implementations just call the same methods at the original. To do something
// different, override the method and at least do what the method does.
- virtual drawinglayer::primitive2d::Primitive2DSequence createRedirectedPrimitive2DSequence(
+ virtual drawinglayer::primitive2d::Primitive2DContainer createRedirectedPrimitive2DSequence(
const sdr::contact::ViewObjectContact& rOriginal,
const sdr::contact::DisplayInfo& rDisplayInfo);
};
diff --git a/include/svx/sdr/overlay/overlayanimatedbitmapex.hxx b/include/svx/sdr/overlay/overlayanimatedbitmapex.hxx
index 8594e683ce71..af77c3a4ca40 100644
--- a/include/svx/sdr/overlay/overlayanimatedbitmapex.hxx
+++ b/include/svx/sdr/overlay/overlayanimatedbitmapex.hxx
@@ -54,7 +54,7 @@ namespace sdr
bool mbOverlayState : 1;
// geometry creation for OverlayObject
- virtual drawinglayer::primitive2d::Primitive2DSequence createOverlayObjectPrimitive2DSequence() override;
+ virtual drawinglayer::primitive2d::Primitive2DContainer createOverlayObjectPrimitive2DSequence() override;
public:
OverlayAnimatedBitmapEx(
diff --git a/include/svx/sdr/overlay/overlaybitmapex.hxx b/include/svx/sdr/overlay/overlaybitmapex.hxx
index 25913c1633dc..e98bd4953220 100644
--- a/include/svx/sdr/overlay/overlaybitmapex.hxx
+++ b/include/svx/sdr/overlay/overlaybitmapex.hxx
@@ -44,7 +44,7 @@ namespace sdr
double mfShearX;
double mfRotation;
- virtual drawinglayer::primitive2d::Primitive2DSequence createOverlayObjectPrimitive2DSequence() override;
+ virtual drawinglayer::primitive2d::Primitive2DContainer createOverlayObjectPrimitive2DSequence() override;
public:
OverlayBitmapEx(
diff --git a/include/svx/sdr/overlay/overlayobject.hxx b/include/svx/sdr/overlay/overlayobject.hxx
index d4ada5a75804..6a4da0b11336 100644
--- a/include/svx/sdr/overlay/overlayobject.hxx
+++ b/include/svx/sdr/overlay/overlayobject.hxx
@@ -64,21 +64,21 @@ namespace sdr
// OverlayManager, do not change Yourself.
OverlayManager* mpOverlayManager;
- // Primitive2DSequence of the OverlayObject
- drawinglayer::primitive2d::Primitive2DSequence maPrimitive2DSequence;
+ // Primitive2DContainer of the OverlayObject
+ drawinglayer::primitive2d::Primitive2DContainer maPrimitive2DSequence;
protected:
// access methods to maPrimitive2DSequence. The usage of this methods may allow
// later thread-safe stuff to be added if needed. Only to be used by getPrimitive2DSequence()
// implementations for buffering the last decomposition.
- const drawinglayer::primitive2d::Primitive2DSequence& getPrimitive2DSequence() const { return maPrimitive2DSequence; }
- void setPrimitive2DSequence(const drawinglayer::primitive2d::Primitive2DSequence& rNew) { maPrimitive2DSequence = rNew; }
+ const drawinglayer::primitive2d::Primitive2DContainer& getPrimitive2DSequence() const { return maPrimitive2DSequence; }
+ void setPrimitive2DSequence(const drawinglayer::primitive2d::Primitive2DContainer& rNew) { maPrimitive2DSequence = rNew; }
- // the creation method for Primitive2DSequence. Called when getPrimitive2DSequence()
+ // the creation method for Primitive2DContainer. Called when getPrimitive2DSequence()
// sees that maPrimitive2DSequence is empty. Needs to be supported by all
// OverlayObject implementations. Default implementation will assert
// a missing implementation
- virtual drawinglayer::primitive2d::Primitive2DSequence createOverlayObjectPrimitive2DSequence();
+ virtual drawinglayer::primitive2d::Primitive2DContainer createOverlayObjectPrimitive2DSequence();
// #i53216# check blink time value range (currently 25 < mnBlinkTime < 10000)
static sal_uInt32 impCheckBlinkTimeValueRange(sal_uInt64 nBlinkTime);
@@ -123,10 +123,10 @@ namespace sdr
// get OverlayManager
OverlayManager* getOverlayManager() const { return mpOverlayManager; }
- // the access method for Primitive2DSequence. Will use createPrimitive2DSequence and
+ // the access method for Primitive2DContainer. Will use createPrimitive2DSequence and
// setPrimitive2DSequence if needed. Overriding may be used to allow disposal of last
// created primitives to react on changed circumstances and to re-create primitives
- virtual drawinglayer::primitive2d::Primitive2DSequence getOverlayObjectPrimitive2DSequence() const;
+ virtual drawinglayer::primitive2d::Primitive2DContainer getOverlayObjectPrimitive2DSequence() const;
// access to visibility state
bool isVisible() const { return mbIsVisible; }
diff --git a/include/svx/sdr/overlay/overlayobjectcell.hxx b/include/svx/sdr/overlay/overlayobjectcell.hxx
index 989c7c903e89..08e41ca85343 100644
--- a/include/svx/sdr/overlay/overlayobjectcell.hxx
+++ b/include/svx/sdr/overlay/overlayobjectcell.hxx
@@ -44,7 +44,7 @@ namespace sdr
RangeVector maRectangles;
// geometry creation for OverlayObject
- virtual drawinglayer::primitive2d::Primitive2DSequence createOverlayObjectPrimitive2DSequence() override;
+ virtual drawinglayer::primitive2d::Primitive2DContainer createOverlayObjectPrimitive2DSequence() override;
public:
OverlayObjectCell( CellOverlayType eType, const Color& rColor, const RangeVector& rRects);
diff --git a/include/svx/sdr/overlay/overlaypolypolygon.hxx b/include/svx/sdr/overlay/overlaypolypolygon.hxx
index 4e331b0356f1..998b805dcb85 100644
--- a/include/svx/sdr/overlay/overlaypolypolygon.hxx
+++ b/include/svx/sdr/overlay/overlaypolypolygon.hxx
@@ -37,7 +37,7 @@ namespace sdr
basegfx::B2DPolyPolygon maLinePolyPolygon;
// geometry creation for OverlayObject
- virtual drawinglayer::primitive2d::Primitive2DSequence createOverlayObjectPrimitive2DSequence() override;
+ virtual drawinglayer::primitive2d::Primitive2DContainer createOverlayObjectPrimitive2DSequence() override;
public:
explicit OverlayPolyPolygonStripedAndFilled(
diff --git a/include/svx/sdr/overlay/overlayprimitive2dsequenceobject.hxx b/include/svx/sdr/overlay/overlayprimitive2dsequenceobject.hxx
index dcaf3c7ed886..2c63a1f6e77a 100644
--- a/include/svx/sdr/overlay/overlayprimitive2dsequenceobject.hxx
+++ b/include/svx/sdr/overlay/overlayprimitive2dsequenceobject.hxx
@@ -34,18 +34,18 @@ namespace sdr
{
protected:
// the sequence of primitives to show
- const drawinglayer::primitive2d::Primitive2DSequence maSequence;
+ const drawinglayer::primitive2d::Primitive2DContainer maSequence;
// geometry creation for OverlayObject
- virtual drawinglayer::primitive2d::Primitive2DSequence createOverlayObjectPrimitive2DSequence() override;
+ virtual drawinglayer::primitive2d::Primitive2DContainer createOverlayObjectPrimitive2DSequence() override;
public:
- explicit OverlayPrimitive2DSequenceObject(const drawinglayer::primitive2d::Primitive2DSequence& rSequence);
+ explicit OverlayPrimitive2DSequenceObject(const drawinglayer::primitive2d::Primitive2DContainer& rSequence);
virtual ~OverlayPrimitive2DSequenceObject();
// data read access
- const drawinglayer::primitive2d::Primitive2DSequence& getSequence() const { return maSequence; }
+ const drawinglayer::primitive2d::Primitive2DContainer& getSequence() const { return maSequence; }
};
} // end of namespace overlay
} // end of namespace sdr
diff --git a/include/svx/sdr/overlay/overlayselection.hxx b/include/svx/sdr/overlay/overlayselection.hxx
index 297a1e08a48d..cdd3448e10ed 100644
--- a/include/svx/sdr/overlay/overlayselection.hxx
+++ b/include/svx/sdr/overlay/overlayselection.hxx
@@ -47,7 +47,7 @@ namespace sdr
std::vector< basegfx::B2DRange > maRanges;
// Values of last primitive creation. These are checked in getOverlayObjectPrimitive2DSequence
- // to evtl. get rid of last Primitive2DSequence. This ensures that these values are up-to-date
+ // to evtl. get rid of last Primitive2DContainer. This ensures that these values are up-to-date
// and are usable when creating primitives
OverlayType maLastOverlayType;
sal_uInt16 mnLastTransparence;
@@ -56,7 +56,7 @@ namespace sdr
bool mbBorder : 1;
// geometry creation for OverlayObject, can use local *Last* values
- virtual drawinglayer::primitive2d::Primitive2DSequence createOverlayObjectPrimitive2DSequence() override;
+ virtual drawinglayer::primitive2d::Primitive2DContainer createOverlayObjectPrimitive2DSequence() override;
public:
OverlaySelection(
@@ -71,7 +71,7 @@ namespace sdr
bool getBorder() const { return mbBorder; }
/// override to check conditions for last createOverlayObjectPrimitive2DSequence
- virtual drawinglayer::primitive2d::Primitive2DSequence getOverlayObjectPrimitive2DSequence() const override;
+ virtual drawinglayer::primitive2d::Primitive2DContainer getOverlayObjectPrimitive2DSequence() const override;
// data write access
void setRanges(const std::vector< basegfx::B2DRange >& rNew);
diff --git a/include/svx/sdr/overlay/overlaytriangle.hxx b/include/svx/sdr/overlay/overlaytriangle.hxx
index a05d6de6ef30..3dcbc52f1151 100644
--- a/include/svx/sdr/overlay/overlaytriangle.hxx
+++ b/include/svx/sdr/overlay/overlaytriangle.hxx
@@ -34,7 +34,7 @@ namespace sdr
basegfx::B2DPoint maThirdPosition;
// geometry creation for OverlayObject
- virtual drawinglayer::primitive2d::Primitive2DSequence createOverlayObjectPrimitive2DSequence() override;
+ virtual drawinglayer::primitive2d::Primitive2DContainer createOverlayObjectPrimitive2DSequence() override;
public:
OverlayTriangle(
diff --git a/include/svx/sdr/primitive2d/sdrdecompositiontools.hxx b/include/svx/sdr/primitive2d/sdrdecompositiontools.hxx
index eb7a29911f6e..8edabccdd18f 100644
--- a/include/svx/sdr/primitive2d/sdrdecompositiontools.hxx
+++ b/include/svx/sdr/primitive2d/sdrdecompositiontools.hxx
@@ -71,8 +71,8 @@ namespace drawinglayer
bool bWordWrap,
bool bClipOnBounds);
- Primitive2DSequence SVX_DLLPUBLIC createEmbeddedShadowPrimitive(
- const Primitive2DSequence& rContent,
+ Primitive2DContainer SVX_DLLPUBLIC createEmbeddedShadowPrimitive(
+ const Primitive2DContainer& rContent,
const attribute::SdrShadowAttribute& rShadow);
} // end of namespace primitive2d
diff --git a/include/svx/svddrgmt.hxx b/include/svx/svddrgmt.hxx
index 2820436a33f4..dd77d1eb3b1a 100644
--- a/include/svx/svddrgmt.hxx
+++ b/include/svx/svddrgmt.hxx
@@ -41,7 +41,7 @@ public:
SdrDragEntry();
virtual ~SdrDragEntry();
- virtual drawinglayer::primitive2d::Primitive2DSequence createPrimitive2DSequenceInCurrentState(SdrDragMethod& rDragMethod) = 0;
+ virtual drawinglayer::primitive2d::Primitive2DContainer createPrimitive2DSequenceInCurrentState(SdrDragMethod& rDragMethod) = 0;
// data read access
bool getAddToTransparent() const { return mbAddToTransparent; }
@@ -58,7 +58,7 @@ public:
SdrDragEntryPolyPolygon(const basegfx::B2DPolyPolygon& rOriginalPolyPolygon);
virtual ~SdrDragEntryPolyPolygon();
- virtual drawinglayer::primitive2d::Primitive2DSequence createPrimitive2DSequenceInCurrentState(SdrDragMethod& rDragMethod) override;
+ virtual drawinglayer::primitive2d::Primitive2DContainer createPrimitive2DSequenceInCurrentState(SdrDragMethod& rDragMethod) override;
};
@@ -81,7 +81,7 @@ public:
const SdrObject& getOriginal() const { return maOriginal; }
SdrObject* getClone() { return mpClone; }
- virtual drawinglayer::primitive2d::Primitive2DSequence createPrimitive2DSequenceInCurrentState(SdrDragMethod& rDragMethod) override;
+ virtual drawinglayer::primitive2d::Primitive2DContainer createPrimitive2DSequenceInCurrentState(SdrDragMethod& rDragMethod) override;
};
@@ -89,15 +89,15 @@ public:
class SdrDragEntryPrimitive2DSequence : public SdrDragEntry
{
private:
- drawinglayer::primitive2d::Primitive2DSequence maPrimitive2DSequence;
+ drawinglayer::primitive2d::Primitive2DContainer maPrimitive2DSequence;
public:
SdrDragEntryPrimitive2DSequence(
- const drawinglayer::primitive2d::Primitive2DSequence& rSequence,
+ const drawinglayer::primitive2d::Primitive2DContainer& rSequence,
bool bAddToTransparent);
virtual ~SdrDragEntryPrimitive2DSequence();
- virtual drawinglayer::primitive2d::Primitive2DSequence createPrimitive2DSequenceInCurrentState(SdrDragMethod& rDragMethod) override;
+ virtual drawinglayer::primitive2d::Primitive2DContainer createPrimitive2DSequenceInCurrentState(SdrDragMethod& rDragMethod) override;
};
@@ -112,7 +112,7 @@ public:
SdrDragEntryPointGlueDrag(const std::vector< basegfx::B2DPoint >& rPositions, bool bIsPointDrag);
virtual ~SdrDragEntryPointGlueDrag();
- virtual drawinglayer::primitive2d::Primitive2DSequence createPrimitive2DSequenceInCurrentState(SdrDragMethod& rDragMethod) override;
+ virtual drawinglayer::primitive2d::Primitive2DContainer createPrimitive2DSequenceInCurrentState(SdrDragMethod& rDragMethod) override;
};
@@ -177,7 +177,7 @@ protected:
bool IsDraggingGluePoints() const { return getSdrDragView().IsDraggingGluePoints(); }
bool DoAddConnectorOverlays();
- drawinglayer::primitive2d::Primitive2DSequence AddConnectorOverlays();
+ drawinglayer::primitive2d::Primitive2DContainer AddConnectorOverlays();
public:
diff --git a/include/svx/svdotext.hxx b/include/svx/svdotext.hxx
index d43bc5062575..c2e1435b419f 100644
--- a/include/svx/svdotext.hxx
+++ b/include/svx/svdotext.hxx
@@ -597,27 +597,27 @@ public:
// text primitive decomposition helpers
void impDecomposeContourTextPrimitive(
- drawinglayer::primitive2d::Primitive2DSequence& rTarget,
+ drawinglayer::primitive2d::Primitive2DContainer& rTarget,
const drawinglayer::primitive2d::SdrContourTextPrimitive2D& rSdrContourTextPrimitive,
const drawinglayer::geometry::ViewInformation2D& aViewInformation) const;
void impDecomposePathTextPrimitive(
- drawinglayer::primitive2d::Primitive2DSequence& rTarget,
+ drawinglayer::primitive2d::Primitive2DContainer& rTarget,
const drawinglayer::primitive2d::SdrPathTextPrimitive2D& rSdrPathTextPrimitive,
const drawinglayer::geometry::ViewInformation2D& aViewInformation) const;
void impDecomposeBlockTextPrimitive(
- drawinglayer::primitive2d::Primitive2DSequence& rTarget,
+ drawinglayer::primitive2d::Primitive2DContainer& rTarget,
const drawinglayer::primitive2d::SdrBlockTextPrimitive2D& rSdrBlockTextPrimitive,
const drawinglayer::geometry::ViewInformation2D& aViewInformation) const;
void impDecomposeAutoFitTextPrimitive(
- drawinglayer::primitive2d::Primitive2DSequence& rTarget,
+ drawinglayer::primitive2d::Primitive2DContainer& rTarget,
const drawinglayer::primitive2d::SdrAutoFitTextPrimitive2D& rSdrAutofitTextPrimitive,
const drawinglayer::geometry::ViewInformation2D& aViewInformation) const;
void impDecomposeStretchTextPrimitive(
- drawinglayer::primitive2d::Primitive2DSequence& rTarget,
+ drawinglayer::primitive2d::Primitive2DContainer& rTarget,
const drawinglayer::primitive2d::SdrStretchTextPrimitive2D& rSdrStretchTextPrimitive,
const drawinglayer::geometry::ViewInformation2D& aViewInformation) const;
void impDecomposeChainedTextPrimitive(
- drawinglayer::primitive2d::Primitive2DSequence& rTarget,
+ drawinglayer::primitive2d::Primitive2DContainer& rTarget,
const drawinglayer::primitive2d::SdrChainedTextPrimitive2D& rSdrChainedTextPrimitive,
const drawinglayer::geometry::ViewInformation2D& aViewInformation) const;
void impHandleChainingEventsDuringDecomposition(SdrOutliner &rOutliner) const;
diff --git a/include/svx/svdpage.hxx b/include/svx/svdpage.hxx
index b459773b87b9..c8d537035e72 100644
--- a/include/svx/svdpage.hxx
+++ b/include/svx/svdpage.hxx
@@ -555,7 +555,7 @@ public:
// all default implementations just call the same methods at the original. To do something
// different, override the method and at least do what the method does.
- virtual drawinglayer::primitive2d::Primitive2DSequence createRedirectedPrimitive2DSequence(
+ virtual drawinglayer::primitive2d::Primitive2DContainer createRedirectedPrimitive2DSequence(
const sdr::contact::ViewObjectContact& rOriginal,
const sdr::contact::DisplayInfo& rDisplayInfo) override;
};
diff --git a/include/test/primitive2dxmldump.hxx b/include/test/primitive2dxmldump.hxx
index a578e60f7596..176f6dd1e0e0 100644
--- a/include/test/primitive2dxmldump.hxx
+++ b/include/test/primitive2dxmldump.hxx
@@ -23,7 +23,7 @@ class OOO_DLLPUBLIC_TEST Primitive2dXmlDump
{
private:
std::vector<bool> maFilter;
- void decomposeAndWrite(const drawinglayer::primitive2d::Primitive2DSequence& rPrimitive2DSequence, XmlWriter& rWriter);
+ void decomposeAndWrite(const drawinglayer::primitive2d::Primitive2DContainer& rPrimitive2DSequence, XmlWriter& rWriter);
public:
Primitive2dXmlDump();
@@ -39,7 +39,7 @@ public:
pTempStreamName - this is useful when creating the test, to dump the
file for examination.
*/
- xmlDocPtr dumpAndParse(const drawinglayer::primitive2d::Primitive2DSequence& aPrimitive2DSequence, const OUString& rTempStreamName = OUString());
+ xmlDocPtr dumpAndParse(const drawinglayer::primitive2d::Primitive2DContainer& aPrimitive2DSequence, const OUString& rTempStreamName = OUString());
};
#endif // INCLUDED_TEST_PRIMITIVE2DXMLDUMP_HXX
diff --git a/include/vcl/svgdata.hxx b/include/vcl/svgdata.hxx
index 84a625e935d1..361528843691 100644
--- a/include/vcl/svgdata.hxx
+++ b/include/vcl/svgdata.hxx
@@ -33,7 +33,7 @@ typedef css::uno::Sequence<sal_Int8> SvgDataArray;
// using default parameters and graphic::XPrimitive2DRenderer
BitmapEx VCL_DLLPUBLIC convertPrimitive2DSequenceToBitmapEx(
- const css::uno::Sequence< css::uno::Reference< css::graphic::XPrimitive2D > >& rSequence,
+ const std::vector< css::uno::Reference< css::graphic::XPrimitive2D > >& rSequence,
const basegfx::B2DRange& rTargetRange,
const sal_uInt32 nMaximumQuadraticPixels = 500000);
@@ -49,7 +49,7 @@ private:
// on demand created content
basegfx::B2DRange maRange;
- css::uno::Sequence< css::uno::Reference< css::graphic::XPrimitive2D > >
+ std::vector< css::uno::Reference< css::graphic::XPrimitive2D > >
maSequence;
BitmapEx maReplacement;
@@ -71,7 +71,7 @@ public:
/// data read and evtl. on demand creation
const basegfx::B2DRange& getRange() const;
- const css::uno::Sequence< css::uno::Reference< css::graphic::XPrimitive2D > >& getPrimitive2DSequence() const;
+ const std::vector< css::uno::Reference< css::graphic::XPrimitive2D > >& getPrimitive2DSequence() const;
const BitmapEx& getReplacement() const;
};
diff --git a/sc/source/ui/inc/overlayobject.hxx b/sc/source/ui/inc/overlayobject.hxx
index 3917dc4ce88d..ffa97ff95c53 100644
--- a/sc/source/ui/inc/overlayobject.hxx
+++ b/sc/source/ui/inc/overlayobject.hxx
@@ -33,7 +33,7 @@ public:
virtual void stripeDefinitionHasChanged() override;
protected:
- virtual drawinglayer::primitive2d::Primitive2DSequence createOverlayObjectPrimitive2DSequence() override;
+ virtual drawinglayer::primitive2d::Primitive2DContainer createOverlayObjectPrimitive2DSequence() override;
private:
::basegfx::B2DRange maRange;
diff --git a/sc/source/ui/view/overlayobject.cxx b/sc/source/ui/view/overlayobject.cxx
index a0cb86f0ac26..54bc968fcf7c 100644
--- a/sc/source/ui/view/overlayobject.cxx
+++ b/sc/source/ui/view/overlayobject.cxx
@@ -64,14 +64,14 @@ void ScOverlayDashedBorder::stripeDefinitionHasChanged()
objectChange();
}
-Primitive2DSequence ScOverlayDashedBorder::createOverlayObjectPrimitive2DSequence()
+drawinglayer::primitive2d::Primitive2DContainer ScOverlayDashedBorder::createOverlayObjectPrimitive2DSequence()
{
using ::basegfx::B2DPolygon;
using ::basegfx::B2DPolyPolygon;
OverlayManager* pMgr = getOverlayManager();
if (!pMgr)
- return Primitive2DSequence();
+ return drawinglayer::primitive2d::Primitive2DContainer();
basegfx::BColor aColorA = pMgr->getStripeColorA().getBColor();
basegfx::BColor aColorB = pMgr->getStripeColorB().getBColor();
@@ -84,7 +84,7 @@ Primitive2DSequence ScOverlayDashedBorder::createOverlayObjectPrimitive2DSequenc
new drawinglayer::primitive2d::PolyPolygonMarkerPrimitive2D(
aPolygon, aColorA, aColorB, pMgr->getStripeLengthPixel()));
- return drawinglayer::primitive2d::Primitive2DSequence(&aReference, 1);
+ return drawinglayer::primitive2d::Primitive2DContainer { aReference };
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/core/CustomAnimationEffect.cxx b/sd/source/core/CustomAnimationEffect.cxx
index 7d247f16fb00..a3efd9fb8dd7 100644
--- a/sd/source/core/CustomAnimationEffect.cxx
+++ b/sd/source/core/CustomAnimationEffect.cxx
@@ -1634,9 +1634,9 @@ void CustomAnimationEffect::updatePathFromSdrPathObj( const SdrPathObj& rPathObj
{
Rectangle aBoundRect(0,0,0,0);
- const drawinglayer::primitive2d::Primitive2DSequence xPrimitives(pObj->GetViewContact().getViewIndependentPrimitive2DSequence());
+ const drawinglayer::primitive2d::Primitive2DContainer xPrimitives(pObj->GetViewContact().getViewIndependentPrimitive2DSequence());
const drawinglayer::geometry::ViewInformation2D aViewInformation2D;
- const basegfx::B2DRange aRange(drawinglayer::primitive2d::getB2DRangeFromPrimitive2DSequence(xPrimitives, aViewInformation2D));
+ const basegfx::B2DRange aRange(xPrimitives.getB2DRange(aViewInformation2D));
if(!aRange.isEmpty())
{
diff --git a/sd/source/ui/animations/motionpathtag.cxx b/sd/source/ui/animations/motionpathtag.cxx
index c30d53fa67d0..ba2008f62d23 100644
--- a/sd/source/ui/animations/motionpathtag.cxx
+++ b/sd/source/ui/animations/motionpathtag.cxx
@@ -291,7 +291,7 @@ void SdPathHdl::CreateB2dIAObject()
if (xManager.is() && mpPathObj)
{
const sdr::contact::ViewContact& rVC = mpPathObj->GetViewContact();
- const drawinglayer::primitive2d::Primitive2DSequence aSequence = rVC.getViewIndependentPrimitive2DSequence();
+ const drawinglayer::primitive2d::Primitive2DContainer aSequence = rVC.getViewIndependentPrimitive2DSequence();
sdr::overlay::OverlayObject* pNew = new sdr::overlay::OverlayPrimitive2DSequenceObject(aSequence);
xManager->add(*pNew);
diff --git a/sd/source/ui/tools/PreviewRenderer.cxx b/sd/source/ui/tools/PreviewRenderer.cxx
index a383b759668e..e2468c7630d7 100644
--- a/sd/source/ui/tools/PreviewRenderer.cxx
+++ b/sd/source/ui/tools/PreviewRenderer.cxx
@@ -55,9 +55,9 @@ namespace {
public:
ViewRedirector();
virtual ~ViewRedirector();
- virtual drawinglayer::primitive2d::Primitive2DSequence createRedirectedPrimitive2DSequence(
+ virtual drawinglayer::primitive2d::Primitive2DContainer createRedirectedPrimitive2DSequence(
const sdr::contact::ViewObjectContact& rOriginal,
- const sdr::contact::DisplayInfo& rDisplayInfo) override;
+ const sdr::contact::DisplayInfo& rDisplayInfo) override;
};
}
@@ -515,7 +515,7 @@ ViewRedirector::~ViewRedirector()
{
}
-drawinglayer::primitive2d::Primitive2DSequence ViewRedirector::createRedirectedPrimitive2DSequence(
+drawinglayer::primitive2d::Primitive2DContainer ViewRedirector::createRedirectedPrimitive2DSequence(
const sdr::contact::ViewObjectContact& rOriginal,
const sdr::contact::DisplayInfo& rDisplayInfo)
{
@@ -534,11 +534,11 @@ drawinglayer::primitive2d::Primitive2DSequence ViewRedirector::createRedirectedP
if ( ! bDoCreateGeometry
&& (pObject->GetObjInventor() != SdrInventor || pObject->GetObjIdentifier() != OBJ_PAGE))
{
- return drawinglayer::primitive2d::Primitive2DSequence();
+ return drawinglayer::primitive2d::Primitive2DContainer();
}
if (pObject->IsEmptyPresObj())
- return drawinglayer::primitive2d::Primitive2DSequence();
+ return drawinglayer::primitive2d::Primitive2DContainer();
return sdr::contact::ViewObjectContactRedirector::createRedirectedPrimitive2DSequence(
rOriginal,
diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx
index e4b31bbf9279..e301986eb25c 100644
--- a/sd/source/ui/unoidl/unomodel.cxx
+++ b/sd/source/ui/unoidl/unomodel.cxx
@@ -1555,7 +1555,7 @@ public:
// all default implementations just call the same methods at the original. To do something
// different, override the method and at least do what the method does.
- virtual drawinglayer::primitive2d::Primitive2DSequence createRedirectedPrimitive2DSequence(
+ virtual drawinglayer::primitive2d::Primitive2DContainer createRedirectedPrimitive2DSequence(
const sdr::contact::ViewObjectContact& rOriginal,
const sdr::contact::DisplayInfo& rDisplayInfo) override;
};
@@ -1783,7 +1783,7 @@ vcl::PDFWriter::StructElement ImplRenderPaintProc::ImplBegStructureTag( SdrObjec
return eElement;
}
-drawinglayer::primitive2d::Primitive2DSequence ImplRenderPaintProc::createRedirectedPrimitive2DSequence(
+drawinglayer::primitive2d::Primitive2DContainer ImplRenderPaintProc::createRedirectedPrimitive2DSequence(
const sdr::contact::ViewObjectContact& rOriginal,
const sdr::contact::DisplayInfo& rDisplayInfo)
{
@@ -1791,7 +1791,7 @@ drawinglayer::primitive2d::Primitive2DSequence ImplRenderPaintProc::createRedire
if(pObject)
{
- drawinglayer::primitive2d::Primitive2DSequence xRetval;
+ drawinglayer::primitive2d::Primitive2DContainer xRetval;
if(pObject->GetPage())
{
@@ -1804,12 +1804,12 @@ drawinglayer::primitive2d::Primitive2DSequence ImplRenderPaintProc::createRedire
xRetval = sdr::contact::ViewObjectContactRedirector::createRedirectedPrimitive2DSequence(rOriginal, rDisplayInfo);
- if(xRetval.hasElements() && bTagUsed)
+ if(!xRetval.empty() && bTagUsed)
{
// embed Primitive2DSequence in a structure tag element for
// exactly this purpose (StructureTagPrimitive2D)
const drawinglayer::primitive2d::Primitive2DReference xReference(new drawinglayer::primitive2d::StructureTagPrimitive2D(eElement, xRetval));
- xRetval = drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1);
+ xRetval = drawinglayer::primitive2d::Primitive2DContainer { xReference };
}
}
}
diff --git a/sd/source/ui/view/sdview.cxx b/sd/source/ui/view/sdview.cxx
index 8accd2af7d53..cff5e65d9a44 100644
--- a/sd/source/ui/view/sdview.cxx
+++ b/sd/source/ui/view/sdview.cxx
@@ -179,7 +179,7 @@ public:
// all default implementations just call the same methods at the original. To do something
// different, override the method and at least do what the method does.
- virtual drawinglayer::primitive2d::Primitive2DSequence createRedirectedPrimitive2DSequence(
+ virtual drawinglayer::primitive2d::Primitive2DContainer createRedirectedPrimitive2DSequence(
const sdr::contact::ViewObjectContact& rOriginal,
const sdr::contact::DisplayInfo& rDisplayInfo) override;
};
@@ -192,12 +192,12 @@ ViewRedirector::~ViewRedirector()
{
}
-drawinglayer::primitive2d::Primitive2DSequence ViewRedirector::createRedirectedPrimitive2DSequence(
+drawinglayer::primitive2d::Primitive2DContainer ViewRedirector::createRedirectedPrimitive2DSequence(
const sdr::contact::ViewObjectContact& rOriginal,
const sdr::contact::DisplayInfo& rDisplayInfo)
{
SdrObject* pObject = rOriginal.GetViewContact().TryToGetSdrObject();
- drawinglayer::primitive2d::Primitive2DSequence xRetval;
+ drawinglayer::primitive2d::Primitive2DContainer xRetval;
if(pObject && pObject->GetPage())
{
@@ -290,7 +290,7 @@ drawinglayer::primitive2d::Primitive2DSequence ViewRedirector::createRedirectedP
aPolygon,
aLine,
aStroke));
- drawinglayer::primitive2d::appendPrimitive2DReferenceToPrimitive2DSequence(xRetval, xRef);
+ xRetval.push_back(xRef);
}
// now paint the placeholder description, but only when masterpage
@@ -437,7 +437,7 @@ drawinglayer::primitive2d::Primitive2DSequence ViewRedirector::createRedirectedP
aFontAttribute,
aLocale,
aFontColor));
- drawinglayer::primitive2d::appendPrimitive2DReferenceToPrimitive2DSequence(xRetval, xRef);
+ xRetval.push_back(xRef);
}
}
}
@@ -446,8 +446,7 @@ drawinglayer::primitive2d::Primitive2DSequence ViewRedirector::createRedirectedP
if(bDoCreateGeometry)
{
- drawinglayer::primitive2d::appendPrimitive2DSequenceToPrimitive2DSequence(
- xRetval,
+ xRetval.append(
sdr::contact::ViewObjectContactRedirector::createRedirectedPrimitive2DSequence(
rOriginal,
rDisplayInfo));
diff --git a/sfx2/source/control/recentdocsviewitem.cxx b/sfx2/source/control/recentdocsviewitem.cxx
index abf4325021f0..982579ed1905 100644
--- a/sfx2/source/control/recentdocsviewitem.cxx
+++ b/sfx2/source/control/recentdocsviewitem.cxx
@@ -152,7 +152,7 @@ void RecentDocsViewItem::Paint(drawinglayer::processor2d::BaseProcessor2D *pProc
// paint the remove icon when highlighted
if (isHighlighted())
{
- drawinglayer::primitive2d::Primitive2DSequence aSeq(1);
+ drawinglayer::primitive2d::Primitive2DContainer aSeq(1);
Point aIconPos(getRemoveIconArea().TopLeft());
diff --git a/sfx2/source/control/templateabstractview.cxx b/sfx2/source/control/templateabstractview.cxx
index 38c0609624b1..4a2a9138c1f2 100644
--- a/sfx2/source/control/templateabstractview.cxx
+++ b/sfx2/source/control/templateabstractview.cxx
@@ -304,7 +304,7 @@ void TemplateAbstractView::Paint(vcl::RenderContext& rRenderContext, const Recta
Point(rRect.BottomRight().X(),
mnHeaderHeight));
- drawinglayer::primitive2d::Primitive2DSequence aSeq(1);
+ drawinglayer::primitive2d::Primitive2DContainer aSeq(1);
aSeq[0] = drawinglayer::primitive2d::Primitive2DReference(
new PolyPolygonColorPrimitive2D(B2DPolyPolygon(::tools::Polygon(aRect).getB2DPolygon()),
maFillColor.getBColor()));
diff --git a/sfx2/source/control/templatecontaineritem.cxx b/sfx2/source/control/templatecontaineritem.cxx
index 5690a2e4f337..afeac9534121 100644
--- a/sfx2/source/control/templatecontaineritem.cxx
+++ b/sfx2/source/control/templatecontaineritem.cxx
@@ -66,7 +66,7 @@ void TemplateContainerItem::Paint (drawinglayer::processor2d::BaseProcessor2D *p
nSeqSize += 3;
BColor aFillColor = pAttrs->aFillColor;
- drawinglayer::primitive2d::Primitive2DSequence aSeq(nSeqSize);
+ drawinglayer::primitive2d::Primitive2DContainer aSeq(nSeqSize);
double fTransparence = 0.0;
// Draw background
diff --git a/sfx2/source/control/templateviewitem.cxx b/sfx2/source/control/templateviewitem.cxx
index 950c32612895..dbcafece5208 100644
--- a/sfx2/source/control/templateviewitem.cxx
+++ b/sfx2/source/control/templateviewitem.cxx
@@ -69,7 +69,7 @@ void TemplateViewItem::Paint(drawinglayer::processor2d::BaseProcessor2D *pProces
BColor aFillColor = pAttrs->aFillColor;
int nCount = maSubTitle.isEmpty() ? 5 : 6;
- drawinglayer::primitive2d::Primitive2DSequence aSeq(nCount);
+ drawinglayer::primitive2d::Primitive2DContainer aSeq(nCount);
double fTransparence = 0.0;
// Draw background
diff --git a/sfx2/source/control/thumbnailview.cxx b/sfx2/source/control/thumbnailview.cxx
index 6e5321d4aeea..dd6f1bfaf76e 100644
--- a/sfx2/source/control/thumbnailview.cxx
+++ b/sfx2/source/control/thumbnailview.cxx
@@ -837,7 +837,7 @@ void ThumbnailView::Paint(vcl::RenderContext& rRenderContext, const Rectangle& r
size_t nItemCount = mItemList.size();
// Draw background
- drawinglayer::primitive2d::Primitive2DSequence aSeq(1);
+ drawinglayer::primitive2d::Primitive2DContainer aSeq(1);
aSeq[0] = drawinglayer::primitive2d::Primitive2DReference(
new PolyPolygonColorPrimitive2D(
B2DPolyPolygon( ::tools::Polygon(Rectangle(Point(), GetOutputSizePixel()), 0, 0).getB2DPolygon()),
diff --git a/sfx2/source/control/thumbnailviewitem.cxx b/sfx2/source/control/thumbnailviewitem.cxx
index a866b0d0a619..0d2e8f383fe8 100644
--- a/sfx2/source/control/thumbnailviewitem.cxx
+++ b/sfx2/source/control/thumbnailviewitem.cxx
@@ -262,7 +262,7 @@ void ThumbnailViewItem::Paint (drawinglayer::processor2d::BaseProcessor2D *pProc
const ThumbnailItemAttributes *pAttrs)
{
BColor aFillColor = pAttrs->aFillColor;
- drawinglayer::primitive2d::Primitive2DSequence aSeq(4);
+ drawinglayer::primitive2d::Primitive2DContainer aSeq(4);
double fTransparence = 0.0;
// Draw background
@@ -314,7 +314,7 @@ void ThumbnailViewItem::Paint (drawinglayer::processor2d::BaseProcessor2D *pProc
pProcessor->process(aSeq);
}
-void ThumbnailViewItem::addTextPrimitives (const OUString& rText, const ThumbnailItemAttributes *pAttrs, Point aPos, drawinglayer::primitive2d::Primitive2DSequence& rSeq)
+void ThumbnailViewItem::addTextPrimitives (const OUString& rText, const ThumbnailItemAttributes *pAttrs, Point aPos, drawinglayer::primitive2d::Primitive2DContainer& rSeq)
{
drawinglayer::primitive2d::TextLayouterDevice aTextDev;
@@ -326,8 +326,8 @@ void ThumbnailViewItem::addTextPrimitives (const OUString& rText, const Thumbnai
aTextEngine.SetMaxTextWidth(maDrawArea.getWidth());
aTextEngine.SetText(rText);
- sal_Int32 nPrimitives = rSeq.getLength();
- rSeq.realloc(nPrimitives + aTextEngine.GetLineCount(0));
+ sal_Int32 nPrimitives = rSeq.size();
+ rSeq.resize(nPrimitives + aTextEngine.GetLineCount(0));
// Create the text primitives
sal_uInt16 nLineStart = 0;
diff --git a/sfx2/source/dialog/infobar.cxx b/sfx2/source/dialog/infobar.cxx
index fbf1e4f21740..a3c7f54de736 100644
--- a/sfx2/source/dialog/infobar.cxx
+++ b/sfx2/source/dialog/infobar.cxx
@@ -71,7 +71,7 @@ void SfxCloseButton::Paint(vcl::RenderContext& rRenderContext, const Rectangle&)
const Rectangle aRect(Point(0, 0), PixelToLogic(GetSizePixel()));
- drawinglayer::primitive2d::Primitive2DSequence aSeq(2);
+ drawinglayer::primitive2d::Primitive2DContainer aSeq(2);
BColor aLightColor;
BColor aDarkColor;
@@ -168,7 +168,7 @@ void SfxInfoBarWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle
const Rectangle aRect(Point(0, 0), PixelToLogic(GetSizePixel()));
- drawinglayer::primitive2d::Primitive2DSequence aSeq(2);
+ drawinglayer::primitive2d::Primitive2DContainer aSeq(2);
BColor aLightColor;
BColor aDarkColor;
diff --git a/svgio/inc/svgio/svgreader/svgcharacternode.hxx b/svgio/inc/svgio/svgreader/svgcharacternode.hxx
index e37145e4dddc..45670ee3a668 100644
--- a/svgio/inc/svgio/svgreader/svgcharacternode.hxx
+++ b/svgio/inc/svgio/svgreader/svgcharacternode.hxx
@@ -143,7 +143,7 @@ namespace svgio
SvgTextPosition& rSvgTextPosition,
const SvgStyleAttributes& rSvgStyleAttributes) const;
void decomposeTextWithStyle(
- drawinglayer::primitive2d::Primitive2DSequence& rTarget,
+ drawinglayer::primitive2d::Primitive2DContainer& rTarget,
SvgTextPosition& rSvgTextPosition,
const SvgStyleAttributes& rSvgStyleAttributes) const;
@@ -155,7 +155,7 @@ namespace svgio
virtual ~SvgCharacterNode();
virtual const SvgStyleAttributes* getSvgStyleAttributes() const override;
- void decomposeText(drawinglayer::primitive2d::Primitive2DSequence& rTarget, SvgTextPosition& rSvgTextPosition) const;
+ void decomposeText(drawinglayer::primitive2d::Primitive2DContainer& rTarget, SvgTextPosition& rSvgTextPosition) const;
void whiteSpaceHandling();
void addGap();
void concatenate(const OUString& rText);
diff --git a/svgio/inc/svgio/svgreader/svgcirclenode.hxx b/svgio/inc/svgio/svgreader/svgcirclenode.hxx
index a997ed9230fe..9acbe907cf38 100644
--- a/svgio/inc/svgio/svgreader/svgcirclenode.hxx
+++ b/svgio/inc/svgio/svgreader/svgcirclenode.hxx
@@ -47,7 +47,7 @@ namespace svgio
virtual const SvgStyleAttributes* getSvgStyleAttributes() const override;
virtual void parseAttribute(const OUString& rTokenName, SVGToken aSVGToken, const OUString& aContent) override;
- virtual void decomposeSvgNode(drawinglayer::primitive2d::Primitive2DSequence& rTarget, bool bReferenced) const override;
+ virtual void decomposeSvgNode(drawinglayer::primitive2d::Primitive2DContainer& rTarget, bool bReferenced) const override;
/// Cx content, set if found in current context
const SvgNumber& getCx() const { return maCx; }
diff --git a/svgio/inc/svgio/svgreader/svgclippathnode.hxx b/svgio/inc/svgio/svgreader/svgclippathnode.hxx
index f49eaebac62c..706d4bd84df2 100644
--- a/svgio/inc/svgio/svgreader/svgclippathnode.hxx
+++ b/svgio/inc/svgio/svgreader/svgclippathnode.hxx
@@ -45,11 +45,11 @@ namespace svgio
virtual const SvgStyleAttributes* getSvgStyleAttributes() const override;
virtual void parseAttribute(const OUString& rTokenName, SVGToken aSVGToken, const OUString& aContent) override;
- virtual void decomposeSvgNode(drawinglayer::primitive2d::Primitive2DSequence& rTarget, bool bReferenced) const override;
+ virtual void decomposeSvgNode(drawinglayer::primitive2d::Primitive2DContainer& rTarget, bool bReferenced) const override;
/// apply contained clipPath to given geometry #i124852# transform may be needed
void apply(
- drawinglayer::primitive2d::Primitive2DSequence& rTarget,
+ drawinglayer::primitive2d::Primitive2DContainer& rTarget,
const basegfx::B2DHomMatrix* pTransform) const;
/// clipPathUnits content
diff --git a/svgio/inc/svgio/svgreader/svgellipsenode.hxx b/svgio/inc/svgio/svgreader/svgellipsenode.hxx
index dbb9f95763f3..040235c75af8 100644
--- a/svgio/inc/svgio/svgreader/svgellipsenode.hxx
+++ b/svgio/inc/svgio/svgreader/svgellipsenode.hxx
@@ -48,7 +48,7 @@ namespace svgio
virtual const SvgStyleAttributes* getSvgStyleAttributes() const override;
virtual void parseAttribute(const OUString& rTokenName, SVGToken aSVGToken, const OUString& aContent) override;
- virtual void decomposeSvgNode(drawinglayer::primitive2d::Primitive2DSequence& rTarget, bool bReferenced) const override;
+ virtual void decomposeSvgNode(drawinglayer::primitive2d::Primitive2DContainer& rTarget, bool bReferenced) const override;
/// Cx content, set if found in current context
const SvgNumber& getCx() const { return maCx; }
diff --git a/svgio/inc/svgio/svgreader/svggnode.hxx b/svgio/inc/svgio/svgreader/svggnode.hxx
index d010d04c13ed..8d9ad9dec53f 100644
--- a/svgio/inc/svgio/svgreader/svggnode.hxx
+++ b/svgio/inc/svgio/svgreader/svggnode.hxx
@@ -45,7 +45,7 @@ namespace svgio
virtual const SvgStyleAttributes* getSvgStyleAttributes() const override;
virtual void parseAttribute(const OUString& rTokenName, SVGToken aSVGToken, const OUString& aContent) override;
- virtual void decomposeSvgNode(drawinglayer::primitive2d::Primitive2DSequence& rTarget, bool bReferenced) const override;
+ virtual void decomposeSvgNode(drawinglayer::primitive2d::Primitive2DContainer& rTarget, bool bReferenced) const override;
/// transform content
const basegfx::B2DHomMatrix* getTransform() const { return mpaTransform; }
diff --git a/svgio/inc/svgio/svgreader/svgimagenode.hxx b/svgio/inc/svgio/svgreader/svgimagenode.hxx
index 9e7ca50de7eb..c21a9f5eaf3e 100644
--- a/svgio/inc/svgio/svgreader/svgimagenode.hxx
+++ b/svgio/inc/svgio/svgreader/svgimagenode.hxx
@@ -55,7 +55,7 @@ namespace svgio
virtual const SvgStyleAttributes* getSvgStyleAttributes() const override;
virtual void parseAttribute(const OUString& rTokenName, SVGToken aSVGToken, const OUString& aContent) override;
- virtual void decomposeSvgNode(drawinglayer::primitive2d::Primitive2DSequence& rTarget, bool bReferenced) const override;
+ virtual void decomposeSvgNode(drawinglayer::primitive2d::Primitive2DContainer& rTarget, bool bReferenced) const override;
/// SvgAspectRatio content
const SvgAspectRatio& getSvgAspectRatio() const { return maSvgAspectRatio; }
diff --git a/svgio/inc/svgio/svgreader/svglinenode.hxx b/svgio/inc/svgio/svgreader/svglinenode.hxx
index bf0e647a4734..23e20bd3088e 100644
--- a/svgio/inc/svgio/svgreader/svglinenode.hxx
+++ b/svgio/inc/svgio/svgreader/svglinenode.hxx
@@ -48,7 +48,7 @@ namespace svgio
virtual const SvgStyleAttributes* getSvgStyleAttributes() const override;
virtual void parseAttribute(const OUString& rTokenName, SVGToken aSVGToken, const OUString& aContent) override;
- virtual void decomposeSvgNode(drawinglayer::primitive2d::Primitive2DSequence& rTarget, bool bReferenced) const override;
+ virtual void decomposeSvgNode(drawinglayer::primitive2d::Primitive2DContainer& rTarget, bool bReferenced) const override;
/// X1 content, set if found in current context
const SvgNumber& getX1() const { return maX1; }
diff --git a/svgio/inc/svgio/svgreader/svgmarkernode.hxx b/svgio/inc/svgio/svgreader/svgmarkernode.hxx
index cc60fc800808..ee4698d599b7 100644
--- a/svgio/inc/svgio/svgreader/svgmarkernode.hxx
+++ b/svgio/inc/svgio/svgreader/svgmarkernode.hxx
@@ -38,7 +38,7 @@ namespace svgio
private:
/// buffered decomposition
- drawinglayer::primitive2d::Primitive2DSequence aPrimitives;
+ drawinglayer::primitive2d::Primitive2DContainer aPrimitives;
/// use styles
SvgStyleAttributes maSvgStyleAttributes;
@@ -66,7 +66,7 @@ namespace svgio
virtual void parseAttribute(const OUString& rTokenName, SVGToken aSVGToken, const OUString& aContent) override;
/// get marker primitives buffered, uses decomposeSvgNode internally
- const drawinglayer::primitive2d::Primitive2DSequence& getMarkerPrimitives() const;
+ const drawinglayer::primitive2d::Primitive2DContainer& getMarkerPrimitives() const;
/// InfoProvider support for % values
virtual const basegfx::B2DRange getCurrentViewPort() const override;
diff --git a/svgio/inc/svgio/svgreader/svgmasknode.hxx b/svgio/inc/svgio/svgreader/svgmasknode.hxx
index 231aa179aa9f..84c4bb1de38a 100644
--- a/svgio/inc/svgio/svgreader/svgmasknode.hxx
+++ b/svgio/inc/svgio/svgreader/svgmasknode.hxx
@@ -50,11 +50,11 @@ namespace svgio
virtual const SvgStyleAttributes* getSvgStyleAttributes() const override;
virtual void parseAttribute(const OUString& rTokenName, SVGToken aSVGToken, const OUString& aContent) override;
- virtual void decomposeSvgNode(drawinglayer::primitive2d::Primitive2DSequence& rTarget, bool bReferenced) const override;
+ virtual void decomposeSvgNode(drawinglayer::primitive2d::Primitive2DContainer& rTarget, bool bReferenced) const override;
/// apply contained clipPath to given geometry #i124852# transform may be needed
void apply(
- drawinglayer::primitive2d::Primitive2DSequence& rTarget,
+ drawinglayer::primitive2d::Primitive2DContainer& rTarget,
const basegfx::B2DHomMatrix* pTransform) const;
/// x content, set if found in current context
diff --git a/svgio/inc/svgio/svgreader/svgnode.hxx b/svgio/inc/svgio/svgreader/svgnode.hxx
index d951a284b20c..ab7f28a2850d 100644
--- a/svgio/inc/svgio/svgreader/svgnode.hxx
+++ b/svgio/inc/svgio/svgreader/svgnode.hxx
@@ -144,7 +144,7 @@ namespace svgio
void parseAttributes(const css::uno::Reference< css::xml::sax::XAttributeList >& xAttribs);
virtual const SvgStyleAttributes* getSvgStyleAttributes() const;
virtual void parseAttribute(const OUString& rTokenName, SVGToken aSVGToken, const OUString& aContent);
- virtual void decomposeSvgNode(drawinglayer::primitive2d::Primitive2DSequence& rTarget, bool bReferenced) const;
+ virtual void decomposeSvgNode(drawinglayer::primitive2d::Primitive2DContainer& rTarget, bool bReferenced) const;
/// #i125258# tell if this node is allowed to have a parent style (e.g. defs do not)
virtual bool supportsParentStyle() const;
diff --git a/svgio/inc/svgio/svgreader/svgpathnode.hxx b/svgio/inc/svgio/svgreader/svgpathnode.hxx
index d8645d8e50a3..0c24244455fb 100644
--- a/svgio/inc/svgio/svgreader/svgpathnode.hxx
+++ b/svgio/inc/svgio/svgreader/svgpathnode.hxx
@@ -48,7 +48,7 @@ namespace svgio
virtual const SvgStyleAttributes* getSvgStyleAttributes() const override;
virtual void parseAttribute(const OUString& rTokenName, SVGToken aSVGToken, const OUString& aContent) override;
- virtual void decomposeSvgNode(drawinglayer::primitive2d::Primitive2DSequence& rTarget, bool bReferenced) const override;
+ virtual void decomposeSvgNode(drawinglayer::primitive2d::Primitive2DContainer& rTarget, bool bReferenced) const override;
/// path content, set if found in current context
const basegfx::B2DPolyPolygon* getPath() const { return mpPolyPolygon; }
diff --git a/svgio/inc/svgio/svgreader/svgpatternnode.hxx b/svgio/inc/svgio/svgreader/svgpatternnode.hxx
index f526346609ac..a5b6870ba8fe 100644
--- a/svgio/inc/svgio/svgreader/svgpatternnode.hxx
+++ b/svgio/inc/svgio/svgreader/svgpatternnode.hxx
@@ -31,7 +31,7 @@ namespace svgio
{
private:
/// buffered decomposition
- drawinglayer::primitive2d::Primitive2DSequence aPrimitives;
+ drawinglayer::primitive2d::Primitive2DContainer aPrimitives;
/// use styles
SvgStyleAttributes maSvgStyleAttributes;
@@ -69,7 +69,7 @@ namespace svgio
void getValuesRelative(double& rfX, double& rfY, double& rfW, double& rfH, const basegfx::B2DRange& rGeoRange, SvgNode& rUser) const;
/// get pattern primitives buffered, uses decomposeSvgNode internally
- const drawinglayer::primitive2d::Primitive2DSequence& getPatternPrimitives() const;
+ const drawinglayer::primitive2d::Primitive2DContainer& getPatternPrimitives() const;
/// InfoProvider support for % values
virtual const basegfx::B2DRange getCurrentViewPort() const override;
diff --git a/svgio/inc/svgio/svgreader/svgpolynode.hxx b/svgio/inc/svgio/svgreader/svgpolynode.hxx
index 28b72305771a..0e47c7499c2e 100644
--- a/svgio/inc/svgio/svgreader/svgpolynode.hxx
+++ b/svgio/inc/svgio/svgreader/svgpolynode.hxx
@@ -50,7 +50,7 @@ namespace svgio
virtual const SvgStyleAttributes* getSvgStyleAttributes() const override;
virtual void parseAttribute(const OUString& rTokenName, SVGToken aSVGToken, const OUString& aContent) override;
- virtual void decomposeSvgNode(drawinglayer::primitive2d::Primitive2DSequence& rTarget, bool bReferenced) const override;
+ virtual void decomposeSvgNode(drawinglayer::primitive2d::Primitive2DContainer& rTarget, bool bReferenced) const override;
/// type read access
bool isPolyline() const { return mbIsPolyline; }
diff --git a/svgio/inc/svgio/svgreader/svgrectnode.hxx b/svgio/inc/svgio/svgreader/svgrectnode.hxx
index 414091305a88..f103876ab49a 100644
--- a/svgio/inc/svgio/svgreader/svgrectnode.hxx
+++ b/svgio/inc/svgio/svgreader/svgrectnode.hxx
@@ -50,7 +50,7 @@ namespace svgio
virtual const SvgStyleAttributes* getSvgStyleAttributes() const override;
virtual void parseAttribute(const OUString& rTokenName, SVGToken aSVGToken, const OUString& aContent) override;
- virtual void decomposeSvgNode(drawinglayer::primitive2d::Primitive2DSequence& rTarget, bool bReferenced) const override;
+ virtual void decomposeSvgNode(drawinglayer::primitive2d::Primitive2DContainer& rTarget, bool bReferenced) const override;
/// x content, set if found in current context
const SvgNumber& getX() const { return maX; }
diff --git a/svgio/inc/svgio/svgreader/svgstyleattributes.hxx b/svgio/inc/svgio/svgreader/svgstyleattributes.hxx
index cb1982dd3578..c227986b7d35 100644
--- a/svgio/inc/svgio/svgreader/svgstyleattributes.hxx
+++ b/svgio/inc/svgio/svgreader/svgstyleattributes.hxx
@@ -232,35 +232,35 @@ namespace svgio
/// internal helpers
void add_fillGradient(
const basegfx::B2DPolyPolygon& rPath,
- drawinglayer::primitive2d::Primitive2DSequence& rTarget,
+ drawinglayer::primitive2d::Primitive2DContainer& rTarget,
const SvgGradientNode& rFillGradient,
const basegfx::B2DRange& rGeoRange) const;
void add_fillPatternTransform(
const basegfx::B2DPolyPolygon& rPath,
- drawinglayer::primitive2d::Primitive2DSequence& rTarget,
+ drawinglayer::primitive2d::Primitive2DContainer& rTarget,
const SvgPatternNode& rFillGradient,
const basegfx::B2DRange& rGeoRange) const;
void add_fillPattern(
const basegfx::B2DPolyPolygon& rPath,
- drawinglayer::primitive2d::Primitive2DSequence& rTarget,
+ drawinglayer::primitive2d::Primitive2DContainer& rTarget,
const SvgPatternNode& rFillGradient,
const basegfx::B2DRange& rGeoRange) const;
void add_fill(
const basegfx::B2DPolyPolygon& rPath,
- drawinglayer::primitive2d::Primitive2DSequence& rTarget,
+ drawinglayer::primitive2d::Primitive2DContainer& rTarget,
const basegfx::B2DRange& rGeoRange) const;
void add_stroke(
const basegfx::B2DPolyPolygon& rPath,
- drawinglayer::primitive2d::Primitive2DSequence& rTarget,
+ drawinglayer::primitive2d::Primitive2DContainer& rTarget,
const basegfx::B2DRange& rGeoRange) const;
bool prepare_singleMarker(
- drawinglayer::primitive2d::Primitive2DSequence& rMarkerPrimitives,
+ drawinglayer::primitive2d::Primitive2DContainer& rMarkerPrimitives,
basegfx::B2DHomMatrix& rMarkerTransform,
basegfx::B2DRange& rClipRange,
const SvgMarkerNode& rMarker) const;
void add_markers(
const basegfx::B2DPolyPolygon& rPath,
- drawinglayer::primitive2d::Primitive2DSequence& rTarget,
+ drawinglayer::primitive2d::Primitive2DContainer& rTarget,
const basegfx::tools::PointIndexSet* pHelpPointIndices) const;
public:
@@ -270,15 +270,15 @@ namespace svgio
/// helper which does the necessary with a given path
void add_text(
- drawinglayer::primitive2d::Primitive2DSequence& rTarget,
- drawinglayer::primitive2d::Primitive2DSequence& rSource) const;
+ drawinglayer::primitive2d::Primitive2DContainer& rTarget,
+ drawinglayer::primitive2d::Primitive2DContainer& rSource) const;
void add_path(
const basegfx::B2DPolyPolygon& rPath,
- drawinglayer::primitive2d::Primitive2DSequence& rTarget,
+ drawinglayer::primitive2d::Primitive2DContainer& rTarget,
const basegfx::tools::PointIndexSet* pHelpPointIndices) const;
void add_postProcess(
- drawinglayer::primitive2d::Primitive2DSequence& rTarget,
- const drawinglayer::primitive2d::Primitive2DSequence& rSource,
+ drawinglayer::primitive2d::Primitive2DContainer& rTarget,
+ const drawinglayer::primitive2d::Primitive2DContainer& rSource,
const basegfx::B2DHomMatrix* pTransform) const;
/// helper to set mpCssStyleParent temporarily for CSS style hierarchies
diff --git a/svgio/inc/svgio/svgreader/svgsvgnode.hxx b/svgio/inc/svgio/svgreader/svgsvgnode.hxx
index 158c832ab2f4..15d49505bc4c 100644
--- a/svgio/inc/svgio/svgreader/svgsvgnode.hxx
+++ b/svgio/inc/svgio/svgreader/svgsvgnode.hxx
@@ -56,7 +56,7 @@ namespace svgio
virtual const SvgStyleAttributes* getSvgStyleAttributes() const override;
virtual void parseAttribute(const OUString& rTokenName, SVGToken aSVGToken, const OUString& aContent) override;
- virtual void decomposeSvgNode(drawinglayer::primitive2d::Primitive2DSequence& rTarget, bool bReferenced) const override;
+ virtual void decomposeSvgNode(drawinglayer::primitive2d::Primitive2DContainer& rTarget, bool bReferenced) const override;
/// Seeks width and height of viewport, which is current before the new viewport is set.
// needed for percentage unit in x, y, width or height
diff --git a/svgio/inc/svgio/svgreader/svgtextnode.hxx b/svgio/inc/svgio/svgreader/svgtextnode.hxx
index 6d0d5c558d00..7922f133b979 100644
--- a/svgio/inc/svgio/svgreader/svgtextnode.hxx
+++ b/svgio/inc/svgio/svgreader/svgtextnode.hxx
@@ -41,12 +41,12 @@ namespace svgio
/// local helpers
void DecomposeChild(
const SvgNode& rCandidate,
- drawinglayer::primitive2d::Primitive2DSequence& rTarget,
+ drawinglayer::primitive2d::Primitive2DContainer& rTarget,
SvgTextPosition& rSvgTextPosition) const;
static void addTextPrimitives(
const SvgNode& rCandidate,
- drawinglayer::primitive2d::Primitive2DSequence& rTarget,
- drawinglayer::primitive2d::Primitive2DSequence& rSource);
+ drawinglayer::primitive2d::Primitive2DContainer& rTarget,
+ drawinglayer::primitive2d::Primitive2DContainer& rSource);
public:
SvgTextNode(
@@ -56,7 +56,7 @@ namespace svgio
virtual const SvgStyleAttributes* getSvgStyleAttributes() const override;
virtual void parseAttribute(const OUString& rTokenName, SVGToken aSVGToken, const OUString& aContent) override;
- virtual void decomposeSvgNode(drawinglayer::primitive2d::Primitive2DSequence& rTarget, bool bReferenced) const override;
+ virtual void decomposeSvgNode(drawinglayer::primitive2d::Primitive2DContainer& rTarget, bool bReferenced) const override;
/// transform content, set if found in current context
const basegfx::B2DHomMatrix* getTransform() const { return mpaTransform; }
diff --git a/svgio/inc/svgio/svgreader/svgtextpathnode.hxx b/svgio/inc/svgio/svgreader/svgtextpathnode.hxx
index 93ed9f82825e..c0e4242ed27d 100644
--- a/svgio/inc/svgio/svgreader/svgtextpathnode.hxx
+++ b/svgio/inc/svgio/svgreader/svgtextpathnode.hxx
@@ -54,8 +54,8 @@ namespace svgio
virtual const SvgStyleAttributes* getSvgStyleAttributes() const override;
virtual void parseAttribute(const OUString& rTokenName, SVGToken aSVGToken, const OUString& aContent) override;
void decomposePathNode(
- const drawinglayer::primitive2d::Primitive2DSequence& rPathContent,
- drawinglayer::primitive2d::Primitive2DSequence& rTarget,
+ const drawinglayer::primitive2d::Primitive2DContainer& rPathContent,
+ drawinglayer::primitive2d::Primitive2DContainer& rTarget,
const basegfx::B2DPoint& rTextStart) const;
bool isValid() const;
diff --git a/svgio/inc/svgio/svgreader/svgusenode.hxx b/svgio/inc/svgio/svgreader/svgusenode.hxx
index 4f788db09bdb..d235747e5ff4 100644
--- a/svgio/inc/svgio/svgreader/svgusenode.hxx
+++ b/svgio/inc/svgio/svgreader/svgusenode.hxx
@@ -52,7 +52,7 @@ namespace svgio
virtual const SvgStyleAttributes* getSvgStyleAttributes() const override;
virtual void parseAttribute(const OUString& rTokenName, SVGToken aSVGToken, const OUString& aContent) override;
- virtual void decomposeSvgNode(drawinglayer::primitive2d::Primitive2DSequence& rTarget, bool bReferenced) const override;
+ virtual void decomposeSvgNode(drawinglayer::primitive2d::Primitive2DContainer& rTarget, bool bReferenced) const override;
/// transform content
const basegfx::B2DHomMatrix* getTransform() const { return mpaTransform; }
diff --git a/svgio/qa/cppunit/SvgImportTest.cxx b/svgio/qa/cppunit/SvgImportTest.cxx
index 4b87b501a274..3c40e3e21df5 100644
--- a/svgio/qa/cppunit/SvgImportTest.cxx
+++ b/svgio/qa/cppunit/SvgImportTest.cxx
@@ -15,6 +15,7 @@
#include <comphelper/processfactory.hxx>
#include <comphelper/seqstream.hxx>
+#include <comphelper/sequence.hxx>
#include <com/sun/star/graphic/SvgTools.hpp>
#include <com/sun/star/graphic/Primitive2DTools.hpp>
@@ -32,6 +33,7 @@ using namespace css::io;
using namespace css::graphic;
using drawinglayer::primitive2d::arePrimitive2DSequencesEqual;
using drawinglayer::primitive2d::Primitive2DSequence;
+using drawinglayer::primitive2d::Primitive2DContainer;
class Test : public test::BootstrapFixture, public XmlTestTools
{
@@ -84,7 +86,7 @@ void Test::tearDown()
void Test::checkRectPrimitive(Primitive2DSequence& rPrimitive)
{
Primitive2dXmlDump dumper;
- xmlDocPtr pDocument = dumper.dumpAndParse(rPrimitive);
+ xmlDocPtr pDocument = dumper.dumpAndParse(comphelper::sequenceToContainer<Primitive2DContainer>(rPrimitive));
CPPUNIT_ASSERT (pDocument);
@@ -126,7 +128,7 @@ void Test::testTdf87309()
CPPUNIT_ASSERT_EQUAL(1, (int)aSequenceTdf87309.getLength());
Primitive2dXmlDump dumper;
- xmlDocPtr pDocument = dumper.dumpAndParse(aSequenceTdf87309);
+ xmlDocPtr pDocument = dumper.dumpAndParse(comphelper::sequenceToContainer<Primitive2DContainer>(aSequenceTdf87309));
CPPUNIT_ASSERT (pDocument);
diff --git a/svgio/source/svgreader/svgcharacternode.cxx b/svgio/source/svgreader/svgcharacternode.cxx
index 3e09e9ec5c8b..b2b127fd1d37 100644
--- a/svgio/source/svgreader/svgcharacternode.cxx
+++ b/svgio/source/svgreader/svgcharacternode.cxx
@@ -501,7 +501,7 @@ namespace svgio
}
void SvgCharacterNode::decomposeTextWithStyle(
- drawinglayer::primitive2d::Primitive2DSequence& rTarget,
+ drawinglayer::primitive2d::Primitive2DContainer& rTarget,
SvgTextPosition& rSvgTextPosition,
const SvgStyleAttributes& rSvgStyleAttributes) const
{
@@ -514,7 +514,7 @@ namespace svgio
{
if(!rSvgTextPosition.isRotated())
{
- drawinglayer::primitive2d::appendPrimitive2DReferenceToPrimitive2DSequence(rTarget, xRef);
+ rTarget.push_back(xRef);
}
else
{
@@ -525,12 +525,12 @@ namespace svgio
if(pCandidate)
{
const localTextBreakupHelper alocalTextBreakupHelper(*pCandidate, rSvgTextPosition);
- const drawinglayer::primitive2d::Primitive2DSequence aResult(
+ const drawinglayer::primitive2d::Primitive2DContainer aResult(
alocalTextBreakupHelper.getResult());
- if(aResult.hasElements())
+ if(!aResult.empty())
{
- drawinglayer::primitive2d::appendPrimitive2DSequenceToPrimitive2DSequence(rTarget, aResult);
+ rTarget.append(aResult);
}
// also consume for the implied single space
@@ -566,7 +566,7 @@ namespace svgio
maText += rText;
}
- void SvgCharacterNode::decomposeText(drawinglayer::primitive2d::Primitive2DSequence& rTarget, SvgTextPosition& rSvgTextPosition) const
+ void SvgCharacterNode::decomposeText(drawinglayer::primitive2d::Primitive2DContainer& rTarget, SvgTextPosition& rSvgTextPosition) const
{
if(!getText().isEmpty())
{
diff --git a/svgio/source/svgreader/svgcirclenode.cxx b/svgio/source/svgreader/svgcirclenode.cxx
index 14988eae9760..3ac0d0b93cf4 100644
--- a/svgio/source/svgreader/svgcirclenode.cxx
+++ b/svgio/source/svgreader/svgcirclenode.cxx
@@ -113,7 +113,7 @@ namespace svgio
}
}
- void SvgCircleNode::decomposeSvgNode(drawinglayer::primitive2d::Primitive2DSequence& rTarget, bool /*bReferenced*/) const
+ void SvgCircleNode::decomposeSvgNode(drawinglayer::primitive2d::Primitive2DContainer& rTarget, bool /*bReferenced*/) const
{
const SvgStyleAttributes* pStyle = getSvgStyleAttributes();
@@ -130,11 +130,11 @@ namespace svgio
getCy().isSet() ? getCy().solve(*this, ycoordinate) : 0.0),
fR));
- drawinglayer::primitive2d::Primitive2DSequence aNewTarget;
+ drawinglayer::primitive2d::Primitive2DContainer aNewTarget;
pStyle->add_path(basegfx::B2DPolyPolygon(aPath), aNewTarget, nullptr);
- if(aNewTarget.hasElements())
+ if(!aNewTarget.empty())
{
pStyle->add_postProcess(rTarget, aNewTarget, getTransform());
}
diff --git a/svgio/source/svgreader/svgclippathnode.cxx b/svgio/source/svgreader/svgclippathnode.cxx
index 5064933a97b0..ada214bc8360 100644
--- a/svgio/source/svgreader/svgclippathnode.cxx
+++ b/svgio/source/svgreader/svgclippathnode.cxx
@@ -98,14 +98,14 @@ namespace svgio
}
}
- void SvgClipPathNode::decomposeSvgNode(drawinglayer::primitive2d::Primitive2DSequence& rTarget, bool bReferenced) const
+ void SvgClipPathNode::decomposeSvgNode(drawinglayer::primitive2d::Primitive2DContainer& rTarget, bool bReferenced) const
{
- drawinglayer::primitive2d::Primitive2DSequence aNewTarget;
+ drawinglayer::primitive2d::Primitive2DContainer aNewTarget;
// decompose children
SvgNode::decomposeSvgNode(aNewTarget, bReferenced);
- if(aNewTarget.hasElements())
+ if(!aNewTarget.empty())
{
if(getTransform())
{
@@ -115,30 +115,30 @@ namespace svgio
*getTransform(),
aNewTarget));
- drawinglayer::primitive2d::appendPrimitive2DReferenceToPrimitive2DSequence(rTarget, xRef);
+ rTarget.push_back(xRef);
}
else
{
// append to current target
- drawinglayer::primitive2d::appendPrimitive2DSequenceToPrimitive2DSequence(rTarget, aNewTarget);
+ rTarget.append(aNewTarget);
}
}
}
void SvgClipPathNode::apply(
- drawinglayer::primitive2d::Primitive2DSequence& rContent,
+ drawinglayer::primitive2d::Primitive2DContainer& rContent,
const basegfx::B2DHomMatrix* pTransform) const
{
- if(rContent.hasElements() && Display_none != getDisplay())
+ if(!rContent.empty() && Display_none != getDisplay())
{
const drawinglayer::geometry::ViewInformation2D aViewInformation2D;
- drawinglayer::primitive2d::Primitive2DSequence aClipTarget;
+ drawinglayer::primitive2d::Primitive2DContainer aClipTarget;
basegfx::B2DPolyPolygon aClipPolyPolygon;
// get clipPath definition as primitives
decomposeSvgNode(aClipTarget, true);
- if(aClipTarget.hasElements())
+ if(!aClipTarget.empty())
{
// extract filled polygons as base for a mask PolyPolygon
drawinglayer::processor2d::ContourExtractor2D aExtractor(aViewInformation2D, true);
@@ -164,10 +164,7 @@ namespace svgio
if(objectBoundingBox == getClipPathUnits())
{
// clip is object-relative, transform using content transformation
- const basegfx::B2DRange aContentRange(
- drawinglayer::primitive2d::getB2DRangeFromPrimitive2DSequence(
- rContent,
- aViewInformation2D));
+ const basegfx::B2DRange aContentRange(rContent.getB2DRange(aViewInformation2D));
aClipPolyPolygon.transform(
basegfx::tools::createScaleTranslateB2DHomMatrix(
@@ -194,8 +191,7 @@ namespace svgio
// if the content is completely inside or outside of it; get ranges
const basegfx::B2DRange aClipRange(aClipPolyPolygon.getB2DRange());
const basegfx::B2DRange aContentRange(
- drawinglayer::primitive2d::getB2DRangeFromPrimitive2DSequence(
- rContent,
+ rContent.getB2DRange(
aViewInformation2D));
if(aClipRange.isInside(aContentRange))
@@ -243,13 +239,13 @@ namespace svgio
aClipPolyPolygon,
rContent));
- rContent = drawinglayer::primitive2d::Primitive2DSequence(&xEmbedTransparence, 1);
+ rContent = drawinglayer::primitive2d::Primitive2DContainer { xEmbedTransparence };
}
else
{
if(!bAddContent)
{
- rContent.realloc(0);
+ rContent.clear();
}
}
}
@@ -257,7 +253,7 @@ namespace svgio
{
// An empty clipping path will completely clip away the element that had
// the clip-path property applied. (Svg spec)
- rContent.realloc(0);
+ rContent.clear();
}
}
}
diff --git a/svgio/source/svgreader/svgellipsenode.cxx b/svgio/source/svgreader/svgellipsenode.cxx
index 571f8aac6e1c..2f0b12df1565 100644
--- a/svgio/source/svgreader/svgellipsenode.cxx
+++ b/svgio/source/svgreader/svgellipsenode.cxx
@@ -127,7 +127,7 @@ namespace svgio
}
}
- void SvgEllipseNode::decomposeSvgNode(drawinglayer::primitive2d::Primitive2DSequence& rTarget, bool /*bReferenced*/) const
+ void SvgEllipseNode::decomposeSvgNode(drawinglayer::primitive2d::Primitive2DContainer& rTarget, bool /*bReferenced*/) const
{
const SvgStyleAttributes* pStyle = getSvgStyleAttributes();
@@ -145,11 +145,11 @@ namespace svgio
getCy().isSet() ? getCy().solve(*this, ycoordinate) : 0.0),
fRx, fRy));
- drawinglayer::primitive2d::Primitive2DSequence aNewTarget;
+ drawinglayer::primitive2d::Primitive2DContainer aNewTarget;
pStyle->add_path(basegfx::B2DPolyPolygon(aPath), aNewTarget, nullptr);
- if(aNewTarget.hasElements())
+ if(!aNewTarget.empty())
{
pStyle->add_postProcess(rTarget, aNewTarget, getTransform());
}
diff --git a/svgio/source/svgreader/svggnode.cxx b/svgio/source/svgreader/svggnode.cxx
index d59865a92f0c..a4bc674c580f 100644
--- a/svgio/source/svgreader/svggnode.cxx
+++ b/svgio/source/svgreader/svggnode.cxx
@@ -88,7 +88,7 @@ namespace svgio
}
}
- void SvgGNode::decomposeSvgNode(drawinglayer::primitive2d::Primitive2DSequence& rTarget, bool bReferenced) const
+ void SvgGNode::decomposeSvgNode(drawinglayer::primitive2d::Primitive2DContainer& rTarget, bool bReferenced) const
{
if(SVGTokenDefs == getType())
{
@@ -106,12 +106,12 @@ namespace svgio
if(fOpacity > 0.0 && Display_none != getDisplay())
{
- drawinglayer::primitive2d::Primitive2DSequence aContent;
+ drawinglayer::primitive2d::Primitive2DContainer aContent;
// decompose children
SvgNode::decomposeSvgNode(aContent, bReferenced);
- if(aContent.hasElements())
+ if(!aContent.empty())
{
pStyle->add_postProcess(rTarget, aContent, getTransform());
}
diff --git a/svgio/source/svgreader/svgimagenode.cxx b/svgio/source/svgreader/svgimagenode.cxx
index 91286fa0b199..a53798a45d24 100644
--- a/svgio/source/svgreader/svgimagenode.cxx
+++ b/svgio/source/svgreader/svgimagenode.cxx
@@ -161,7 +161,7 @@ namespace svgio
void extractFromGraphic(
const Graphic& rGraphic,
- drawinglayer::primitive2d::Primitive2DSequence& rEmbedded,
+ drawinglayer::primitive2d::Primitive2DContainer& rEmbedded,
basegfx::B2DRange& rViewBox,
BitmapEx& rBitmapEx)
{
@@ -188,7 +188,7 @@ namespace svgio
}
}
- void SvgImageNode::decomposeSvgNode(drawinglayer::primitive2d::Primitive2DSequence& rTarget, bool /*bReferenced*/) const
+ void SvgImageNode::decomposeSvgNode(drawinglayer::primitive2d::Primitive2DContainer& rTarget, bool /*bReferenced*/) const
{
// get size range and create path
const SvgStyleAttributes* pStyle = getSvgStyleAttributes();
@@ -201,7 +201,7 @@ namespace svgio
if(fWidth > 0.0 && fHeight > 0.0)
{
BitmapEx aBitmapEx;
- drawinglayer::primitive2d::Primitive2DSequence aNewTarget;
+ drawinglayer::primitive2d::Primitive2DContainer aNewTarget;
// prepare Target and ViewBox for evtl. AspectRatio mappings
const double fX(getX().isSet() ? getX().solve(*this, xcoordinate) : 0.0);
@@ -264,11 +264,9 @@ namespace svgio
{
mpXLink->decomposeSvgNode(aNewTarget, true);
- if(aNewTarget.hasElements())
+ if(!aNewTarget.empty())
{
- aViewBox = drawinglayer::primitive2d::getB2DRangeFromPrimitive2DSequence(
- aNewTarget,
- drawinglayer::geometry::ViewInformation2D());
+ aViewBox = aNewTarget.getB2DRange(drawinglayer::geometry::ViewInformation2D());
}
}
}
@@ -276,7 +274,7 @@ namespace svgio
if(!aBitmapEx.IsEmpty())
{
// create content from created bitmap
- aNewTarget.realloc(1);
+ aNewTarget.resize(1);
aNewTarget[0] = new drawinglayer::primitive2d::BitmapPrimitive2D(
aBitmapEx,
basegfx::B2DHomMatrix());
@@ -285,12 +283,12 @@ namespace svgio
aViewBox = basegfx::B2DRange(0.0, 0.0, 1.0, 1.0);
}
- if(aNewTarget.hasElements())
+ if(!aNewTarget.empty())
{
if(aTarget.equal(aViewBox))
{
// just add to rTarget
- drawinglayer::primitive2d::appendPrimitive2DSequenceToPrimitive2DSequence(rTarget, aNewTarget);
+ rTarget.append(aNewTarget);
}
else
{
@@ -309,7 +307,7 @@ namespace svgio
aEmbeddingTransform,
aNewTarget));
- aNewTarget = drawinglayer::primitive2d::Primitive2DSequence(&xRef, 1);
+ aNewTarget = drawinglayer::primitive2d::Primitive2DContainer { xRef };
}
if(!rRatio.isMeetOrSlice())
@@ -321,7 +319,7 @@ namespace svgio
basegfx::tools::createPolygonFromRect(aTarget)),
aNewTarget));
- aNewTarget = drawinglayer::primitive2d::Primitive2DSequence(&xMask, 1);
+ aNewTarget = drawinglayer::primitive2d::Primitive2DContainer { xMask };
}
}
else
@@ -336,7 +334,7 @@ namespace svgio
aEmbeddingTransform,
aNewTarget));
- aNewTarget = drawinglayer::primitive2d::Primitive2DSequence(&xRef, 1);
+ aNewTarget = drawinglayer::primitive2d::Primitive2DContainer { xRef };
}
}
diff --git a/svgio/source/svgreader/svglinenode.cxx b/svgio/source/svgreader/svglinenode.cxx
index 5c2327c5111a..6d184807702a 100644
--- a/svgio/source/svgreader/svglinenode.cxx
+++ b/svgio/source/svgreader/svglinenode.cxx
@@ -121,7 +121,7 @@ namespace svgio
}
}
- void SvgLineNode::decomposeSvgNode(drawinglayer::primitive2d::Primitive2DSequence& rTarget, bool /*bReferenced*/) const
+ void SvgLineNode::decomposeSvgNode(drawinglayer::primitive2d::Primitive2DContainer& rTarget, bool /*bReferenced*/) const
{
const SvgStyleAttributes* pStyle = getSvgStyleAttributes();
@@ -141,11 +141,11 @@ namespace svgio
aPath.append(X);
aPath.append(Y);
- drawinglayer::primitive2d::Primitive2DSequence aNewTarget;
+ drawinglayer::primitive2d::Primitive2DContainer aNewTarget;
pStyle->add_path(basegfx::B2DPolyPolygon(aPath), aNewTarget, nullptr);
- if(aNewTarget.hasElements())
+ if(!aNewTarget.empty())
{
pStyle->add_postProcess(rTarget, aNewTarget, getTransform());
}
diff --git a/svgio/source/svgreader/svgmarkernode.cxx b/svgio/source/svgreader/svgmarkernode.cxx
index 031b35c7c377..c0c2dc76ebcf 100644
--- a/svgio/source/svgreader/svgmarkernode.cxx
+++ b/svgio/source/svgreader/svgmarkernode.cxx
@@ -173,9 +173,9 @@ namespace svgio
}
}
- const drawinglayer::primitive2d::Primitive2DSequence& SvgMarkerNode::getMarkerPrimitives() const
+ const drawinglayer::primitive2d::Primitive2DContainer& SvgMarkerNode::getMarkerPrimitives() const
{
- if(!aPrimitives.hasElements() && Display_none != getDisplay())
+ if(aPrimitives.empty() && Display_none != getDisplay())
{
decomposeSvgNode(const_cast< SvgMarkerNode* >(this)->aPrimitives, true);
}
diff --git a/svgio/source/svgreader/svgmasknode.cxx b/svgio/source/svgreader/svgmasknode.cxx
index ae2068be98eb..bf72eaca25d1 100644
--- a/svgio/source/svgreader/svgmasknode.cxx
+++ b/svgio/source/svgreader/svgmasknode.cxx
@@ -165,14 +165,14 @@ namespace svgio
}
}
- void SvgMaskNode::decomposeSvgNode(drawinglayer::primitive2d::Primitive2DSequence& rTarget, bool bReferenced) const
+ void SvgMaskNode::decomposeSvgNode(drawinglayer::primitive2d::Primitive2DContainer& rTarget, bool bReferenced) const
{
- drawinglayer::primitive2d::Primitive2DSequence aNewTarget;
+ drawinglayer::primitive2d::Primitive2DContainer aNewTarget;
// decompose children
SvgNode::decomposeSvgNode(aNewTarget, bReferenced);
- if(aNewTarget.hasElements())
+ if(!aNewTarget.empty())
{
if(getTransform())
{
@@ -182,32 +182,31 @@ namespace svgio
*getTransform(),
aNewTarget));
- aNewTarget = drawinglayer::primitive2d::Primitive2DSequence(&xRef, 1);
+ aNewTarget = drawinglayer::primitive2d::Primitive2DContainer { xRef };
}
// append to current target
- drawinglayer::primitive2d::appendPrimitive2DSequenceToPrimitive2DSequence(rTarget, aNewTarget);
+ rTarget.append(aNewTarget);
}
}
void SvgMaskNode::apply(
- drawinglayer::primitive2d::Primitive2DSequence& rTarget,
+ drawinglayer::primitive2d::Primitive2DContainer& rTarget,
const basegfx::B2DHomMatrix* pTransform) const
{
- if(rTarget.hasElements() && Display_none != getDisplay())
+ if(!rTarget.empty() && Display_none != getDisplay())
{
- drawinglayer::primitive2d::Primitive2DSequence aMaskTarget;
+ drawinglayer::primitive2d::Primitive2DContainer aMaskTarget;
// get mask definition as primitives
decomposeSvgNode(aMaskTarget, true);
- if(aMaskTarget.hasElements())
+ if(!aMaskTarget.empty())
{
// get range of content to be masked
const basegfx::B2DRange aContentRange(
- drawinglayer::primitive2d::getB2DRangeFromPrimitive2DSequence(
- rTarget,
- drawinglayer::geometry::ViewInformation2D()));
+ rTarget.getB2DRange(
+ drawinglayer::geometry::ViewInformation2D()));
const double fContentWidth(aContentRange.getWidth());
const double fContentHeight(aContentRange.getHeight());
@@ -252,7 +251,7 @@ namespace svgio
aContentRange.getMinimum()),
aMaskTarget));
- aMaskTarget = drawinglayer::primitive2d::Primitive2DSequence(&xTransform, 1);
+ aMaskTarget = drawinglayer::primitive2d::Primitive2DContainer { xTransform };
}
else // userSpaceOnUse
{
@@ -264,7 +263,7 @@ namespace svgio
*pTransform,
aMaskTarget));
- aMaskTarget = drawinglayer::primitive2d::Primitive2DSequence(&xTransform, 1);
+ aMaskTarget = drawinglayer::primitive2d::Primitive2DContainer { xTransform };
}
}
@@ -277,7 +276,7 @@ namespace svgio
basegfx::BColorModifierSharedPtr(
new basegfx::BColorModifier_luminance_to_alpha())));
- aMaskTarget = drawinglayer::primitive2d::Primitive2DSequence(&xInverseMask, 1);
+ aMaskTarget = drawinglayer::primitive2d::Primitive2DContainer { xInverseMask };
}
// prepare new content
@@ -295,24 +294,24 @@ namespace svgio
basegfx::B2DPolyPolygon(
basegfx::tools::createPolygonFromRect(
aOffscreenBufferRange)),
- drawinglayer::primitive2d::Primitive2DSequence(&xNewContent, 1));
+ drawinglayer::primitive2d::Primitive2DContainer { xNewContent });
}
// redefine target. Use TransparencePrimitive2D with created mask
// geometry
- rTarget = drawinglayer::primitive2d::Primitive2DSequence(&xNewContent, 1);
+ rTarget = drawinglayer::primitive2d::Primitive2DContainer { xNewContent };
}
else
{
// content is geometrically empty
- rTarget.realloc(0);
+ rTarget.clear();
}
}
else
{
// An empty clipping path will completely clip away the element that had
// the clip-path property applied. (Svg spec)
- rTarget.realloc(0);
+ rTarget.clear();
}
}
}
diff --git a/svgio/source/svgreader/svgnode.cxx b/svgio/source/svgreader/svgnode.cxx
index d2b6532f2319..f08d2b2e36f1 100644
--- a/svgio/source/svgreader/svgnode.cxx
+++ b/svgio/source/svgreader/svgnode.cxx
@@ -485,7 +485,7 @@ namespace svgio
}
}
- void SvgNode::decomposeSvgNode(drawinglayer::primitive2d::Primitive2DSequence& rTarget, bool bReferenced) const
+ void SvgNode::decomposeSvgNode(drawinglayer::primitive2d::Primitive2DContainer& rTarget, bool bReferenced) const
{
if(Display_none == getDisplay())
{
@@ -537,12 +537,12 @@ namespace svgio
// - all non-terminal nodes (might contain visible nodes down the hierarchy)
if( !rGrandChildren.empty() || ( pChildStyles && (Visibility_visible == pChildStyles->getVisibility())) )
{
- drawinglayer::primitive2d::Primitive2DSequence aNewTarget;
+ drawinglayer::primitive2d::Primitive2DContainer aNewTarget;
pCandidate->decomposeSvgNode(aNewTarget, bReferenced);
- if(aNewTarget.hasElements())
+ if(!aNewTarget.empty())
{
- drawinglayer::primitive2d::appendPrimitive2DSequenceToPrimitive2DSequence(rTarget, aNewTarget);
+ rTarget.append(aNewTarget);
}
}
}
@@ -552,7 +552,7 @@ namespace svgio
}
}
- if(rTarget.hasElements())
+ if(!rTarget.empty())
{
const SvgStyleAttributes* pStyles = getSvgStyleAttributes();
if(pStyles)
@@ -590,7 +590,7 @@ namespace svgio
rTitle,
rDesc));
- rTarget = drawinglayer::primitive2d::Primitive2DSequence(&xRef, 1);
+ rTarget = drawinglayer::primitive2d::Primitive2DContainer { xRef };
}
}
}
diff --git a/svgio/source/svgreader/svgpathnode.cxx b/svgio/source/svgreader/svgpathnode.cxx
index 54ae47137689..818a98c32034 100644
--- a/svgio/source/svgreader/svgpathnode.cxx
+++ b/svgio/source/svgreader/svgpathnode.cxx
@@ -102,18 +102,18 @@ namespace svgio
}
}
- void SvgPathNode::decomposeSvgNode(drawinglayer::primitive2d::Primitive2DSequence& rTarget, bool /*bReferenced*/) const
+ void SvgPathNode::decomposeSvgNode(drawinglayer::primitive2d::Primitive2DContainer& rTarget, bool /*bReferenced*/) const
{
// fill and/or stroke needed, also a path
const SvgStyleAttributes* pStyle = getSvgStyleAttributes();
if(pStyle && getPath())
{
- drawinglayer::primitive2d::Primitive2DSequence aNewTarget;
+ drawinglayer::primitive2d::Primitive2DContainer aNewTarget;
pStyle->add_path(*getPath(), aNewTarget, &maHelpPointIndices);
- if(aNewTarget.hasElements())
+ if(!aNewTarget.empty())
{
pStyle->add_postProcess(rTarget, aNewTarget, getTransform());
}
diff --git a/svgio/source/svgreader/svgpatternnode.cxx b/svgio/source/svgreader/svgpatternnode.cxx
index 4167da883361..c99c4f112a69 100644
--- a/svgio/source/svgreader/svgpatternnode.cxx
+++ b/svgio/source/svgreader/svgpatternnode.cxx
@@ -264,14 +264,14 @@ namespace svgio
}
}
- const drawinglayer::primitive2d::Primitive2DSequence& SvgPatternNode::getPatternPrimitives() const
+ const drawinglayer::primitive2d::Primitive2DContainer& SvgPatternNode::getPatternPrimitives() const
{
- if(!aPrimitives.hasElements() && Display_none != getDisplay())
+ if(aPrimitives.empty() && Display_none != getDisplay())
{
decomposeSvgNode(const_cast< SvgPatternNode* >(this)->aPrimitives, true);
}
- if(!aPrimitives.hasElements() && !maXLink.isEmpty())
+ if(aPrimitives.empty() && !maXLink.isEmpty())
{
const_cast< SvgPatternNode* >(this)->tryToFindLink();
diff --git a/svgio/source/svgreader/svgpolynode.cxx b/svgio/source/svgreader/svgpolynode.cxx
index 6b3ebb1562c7..fe9efd1c273b 100644
--- a/svgio/source/svgreader/svgpolynode.cxx
+++ b/svgio/source/svgreader/svgpolynode.cxx
@@ -100,17 +100,17 @@ namespace svgio
}
}
- void SvgPolyNode::decomposeSvgNode(drawinglayer::primitive2d::Primitive2DSequence& rTarget, bool /*bReferenced*/) const
+ void SvgPolyNode::decomposeSvgNode(drawinglayer::primitive2d::Primitive2DContainer& rTarget, bool /*bReferenced*/) const
{
const SvgStyleAttributes* pStyle = getSvgStyleAttributes();
if(pStyle && getPolygon())
{
- drawinglayer::primitive2d::Primitive2DSequence aNewTarget;
+ drawinglayer::primitive2d::Primitive2DContainer aNewTarget;
pStyle->add_path(basegfx::B2DPolyPolygon(*getPolygon()), aNewTarget, nullptr);
- if(aNewTarget.hasElements())
+ if(!aNewTarget.empty())
{
pStyle->add_postProcess(rTarget, aNewTarget, getTransform());
}
diff --git a/svgio/source/svgreader/svgrectnode.cxx b/svgio/source/svgreader/svgrectnode.cxx
index 170fb913b639..7b826362fdff 100644
--- a/svgio/source/svgreader/svgrectnode.cxx
+++ b/svgio/source/svgreader/svgrectnode.cxx
@@ -155,7 +155,7 @@ namespace svgio
}
}
- void SvgRectNode::decomposeSvgNode(drawinglayer::primitive2d::Primitive2DSequence& rTarget, bool /*bReferenced*/) const
+ void SvgRectNode::decomposeSvgNode(drawinglayer::primitive2d::Primitive2DContainer& rTarget, bool /*bReferenced*/) const
{
// get size range and create path
const SvgStyleAttributes* pStyle = getSvgStyleAttributes();
@@ -202,11 +202,11 @@ namespace svgio
aPath = basegfx::tools::createPolygonFromRect(aRange);
}
- drawinglayer::primitive2d::Primitive2DSequence aNewTarget;
+ drawinglayer::primitive2d::Primitive2DContainer aNewTarget;
pStyle->add_path(basegfx::B2DPolyPolygon(aPath), aNewTarget, nullptr);
- if(aNewTarget.hasElements())
+ if(!aNewTarget.empty())
{
pStyle->add_postProcess(rTarget, aNewTarget, getTransform());
}
diff --git a/svgio/source/svgreader/svgstyleattributes.cxx b/svgio/source/svgreader/svgstyleattributes.cxx
index 6c2fef789404..1c93bd96fc05 100644
--- a/svgio/source/svgreader/svgstyleattributes.cxx
+++ b/svgio/source/svgreader/svgstyleattributes.cxx
@@ -252,10 +252,10 @@ namespace svgio
}
void SvgStyleAttributes::add_text(
- drawinglayer::primitive2d::Primitive2DSequence& rTarget,
- drawinglayer::primitive2d::Primitive2DSequence& rSource) const
+ drawinglayer::primitive2d::Primitive2DContainer& rTarget,
+ drawinglayer::primitive2d::Primitive2DContainer& rSource) const
{
- if(rSource.hasElements())
+ if(!rSource.empty())
{
// at this point the primitives in rSource are of type TextSimplePortionPrimitive2D
// or TextDecoratedPortionPrimitive2D and have the Fill Color (pAttributes->getFill())
@@ -315,7 +315,7 @@ namespace svgio
else if(pFill)
{
// add the already prepared primitives for single color fill
- drawinglayer::primitive2d::appendPrimitive2DSequenceToPrimitive2DSequence(rTarget, rSource);
+ rTarget.append(rSource);
}
// add stroke
@@ -329,7 +329,7 @@ namespace svgio
void SvgStyleAttributes::add_fillGradient(
const basegfx::B2DPolyPolygon& rPath,
- drawinglayer::primitive2d::Primitive2DSequence& rTarget,
+ drawinglayer::primitive2d::Primitive2DContainer& rTarget,
const SvgGradientNode& rFillGradient,
const basegfx::B2DRange& rGeoRange) const
{
@@ -388,8 +388,7 @@ namespace svgio
aEnd *= aGeoToUnit;
}
- drawinglayer::primitive2d::appendPrimitive2DReferenceToPrimitive2DSequence(
- rTarget,
+ rTarget.push_back(
new drawinglayer::primitive2d::SvgLinearGradientPrimitive2D(
aGradientTransform,
rPath,
@@ -450,8 +449,7 @@ namespace svgio
}
}
- drawinglayer::primitive2d::appendPrimitive2DReferenceToPrimitive2DSequence(
- rTarget,
+ rTarget.push_back(
new drawinglayer::primitive2d::SvgRadialGradientPrimitive2D(
aGradientTransform,
rPath,
@@ -467,7 +465,7 @@ namespace svgio
void SvgStyleAttributes::add_fillPatternTransform(
const basegfx::B2DPolyPolygon& rPath,
- drawinglayer::primitive2d::Primitive2DSequence& rTarget,
+ drawinglayer::primitive2d::Primitive2DContainer& rTarget,
const SvgPatternNode& rFillPattern,
const basegfx::B2DRange& rGeoRange) const
{
@@ -478,16 +476,15 @@ namespace svgio
// path and back-transforming the result
basegfx::B2DPolyPolygon aPath(rPath);
basegfx::B2DHomMatrix aInv(*rFillPattern.getPatternTransform());
- drawinglayer::primitive2d::Primitive2DSequence aNewTarget;
+ drawinglayer::primitive2d::Primitive2DContainer aNewTarget;
aInv.invert();
aPath.transform(aInv);
add_fillPattern(aPath, aNewTarget, rFillPattern, aPath.getB2DRange());
- if(aNewTarget.hasElements())
+ if(!aNewTarget.empty())
{
- drawinglayer::primitive2d::appendPrimitive2DReferenceToPrimitive2DSequence(
- rTarget,
+ rTarget.push_back(
new drawinglayer::primitive2d::TransformPrimitive2D(
*rFillPattern.getPatternTransform(),
aNewTarget));
@@ -502,14 +499,14 @@ namespace svgio
void SvgStyleAttributes::add_fillPattern(
const basegfx::B2DPolyPolygon& rPath,
- drawinglayer::primitive2d::Primitive2DSequence& rTarget,
+ drawinglayer::primitive2d::Primitive2DContainer& rTarget,
const SvgPatternNode& rFillPattern,
const basegfx::B2DRange& rGeoRange) const
{
// fill polyPolygon with given pattern
- const drawinglayer::primitive2d::Primitive2DSequence& rPrimitives = rFillPattern.getPatternPrimitives();
+ const drawinglayer::primitive2d::Primitive2DContainer& rPrimitives = rFillPattern.getPatternPrimitives();
- if(rPrimitives.hasElements())
+ if(!rPrimitives.empty())
{
double fTargetWidth(rGeoRange.getWidth());
double fTargetHeight(rGeoRange.getHeight());
@@ -567,7 +564,7 @@ namespace svgio
}
// apply aMapPrimitivesToUnitRange to content when used
- drawinglayer::primitive2d::Primitive2DSequence aPrimitives(rPrimitives);
+ drawinglayer::primitive2d::Primitive2DContainer aPrimitives(rPrimitives);
if(!aMapPrimitivesToUnitRange.isIdentity())
{
@@ -576,12 +573,11 @@ namespace svgio
aMapPrimitivesToUnitRange,
aPrimitives));
- aPrimitives = drawinglayer::primitive2d::Primitive2DSequence(&xRef, 1);
+ aPrimitives = drawinglayer::primitive2d::Primitive2DContainer { xRef };
}
// embed in PatternFillPrimitive2D
- drawinglayer::primitive2d::appendPrimitive2DReferenceToPrimitive2DSequence(
- rTarget,
+ rTarget.push_back(
new drawinglayer::primitive2d::PatternFillPrimitive2D(
rPath,
aPrimitives,
@@ -593,7 +589,7 @@ namespace svgio
void SvgStyleAttributes::add_fill(
const basegfx::B2DPolyPolygon& rPath,
- drawinglayer::primitive2d::Primitive2DSequence& rTarget,
+ drawinglayer::primitive2d::Primitive2DContainer& rTarget,
const basegfx::B2DRange& rGeoRange) const
{
const basegfx::BColor* pFill = getFill();
@@ -606,7 +602,7 @@ namespace svgio
if(basegfx::fTools::more(fFillOpacity, 0.0))
{
- drawinglayer::primitive2d::Primitive2DSequence aNewFill;
+ drawinglayer::primitive2d::Primitive2DContainer aNewFill;
if(pFillGradient)
{
@@ -621,19 +617,18 @@ namespace svgio
else // if(pFill)
{
// create fill content
- aNewFill.realloc(1);
+ aNewFill.resize(1);
aNewFill[0] = new drawinglayer::primitive2d::PolyPolygonColorPrimitive2D(
rPath,
*pFill);
}
- if(aNewFill.hasElements())
+ if(!aNewFill.empty())
{
if(basegfx::fTools::less(fFillOpacity, 1.0))
{
// embed in UnifiedTransparencePrimitive2D
- drawinglayer::primitive2d::appendPrimitive2DReferenceToPrimitive2DSequence(
- rTarget,
+ rTarget.push_back(
new drawinglayer::primitive2d::UnifiedTransparencePrimitive2D(
aNewFill,
1.0 - fFillOpacity));
@@ -641,7 +636,7 @@ namespace svgio
else
{
// append
- drawinglayer::primitive2d::appendPrimitive2DSequenceToPrimitive2DSequence(rTarget, aNewFill);
+ rTarget.append(aNewFill);
}
}
}
@@ -650,7 +645,7 @@ namespace svgio
void SvgStyleAttributes::add_stroke(
const basegfx::B2DPolyPolygon& rPath,
- drawinglayer::primitive2d::Primitive2DSequence& rTarget,
+ drawinglayer::primitive2d::Primitive2DContainer& rTarget,
const basegfx::B2DRange& rGeoRange) const
{
const basegfx::BColor* pStroke = getStroke();
@@ -659,7 +654,7 @@ namespace svgio
if(pStroke || pStrokeGradient || pStrokePattern)
{
- drawinglayer::primitive2d::Primitive2DSequence aNewStroke;
+ drawinglayer::primitive2d::Primitive2DContainer aNewStroke;
const double fStrokeOpacity(getStrokeOpacity().solve(mrOwner));
if(basegfx::fTools::more(fStrokeOpacity, 0.0))
@@ -708,7 +703,7 @@ namespace svgio
if(pStrokeGradient || pStrokePattern)
{
// put primitive into Primitive2DReference and Primitive2DSequence
- const drawinglayer::primitive2d::Primitive2DSequence aSeq(&aNewLinePrimitive, 1);
+ const drawinglayer::primitive2d::Primitive2DContainer aSeq { aNewLinePrimitive };
// use neutral ViewInformation and create LineGeometryExtractor2D
const drawinglayer::geometry::ViewInformation2D aViewInformation2D;
@@ -745,16 +740,15 @@ namespace svgio
}
else // if(pStroke)
{
- drawinglayer::primitive2d::appendPrimitive2DReferenceToPrimitive2DSequence(aNewStroke, aNewLinePrimitive);
+ aNewStroke.push_back(aNewLinePrimitive);
}
- if(aNewStroke.hasElements())
+ if(!aNewStroke.empty())
{
if(basegfx::fTools::less(fStrokeOpacity, 1.0))
{
// embed in UnifiedTransparencePrimitive2D
- drawinglayer::primitive2d::appendPrimitive2DReferenceToPrimitive2DSequence(
- rTarget,
+ rTarget.push_back(
new drawinglayer::primitive2d::UnifiedTransparencePrimitive2D(
aNewStroke,
1.0 - fStrokeOpacity));
@@ -762,7 +756,7 @@ namespace svgio
else
{
// append
- drawinglayer::primitive2d::appendPrimitive2DSequenceToPrimitive2DSequence(rTarget, aNewStroke);
+ rTarget.append(aNewStroke);
}
}
}
@@ -771,7 +765,7 @@ namespace svgio
}
bool SvgStyleAttributes::prepare_singleMarker(
- drawinglayer::primitive2d::Primitive2DSequence& rMarkerPrimitives,
+ drawinglayer::primitive2d::Primitive2DContainer& rMarkerPrimitives,
basegfx::B2DHomMatrix& rMarkerTransform,
basegfx::B2DRange& rClipRange,
const SvgMarkerNode& rMarker) const
@@ -783,7 +777,7 @@ namespace svgio
// get marker primitive representation
rMarkerPrimitives = rMarker.getMarkerPrimitives();
- if(rMarkerPrimitives.hasElements())
+ if(!rMarkerPrimitives.empty())
{
basegfx::B2DRange aPrimitiveRange(0.0, 0.0, 1.0, 1.0);
const basegfx::B2DRange* pViewBox = rMarker.getViewBox();
@@ -862,7 +856,7 @@ namespace svgio
void SvgStyleAttributes::add_markers(
const basegfx::B2DPolyPolygon& rPath,
- drawinglayer::primitive2d::Primitive2DSequence& rTarget,
+ drawinglayer::primitive2d::Primitive2DContainer& rTarget,
const basegfx::tools::PointIndexSet* pHelpPointIndices) const
{
// try to access linked markers
@@ -883,7 +877,7 @@ namespace svgio
const SvgMarkerNode* pPrepared = nullptr;
// values for the prepared marker, results of prepare_singleMarker
- drawinglayer::primitive2d::Primitive2DSequence aPreparedMarkerPrimitives;
+ drawinglayer::primitive2d::Primitive2DContainer aPreparedMarkerPrimitives;
basegfx::B2DHomMatrix aPreparedMarkerTransform;
basegfx::B2DRange aPreparedMarkerClipRange;
@@ -1031,11 +1025,11 @@ namespace svgio
aClipPolygon.transform(aCombinedTransform);
xMarker = new drawinglayer::primitive2d::MaskPrimitive2D(
aClipPolygon,
- drawinglayer::primitive2d::Primitive2DSequence(&xMarker, 1));
+ drawinglayer::primitive2d::Primitive2DContainer { xMarker });
}
// add marker
- drawinglayer::primitive2d::appendPrimitive2DReferenceToPrimitive2DSequence(rTarget, xMarker);
+ rTarget.push_back(xMarker);
}
}
}
@@ -1045,7 +1039,7 @@ namespace svgio
void SvgStyleAttributes::add_path(
const basegfx::B2DPolyPolygon& rPath,
- drawinglayer::primitive2d::Primitive2DSequence& rTarget,
+ drawinglayer::primitive2d::Primitive2DContainer& rTarget,
const basegfx::tools::PointIndexSet* pHelpPointIndices) const
{
if(!rPath.count())
@@ -1113,11 +1107,11 @@ namespace svgio
}
void SvgStyleAttributes::add_postProcess(
- drawinglayer::primitive2d::Primitive2DSequence& rTarget,
- const drawinglayer::primitive2d::Primitive2DSequence& rSource,
+ drawinglayer::primitive2d::Primitive2DContainer& rTarget,
+ const drawinglayer::primitive2d::Primitive2DContainer& rSource,
const basegfx::B2DHomMatrix* pTransform) const
{
- if(rSource.hasElements())
+ if(!rSource.empty())
{
const double fOpacity(getOpacity().getNumber());
@@ -1126,7 +1120,7 @@ namespace svgio
return;
}
- drawinglayer::primitive2d::Primitive2DSequence aSource(rSource);
+ drawinglayer::primitive2d::Primitive2DContainer aSource(rSource);
if(basegfx::fTools::less(fOpacity, 1.0))
{
@@ -1136,7 +1130,7 @@ namespace svgio
aSource,
1.0 - fOpacity));
- aSource = drawinglayer::primitive2d::Primitive2DSequence(&xRef, 1);
+ aSource = drawinglayer::primitive2d::Primitive2DContainer { xRef };
}
if(pTransform)
@@ -1148,7 +1142,7 @@ namespace svgio
*pTransform,
aSource));
- aSource = drawinglayer::primitive2d::Primitive2DSequence(&xRef, 1);
+ aSource = drawinglayer::primitive2d::Primitive2DContainer { xRef };
}
if(!getClipPathXLink().isEmpty())
@@ -1163,7 +1157,7 @@ namespace svgio
}
}
- if(aSource.hasElements()) // test again, applied clipPath may have lead to empty geometry
+ if(!aSource.empty()) // test again, applied clipPath may have lead to empty geometry
{
if(!getMaskXLink().isEmpty())
{
@@ -1177,10 +1171,10 @@ namespace svgio
}
}
- if(aSource.hasElements()) // test again, applied mask may have lead to empty geometry
+ if(!aSource.empty()) // test again, applied mask may have lead to empty geometry
{
// append to current target
- drawinglayer::primitive2d::appendPrimitive2DSequenceToPrimitive2DSequence(rTarget, aSource);
+ rTarget.append(aSource);
}
}
}
diff --git a/svgio/source/svgreader/svgsvgnode.cxx b/svgio/source/svgreader/svgsvgnode.cxx
index 86a11d7b8b1e..bc61a4514418 100644
--- a/svgio/source/svgreader/svgsvgnode.cxx
+++ b/svgio/source/svgreader/svgsvgnode.cxx
@@ -294,9 +294,9 @@ namespace svgio
}
// ToDo: Consider attribute overflow in method decomposeSvgNode
- void SvgSvgNode::decomposeSvgNode(drawinglayer::primitive2d::Primitive2DSequence& rTarget, bool bReferenced) const
+ void SvgSvgNode::decomposeSvgNode(drawinglayer::primitive2d::Primitive2DContainer& rTarget, bool bReferenced) const
{
- drawinglayer::primitive2d::Primitive2DSequence aSequence;
+ drawinglayer::primitive2d::Primitive2DContainer aSequence;
// #i125258# check now if we need to init some style settings locally. Do not do this
// in the constructor, there is not yet informatikon e.g. about existing CssStyles.
@@ -306,7 +306,7 @@ namespace svgio
// decompose children
SvgNode::decomposeSvgNode(aSequence, bReferenced);
- if(aSequence.hasElements())
+ if(!aSequence.empty())
{
if(getParent())
{
@@ -355,9 +355,8 @@ namespace svgio
// I use content itself as fallback to set missing values for viewport
// Any better idea for such ill structures svg documents?
const basegfx::B2DRange aChildRange(
- drawinglayer::primitive2d::getB2DRangeFromPrimitive2DSequence(
- aSequence,
- drawinglayer::geometry::ViewInformation2D()));
+ aSequence.getB2DRange(
+ drawinglayer::geometry::ViewInformation2D()));
fWReference = aChildRange.getWidth();
}
// referenced values are already in 'user unit'
@@ -383,8 +382,7 @@ namespace svgio
// I use content itself as fallback to set missing values for viewport
// Any better idea for such ill structures svg documents?
const basegfx::B2DRange aChildRange(
- drawinglayer::primitive2d::getB2DRangeFromPrimitive2DSequence(
- aSequence,
+ aSequence.getB2DRange(
drawinglayer::geometry::ViewInformation2D()));
fHReference = aChildRange.getHeight();
}
@@ -412,7 +410,7 @@ namespace svgio
if(aTarget.equal(*getViewBox()))
{
// no mapping needed, append
- drawinglayer::primitive2d::appendPrimitive2DSequenceToPrimitive2DSequence(rTarget, aSequence);
+ rTarget.append(aSequence);
}
else
{
@@ -435,7 +433,7 @@ namespace svgio
if(rRatio.isMeetOrSlice())
{
// embed in transformation
- drawinglayer::primitive2d::appendPrimitive2DReferenceToPrimitive2DSequence(rTarget, xRef);
+ rTarget.push_back(xRef);
}
else
{
@@ -443,9 +441,9 @@ namespace svgio
const drawinglayer::primitive2d::Primitive2DReference xMask(
new drawinglayer::primitive2d::MaskPrimitive2D(
basegfx::B2DPolyPolygon(basegfx::tools::createPolygonFromRect(aTarget)),
- drawinglayer::primitive2d::Primitive2DSequence(&xRef, 1)));
+ drawinglayer::primitive2d::Primitive2DContainer { xRef }));
- drawinglayer::primitive2d::appendPrimitive2DReferenceToPrimitive2DSequence(rTarget, xMask);
+ rTarget.push_back(xMask);
}
}
}
@@ -463,7 +461,7 @@ namespace svgio
basegfx::tools::createTranslateB2DHomMatrix(fX, fY),
aSequence));
- aSequence = drawinglayer::primitive2d::Primitive2DSequence(&xRef, 1);
+ aSequence = drawinglayer::primitive2d::Primitive2DContainer { xRef, };
}
// embed in MaskPrimitive2D to clip
@@ -475,7 +473,7 @@ namespace svgio
aSequence));
// append
- drawinglayer::primitive2d::appendPrimitive2DReferenceToPrimitive2DSequence(rTarget, xMask);
+ rTarget.push_back(xMask);
}
}
}
@@ -543,7 +541,7 @@ namespace svgio
aViewBoxMapping,
aSequence));
- aSequence = drawinglayer::primitive2d::Primitive2DSequence(&xTransform, 1);
+ aSequence = drawinglayer::primitive2d::Primitive2DContainer { xTransform };
}
}
else // no viewbox
@@ -561,9 +559,8 @@ namespace svgio
else
{
const basegfx::B2DRange aChildRange(
- drawinglayer::primitive2d::getB2DRangeFromPrimitive2DSequence(
- aSequence,
- drawinglayer::geometry::ViewInformation2D()));
+ aSequence.getB2DRange(
+ drawinglayer::geometry::ViewInformation2D()));
const double fChildWidth(aChildRange.getWidth());
const double fChildHeight(aChildRange.getHeight());
fW = bWidthIsAbsolute ? getWidth().solveNonPercentage(*this) : fChildWidth;
@@ -585,8 +582,7 @@ namespace svgio
// different from Svg we have the possibility with primitives to get
// a correct bounding box for the geometry. Get it for evtl. taking action
const basegfx::B2DRange aContentRange(
- drawinglayer::primitive2d::getB2DRangeFromPrimitive2DSequence(
- aSequence,
+ aSequence.getB2DRange(
drawinglayer::geometry::ViewInformation2D()));
if(aSvgCanvasRange.isInside(aContentRange))
@@ -603,9 +599,9 @@ namespace svgio
basegfx::BColor(0.0, 0.0, 0.0)));
const drawinglayer::primitive2d::Primitive2DReference xHidden(
new drawinglayer::primitive2d::HiddenGeometryPrimitive2D(
- drawinglayer::primitive2d::Primitive2DSequence(&xLine, 1)));
+ drawinglayer::primitive2d::Primitive2DContainer { xLine }));
- drawinglayer::primitive2d::appendPrimitive2DReferenceToPrimitive2DSequence(aSequence, xHidden);
+ aSequence.push_back(xHidden);
}
else if(aSvgCanvasRange.overlaps(aContentRange))
{
@@ -621,16 +617,16 @@ namespace svgio
aSvgCanvasRange)),
aSequence));
- aSequence = drawinglayer::primitive2d::Primitive2DSequence(&xMask, 1);
+ aSequence = drawinglayer::primitive2d::Primitive2DContainer { xMask };
}
else
{
// not inside, no overlap. Empty Svg
- aSequence.realloc(0);
+ aSequence.clear();
}
}
- if(aSequence.hasElements())
+ if(!aSequence.empty())
{
// embed in transform primitive to scale to 1/100th mm
// where 1 inch == 25.4 mm to get from Svg coordinates (px) to
@@ -646,10 +642,10 @@ namespace svgio
aTransform,
aSequence));
- aSequence = drawinglayer::primitive2d::Primitive2DSequence(&xTransform, 1);
+ aSequence = drawinglayer::primitive2d::Primitive2DContainer { xTransform };
// append to result
- drawinglayer::primitive2d::appendPrimitive2DSequenceToPrimitive2DSequence(rTarget, aSequence);
+ rTarget.append(aSequence);
}
}
}
diff --git a/svgio/source/svgreader/svgtextnode.cxx b/svgio/source/svgreader/svgtextnode.cxx
index 5f3e0ceac1f5..4637bcee51c2 100644
--- a/svgio/source/svgreader/svgtextnode.cxx
+++ b/svgio/source/svgreader/svgtextnode.cxx
@@ -88,10 +88,10 @@ namespace svgio
void SvgTextNode::addTextPrimitives(
const SvgNode& rCandidate,
- drawinglayer::primitive2d::Primitive2DSequence& rTarget,
- drawinglayer::primitive2d::Primitive2DSequence& rSource)
+ drawinglayer::primitive2d::Primitive2DContainer& rTarget,
+ drawinglayer::primitive2d::Primitive2DContainer& rSource)
{
- if(rSource.hasElements())
+ if(!rSource.empty())
{
const SvgStyleAttributes* pAttributes = rCandidate.getSvgStyleAttributes();
@@ -104,12 +104,12 @@ namespace svgio
{
// should not happen, every subnode from SvgTextNode will at least
// return the attributes from SvgTextNode. Nonetheless, add text
- drawinglayer::primitive2d::appendPrimitive2DSequenceToPrimitive2DSequence(rTarget, rSource);
+ rTarget.append(rSource);
}
}
}
- void SvgTextNode::DecomposeChild(const SvgNode& rCandidate, drawinglayer::primitive2d::Primitive2DSequence& rTarget, SvgTextPosition& rSvgTextPosition) const
+ void SvgTextNode::DecomposeChild(const SvgNode& rCandidate, drawinglayer::primitive2d::Primitive2DContainer& rTarget, SvgTextPosition& rSvgTextPosition) const
{
switch(rCandidate.getType())
{
@@ -131,7 +131,7 @@ namespace svgio
{
// remember original TextStart to later detect hor/ver offsets
const basegfx::B2DPoint aTextStart(rSvgTextPosition.getPosition());
- drawinglayer::primitive2d::Primitive2DSequence aNewTarget;
+ drawinglayer::primitive2d::Primitive2DContainer aNewTarget;
// decompose to regular TextPrimitives
for(sal_uInt32 a(0); a < nCount; a++)
@@ -139,16 +139,16 @@ namespace svgio
DecomposeChild(*rChildren[a], aNewTarget, rSvgTextPosition);
}
- if(aNewTarget.hasElements())
+ if(!aNewTarget.empty())
{
- const drawinglayer::primitive2d::Primitive2DSequence aPathContent(aNewTarget);
- aNewTarget.realloc(0);
+ const drawinglayer::primitive2d::Primitive2DContainer aPathContent(aNewTarget);
+ aNewTarget.clear();
// dismantle TextPrimitives and map them on curve/path
rSvgTextPathNode.decomposePathNode(aPathContent, aNewTarget, aTextStart);
}
- if(aNewTarget.hasElements())
+ if(!aNewTarget.empty())
{
addTextPrimitives(rCandidate, rTarget, aNewTarget);
}
@@ -166,7 +166,7 @@ namespace svgio
if(nCount)
{
SvgTextPosition aSvgTextPosition(&rSvgTextPosition, rSvgTspanNode, rSvgTspanNode.getSvgTextPositions());
- drawinglayer::primitive2d::Primitive2DSequence aNewTarget;
+ drawinglayer::primitive2d::Primitive2DContainer aNewTarget;
for(sal_uInt32 a(0); a < nCount; a++)
{
@@ -175,7 +175,7 @@ namespace svgio
rSvgTextPosition.setPosition(aSvgTextPosition.getPosition());
- if(aNewTarget.hasElements())
+ if(!aNewTarget.empty())
{
addTextPrimitives(rCandidate, rTarget, aNewTarget);
}
@@ -191,7 +191,7 @@ namespace svgio
{
const SvgNodeVector& rChildren = pRefText->getChildren();
const sal_uInt32 nCount(rChildren.size());
- drawinglayer::primitive2d::Primitive2DSequence aNewTarget;
+ drawinglayer::primitive2d::Primitive2DContainer aNewTarget;
if(nCount)
{
@@ -204,7 +204,7 @@ namespace svgio
const_cast< SvgNode& >(rChildCandidate).setAlternativeParent();
}
- if(aNewTarget.hasElements())
+ if(!aNewTarget.empty())
{
addTextPrimitives(rCandidate, rTarget, aNewTarget);
}
@@ -221,7 +221,7 @@ namespace svgio
}
}
- void SvgTextNode::decomposeSvgNode(drawinglayer::primitive2d::Primitive2DSequence& rTarget, bool /*bReferenced`*/) const
+ void SvgTextNode::decomposeSvgNode(drawinglayer::primitive2d::Primitive2DContainer& rTarget, bool /*bReferenced`*/) const
{
// text has a group of child nodes, allowed are SVGTokenCharacter, SVGTokenTspan,
// SVGTokenTref and SVGTokenTextPath. These increase a given current text position
@@ -234,7 +234,7 @@ namespace svgio
if(fOpacity > 0.0)
{
SvgTextPosition aSvgTextPosition(nullptr, *this, getSvgTextPositions());
- drawinglayer::primitive2d::Primitive2DSequence aNewTarget;
+ drawinglayer::primitive2d::Primitive2DContainer aNewTarget;
const SvgNodeVector& rChildren = getChildren();
const sal_uInt32 nCount(rChildren.size());
@@ -245,15 +245,15 @@ namespace svgio
DecomposeChild(rCandidate, aNewTarget, aSvgTextPosition);
}
- if(aNewTarget.hasElements())
+ if(!aNewTarget.empty())
{
- drawinglayer::primitive2d::Primitive2DSequence aNewTarget2;
+ drawinglayer::primitive2d::Primitive2DContainer aNewTarget2;
addTextPrimitives(*this, aNewTarget2, aNewTarget);
aNewTarget = aNewTarget2;
}
- if(aNewTarget.hasElements())
+ if(!aNewTarget.empty())
{
pStyle->add_postProcess(rTarget, aNewTarget, getTransform());
}
diff --git a/svgio/source/svgreader/svgtextpathnode.cxx b/svgio/source/svgreader/svgtextpathnode.cxx
index fc2a0a2fc9bf..96eacd082ca5 100644
--- a/svgio/source/svgreader/svgtextpathnode.cxx
+++ b/svgio/source/svgreader/svgtextpathnode.cxx
@@ -377,11 +377,11 @@ namespace svgio
}
void SvgTextPathNode::decomposePathNode(
- const drawinglayer::primitive2d::Primitive2DSequence& rPathContent,
- drawinglayer::primitive2d::Primitive2DSequence& rTarget,
+ const drawinglayer::primitive2d::Primitive2DContainer& rPathContent,
+ drawinglayer::primitive2d::Primitive2DContainer& rTarget,
const basegfx::B2DPoint& rTextStart) const
{
- if(rPathContent.hasElements())
+ if(!rPathContent.empty())
{
const SvgPathNode* pSvgPathNode = dynamic_cast< const SvgPathNode* >(getDocument().findSvgNodeById(maXLink));
@@ -431,7 +431,7 @@ namespace svgio
if(fPosition >= 0.0)
{
- const sal_Int32 nLength(rPathContent.getLength());
+ const sal_Int32 nLength(rPathContent.size());
sal_Int32 nCurrent(0);
while(fPosition < fBasegfxPathLength && nCurrent < nLength)
@@ -453,12 +453,12 @@ namespace svgio
fPosition,
rTextStart);
- const drawinglayer::primitive2d::Primitive2DSequence aResult(
+ const drawinglayer::primitive2d::Primitive2DContainer aResult(
aPathTextBreakupHelper.getResult());
- if(aResult.hasElements())
+ if(!aResult.empty())
{
- drawinglayer::primitive2d::appendPrimitive2DSequenceToPrimitive2DSequence(rTarget, aResult);
+ rTarget.append(aResult);
}
// advance position to consumed
diff --git a/svgio/source/svgreader/svgusenode.cxx b/svgio/source/svgreader/svgusenode.cxx
index 133f63f76ea4..826aed2729f4 100644
--- a/svgio/source/svgreader/svgusenode.cxx
+++ b/svgio/source/svgreader/svgusenode.cxx
@@ -138,7 +138,7 @@ namespace svgio
}
}
- void SvgUseNode::decomposeSvgNode(drawinglayer::primitive2d::Primitive2DSequence& rTarget, bool /*bReferenced*/) const
+ void SvgUseNode::decomposeSvgNode(drawinglayer::primitive2d::Primitive2DContainer& rTarget, bool /*bReferenced*/) const
{
// try to access link to content
const SvgNode* mpXLink = getDocument().findSvgNodeById(maXLink);
@@ -146,7 +146,7 @@ namespace svgio
if(mpXLink && Display_none != mpXLink->getDisplay())
{
// decompose children
- drawinglayer::primitive2d::Primitive2DSequence aNewTarget;
+ drawinglayer::primitive2d::Primitive2DContainer aNewTarget;
// todo: in case mpXLink is a SVGTokenSvg or SVGTokenSymbol the
// SVG docs want the getWidth() and getHeight() from this node
@@ -155,7 +155,7 @@ namespace svgio
mpXLink->decomposeSvgNode(aNewTarget, true);
const_cast< SvgNode* >(mpXLink)->setAlternativeParent();
- if(aNewTarget.hasElements())
+ if(!aNewTarget.empty())
{
basegfx::B2DHomMatrix aTransform;
@@ -178,11 +178,11 @@ namespace svgio
aTransform,
aNewTarget));
- drawinglayer::primitive2d::appendPrimitive2DReferenceToPrimitive2DSequence(rTarget, xRef);
+ rTarget.push_back(xRef);
}
else
{
- drawinglayer::primitive2d::appendPrimitive2DSequenceToPrimitive2DSequence(rTarget, aNewTarget);
+ rTarget.append(aNewTarget);
}
}
}
diff --git a/svgio/source/svguno/xsvgparser.cxx b/svgio/source/svguno/xsvgparser.cxx
index 4c722a039171..1484c9f46c62 100644
--- a/svgio/source/svguno/xsvgparser.cxx
+++ b/svgio/source/svguno/xsvgparser.cxx
@@ -25,6 +25,7 @@
#include <com/sun/star/lang/XInitialization.hpp>
#include <cppuhelper/implbase2.hxx>
#include <cppuhelper/supportsservice.hxx>
+#include <comphelper/sequence.hxx>
#include <com/sun/star/xml/sax/XParser.hpp>
#include <com/sun/star/xml/sax/Parser.hpp>
#include <com/sun/star/xml/sax/InputSource.hpp>
@@ -154,7 +155,9 @@ namespace svgio
if(Display_none != pCandidate->getDisplay())
{
- pCandidate->decomposeSvgNode(aRetval, false);
+ drawinglayer::primitive2d::Primitive2DContainer aTmp = comphelper::sequenceToContainer<drawinglayer::primitive2d::Primitive2DContainer>(aRetval);
+ pCandidate->decomposeSvgNode(aTmp, false);
+ aRetval = comphelper::containerToSequence(aTmp);
}
}
}
diff --git a/svx/inc/sdr/contact/viewcontactofgraphic.hxx b/svx/inc/sdr/contact/viewcontactofgraphic.hxx
index e9e590cf7c3a..cd0cff073504 100644
--- a/svx/inc/sdr/contact/viewcontactofgraphic.hxx
+++ b/svx/inc/sdr/contact/viewcontactofgraphic.hxx
@@ -35,10 +35,10 @@ namespace sdr
{
private:
// helpers for constructing various primitive visualisations in various states
- drawinglayer::primitive2d::Primitive2DSequence createVIP2DSForPresObj(
+ drawinglayer::primitive2d::Primitive2DContainer createVIP2DSForPresObj(
const basegfx::B2DHomMatrix& rObjectMatrix,
const drawinglayer::attribute::SdrLineFillShadowTextAttribute& rAttribute) const;
- drawinglayer::primitive2d::Primitive2DSequence createVIP2DSForDraft(
+ drawinglayer::primitive2d::Primitive2DContainer createVIP2DSForDraft(
const basegfx::B2DHomMatrix& rObjectMatrix,
const drawinglayer::attribute::SdrLineFillShadowTextAttribute& rAttribute) const;
@@ -72,7 +72,7 @@ namespace sdr
protected:
// This method is responsible for creating the graphical visualisation data
// ONLY based on model data
- virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const override;
+ virtual drawinglayer::primitive2d::Primitive2DContainer createViewIndependentPrimitive2DSequence() const override;
};
} // end of namespace contact
} // end of namespace sdr
diff --git a/svx/inc/sdr/contact/viewcontactofgroup.hxx b/svx/inc/sdr/contact/viewcontactofgroup.hxx
index db910e40d090..3bb9e6df17ac 100644
--- a/svx/inc/sdr/contact/viewcontactofgroup.hxx
+++ b/svx/inc/sdr/contact/viewcontactofgroup.hxx
@@ -50,7 +50,7 @@ namespace sdr
protected:
// This method is responsible for creating the graphical visualisation data
// ONLY based on model data
- virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const override;
+ virtual drawinglayer::primitive2d::Primitive2DContainer createViewIndependentPrimitive2DSequence() const override;
};
} // end of namespace contact
} // end of namespace sdr
diff --git a/svx/inc/sdr/contact/viewcontactofmasterpagedescriptor.hxx b/svx/inc/sdr/contact/viewcontactofmasterpagedescriptor.hxx
index 5c6671f932bf..1639472ec6fb 100644
--- a/svx/inc/sdr/contact/viewcontactofmasterpagedescriptor.hxx
+++ b/svx/inc/sdr/contact/viewcontactofmasterpagedescriptor.hxx
@@ -43,7 +43,7 @@ namespace sdr
virtual ViewObjectContact& CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact) override;
// This method is responsible for creating the graphical visualisation data
- virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const override;
+ virtual drawinglayer::primitive2d::Primitive2DContainer createViewIndependentPrimitive2DSequence() const override;
public:
// basic constructor
diff --git a/svx/inc/sdr/contact/viewcontactofopenglobj.hxx b/svx/inc/sdr/contact/viewcontactofopenglobj.hxx
index cebef7a3b362..ee5262e6f027 100644
--- a/svx/inc/sdr/contact/viewcontactofopenglobj.hxx
+++ b/svx/inc/sdr/contact/viewcontactofopenglobj.hxx
@@ -26,7 +26,7 @@ public:
protected:
virtual ViewObjectContact& CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact) override;
- virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const override;
+ virtual drawinglayer::primitive2d::Primitive2DContainer createViewIndependentPrimitive2DSequence() const override;
};
} // namespace contact
diff --git a/svx/inc/sdr/contact/viewcontactofsdrcaptionobj.hxx b/svx/inc/sdr/contact/viewcontactofsdrcaptionobj.hxx
index 7dfea4e176d2..31771c021fc2 100644
--- a/svx/inc/sdr/contact/viewcontactofsdrcaptionobj.hxx
+++ b/svx/inc/sdr/contact/viewcontactofsdrcaptionobj.hxx
@@ -45,7 +45,7 @@ namespace sdr
protected:
// This method is responsible for creating the graphical visualisation data
// ONLY based on model data
- virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const override;
+ virtual drawinglayer::primitive2d::Primitive2DContainer createViewIndependentPrimitive2DSequence() const override;
};
} // end of namespace contact
} // end of namespace sdr
diff --git a/svx/inc/sdr/contact/viewcontactofsdrcircobj.hxx b/svx/inc/sdr/contact/viewcontactofsdrcircobj.hxx
index d64615a36d00..33a74f59ceb9 100644
--- a/svx/inc/sdr/contact/viewcontactofsdrcircobj.hxx
+++ b/svx/inc/sdr/contact/viewcontactofsdrcircobj.hxx
@@ -45,7 +45,7 @@ namespace sdr
protected:
// This method is responsible for creating the graphical visualisation data
// ONLY based on model data
- virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const override;
+ virtual drawinglayer::primitive2d::Primitive2DContainer createViewIndependentPrimitive2DSequence() const override;
};
} // end of namespace contact
} // end of namespace sdr
diff --git a/svx/inc/sdr/contact/viewcontactofsdredgeobj.hxx b/svx/inc/sdr/contact/viewcontactofsdredgeobj.hxx
index 87b432ebf889..8a43e805a39c 100644
--- a/svx/inc/sdr/contact/viewcontactofsdredgeobj.hxx
+++ b/svx/inc/sdr/contact/viewcontactofsdredgeobj.hxx
@@ -45,7 +45,7 @@ namespace sdr
protected:
// This method is responsible for creating the graphical visualisation data
// ONLY based on model data
- virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const override;
+ virtual drawinglayer::primitive2d::Primitive2DContainer createViewIndependentPrimitive2DSequence() const override;
};
} // end of namespace contact
} // end of namespace sdr
diff --git a/svx/inc/sdr/contact/viewcontactofsdrmeasureobj.hxx b/svx/inc/sdr/contact/viewcontactofsdrmeasureobj.hxx
index 6d2ab6645231..a5242857efa2 100644
--- a/svx/inc/sdr/contact/viewcontactofsdrmeasureobj.hxx
+++ b/svx/inc/sdr/contact/viewcontactofsdrmeasureobj.hxx
@@ -45,7 +45,7 @@ namespace sdr
protected:
// This method is responsible for creating the graphical visualisation data
// ONLY based on model data
- virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const override;
+ virtual drawinglayer::primitive2d::Primitive2DContainer createViewIndependentPrimitive2DSequence() const override;
};
} // end of namespace contact
} // end of namespace sdr
diff --git a/svx/inc/sdr/contact/viewcontactofsdrobjcustomshape.hxx b/svx/inc/sdr/contact/viewcontactofsdrobjcustomshape.hxx
index df30d0f9f2fb..e913bb2a832c 100644
--- a/svx/inc/sdr/contact/viewcontactofsdrobjcustomshape.hxx
+++ b/svx/inc/sdr/contact/viewcontactofsdrobjcustomshape.hxx
@@ -48,7 +48,7 @@ namespace sdr
protected:
// This method is responsible for creating the graphical visualisation data
// ONLY based on model data
- virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const override;
+ virtual drawinglayer::primitive2d::Primitive2DContainer createViewIndependentPrimitive2DSequence() const override;
};
} // end of namespace contact
} // end of namespace sdr
diff --git a/svx/inc/sdr/contact/viewcontactofsdrole2obj.hxx b/svx/inc/sdr/contact/viewcontactofsdrole2obj.hxx
index 13ab44e81c38..931ca1756cb1 100644
--- a/svx/inc/sdr/contact/viewcontactofsdrole2obj.hxx
+++ b/svx/inc/sdr/contact/viewcontactofsdrole2obj.hxx
@@ -57,7 +57,7 @@ public:
// scaling (e.g. for EmptyPresObj's), the correct graphic and other stuff. It is used from
// createViewIndependentPrimitive2DSequence with false, and with evtl. HighContrast true
// from the VOC which knows that
- drawinglayer::primitive2d::Primitive2DSequence createPrimitive2DSequenceWithParameters() const;
+ drawinglayer::primitive2d::Primitive2DContainer createPrimitive2DSequenceWithParameters() const;
// #i123539# get rid of buffered chart content (if there) on change
virtual void ActionChanged() override;
@@ -67,7 +67,7 @@ public:
protected:
// This method is responsible for creating the graphical visualisation data
// ONLY based on model data, just wraps to call createPrimitive2DSequenceWithParameters(false)
- virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const override;
+ virtual drawinglayer::primitive2d::Primitive2DContainer createViewIndependentPrimitive2DSequence() const override;
};
}}
diff --git a/svx/inc/sdr/contact/viewcontactofsdrpage.hxx b/svx/inc/sdr/contact/viewcontactofsdrpage.hxx
index 240595707cf8..d811b96abbd0 100644
--- a/svx/inc/sdr/contact/viewcontactofsdrpage.hxx
+++ b/svx/inc/sdr/contact/viewcontactofsdrpage.hxx
@@ -46,7 +46,7 @@ class ViewContactOfPageBackground : public ViewContactOfPageSubObject
{
protected:
virtual ViewObjectContact& CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact) override;
- virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const override;
+ virtual drawinglayer::primitive2d::Primitive2DContainer createViewIndependentPrimitive2DSequence() const override;
public:
explicit ViewContactOfPageBackground(ViewContactOfSdrPage& rParentViewContactOfSdrPage);
@@ -57,7 +57,7 @@ class ViewContactOfPageShadow : public ViewContactOfPageSubObject
{
protected:
virtual ViewObjectContact& CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact) override;
- virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const override;
+ virtual drawinglayer::primitive2d::Primitive2DContainer createViewIndependentPrimitive2DSequence() const override;
public:
explicit ViewContactOfPageShadow(ViewContactOfSdrPage& rParentViewContactOfSdrPage);
@@ -68,7 +68,7 @@ class ViewContactOfPageFill : public ViewContactOfPageSubObject
{
protected:
virtual ViewObjectContact& CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact) override;
- virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const override;
+ virtual drawinglayer::primitive2d::Primitive2DContainer createViewIndependentPrimitive2DSequence() const override;
public:
explicit ViewContactOfPageFill(ViewContactOfSdrPage& rParentViewContactOfSdrPage);
@@ -79,7 +79,7 @@ class ViewContactOfMasterPage : public ViewContactOfPageSubObject
{
protected:
virtual ViewObjectContact& CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact) override;
- virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const override;
+ virtual drawinglayer::primitive2d::Primitive2DContainer createViewIndependentPrimitive2DSequence() const override;
public:
explicit ViewContactOfMasterPage(ViewContactOfSdrPage& rParentViewContactOfSdrPage);
@@ -90,7 +90,7 @@ class ViewContactOfOuterPageBorder : public ViewContactOfPageSubObject
{
protected:
virtual ViewObjectContact& CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact) override;
- virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const override;
+ virtual drawinglayer::primitive2d::Primitive2DContainer createViewIndependentPrimitive2DSequence() const override;
public:
explicit ViewContactOfOuterPageBorder(ViewContactOfSdrPage& rParentViewContactOfSdrPage);
@@ -101,7 +101,7 @@ class ViewContactOfInnerPageBorder : public ViewContactOfPageSubObject
{
protected:
virtual ViewObjectContact& CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact) override;
- virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const override;
+ virtual drawinglayer::primitive2d::Primitive2DContainer createViewIndependentPrimitive2DSequence() const override;
public:
explicit ViewContactOfInnerPageBorder(ViewContactOfSdrPage& rParentViewContactOfSdrPage);
@@ -119,7 +119,7 @@ class ViewContactOfPageHierarchy : public ViewContactOfPageSubObject
{
protected:
virtual ViewObjectContact& CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact) override;
- virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const override;
+ virtual drawinglayer::primitive2d::Primitive2DContainer createViewIndependentPrimitive2DSequence() const override;
public:
explicit ViewContactOfPageHierarchy(ViewContactOfSdrPage& rParentViewContactOfSdrPage);
@@ -136,7 +136,7 @@ protected:
bool mbFront : 1;
virtual ViewObjectContact& CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact) override;
- virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const override;
+ virtual drawinglayer::primitive2d::Primitive2DContainer createViewIndependentPrimitive2DSequence() const override;
public:
ViewContactOfGrid(ViewContactOfSdrPage& rParentViewContactOfSdrPage, bool bFront);
@@ -152,7 +152,7 @@ protected:
bool mbFront : 1;
virtual ViewObjectContact& CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact) override;
- virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const override;
+ virtual drawinglayer::primitive2d::Primitive2DContainer createViewIndependentPrimitive2DSequence() const override;
public:
ViewContactOfHelplines(ViewContactOfSdrPage& rParentViewContactOfSdrPage, bool bFront);
@@ -207,7 +207,7 @@ public:
protected:
// This method is responsible for creating the graphical visualisation data
// ONLY based on model data
- virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const override;
+ virtual drawinglayer::primitive2d::Primitive2DContainer createViewIndependentPrimitive2DSequence() const override;
};
}}
diff --git a/svx/inc/sdr/contact/viewcontactofsdrpathobj.hxx b/svx/inc/sdr/contact/viewcontactofsdrpathobj.hxx
index b45444507598..ce0ab91933d0 100644
--- a/svx/inc/sdr/contact/viewcontactofsdrpathobj.hxx
+++ b/svx/inc/sdr/contact/viewcontactofsdrpathobj.hxx
@@ -45,7 +45,7 @@ namespace sdr
protected:
// This method is responsible for creating the graphical visualisation data
// ONLY based on model data
- virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const override;
+ virtual drawinglayer::primitive2d::Primitive2DContainer createViewIndependentPrimitive2DSequence() const override;
};
} // end of namespace contact
} // end of namespace sdr
diff --git a/svx/inc/sdr/contact/viewcontactofunocontrol.hxx b/svx/inc/sdr/contact/viewcontactofunocontrol.hxx
index a2d8d3173d13..b43fa029f6aa 100644
--- a/svx/inc/sdr/contact/viewcontactofunocontrol.hxx
+++ b/svx/inc/sdr/contact/viewcontactofunocontrol.hxx
@@ -79,7 +79,7 @@ namespace sdr { namespace contact {
protected:
// This method is responsible for creating the graphical visualisation data
// ONLY based on model data
- virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const override;
+ virtual drawinglayer::primitive2d::Primitive2DContainer createViewIndependentPrimitive2DSequence() const override;
};
diff --git a/svx/inc/sdr/contact/viewobjectcontactofe3d.hxx b/svx/inc/sdr/contact/viewobjectcontactofe3d.hxx
index 800638914d64..b70ceb164835 100644
--- a/svx/inc/sdr/contact/viewobjectcontactofe3d.hxx
+++ b/svx/inc/sdr/contact/viewobjectcontactofe3d.hxx
@@ -48,7 +48,7 @@ namespace sdr
// also override the 2d method to deliver a 2d object with embedd3d 3d and the 3d transformation which is able to
// answer the get2DRange question accordingly
- virtual drawinglayer::primitive2d::Primitive2DSequence createPrimitive2DSequence(const DisplayInfo& rDisplayInfo) const override;
+ virtual drawinglayer::primitive2d::Primitive2DContainer createPrimitive2DSequence(const DisplayInfo& rDisplayInfo) const override;
public:
ViewObjectContactOfE3d(ObjectContact& rObjectContact, ViewContact& rViewContact);
diff --git a/svx/inc/sdr/contact/viewobjectcontactofe3dscene.hxx b/svx/inc/sdr/contact/viewobjectcontactofe3dscene.hxx
index 1745ff987a0c..1dcdeac08584 100644
--- a/svx/inc/sdr/contact/viewobjectcontactofe3dscene.hxx
+++ b/svx/inc/sdr/contact/viewobjectcontactofe3dscene.hxx
@@ -33,7 +33,7 @@ namespace sdr
{
protected:
// 2d primitive creator
- virtual drawinglayer::primitive2d::Primitive2DSequence createPrimitive2DSequence(const DisplayInfo& rDisplayInfo) const override;
+ virtual drawinglayer::primitive2d::Primitive2DContainer createPrimitive2DSequence(const DisplayInfo& rDisplayInfo) const override;
public:
// basic constructor.
@@ -42,7 +42,7 @@ namespace sdr
// process this primitive: Eventually also recursively travel an existing hierarchy,
// e.g. for group objects, scenes or pages. This method will test geometrical visibility.
- virtual drawinglayer::primitive2d::Primitive2DSequence getPrimitive2DSequenceHierarchy(DisplayInfo& rDisplayInfo) const override;
+ virtual drawinglayer::primitive2d::Primitive2DContainer getPrimitive2DSequenceHierarchy(DisplayInfo& rDisplayInfo) const override;
};
} // end of namespace contact
} // end of namespace sdr
diff --git a/svx/inc/sdr/contact/viewobjectcontactofgraphic.hxx b/svx/inc/sdr/contact/viewobjectcontactofgraphic.hxx
index 17d7cbd190a5..4735ce443eb3 100644
--- a/svx/inc/sdr/contact/viewobjectcontactofgraphic.hxx
+++ b/svx/inc/sdr/contact/viewobjectcontactofgraphic.hxx
@@ -54,7 +54,7 @@ namespace sdr
SdrGrafObj& getSdrGrafObj();
// This method is responsible for creating the graphical visualisation data
- virtual drawinglayer::primitive2d::Primitive2DSequence createPrimitive2DSequence(const DisplayInfo& rDisplayInfo) const override;
+ virtual drawinglayer::primitive2d::Primitive2DContainer createPrimitive2DSequence(const DisplayInfo& rDisplayInfo) const override;
public:
ViewObjectContactOfGraphic(ObjectContact& rObjectContact, ViewContact& rViewContact);
diff --git a/svx/inc/sdr/contact/viewobjectcontactofgroup.hxx b/svx/inc/sdr/contact/viewobjectcontactofgroup.hxx
index 95380d3faab3..751931cbd039 100644
--- a/svx/inc/sdr/contact/viewobjectcontactofgroup.hxx
+++ b/svx/inc/sdr/contact/viewobjectcontactofgroup.hxx
@@ -34,7 +34,7 @@ namespace sdr
virtual ~ViewObjectContactOfGroup();
// This method recursively paints the draw hierarchy.
- virtual drawinglayer::primitive2d::Primitive2DSequence getPrimitive2DSequenceHierarchy(DisplayInfo& rDisplayInfo) const override;
+ virtual drawinglayer::primitive2d::Primitive2DContainer getPrimitive2DSequenceHierarchy(DisplayInfo& rDisplayInfo) const override;
private:
virtual bool isPrimitiveVisibleOnAnyLayer(const SetOfByte& aLayers) const override;
diff --git a/svx/inc/sdr/contact/viewobjectcontactofmasterpagedescriptor.hxx b/svx/inc/sdr/contact/viewobjectcontactofmasterpagedescriptor.hxx
index 4a434551b082..5aee57dcd714 100644
--- a/svx/inc/sdr/contact/viewobjectcontactofmasterpagedescriptor.hxx
+++ b/svx/inc/sdr/contact/viewobjectcontactofmasterpagedescriptor.hxx
@@ -40,7 +40,7 @@ namespace sdr
sdr::MasterPageDescriptor& GetMasterPageDescriptor() const;
virtual bool isPrimitiveVisible(const DisplayInfo& rDisplayInfo) const override;
- virtual drawinglayer::primitive2d::Primitive2DSequence getPrimitive2DSequenceHierarchy(DisplayInfo& rDisplayInfo) const override;
+ virtual drawinglayer::primitive2d::Primitive2DContainer getPrimitive2DSequenceHierarchy(DisplayInfo& rDisplayInfo) const override;
};
} // end of namespace contact
} // end of namespace sdr
diff --git a/svx/inc/sdr/contact/viewobjectcontactofsdrole2obj.hxx b/svx/inc/sdr/contact/viewobjectcontactofsdrole2obj.hxx
index 8b9a3217012c..4f724b36ce56 100644
--- a/svx/inc/sdr/contact/viewobjectcontactofsdrole2obj.hxx
+++ b/svx/inc/sdr/contact/viewobjectcontactofsdrole2obj.hxx
@@ -32,7 +32,7 @@ protected:
const SdrOle2Obj& getSdrOle2Object() const;
// This method is responsible for creating the graphical visualisation data
- virtual drawinglayer::primitive2d::Primitive2DSequence createPrimitive2DSequence(const DisplayInfo& rDisplayInfo) const override;
+ virtual drawinglayer::primitive2d::Primitive2DContainer createPrimitive2DSequence(const DisplayInfo& rDisplayInfo) const override;
public:
ViewObjectContactOfSdrOle2Obj(ObjectContact& rObjectContact, ViewContact& rViewContact);
diff --git a/svx/inc/sdr/contact/viewobjectcontactofsdrpage.hxx b/svx/inc/sdr/contact/viewobjectcontactofsdrpage.hxx
index 2c664c7b4545..86a45e8d6317 100644
--- a/svx/inc/sdr/contact/viewobjectcontactofsdrpage.hxx
+++ b/svx/inc/sdr/contact/viewobjectcontactofsdrpage.hxx
@@ -50,7 +50,7 @@ namespace sdr
class SVX_DLLPUBLIC ViewObjectContactOfPageBackground : public ViewObjectContactOfPageSubObject
{
protected:
- virtual drawinglayer::primitive2d::Primitive2DSequence createPrimitive2DSequence(const DisplayInfo& rDisplayInfo) const override;
+ virtual drawinglayer::primitive2d::Primitive2DContainer createPrimitive2DSequence(const DisplayInfo& rDisplayInfo) const override;
public:
ViewObjectContactOfPageBackground(ObjectContact& rObjectContact, ViewContact& rViewContact);
@@ -84,7 +84,7 @@ namespace sdr
class SVX_DLLPUBLIC ViewObjectContactOfPageFill : public ViewObjectContactOfPageSubObject
{
protected:
- virtual drawinglayer::primitive2d::Primitive2DSequence createPrimitive2DSequence(const DisplayInfo& rDisplayInfo) const override;
+ virtual drawinglayer::primitive2d::Primitive2DContainer createPrimitive2DSequence(const DisplayInfo& rDisplayInfo) const override;
public:
ViewObjectContactOfPageFill(ObjectContact& rObjectContact, ViewContact& rViewContact);
@@ -150,7 +150,7 @@ namespace sdr
ViewObjectContactOfPageHierarchy(ObjectContact& rObjectContact, ViewContact& rViewContact);
virtual ~ViewObjectContactOfPageHierarchy();
- virtual drawinglayer::primitive2d::Primitive2DSequence getPrimitive2DSequenceHierarchy(DisplayInfo& rDisplayInfo) const override;
+ virtual drawinglayer::primitive2d::Primitive2DContainer getPrimitive2DSequenceHierarchy(DisplayInfo& rDisplayInfo) const override;
};
} // end of namespace contact
} // end of namespace sdr
@@ -162,7 +162,7 @@ namespace sdr
class SVX_DLLPUBLIC ViewObjectContactOfPageGrid : public ViewObjectContactOfPageSubObject
{
protected:
- virtual drawinglayer::primitive2d::Primitive2DSequence createPrimitive2DSequence(const DisplayInfo& rDisplayInfo) const override;
+ virtual drawinglayer::primitive2d::Primitive2DContainer createPrimitive2DSequence(const DisplayInfo& rDisplayInfo) const override;
public:
ViewObjectContactOfPageGrid(ObjectContact& rObjectContact, ViewContact& rViewContact);
@@ -180,7 +180,7 @@ namespace sdr
class SVX_DLLPUBLIC ViewObjectContactOfPageHelplines : public ViewObjectContactOfPageSubObject
{
protected:
- virtual drawinglayer::primitive2d::Primitive2DSequence createPrimitive2DSequence(const DisplayInfo& rDisplayInfo) const override;
+ virtual drawinglayer::primitive2d::Primitive2DContainer createPrimitive2DSequence(const DisplayInfo& rDisplayInfo) const override;
public:
ViewObjectContactOfPageHelplines(ObjectContact& rObjectContact, ViewContact& rViewContact);
@@ -201,7 +201,7 @@ namespace sdr
ViewObjectContactOfSdrPage(ObjectContact& rObjectContact, ViewContact& rViewContact);
virtual ~ViewObjectContactOfSdrPage();
- virtual drawinglayer::primitive2d::Primitive2DSequence getPrimitive2DSequenceHierarchy(DisplayInfo& rDisplayInfo) const override;
+ virtual drawinglayer::primitive2d::Primitive2DContainer getPrimitive2DSequenceHierarchy(DisplayInfo& rDisplayInfo) const override;
};
} // end of namespace contact
} // end of namespace sdr
diff --git a/svx/inc/sdr/contact/viewobjectcontactofunocontrol.hxx b/svx/inc/sdr/contact/viewobjectcontactofunocontrol.hxx
index a6b82841e1c2..c9c1abbff6df 100644
--- a/svx/inc/sdr/contact/viewobjectcontactofunocontrol.hxx
+++ b/svx/inc/sdr/contact/viewobjectcontactofunocontrol.hxx
@@ -92,7 +92,7 @@ namespace sdr { namespace contact {
virtual ~ViewObjectContactOfUnoControl();
// support for Primitive2D
- virtual drawinglayer::primitive2d::Primitive2DSequence createPrimitive2DSequence(const DisplayInfo& rDisplayInfo) const override;
+ virtual drawinglayer::primitive2d::Primitive2DContainer createPrimitive2DSequence(const DisplayInfo& rDisplayInfo) const override;
// visibility check
virtual bool isPrimitiveVisible( const DisplayInfo& _rDisplayInfo ) const override;
@@ -114,7 +114,7 @@ namespace sdr { namespace contact {
UnoControlPrintOrPreviewContact( const UnoControlPrintOrPreviewContact& ) = delete;
UnoControlPrintOrPreviewContact& operator=( const UnoControlPrintOrPreviewContact& ) = delete;
- virtual drawinglayer::primitive2d::Primitive2DSequence createPrimitive2DSequence(const DisplayInfo& rDisplayInfo ) const override;
+ virtual drawinglayer::primitive2d::Primitive2DContainer createPrimitive2DSequence(const DisplayInfo& rDisplayInfo ) const override;
};
diff --git a/svx/inc/sdr/overlay/overlaycrosshair.hxx b/svx/inc/sdr/overlay/overlaycrosshair.hxx
index afe49f76849a..a216694b8e13 100644
--- a/svx/inc/sdr/overlay/overlaycrosshair.hxx
+++ b/svx/inc/sdr/overlay/overlaycrosshair.hxx
@@ -32,7 +32,7 @@ namespace sdr
{
protected:
// geometry creation for OverlayObject
- virtual drawinglayer::primitive2d::Primitive2DSequence createOverlayObjectPrimitive2DSequence() override;
+ virtual drawinglayer::primitive2d::Primitive2DContainer createOverlayObjectPrimitive2DSequence() override;
public:
explicit OverlayCrosshairStriped(const basegfx::B2DPoint& rBasePos);
diff --git a/svx/inc/sdr/overlay/overlayhandle.hxx b/svx/inc/sdr/overlay/overlayhandle.hxx
index 6bde7350cf82..201fd93d12fe 100644
--- a/svx/inc/sdr/overlay/overlayhandle.hxx
+++ b/svx/inc/sdr/overlay/overlayhandle.hxx
@@ -24,7 +24,7 @@ protected:
Color maStrokeColor;
// geometry creation for OverlayObject
- virtual drawinglayer::primitive2d::Primitive2DSequence createOverlayObjectPrimitive2DSequence() override;
+ virtual drawinglayer::primitive2d::Primitive2DContainer createOverlayObjectPrimitive2DSequence() override;
public:
OverlayHandle(const basegfx::B2DPoint& rBasePos,
diff --git a/svx/inc/sdr/overlay/overlayhelpline.hxx b/svx/inc/sdr/overlay/overlayhelpline.hxx
index 054d348b24cd..865efffa9116 100644
--- a/svx/inc/sdr/overlay/overlayhelpline.hxx
+++ b/svx/inc/sdr/overlay/overlayhelpline.hxx
@@ -36,7 +36,7 @@ namespace sdr
SdrHelpLineKind meKind;
// geometry creation for OverlayObject
- virtual drawinglayer::primitive2d::Primitive2DSequence createOverlayObjectPrimitive2DSequence() override;
+ virtual drawinglayer::primitive2d::Primitive2DContainer createOverlayObjectPrimitive2DSequence() override;
public:
explicit OverlayHelplineStriped(
diff --git a/svx/inc/sdr/overlay/overlayline.hxx b/svx/inc/sdr/overlay/overlayline.hxx
index 9738a8d0a936..315ae525879d 100644
--- a/svx/inc/sdr/overlay/overlayline.hxx
+++ b/svx/inc/sdr/overlay/overlayline.hxx
@@ -35,7 +35,7 @@ namespace sdr
basegfx::B2DPoint maSecondPosition;
// geometry creation for OverlayObject
- virtual drawinglayer::primitive2d::Primitive2DSequence createOverlayObjectPrimitive2DSequence() override;
+ virtual drawinglayer::primitive2d::Primitive2DContainer createOverlayObjectPrimitive2DSequence() override;
public:
OverlayLineStriped(
diff --git a/svx/inc/sdr/overlay/overlayrectangle.hxx b/svx/inc/sdr/overlay/overlayrectangle.hxx
index 1fcb805bde59..289a8c1da37a 100644
--- a/svx/inc/sdr/overlay/overlayrectangle.hxx
+++ b/svx/inc/sdr/overlay/overlayrectangle.hxx
@@ -45,7 +45,7 @@ namespace sdr
bool mbOverlayState : 1;
// geometry creation for OverlayObject
- virtual drawinglayer::primitive2d::Primitive2DSequence createOverlayObjectPrimitive2DSequence() override;
+ virtual drawinglayer::primitive2d::Primitive2DContainer createOverlayObjectPrimitive2DSequence() override;
public:
OverlayRectangle(
diff --git a/svx/inc/sdr/overlay/overlayrollingrectangle.hxx b/svx/inc/sdr/overlay/overlayrollingrectangle.hxx
index ffc3eeceb195..8bbab3cc7c91 100644
--- a/svx/inc/sdr/overlay/overlayrollingrectangle.hxx
+++ b/svx/inc/sdr/overlay/overlayrollingrectangle.hxx
@@ -42,7 +42,7 @@ namespace sdr
bool mbShowBounds : 1;
// geometry creation for OverlayObject
- virtual drawinglayer::primitive2d::Primitive2DSequence createOverlayObjectPrimitive2DSequence() override;
+ virtual drawinglayer::primitive2d::Primitive2DContainer createOverlayObjectPrimitive2DSequence() override;
public:
OverlayRollingRectangleStriped(
diff --git a/svx/inc/sdr/overlay/overlaytools.hxx b/svx/inc/sdr/overlay/overlaytools.hxx
index f5b8c96de422..cac032c5f991 100644
--- a/svx/inc/sdr/overlay/overlaytools.hxx
+++ b/svx/inc/sdr/overlay/overlaytools.hxx
@@ -41,7 +41,7 @@ private:
double mfRotation;
protected:
- virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
+ virtual Primitive2DContainer create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
public:
OverlayStaticRectanglePrimitive(
@@ -87,7 +87,7 @@ namespace drawinglayer
double mfRotation;
protected:
- virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
+ virtual Primitive2DContainer create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
public:
OverlayBitmapExPrimitive(
@@ -132,7 +132,7 @@ namespace drawinglayer
double mfDiscreteDashLength;
protected:
- virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
+ virtual Primitive2DContainer create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
public:
OverlayCrosshairPrimitive(
@@ -180,7 +180,7 @@ namespace drawinglayer
double mfRotation;
protected:
- virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
+ virtual Primitive2DContainer create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
public:
OverlayRectanglePrimitive(
@@ -236,7 +236,7 @@ namespace drawinglayer
double mfDiscreteDashLength;
protected:
- virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
+ virtual Primitive2DContainer create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
public:
OverlayHelplineStripedPrimitive(
@@ -281,7 +281,7 @@ namespace drawinglayer
double mfDiscreteDashLength;
protected:
- virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
+ virtual Primitive2DContainer create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
public:
OverlayRollingRectanglePrimitive(
diff --git a/svx/inc/sdr/primitive2d/sdrcaptionprimitive2d.hxx b/svx/inc/sdr/primitive2d/sdrcaptionprimitive2d.hxx
index 2fd8ac5e9839..4ec91c56a7f3 100644
--- a/svx/inc/sdr/primitive2d/sdrcaptionprimitive2d.hxx
+++ b/svx/inc/sdr/primitive2d/sdrcaptionprimitive2d.hxx
@@ -45,7 +45,7 @@ namespace drawinglayer
protected:
// local decomposition.
- virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const override;
+ virtual Primitive2DContainer create2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const override;
public:
SdrCaptionPrimitive2D(
diff --git a/svx/inc/sdr/primitive2d/sdrconnectorprimitive2d.hxx b/svx/inc/sdr/primitive2d/sdrconnectorprimitive2d.hxx
index 6a3ef322b0bf..3626089a13c0 100644
--- a/svx/inc/sdr/primitive2d/sdrconnectorprimitive2d.hxx
+++ b/svx/inc/sdr/primitive2d/sdrconnectorprimitive2d.hxx
@@ -41,7 +41,7 @@ namespace drawinglayer
protected:
// local decomposition.
- virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const override;
+ virtual Primitive2DContainer create2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const override;
public:
SdrConnectorPrimitive2D(
diff --git a/svx/inc/sdr/primitive2d/sdrcustomshapeprimitive2d.hxx b/svx/inc/sdr/primitive2d/sdrcustomshapeprimitive2d.hxx
index f1780e817141..5fb8f8747baa 100644
--- a/svx/inc/sdr/primitive2d/sdrcustomshapeprimitive2d.hxx
+++ b/svx/inc/sdr/primitive2d/sdrcustomshapeprimitive2d.hxx
@@ -37,7 +37,7 @@ namespace drawinglayer
{
private:
attribute::SdrShadowTextAttribute maSdrSTAttribute;
- Primitive2DSequence maSubPrimitives;
+ Primitive2DContainer maSubPrimitives;
basegfx::B2DHomMatrix maTextBox;
// bitfield
@@ -54,12 +54,12 @@ namespace drawinglayer
protected:
// local decomposition.
- virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const override;
+ virtual Primitive2DContainer create2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const override;
public:
SdrCustomShapePrimitive2D(
const attribute::SdrShadowTextAttribute& rSdrSTAttribute,
- const Primitive2DSequence& rSubPrimitives,
+ const Primitive2DContainer& rSubPrimitives,
const basegfx::B2DHomMatrix& rTextBox,
bool bWordWrap,
bool b3DShape,
@@ -67,7 +67,7 @@ namespace drawinglayer
// data access
const attribute::SdrShadowTextAttribute& getSdrSTAttribute() const { return maSdrSTAttribute; }
- const Primitive2DSequence& getSubPrimitives() const { return maSubPrimitives; }
+ const Primitive2DContainer& getSubPrimitives() const { return maSubPrimitives; }
const basegfx::B2DHomMatrix& getTextBox() const { return maTextBox; }
bool getWordWrap() const { return mbWordWrap; }
bool get3DShape() const { return mb3DShape; }
diff --git a/svx/inc/sdr/primitive2d/sdrellipseprimitive2d.hxx b/svx/inc/sdr/primitive2d/sdrellipseprimitive2d.hxx
index bc17ca962768..d9abb87fbb5f 100644
--- a/svx/inc/sdr/primitive2d/sdrellipseprimitive2d.hxx
+++ b/svx/inc/sdr/primitive2d/sdrellipseprimitive2d.hxx
@@ -41,7 +41,7 @@ namespace drawinglayer
protected:
// local decomposition.
- virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const override;
+ virtual Primitive2DContainer create2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const override;
public:
SdrEllipsePrimitive2D(
@@ -79,7 +79,7 @@ namespace drawinglayer
protected:
// local decomposition.
- virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const override;
+ virtual Primitive2DContainer create2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const override;
public:
SdrEllipseSegmentPrimitive2D(
diff --git a/svx/inc/sdr/primitive2d/sdrgrafprimitive2d.hxx b/svx/inc/sdr/primitive2d/sdrgrafprimitive2d.hxx
index 4275261ce202..f6c634a956e0 100644
--- a/svx/inc/sdr/primitive2d/sdrgrafprimitive2d.hxx
+++ b/svx/inc/sdr/primitive2d/sdrgrafprimitive2d.hxx
@@ -44,7 +44,7 @@ namespace drawinglayer
protected:
// local decomposition.
- virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const override;
+ virtual Primitive2DContainer create2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const override;
public:
SdrGrafPrimitive2D(
diff --git a/svx/inc/sdr/primitive2d/sdrmeasureprimitive2d.hxx b/svx/inc/sdr/primitive2d/sdrmeasureprimitive2d.hxx
index 483a623d2d39..b5a2a6b28c61 100644
--- a/svx/inc/sdr/primitive2d/sdrmeasureprimitive2d.hxx
+++ b/svx/inc/sdr/primitive2d/sdrmeasureprimitive2d.hxx
@@ -76,7 +76,7 @@ namespace drawinglayer
protected:
// local decomposition.
- virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const override;
+ virtual Primitive2DContainer create2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const override;
public:
SdrMeasurePrimitive2D(
diff --git a/svx/inc/sdr/primitive2d/sdrole2primitive2d.hxx b/svx/inc/sdr/primitive2d/sdrole2primitive2d.hxx
index 14a42031ed3e..775401b29277 100644
--- a/svx/inc/sdr/primitive2d/sdrole2primitive2d.hxx
+++ b/svx/inc/sdr/primitive2d/sdrole2primitive2d.hxx
@@ -36,18 +36,18 @@ namespace drawinglayer
class SdrOle2Primitive2D : public BasePrimitive2D
{
private:
- Primitive2DSequence maOLEContent;
+ Primitive2DContainer maOLEContent;
basegfx::B2DHomMatrix maTransform;
attribute::SdrLineFillShadowTextAttribute maSdrLFSTAttribute;
public:
SdrOle2Primitive2D(
- const Primitive2DSequence& rOLEContent,
+ const Primitive2DContainer& rOLEContent,
const basegfx::B2DHomMatrix& rTransform,
const attribute::SdrLineFillShadowTextAttribute& rSdrLFSTAttribute);
// data access
- const Primitive2DSequence& getOLEContent() const { return maOLEContent; }
+ const Primitive2DContainer& getOLEContent() const { return maOLEContent; }
const basegfx::B2DHomMatrix& getTransform() const { return maTransform; }
const attribute::SdrLineFillShadowTextAttribute& getSdrLFSTAttribute() const { return maSdrLFSTAttribute; }
@@ -55,7 +55,7 @@ namespace drawinglayer
virtual bool operator==(const BasePrimitive2D& rPrimitive) const override;
// local decomposition.
- virtual Primitive2DSequence get2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const override;
+ virtual Primitive2DContainer get2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const override;
// provide unique ID
DeclPrimitive2DIDBlock()
diff --git a/svx/inc/sdr/primitive2d/sdrolecontentprimitive2d.hxx b/svx/inc/sdr/primitive2d/sdrolecontentprimitive2d.hxx
index c8e6e54fb844..dc93f9acf9d9 100644
--- a/svx/inc/sdr/primitive2d/sdrolecontentprimitive2d.hxx
+++ b/svx/inc/sdr/primitive2d/sdrolecontentprimitive2d.hxx
@@ -48,7 +48,7 @@ namespace drawinglayer
protected:
// local decomposition.
- virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const override;
+ virtual Primitive2DContainer create2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const override;
public:
SdrOleContentPrimitive2D(
diff --git a/svx/inc/sdr/primitive2d/sdrpathprimitive2d.hxx b/svx/inc/sdr/primitive2d/sdrpathprimitive2d.hxx
index b997cace727b..c0ce62def30b 100644
--- a/svx/inc/sdr/primitive2d/sdrpathprimitive2d.hxx
+++ b/svx/inc/sdr/primitive2d/sdrpathprimitive2d.hxx
@@ -43,7 +43,7 @@ namespace drawinglayer
protected:
// local decomposition.
- virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const override;
+ virtual Primitive2DContainer create2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const override;
public:
SdrPathPrimitive2D(
diff --git a/svx/inc/sdr/primitive2d/sdrrectangleprimitive2d.hxx b/svx/inc/sdr/primitive2d/sdrrectangleprimitive2d.hxx
index eb4bd91c14c4..525ce86c54bc 100644
--- a/svx/inc/sdr/primitive2d/sdrrectangleprimitive2d.hxx
+++ b/svx/inc/sdr/primitive2d/sdrrectangleprimitive2d.hxx
@@ -47,7 +47,7 @@ namespace drawinglayer
protected:
// local decomposition.
- virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const override;
+ virtual Primitive2DContainer create2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const override;
public:
SdrRectanglePrimitive2D(
diff --git a/svx/inc/sdr/primitive2d/sdrtextprimitive2d.hxx b/svx/inc/sdr/primitive2d/sdrtextprimitive2d.hxx
index eced60a7849a..e8ad2250f041 100644
--- a/svx/inc/sdr/primitive2d/sdrtextprimitive2d.hxx
+++ b/svx/inc/sdr/primitive2d/sdrtextprimitive2d.hxx
@@ -78,7 +78,7 @@ namespace drawinglayer
protected:
// support for XTEXT_PAINTSHAPE_BEGIN/XTEXT_PAINTSHAPE_END Metafile comments
- static Primitive2DSequence encapsulateWithTextHierarchyBlockPrimitive2D(const Primitive2DSequence& rCandidate);
+ static Primitive2DContainer encapsulateWithTextHierarchyBlockPrimitive2D(const Primitive2DContainer& rCandidate);
public:
SdrTextPrimitive2D(
@@ -94,7 +94,7 @@ namespace drawinglayer
// own get2DDecomposition to take aspect of decomposition with or without spell checker
// into account
- virtual Primitive2DSequence get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
+ virtual Primitive2DContainer get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
// transformed clone operator
virtual SdrTextPrimitive2D* createTransformedClone(const basegfx::B2DHomMatrix& rTransform) const = 0;
@@ -119,7 +119,7 @@ namespace drawinglayer
protected:
// local decomposition.
- virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const override;
+ virtual Primitive2DContainer create2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const override;
public:
SdrContourTextPrimitive2D(
@@ -161,7 +161,7 @@ namespace drawinglayer
protected:
// local decomposition.
- virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const override;
+ virtual Primitive2DContainer create2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const override;
public:
SdrPathTextPrimitive2D(
@@ -211,7 +211,7 @@ namespace drawinglayer
protected:
// local decomposition.
- virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const override;
+ virtual Primitive2DContainer create2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const override;
public:
SdrBlockTextPrimitive2D(
@@ -265,7 +265,7 @@ namespace drawinglayer
protected:
// local decomposition.
- virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const override;
+ virtual Primitive2DContainer create2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const override;
public:
SdrStretchTextPrimitive2D(
@@ -306,7 +306,7 @@ namespace drawinglayer
protected:
// local decomposition.
- virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const override;
+ virtual Primitive2DContainer create2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const override;
public:
SdrAutoFitTextPrimitive2D(
@@ -343,7 +343,7 @@ namespace drawinglayer
::basegfx::B2DHomMatrix maTextRangeTransform; // text range transformation from unit range ([0.0 .. 1.0]) to text range
protected:
// local decomposition.
- virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const override;
+ virtual Primitive2DContainer create2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const override;
public:
SdrChainedTextPrimitive2D(
diff --git a/svx/source/dialog/framelink.cxx b/svx/source/dialog/framelink.cxx
index fd85200dbca5..43bb94ac824b 100644
--- a/svx/source/dialog/framelink.cxx
+++ b/svx/source/dialog/framelink.cxx
@@ -1405,11 +1405,11 @@ basegfx::B2DPoint lcl_PointToB2DPoint( const Point& rPoint )
return basegfx::B2DPoint(rPoint.getX(), rPoint.getY());
}
-drawinglayer::primitive2d::Primitive2DSequence CreateClippedBorderPrimitives (
+drawinglayer::primitive2d::Primitive2DContainer CreateClippedBorderPrimitives (
const Point& rStart, const Point& rEnd, const Style& rBorder,
const Rectangle& rClipRect )
{
- drawinglayer::primitive2d::Primitive2DSequence aSequence( 1 );
+ drawinglayer::primitive2d::Primitive2DContainer aSequence( 1 );
basegfx::B2DPolygon aPolygon;
aPolygon.append( lcl_PointToB2DPoint( rClipRect.TopLeft( ) ) );
aPolygon.append( lcl_PointToB2DPoint( rClipRect.TopRight( ) ) );
@@ -1432,13 +1432,13 @@ drawinglayer::primitive2d::Primitive2DSequence CreateClippedBorderPrimitives (
return aSequence;
}
-drawinglayer::primitive2d::Primitive2DSequence CreateBorderPrimitives(
+drawinglayer::primitive2d::Primitive2DContainer CreateBorderPrimitives(
const Point& rLPos, const Point& rRPos, const Style& rBorder,
const DiagStyle& /*rLFromTR*/, const Style& rLFromT, const Style& /*rLFromL*/, const Style& rLFromB, const DiagStyle& /*rLFromBR*/,
const DiagStyle& /*rRFromTL*/, const Style& rRFromT, const Style& /*rRFromR*/, const Style& rRFromB, const DiagStyle& /*rRFromBL*/,
const Color* /*pForceColor*/, const long& nRotateT, const long& nRotateB )
{
- drawinglayer::primitive2d::Primitive2DSequence aSequence( 1 );
+ drawinglayer::primitive2d::Primitive2DContainer aSequence( 1 );
basegfx::B2DPoint aStart( rLPos.getX(), rLPos.getY() );
basegfx::B2DPoint aEnd( rRPos.getX(), rRPos.getY() );
@@ -1460,7 +1460,7 @@ drawinglayer::primitive2d::Primitive2DSequence CreateBorderPrimitives(
return aSequence;
}
-drawinglayer::primitive2d::Primitive2DSequence CreateBorderPrimitives(
+drawinglayer::primitive2d::Primitive2DContainer CreateBorderPrimitives(
const Point& rLPos, const Point& rRPos, const Style& rBorder,
const Style& rLFromT, const Style& rLFromL, const Style& rLFromB,
const Style& rRFromT, const Style& rRFromR, const Style& rRFromB,
diff --git a/svx/source/dialog/pagectrl.cxx b/svx/source/dialog/pagectrl.cxx
index 65a31f216f5d..4f14fa4613d4 100644
--- a/svx/source/dialog/pagectrl.cxx
+++ b/svx/source/dialog/pagectrl.cxx
@@ -365,7 +365,7 @@ void SvxPageWindow::drawFillAttributes(vcl::RenderContext& rRenderContext,
rDefineRange.Bottom());
// prepare primitive sequence
- drawinglayer::primitive2d::Primitive2DSequence aSequence;
+ drawinglayer::primitive2d::Primitive2DContainer aSequence;
// create fill geometry if there is something to fill
if (rFillAttributes.get() && rFillAttributes->isUsed())
@@ -380,11 +380,11 @@ void SvxPageWindow::drawFillAttributes(vcl::RenderContext& rRenderContext,
new drawinglayer::primitive2d::PolygonHairlinePrimitive2D(
basegfx::tools::createPolygonFromRect(aPaintRange), GetLineColor().getBColor()));
- drawinglayer::primitive2d::appendPrimitive2DReferenceToPrimitive2DSequence(aSequence, xOutline);
+ aSequence.push_back(xOutline);
}
// draw that if we have something to draw
- if (aSequence.getLength())
+ if (!aSequence.empty())
{
const drawinglayer::geometry::ViewInformation2D aViewInformation2D(
basegfx::B2DHomMatrix(), GetViewTransformation(), aPaintRange, nullptr,
diff --git a/svx/source/engine3d/view3d.cxx b/svx/source/engine3d/view3d.cxx
index 1044492d5ceb..d7fd886b169a 100644
--- a/svx/source/engine3d/view3d.cxx
+++ b/svx/source/engine3d/view3d.cxx
@@ -89,7 +89,7 @@ class Impl3DMirrorConstructOverlay
basegfx::B2DPolyPolygon* mpPolygons;
// the overlay geometry from selected objects
- drawinglayer::primitive2d::Primitive2DSequence maFullOverlay;
+ drawinglayer::primitive2d::Primitive2DContainer maFullOverlay;
// Copy assignment is forbidden and not implemented.
Impl3DMirrorConstructOverlay (const Impl3DMirrorConstructOverlay &) = delete;
@@ -132,8 +132,8 @@ Impl3DMirrorConstructOverlay::Impl3DMirrorConstructOverlay(const E3dView& rView)
sdr::contact::ViewContact& rVC = pObject->GetViewContact();
sdr::contact::ViewObjectContact& rVOC = rVC.GetViewObjectContact(rOC);
- const drawinglayer::primitive2d::Primitive2DSequence aNewSequence(rVOC.getPrimitive2DSequenceHierarchy(aDisplayInfo));
- drawinglayer::primitive2d::appendPrimitive2DSequenceToPrimitive2DSequence(maFullOverlay, aNewSequence);
+ const drawinglayer::primitive2d::Primitive2DContainer aNewSequence(rVOC.getPrimitive2DSequenceHierarchy(aDisplayInfo));
+ maFullOverlay.append(aNewSequence);
}
}
}
@@ -187,21 +187,21 @@ void Impl3DMirrorConstructOverlay::SetMirrorAxis(Point aMirrorAxisA, Point aMirr
if(mrView.IsSolidDragging())
{
- if(maFullOverlay.hasElements())
+ if(!maFullOverlay.empty())
{
- drawinglayer::primitive2d::Primitive2DSequence aContent(maFullOverlay);
+ drawinglayer::primitive2d::Primitive2DContainer aContent(maFullOverlay);
if(!aMatrixTransform.isIdentity())
{
// embed in transformation group
drawinglayer::primitive2d::Primitive2DReference aTransformPrimitive2D(new drawinglayer::primitive2d::TransformPrimitive2D(aMatrixTransform, aContent));
- aContent = drawinglayer::primitive2d::Primitive2DSequence(&aTransformPrimitive2D, 1);
+ aContent = drawinglayer::primitive2d::Primitive2DContainer { aTransformPrimitive2D };
}
// if we have full overlay from selected objects, embed with 50% transparence, the
// transformation is added to the OverlayPrimitive2DSequenceObject
drawinglayer::primitive2d::Primitive2DReference aUnifiedTransparencePrimitive2D(new drawinglayer::primitive2d::UnifiedTransparencePrimitive2D(aContent, 0.5));
- aContent = drawinglayer::primitive2d::Primitive2DSequence(&aUnifiedTransparencePrimitive2D, 1);
+ aContent = drawinglayer::primitive2d::Primitive2DContainer { aUnifiedTransparencePrimitive2D };
sdr::overlay::OverlayPrimitive2DSequenceObject* pNew = new sdr::overlay::OverlayPrimitive2DSequenceObject(aContent);
diff --git a/svx/source/sdr/animation/animationstate.cxx b/svx/source/sdr/animation/animationstate.cxx
index bc7b573fcc16..145b47a47dbb 100644
--- a/svx/source/sdr/animation/animationstate.cxx
+++ b/svx/source/sdr/animation/animationstate.cxx
@@ -36,9 +36,9 @@ namespace sdr
{
double fRetval(0.0);
- if(maAnimatedPrimitives.hasElements())
+ if(!maAnimatedPrimitives.empty())
{
- const sal_Int32 nCount(maAnimatedPrimitives.getLength());
+ const sal_Int32 nCount(maAnimatedPrimitives.size());
for(sal_Int32 a(0L); a < nCount; a++)
{
@@ -107,7 +107,7 @@ namespace sdr
}
}
- PrimitiveAnimation::PrimitiveAnimation(sdr::contact::ViewObjectContact& rVOContact, const drawinglayer::primitive2d::Primitive2DSequence& rAnimatedPrimitives)
+ PrimitiveAnimation::PrimitiveAnimation(sdr::contact::ViewObjectContact& rVOContact, const drawinglayer::primitive2d::Primitive2DContainer& rAnimatedPrimitives)
: Event(0L),
mrVOContact(rVOContact),
maAnimatedPrimitives(rAnimatedPrimitives)
diff --git a/svx/source/sdr/attribute/sdrallfillattributeshelper.cxx b/svx/source/sdr/attribute/sdrallfillattributeshelper.cxx
index 58965e446b19..f98f1d754fc3 100644
--- a/svx/source/sdr/attribute/sdrallfillattributeshelper.cxx
+++ b/svx/source/sdr/attribute/sdrallfillattributeshelper.cxx
@@ -43,7 +43,7 @@ namespace drawinglayer
if(isUsed())
{
- maPrimitives.realloc(1);
+ maPrimitives.resize(1);
maPrimitives[0] = drawinglayer::primitive2d::createPolyPolygonFillPrimitive(
basegfx::B2DPolyPolygon(
basegfx::tools::createPolygonFromRect(
@@ -135,16 +135,16 @@ namespace drawinglayer
return *maFillGradientAttribute.get();
}
- const drawinglayer::primitive2d::Primitive2DSequence& SdrAllFillAttributesHelper::getPrimitive2DSequence(
+ const drawinglayer::primitive2d::Primitive2DContainer& SdrAllFillAttributesHelper::getPrimitive2DSequence(
const basegfx::B2DRange& rPaintRange,
const basegfx::B2DRange& rDefineRange) const
{
- if(maPrimitives.getLength() && (maLastPaintRange != rPaintRange || maLastDefineRange != rDefineRange))
+ if(maPrimitives.size() && (maLastPaintRange != rPaintRange || maLastDefineRange != rDefineRange))
{
- const_cast< SdrAllFillAttributesHelper* >(this)->maPrimitives.realloc(0);
+ const_cast< SdrAllFillAttributesHelper* >(this)->maPrimitives.clear();
}
- if(!maPrimitives.getLength())
+ if(!maPrimitives.size())
{
const_cast< SdrAllFillAttributesHelper* >(this)->createPrimitive2DSequence(rPaintRange, rDefineRange);
}
diff --git a/svx/source/sdr/contact/objectcontactofobjlistpainter.cxx b/svx/source/sdr/contact/objectcontactofobjlistpainter.cxx
index 69d74b0862ad..5c9fb17a6e27 100644
--- a/svx/source/sdr/contact/objectcontactofobjlistpainter.cxx
+++ b/svx/source/sdr/contact/objectcontactofobjlistpainter.cxx
@@ -103,18 +103,17 @@ void ObjectContactOfObjListPainter::ProcessDisplay(DisplayInfo& rDisplayInfo)
updateViewInformation2D(aNewViewInformation2D);
// collect primitive data in a sequence; this will already use the updated ViewInformation2D
- drawinglayer::primitive2d::Primitive2DSequence xPrimitiveSequence;
+ drawinglayer::primitive2d::Primitive2DContainer xPrimitiveSequence;
for(sal_uInt32 a(0L); a < nCount; a++)
{
const ViewObjectContact& rViewObjectContact = GetPaintObjectViewContact(a).GetViewObjectContact(*this);
- drawinglayer::primitive2d::appendPrimitive2DSequenceToPrimitive2DSequence(xPrimitiveSequence,
- rViewObjectContact.getPrimitive2DSequenceHierarchy(rDisplayInfo));
+ xPrimitiveSequence.append(rViewObjectContact.getPrimitive2DSequenceHierarchy(rDisplayInfo));
}
// if there is something to show, use a vclProcessor to render it
- if(xPrimitiveSequence.hasElements())
+ if(!xPrimitiveSequence.empty())
{
std::unique_ptr<drawinglayer::processor2d::BaseProcessor2D> pProcessor2D(drawinglayer::processor2d::createProcessor2DFromOutputDevice(
*pTargetDevice,
diff --git a/svx/source/sdr/contact/objectcontactofpageview.cxx b/svx/source/sdr/contact/objectcontactofpageview.cxx
index b30c904bb5f1..30b69edf61b3 100644
--- a/svx/source/sdr/contact/objectcontactofpageview.cxx
+++ b/svx/source/sdr/contact/objectcontactofpageview.cxx
@@ -243,9 +243,9 @@ namespace sdr
uno::Sequence<beans::PropertyValue>());
updateViewInformation2D(aNewViewInformation2D);
- drawinglayer::primitive2d::Primitive2DSequence xPrimitiveSequence;
+ drawinglayer::primitive2d::Primitive2DContainer xPrimitiveSequence;
#if HAVE_FEATURE_DESKTOP || defined( ANDROID )
- // get whole Primitive2DSequence; this will already make use of updated ViewInformation2D
+ // get whole Primitive2DContainer; this will already make use of updated ViewInformation2D
// and may use the MapMode from the Target OutDev in the DisplayInfo
xPrimitiveSequence = rDrawPageVOContact.getPrimitive2DSequenceHierarchy(rDisplayInfo);
#else
@@ -276,7 +276,7 @@ namespace sdr
}
if (bGetHierarchy)
- // get whole Primitive2DSequence; this will already make use of updated ViewInformation2D
+ // get whole Primitive2DContainer; this will already make use of updated ViewInformation2D
// and may use the MapMode from the Target OutDev in the DisplayInfo
xPrimitiveSequence = rDrawPageVOContact.getPrimitive2DSequenceHierarchy(rDisplayInfo);
#endif
@@ -286,7 +286,7 @@ namespace sdr
// createProcessor2DFromOutputDevice and takes into account things like the
// Target is a MetaFile, a VDev or something else. The Canvas renderer is triggered
// currently using the shown boolean. Canvas is not yet the default.
- if(xPrimitiveSequence.hasElements())
+ if(!xPrimitiveSequence.empty())
{
// prepare OutputDevice (historical stuff, maybe soon removed)
rDisplayInfo.ClearGhostedDrawMode(); // reset, else the VCL-paint with the processor will not do the right thing
diff --git a/svx/source/sdr/contact/viewcontact.cxx b/svx/source/sdr/contact/viewcontact.cxx
index 9e15adb3ad96..48ac905bedc3 100644
--- a/svx/source/sdr/contact/viewcontact.cxx
+++ b/svx/source/sdr/contact/viewcontact.cxx
@@ -225,7 +225,7 @@ SdrObject* ViewContact::TryToGetSdrObject() const
// primitive stuff
-drawinglayer::primitive2d::Primitive2DSequence ViewContact::createViewIndependentPrimitive2DSequence() const
+drawinglayer::primitive2d::Primitive2DContainer ViewContact::createViewIndependentPrimitive2DSequence() const
{
// This is the default implementation and should never be called (see header). If this is called,
// someone implemented a ViewContact (VC) visualisation object without defining the visualisation by
@@ -238,38 +238,38 @@ drawinglayer::primitive2d::Primitive2DSequence ViewContact::createViewIndependen
const drawinglayer::primitive2d::Primitive2DReference xReference(
new drawinglayer::primitive2d::PolygonHairlinePrimitive2D(aOutline, aYellow));
- return drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1);
+ return drawinglayer::primitive2d::Primitive2DContainer { xReference };
}
-drawinglayer::primitive2d::Primitive2DSequence ViewContact::getViewIndependentPrimitive2DSequence() const
+drawinglayer::primitive2d::Primitive2DContainer ViewContact::getViewIndependentPrimitive2DSequence() const
{
// local up-to-date checks. Create new list and compare.
- drawinglayer::primitive2d::Primitive2DSequence xNew(createViewIndependentPrimitive2DSequence());
+ drawinglayer::primitive2d::Primitive2DContainer xNew(createViewIndependentPrimitive2DSequence());
- if(xNew.hasElements())
+ if(!xNew.empty())
{
// allow evtl. embedding in object-specific infos, e.g. Name, Title, Description
xNew = embedToObjectSpecificInformation(xNew);
}
- if(!drawinglayer::primitive2d::arePrimitive2DSequencesEqual(mxViewIndependentPrimitive2DSequence, xNew))
+ if(mxViewIndependentPrimitive2DSequence != xNew)
{
// has changed, copy content
const_cast< ViewContact* >(this)->mxViewIndependentPrimitive2DSequence = xNew;
}
- // return current Primitive2DSequence
+ // return current Primitive2DContainer
return mxViewIndependentPrimitive2DSequence;
}
// add Gluepoints (if available)
-drawinglayer::primitive2d::Primitive2DSequence ViewContact::createGluePointPrimitive2DSequence() const
+drawinglayer::primitive2d::Primitive2DContainer ViewContact::createGluePointPrimitive2DSequence() const
{
// default returns empty reference
- return drawinglayer::primitive2d::Primitive2DSequence();
+ return drawinglayer::primitive2d::Primitive2DContainer();
}
-drawinglayer::primitive2d::Primitive2DSequence ViewContact::embedToObjectSpecificInformation(const drawinglayer::primitive2d::Primitive2DSequence& rSource) const
+drawinglayer::primitive2d::Primitive2DContainer ViewContact::embedToObjectSpecificInformation(const drawinglayer::primitive2d::Primitive2DContainer& rSource) const
{
// nothing to do for default
return rSource;
diff --git a/svx/source/sdr/contact/viewcontactofe3d.cxx b/svx/source/sdr/contact/viewcontactofe3d.cxx
index a07a7ec1cf4c..3e355bbec026 100644
--- a/svx/source/sdr/contact/viewcontactofe3d.cxx
+++ b/svx/source/sdr/contact/viewcontactofe3d.cxx
@@ -67,10 +67,10 @@ const sdr::contact::ViewContactOfE3dScene* tryToFindVCOfE3DScene(
namespace sdr { namespace contact {
-drawinglayer::primitive2d::Primitive2DSequence ViewContactOfE3d::impCreateWithGivenPrimitive3DSequence(
+drawinglayer::primitive2d::Primitive2DContainer ViewContactOfE3d::impCreateWithGivenPrimitive3DSequence(
const drawinglayer::primitive3d::Primitive3DSequence& rxContent3D) const
{
- drawinglayer::primitive2d::Primitive2DSequence xRetval;
+ drawinglayer::primitive2d::Primitive2DContainer xRetval;
if(rxContent3D.hasElements())
{
@@ -119,7 +119,7 @@ drawinglayer::primitive2d::Primitive2DSequence ViewContactOfE3d::impCreateWithGi
fShadowSlant,
rAllContentRange));
- xRetval = drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1);
+ xRetval = drawinglayer::primitive2d::Primitive2DContainer { xReference };
}
}
@@ -146,7 +146,7 @@ drawinglayer::primitive3d::Primitive3DSequence ViewContactOfE3d::getVIP3DSWithou
const_cast< ViewContactOfE3d* >(this)->mxViewIndependentPrimitive3DSequence = xNew;
}
- // return current Primitive2DSequence
+ // return current Primitive2DContainer
return mxViewIndependentPrimitive3DSequence;
}
@@ -171,11 +171,11 @@ drawinglayer::primitive3d::Primitive3DSequence ViewContactOfE3d::getViewIndepend
}
}
- // return current Primitive2DSequence
+ // return current Primitive2DContainer
return xRetval;
}
-drawinglayer::primitive2d::Primitive2DSequence ViewContactOfE3d::createViewIndependentPrimitive2DSequence() const
+drawinglayer::primitive2d::Primitive2DContainer ViewContactOfE3d::createViewIndependentPrimitive2DSequence() const
{
// also need to create a 2D embedding when the view-independent part is requested,
// see view-dependent part in ViewObjectContactOfE3d::createPrimitive2DSequence
diff --git a/svx/source/sdr/contact/viewcontactofe3dscene.cxx b/svx/source/sdr/contact/viewcontactofe3dscene.cxx
index 383d09fd788c..d3412d6e1a90 100644
--- a/svx/source/sdr/contact/viewcontactofe3dscene.cxx
+++ b/svx/source/sdr/contact/viewcontactofe3dscene.cxx
@@ -268,10 +268,10 @@ void ViewContactOfE3dScene::createSdrLightingAttribute()
maSdrLightingAttribute = drawinglayer::primitive2d::createNewSdrLightingAttribute(rItemSet);
}
-drawinglayer::primitive2d::Primitive2DSequence ViewContactOfE3dScene::createScenePrimitive2DSequence(
+drawinglayer::primitive2d::Primitive2DContainer ViewContactOfE3dScene::createScenePrimitive2DSequence(
const SetOfByte* pLayerVisibility) const
{
- drawinglayer::primitive2d::Primitive2DSequence xRetval;
+ drawinglayer::primitive2d::Primitive2DContainer xRetval;
const sal_uInt32 nChildrenCount(GetObjectCount());
if(nChildrenCount)
@@ -321,21 +321,21 @@ drawinglayer::primitive2d::Primitive2DSequence ViewContactOfE3dScene::createScen
getObjectTransformation(),
getViewInformation3D(aContentRange)));
- xRetval = drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1);
+ xRetval = drawinglayer::primitive2d::Primitive2DContainer{ xReference };
}
}
// always append an invisible outline for the cases where no visible content exists
- drawinglayer::primitive2d::appendPrimitive2DReferenceToPrimitive2DSequence(xRetval,
+ xRetval.push_back(
drawinglayer::primitive2d::createHiddenGeometryPrimitives2D(
false, getObjectTransformation()));
return xRetval;
}
-drawinglayer::primitive2d::Primitive2DSequence ViewContactOfE3dScene::createViewIndependentPrimitive2DSequence() const
+drawinglayer::primitive2d::Primitive2DContainer ViewContactOfE3dScene::createViewIndependentPrimitive2DSequence() const
{
- drawinglayer::primitive2d::Primitive2DSequence xRetval;
+ drawinglayer::primitive2d::Primitive2DContainer xRetval;
if(GetObjectCount())
{
diff --git a/svx/source/sdr/contact/viewcontactofgraphic.cxx b/svx/source/sdr/contact/viewcontactofgraphic.cxx
index cf1d95d6fe14..862b118d0a81 100644
--- a/svx/source/sdr/contact/viewcontactofgraphic.cxx
+++ b/svx/source/sdr/contact/viewcontactofgraphic.cxx
@@ -81,11 +81,11 @@ namespace sdr
flushViewIndependentPrimitive2DSequence();
}
- drawinglayer::primitive2d::Primitive2DSequence ViewContactOfGraphic::createVIP2DSForPresObj(
+ drawinglayer::primitive2d::Primitive2DContainer ViewContactOfGraphic::createVIP2DSForPresObj(
const basegfx::B2DHomMatrix& rObjectMatrix,
const drawinglayer::attribute::SdrLineFillShadowTextAttribute& rAttribute) const
{
- drawinglayer::primitive2d::Primitive2DSequence xRetval;
+ drawinglayer::primitive2d::Primitive2DContainer xRetval;
GraphicObject aEmptyGraphicObject;
GraphicAttr aEmptyGraphicAttr;
@@ -95,7 +95,7 @@ namespace sdr
rAttribute,
aEmptyGraphicObject,
aEmptyGraphicAttr));
- xRetval = drawinglayer::primitive2d::Primitive2DSequence(&xReferenceA, 1);
+ xRetval = drawinglayer::primitive2d::Primitive2DContainer { xReferenceA };
// SdrGrafPrimitive2D with content (which is the preview graphic) scaled to smaller size and
// without attributes
@@ -139,17 +139,17 @@ namespace sdr
rGraphicObject,
aLocalGrafInfo));
- drawinglayer::primitive2d::appendPrimitive2DReferenceToPrimitive2DSequence(xRetval, xReferenceB);
+ xRetval.push_back(xReferenceB);
}
return xRetval;
}
- drawinglayer::primitive2d::Primitive2DSequence ViewContactOfGraphic::createVIP2DSForDraft(
+ drawinglayer::primitive2d::Primitive2DContainer ViewContactOfGraphic::createVIP2DSForDraft(
const basegfx::B2DHomMatrix& rObjectMatrix,
const drawinglayer::attribute::SdrLineFillShadowTextAttribute& rAttribute) const
{
- drawinglayer::primitive2d::Primitive2DSequence xRetval;
+ drawinglayer::primitive2d::Primitive2DContainer xRetval;
GraphicObject aEmptyGraphicObject;
GraphicAttr aEmptyGraphicAttr;
@@ -159,7 +159,7 @@ namespace sdr
rAttribute,
aEmptyGraphicObject,
aEmptyGraphicAttr));
- xRetval = drawinglayer::primitive2d::Primitive2DSequence(&xReferenceA, 1);
+ xRetval = drawinglayer::primitive2d::Primitive2DContainer { xReferenceA };
if(rAttribute.getLine().isDefault())
{
@@ -169,7 +169,7 @@ namespace sdr
basegfx::B2DPolygon aOutline(basegfx::tools::createUnitPolygon());
aOutline.transform(rObjectMatrix);
- drawinglayer::primitive2d::appendPrimitive2DReferenceToPrimitive2DSequence(xRetval,
+ xRetval.push_back(
drawinglayer::primitive2d::Primitive2DReference(
new drawinglayer::primitive2d::PolygonHairlinePrimitive2D(
aOutline,
@@ -219,7 +219,7 @@ namespace sdr
const basegfx::B2DHomMatrix aBitmapMatrix(basegfx::tools::createScaleShearXRotateTranslateB2DHomMatrix(
fWidth, fHeight, fShearX, fRotate, aTranslate.getX(), aTranslate.getY()));
- drawinglayer::primitive2d::appendPrimitive2DReferenceToPrimitive2DSequence(xRetval,
+ xRetval.push_back(
drawinglayer::primitive2d::Primitive2DReference(
new drawinglayer::primitive2d::BitmapPrimitive2D(
BitmapEx(aDraftBitmap),
@@ -284,18 +284,17 @@ namespace sdr
// layout the text to more simple TextPrimitives from drawinglayer
const drawinglayer::geometry::ViewInformation2D aViewInformation2D;
- drawinglayer::primitive2d::appendPrimitive2DSequenceToPrimitive2DSequence(
- xRetval,
- xBlockTextPrimitive->get2DDecomposition(aViewInformation2D));
+ drawinglayer::primitive2d::Primitive2DContainer aDecomposition(xBlockTextPrimitive->get2DDecomposition(aViewInformation2D));
+ xRetval.insert(xRetval.end(), aDecomposition.begin(), aDecomposition.end());
}
}
return xRetval;
}
- drawinglayer::primitive2d::Primitive2DSequence ViewContactOfGraphic::createViewIndependentPrimitive2DSequence() const
+ drawinglayer::primitive2d::Primitive2DContainer ViewContactOfGraphic::createViewIndependentPrimitive2DSequence() const
{
- drawinglayer::primitive2d::Primitive2DSequence xRetval;
+ drawinglayer::primitive2d::Primitive2DContainer xRetval;
const SfxItemSet& rItemSet = GetGrafObject().GetMergedItemSet();
// create and fill GraphicAttr
@@ -397,11 +396,11 @@ namespace sdr
rGraphicObject,
aLocalGrafInfo));
- xRetval = drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1);
+ xRetval = drawinglayer::primitive2d::Primitive2DContainer { xReference };
}
// always append an invisible outline for the cases where no visible content exists
- drawinglayer::primitive2d::appendPrimitive2DReferenceToPrimitive2DSequence(xRetval,
+ xRetval.push_back(
drawinglayer::primitive2d::createHiddenGeometryPrimitives2D(
false, aObjectMatrix));
diff --git a/svx/source/sdr/contact/viewcontactofgroup.cxx b/svx/source/sdr/contact/viewcontactofgroup.cxx
index af037e58dcb3..7fdfb1b358a0 100644
--- a/svx/source/sdr/contact/viewcontactofgroup.cxx
+++ b/svx/source/sdr/contact/viewcontactofgroup.cxx
@@ -53,9 +53,9 @@ namespace sdr
{
}
- drawinglayer::primitive2d::Primitive2DSequence ViewContactOfGroup::createViewIndependentPrimitive2DSequence() const
+ drawinglayer::primitive2d::Primitive2DContainer ViewContactOfGroup::createViewIndependentPrimitive2DSequence() const
{
- drawinglayer::primitive2d::Primitive2DSequence xRetval;
+ drawinglayer::primitive2d::Primitive2DContainer xRetval;
const sal_uInt32 nObjectCount(GetObjectCount());
if(nObjectCount)
@@ -64,9 +64,9 @@ namespace sdr
for(sal_uInt32 a(0); a < nObjectCount; a++)
{
const ViewContact& rCandidate(GetViewContact(a));
- const drawinglayer::primitive2d::Primitive2DSequence aCandSeq(rCandidate.getViewIndependentPrimitive2DSequence());
+ const drawinglayer::primitive2d::Primitive2DContainer aCandSeq(rCandidate.getViewIndependentPrimitive2DSequence());
- drawinglayer::primitive2d::appendPrimitive2DSequenceToPrimitive2DSequence(xRetval, aCandSeq);
+ xRetval.insert(xRetval.end(), aCandSeq.begin(), aCandSeq.end());
}
}
else
@@ -85,7 +85,7 @@ namespace sdr
drawinglayer::primitive2d::createHiddenGeometryPrimitives2D(
false, aCurrentRange));
- xRetval = drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1);
+ xRetval = drawinglayer::primitive2d::Primitive2DContainer { xReference };
}
return xRetval;
diff --git a/svx/source/sdr/contact/viewcontactofmasterpagedescriptor.cxx b/svx/source/sdr/contact/viewcontactofmasterpagedescriptor.cxx
index a9893045d222..23f5ab5b21ed 100644
--- a/svx/source/sdr/contact/viewcontactofmasterpagedescriptor.cxx
+++ b/svx/source/sdr/contact/viewcontactofmasterpagedescriptor.cxx
@@ -47,9 +47,9 @@ namespace sdr
return *(new ViewObjectContactOfMasterPageDescriptor(rObjectContact, *this));
}
- drawinglayer::primitive2d::Primitive2DSequence ViewContactOfMasterPageDescriptor::createViewIndependentPrimitive2DSequence() const
+ drawinglayer::primitive2d::Primitive2DContainer ViewContactOfMasterPageDescriptor::createViewIndependentPrimitive2DSequence() const
{
- drawinglayer::primitive2d::Primitive2DSequence xRetval;
+ drawinglayer::primitive2d::Primitive2DContainer xRetval;
drawinglayer::attribute::SdrFillAttribute aFill;
const SdrPageProperties* pCorrectProperties = GetMasterPageDescriptor().getCorrectSdrPageProperties();
@@ -74,7 +74,7 @@ namespace sdr
aFill,
drawinglayer::attribute::FillGradientAttribute()));
- xRetval = drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1);
+ xRetval = drawinglayer::primitive2d::Primitive2DContainer{ xReference };
}
return xRetval;
diff --git a/svx/source/sdr/contact/viewcontactofpageobj.cxx b/svx/source/sdr/contact/viewcontactofpageobj.cxx
index 98784a868f12..9ef99daf4ad4 100644
--- a/svx/source/sdr/contact/viewcontactofpageobj.cxx
+++ b/svx/source/sdr/contact/viewcontactofpageobj.cxx
@@ -64,7 +64,7 @@ void ViewContactOfPageObj::ActionChanged()
}
}
-drawinglayer::primitive2d::Primitive2DSequence ViewContactOfPageObj::createViewIndependentPrimitive2DSequence() const
+drawinglayer::primitive2d::Primitive2DContainer ViewContactOfPageObj::createViewIndependentPrimitive2DSequence() const
{
// create graphical visualisation data. Since this is the view-independent version which should not be used,
// create a replacement graphic visualisation here. Use GetLastBoundRect to access the model data directly
@@ -75,7 +75,7 @@ drawinglayer::primitive2d::Primitive2DSequence ViewContactOfPageObj::createViewI
const basegfx::BColor aYellow(1.0, 1.0, 0.0);
const drawinglayer::primitive2d::Primitive2DReference xReference(new drawinglayer::primitive2d::PolygonHairlinePrimitive2D(aOutline, aYellow));
- return drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1);
+ return drawinglayer::primitive2d::Primitive2DContainer { xReference };
}
}}
diff --git a/svx/source/sdr/contact/viewcontactofsdrcaptionobj.cxx b/svx/source/sdr/contact/viewcontactofsdrcaptionobj.cxx
index 4e119601f823..dfc78ecf7d7d 100644
--- a/svx/source/sdr/contact/viewcontactofsdrcaptionobj.cxx
+++ b/svx/source/sdr/contact/viewcontactofsdrcaptionobj.cxx
@@ -51,9 +51,9 @@ namespace sdr
{
}
- drawinglayer::primitive2d::Primitive2DSequence ViewContactOfSdrCaptionObj::createViewIndependentPrimitive2DSequence() const
+ drawinglayer::primitive2d::Primitive2DContainer ViewContactOfSdrCaptionObj::createViewIndependentPrimitive2DSequence() const
{
- drawinglayer::primitive2d::Primitive2DSequence xRetval;
+ drawinglayer::primitive2d::Primitive2DContainer xRetval;
const SdrCaptionObj& rCaptionObj(GetCaptionObj());
const SfxItemSet& rItemSet = rCaptionObj.GetMergedItemSet();
const drawinglayer::attribute::SdrLineFillShadowTextAttribute aAttribute(
@@ -102,7 +102,7 @@ namespace sdr
fCornerRadiusX,
fCornerRadiusY));
- xRetval = drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1);
+ xRetval = drawinglayer::primitive2d::Primitive2DContainer { xReference };
if(!aAttribute.isDefault() && rCaptionObj.GetSpecialTextBoxShadow())
{
@@ -189,7 +189,7 @@ namespace sdr
{
// if we really got a special shadow, create a two-element retval with the shadow
// behind the standard object's geometry
- xRetval.realloc(2);
+ xRetval.resize(2);
xRetval[0] = xSpecialShadow;
xRetval[1] = xReference;
diff --git a/svx/source/sdr/contact/viewcontactofsdrcircobj.cxx b/svx/source/sdr/contact/viewcontactofsdrcircobj.cxx
index 8e84436b6be3..ccb35bac3f4e 100644
--- a/svx/source/sdr/contact/viewcontactofsdrcircobj.cxx
+++ b/svx/source/sdr/contact/viewcontactofsdrcircobj.cxx
@@ -41,7 +41,7 @@ namespace sdr
{
}
- drawinglayer::primitive2d::Primitive2DSequence ViewContactOfSdrCircObj::createViewIndependentPrimitive2DSequence() const
+ drawinglayer::primitive2d::Primitive2DContainer ViewContactOfSdrCircObj::createViewIndependentPrimitive2DSequence() const
{
const SfxItemSet& rItemSet = GetCircObj().GetMergedItemSet();
const drawinglayer::attribute::SdrLineFillShadowTextAttribute aAttribute(
@@ -82,7 +82,7 @@ namespace sdr
aObjectMatrix,
aAttribute));
- return drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1);
+ return drawinglayer::primitive2d::Primitive2DContainer { xReference };
}
else
{
@@ -102,7 +102,7 @@ namespace sdr
bCloseSegment,
bCloseUsingCenter));
- return drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1);
+ return drawinglayer::primitive2d::Primitive2DContainer { xReference };
}
}
} // end of namespace contact
diff --git a/svx/source/sdr/contact/viewcontactofsdredgeobj.cxx b/svx/source/sdr/contact/viewcontactofsdredgeobj.cxx
index 8ce64caa6d13..11ca3f9c22d7 100644
--- a/svx/source/sdr/contact/viewcontactofsdredgeobj.cxx
+++ b/svx/source/sdr/contact/viewcontactofsdredgeobj.cxx
@@ -39,7 +39,7 @@ namespace sdr
{
}
- drawinglayer::primitive2d::Primitive2DSequence ViewContactOfSdrEdgeObj::createViewIndependentPrimitive2DSequence() const
+ drawinglayer::primitive2d::Primitive2DContainer ViewContactOfSdrEdgeObj::createViewIndependentPrimitive2DSequence() const
{
basegfx::B2DPolygon aEdgeTrack = GetEdgeObj().getEdgeTrack();
Point aGridOff = GetEdgeObj().GetGridOffset();
@@ -66,7 +66,7 @@ namespace sdr
aAttribute,
aEdgeTrack));
- return drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1);
+ return drawinglayer::primitive2d::Primitive2DContainer { xReference };
}
} // end of namespace contact
} // end of namespace sdr
diff --git a/svx/source/sdr/contact/viewcontactofsdrmeasureobj.cxx b/svx/source/sdr/contact/viewcontactofsdrmeasureobj.cxx
index ed1dc0cd6990..4909e6de2daa 100644
--- a/svx/source/sdr/contact/viewcontactofsdrmeasureobj.cxx
+++ b/svx/source/sdr/contact/viewcontactofsdrmeasureobj.cxx
@@ -44,7 +44,7 @@ namespace sdr
{
}
- drawinglayer::primitive2d::Primitive2DSequence ViewContactOfSdrMeasureObj::createViewIndependentPrimitive2DSequence() const
+ drawinglayer::primitive2d::Primitive2DContainer ViewContactOfSdrMeasureObj::createViewIndependentPrimitive2DSequence() const
{
const SfxItemSet& rItemSet = GetMeasureObj().GetMergedItemSet();
const drawinglayer::attribute::SdrLineShadowTextAttribute aAttribute(
@@ -124,7 +124,7 @@ namespace sdr
fLeftDelta, fRightDelta, bBelow,
bTextRotation, bTextAutoAngle));
- return drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1);
+ return drawinglayer::primitive2d::Primitive2DContainer { xReference };
}
} // end of namespace contact
} // end of namespace sdr
diff --git a/svx/source/sdr/contact/viewcontactofsdrmediaobj.cxx b/svx/source/sdr/contact/viewcontactofsdrmediaobj.cxx
index 214a871b14d1..a7869c2a0fbd 100644
--- a/svx/source/sdr/contact/viewcontactofsdrmediaobj.cxx
+++ b/svx/source/sdr/contact/viewcontactofsdrmediaobj.cxx
@@ -96,7 +96,7 @@ void ViewContactOfSdrMediaObj::mediaPropertiesChanged( const ::avmedia::MediaIte
static_cast< SdrMediaObj& >(GetSdrObject()).mediaPropertiesChanged(rNewState);
}
-drawinglayer::primitive2d::Primitive2DSequence ViewContactOfSdrMediaObj::createViewIndependentPrimitive2DSequence() const
+drawinglayer::primitive2d::Primitive2DContainer ViewContactOfSdrMediaObj::createViewIndependentPrimitive2DSequence() const
{
// create range using the model data directly. This is in SdrTextObj::aRect which i will access using
// GetGeoRect() to not trigger any calculations. It's the unrotated geometry which is okay for MediaObjects ATM.
@@ -127,7 +127,7 @@ drawinglayer::primitive2d::Primitive2DSequence ViewContactOfSdrMediaObj::createV
aTransform, rURL, aBackgroundColor, nPixelBorder,
GetSdrMediaObj().getSnapshot()));
- return drawinglayer::primitive2d::Primitive2DSequence(&xRetval, 1);
+ return drawinglayer::primitive2d::Primitive2DContainer { xRetval };
}
}}
diff --git a/svx/source/sdr/contact/viewcontactofsdrobj.cxx b/svx/source/sdr/contact/viewcontactofsdrobj.cxx
index 1efd086f6f75..9b6713ec99bc 100644
--- a/svx/source/sdr/contact/viewcontactofsdrobj.cxx
+++ b/svx/source/sdr/contact/viewcontactofsdrobj.cxx
@@ -33,6 +33,7 @@
#include <svx/sdrpagewindow.hxx>
#include <svx/sdrpaintwindow.hxx>
#include <svx/svdhdl.hxx>
+#include <comphelper/sequence.hxx>
namespace sdr { namespace contact {
@@ -137,9 +138,9 @@ SdrObject* ViewContactOfSdrObj::TryToGetSdrObject() const
// primitive stuff
// add Gluepoints (if available)
-drawinglayer::primitive2d::Primitive2DSequence ViewContactOfSdrObj::createGluePointPrimitive2DSequence() const
+drawinglayer::primitive2d::Primitive2DContainer ViewContactOfSdrObj::createGluePointPrimitive2DSequence() const
{
- drawinglayer::primitive2d::Primitive2DSequence xRetval;
+ drawinglayer::primitive2d::Primitive2DContainer xRetval;
const SdrGluePointList* pGluePointList = GetSdrObject().GetGluePointList();
if(pGluePointList)
@@ -165,7 +166,7 @@ drawinglayer::primitive2d::Primitive2DSequence ViewContactOfSdrObj::createGluePo
const drawinglayer::primitive2d::Primitive2DReference xReference(
new drawinglayer::primitive2d::MarkerArrayPrimitive2D(
aGluepointVector, SdrHdl::createGluePointBitmap()));
- xRetval = drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1);
+ xRetval = drawinglayer::primitive2d::Primitive2DContainer{ xReference };
}
}
}
@@ -173,9 +174,9 @@ drawinglayer::primitive2d::Primitive2DSequence ViewContactOfSdrObj::createGluePo
return xRetval;
}
-drawinglayer::primitive2d::Primitive2DSequence ViewContactOfSdrObj::embedToObjectSpecificInformation(const drawinglayer::primitive2d::Primitive2DSequence& rSource) const
+drawinglayer::primitive2d::Primitive2DContainer ViewContactOfSdrObj::embedToObjectSpecificInformation(const drawinglayer::primitive2d::Primitive2DContainer& rSource) const
{
- if(rSource.hasElements() &&
+ if(!rSource.empty() &&
(!GetSdrObject().GetName().isEmpty() ||
!GetSdrObject().GetTitle().isEmpty() ||
!GetSdrObject().GetDescription().isEmpty()))
@@ -187,7 +188,7 @@ drawinglayer::primitive2d::Primitive2DSequence ViewContactOfSdrObj::embedToObjec
GetSdrObject().GetTitle(),
GetSdrObject().GetDescription()));
- return drawinglayer::primitive2d::Primitive2DSequence(&xRef, 1);
+ return drawinglayer::primitive2d::Primitive2DContainer { xRef };
}
return rSource;
diff --git a/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx b/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx
index d620346797db..b17ae54fa2a2 100644
--- a/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx
+++ b/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx
@@ -100,9 +100,9 @@ namespace sdr
return aTextRange;
}
- drawinglayer::primitive2d::Primitive2DSequence ViewContactOfSdrObjCustomShape::createViewIndependentPrimitive2DSequence() const
+ drawinglayer::primitive2d::Primitive2DContainer ViewContactOfSdrObjCustomShape::createViewIndependentPrimitive2DSequence() const
{
- drawinglayer::primitive2d::Primitive2DSequence xRetval;
+ drawinglayer::primitive2d::Primitive2DContainer xRetval;
const SfxItemSet& rItemSet = GetCustomShapeObj().GetMergedItemSet();
// #i98072# Get shadow and text; eventually suppress the text if it's
@@ -112,10 +112,10 @@ namespace sdr
rItemSet,
GetCustomShapeObj().getText(0),
GetCustomShapeObj().IsTextPath()));
- drawinglayer::primitive2d::Primitive2DSequence xGroup;
+ drawinglayer::primitive2d::Primitive2DContainer xGroup;
bool bHasText(!aAttribute.getText().isDefault());
- // create Primitive2DSequence from sub-geometry
+ // create Primitive2DContainer from sub-geometry
const SdrObject* pSdrObjRepresentation = GetCustomShapeObj().GetSdrObjectFromCustomShape();
bool b3DShape(false);
@@ -139,12 +139,12 @@ namespace sdr
b3DShape = true;
}
- const drawinglayer::primitive2d::Primitive2DSequence xNew(rCandidate.GetViewContact().getViewIndependentPrimitive2DSequence());
- drawinglayer::primitive2d::appendPrimitive2DSequenceToPrimitive2DSequence(xGroup, xNew);
+ const drawinglayer::primitive2d::Primitive2DContainer xNew(rCandidate.GetViewContact().getViewIndependentPrimitive2DSequence());
+ xGroup.insert(xGroup.end(), xNew.begin(), xNew.end());
}
}
- if(bHasText || xGroup.hasElements())
+ if(bHasText || !xGroup.empty())
{
// prepare text box geometry
basegfx::B2DHomMatrix aTextBoxMatrix;
@@ -228,7 +228,7 @@ namespace sdr
bWordWrap,
b3DShape,
false)); // #SJ# New parameter to force to clipped BlockText for SC
- xRetval = drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1);
+ xRetval = drawinglayer::primitive2d::Primitive2DContainer { xReference };
}
return xRetval;
diff --git a/svx/source/sdr/contact/viewcontactofsdrole2obj.cxx b/svx/source/sdr/contact/viewcontactofsdrole2obj.cxx
index bdbe9ce172bc..630c869a43c8 100644
--- a/svx/source/sdr/contact/viewcontactofsdrole2obj.cxx
+++ b/svx/source/sdr/contact/viewcontactofsdrole2obj.cxx
@@ -79,7 +79,7 @@ basegfx::B2DHomMatrix ViewContactOfSdrOle2Obj::createObjectTransform() const
aObjectRange.getMinX(), aObjectRange.getMinY());
}
-drawinglayer::primitive2d::Primitive2DSequence ViewContactOfSdrOle2Obj::createPrimitive2DSequenceWithParameters() const
+drawinglayer::primitive2d::Primitive2DContainer ViewContactOfSdrOle2Obj::createPrimitive2DSequenceWithParameters() const
{
// get object transformation
const basegfx::B2DHomMatrix aObjectMatrix(createObjectTransform());
@@ -108,14 +108,14 @@ drawinglayer::primitive2d::Primitive2DSequence ViewContactOfSdrOle2Obj::createPr
{
// try to get chart primitives and chart range directly from xChartModel
basegfx::B2DRange aChartContentRange;
- const drawinglayer::primitive2d::Primitive2DSequence aChartSequence(
+ const drawinglayer::primitive2d::Primitive2DContainer aChartSequence(
ChartHelper::tryToGetChartContentAsPrimitive2DSequence(
GetOle2Obj().getXModel(),
aChartContentRange));
const double fWidth(aChartContentRange.getWidth());
const double fHeight(aChartContentRange.getHeight());
- if(aChartSequence.hasElements()
+ if(!aChartSequence.empty()
&& basegfx::fTools::more(fWidth, 0.0)
&& basegfx::fTools::more(fHeight, 0.0))
{
@@ -159,11 +159,11 @@ drawinglayer::primitive2d::Primitive2DSequence ViewContactOfSdrOle2Obj::createPr
// SdrOle2Primitive2D to create needed invisible elements for HitTest and/or BoundRect
const drawinglayer::primitive2d::Primitive2DReference xReference(
new drawinglayer::primitive2d::SdrOle2Primitive2D(
- drawinglayer::primitive2d::Primitive2DSequence(&xContent, 1),
+ drawinglayer::primitive2d::Primitive2DContainer { xContent },
aObjectMatrix,
aAttribute));
- return drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1);
+ return drawinglayer::primitive2d::Primitive2DContainer { xReference };
}
basegfx::B2DRange ViewContactOfSdrOle2Obj::getRange( const drawinglayer::geometry::ViewInformation2D& rViewInfo2D ) const
@@ -185,14 +185,11 @@ basegfx::B2DRange ViewContactOfSdrOle2Obj::getRange( const drawinglayer::geometr
const drawinglayer::primitive2d::Primitive2DReference xReference(
new drawinglayer::primitive2d::SdrOle2Primitive2D(
- drawinglayer::primitive2d::Primitive2DSequence(&xContent, 1),
+ drawinglayer::primitive2d::Primitive2DContainer { xContent },
aObjectMatrix,
aAttribute));
- drawinglayer::primitive2d::Primitive2DSequence xSeq =
- drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1);
-
- return drawinglayer::primitive2d::getB2DRangeFromPrimitive2DSequence(xSeq, rViewInfo2D);
+ return drawinglayer::primitive2d::getB2DRangeFromPrimitive2DReference(xReference, rViewInfo2D);
}
void ViewContactOfSdrOle2Obj::ActionChanged()
@@ -207,7 +204,7 @@ void ViewContactOfSdrOle2Obj::ActionChanged()
}
}
-drawinglayer::primitive2d::Primitive2DSequence ViewContactOfSdrOle2Obj::createViewIndependentPrimitive2DSequence() const
+drawinglayer::primitive2d::Primitive2DContainer ViewContactOfSdrOle2Obj::createViewIndependentPrimitive2DSequence() const
{
return createPrimitive2DSequenceWithParameters();
}
diff --git a/svx/source/sdr/contact/viewcontactofsdrpage.cxx b/svx/source/sdr/contact/viewcontactofsdrpage.cxx
index 331d597c666e..dd1224299fd7 100644
--- a/svx/source/sdr/contact/viewcontactofsdrpage.cxx
+++ b/svx/source/sdr/contact/viewcontactofsdrpage.cxx
@@ -70,7 +70,7 @@ ViewObjectContact& ViewContactOfPageBackground::CreateObjectSpecificViewObjectCo
return *pRetval;
}
-drawinglayer::primitive2d::Primitive2DSequence ViewContactOfPageBackground::createViewIndependentPrimitive2DSequence() const
+drawinglayer::primitive2d::Primitive2DContainer ViewContactOfPageBackground::createViewIndependentPrimitive2DSequence() const
{
// We have only the page information, not the view information. Use the
// svtools::DOCCOLOR color for initialisation
@@ -80,7 +80,7 @@ drawinglayer::primitive2d::Primitive2DSequence ViewContactOfPageBackground::crea
const drawinglayer::primitive2d::Primitive2DReference xReference(
new drawinglayer::primitive2d::BackgroundColorPrimitive2D(aRGBColor));
- return drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1);
+ return drawinglayer::primitive2d::Primitive2DContainer { xReference };
}
ViewContactOfPageBackground::ViewContactOfPageBackground(ViewContactOfSdrPage& rParentViewContactOfSdrPage)
@@ -100,7 +100,7 @@ ViewObjectContact& ViewContactOfPageShadow::CreateObjectSpecificViewObjectContac
return *pRetval;
}
-drawinglayer::primitive2d::Primitive2DSequence ViewContactOfPageShadow::createViewIndependentPrimitive2DSequence() const
+drawinglayer::primitive2d::Primitive2DContainer ViewContactOfPageShadow::createViewIndependentPrimitive2DSequence() const
{
static bool bUseOldPageShadow(false);
const SdrPage& rPage = getPage();
@@ -132,7 +132,7 @@ drawinglayer::primitive2d::Primitive2DSequence ViewContactOfPageShadow::createVi
basegfx::B2DPolyPolygon(aPageShadowPolygon),
aRGBShadowColor));
- return drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1);
+ return drawinglayer::primitive2d::Primitive2DContainer { xReference };
}
else
{
@@ -150,10 +150,10 @@ drawinglayer::primitive2d::Primitive2DSequence ViewContactOfPageShadow::createVi
aPageMatrix,
*aDiscreteShadow.get()));
- return drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1);
+ return drawinglayer::primitive2d::Primitive2DContainer { xReference };
}
- return drawinglayer::primitive2d::Primitive2DSequence();
+ return drawinglayer::primitive2d::Primitive2DContainer();
}
}
@@ -174,9 +174,9 @@ ViewObjectContact& ViewContactOfMasterPage::CreateObjectSpecificViewObjectContac
return *pRetval;
}
-drawinglayer::primitive2d::Primitive2DSequence ViewContactOfMasterPage::createViewIndependentPrimitive2DSequence() const
+drawinglayer::primitive2d::Primitive2DContainer ViewContactOfMasterPage::createViewIndependentPrimitive2DSequence() const
{
- drawinglayer::primitive2d::Primitive2DSequence xRetval;
+ drawinglayer::primitive2d::Primitive2DContainer xRetval;
// this class is used when the page is a MasterPage and is responsible to
// create a visualisation for the MPBGO, if exists. This needs to be suppressed
@@ -220,7 +220,7 @@ drawinglayer::primitive2d::Primitive2DSequence ViewContactOfMasterPage::createVi
aFill,
drawinglayer::attribute::FillGradientAttribute()));
- xRetval = drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1);
+ xRetval = drawinglayer::primitive2d::Primitive2DContainer { xReference };
}
}
}
@@ -245,7 +245,7 @@ ViewObjectContact& ViewContactOfPageFill::CreateObjectSpecificViewObjectContact(
return *pRetval;
}
-drawinglayer::primitive2d::Primitive2DSequence ViewContactOfPageFill::createViewIndependentPrimitive2DSequence() const
+drawinglayer::primitive2d::Primitive2DContainer ViewContactOfPageFill::createViewIndependentPrimitive2DSequence() const
{
const SdrPage& rPage = getPage();
const basegfx::B2DRange aPageFillRange(0.0, 0.0, (double)rPage.GetWdt(), (double)rPage.GetHgt());
@@ -260,7 +260,7 @@ drawinglayer::primitive2d::Primitive2DSequence ViewContactOfPageFill::createView
const basegfx::BColor aRGBColor(aPageFillColor.getBColor());
const drawinglayer::primitive2d::Primitive2DReference xReference(new drawinglayer::primitive2d::PolyPolygonColorPrimitive2D(basegfx::B2DPolyPolygon(aPageFillPolygon), aRGBColor));
- return drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1);
+ return drawinglayer::primitive2d::Primitive2DContainer { xReference };
}
ViewContactOfPageFill::ViewContactOfPageFill(ViewContactOfSdrPage& rParentViewContactOfSdrPage)
@@ -280,9 +280,9 @@ ViewObjectContact& ViewContactOfOuterPageBorder::CreateObjectSpecificViewObjectC
return *pRetval;
}
-drawinglayer::primitive2d::Primitive2DSequence ViewContactOfOuterPageBorder::createViewIndependentPrimitive2DSequence() const
+drawinglayer::primitive2d::Primitive2DContainer ViewContactOfOuterPageBorder::createViewIndependentPrimitive2DSequence() const
{
- drawinglayer::primitive2d::Primitive2DSequence xRetval;
+ drawinglayer::primitive2d::Primitive2DContainer xRetval;
const SdrPage& rPage = getPage();
const basegfx::B2DRange aPageBorderRange(0.0, 0.0, (double)rPage.GetWdt(), (double)rPage.GetHgt());
@@ -310,13 +310,13 @@ drawinglayer::primitive2d::Primitive2DSequence ViewContactOfOuterPageBorder::cre
aRight.append(basegfx::B2DPoint(aPageBorderRange.getMaxX(), aPageBorderRange.getMinY()));
aRight.append(basegfx::B2DPoint(aPageBorderRange.getMaxX(), aPageBorderRange.getMaxY()));
- xRetval.realloc(2);
+ xRetval.resize(2);
xRetval[0] = drawinglayer::primitive2d::Primitive2DReference(new drawinglayer::primitive2d::PolygonHairlinePrimitive2D(aLeft, aRGBBorderColor));
xRetval[1] = drawinglayer::primitive2d::Primitive2DReference(new drawinglayer::primitive2d::PolygonHairlinePrimitive2D(aRight, aRGBBorderColor));
}
else
{
- xRetval.realloc(1);
+ xRetval.resize(1);
const basegfx::B2DPolygon aPageBorderPolygon(basegfx::tools::createPolygonFromRect(aPageBorderRange));
xRetval[0] = drawinglayer::primitive2d::Primitive2DReference(new drawinglayer::primitive2d::PolygonHairlinePrimitive2D(aPageBorderPolygon, aRGBBorderColor));
}
@@ -341,7 +341,7 @@ ViewObjectContact& ViewContactOfInnerPageBorder::CreateObjectSpecificViewObjectC
return *pRetval;
}
-drawinglayer::primitive2d::Primitive2DSequence ViewContactOfInnerPageBorder::createViewIndependentPrimitive2DSequence() const
+drawinglayer::primitive2d::Primitive2DContainer ViewContactOfInnerPageBorder::createViewIndependentPrimitive2DSequence() const
{
const SdrPage& rPage = getPage();
const basegfx::B2DRange aPageBorderRange(
@@ -367,7 +367,7 @@ drawinglayer::primitive2d::Primitive2DSequence ViewContactOfInnerPageBorder::cre
const basegfx::BColor aRGBBorderColor(aBorderColor.getBColor());
const drawinglayer::primitive2d::Primitive2DReference xReference(new drawinglayer::primitive2d::PolygonHairlinePrimitive2D(aPageBorderPolygon, aRGBBorderColor));
- return drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1);
+ return drawinglayer::primitive2d::Primitive2DContainer { xReference };
}
ViewContactOfInnerPageBorder::ViewContactOfInnerPageBorder(ViewContactOfSdrPage& rParentViewContactOfSdrPage)
@@ -387,19 +387,19 @@ ViewObjectContact& ViewContactOfPageHierarchy::CreateObjectSpecificViewObjectCon
return *pRetval;
}
-drawinglayer::primitive2d::Primitive2DSequence ViewContactOfPageHierarchy::createViewIndependentPrimitive2DSequence() const
+drawinglayer::primitive2d::Primitive2DContainer ViewContactOfPageHierarchy::createViewIndependentPrimitive2DSequence() const
{
// collect sub-hierarchy
- drawinglayer::primitive2d::Primitive2DSequence xRetval;
+ drawinglayer::primitive2d::Primitive2DContainer xRetval;
const sal_uInt32 nObjectCount(GetObjectCount());
// collect all sub-primitives
for(sal_uInt32 a(0); a < nObjectCount; a++)
{
const ViewContact& rCandidate(GetViewContact(a));
- const drawinglayer::primitive2d::Primitive2DSequence aCandSeq(rCandidate.getViewIndependentPrimitive2DSequence());
+ const drawinglayer::primitive2d::Primitive2DContainer aCandSeq(rCandidate.getViewIndependentPrimitive2DSequence());
- drawinglayer::primitive2d::appendPrimitive2DSequenceToPrimitive2DSequence(xRetval, aCandSeq);
+ xRetval.insert(xRetval.end(), aCandSeq.begin(), aCandSeq.end());
}
return xRetval;
@@ -434,11 +434,11 @@ ViewObjectContact& ViewContactOfGrid::CreateObjectSpecificViewObjectContact(Obje
return *pRetval;
}
-drawinglayer::primitive2d::Primitive2DSequence ViewContactOfGrid::createViewIndependentPrimitive2DSequence() const
+drawinglayer::primitive2d::Primitive2DContainer ViewContactOfGrid::createViewIndependentPrimitive2DSequence() const
{
// We have only the page information, not the view information and thus no grid settings. Create empty
// default. For the view-dependent implementation, see ViewObjectContactOfPageGrid::createPrimitive2DSequence
- return drawinglayer::primitive2d::Primitive2DSequence();
+ return drawinglayer::primitive2d::Primitive2DContainer();
}
ViewContactOfGrid::ViewContactOfGrid(ViewContactOfSdrPage& rParentViewContactOfSdrPage, bool bFront)
@@ -459,11 +459,11 @@ ViewObjectContact& ViewContactOfHelplines::CreateObjectSpecificViewObjectContact
return *pRetval;
}
-drawinglayer::primitive2d::Primitive2DSequence ViewContactOfHelplines::createViewIndependentPrimitive2DSequence() const
+drawinglayer::primitive2d::Primitive2DContainer ViewContactOfHelplines::createViewIndependentPrimitive2DSequence() const
{
// We have only the page information, not the view information and thus no helplines. Create empty
// default. For the view-dependent implementation, see ViewObjectContactOfPageHelplines::createPrimitive2DSequence
- return drawinglayer::primitive2d::Primitive2DSequence();
+ return drawinglayer::primitive2d::Primitive2DContainer();
}
ViewContactOfHelplines::ViewContactOfHelplines(ViewContactOfSdrPage& rParentViewContactOfSdrPage, bool bFront)
@@ -580,31 +580,31 @@ void ViewContactOfSdrPage::ActionChanged()
maViewContactOfHelplinesFront.ActionChanged();
}
-drawinglayer::primitive2d::Primitive2DSequence ViewContactOfSdrPage::createViewIndependentPrimitive2DSequence() const
+drawinglayer::primitive2d::Primitive2DContainer ViewContactOfSdrPage::createViewIndependentPrimitive2DSequence() const
{
- drawinglayer::primitive2d::Primitive2DSequence xRetval;
+ drawinglayer::primitive2d::Primitive2DContainer xRetval;
// collect all sub-sequences including sub hierarchy.
- drawinglayer::primitive2d::appendPrimitive2DSequenceToPrimitive2DSequence(xRetval, maViewContactOfPageBackground.getViewIndependentPrimitive2DSequence());
- drawinglayer::primitive2d::appendPrimitive2DSequenceToPrimitive2DSequence(xRetval, maViewContactOfPageShadow.getViewIndependentPrimitive2DSequence());
- drawinglayer::primitive2d::appendPrimitive2DSequenceToPrimitive2DSequence(xRetval, maViewContactOfPageFill.getViewIndependentPrimitive2DSequence());
+ xRetval.append(maViewContactOfPageBackground.getViewIndependentPrimitive2DSequence());
+ xRetval.append(maViewContactOfPageShadow.getViewIndependentPrimitive2DSequence());
+ xRetval.append(maViewContactOfPageFill.getViewIndependentPrimitive2DSequence());
const SdrPage& rPage = GetSdrPage();
if(rPage.TRG_HasMasterPage())
{
- drawinglayer::primitive2d::appendPrimitive2DSequenceToPrimitive2DSequence(xRetval,
+ xRetval.append(
rPage.TRG_GetMasterPageDescriptorViewContact().getViewIndependentPrimitive2DSequence());
}
else if(rPage.IsMasterPage())
{
- drawinglayer::primitive2d::appendPrimitive2DSequenceToPrimitive2DSequence(xRetval,
+ xRetval.append(
maViewContactOfMasterPage.getViewIndependentPrimitive2DSequence());
}
- drawinglayer::primitive2d::appendPrimitive2DSequenceToPrimitive2DSequence(xRetval, maViewContactOfOuterPageBorder.getViewIndependentPrimitive2DSequence());
- drawinglayer::primitive2d::appendPrimitive2DSequenceToPrimitive2DSequence(xRetval, maViewContactOfInnerPageBorder.getViewIndependentPrimitive2DSequence());
- drawinglayer::primitive2d::appendPrimitive2DSequenceToPrimitive2DSequence(xRetval, maViewContactOfPageHierarchy.getViewIndependentPrimitive2DSequence());
+ xRetval.append(maViewContactOfOuterPageBorder.getViewIndependentPrimitive2DSequence());
+ xRetval.append(maViewContactOfInnerPageBorder.getViewIndependentPrimitive2DSequence());
+ xRetval.append(maViewContactOfPageHierarchy.getViewIndependentPrimitive2DSequence());
// Only add front versions of grid and helplines since no visibility test is done,
// so adding the back incarnations is not necessary. This makes the Front
diff --git a/svx/source/sdr/contact/viewcontactofsdrpathobj.cxx b/svx/source/sdr/contact/viewcontactofsdrpathobj.cxx
index b86a9f4bf78b..9666db142973 100644
--- a/svx/source/sdr/contact/viewcontactofsdrpathobj.cxx
+++ b/svx/source/sdr/contact/viewcontactofsdrpathobj.cxx
@@ -65,7 +65,7 @@ namespace sdr
return nPolyCount;
}
- drawinglayer::primitive2d::Primitive2DSequence ViewContactOfSdrPathObj::createViewIndependentPrimitive2DSequence() const
+ drawinglayer::primitive2d::Primitive2DContainer ViewContactOfSdrPathObj::createViewIndependentPrimitive2DSequence() const
{
const SfxItemSet& rItemSet = GetPathObj().GetMergedItemSet();
const drawinglayer::attribute::SdrLineFillShadowTextAttribute aAttribute(
@@ -167,7 +167,7 @@ namespace sdr
aAttribute,
aUnitPolyPolygon));
- return drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1);
+ return drawinglayer::primitive2d::Primitive2DContainer { xReference };
}
} // end of namespace contact
} // end of namespace sdr
diff --git a/svx/source/sdr/contact/viewcontactofsdrrectobj.cxx b/svx/source/sdr/contact/viewcontactofsdrrectobj.cxx
index 80ded95ec15a..523b814f20fc 100644
--- a/svx/source/sdr/contact/viewcontactofsdrrectobj.cxx
+++ b/svx/source/sdr/contact/viewcontactofsdrrectobj.cxx
@@ -37,7 +37,7 @@ ViewContactOfSdrRectObj::~ViewContactOfSdrRectObj()
{
}
-drawinglayer::primitive2d::Primitive2DSequence ViewContactOfSdrRectObj::createViewIndependentPrimitive2DSequence() const
+drawinglayer::primitive2d::Primitive2DContainer ViewContactOfSdrRectObj::createViewIndependentPrimitive2DSequence() const
{
const SfxItemSet& rItemSet = GetRectObj().GetMergedItemSet();
const drawinglayer::attribute::SdrLineFillShadowTextAttribute aAttribute(
@@ -86,7 +86,7 @@ drawinglayer::primitive2d::Primitive2DSequence ViewContactOfSdrRectObj::createVi
// #i105856# use fill for HitTest when TextFrame and not PickThrough
GetRectObj().IsTextFrame() && !bPickThroughTransparentTextFrames));
- return drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1);
+ return drawinglayer::primitive2d::Primitive2DContainer{ xReference };
}
}}
diff --git a/svx/source/sdr/contact/viewcontactofunocontrol.cxx b/svx/source/sdr/contact/viewcontactofunocontrol.cxx
index fa92aed98b06..c0caf0e5a34d 100644
--- a/svx/source/sdr/contact/viewcontactofunocontrol.cxx
+++ b/svx/source/sdr/contact/viewcontactofunocontrol.cxx
@@ -113,7 +113,7 @@ namespace sdr { namespace contact {
}
- drawinglayer::primitive2d::Primitive2DSequence ViewContactOfUnoControl::createViewIndependentPrimitive2DSequence() const
+ drawinglayer::primitive2d::Primitive2DContainer ViewContactOfUnoControl::createViewIndependentPrimitive2DSequence() const
{
// create range. Use model data directly, not getBoundRect()/getSnapRect; these will use
// the primitive data themselves in the long run. Use SdrUnoObj's (which is a SdrRectObj)
@@ -147,7 +147,7 @@ namespace sdr { namespace contact {
aTransform,
xControlModel));
- return drawinglayer::primitive2d::Primitive2DSequence(&xRetval, 1);
+ return drawinglayer::primitive2d::Primitive2DContainer { xRetval };
}
else
{
@@ -156,7 +156,7 @@ namespace sdr { namespace contact {
drawinglayer::primitive2d::createHiddenGeometryPrimitives2D(
false, aTransform));
- return drawinglayer::primitive2d::Primitive2DSequence(&xRetval, 1);
+ return drawinglayer::primitive2d::Primitive2DContainer { xRetval };
}
}
diff --git a/svx/source/sdr/contact/viewcontactofvirtobj.cxx b/svx/source/sdr/contact/viewcontactofvirtobj.cxx
index 90997fe7bfa1..606a6112e661 100644
--- a/svx/source/sdr/contact/viewcontactofvirtobj.cxx
+++ b/svx/source/sdr/contact/viewcontactofvirtobj.cxx
@@ -59,7 +59,7 @@ sal_uInt32 ViewContactOfVirtObj::GetObjectCount() const
return 0L;
}
-drawinglayer::primitive2d::Primitive2DSequence ViewContactOfVirtObj::createViewIndependentPrimitive2DSequence() const
+drawinglayer::primitive2d::Primitive2DContainer ViewContactOfVirtObj::createViewIndependentPrimitive2DSequence() const
{
// create displacement transformation if we have content
basegfx::B2DHomMatrix aObjectMatrix;
@@ -71,11 +71,11 @@ drawinglayer::primitive2d::Primitive2DSequence ViewContactOfVirtObj::createViewI
aObjectMatrix.set(1, 2, aAnchor.Y());
}
- // use method from referenced object to get the Primitive2DSequence
- const drawinglayer::primitive2d::Primitive2DSequence xSequenceVirtual(
+ // use method from referenced object to get the Primitive2DContainer
+ const drawinglayer::primitive2d::Primitive2DContainer xSequenceVirtual(
GetVirtObj().GetReferencedObj().GetViewContact().getViewIndependentPrimitive2DSequence());
- if(xSequenceVirtual.hasElements())
+ if(!xSequenceVirtual.empty())
{
// create transform primitive
const drawinglayer::primitive2d::Primitive2DReference xReference(
@@ -83,7 +83,7 @@ drawinglayer::primitive2d::Primitive2DSequence ViewContactOfVirtObj::createViewI
aObjectMatrix,
xSequenceVirtual));
- return drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1);
+ return drawinglayer::primitive2d::Primitive2DContainer { xReference };
}
else
{
@@ -92,7 +92,7 @@ drawinglayer::primitive2d::Primitive2DSequence ViewContactOfVirtObj::createViewI
drawinglayer::primitive2d::createHiddenGeometryPrimitives2D(
false, aObjectMatrix));
- return drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1);
+ return drawinglayer::primitive2d::Primitive2DContainer { xReference };
}
}
diff --git a/svx/source/sdr/contact/viewobjectcontact.cxx b/svx/source/sdr/contact/viewobjectcontact.cxx
index 8078349251fb..7162d8b1cd2b 100644
--- a/svx/source/sdr/contact/viewobjectcontact.cxx
+++ b/svx/source/sdr/contact/viewobjectcontact.cxx
@@ -56,7 +56,7 @@ class AnimatedExtractingProcessor2D : public drawinglayer::processor2d::BaseProc
{
protected:
// the found animated primitives
- drawinglayer::primitive2d::Primitive2DSequence maPrimitive2DSequence;
+ drawinglayer::primitive2d::Primitive2DContainer maPrimitive2DSequence;
// bitfield
// text animation allowed?
@@ -77,7 +77,7 @@ public:
virtual ~AnimatedExtractingProcessor2D();
// data access
- const drawinglayer::primitive2d::Primitive2DSequence& getPrimitive2DSequence() const { return maPrimitive2DSequence; }
+ const drawinglayer::primitive2d::Primitive2DContainer& getPrimitive2DSequence() const { return maPrimitive2DSequence; }
bool isTextAnimationAllowed() const { return mbTextAnimationAllowed; }
bool isGraphicAnimationAllowed() const { return mbGraphicAnimationAllowed; }
};
@@ -113,7 +113,7 @@ void AnimatedExtractingProcessor2D::processBasePrimitive2D(const drawinglayer::p
|| (rSwitchPrimitive.isGraphicAnimation() && isGraphicAnimationAllowed()))
{
const drawinglayer::primitive2d::Primitive2DReference xReference(const_cast< drawinglayer::primitive2d::BasePrimitive2D* >(&rCandidate));
- drawinglayer::primitive2d::appendPrimitive2DReferenceToPrimitive2DSequence(maPrimitive2DSequence, xReference);
+ maPrimitive2DSequence.push_back(xReference);
}
break;
}
@@ -216,12 +216,12 @@ const basegfx::B2DRange& ViewObjectContact::getObjectRange() const
{
// if range is not computed (new or LazyInvalidate objects), force it
const DisplayInfo aDisplayInfo;
- const drawinglayer::primitive2d::Primitive2DSequence xSequence(getPrimitive2DSequence(aDisplayInfo));
+ const drawinglayer::primitive2d::Primitive2DContainer xSequence(getPrimitive2DSequence(aDisplayInfo));
- if(xSequence.hasElements())
+ if(!xSequence.empty())
{
const_cast< ViewObjectContact* >(this)->maObjectRange =
- drawinglayer::primitive2d::getB2DRangeFromPrimitive2DSequence(xSequence, rViewInfo2D);
+ xSequence.getB2DRange(rViewInfo2D);
}
}
}
@@ -301,7 +301,7 @@ void ViewObjectContact::checkForPrimitive2DAnimations()
}
// check for animated primitives
- if(mxPrimitive2DSequence.hasElements())
+ if(!mxPrimitive2DSequence.empty())
{
const bool bTextAnimationAllowed(GetObjectContact().IsTextAnimationAllowed());
const bool bGraphicAnimationAllowed(GetObjectContact().IsGraphicAnimationAllowed());
@@ -312,7 +312,7 @@ void ViewObjectContact::checkForPrimitive2DAnimations()
bTextAnimationAllowed, bGraphicAnimationAllowed);
aAnimatedExtractor.process(mxPrimitive2DSequence);
- if(aAnimatedExtractor.getPrimitive2DSequence().hasElements())
+ if(!aAnimatedExtractor.getPrimitive2DSequence().empty())
{
// derived primitiveList is animated, setup new PrimitiveAnimation
mpPrimitiveAnimation = new sdr::animation::PrimitiveAnimation(*this, aAnimatedExtractor.getPrimitive2DSequence());
@@ -321,21 +321,21 @@ void ViewObjectContact::checkForPrimitive2DAnimations()
}
}
-drawinglayer::primitive2d::Primitive2DSequence ViewObjectContact::createPrimitive2DSequence(const DisplayInfo& rDisplayInfo) const
+drawinglayer::primitive2d::Primitive2DContainer ViewObjectContact::createPrimitive2DSequence(const DisplayInfo& rDisplayInfo) const
{
// get the view-independent Primitive from the viewContact
- drawinglayer::primitive2d::Primitive2DSequence xRetval(GetViewContact().getViewIndependentPrimitive2DSequence());
+ drawinglayer::primitive2d::Primitive2DContainer xRetval(GetViewContact().getViewIndependentPrimitive2DSequence());
- if(xRetval.hasElements())
+ if(!xRetval.empty())
{
// handle GluePoint
if(!GetObjectContact().isOutputToPrinter() && GetObjectContact().AreGluePointsVisible())
{
- const drawinglayer::primitive2d::Primitive2DSequence xGlue(GetViewContact().createGluePointPrimitive2DSequence());
+ const drawinglayer::primitive2d::Primitive2DContainer xGlue(GetViewContact().createGluePointPrimitive2DSequence());
- if(xGlue.hasElements())
+ if(!xGlue.empty())
{
- drawinglayer::primitive2d::appendPrimitive2DSequenceToPrimitive2DSequence(xRetval, xGlue);
+ xRetval.append(xGlue);
}
}
@@ -352,16 +352,16 @@ drawinglayer::primitive2d::Primitive2DSequence ViewObjectContact::createPrimitiv
xRetval,
aBColorModifier));
- xRetval = drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1);
+ xRetval = drawinglayer::primitive2d::Primitive2DContainer { xReference };
}
}
return xRetval;
}
-drawinglayer::primitive2d::Primitive2DSequence ViewObjectContact::getPrimitive2DSequence(const DisplayInfo& rDisplayInfo) const
+drawinglayer::primitive2d::Primitive2DContainer ViewObjectContact::getPrimitive2DSequence(const DisplayInfo& rDisplayInfo) const
{
- drawinglayer::primitive2d::Primitive2DSequence xNewPrimitiveSequence;
+ drawinglayer::primitive2d::Primitive2DContainer xNewPrimitiveSequence;
// take care of redirectors and create new list
ViewObjectContactRedirector* pRedirector = GetObjectContact().GetViewObjectContactRedirector();
@@ -376,7 +376,7 @@ drawinglayer::primitive2d::Primitive2DSequence ViewObjectContact::getPrimitive2D
}
// local up-to-date checks. New list different from local one?
- if(!drawinglayer::primitive2d::arePrimitive2DSequencesEqual(mxPrimitive2DSequence, xNewPrimitiveSequence))
+ if(mxPrimitive2DSequence != xNewPrimitiveSequence)
{
// has changed, copy content
const_cast< ViewObjectContact* >(this)->mxPrimitive2DSequence = xNewPrimitiveSequence;
@@ -387,10 +387,10 @@ drawinglayer::primitive2d::Primitive2DSequence ViewObjectContact::getPrimitive2D
// always update object range when PrimitiveSequence changes
const drawinglayer::geometry::ViewInformation2D& rViewInformation2D(GetObjectContact().getViewInformation2D());
const_cast< ViewObjectContact* >(this)->maObjectRange =
- drawinglayer::primitive2d::getB2DRangeFromPrimitive2DSequence(mxPrimitive2DSequence, rViewInformation2D);
+ mxPrimitive2DSequence.getB2DRange(rViewInformation2D);
}
- // return current Primitive2DSequence
+ // return current Primitive2DContainer
return mxPrimitive2DSequence;
}
@@ -406,20 +406,20 @@ bool ViewObjectContact::isPrimitiveGhosted(const DisplayInfo& rDisplayInfo) cons
return (GetObjectContact().DoVisualizeEnteredGroup() && !GetObjectContact().isOutputToPrinter() && rDisplayInfo.IsGhostedDrawModeActive());
}
-drawinglayer::primitive2d::Primitive2DSequence ViewObjectContact::getPrimitive2DSequenceHierarchy(DisplayInfo& rDisplayInfo) const
+drawinglayer::primitive2d::Primitive2DContainer ViewObjectContact::getPrimitive2DSequenceHierarchy(DisplayInfo& rDisplayInfo) const
{
- drawinglayer::primitive2d::Primitive2DSequence xRetval;
+ drawinglayer::primitive2d::Primitive2DContainer xRetval;
// check model-view visibility
if(isPrimitiveVisible(rDisplayInfo))
{
xRetval = getPrimitive2DSequence(rDisplayInfo);
- if(xRetval.hasElements())
+ if(!xRetval.empty())
{
// get ranges
const drawinglayer::geometry::ViewInformation2D& rViewInformation2D(GetObjectContact().getViewInformation2D());
- const basegfx::B2DRange aObjectRange(drawinglayer::primitive2d::getB2DRangeFromPrimitive2DSequence(xRetval, rViewInformation2D));
+ const basegfx::B2DRange aObjectRange(xRetval.getB2DRange(rViewInformation2D));
const basegfx::B2DRange aViewRange(rViewInformation2D.getViewport());
// check geometrical visibility
@@ -427,7 +427,7 @@ drawinglayer::primitive2d::Primitive2DSequence ViewObjectContact::getPrimitive2D
if(!bVisible)
{
// not visible, release
- xRetval.realloc(0);
+ xRetval.clear();
}
}
}
@@ -435,16 +435,16 @@ drawinglayer::primitive2d::Primitive2DSequence ViewObjectContact::getPrimitive2D
return xRetval;
}
-drawinglayer::primitive2d::Primitive2DSequence ViewObjectContact::getPrimitive2DSequenceSubHierarchy(DisplayInfo& rDisplayInfo) const
+drawinglayer::primitive2d::Primitive2DContainer ViewObjectContact::getPrimitive2DSequenceSubHierarchy(DisplayInfo& rDisplayInfo) const
{
const sal_uInt32 nSubHierarchyCount(GetViewContact().GetObjectCount());
- drawinglayer::primitive2d::Primitive2DSequence xSeqRetval;
+ drawinglayer::primitive2d::Primitive2DContainer xSeqRetval;
for(sal_uInt32 a(0); a < nSubHierarchyCount; a++)
{
const ViewObjectContact& rCandidate(GetViewContact().GetViewContact(a).GetViewObjectContact(GetObjectContact()));
- drawinglayer::primitive2d::appendPrimitive2DSequenceToPrimitive2DSequence(xSeqRetval, rCandidate.getPrimitive2DSequenceHierarchy(rDisplayInfo));
+ xSeqRetval.append(rCandidate.getPrimitive2DSequenceHierarchy(rDisplayInfo));
}
return xSeqRetval;
diff --git a/svx/source/sdr/contact/viewobjectcontactofe3d.cxx b/svx/source/sdr/contact/viewobjectcontactofe3d.cxx
index 42368b8bbf4f..3ff49dfe446c 100644
--- a/svx/source/sdr/contact/viewobjectcontactofe3d.cxx
+++ b/svx/source/sdr/contact/viewobjectcontactofe3d.cxx
@@ -24,6 +24,7 @@
#include <sdr/contact/viewobjectcontactofe3dscene.hxx>
#include <drawinglayer/primitive2d/embedded3dprimitive2d.hxx>
#include <svx/sdr/contact/viewcontactofe3dscene.hxx>
+#include <comphelper/sequence.hxx>
namespace sdr
{
@@ -63,7 +64,7 @@ namespace sdr
return xRetval;
}
- drawinglayer::primitive2d::Primitive2DSequence ViewObjectContactOfE3d::createPrimitive2DSequence(const DisplayInfo& rDisplayInfo) const
+ drawinglayer::primitive2d::Primitive2DContainer ViewObjectContactOfE3d::createPrimitive2DSequence(const DisplayInfo& rDisplayInfo) const
{
const ViewContactOfE3d& rViewContact = static_cast< const ViewContactOfE3d& >(GetViewContact());
@@ -82,7 +83,7 @@ namespace sdr
const_cast< ViewObjectContactOfE3d* >(this)->mxPrimitive3DSequence = xNewPrimitive3DSeq;
}
- // return current Primitive2DSequence
+ // return current Primitive2DContainer
return mxPrimitive3DSequence;
}
} // end of namespace contact
diff --git a/svx/source/sdr/contact/viewobjectcontactofe3dscene.cxx b/svx/source/sdr/contact/viewobjectcontactofe3dscene.cxx
index 8e8e24fb1458..ccb9214cf42f 100644
--- a/svx/source/sdr/contact/viewobjectcontactofe3dscene.cxx
+++ b/svx/source/sdr/contact/viewobjectcontactofe3dscene.cxx
@@ -68,7 +68,7 @@ namespace sdr
{
}
- drawinglayer::primitive2d::Primitive2DSequence ViewObjectContactOfE3dScene::createPrimitive2DSequence(const DisplayInfo& rDisplayInfo) const
+ drawinglayer::primitive2d::Primitive2DContainer ViewObjectContactOfE3dScene::createPrimitive2DSequence(const DisplayInfo& rDisplayInfo) const
{
// handle ghosted, else the whole 3d group will be encapsulated to a ghosted primitive set (see below)
const bool bHandleGhostedDisplay(GetObjectContact().DoVisualizeEnteredGroup() && !GetObjectContact().isOutputToPrinter() && rDisplayInfo.IsGhostedDrawModeActive());
@@ -86,9 +86,9 @@ namespace sdr
// added when sub-groups in 3d will be added one day.
const ViewContactOfE3dScene& rViewContact = dynamic_cast< ViewContactOfE3dScene& >(GetViewContact());
const SetOfByte& rVisibleLayers = rDisplayInfo.GetProcessLayers();
- drawinglayer::primitive2d::Primitive2DSequence xRetval(rViewContact.createScenePrimitive2DSequence(&rVisibleLayers));
+ drawinglayer::primitive2d::Primitive2DContainer xRetval(rViewContact.createScenePrimitive2DSequence(&rVisibleLayers));
- if(xRetval.hasElements())
+ if(!xRetval.empty())
{
// allow evtl. embedding in object-specific infos, e.g. Name, Title, Description
xRetval = rViewContact.embedToObjectSpecificInformation(xRetval);
@@ -96,11 +96,11 @@ namespace sdr
// handle GluePoint
if(!GetObjectContact().isOutputToPrinter() && GetObjectContact().AreGluePointsVisible())
{
- const drawinglayer::primitive2d::Primitive2DSequence xGlue(GetViewContact().createGluePointPrimitive2DSequence());
+ const drawinglayer::primitive2d::Primitive2DContainer xGlue(GetViewContact().createGluePointPrimitive2DSequence());
- if(xGlue.hasElements())
+ if(!xGlue.empty())
{
- drawinglayer::primitive2d::appendPrimitive2DSequenceToPrimitive2DSequence(xRetval, xGlue);
+ xRetval.append(xGlue);
}
}
@@ -117,7 +117,7 @@ namespace sdr
xRetval,
aBColorModifier));
- xRetval = drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1);
+ xRetval = drawinglayer::primitive2d::Primitive2DContainer { xReference };
}
}
@@ -130,7 +130,7 @@ namespace sdr
return xRetval;
}
- drawinglayer::primitive2d::Primitive2DSequence ViewObjectContactOfE3dScene::getPrimitive2DSequenceHierarchy(DisplayInfo& rDisplayInfo) const
+ drawinglayer::primitive2d::Primitive2DContainer ViewObjectContactOfE3dScene::getPrimitive2DSequenceHierarchy(DisplayInfo& rDisplayInfo) const
{
// To get the VOCs for the contained 3D objects created to get the correct
// Draw hierarchy and ActionChanged() working properly, travel the DrawHierarchy
diff --git a/svx/source/sdr/contact/viewobjectcontactofgraphic.cxx b/svx/source/sdr/contact/viewobjectcontactofgraphic.cxx
index dd68629779e6..02f59f183697 100644
--- a/svx/source/sdr/contact/viewobjectcontactofgraphic.cxx
+++ b/svx/source/sdr/contact/viewobjectcontactofgraphic.cxx
@@ -251,7 +251,7 @@ namespace sdr
return static_cast<ViewContactOfGraphic& >(GetViewContact()).GetGrafObject();
}
- drawinglayer::primitive2d::Primitive2DSequence ViewObjectContactOfGraphic::createPrimitive2DSequence(const DisplayInfo& rDisplayInfo) const
+ drawinglayer::primitive2d::Primitive2DContainer ViewObjectContactOfGraphic::createPrimitive2DSequence(const DisplayInfo& rDisplayInfo) const
{
// prepare primitive generation with evtl. loading the graphic when it's swapped out
SdrGrafObj& rGrafObj = const_cast< ViewObjectContactOfGraphic* >(this)->getSdrGrafObj();
@@ -283,9 +283,9 @@ namespace sdr
}
// get return value by calling parent
- drawinglayer::primitive2d::Primitive2DSequence xRetval = ViewObjectContactOfSdrObj::createPrimitive2DSequence(rDisplayInfo);
+ drawinglayer::primitive2d::Primitive2DContainer xRetval = ViewObjectContactOfSdrObj::createPrimitive2DSequence(rDisplayInfo);
- if(xRetval.hasElements())
+ if(!xRetval.empty())
{
// #i103255# suppress when graphic needs draft visualisation and output
// is for PDF export/Printer
@@ -297,7 +297,7 @@ namespace sdr
if(rObjectContact.isOutputToPDFFile() || rObjectContact.isOutputToPrinter())
{
- xRetval = drawinglayer::primitive2d::Primitive2DSequence();
+ xRetval = drawinglayer::primitive2d::Primitive2DContainer();
}
}
}
diff --git a/svx/source/sdr/contact/viewobjectcontactofgroup.cxx b/svx/source/sdr/contact/viewobjectcontactofgroup.cxx
index 8d9fd7ba96a7..427a0d1f4de1 100644
--- a/svx/source/sdr/contact/viewobjectcontactofgroup.cxx
+++ b/svx/source/sdr/contact/viewobjectcontactofgroup.cxx
@@ -46,9 +46,9 @@ namespace sdr
{
}
- drawinglayer::primitive2d::Primitive2DSequence ViewObjectContactOfGroup::getPrimitive2DSequenceHierarchy(DisplayInfo& rDisplayInfo) const
+ drawinglayer::primitive2d::Primitive2DContainer ViewObjectContactOfGroup::getPrimitive2DSequenceHierarchy(DisplayInfo& rDisplayInfo) const
{
- drawinglayer::primitive2d::Primitive2DSequence xRetval;
+ drawinglayer::primitive2d::Primitive2DContainer xRetval;
// check model-view visibility
if(isPrimitiveVisible(rDisplayInfo))
@@ -70,18 +70,18 @@ namespace sdr
// create object hierarchy
xRetval = getPrimitive2DSequenceSubHierarchy(rDisplayInfo);
- if(xRetval.hasElements())
+ if(!xRetval.empty())
{
// get ranges
const drawinglayer::geometry::ViewInformation2D& rViewInformation2D(GetObjectContact().getViewInformation2D());
- const ::basegfx::B2DRange aObjectRange(drawinglayer::primitive2d::getB2DRangeFromPrimitive2DSequence(xRetval, rViewInformation2D));
+ const ::basegfx::B2DRange aObjectRange(xRetval.getB2DRange(rViewInformation2D));
const basegfx::B2DRange aViewRange(rViewInformation2D.getViewport());
// check geometrical visibility
if(!aViewRange.isEmpty() && !aViewRange.overlaps(aObjectRange))
{
// not visible, release
- xRetval.realloc(0);
+ xRetval.clear();
}
}
diff --git a/svx/source/sdr/contact/viewobjectcontactofmasterpagedescriptor.cxx b/svx/source/sdr/contact/viewobjectcontactofmasterpagedescriptor.cxx
index 437319b6ab39..f26c658b03c7 100644
--- a/svx/source/sdr/contact/viewobjectcontactofmasterpagedescriptor.cxx
+++ b/svx/source/sdr/contact/viewobjectcontactofmasterpagedescriptor.cxx
@@ -28,6 +28,7 @@
#include <drawinglayer/primitive2d/maskprimitive2d.hxx>
#include <basegfx/polygon/b2dpolygontools.hxx>
#include <basegfx/polygon/b2dpolygon.hxx>
+#include <comphelper/sequence.hxx>
@@ -64,10 +65,10 @@ namespace sdr
return true;
}
- drawinglayer::primitive2d::Primitive2DSequence ViewObjectContactOfMasterPageDescriptor::getPrimitive2DSequenceHierarchy(DisplayInfo& rDisplayInfo) const
+ drawinglayer::primitive2d::Primitive2DContainer ViewObjectContactOfMasterPageDescriptor::getPrimitive2DSequenceHierarchy(DisplayInfo& rDisplayInfo) const
{
- drawinglayer::primitive2d::Primitive2DSequence xRetval;
- drawinglayer::primitive2d::Primitive2DSequence xMasterPageSequence;
+ drawinglayer::primitive2d::Primitive2DContainer xRetval;
+ drawinglayer::primitive2d::Primitive2DContainer xMasterPageSequence;
const sdr::MasterPageDescriptor& rDescriptor = GetMasterPageDescriptor();
// used range (retval) is fixed here, it's the MasterPage fill range
@@ -109,16 +110,16 @@ namespace sdr
rDisplayInfo.SetProcessLayers(aRememberedLayers);
rDisplayInfo.SetSubContentActive(false);
- if(xMasterPageSequence.hasElements())
+ if(!xMasterPageSequence.empty())
{
// get range of MasterPage sub hierarchy
const drawinglayer::geometry::ViewInformation2D& rViewInformation2D(GetObjectContact().getViewInformation2D());
- const basegfx::B2DRange aSubHierarchyRange(drawinglayer::primitive2d::getB2DRangeFromPrimitive2DSequence(xMasterPageSequence, rViewInformation2D));
+ const basegfx::B2DRange aSubHierarchyRange(xMasterPageSequence.getB2DRange(rViewInformation2D));
if(aPageFillRange.isInside(aSubHierarchyRange))
{
// completely inside, just render MasterPage content. Add to target
- drawinglayer::primitive2d::appendPrimitive2DSequenceToPrimitive2DSequence(xRetval, xMasterPageSequence);
+ xRetval.append(xMasterPageSequence);
}
else if(aPageFillRange.overlaps(aSubHierarchyRange))
{
@@ -129,7 +130,7 @@ namespace sdr
// need to create a clip primitive, add clipped list to target
const drawinglayer::primitive2d::Primitive2DReference xReference(new drawinglayer::primitive2d::MaskPrimitive2D(
basegfx::B2DPolyPolygon(basegfx::tools::createPolygonFromRect(aCommonArea)), xMasterPageSequence));
- drawinglayer::primitive2d::appendPrimitive2DReferenceToPrimitive2DSequence(xRetval, xReference);
+ xRetval.push_back(xReference);
}
}
diff --git a/svx/source/sdr/contact/viewobjectcontactofpageobj.cxx b/svx/source/sdr/contact/viewobjectcontactofpageobj.cxx
index 8a1b3ccbb4a4..1376c37929cf 100644
--- a/svx/source/sdr/contact/viewobjectcontactofpageobj.cxx
+++ b/svx/source/sdr/contact/viewobjectcontactofpageobj.cxx
@@ -57,7 +57,7 @@ public:
virtual void Invoke() override;
// get primitive visualization
- drawinglayer::primitive2d::Primitive2DSequence createPrimitive2DSequenceForPage(const DisplayInfo& rDisplayInfo);
+ drawinglayer::primitive2d::Primitive2DContainer createPrimitive2DSequenceForPage(const DisplayInfo& rDisplayInfo);
// Own reaction on changes which will be forwarded to the OC of the owner-VOC
virtual void InvalidatePartOfView(const basegfx::B2DRange& rRange) const override;
@@ -117,9 +117,9 @@ void PagePrimitiveExtractor::Invoke()
}
}
-drawinglayer::primitive2d::Primitive2DSequence PagePrimitiveExtractor::createPrimitive2DSequenceForPage(const DisplayInfo& /*rDisplayInfo*/)
+drawinglayer::primitive2d::Primitive2DContainer PagePrimitiveExtractor::createPrimitive2DSequenceForPage(const DisplayInfo& /*rDisplayInfo*/)
{
- drawinglayer::primitive2d::Primitive2DSequence xRetval;
+ drawinglayer::primitive2d::Primitive2DContainer xRetval;
const SdrPage* pStartPage = GetStartPage();
if(pStartPage)
@@ -149,7 +149,7 @@ drawinglayer::primitive2d::Primitive2DSequence PagePrimitiveExtractor::createPri
// get page's VOC
ViewObjectContact& rDrawPageVOContact = pStartPage->GetViewContact().GetViewObjectContact(*this);
- // get whole Primitive2DSequence
+ // get whole Primitive2DContainer
xRetval = rDrawPageVOContact.getPrimitive2DSequenceHierarchy(aDisplayInfo);
}
@@ -187,9 +187,9 @@ bool PagePrimitiveExtractor::isDrawModeHighContrast() const { return mrViewObjec
SdrPageView* PagePrimitiveExtractor::TryToGetSdrPageView() const { return mrViewObjectContactOfPageObj.GetObjectContact().TryToGetSdrPageView(); }
OutputDevice* PagePrimitiveExtractor::TryToGetOutputDevice() const { return mrViewObjectContactOfPageObj.GetObjectContact().TryToGetOutputDevice(); }
-drawinglayer::primitive2d::Primitive2DSequence ViewObjectContactOfPageObj::createPrimitive2DSequence(const DisplayInfo& rDisplayInfo) const
+drawinglayer::primitive2d::Primitive2DContainer ViewObjectContactOfPageObj::createPrimitive2DSequence(const DisplayInfo& rDisplayInfo) const
{
- drawinglayer::primitive2d::Primitive2DSequence xRetval;
+ drawinglayer::primitive2d::Primitive2DContainer xRetval;
const SdrPageObj& rPageObject((static_cast< ViewContactOfPageObj& >(GetViewContact())).GetPageObj());
const SdrPage* pPage = rPageObject.GetReferencedPage();
const svtools::ColorConfig aColorConfig;
@@ -215,7 +215,7 @@ drawinglayer::primitive2d::Primitive2DSequence ViewObjectContactOfPageObj::creat
if(mpExtractor && pPage)
{
// get displayed page's geometry
- drawinglayer::primitive2d::Primitive2DSequence xPageContent;
+ drawinglayer::primitive2d::Primitive2DContainer xPageContent;
const Size aPageSize(pPage->GetSize());
const double fPageWidth(aPageSize.getWidth());
const double fPageHeight(aPageSize.getHeight());
@@ -228,7 +228,7 @@ drawinglayer::primitive2d::Primitive2DSequence ViewObjectContactOfPageObj::creat
if(bInCreatePrimitive2D)
{
// Recursion is possible. Create a replacement primitive
- xPageContent.realloc(2);
+ xPageContent.resize(2);
const Color aDocColor(aColorConfig.GetColorValue(svtools::DOCCOLOR).nColor);
const Color aBorderColor(aColorConfig.GetColorValue(svtools::DOCBOUNDARIES).nColor);
const basegfx::B2DRange aPageBound(0.0, 0.0, fPageWidth, fPageHeight);
@@ -265,12 +265,12 @@ drawinglayer::primitive2d::Primitive2DSequence ViewObjectContactOfPageObj::creat
}
// prepare retval
- if(xPageContent.hasElements())
+ if(!xPageContent.empty())
{
const uno::Reference< drawing::XDrawPage > xDrawPage(GetXDrawPageForSdrPage(const_cast< SdrPage*>(pPage)));
const drawinglayer::primitive2d::Primitive2DReference xPagePreview(new drawinglayer::primitive2d::PagePreviewPrimitive2D(
xDrawPage, aPageObjectTransform, fPageWidth, fPageHeight, xPageContent, true));
- xRetval = drawinglayer::primitive2d::Primitive2DSequence(&xPagePreview, 1);
+ xRetval = drawinglayer::primitive2d::Primitive2DContainer { xPagePreview };
}
}
else if(bCreateGrayFrame)
@@ -281,7 +281,7 @@ drawinglayer::primitive2d::Primitive2DSequence ViewObjectContactOfPageObj::creat
drawinglayer::primitive2d::createHiddenGeometryPrimitives2D(
false,
aPageObjectTransform));
- xRetval = drawinglayer::primitive2d::Primitive2DSequence(&xFrameHit, 1);
+ xRetval = drawinglayer::primitive2d::Primitive2DContainer { xFrameHit };
}
// add a gray outline frame, except not when printing
@@ -294,7 +294,7 @@ drawinglayer::primitive2d::Primitive2DSequence ViewObjectContactOfPageObj::creat
const drawinglayer::primitive2d::Primitive2DReference xGrayFrame(
new drawinglayer::primitive2d::PolygonHairlinePrimitive2D(aOwnOutline, aFrameColor.getBColor()));
- drawinglayer::primitive2d::appendPrimitive2DReferenceToPrimitive2DSequence(xRetval, xGrayFrame);
+ xRetval.push_back(xGrayFrame);
}
return xRetval;
diff --git a/svx/source/sdr/contact/viewobjectcontactofsdrole2obj.cxx b/svx/source/sdr/contact/viewobjectcontactofsdrole2obj.cxx
index 9164d7512905..e6ba36506944 100644
--- a/svx/source/sdr/contact/viewobjectcontactofsdrole2obj.cxx
+++ b/svx/source/sdr/contact/viewobjectcontactofsdrole2obj.cxx
@@ -31,6 +31,7 @@
#include <basegfx/polygon/b2dpolygon.hxx>
#include <basegfx/matrix/b2dhommatrix.hxx>
#include <svtools/embedhlp.hxx>
+#include <comphelper/sequence.hxx>
using namespace com::sun::star;
@@ -41,13 +42,13 @@ const SdrOle2Obj& ViewObjectContactOfSdrOle2Obj::getSdrOle2Object() const
return static_cast< ViewContactOfSdrOle2Obj& >(GetViewContact()).GetOle2Obj();
}
-drawinglayer::primitive2d::Primitive2DSequence ViewObjectContactOfSdrOle2Obj::createPrimitive2DSequence(
+drawinglayer::primitive2d::Primitive2DContainer ViewObjectContactOfSdrOle2Obj::createPrimitive2DSequence(
const DisplayInfo& /*rDisplayInfo*/) const
{
// override this method to do some things the old SdrOle2Obj::DoPaintObject did.
// In the future, some of these may be solved different, but ATM try to stay compatible
// with the old behaviour
- drawinglayer::primitive2d::Primitive2DSequence xRetval;
+ drawinglayer::primitive2d::Primitive2DContainer xRetval;
const SdrOle2Obj& rSdrOle2 = getSdrOle2Object();
sal_Int32 nState(-1);
@@ -132,7 +133,7 @@ drawinglayer::primitive2d::Primitive2DSequence ViewObjectContactOfSdrOle2Obj::cr
Color(COL_BLACK).getBColor(),
aFillHatch));
- drawinglayer::primitive2d::appendPrimitive2DReferenceToPrimitive2DSequence(xRetval, xReference);
+ xRetval.push_back(xReference);
}
}
diff --git a/svx/source/sdr/contact/viewobjectcontactofsdrpage.cxx b/svx/source/sdr/contact/viewobjectcontactofsdrpage.cxx
index dcb83258a249..fcf2ae153b7e 100644
--- a/svx/source/sdr/contact/viewobjectcontactofsdrpage.cxx
+++ b/svx/source/sdr/contact/viewobjectcontactofsdrpage.cxx
@@ -111,13 +111,13 @@ bool ViewObjectContactOfPageBackground::isPrimitiveVisible(const DisplayInfo& rD
return true;
}
-drawinglayer::primitive2d::Primitive2DSequence ViewObjectContactOfPageBackground::createPrimitive2DSequence(const DisplayInfo& /*rDisplayInfo*/) const
+drawinglayer::primitive2d::Primitive2DContainer ViewObjectContactOfPageBackground::createPrimitive2DSequence(const DisplayInfo& /*rDisplayInfo*/) const
{
// Initialize background. Dependent of IsPageVisible, use ApplicationBackgroundColor or ApplicationDocumentColor. Most
// old renderers for export (html, pdf, gallery, ...) set the page to not visible (SetPageVisible(false)). They expect the
// given OutputDevice to be initialized with the ApplicationDocumentColor then.
const SdrPageView* pPageView = GetObjectContact().TryToGetSdrPageView();
- drawinglayer::primitive2d::Primitive2DSequence xRetval;
+ drawinglayer::primitive2d::Primitive2DContainer xRetval;
if(pPageView)
{
@@ -140,7 +140,7 @@ drawinglayer::primitive2d::Primitive2DSequence ViewObjectContactOfPageBackground
}
// init background with InitColor
- xRetval.realloc(1);
+ xRetval.resize(1);
const basegfx::BColor aRGBColor(aInitColor.getBColor());
xRetval[0] = drawinglayer::primitive2d::Primitive2DReference(new drawinglayer::primitive2d::BackgroundColorPrimitive2D(aRGBColor, aInitColor.GetTransparency() / 255.0));
}
@@ -206,10 +206,10 @@ bool ViewObjectContactOfPageFill::isPrimitiveVisible(const DisplayInfo& rDisplay
return true;
}
-drawinglayer::primitive2d::Primitive2DSequence ViewObjectContactOfPageFill::createPrimitive2DSequence(const DisplayInfo& /*rDisplayInfo*/) const
+drawinglayer::primitive2d::Primitive2DContainer ViewObjectContactOfPageFill::createPrimitive2DSequence(const DisplayInfo& /*rDisplayInfo*/) const
{
const SdrPageView* pPageView = GetObjectContact().TryToGetSdrPageView();
- drawinglayer::primitive2d::Primitive2DSequence xRetval;
+ drawinglayer::primitive2d::Primitive2DContainer xRetval;
if(pPageView)
{
@@ -230,7 +230,7 @@ drawinglayer::primitive2d::Primitive2DSequence ViewObjectContactOfPageFill::crea
}
// create and add primitive
- xRetval.realloc(1);
+ xRetval.resize(1);
const basegfx::BColor aRGBColor(aPageFillColor.getBColor());
xRetval[0] = drawinglayer::primitive2d::Primitive2DReference(new drawinglayer::primitive2d::PolyPolygonColorPrimitive2D(basegfx::B2DPolyPolygon(aPageFillPolygon), aRGBColor));
}
@@ -367,9 +367,9 @@ ViewObjectContactOfPageHierarchy::~ViewObjectContactOfPageHierarchy()
{
}
-drawinglayer::primitive2d::Primitive2DSequence ViewObjectContactOfPageHierarchy::getPrimitive2DSequenceHierarchy(DisplayInfo& rDisplayInfo) const
+drawinglayer::primitive2d::Primitive2DContainer ViewObjectContactOfPageHi