df-libreoffice:distro/escriba/escriba-5.4

Last commit made on 2018-10-10
Get this branch:
git clone -b distro/escriba/escriba-5.4 https://git.launchpad.net/df-libreoffice
Members of The Document Foundation can upload to this branch. Log in for directions.

Branch merges

Branch information

Name:
distro/escriba/escriba-5.4
Repository:
lp:df-libreoffice

Recent commits

fb57922... by Mark Hung <email address hidden>

tdf#106390 Intersect the table borders with upper frames.

Also removes dead code because SwTabFramePainter::Insert()
is always called with a cell frame and IsTabFrame() always
returns false.

Reviewed-on: https://gerrit.libreoffice.org/54684
Tested-by: Jenkins <email address hidden>
Reviewed-by: Miklos Vajna <email address hidden>
(cherry picked from commit e87cc12eaf53efa9b221eae7167ea15bc7896752)

Conflicts:
 sw/qa/extras/layout/layout.cxx
 sw/source/core/layout/paintfrm.cxx

Change-Id: I2505d876d20e44ded1faf760bc3b7b1d34b0fd8d

65fa9d2... by Andras Timar <email address hidden>

Bump version to 5.4.7.3

Change-Id: I20b523c6bd58598e773de85d41f01c12e0f7628d

7e80dd4... by Miklos Vajna <email address hidden>

sw user field type: fix locale of string -> float conversion

The key part is the SwUserFieldType::GetValue() hunk, the field type has
to always use the same locale, which means if we get an SwCalc reference
that works with the document or field locale that has to be switched
temporarily.

Reviewed-on: https://gerrit.libreoffice.org/58492
Reviewed-by: Miklos Vajna <email address hidden>
Tested-by: Jenkins
(cherry picked from commit 6ca5d288ca810f128163da121777ee2e11c46edc)

Conflicts:
 sw/qa/extras/layout/layout.cxx

Change-Id: I26ff18e74f477729a66b066c4baf6d215a7685bc

6391274... by Miklos Vajna <email address hidden>

tdf#113686 sw: handle sections when counting height of first content line

When moving back a row that has a single text frame, it should not
matter if that text frame is in a section frame or not.

The problem was that the bugdoc has a split (outer) table, the follow's
ShouldBwdMoved() returned false, as
SwTabFrame::CalcHeightOfFirstContentLine() returned USHRT_MAX, as it had
no idea how to calc the height of a text frame in a section frame.

Fix this by looking "through" the section frame, and handling "text
frame" and "text frame in section frame" the same way.

Reviewed-on: https://gerrit.libreoffice.org/44393
Reviewed-by: Miklos Vajna <email address hidden>
Tested-by: Jenkins <email address hidden>
(cherry picked from commit e024cad7c1365da6a198656c3ca0c32b28938e87)

Conflicts:
 sw/qa/extras/uiwriter/uiwriter.cxx

Change-Id: Ic3605a1e2d28bfaa69bf18f31cfbf1e6e681c04f

526c1c4... by Miklos Vajna <email address hidden>

tdf#113520 sw split sections in tables: avoid empty page after content del

The problem was that since split sections are allowed in nested tables,
deleting enough content so that the full content of a page is removed
results in an empty page, having only a 0 height table. I.e. the split
section gets removed properly, the inner table (and its row and column)
as well, but the outer table is still there, though it is marked to have
0 height.

This results in a situation that the previous page doesn't have free
space (the in-table section tries to take as much space as it can), but
on the other hand we try (and fail) to move the 0 height table on the
current page to the previous one, as it doesn't have free space. At the
end the "empty" page still has an invisible table frame, so it is not
removed.

Fix the problem by allowing the move of a 0 height follow table frame
from the current page to the previous one, even it has no empty space.

Reviewed-on: https://gerrit.libreoffice.org/44059
Reviewed-by: Miklos Vajna <email address hidden>
Tested-by: Jenkins <email address hidden>
(cherry picked from commit c9c956f2716c58e2573a9ac07073f712d736ed02)

Conflicts:
 sw/source/core/layout/tabfrm.cxx

Change-Id: I2a5fac88b8b7dc2b91d041b58a4ad1b328f56a6b

33429cb... by Miklos Vajna <email address hidden>

tdf#113445 sw: avoid hitting loop control with a dozen of in-table sections

The bugdoc has an (outer) table containing a single cell, which has an
(inner) table with 12 cells, all content is inside sections, one section
/ cell.

This relatively simple setup can already hit the loop control in
lcl_RecalcRow(), as the SwLayNotify dtor always does invalidation in an
async way, so the loop control's counter is incremented after each and
every table cell.

Instead of increasing the max tolerance in lcl_RecalcRow() (one can
easily construct a document where the bug is still there even if the max
is set to 100 instead of the current 10 iterations), just calculate the
lower synchronously.

Reviewed-on: https://gerrit.libreoffice.org/43848
Reviewed-by: Miklos Vajna <email address hidden>
Tested-by: Jenkins <email address hidden>

Conflicts:
 sw/qa/extras/uiwriter/uiwriter.cxx

(cherry picked from commit cb8b20ab3aa3f790d4979385874cdd4e2a87221b)

Change-Id: Ifbffe13e5f2f237e1578bdd3e17d4d8b7c34806d
(cherry picked from commit 1bf9f8693d61d9abe0dee19d1207b6fb1ca35639)

1e9322e... by Miklos Vajna <email address hidden>

tdf#113287 sw split sections in tables: fix missing invalidation on sect del

The problem was that the Table1:A2 cell contents was wrapped in a
section that was first split, then all the contents was moved to the
next page, finally the empty master was also moved to the next page. At
this point the master had 0 height, and when it was removed, the follow
section frame had invalid positions, including all of its contents.

Position invalidation for table contents works by first invalidating the
table frame position, which triggers an invalidation chain for both all
next frames and the lower frame. Other lower frames are not invalidated,
that happens when the first lower is calculated, in
SwLayoutFrame::MakeAll(), when the SwLayNotify dtor is executed. This
mechanism did not help us here, as the master section frame was already
marked for deletion, so SwLayoutFrame::MakeAll() was not called for it,
so neither of its next frames were re-positioned.

Fix the bug by explicitly invalidating the position of the next frame in
SwSectionFrame::MakeAll(), for the "return early, this section will be
deleted anyway" case. (The alternative could be to watch out for
0-height sections in the SwLayNotify dtor, but the problem is specific
to section frames, so SwSectionFrame is probably a more expected place
for this change.)

Reviewed-on: https://gerrit.libreoffice.org/43604
Reviewed-by: Miklos Vajna <email address hidden>
Tested-by: Jenkins <email address hidden>
(cherry picked from commit cd74225ddad06ca826a37c8ba91eedd9d2aa23ce)

Conflicts:
 sw/qa/extras/uiwriter/uiwriter.cxx

Change-Id: I5ab9475675d25bef7c0647893b1b5909da019f3f
(cherry picked from commit 711b3b0fb1077593c5db19dff4265c7e6039e85b)

13292f3... by Miklos Vajna <email address hidden>

tdf#113153 sw: fix layout loop with split in-table sections

The problem was in SwFrame::GetNextSctLeaf(): it called WrongPageDesc()
to find out if pLayLeaf is a container that is on an acceptable page,
but it was too aggressive, and discarded a split table cell that was in
a follow table (so later it'll be moved to a next page), but on the same
page.

The result was that a new page was created, but later in
::doInsertPage() we noticed this unnecessary page and removed it. The
effect of that was that the in-progress layout action's m_bIsAgain flag
was set to true, restart the layout again and again.

Given that in-table split sections never need to create a new page frame
for the follow section (the cell does this for us already), just don't
discard pLayLeaf when WrongPageDesc() finds it and we're in the split
section-in-table case.

Change-Id: Iea98a26c14fc1fb3154378eab24daa2fd6e84459
Reviewed-on: https://gerrit.libreoffice.org/43429
Reviewed-by: Miklos Vajna <email address hidden>
Tested-by: Jenkins <email address hidden>
(cherry picked from commit a69f48d923628facf7113ebc739a8273c4069122)

9a1d185... by Miklos Vajna <email address hidden>

tdf#112860 sw: avoid shortcut for tables in SwFrame::GetNextSctLeaf()

As the comment says the shortcut only works if no columns or pages are
between the section frames, while for tables there are definitely table,
row and column frames. This resulted later in
SwFrame::IsFootnoteAllowed() a nullptr dereference, as the frame was
still marked as in-table, but wasn't in a table anymore.

Reviewed-on: https://gerrit.libreoffice.org/43091
Reviewed-by: Miklos Vajna <email address hidden>
Tested-by: Jenkins <email address hidden>
(cherry picked from commit c985ad5f7b479706935459630c5a59ccae6fa8b7)

Conflicts:
 sw/qa/extras/uiwriter/uiwriter.cxx

Change-Id: I4191c77d20c6ccc096156fae15ca7c22cc5b68b6

459aecf... by Miklos Vajna <email address hidden>

tdf#112741 sw split sections inside table cells: fix table re-layout

The bugdoc has a section large enough that it is split across 4 pages.
The section is inside a nested table. First we lay this out properly,
but when later laying out the footer we need to redo the body frame
layout, which first undoes the split of the table/nested table/section.

This fails, the master second and its 3 follows are expected to be moved
back to the first page (and merged together), but
SwSectionFrame::MakeAll() did this only for the first follow, which was
moved to the first page, not for the other 2 follows which were on other
pages.

Fix the problem by merging not only follows which are also next to the
section frame, but also the ones which are follows (but not nexts).

(cherry picked from commit 813e180521cd17175910af30599509b358166855)

Conflicts:
 sw/qa/extras/uiwriter/uiwriter.cxx

Change-Id: I7a69aa58336a50d4f37808ccb105b443c2f6993c
(cherry picked from commit 1d78847be47e76f7fda105d8b497db1c9f60e3a7)