diff options
author | Noel Grandin <noel@peralex.com> | 2015-12-10 12:27:50 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-12-11 10:11:23 +0200 |
commit | 58d8d8ac67aa9b907f1304a48efa0f7a473d9de4 (patch) | |
tree | a0d88f3c8a57ce9d08d97c803ea0ec83a3dd8b62 /svx/source/sdr/contact/viewcontactofsdrcaptionobj.cxx | |
parent | 44ad6aca0dee29841ec7cd15c6d0ad9b3dcaedbe (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
Diffstat (limited to 'svx/source/sdr/contact/viewcontactofsdrcaptionobj.cxx')
-rw-r--r-- | svx/source/sdr/contact/viewcontactofsdrcaptionobj.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
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; |