diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2019-11-15 12:14:09 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2019-11-15 20:00:55 +0100 |
commit | 8dc47cf00f1b50dd50f2eb9557c6ff3501d55daf (patch) | |
tree | 851932beecf46ef0633b82f02cc1700518bc9ccd /sw/CppunitTest_sw_core_text.mk | |
parent | tdf#128700 ww8import: no relative width table if made into a fly (diff) | |
download | core-8dc47cf00f1b50dd50f2eb9557c6ff3501d55daf.tar.gz core-8dc47cf00f1b50dd50f2eb9557c6ff3501d55daf.zip |
tdf#128736 sw ContinuousEndnotes: fix use-after-free on text frame join
Regression from commit 61cf196631a2a846e0d3b8b83c0805cf4d1d14b2 (sw
ContinuousEndnotes: fix moving them to the previous page, 2019-10-25),
the problem was that the SwFootnoteFrame::mpReference was not updated on
frame split. This meant that by the time the frame was joined,
SwTextFrame::JoinFrame() thought that the follow has no footnotes, so
the footnote reference was not updated, resulting in a dangling pointer.
Fix the problem by going back to using bEnd for endnotes (both the Word
compat and the normal case), this means that
SwTextFrame::ConnectFootnote() will invoke
SwFootnoteBossFrame::ChangeFootnoteRef(), fixing the dangling pointer.
Then fix the original problem differently: similar to the in-section
endnotes, just remove + append them, this makes sure that the endnotes
(in the Word compat case) move to a previous page on page delete.
(cherry picked from commit 0e0bad1a6a3affa2b3fd82cc3834ae03ea7bc1d5)
Change-Id: Ia1b8e54b4a0b0f385c703f8e7016011c3ac57a03
Reviewed-on: https://gerrit.libreoffice.org/82808
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'sw/CppunitTest_sw_core_text.mk')
-rw-r--r-- | sw/CppunitTest_sw_core_text.mk | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/sw/CppunitTest_sw_core_text.mk b/sw/CppunitTest_sw_core_text.mk new file mode 100644 index 000000000000..9fe4fadbf357 --- /dev/null +++ b/sw/CppunitTest_sw_core_text.mk @@ -0,0 +1,68 @@ +# -*- 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_text)) + +$(eval $(call gb_CppunitTest_use_common_precompiled_header,sw_core_text)) + +$(eval $(call gb_CppunitTest_add_exception_objects,sw_core_text, \ + sw/qa/core/text/text \ +)) + +$(eval $(call gb_CppunitTest_use_libraries,sw_core_text, \ + comphelper \ + cppu \ + cppuhelper \ + sal \ + sfx \ + sw \ + test \ + unotest \ + utl \ +)) + +$(eval $(call gb_CppunitTest_use_externals,sw_core_text,\ + boost_headers \ + libxml2 \ +)) + +$(eval $(call gb_CppunitTest_set_include,sw_core_text,\ + -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_text,\ + udkapi \ + offapi \ + oovbaapi \ +)) + +$(eval $(call gb_CppunitTest_use_ure,sw_core_text)) +$(eval $(call gb_CppunitTest_use_vcl,sw_core_text)) + +$(eval $(call gb_CppunitTest_use_rdb,sw_core_text,services)) + +$(eval $(call gb_CppunitTest_use_custom_headers,sw_core_text,\ + officecfg/registry \ +)) + +$(eval $(call gb_CppunitTest_use_configuration,sw_core_text)) + +$(eval $(call gb_CppunitTest_use_uiconfigs,sw_core_text, \ + modules/swriter \ +)) + +$(eval $(call gb_CppunitTest_use_more_fonts,sw_core_text)) + +# vim: set noet sw=4 ts=4: |