diff options
author | Caolán McNamara <caolanm@redhat.com> | 2012-05-23 20:57:32 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-05-23 21:09:20 +0100 |
commit | b63766b3dd453a82f59db505c736d861f662cc0f (patch) | |
tree | c137aba29b8100fcff6b08229f10e626ddfb6e0c /sw/source/ui/inc/FrameControlsManager.hxx | |
parent | WaE: MSVC2008 C4099 class/struct (diff) | |
download | core-b63766b3dd453a82f59db505c736d861f662cc0f.tar.gz core-b63766b3dd453a82f59db505c736d861f662cc0f.zip |
Resolves: fdo#48932 super slow typing and scrolling in large documents
AFAICS it appears that theres a one to one mapping from a SwFrameControl to
a SwFrm, so in any of the three given classes of Page, Footer or Header a
SwFrm will have zero or one SwFrameControls and a SwFrameControl doesn't
get rebound to a different SwFrm or anything like that, so we can use
a map and index off the SwFrm* to find them rather than constantly
looping over vectors to find the right one.
Maybe could move the SwFrameControl directly in the SwPageFrm's
themselves.
Change-Id: I1194f3cdcab747b61c645003c97e651f47f2bc09
Diffstat (limited to 'sw/source/ui/inc/FrameControlsManager.hxx')
-rw-r--r-- | sw/source/ui/inc/FrameControlsManager.hxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sw/source/ui/inc/FrameControlsManager.hxx b/sw/source/ui/inc/FrameControlsManager.hxx index 5ae6c73d35c5..b2fd54d3029f 100644 --- a/sw/source/ui/inc/FrameControlsManager.hxx +++ b/sw/source/ui/inc/FrameControlsManager.hxx @@ -42,13 +42,15 @@ class SwEditWin; typedef boost::shared_ptr< SwFrameControl > SwFrameControlPtr; +typedef std::map<const SwFrm*, SwFrameControlPtr> SwFrameControlPtrMap; + /** A container for the Header/Footer, or PageBreak controls. */ class SwFrameControlsManager { private: SwEditWin* m_pEditWin; - std::map< FrameControlType, std::vector< SwFrameControlPtr > > m_aControls; + std::map< FrameControlType, SwFrameControlPtrMap > m_aControls; public: SwFrameControlsManager( SwEditWin* pEditWin ); |