summaryrefslogtreecommitdiff
path: root/sw
AgeCommit message (Collapse)Author
2021-06-28Fix uninitialised conditional jumpJan-Marek Glogowski
Since we just handle one specific case, just initialize the variable to something different, instead of checking the GetFirstRedoInfo result. From valgrind: ==10566== Conditional jump or move depends on uninitialised value(s) ==10566== at 0x270E4451: SwDoc::ChgPageDesc(unsigned long, SwPageDesc const&) (docdesc.cxx:431) ==10566== by 0x272E341F: SwFEShell::ChgPageDesc(unsigned long, SwPageDesc const&) (fedesc.cxx:122) ... Change-Id: Ib95f81297959a535a08dc399f72b68c15e621a27 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118017 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2021-06-28Removed executable bits on doc filesAndrea Gelmini
Change-Id: Icbf1a9a6fed698345b8faabf3443216240c65069 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118011 Tested-by: Jenkins Reviewed-by: Andrea Gelmini <andrea.gelmini@gelma.net>
2021-06-28loplugin:indentation improve checks for brace alignmentNoel Grandin
Change-Id: I333100fda7e181f68f36b03279b3fbb8cb768310 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117615 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-06-28tdf#142304 a.o. Improve wrap margins in docx filtersRegina Henschel
LO uses the bounding box of the shape in case of type 'Parallel'. Word uses in the corresponding wrap 'square' a box based on the full size of the shape. That will be very different in some cases, e.g. for an arc. And Word exchanges width and height in case of rotation angle in [45°;135°[ and [225°; 315°[. To get the same appearance as in Word, the wrap margins are suitable expanded on import. Word puts the additional space needed for fat strokes into effectExtent in case of wrap 'inline', so there is no need to add the half strokes width in addition. Word determines the area for the shape depending on rotation angle. Both are now considered. Total same appearance is not possible because it would need negative vertical wrap margins, which are currently faulty in LO, see tdf#141880. Patch solves in addition tdf#142486, tdf#142305 The export to Word would require negative values in effectExtent in some cases. They are allowed in OOXML but not supported in Word. My idea is to switch to wrap mode 'Tight' if needed. But export of wrap has so many bad parts, that it needs separate work and is not included here. Handling of border width for export of own frames is missing. Unittest changes ---------------- testDmlTextshapeB and TestDmlTextshape in ooxmlexport6.cxx are set to current values. Import and Export still have large errors with these shapes and correct value from file is unknown. So an exact value is pointless. Only the original problem needs to be still fixed, which is the case. testWpsOnly in ooxmlexport10.cxx. I have removed the test for LeftMargin equals 0. The test makes no sense, because the original file has distL=114300. testTdf124600 in ooxmlimport2.cxx. I have added a tolerance. It would fail with Expected: 2029, Actual:2028, likely a rounding problem somewhere. testTdf124600 in ooxmlimport2.cxx Word refers to outer edge of the border for align='left', LO aligns at snap rectangle. The different intepretations become visible if a thick line is used. LO needs a margin to get the same rendering as in Word. So an expected value of 0 is wrong and I have disabled the test for now. ToDo: tdf#142798. Get the correct margin and activate the test then. testTextframeGradient in ooxmlexport2.cxx. I didn't find any reference for a default value. The test is not reliable, I get both 316 and 318 as actual value. Handling of shadow in VML shapes is buggy, the values for margin and shadow are wrong anyway. Reports are e.g. tdf#142486, tdf#142558. For now I have added a tolerance of 2. testDMLGroupShapeChildPosition in ooxmlexport6.cxx. The accuracy has become better. After reload we get the same values as before. testEffectExtent in ooxmlexport.cxx. tdf#142805. I have disabled the test, because the image is not loaded at all, and therefore it makes no sense to test a margin of it. And you can only test the sum of distL and effectExtent l, because LO has only one property 'LeftMargin' for it. testEffectExtentInline in ooxmlexport.cxx. To get the same vertical alignment as in Word, it would be necessary to have negative margins, but those are not implemented yet. tdf#141880. Currently the patch contains a heuristic to detect unchanged objects and write the grab-Bag values then. testEffectExtentLineWidth in ooxmlexport16.cxx. I have changed the expected value from 508 to 506. That is still away from the to be fixed faulty 561. It is a VML shape and import of connectors in VML shapes is faulty. testRelorientation in ooxmlexport4.cxx. Changed to 8662, the original problem is still fixed. I don't know the reason for the difference to the values from file. Change-Id: I28f156637f6ae64975cf2917f0e5cc89e689aff5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115668 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2021-06-28sw: prefix members of HTMLTableColumn, HTMLTableContext, SwWriteTableCol ...Miklos Vajna
... and SwWriteTableRow See tdf#94879 for motivation. Change-Id: I74edd0d6864fd7c2731d904c8bf7cfbd309a226c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117965 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2021-06-28tdf#104239 doc import: listLevel 9 is body textJustin Luth
MS Word formats only have 9 list levels (0-8), and listLevel 9 is used to indicate body-level as a way to cancel the inheritance of a listLevel. LibreOffice however has 10 levels (0-9), so it was treating this as 10th level numbering. Nope - it needs to be no numbering at all. Change-Id: I3fd58ba518ba8bc7d15a08cf896fbeed8e6a38c2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117921 Tested-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Justin Luth <justin_luth@sil.org>
2021-06-27uitest: remove duplicated calls to get_component()Xisco Fauli
after 8298aa62726312eee6f8fbb64a9fc9b12680447f < uitest: guard execute_blocking_action > Change-Id: I954c11c42620660afd48a585f5c59ff2196f4b6a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117738 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-06-27ofz#30647 skip boring slow path for fuzzingCaolán McNamara
Change-Id: Ifab4209e4481058046c95efc9efccf337b4badd5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117939 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-06-27Revert "tdf#135316 bypass 'existing style' check when importing"Noel Grandin
This reverts commit 066c4054f4a1078602aaab5516590628eaf6a47e. As mst_ says: there isn't just File->Open but also Insert->Text from File... in that case the optimisation looks wrong to me Change-Id: I9d0b4bc748842b8fac7ea4cd58192562f8fd82f2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117864 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-06-26tdf#104239 doc import: chose m_pChosenWW8OutlineStyle carefullyJustin Luth
Chapter numbering is a horrendous invention of LibreOffice. It is not at all a part of MS Formats. If there is anything that potentially can cause problems by choosing one style to be the outline style, invalidate it. We won't totally ignore CN because it has some unique properties in LO, and so it is worthwhile trying to round-trip it (alwyas LFO 0?) or populate it with the expected Heading styles if compatible. (I tried looping through and re-setting the matching styles with the "Outline" numrule first, but lots of unit tests prove that doesn't work well.) I couldn't believe the incredibly good effect this had on my torture test example document. Hurray. Then again, completely preventing CN at all also passed all unit tests, so I added a preventative test earlier. Change-Id: Iafa0d3606e558a3f17e49c3f1f6cebb7b25de962 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117920 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org>
2021-06-26indexing: add test case for fontworks and footer/header paragraphsTomaž Vajngerl
Change-Id: I7b6879d0e038f8c07ae5853d66c43096c25365e8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117841 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-06-26tdf#104329 doc import pre-emptive unit test: ensure ChapterNumberingJustin Luth
So chapter numbering is a complete scourge for importing numbering, but after many unit tests proving my attempted solutions were incompletely, I finally found one that worked great. Unfortunately, I made a major coding blunder, and effectively killed chapter numbering unconditionally. But it fixed every unit test problem!! So that pretty much proves that chapter numbering is trash, but for LO it still has some important functions, so ensure that at least on a clean, nice, LO-authored document chapter numbering still round-trips nicely. Change-Id: I37491ecb638aa79fd7c7621e9cf0ea6282397b83 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117919 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org>
2021-06-26uitest: introduce load_empty_fileXisco Fauli
to make sure the documents are closed in inverse order when different documents are used in the same test Change-Id: I97ff33f9f91423d06f4e74bba6fc6a5312b24a17 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117914 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-06-25tdf#104239 doc import: use "Outline" for m_pChosenWW8OutlineStyleJustin Luth
This looks like it was a logic error. Probably they were only looking at the situation where the paragraph style set the numbering style to "Outline". Well, in this case, Heading 1 is actually not part of Chapter Numbering, but it was the body sprm that set the style. In any case, whenever the LFO chosen as the outline style is referenced, it should apply LO's special, unique and extremely troublesome "Outline" numbering style. Change-Id: I354d9b9f4a48abed3453ee046ddd63cda174f25d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117746 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org>
2021-06-25uitest: guard execute_dialog_through_actionXisco Fauli
Mostly done with a script for motivation, see 89aaa17a0a4413f07da2bc5084b0164f15dc01ac < UITest: introduce guarded context managers > Change-Id: I8b0e4aa746f7973b1bd1343219820d8b2315cf19 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117703 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-06-25sw: layout: fix table split loop caused by RemoveFollowFlowLinePendingMichael Stahl
In no_view.odt, the table 1340 does RemoveFollowFlowLine(), then splits again, and by the time Split() returns, its flag m_bRemoveFollowFlowLinePending is set and so in the next SwTabFrame::MakeAll() it will do the same thing again, until eventually it hits layact.cxx:544: LoopControl_1 in SwLayAction::InternalAction The flag is set during lcl_RecalcSplitLine(), in SwContentFrame::Cut(), which operates under the assumption that there are no other cells in the follow flow line that may contain content frames. This only happens if "Verdana" and "Arial" fonts are available and not substituted with "DejaVu Sans" etc. (regression from c4af8b0f106f31b6e79a145bc4ab83bb6a55c808) Unfortunately this uncovers another pagination bug in testTdf88496 which was hidden by this flag being set from text frames that shouldn't exist anyway. Change-Id: I3cc82c13bfc06960b827aefc64f5b5b12520955a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117851 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-06-25tdf#124176 Use pragma once instead of include guardsHarshita Nag
Change-Id: I5f0342f07f9227e45ef12c3c76015aeee4c2a0c7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117833 Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> Tested-by: Jenkins
2021-06-25NFC: cleanup unnecessary variables, reduce scope.Justin Luth
This function look a LOT different way back at original import, and some of the refactoring since then left things a bit messy. The impetus for changing this was to see how m_nListLevel was being used, and having it assigned to a temporary const variable for no reason was annoying. Change-Id: Ia25397dbe4bce2fd7bdfbb1b3053bd271c08212a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114404 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org>
2021-06-24tdf#120629 ms formats: better exporting of hindiVowels etc.Justin Luth
The big problem was that hindiVowels was imported as CHARS_NEPALI, but CHARS_NEPALI was not exported in DOCX. Another easy win was to DOC export both LO forms of russianLower and both forms of russianUpper - just like DOCX. The page number field only allows a subset of formats. LO doesn't have support for Hex or DollarText formats. The Ordinal/Cardinal formats were an easy win for export, even though they don't import. [Import seems to be in ww8par5.cxx's GetNumTypeFromName(), except that is being passed an empty string.] Change-Id: I176a70e0e05967414337c17d8b4acc87e20ead73 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117793 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org>
2021-06-24tdf#104239 doc import: accept outlineLvl0 == (listLvl = MAXLEVEL)Justin Luth
If listLvl is undefined, it is treated as level 0, so when testing that outlineLvl is equal to listLvl, then consider MAXLEVEL to be equivalent to zero. The opposite is not true. An undefined outlineLvl is not considered to be level 0. This doesn't fix bug 104239, but it is one step in the right direction. Two unit tests followed this path, (transparent-text.doc and tdf80635_pageLeft.doc) but neither one sets a numbering style, so they don't make good unit tests. Change-Id: I62cd7f5500fcd6dc06327900c33f12c129610a04 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117745 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org>
2021-06-24tdf#46626 Don't include footnote numbers in Navigator headingsJim Raykowski
Change-Id: I8c655c6ed1e1d05407dac27ef19f26c6ca8d8d54 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117692 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com>
2021-06-24should be using upper_bound hereNoel Grandin
after commit 1feb59c3dd9e5f714ce894f8de31bbb6869c9f3b Change-Id: I5dde1a776c11b9755e33cd7ccae54f29045b5ea1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117697 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-06-24tdf#135316 bypass 'existing style' check when importingNoel Grandin
trust the import filter to have already de-duplicated styles Shaves 5% off my load time Change-Id: I36b5196762483f629a38e00156d2fe9a1cb28c97 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117759 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-06-24tdf#123405 doc import: inherit from all Outline stylesJustin Luth
Good - an example document that proves that inheritance needs to happen with more than the first 9 items which contain the Heading styles that are most often associated with Chapter Numbering. Change-Id: I69ab1dd3fdab4d54695d9b321b0d2970509090a6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114403 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org>
2021-06-24Revert "uitest: guard create_doc_in_start_center"Xisco Fauli
This reverts commit 374baf308979306aa35575118c40ccd7caae1e29. Many uitests are failing randomly in jenkins for no apparent reason Change-Id: I5960330fab4967518bfeea32b3b8c5f8bfbea57e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117752 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-06-23Resolves tdf#121158 - Placement issues on page sidebarHeiko Tietze
Change-Id: I4e13ca9eac9c86f08c869c8fa9d3fb346c2aa2d2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117710 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2021-06-23tdf#106541 doc import: allow listLevel to be inheritedJustin Luth
RegisterNumFormat always ran earlier since it forced the listLevel to be in the valid range. So that can automatically be simplified. Secondly, just because the listLevel was not specified doesn't mean that it will be a level 1. It could inherit a listlevel from the style. So just leave it as undefined here, and let it be handled later on. ww8export's testListNolevel already ensures that SetStylesList must handle unspecified listLevel. chapterNumberingTortureTest21.doc matches the assert, so I have found my document, but this already works. Change-Id: Idf8850980b92054104c16200b2dea6bd7dde1f46 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117481 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org>
2021-06-23tdf#120629 doc {im,ex}port: accept known numberingTypesJustin Luth
I cross-checked with what was imported via DOCX and took inspiration from tdf#141341 to consolidate these two nearly-identical functions that otherwise would need to be kept in sync (and never are).. Change-Id: I7e021d7c9d68597da5b0ce1311ae243fc003e4f7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117736 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org>
2021-06-23cid#1401328 Uncaught exceptionCaolán McNamara
Change-Id: Ie3c938992a5c1e7aab3d7ae32f4169d04225195a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117707 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-06-23simplify SwFormatsModifyBase::ContainsFormatNoel Grandin
can just call IsAlive Change-Id: I7cd3b33520261b68d549783cabd5cf3f6f4847a3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117696 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-06-23tdf#92525 tdf#142398: fix export of simple custom shapesAttila Bakos (NISZ)
Most of the custom shapes were exported with DrawingML custom geometry instead of DOCX preset shapes, losing their preset type, adjust handles and text position. Add a preset exporter class to handle all possible preset shapes later, and fix the export of the following shapes now: "bevel", "blockArc", "bracePair", "bracketPair", "hexagon", "octagon", "parallelogram", "plus", "roundRect" and "triangle". tdf#92525: keep text position in triangles with different adjustments, too. tdf#142398: part 1: export simple shapes as preset shapes. Change-Id: I6aee74f7670bea8c1fe5909cbf307778ea728669 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115606 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2021-06-23Fix typosAndrea Gelmini
Change-Id: Ia1d0c358868e899e121b8331fad17ce36d454f10 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117668 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-06-23optimised FindFormatByName for SwFrameFormatsNoel Grandin
by re-arranging the boost::multi_index key, we can re-use that index to find all formats matching a name Change-Id: I3b3b6ceb7137926be3981578a64052f47f279af0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117676 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-06-22uitest: guard create_doc_in_start_centerXisco Fauli
Mostly done by a script for motivation, see 89aaa17a0a4413f07da2bc5084b0164f15dc01ac < UITest: introduce guarded context managers > Change-Id: I75ef7712af3676363a9a464acf83f6f68ffc4f85 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117617 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-06-22Move SwDoc::FindFormatByName to SwFormatsBaseNoel Grandin
in preparation for adding optimised implementations of it for subclasses Change-Id: I6d8ff54864d2d3c605a1cd0b4da2c6136e2a21cb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117672 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-06-22SwFrameFormats::rangeFind does not, in fact return a rangeNoel Grandin
because the index it relies on, is a unique index. So make this explicit in the method call by returning a normal iterator. Change-Id: I428d1b14d1274079955eb4f893ca91d1745264e7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117673 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-06-22tdf#106541 doc import: prevent inheriting when LFO == 0Justin Luth
When LFO == 0, that is a special case that means that numbering should be disabled. (This can similarly be accomplished by setting Lvl to 9 - Body text, except doing so here could mess up Lvl inheritance). If the LFO is a negative number, that indicates something different with formatting that we don't currently handle, but it still means cancel numbering. So at this point just treat them all the same as if they were LFO 0. Change-Id: I1bab06c6b766175a3982bf3a7b19f7b321df807e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117480 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org>
2021-06-22uitest: guard load_fileXisco Fauli
Mostly done by a script for motivation, see 89aaa17a0a4413f07da2bc5084b0164f15dc01ac < UITest: introduce guarded context managers > Change-Id: Ia924293dc2a12230fd13f69fd734875ced86be8a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117593 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-06-22configure: Improve help-options handlingJan-Marek Glogowski
This patch includes: * A README.help.md as a general documentation for the different help types, the LO code and help-related build options. * Adds --disable-xmlhelp for removing the xmlhelp support from the build. Disable for iOS, Android and Emscripten. This was partly included in HAVE_FEATURE_DESKTOP before. * Rename WITH_HELP define to WITH_HELPPACKS, which reflects the actual usage AFAIK. * Depend --with-omindex on --with-help=online and don't override the --with-help setting. Error out on conflicting options. * Depend --with-helppack-integration on build help variants, which actually result in help packs. Kind of reverts commit 2c38ea6d16b910294220cefaf8ae6a0683e6405a ("Building without --with-help is not supposed to disable help functionality"). Change-Id: Ie4cb73905b3ed94e991d9f1bd75cfbd6de9da385 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116222 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2021-06-22cid#1486261 Dereference before null checkCaolán McNamara
since... commit 2e6e87decdb87221a7b832958e03195b1d8fc133 Date: Mon Jun 21 13:18:00 2021 +0200 replace dynamic_cast<SwLayoutFrame> with cheaper check Change-Id: I4623e3eca5a82fa37f52697c189310a835fc76e0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117614 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-06-22cid#1486260 Uncaught exceptionCaolán McNamara
Change-Id: I12613ed381e961fd36348eabd543b11a1960337d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117613 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-06-21gtk4: GtkPicture triggers some sort of unexplained vertical expandCaolán McNamara
an intermediate horizontal GtkBox works to stop the propogation Change-Id: I9fd51c3968c463c7b872b7a12bc3960602d0b025 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117596 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-06-21create SfxHintId::SwLegacyModify idNoel Grandin
to avoid expensive dynamic_casts in writer Change-Id: Ic73ae7d4af985043f8533913b33939e3445ec7de Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117586 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-06-21related tdf#81705 doc export: eliminate duplicating OutlineNumberingJustin Luth
It just looks redundant. And all three formats handle it very different. RTF - never writes RES_PARATR_OUTLINELEVEL or RES_PARATR_NUMRULE in styles, only via this OutlineNumbering. DOCX does nothing. That's because there always seems to be a RES_PARATR_OUTLINELEVEL and RES_PARATR_NUMRULE. DOC does BOTH. It writes RES_PARATR_NUMRULE (and now also writes RES_PARATR_OUTLINELEVEL) and also writes them via OutlineNumbering. So OutlineNumbering seems to always have been partially redundant and now is fully redundant. Thus it can be treated like DOCX. Change-Id: Ib9fd32c440e0151b462d6499a60952f120887082 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113452 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org>
2021-06-21replace dynamic_cast<SwCellFrame> with cheaper checkNoel Grandin
Change-Id: I672be703fb097c71303434127d832681843607e2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117580 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-06-21sw: add BIRT layout test documentMichael Stahl
This nested table is an example that was broken by commit 91b2239783dc716bd71ce7962bfd7e341dfe4175 - if loaded with a wide window, it goes into layout loop; if loaded with a tall window size where page 2 is visible, strangely it doesn't loop. Change-Id: I5e73cfcd928ff1a321667c1a75b0ba7f348d4b77 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117587 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-06-21bundle the FolderPicker instantiations behind a single callCaolán McNamara
in prep to add parent support Change-Id: I2aa4b9343f895ae866f600dd3260b7fdc4e1efec Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117579 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-06-21replace dynamic_cast<SwFlyFreeFrame> with cheaper checkNoel Grandin
Change-Id: Ia84984e47c60eb8407bbddaf9e3365d9f7f52311 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117581 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-06-21replace dynamic_cast<SwLayoutFrame> with cheaper checkNoel Grandin
Change-Id: I2102d27fe2b38e3787e39a2b7234991a57c30d99 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117578 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-06-21tdf#116501 sw: layout: check for flys in SwTabFrame::ShouldBwdMoved()Michael Stahl
On loading, this hits loop control warn:legacy.osl:580715:580715:sw/source/core/layout/layact.cxx:543: LoopControl_1 in SwLayAction::InternalAction This is because there's a fly frame 404 anchored at the last text frame 353 on page 2 inside the nested table 347. ShouldBwdMoved() sees that there is space on the bottom of page 2 and hence the follow flow row joined, but then it immediately splits again in the same way as before due to the fly with WrapTextMode_NONE. But then the outer table's cell 273 (upper of 347) is invalidated again, hence the loop. Try to check for overlapping flys in SwTabFrame::ShouldBwdMoved() by reusing CalcFlyOffsets(), which is ... not quite ideal, but perhaps better than copy-pasting half of it to a new function. This should have less side effects than the previous fix, but a problem remains that clicking on the shape on bottom of page 2 causes the layout to go wonky, but that was also the case with previous fix. Note there's a check of SwLayouter::DoesRowContainMovedFwdFrame() there already, but that doesn't help because it will only detect when the fly itself was moved forward, but in this case the fly remains on the page. Also likely it wouldn't be a good idea to move a text frame forward if the only thing of it that fits on a page is an anchored fly (i.e. its follow has mnOffset=0) because that can be intentional. Change-Id: I0376f7dcb784c006990336233c97f5093aaccb77 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117473 Tested-by: Jenkins Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>