summaryrefslogtreecommitdiff
path: root/sw/source/uibase/docvw/HeaderFooterWin.cxx
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 /sw/source/uibase/docvw/HeaderFooterWin.cxx
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
Diffstat (limited to 'sw/source/uibase/docvw/HeaderFooterWin.cxx')
-rw-r--r--sw/source/uibase/docvw/HeaderFooterWin.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/sw/source/uibase/docvw/HeaderFooterWin.cxx b/sw/source/uibase/docvw/HeaderFooterWin.cxx
index 18b746b25977..25f706049841 100644
--- a/sw/source/uibase/docvw/HeaderFooterWin.cxx
+++ b/sw/source/uibase/docvw/HeaderFooterWin.cxx
@@ -260,7 +260,7 @@ void SwHeaderFooterWin::Paint(vcl::RenderContext& rRenderContext, const Rectangl
SetMapMode(MapMode(MAP_PIXEL));
const Rectangle aRect(Rectangle(Point(0, 0), rRenderContext.PixelToLogic(GetSizePixel())));
- drawinglayer::primitive2d::Primitive2DSequence aSeq(3);
+ drawinglayer::primitive2d::Primitive2DContainer aSeq(3);
B2DPolygon aPolygon = lcl_GetPolygon(aRect, m_bIsHeader);
@@ -355,8 +355,8 @@ void SwHeaderFooterWin::Paint(vcl::RenderContext& rRenderContext, const Rectangl
if (Application::GetSettings().GetStyleSettings().GetHighContrastMode())
aSignColor = Color(COL_WHITE).getBColor();
- aSeq.realloc(aSeq.getLength() + 1);
- aSeq[aSeq.getLength() - 1] = drawinglayer::primitive2d::Primitive2DReference(
+ aSeq.resize(aSeq.size() + 1);
+ aSeq[aSeq.size() - 1] = drawinglayer::primitive2d::Primitive2DReference(
new drawinglayer::primitive2d::PolyPolygonColorPrimitive2D(
B2DPolyPolygon(aSign), aSignColor));
@@ -366,7 +366,7 @@ void SwHeaderFooterWin::Paint(vcl::RenderContext& rRenderContext, const Rectangl
drawinglayer::processor2d::createBaseProcessor2DFromOutputDevice(rRenderContext, aNewViewInfos));
// TODO Ghost it all if needed
- drawinglayer::primitive2d::Primitive2DSequence aGhostedSeq(1);
+ drawinglayer::primitive2d::Primitive2DContainer aGhostedSeq(1);
double nFadeRate = double(m_nFadeRate) / 100.0;
const basegfx::BColorModifierSharedPtr aBColorModifier(