diff options
author | HaidongWu <personal_wu@hotmail.com> | 2016-03-09 11:28:14 +0800 |
---|---|---|
committer | Oliver Specht <oliver.specht@cib.de> | 2016-04-27 11:43:01 +0000 |
commit | ed81bf39dd3431d28860fed6a2d4e8814126cc61 (patch) | |
tree | 1ff2f2da2a0ae6220f75f5916240bb1d0c4448f9 | |
parent | 1ef1ed40cb45a095ef3458ef6012490242151772 (diff) |
tdf#98512 Fix the Undo action of insert an input field.
Change-Id: Ia3214564f78a300bfd3f2e6de677fcdff39e107b
Reviewed-on: https://gerrit.libreoffice.org/23055
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Oliver Specht <oliver.specht@cib.de>
-rw-r--r-- | sw/source/core/undo/rolbck.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sw/source/core/undo/rolbck.cxx b/sw/source/core/undo/rolbck.cxx index e990009652b9..5c9e68428612 100644 --- a/sw/source/core/undo/rolbck.cxx +++ b/sw/source/core/undo/rolbck.cxx @@ -1392,7 +1392,9 @@ bool SwRegHistory::InsertItems( const SfxItemSet& rSet, pTextNode->GetpSwpHints()->DeRegister(); } - if ( m_pHistory && bInserted ) + // if (m_pHistory->Count()) return true, then it shouldn't to be pushed into + // the m_pHistory->m_SwpHstry again, or Undo Action will do the same thing twice + if ( m_pHistory && bInserted && !m_pHistory->Count() ) { SwHistoryHint* pNewHstr = new SwHistoryResetAttrSet( rSet, pTextNode->GetIndex(), nStart, nEnd ); |