summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2018-11-15tdf#106390 Intersect the table borders with upper frames.distro/escriba/escriba-5.2.1Mark Hung3-4/+30
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 <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> (cherry picked from commit e87cc12eaf53efa9b221eae7167ea15bc7896752) Conflicts: sw/qa/extras/layout/layout.cxx sw/source/core/layout/paintfrm.cxx Change-Id: I2505d876d20e44ded1faf760bc3b7b1d34b0fd8d
2018-11-15sw user field type: fix locale of string -> float conversionMiklos Vajna8-4/+204
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 <vmiklos@collabora.co.uk> Tested-by: Jenkins (cherry picked from commit 6ca5d288ca810f128163da121777ee2e11c46edc) Conflicts: sw/qa/extras/layout/layout.cxx sw/source/core/fields/usrfld.cxx Change-Id: I26ff18e74f477729a66b066c4baf6d215a7685bc
2018-11-15writerperfect: disable unrelated and failing libwpd testMiklos Vajna1-0/+0
Change-Id: I01074981c21f9d9af119ca047ae40d2eab907a05
2017-11-07tdf#113686 sw: handle sections when counting height of first content lineMiklos Vajna3-6/+323
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 <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit e024cad7c1365da6a198656c3ca0c32b28938e87) Conflicts: sw/qa/extras/uiwriter/uiwriter.cxx Change-Id: Ic3605a1e2d28bfaa69bf18f31cfbf1e6e681c04f
2017-10-31tdf#113520 sw split sections in tables: avoid empty page after content delMiklos Vajna3-2/+342
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 <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit c9c956f2716c58e2573a9ac07073f712d736ed02) Conflicts: sw/source/core/layout/tabfrm.cxx Change-Id: I2a5fac88b8b7dc2b91d041b58a4ad1b328f56a6b
2017-10-26tdf#113445 sw: avoid hitting loop control with a dozen of in-table sectionsMiklos Vajna4-11/+405
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 <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> Conflicts: sw/qa/extras/uiwriter/uiwriter.cxx (cherry picked from commit cb8b20ab3aa3f790d4979385874cdd4e2a87221b) Change-Id: Ifbffe13e5f2f237e1578bdd3e17d4d8b7c34806d
2017-10-24tdf#113287 sw split sections in tables: fix missing invalidation on sect delMiklos Vajna3-0/+314
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 <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit cd74225ddad06ca826a37c8ba91eedd9d2aa23ce) Conflicts: sw/qa/extras/uiwriter/uiwriter.cxx Change-Id: I5ab9475675d25bef7c0647893b1b5909da019f3f
2017-10-17tdf#113153 sw: fix layout loop with split in-table sectionsMiklos Vajna3-1/+716
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 <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit a69f48d923628facf7113ebc739a8273c4069122)
2017-10-17Revert "sw: work around layout loop with split sections inside nested tables"Miklos Vajna1-39/+1
This reverts commit a3884863aba7807e7b473a0acb3f7aa4e4ae9a37. It was a workaround, root cause fix is coming.
2017-10-06sw: work around layout loop with split sections inside nested tablesMiklos Vajna1-1/+39
This is just a short-term workaround, the actual root cause has to be fixed (and that fix needs a testcase). The change just makes sure that once a page is formatted, then a follow page's table row doesn't invalidate the previous page (when the row is shrinking), this way avoiding the loop. Change-Id: Ic4b9252157ed29c3b554f06caf0630e56ba2ac79
2017-10-06tdf#112860 sw: avoid shortcut for tables in SwFrame::GetNextSctLeaf()Miklos Vajna4-1/+1406
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 <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit c985ad5f7b479706935459630c5a59ccae6fa8b7) Conflicts: sw/qa/extras/uiwriter/uiwriter.cxx Change-Id: I4191c77d20c6ccc096156fae15ca7c22cc5b68b6
2017-09-29tdf#112741 sw split sections inside table cells: fix table re-layoutMiklos Vajna3-1/+428
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
2017-09-25sw: split section frames inside table cells, handle nested tablesMiklos Vajna3-24/+175
Commit 3d1bb76ebf5c51141018cfd76eccdb63472de8de (tdf#112109 sw: split section frames inside table cells, ignore nested tables, 2017-08-31) explicitly disabled this, but the underlying problem is now fixed with commit ec262cbc56822d8fffccd6e983848df196cf5c44 (tdf#112160 sw: audit GetNextLayoutLeaf() calls in SwFrame::GetNextSctLeaf(), 2017-09-04), so we can have it again. Change-Id: Ic17c4921de2c69e4cc16ae82cfed58d096879db7 (cherry picked from commit 8da365e2a7a6b30da6c2ca26b2a5f45f89cd5460)
2017-09-04tdf#112160 sw: audit GetNextLayoutLeaf() calls in SwFrame::GetNextSctLeaf()Miklos Vajna3-1/+158
GetNextLayoutLeaf() returns the next container, not the follow one, so calls to that without checking first if we are in a table are always suspicious. This leads at the end to strange content move, as described in the bug. There appears to be only a single place in SwFrame::GetNextSctLeaf() which may be executed for split sections and called GetNextLayoutLeaf() unconditionally. Reviewed-on: https://gerrit.libreoffice.org/41882 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit ec262cbc56822d8fffccd6e983848df196cf5c44) Conflicts: sw/qa/extras/uiwriter/uiwriter.cxx Change-Id: I759d9ef63660f3d2ffe006c88b18cba7dba99f33
2017-08-31tdf#112109 sw: split section frames inside table cells, ignore nested tablesMiklos Vajna3-7/+207
Commit f8a76d218305a56d15b82b9dac4fafa558872780 (tdf#108524 sw: split section frames inside table cells, non-split text frames, 2017-07-06) added support for moving text frame masters to a next page inside section-in-table frames. But the code in SwFrame::GetNextSctLeaf() responsible for this is not up to nested tables, so don't try to split sections in this case. Otherwise we'll end up with frames which are marked as "in table", but don't actually have have table frame parents, so we crash in SwFrame::IsFootnoteAllowed() which assumes being in a table means a table frame parent. Reviewed-on: https://gerrit.libreoffice.org/41748 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> (cherry picked from commit 3d1bb76ebf5c51141018cfd76eccdb63472de8de) Conflicts: sw/qa/extras/uiwriter/uiwriter.cxx Change-Id: Iff19a4eda21a4dbfb9562dea7af8ec6767d47873
2017-08-24i#95698 sw: fix crash on splitting in-table section containing a nested tableMiklos Vajna3-0/+22
Found by crashtesting, ooo95698-1.odt crashed sw layout on load. The intended use-case is splitting section frames inside a table frame, so can just blacklist the non-interesting table-in-section-in-table case that causes the problem here. Reviewed-on: https://gerrit.libreoffice.org/41224 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit 802477ae75b39194442d9c01a1342d068c7b9300) Conflicts: sw/qa/extras/uiwriter/uiwriter.cxx Change-Id: Ic47cd8c46cc71f7eaa36b03ec2c4a5df8ca8051c
2017-08-24CppunitTest_sw_uiwriter: disable testLinesMoveBackwards... on macOSMiklos Vajna1-0/+2
No idea off the top of my head what is the problem here, seeing Linux and Windows is happy; clang on Linux as well. Change-Id: I56c79b37a5648d9afd02d8e161ea4a279cc89744 (cherry picked from commit 39dd0121f5994dee56f95bc57fae3323bf849a20)
2017-08-24tdf#108524 sw: handle sections inside tables in SwFrame::GetPrevSctLeaf()Miklos Vajna2-2/+43
This addresses the sub-problem described in comment 12 of the bug, i.e. text frames are now moved to the first page from the second one when text frames are deleted on the first page. Change-Id: Ic0ede45381fb84b13d1ac02e4d1f39d817650616 Reviewed-on: https://gerrit.libreoffice.org/39946 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit 850bf99e7d1abcf2e0cce731b6715f87420d0ee6)
2017-08-24tdf#108524 sw: allow frames in follow sect-in-tables in SwFlowFrame::MoveBwd()Miklos Vajna1-1/+4
The intention is to filter out text frames directly inside tables; since tables in general reflow by moving all of the content to the first page, then moving not fitting content to the next pages. Section frames are different, there we explicitly move content backwards, similarly to page body frames. Teach SwFlowFrame::MoveFwd() that a text frame inside a section-in-table is the section situation, not the table situation, since what matters here is the direct parent. To be on the safe side allow this for follow section frames only. This is necessary, but not enough to address the sub-problem described in comment 12 of the bug. At least SwFrame::GetPrevSctLeaf() is invoked to consider a precede section frame, though. Change-Id: Ic88602cffefbbc81ecc90e3880be2a098f60fb04 (cherry picked from commit 4908d6d6742e2f0700ea4ccd9d636d91ea281046)
2017-08-24tdf#108524 sw: allow frames in growable follow sects in SwFrame::IsMoveable()Miklos Vajna1-1/+5
In general the move of frames inside growable sections is not allowed, so that the behavior is deterministic: either the section grows or content is moved to a follow section frame. But in case of split sections it is necessary to allow the move of text frames inside growable section frames, otherwise it is impossible to move text frames from the last follow of a section frame to the previous one. This is necessary, but not enough to address the sub-problem described in comment 12 of the bug. At least now SwFlowFrame::MoveBwd() is invoked to consider moving the frame backwards, though. Change-Id: I0b79e9db72a4e335701491dd6f7745058901e176 Reviewed-on: https://gerrit.libreoffice.org/39873 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit 5b9edf5d5779b9ce578084250a6c87808ddc5fa8)
2017-08-24rhbz#739252 sw: fix crash on split tables inside nested sectionsMiklos Vajna3-2/+16
Commit b5e0a143308e976b4165ff6181f4dccc3db0bd31 (tdf#108524 sw: attempt to split section frames inside table cells, take two, 2017-07-03) checked for tables in SwFrame::GetNextSctLeaf() when it considered looking up the next "follow" cell frame. But this is too general, in practice it is only necessary to look for follow cell frames in case the frame in question is in a table, but not in a table-in-section. This at the same time avoids a crash with tables inside nested sections, as it happens in the bugdoc. Reviewed-on: https://gerrit.libreoffice.org/39692 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit 652556ec3e9218655a67b4c4de4e26fbe81855de) Conflicts: sw/source/core/layout/sectfrm.cxx Change-Id: If648cb477be5492c7158f89934435ca7021a6a63
2017-08-24i#61225 sw: fix layout loop with growable single-column sectionsMiklos Vajna3-2/+15
Commit 6ade80cf142664e78954c7544534e9436ceb90c7 (tdf#108524 sw: allow move of frame inside section without columns, 2017-06-16) relaxed lcl_IsInSectionDirectly() used in SwFrame::IsMoveable() to allow move for all section frame contents if it has a single column. That looked safe, as the multiple column case was already allowed. There is one situation where this still causes a problem: when the section has a single column and the section frame is growable -- as in that case we should grow the section frame, not move the contents. So go back to unconditionally allowing multi-column section contents and allow single-column section contents only in case the section frame is now growable. With this, ooo61225-1.sxw from the crashtesting corpus can be opened again without a layout loop. Reviewed-on: https://gerrit.libreoffice.org/39653 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit 972fbddf80510f7daaf2128dbfda01c0e7535020) Conflicts: sw/qa/extras/odfimport/odfimport.cxx Change-Id: Ib2d3702a33da8e62b9bbf468d558ae16db8aa94b
2017-08-24tdf#108524 sw: split section frames inside table cells, non-split text framesMiklos Vajna3-3/+21
Commit f991b842addddeada6dc45c4054deeca5aa7f17b (tdf#108524 sw: attempt to split section frames inside table cells, 2017-06-19) added initial support for multi-page sections inside a table cell, but turns out this only worked in case at the split point there was a long enough paragraph, so it was split into two (a "master" text frame and a "follow" one), and then the follow was moved to the next page by SwContentFrame::MakeAll(), with the MoveFwd() call in the "If a Follow sits next to its Master and doesn't fit, we know it can be moved right now." block. However, if the section contains lots of one-liner text frames, then all of them are masters, so the above code doesn't move them to the next page; so the section frame is still not split. Fix the problem by allowing the move of frames inside table-in-sections in SwSectionFrame::MoveAllowed(), that way SwTextFrame::AdjustFrame() will not set the text frame as undersized, so at the end SwContentFrame::MakeAll() will call MoveFwd() in the "If a column section can't find any space for its first ContentFrame" block. With this the split of text frames in section-in-table frames is consistent regardless if they are of multiple or single lines. Change-Id: Ief9d62da3fd8a5c707e1f9489a92f7a81e7b38ac Reviewed-on: https://gerrit.libreoffice.org/39623 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit f8a76d218305a56d15b82b9dac4fafa558872780)
2017-08-24tdf#108524 sw: attempt to split section frames inside table cells, take twoMiklos Vajna2-10/+41
Tables-in-sections were already split across multiple pages, but not secions-in-tables. To be safe still don't allow sections-in-tables-in-sections, so you can combine these in both orders now, but not recursively. To achieve this, relax two "not in table" conditions to just require "not in a table that is already in a section", and define that in case a section-in-table is to be split, the follow section frame should be inserted under the follow of its cell. With this, finally the section frame in the bugdoc is split into two, and the second section frame is moved to the second page as expected. This restores commit f991b842addddeada6dc45c4054deeca5aa7f17b, but this second take makes sure that we do not crash while laying out ooo61225-1.sxw. GetNextSctLeaf() used to assume that SwTableFrame::Split() created the follow cell frames; and when that wasn't the case, it crashed. Still don't attempt to create the cell frame in GetNextSctLeaf(), but handle when the cell follow frame is missing, and return early, as it used to be the case before this commit. Reviewed-on: https://gerrit.libreoffice.org/39471 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit b5e0a143308e976b4165ff6181f4dccc3db0bd31) Conflicts: sw/qa/extras/uiwriter/uiwriter.cxx Change-Id: I9dcc76b4c61b39b9d23b140b84420e89cf274cf3
2017-08-24Avoid loplugin:unreffunStephan Bergmann1-1/+7
...after 272d5a02a3de2350f8af7a93281b651316b24ae5 "Revert 'tdf#108524 sw: attempt to split section frames inside table cells'" (cherry picked from commit 12ca907139c05ded23cb22aab2e03a52645adfa0) Conflicts: sw/qa/extras/uiwriter/uiwriter.cxx Change-Id: Ic1ec8cd3284e2ba98630552c80d99b5d67fc7efd
2017-08-24Revert "tdf#108524 sw: attempt to split section frames inside table cells"Michael Stahl4-48/+5
This reverts commit f991b842addddeada6dc45c4054deeca5aa7f17b. It doesn't really work and crashes on ooo61225-1.sxw in 1 in SwFrame::FindTabFrame() (this=0x0) at sw/source/core/inc/frame.hxx:913 2 in SwFrame::GetNextSctLeaf(MakePageType) (this=0x3137130, eMakePage=MAKEPAGE_INSERT) at sw/source/core/layout/sectfrm.cxx:1529 3 in SwFrame::GetLeaf(MakePageType, bool) (this=0x3137130, eMakePage=MAKEPAGE_INSERT, bFwd=true) at sw/source/core/layout/flowfrm.cxx:805 4 in SwFlowFrame::MoveFwd(bool, bool, bool) (this=0x31371d8, bMakePage=true, bPageBreak=false, bMoveAlways=false) at sw/source/core/layout/flowfrm.cxx:1861 The code added in GetNextSctLeaf() looks unfinished to me: it assumes that something else has added a follow-frame for the SwCellFrame containing the SwSectionFrame already, but AFAICT the GetNextSctLeaf() function is responsible for creating that SwCellFrame follow. The caller (in GetLeaf()) specifically checks for this condition and avoids calling GetNextCellLeaf(). (cherry picked from commit 272d5a02a3de2350f8af7a93281b651316b24ae5) Conflicts: sw/qa/extras/uiwriter/uiwriter.cxx Change-Id: I51875830771f07f5d2fec293f6063c73fc68d468
2017-08-24tdf#108524 sw: add split section in table testcaseMiklos Vajna3-0/+30
And if we're at it, test the other way around as well, I almost broke it. Reviewed-on: https://gerrit.libreoffice.org/38999 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit e9d2016648c7fdfc57932ac0793547cf099749be) Conflicts: sw/qa/extras/uiwriter/uiwriter.cxx Change-Id: Ia81e46f218336e5db13dafdbad7b896d8dadaf46
2017-08-24tdf#108524 sw: attempt to split section frames inside table cellsMiklos Vajna3-4/+48
Tables-in-sections were already split across multiple pages, but not secions-in-tables. To be safe still don't allow sections-in-tables-in-sections, so you can combine these in both orders now, but not recursively. To achieve this, relax two "not in table" conditions to just require "not in a table that is already in a section", and define that in case a section-in-table is to be split, the follow section frame should be inserted under the follow of its cell. With this, finally the section frame in the bugdoc is split into two, and the second section frame is moved to the second page as expected. Change-Id: I16ebb2d30870b145a2378d46603324ab267b0dd3 Reviewed-on: https://gerrit.libreoffice.org/38965 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit f991b842addddeada6dc45c4054deeca5aa7f17b)
2017-08-24tdf#108524 sw: allow move of frame inside section without columnsMiklos Vajna1-9/+6
The intention here is to deny the move of a frame that's inside a table inside a section. But the code also checked if there a column frame in-between, so it allowed the move for a frame in a section with 2 cols, but not without columns (which does not sound intentional, since that's a simpler case). So drop the requirement to have a column frame between the argument and the section frame, just check that there is no table frame in between. This is needed, but not enough to split the section in the bugdoc (but at least now the content of the section is marked as movable). Change-Id: I9155b291a19c692efc30f01f8e206fac5f1ccf81 Reviewed-on: https://gerrit.libreoffice.org/38858 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> (cherry picked from commit 6ade80cf142664e78954c7544534e9436ceb90c7)
2017-08-24tdf#108524 sw: try to split rows that contain 1-col sectionsMiklos Vajna1-1/+16
We used to not even attempt to split a row that contains sections. Relax this condition and try to split the row in case the table itself is not in a section (to avoid recursion) and the section has no columns. This is needed, but not enough to split the section in the bugdoc. Change-Id: I6ad0d6eb18611f108ae29e4feea7101ffe552c48 Reviewed-on: https://gerrit.libreoffice.org/38824 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> (cherry picked from commit 336ec28195da1917c22494a24dbaf10b846d3141)
2017-08-24Related: tdf#108524 sw: dump follow/precede of cell frames in layout xml dumpMiklos Vajna2-0/+11
These point to the other cell frame on the previous/next page (in case the cell frame is split across multiple pages). Change-Id: Ic03cf9a194a49320d84dbdb5176fa737e5d6520d Reviewed-on: https://gerrit.libreoffice.org/38818 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit 835c1586f60e6bc03e045e8210e38876e0fe1abc)
2017-08-24sw: add new TextParagraph property to XTextRangeMiklos Vajna7-0/+45
A text range represents a selection or cursor position, so similar to sections or tables, it makes sense to expose the containing paragraph as well. This new property does exactly that. Reviewed-on: https://gerrit.libreoffice.org/40483 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> (cherry picked from commit 7ed402ba648dd0f3de3b0dadebc13403b2c0a620) Conflicts: sw/qa/extras/uiwriter/uiwriter.cxx Change-Id: If92a3b5e61f13c7c14ca52bc8593a2b286a596cc
2017-08-24gbuild: strip away unexpected CR char at the end of Windows filenamesMiklos Vajna1-0/+7
As reported at e.g. <https://ask.libreoffice.org/en/question/90346/building-libreoffice-in-cygwin-leads-to-infinite-loop/>, sometimes MSVC (seen with 2013 on libreoffice-5-2, but there is no indication that 2015 on master would be different) emits CR characters at the end of filenames, resulting in unnecessary rebuilds at per-module builds, and actually to an infinite loop when doing toplevel make. Given that CR characters are unexpected in any filenames, it should be safe to just strip those away unconditionally. Change-Id: I3d56670b4d930a32489f889085711bfd436de82a Reviewed-on: https://gerrit.libreoffice.org/40452 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> (cherry picked from commit e9b9a456221b4b0660f90efa1ee092ea00c2c728)
2017-08-24SwXDispatchProviderInterceptor: implement frame::XInterceptorInfoMiklos Vajna2-1/+16
With this, framework::InterceptionHelper can make a better decision what interceptor to call: it can avoid calling SwXDispatchProviderInterceptor when the sw code would just call the previous interceptor anyway. Change-Id: I92897f2c8baa264dc9ccbc11b63f415da30a910d Reviewed-on: https://gerrit.libreoffice.org/25961 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit b0d819ac5667a07f629f2acb5d3c542fa76d348b)
2016-08-25Version 5.2.1.2, tag libreoffice-5.2.1.2libreoffice-5.2.1.2Christian Lohmaier3-0/+0
Change-Id: Iebf6d3cc430f6d511982c0e1bbdacf69148139cf
2016-08-25bump product version to 5.2.1.2Christian Lohmaier1-1/+1
Change-Id: Ib26b39d9fedfe2e4056bcb9aea7f88d22b0e8353
2016-08-24libpng: upgrade to release 1.6.24Michael Stahl1-2/+2
Change-Id: I5528522d866262655eadcfcf09c038e0c6097bb9 Reviewed-on: https://gerrit.libreoffice.org/28364 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com> (cherry picked from commit 1efbdfcffff97ec0834274d13abe0f0d318b5f3c) Reviewed-on: https://gerrit.libreoffice.org/28367 Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> (cherry picked from commit f90be96ed400a5471d6c3a5cfa5087957803a9fe) Reviewed-on: https://gerrit.libreoffice.org/28370 Tested-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2016-08-24Resolves: tdf#101460 use most recent poppler releaseCaolán McNamara8-30/+30
Change-Id: I660e1f13eb4b05fdb7257f422eca288c2d07cf4d Reviewed-on: https://gerrit.libreoffice.org/28087 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 10290000117b562e3f179c3d1073774dd54cdfee) Reviewed-on: https://gerrit.libreoffice.org/28366 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com> (cherry picked from commit 92986a1d516195ed73ad2036ee0647a54baf84b6) Reviewed-on: https://gerrit.libreoffice.org/28369 Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> Tested-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2016-08-24Resolves: tdf#101137 handle empty elements in matrix concatenationEike Rathke3-18/+80
Change-Id: I2de90e1cdfc4f215f6d7c644e0ab74372a4c2639 (cherry picked from commit 31d39c24e1ff2d3602e0212eeeecd8de88da6d38) Reviewed-on: https://gerrit.libreoffice.org/28336 Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Reviewed-by: Michael Stahl <mstahl@redhat.com> Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> Tested-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2016-08-24Resolves: tdf#88953 byref args incorrectly passed in basic->c++Caolán McNamara3-2/+4
partial revert of commit 22b094f5d8e1e82375b135abd3a6f99a9a555244 Date: Tue Jul 14 14:50:07 2015 +0200 loplugin:unusedmethods basic and partial revert of... commit e2080e70fe8b085f18e868e46340454720fa94ca Date: Wed Jun 18 12:14:29 2014 +0200 new compilerplugin returnbyref and revert of... commit 536051f8862203e0e115a5394a6379acd83cc8fe Date: Wed Jul 15 14:04:01 2015 +0200 fix Windows build after commit 22b094f5d8e1e82375b135abd3a6f99a9a555244 "loplugin:unusedmethods basic" Change-Id: I612937334fdb75365080c98a9d4da5ed7ae647e3 (cherry picked from commit 4a647a04a7881964ce13b541399f89e4ab042ea8) Reviewed-on: https://gerrit.libreoffice.org/28251 Reviewed-by: Eike Rathke <erack@redhat.com> Reviewed-by: Michael Stahl <mstahl@redhat.com> Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> Tested-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2016-08-24tdf#101661: Report XDG_{DOCUMENTS,TEMPLATES}_DIR only when it existsStephan Bergmann1-6/+10
...as had been done in the GConf-based backend prior to 3cf557c12d27f1b2250e69a543136da098112d80 "drop gconf integration as per ESC decision". Change-Id: I56f256aaec542e0a62fc30a37d5c982e93e77812 (cherry picked from commit 4278cac8935339dddfa5473490124d11061a0b38) Reviewed-on: https://gerrit.libreoffice.org/28344 Reviewed-by: Eike Rathke <erack@redhat.com> Reviewed-by: Michael Stahl <mstahl@redhat.com> Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> Tested-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2016-08-24update creditsChristian Lohmaier1-1490/+1558
Change-Id: I20497f102f212a66525ca7be2771baef4b8b55a5 (cherry picked from commit 1b78ee6fc00924fd8d502dc92b82738a404cee34) (cherry picked from commit 7b6affd1ceeed34a279b9b11895af52ae839c59d)
2016-08-24update emoji autocorrect files from po-filesChristian Lohmaier2-11/+241
Change-Id: I1a90e11daf4e1cc3e56984d340a0a43c84d7166d (cherry picked from commit 53d0d98cc5351cfa4af3059c112db620acf667a2)
2016-08-24Updated coreChristian Lohmaier1-0/+0
Project: translations 75ff2af971a9c8cd1ebc00dcbd4723f05c82a358 update translations for 5.2.1 rc2 and force-fix errors using pocheck Change-Id: I596fa1e8acc5be5e9ef1867b378b291a6853d935 (cherry picked from commit cc220e305045212ebb6311476ff3999d88fa6def) (cherry picked from commit 42510aa08ecb272537241e7d4afaf6539c5c97b0)
2016-08-24Resolves: tdf#101347 conditional formatting super slow on exitCaolán McNamara1-1/+6
since... commit 88a0c7d01b7dfd085a0569030f97cc7de0f0d106 Date: Sat Mar 26 13:11:53 2016 +0100 switch to a listener based cond format update, tdf#95437 I'm obviously assuming here that the notify doesn't matter when the broadcasted is shutting down. Change-Id: I0fef0ac1c1d8757199dcffb3c8ec1b05a73c1f17 Reviewed-on: https://gerrit.libreoffice.org/28006 Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit cbab44f5eb27c8a45905167d2443f56b816b4a7b) Reviewed-on: https://gerrit.libreoffice.org/28205 Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit 5c1812103a6c0cd29dd18e546d29ee683f675f6d) Reviewed-on: https://gerrit.libreoffice.org/28238 Reviewed-by: Eike Rathke <erack@redhat.com> Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2016-08-24Resolves: tdf#100901 crash pressing tab in r-o document with hyperlinkCaolán McNamara1-1/+3
rather odd union in use here. Trying to call SwTextField::GetStart on SwTextINetFormat blows up under visual studio. Change-Id: Ic8145d7645bd6a68ef19e018311a4de6e6958bcb (cherry picked from commit 3196e949bb23a33bdb8700dbe27782e0e6c8f1e6) Reviewed-on: https://gerrit.libreoffice.org/28243 Reviewed-by: Eike Rathke <erack@redhat.com> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2016-08-19XML number format: do not enquote space followed by minus, tdf#97837 follow-upEike Rathke1-7/+9
Which with [$kr.-406] #.##0,00;[RED][$kr.-406] -#.##0,00 saved and reloaded gave [$kr.-406] #.##0,00;[RED][$kr.-406]" -"#.##0,00 and thus an almost identical duplicated format with the built-in format. Change-Id: Ie39b97576842bc29ac301d2fe64f7331f6c57fc4 (cherry picked from commit 4d993ae8f267e35f7c030861a92226c940bb46cc) Reviewed-on: https://gerrit.libreoffice.org/28041 Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
2016-08-18tdf#100965: Restart on initialisation-time OpenCL crashTor Lillqvist4-8/+24
Add a flag to the OpenCLZone indicating whether we are performing the first-start OpenCL functionality verification, so that if we run into a crash that is caught by the VCL VCLExceptionSignal_impl() handler, we terminate the process with the EXITHELPER_NORMAL_RESTART status after first having disabled OpenCL use. The wrapper process will then restart soffice.bin. This is for Windows only so far. This matches what we do if OpenGL fails early during start of LibreOffice. Also, the enter() and leave() functions are not used anywhere (cherry picked from commit 32881f01833dbcefd5600e1135dd8743178bfd96) (cherry picked from commit b9898f03eb05411c508b1b02588812074d40417a) Change-Id: Ibb9bf3a86b7521bf16728de2a118ad4323be674b Reviewed-on: https://gerrit.libreoffice.org/28139 Reviewed-by: Eike Rathke <erack@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-08-18Add missing Loader$1.classStephan Bergmann1-0/+1
...that was introduced with abbf4777f29374025d576ef8daa3f6dcba02ddf5 "cid#1326844: DP: Use doPrivileged" Change-Id: I8cd4d947b258313d4d171c5888490d1a860ebee7 (cherry picked from commit e175592a2732c34e16bcd9c19dc465e4974071c3) Reviewed-on: https://gerrit.libreoffice.org/28195 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-08-15GALAXY: Add show track changes bar small iconYousuf Philips2-0/+0
Change-Id: I8166fc40e683899ab562c2c80c06336d8a7b7598 Reviewed-on: https://gerrit.libreoffice.org/28051 Reviewed-by: Yousuf Philips <philipz85@hotmail.com> Tested-by: Yousuf Philips <philipz85@hotmail.com> (cherry picked from commit 1fcb7eafd95ebed7f5532d86a8cd8cd89196883e) Reviewed-on: https://gerrit.libreoffice.org/28053 Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com> Tested-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com> (cherry picked from commit c324c79b087c98e024a2ae130ce3993346797fee) Reviewed-on: https://gerrit.libreoffice.org/28054 Reviewed-by: Eike Rathke <erack@redhat.com> Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de> Tested-by: Katarina Behrens <Katarina.Behrens@cib.de>