office-gobmx/sw/CppunitTest_sw_core_objectpositioning.mk
Miklos Vajna 401c175d1b tdf#156318 sw floattable: fix follow text flow handling on interactive edit
Once the bugdoc has 1 col for pages, setting the top and bottom margins
to 2.5cm created a split fly, but the follow fly was on page 3, not on
page 2.

What happened is that the layout was already wrong before calling into
SwFrame::GetNextFlyLeaf() (that does the split), the "follow text flow"
feature shifted the fly down (top was originally 1341, then the
increased margin means 2475, but an additional 4329 was set), and then
the fly was created on the wrong page.

Fix the problem by not calling GetAnchoredObj().SetObjTop() in
SwToContentAnchoredObjectPosition::CalcPosition() when the fly doesn't
fit anymore, this way the fly can shrink, a follow can be created and
some of the content will be moved to the follow fly, leading to a
correct split fly on pages 1 & 2.

This also fixes the previously appearing "fly frame has negative height
now" warnings on setting the page margin.

Change-Id: I75bf9cfa19dc5c7ce9607417d6a4121b8e85ac47
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156506
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
2023-09-04 11:51:53 +02:00

79 lines
2.1 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_objectpositioning))
$(eval $(call gb_CppunitTest_use_common_precompiled_header,sw_core_objectpositioning))
$(eval $(call gb_CppunitTest_add_exception_objects,sw_core_objectpositioning, \
sw/qa/core/objectpositioning/objectpositioning \
))
$(eval $(call gb_CppunitTest_use_libraries,sw_core_objectpositioning, \
comphelper \
cppu \
cppuhelper \
editeng \
sal \
sfx \
subsequenttest \
svxcore \
sw \
swqahelper \
test \
unotest \
utl \
vcl \
svt \
tl \
svl \
))
$(eval $(call gb_CppunitTest_use_externals,sw_core_objectpositioning,\
boost_headers \
libxml2 \
))
$(eval $(call gb_CppunitTest_set_include,sw_core_objectpositioning,\
-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_objectpositioning,\
udkapi \
offapi \
oovbaapi \
))
$(eval $(call gb_CppunitTest_use_ure,sw_core_objectpositioning))
$(eval $(call gb_CppunitTest_use_vcl,sw_core_objectpositioning))
$(eval $(call gb_CppunitTest_use_rdb,sw_core_objectpositioning,services))
$(eval $(call gb_CppunitTest_use_custom_headers,sw_core_objectpositioning,\
officecfg/registry \
))
$(eval $(call gb_CppunitTest_use_configuration,sw_core_objectpositioning))
$(eval $(call gb_CppunitTest_use_uiconfigs,sw_core_objectpositioning, \
modules/swriter \
))
# assert if font/glyph fallback occurs
$(eval $(call gb_CppunitTest_set_non_application_font_use,sw_core_objectpositioning,abort))
$(eval $(call gb_CppunitTest_use_more_fonts,sw_core_objectpositioning))
# vim: set noet sw=4 ts=4: