From 1b6e9f9dfc538841a873774428628124cbdc4fd8 Mon Sep 17 00:00:00 2001 From: Kohei Yoshida Date: Sat, 6 Dec 2014 16:26:01 -0500 Subject: Pimplize SfxUndoActions. Change-Id: I35ef457111f4cf8b811a4ee8bb676421746e1d9d --- include/svl/undo.hxx | 37 ++++++++++++------------------------- 1 file changed, 12 insertions(+), 25 deletions(-) (limited to 'include') diff --git a/include/svl/undo.hxx b/include/svl/undo.hxx index f18ae84863e9..5aed21a5e189 100644 --- a/include/svl/undo.hxx +++ b/include/svl/undo.hxx @@ -99,38 +99,25 @@ struct MarkedUndoAction class SfxUndoActions { -private: - ::std::vector< MarkedUndoAction > m_aActions; + struct Impl; + Impl* mpImpl; public: - SfxUndoActions() - { - } + SfxUndoActions(); + SfxUndoActions( const SfxUndoActions& r ); + ~SfxUndoActions(); - bool empty() const { return m_aActions.empty(); } - size_t size() const { return m_aActions.size(); } + bool empty() const; + size_t size() const; - const MarkedUndoAction& operator[]( size_t i ) const { return m_aActions[i]; } - MarkedUndoAction& operator[]( size_t i ) { return m_aActions[i]; } + const MarkedUndoAction& operator[]( size_t i ) const; + MarkedUndoAction& operator[]( size_t i ); - void Remove( size_t i_pos ) - { - m_aActions.erase( m_aActions.begin() + i_pos ); - } - - void Remove( size_t i_pos, size_t i_count ) - { - m_aActions.erase( m_aActions.begin() + i_pos, m_aActions.begin() + i_pos + i_count ); - } - - void Insert( SfxUndoAction* i_action, size_t i_pos ) - { - m_aActions.insert( m_aActions.begin() + i_pos, MarkedUndoAction( i_action ) ); - } + void Remove( size_t i_pos ); + void Remove( size_t i_pos, size_t i_count ); + void Insert( SfxUndoAction* i_action, size_t i_pos ); }; - - /** do not make use of these implementation details, unless you really really have to! */ struct SVL_DLLPUBLIC SfxUndoArray -- cgit