diff options
author | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-12-06 16:36:16 -0500 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-12-07 01:09:05 -0500 |
commit | f28ee9e4004ebf51332a998638aea779e07f6450 (patch) | |
tree | 625a08a9982320fe9655b24aba29a4aff3821941 /svl | |
parent | 1b6e9f9dfc538841a873774428628124cbdc4fd8 (diff) |
Pimplize SfxListUndoAction.
Change-Id: Ic82755788df237c455c802a039881a9d056f4df2
Diffstat (limited to 'svl')
-rw-r--r-- | svl/source/undo/undo.cxx | 37 |
1 files changed, 22 insertions, 15 deletions
diff --git a/svl/source/undo/undo.cxx b/svl/source/undo/undo.cxx index 514e842d765f..011bd17e7103 100644 --- a/svl/source/undo/undo.cxx +++ b/svl/source/undo/undo.cxx @@ -1248,45 +1248,52 @@ void SfxUndoManager::RemoveOldestUndoActions( size_t const i_count ) } } +struct SfxListUndoAction::Impl +{ + sal_uInt16 mnId; + + OUString maComment; + OUString maRepeatComment; + + Impl( sal_uInt16 nId, const OUString& rComment, const OUString& rRepeatComment ) : + mnId(nId), maComment(rComment), maRepeatComment(rRepeatComment) {} +}; sal_uInt16 SfxListUndoAction::GetId() const { - return nId; + return mpImpl->mnId; } - OUString SfxListUndoAction::GetComment() const { - return aComment; + return mpImpl->maComment; } - void SfxListUndoAction::SetComment(const OUString& rComment) { - aComment = rComment; + mpImpl->maComment = rComment; } - OUString SfxListUndoAction::GetRepeatComment(SfxRepeatTarget &) const { - return aRepeatComment; + return mpImpl->maRepeatComment; } - - -SfxListUndoAction::SfxListUndoAction -( +SfxListUndoAction::SfxListUndoAction( const OUString &rComment, const OUString &rRepeatComment, - sal_uInt16 Id, - SfxUndoArray *pFather -) -: nId(Id), aComment(rComment), aRepeatComment(rRepeatComment) + sal_uInt16 nId, + SfxUndoArray *pFather ) : + mpImpl(new Impl(nId, rComment, rRepeatComment)) { pFatherUndoArray = pFather; nMaxUndoActions = USHRT_MAX; } +SfxListUndoAction::~SfxListUndoAction() +{ + delete mpImpl; +} void SfxListUndoAction::Undo() { |