forked from amazingfate/loongoffice
This was always a problem, but now more visible since commit 8b3c861c46ae12d21b7b3a550e2daa21d2006b77 (tdf#89991 DOCX: import Show changes from older formats, 2019-06-13), as it now affects more documents: tracked changes can be hidden by the time the initial layout is created. With that aside, the immediate problem is an assertion failure in InsertCnt_(), because it assumes that an end node for a section has to have a matching pActualSection, created by start node of the same section. This will fail in case the start node is hidden, but not the end node. The deeper problem is that redlines are not supposed to cross section boundaries: if e.g. multiple cells are selected in a table and the user deletes while tracking changes, then the UI creates multiple redlines instead. The problem here is similar: a delete redline ends right before the section start, so when SwNodes::InsertTextSection() inserts a section node, the end of that redline is automatically moved to the start of the section content (its index increases, the actual SwNode doesn't change). Fix the problem by explicitly checking for a redline end at ToX start and moving it back to the end of last content node. This matches the doc model produced by the WW8 import. Change-Id: Ic7b279185a20d2a32abd054d3fc6be530ddde12a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105412 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
75 lines
1.8 KiB
Makefile
75 lines
1.8 KiB
Makefile
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
|
|
#*************************************************************************
|
|
#
|
|
# This file is part of the LibreOffice project.
|
|
#
|
|
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
#
|
|
#*************************************************************************
|
|
|
|
$(eval $(call gb_CppunitTest_CppunitTest,sw_core_docnode))
|
|
|
|
$(eval $(call gb_CppunitTest_use_common_precompiled_header,sw_core_docnode))
|
|
|
|
$(eval $(call gb_CppunitTest_add_exception_objects,sw_core_docnode, \
|
|
sw/qa/core/docnode/docnode \
|
|
))
|
|
|
|
$(eval $(call gb_CppunitTest_use_libraries,sw_core_docnode, \
|
|
comphelper \
|
|
cppu \
|
|
cppuhelper \
|
|
editeng \
|
|
sal \
|
|
sfx \
|
|
sw \
|
|
swqahelper \
|
|
test \
|
|
unotest \
|
|
utl \
|
|
vcl \
|
|
svt \
|
|
tl \
|
|
svl \
|
|
))
|
|
|
|
$(eval $(call gb_CppunitTest_use_externals,sw_core_docnode,\
|
|
boost_headers \
|
|
libxml2 \
|
|
))
|
|
|
|
$(eval $(call gb_CppunitTest_set_include,sw_core_docnode,\
|
|
-I$(SRCDIR)/sw/inc \
|
|
-I$(SRCDIR)/sw/source/core/inc \
|
|
-I$(SRCDIR)/sw/source/uibase/inc \
|
|
-I$(SRCDIR)/sw/qa/inc \
|
|
$$(INCLUDE) \
|
|
))
|
|
|
|
$(eval $(call gb_CppunitTest_use_api,sw_core_docnode,\
|
|
udkapi \
|
|
offapi \
|
|
oovbaapi \
|
|
))
|
|
|
|
$(eval $(call gb_CppunitTest_use_ure,sw_core_docnode))
|
|
$(eval $(call gb_CppunitTest_use_vcl,sw_core_docnode))
|
|
|
|
$(eval $(call gb_CppunitTest_use_rdb,sw_core_docnode,services))
|
|
|
|
$(eval $(call gb_CppunitTest_use_custom_headers,sw_core_docnode,\
|
|
officecfg/registry \
|
|
))
|
|
|
|
$(eval $(call gb_CppunitTest_use_configuration,sw_core_docnode))
|
|
|
|
$(eval $(call gb_CppunitTest_use_uiconfigs,sw_core_docnode, \
|
|
modules/swriter \
|
|
))
|
|
|
|
$(eval $(call gb_CppunitTest_use_more_fonts,sw_core_docnode))
|
|
|
|
# vim: set noet sw=4 ts=4:
|