[Libreoffice-commits] core.git: sw/source

Caolán McNamara caolanm at redhat.com
Fri Apr 3 02:33:21 PDT 2015


 sw/source/core/undo/docundo.cxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit b7bc6e5486dd0f9006c33d03634952a9337da0f3
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Apr 3 10:30:51 2015 +0100

    use UNDO_EMPTY instead of bare 0
    
    Change-Id: Ida0b34a28b30eb9b3bab6b1b6a8112eb1c427c67

diff --git a/sw/source/core/undo/docundo.cxx b/sw/source/core/undo/docundo.cxx
index 63cc4b0..ea020b7 100644
--- a/sw/source/core/undo/docundo.cxx
+++ b/sw/source/core/undo/docundo.cxx
@@ -195,7 +195,7 @@ UndoManager::StartUndo(SwUndoId const i_eUndoId,
         return UNDO_EMPTY;
     }
 
-    SwUndoId const eUndoId( (0 == i_eUndoId) ? UNDO_START : i_eUndoId );
+    SwUndoId const eUndoId( (i_eUndoId == UNDO_EMPTY) ? UNDO_START : i_eUndoId );
 
     OSL_ASSERT(UNDO_END != eUndoId);
     OUString comment( (UNDO_START == eUndoId)
@@ -220,7 +220,7 @@ UndoManager::EndUndo(SwUndoId const i_eUndoId, SwRewriter const*const pRewriter)
         return UNDO_EMPTY;
     }
 
-    SwUndoId const eUndoId( ((0 == i_eUndoId) || (UNDO_START == i_eUndoId))
+    SwUndoId const eUndoId( ((i_eUndoId == UNDO_EMPTY) || (UNDO_START == i_eUndoId))
             ? UNDO_END : i_eUndoId );
     OSL_ENSURE(!((UNDO_END == eUndoId) && pRewriter),
                 "EndUndo(): no Undo ID, but rewriter given?");


More information about the Libreoffice-commits mailing list