forked from amazingfate/loongoffice
Loading the document resulted in a layout loop. This is a problem since commit cf2c070de2bafeec3b476c6bff7bb4ac87ba46db (sw layout: invalidate margins of body content when moving a fly from page, 2022-12-09), which started invalidating the content of an old page in case we remove a fly from it, because some frames calculate their margins based on the flys of the page. Fix the problem by invalidating only the table frames of those page lowers: the direct need for this invalidation comes from SwTabFrame::CalcFlyOffsets(), which is not relevant for other frames. Also, in case non-table lowers are not invalidated, then the new bugdoc loads fine, which means this fixes the new problem while keeping the old problem fixed. This assumes that non-table frames have their equivalent of SwTabFrame::CalcFlyOffsets(), which do their own invalidation, so SwPageFrame::MoveFly() doesn't have to do it. Change-Id: I807d55d077bb0e023beb66775ab68bbca2680eb5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145384 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins