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

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Fri Nov 16 11:23:25 UTC 2018


 sw/source/core/undo/undel.cxx |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 68880a3004623553bf1920ad8a4a4d2be4bca234
Author:     Michael Stahl <Michael.Stahl at cib.de>
AuthorDate: Fri Nov 16 10:32:07 2018 +0100
Commit:     Michael Stahl <Michael.Stahl at cib.de>
CommitDate: Fri Nov 16 12:23:00 2018 +0100

    tdf#121031 sw_redlinehide: fix SwUndoDelete of table: create table frames
    
    (regression from 723728cd358693b8f4bc9d913541aa4479f2bd48)
    
    Change-Id: I7a52b8499f05e9e8cbf81330ea264fbbfe3bac87
    Reviewed-on: https://gerrit.libreoffice.org/63462
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <Michael.Stahl at cib.de>

diff --git a/sw/source/core/undo/undel.cxx b/sw/source/core/undo/undel.cxx
index 950349c54fda..5b7d5366bae1 100644
--- a/sw/source/core/undo/undel.cxx
+++ b/sw/source/core/undo/undel.cxx
@@ -1113,10 +1113,13 @@ void SwUndoDelete::UndoImpl(::sw::UndoRedoContext & rContext)
     // create frames after SetSaveData has recreated redlines
     if (0 != m_nNode)
     {
+        // tdf#121031 if the start node is a text node, it already has a frame;
+        // if it's a table, it does not
+        SwNodeIndex const start(rDoc.GetNodes(), nSttNode +
+            ((m_bDelFullPara || !rDoc.GetNodes()[nSttNode]->IsTextNode()) ? 0 : 1));
         // don't include end node in the range: it may have been merged already
         // by the start node, or it may be merged by one of the moved nodes,
         // but if it isn't merged, its current frame(s) should be good...
-        SwNodeIndex const start(rDoc.GetNodes(), nSttNode + (m_bDelFullPara ? 0 : 1));
         SwNodeIndex const end(rDoc.GetNodes(), m_bDelFullPara ? delFullParaEndNode : nEndNode);
         ::MakeFrames(&rDoc, start, end);
     }


More information about the Libreoffice-commits mailing list