summaryrefslogtreecommitdiff
path: root/sw
AgeCommit message (Collapse)Author
2022-06-30tdf#147199: sw_uiwriter3: Add unittestXisco Fauli
Change-Id: I86fa740fd69e14afcb2effaa091db2b22477a7cb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136680 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-06-30tdf#132293 remove unused imports and unused variables in swm.hashemian
Change-Id: I00ae07a9d02e834de34f8dd7a7f53f0c68490832 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136627 Tested-by: Jenkins Reviewed-by: Hossein <hossein@libreoffice.org> Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-06-30tdf#131304 .doc: provide compatibilityMode value for .docxJustin Luth
In case a .doc file will be exported as a .docx format, populate the appropriate compatibilityMode setting. 11: Use features specified in MS-DOC. Change-Id: I5c03d2f7aed9d5fa2577853908d05d88ddf4c122 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90437 Tested-by: Jenkins Reviewed-by: Justin Luth <jluth@mail.com>
2022-06-30tdf#tdf#93747 tdf#145151 sw IsTableMode: revert obsolete one-offsJustin Luth
I started playing whack-a-mole, patching functions for excessively selected cells. But now bug 145151 has fixed the selection process itself, so these avoidance clauses are now obsolete, so revert these 7.3 or 7.4 fixes. This keeps the unit tests in make CppunitTest_sw_uiwriter5 Change-Id: Ie7848b483d495d79c046b9f4293b605d2edea658 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136578 Tested-by: Jenkins Reviewed-by: Justin Luth <jluth@mail.com>
2022-06-29cid#1506710 Unchecked return valueCaolán McNamara
Change-Id: I703b6eaaaf4381aeafdf9c616dffe871f82caafe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136600 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-06-29tdf#145151 tdf#119540 sw IsTableMode: deselect unselected cellJustin Luth
So far I have been playing whack-a-mole fixing the case where selecting table cells backwards leaves one cell seemingly still selected when applying paragraph properties. This patch seems to fix the underlying selection problem, meaning that the other patches can be reverted, and their unit tests become proof for this patch. Change-Id: I8d8a47333ab70917fccb80ff5e96c50302c386ea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135569 Tested-by: Jenkins Reviewed-by: Justin Luth <jluth@mail.com>
2022-06-29Revert "tdf#43100 tdf#104683 tdf#120715 sw: cursor on spaces over margin"Stephan Bergmann
This reverts commit 7ef9c3ef30023cc40068e1f735aa4bec4811288b (plus relevant part of c08d71a0e0015ec7857335b68a354df04fa04a0c "Fix typos" follow-up). It started to cause <https://ci.libreoffice.org/job/lo_ubsan/2441/> to fail with > /sw/source/core/text/itrcrsr.cxx:1659:50: runtime error: downcast of address 0x60700059b250 which does not point to an object of type 'SwTextPortion' > 0x60700059b250: note: object is of type 'SwHolePortion' > 00 00 00 00 90 23 40 a7 6f 7f 00 00 e1 03 00 00 00 00 00 00 0d 01 00 00 00 00 00 00 00 00 00 00 > ^~~~~~~~~~~~~~~~~~~~~~~ > vptr for 'SwHolePortion' > #0 0x7f6f9f1777f0 in SwTextCursor::GetModelPositionForViewPoint(SwPosition*, Point const&, bool, SwCursorMoveState*) const /sw/source/core/text/itrcrsr.cxx:1659:50 > #1 0x7f6f9efc2b39 in SwTextFrame::UnitDown_(SwPaM*, long, bool) const /sw/source/core/text/frmcrsr.cxx:1200:49 > #2 0x7f6f9efc5b50 in SwTextFrame::UnitDown(SwPaM*, long, bool) const /sw/source/core/text/frmcrsr.cxx:1298:31 > #3 0x7f6f9be4bac8 in SwCursor::UpDown(bool, unsigned short, Point const*, long, SwRootFrame&) /sw/source/core/crsr/swcrsr.cxx:2062:31 > #4 0x7f6f9bf0692b in SwShellCursor::UpDown(bool, unsigned short) /sw/source/core/crsr/viscrs.cxx:1025:22 > #5 0x7f6f9bb840c0 in SwCursorShell::UpDown(bool, unsigned short) /sw/source/core/crsr/crsrsh.cxx:511:29 > #6 0x7f6fa37f131d in SwCursorShell::Down(unsigned short) /sw/inc/crsrsh.hxx:359:50 > #7 0x7f6fa37dcfc9 in SwWrtShell::Down(bool, unsigned short, bool) /sw/source/uibase/wrtsh/move.cxx:171:27 > #8 0x7f6fb6aa1325 in testTdf43100_CursorMoveToSpacesOverMargin::TestBody() /sw/qa/core/text/text.cxx:532:20 during CppunitTest_sw_core_text CPPUNIT_TEST_NAME=testTdf43100_CursorMoveToSpacesOverMargin::TestBody Change-Id: I37947825ec9db826446ed28fa87a23ee60749b82 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136549 Reviewed-by: László Németh <nemeth@numbertext.org> Tested-by: Jenkins
2022-06-29tdf#149550 sw: fix crash by implementing nested textbox copyAttila Bakos (NISZ)
Grouped shapes with a nested textbox were copied without the textbox with frequent crashing. Regression from commit 2951cbdf3a6e2b62461665546b47e1d253fcb834 "tdf#143574 OOXML export/import of textboxes in group shapes". Change-Id: Ie2cc24f10706d8999026dc92ebad21f2c5673003 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135815 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2022-06-29CppunitTest_sw_ooxmlexport17: avoid mustTestImportOf()Miklos Vajna
Can use CPPUNIT_TEST_FIXTURE() instead. See commit a226cec52e536c46e03f57a5f1f7931abbeb0cdd (CppunitTest_sw_rtfimport: convert one testcase to use CPPUNIT_TEST_FIXTURE(), 2019-11-05) for motivation. Change-Id: I12ac2b9764f270ecc516439c58a017bd61e87897 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136587 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2022-06-28tdf#134328 avoid some dynamic_castNoel Grandin
Change-Id: I6de30e50d9797090e7fdb3f46ad78552c5d406cb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136567 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-06-28tdf#115524 sw_redlinenum: show original numbering of insertionsLászló Németh
in Show Changes mode, according to the name "Show Changes" and according to the interoperability requirements. Follow-up to commit 2413f213625253a9c2b1787b3b9fe859d724a9bd "tdf#115523 sw_redlinenum: show correct, also original numbering" and commit d3b0fb222f96964d7bd2b82fe20e1547f731b7a6 "tdf#149710 sw_redlinenum: update numbering at deletion". Change-Id: I32476baa3daa73b48f9398282cbe7837d95b0a04 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136562 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
2022-06-28sw: document UndoManagerMiklos Vajna
Expand on why we store SwNodes in the undo manager if they are not part of a document. Change-Id: Ibfb03c7bbffcf2e4fe90ec62e0523a6afe8250b8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136514 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2022-06-27sw: avoid divide by zero in SwTextGridPage::CharorLineChangedHdlCaolán McNamara
See https://crashreport.libreoffice.org/stats/signature/SwTextGridPage::CharorLineChangedHdl(weld::SpinButton%20&) disable the offending widget if the value is zero. crash reproducible under gen with CJK features enabled by: format, page style, text grid, grid (lines and characters), max base text size of 1000 and then click in "characters per line" and then click in "lines per page". Change-Id: Ic0f8131955ab01412dd54bdd5d3bffe518938fb5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136489 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-06-27tdf#149668 sw: fix DOCX->ODT: Multilevel lists causing list numbering resetMiklos Vajna
The bug document had an outer (ordered) numbering and an inner one, finally the outer numbering was continued. This was fine after DOCX import, but once we saved to ODT and re-opened, the second outer numbering was restarted, not continued the first outer one. This happened because on one hand, lcl_SwXParagraph_getPropertyState() says that the state of the ListId property is "default" if the paragraph's item set doesn't have a RES_PARATR_LIST_ID, but on the other hand xmloff/ will only write the xml:id="..." attribute on a list if the ListId state is not default. This is a problem, because it can happen that xmloff/ refers to a list later by its id, even if the list doesn't have a RES_PARATR_LIST_ID set. Fix the problem by relaxing the condition where lcl_SwXParagraph_getPropertyState() reports FN_UNO_LIST_ID as non-default: just require that that the text node has a numbering rule + the numbering rule has at least one continue list. This fixes the reported DOCX -> ODT case with named list styles and keeps the original ODT import and HTML import use-cases working to not write un-referenced xml:id="..." attributes on export. This was a regression from commit 8f48f91009caa86d896f247059874242ed18bf39 (ODT export: omit unreferenced <text:list xml:id="...">, 2022-03-10). Change-Id: I300ebe7aa7da71a336c03abe7530074b696417f7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136477 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2022-06-27sw: prefix members of ww8toolbarMiklos Vajna
Kme, MCD, MacroName and MacroNames See tdf#94879 for motivation. Change-Id: Ida3a41b22887f5a21b3be48665fa722d4ff2b027 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136449 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2022-06-27tdf#149279 SwNavigator enhancement to show at least two headingsJim Raykowski
above tracked heading For gtk3, treeview scroll_to_row to a visible collapsed row makes the row expanded. The sal version does not. To make the behavior consistent, the patch removes the call to gtk_tree_view_expand_to_path which causes a visible collapsed row to expand. Change-Id: I29e67535ab23aa1952b4ff97c1b81276794b8036 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136436 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com>
2022-06-24Fix typosAndrea Gelmini
Change-Id: I48d173ab697425bcff663f7f7d0bbc404a950bb2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136402 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-06-24tdf#149710 sw_redlinenum: update numbering at deletionLászló Németh
in Show Changes mode. Follow-up to commit 2413f213625253a9c2b1787b3b9fe859d724a9bd "tdf#115523 sw_redlinenum: show correct, also original numbering". Change-Id: Iebf54775f3850e668ac5b12ecbd9f010b4e93ee4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136363 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
2022-06-24tdf#43100 tdf#104683 tdf#120715 sw: cursor on spaces over marginAttila Szűcs
Allow cursor movement on spaces over margin (or clicking it it to position the cursor), like MSO does instead of stopping cursor before the stripped (from the typesetting) spaces. This way it's possible to follow the modification of these characters, e.g. removing spaces or inserting other characters at the cursor position. Follow-up to commit 8741fd0e0ae9e346de2e09887f0668b831c9b48b "tdf#43244 sw: show stripped line-end spaces on margin". Details: extend SwHolePortion to calculate its width, that can be used for cursor movement, even over the right margin. Removed some code that not allowed cursor to be positioned over the right margin. Layout calculation uses m_nWidth variable (that was 0) to make frames. To keep the layout unchanged, this new width calculated into m_nExtraBlankWidth temporarily, and this extra width is added to m_nWidth only after the layout calculation is finished. (Ideally this 2 width values could be stored and used separately, but that would require a bigger refactor of the cursor calculation.) Known regression: lost selection at Search & Replace, e.g. searching double spaces: there was a narrow selection at end of the line showing the position. Other issues: when a different character inserted on the margin resulting new line break, space formatting marks aren't updated according to the less spaces. Removing the inserted character by Backspace results losing of the cursor movement on the spaces. Co-authored-by: Tibor Nagy (NISZ) Change-Id: I94b4ed40b8c560e1ef32f4d0d3537e070c08666f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135895 Reviewed-by: László Németh <nemeth@numbertext.org> Tested-by: László Németh <nemeth@numbertext.org>
2022-06-24Related tdf#143055 - Grid and Snap to Grid on Drawing toolbarHeiko Tietze
Change-Id: Ie04010d3bd0af65bcbb1f8c01a36878b2c9088ea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136358 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2022-06-24tdf#132781 DOCX: export interoperable hyperlink style namesTünde Tóth
Similar to the paragraph styles, export default character style names instead of the localized ones to avoid e.g. not interoperable hyperlinks in MSO. Change-Id: I65678a564ae4e73a1d8319df364defd698381256 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136139 Reviewed-by: László Németh <nemeth@numbertext.org> Tested-by: László Németh <nemeth@numbertext.org>
2022-06-24sw: fix crash in SwLayoutFrame::GetContentPosXisco Fauli
FindPageFrame might return nullptr See https://crashreport.libreoffice.org/stats/signature/SwLayoutFrame::GetContentPos(Point%20&,bool,bool,SwCursorMoveState%20*,bool) Change-Id: Ic69d26de4ab234ebd6283ace640d689f0ebe8eb3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136307 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-06-24tdf#115523 sw_redlinenum: show correct, also original numberingLászló Németh
in Show Changes mode, according to the name "Show Changes" and according to the interoperability requirements. Instead of the fake numbering which counted the deleted list items in Show Changes mode, e.g.: "3. This was the third originally, but now it's the second list item." now show the correct number followed by the original number within braces: "2.[3.] This was the third originally, but now it's the second list item." Note: the tabulators after the longer numbering are replaced with spaces to avoid messy indentation in Show Changes mode. New enum values for the alternative lists: SwListRedlineType::SHOW - the original (fake) numbering in Show Changes mode SwListRedlineType::HIDDEN - the original numbering of Hide Changes mode, and new numbering in Show Changes mode SwListRedlineType::ORIGTEXT - the new numbering of Show Changes mode to show the original numbering of the deleted or inserted list items Follow-up to commit c180c9447256588fe5e7991e06642883574760ae "sw_redlinehide_3: add second SwNodeNum to SwTextNode". Change-Id: Ieaca550561c5d5a7ac5d9defb9c7fa283d6aa674 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136313 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
2022-06-24CppunitTest_sw_layoutwriter: use more SwParaPortion::dumpAsXml()Miklos Vajna
See commit feeed3e762cf077fbd9cf48f82e949365108ccc1 (CppunitTest_sw_layoutwriter: avoid some a11y-based layout testing, 2022-04-07) for motivation. Change-Id: I8d621a735cb269d9d3ab425351af7b2b7052a3e1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136349 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2022-06-23tdf#149615: "No list" twice in Outline & Style tab (non English UI only)Julien Nabet
Change-Id: I8a983b62175ed00ca8817556bd3e55fc87ddc9d7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136110 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-06-23uitest: remove printXisco Fauli
Change-Id: Idce371f8f7bf1c2bb46616c21c16afee6c10cedc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136293 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-06-22tdf#134759 sw: do CopyToModify() for both start and end nodeMichael Stahl
... in SwNodes::MoveRange(). SwRangeRedline::Hide() does CopyToSection()/DelCopyOfSection() so the previous commit fixed it, and SwRangeRedline::Show() does MoveFromSection() so hopefully this should fix it to restore the situation before hiding. This caused several tests to fail, and the reason appears to be that they pretty much tested exactly the problem that's being fixed with this commit, but the pre-existing fixes and the new one cancel each other out. In all cases the pre-exising fix moves all redlines and moves them back again, which is the sort of thing that sw_redlinehide wanted to get rid of; not sure why i didn't notice this earlier. The check for the 3rd paragraph where the style was applied still succeeds with the new bugfix, but the one for the 1st paragraph fails; it is unclear why applying a style to the 3rd paragraph should have an effect on the 1st one. Hence: Revert code changes of commit 1d65ffc5a37be21e0316019b1c96eb9a1c871ac0 "tdf#105413 track changes: keep paragraph styles" Revert code changes of commit d97fc64a819f834302e384792668507df4cc412c "tdf#122893 track changes: keep paragraph alignment" Revert code changes of commit 6a54dd844d1821165642bbcc16bd12a01a23393d "tdf#122901 track changes: keep paragraph top and bottom borders" Change-Id: I0b70134902a7993c7bb11a3c619e45742764c8ae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136056 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2022-06-22sw: fix crash in SwEditWin::MouseButtonDownXisco Fauli
Since GetPageAtPos might return nullptr See https://crashreport.libreoffice.org/stats/signature/SwEditWin::MouseButtonDown(MouseEvent%20const%20&) Change-Id: I4ad3492ef46bcd7b263a4de92efd9439a966fb56 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136279 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-06-22Remove a dumpAsXml that looks like a debugging leftoverStephan Bergmann
...left behind by d4123356c61db269651e950a0a2cc93e6d801c90 "RTF filter: allow measuring page borders from the edge of the page" Change-Id: Ib97061746e8f4ba988af7c7520b1e7e0c3e6cdce Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136276 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-06-22CppunitTest_sw_ooxmlexport16: avoid mustTestImportOf()Miklos Vajna
Can use CPPUNIT_TEST_FIXTURE() instead. See commit a226cec52e536c46e03f57a5f1f7931abbeb0cdd (CppunitTest_sw_rtfimport: convert one testcase to use CPPUNIT_TEST_FIXTURE(), 2019-11-05) for motivation. Change-Id: I82403120433e69221e3533e371e53b92470f6325 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136256 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2022-06-22Make code a bit more explicitStephan Bergmann
...and avoid the ugly unsigned short vs. SvxAdjust mismatch Change-Id: Ie820b5fda00942d258668535598027f9d878c013 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136264 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-06-21Use proper type for aSvxToUnoAdjustStephan Bergmann
...following up on a comment in the commit message of 37ec4442d70339dc8ec5fb8e4ec8984420b6e14d "o3tl: ensure that the initializer of enumarray contains enough elements": "In sw/source/core/unocore/unosett.cxx with its odd mix of saL_Int16 and USHRT_MAX, lets keep things that way for now (probably awaiting later clean up) and use casts to avoid the implicit narrowing." The USHRT_MAX values always mapped to -1 when the elements of aSvxToUnoAdjust are used to initialize sal_Int16 nINT16 later on, so make that explicit here (but an explicit cast from int to sal_Int16 is still needed for them, to avoid narrowing failures from within the enumarray ctor). Change-Id: Ib401ff94c429f8415199a5d35997d17266e04279 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136262 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-06-21End listening and clear active shell when the dying shell view is theJim Raykowski
active shell view Corrects listening not being ended. This patch is based on the code in SwContentTree::Notify to end listening and clear the active shell when the dying shell view is the active shell view. Change-Id: Ic51e8b5355668e3bd133a8370eeb407694cc9e30 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135034 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2022-06-21tdf#128150 Only show "Use background" btn in Impress & DrawSamuel Mehrbrodt
Change-Id: I5d14f651af55b51a8a02a8a4ddbb1c0921b15d81 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136182 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
2022-06-21vcl: rename mnExtraData to mnRendererIdChris Sherlock
The name "extra data" doesn't really describe what this field does. What it actually does it to specify what animation renderer should be used. Change-Id: I1e705ba89d09ceb41a8649c8947225c7b6816e7a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/76403 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-06-20tdf#140967 docxexport: hairline is default and not a specific valueJustin Luth
This effectively is treated as a zero, although I didn't find any documentaiton that indicated what is supposed to happen when a:ln has no w=. Otherwise these numbers are normally in the thousands, and not "2". Change-Id: I9dd6a334e88feb9a2bafe29f92229b6cfdff9747 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135674 Tested-by: Jenkins Reviewed-by: Justin Luth <jluth@mail.com>
2022-06-20SfxStyleSheetBasePool::Find can be constCaolán McNamara
Change-Id: I5cf2737d05cfe4b0be936a77cfb96db053483438 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136141 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-06-20SwDoc::IsUsed(const SwNumRule&) can be constCaolán McNamara
Change-Id: I9966c2d71670d53375e27090e1ad3dffb780f81e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136143 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-06-20fix SwViewShellImp::AddPaintRect() for sub-rects (tdf#146536)Luboš Luňák
Using just two corners to build the new resulting rect works only if the new rectangle actually really extends the previous one, but the <= means that this may compress also rects that are already contained in the previous rect, in which case it's necessary to make sure to use union to get the larger coordinate). Change-Id: Ie4303dfef903bded6d63625531e424a32cc01b06 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136144 Tested-by: Luboš Luňák <l.lunak@collabora.com> Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-06-20sw: prefix members of Acd, Customization, MSOWordCommandConvertor and ...Miklos Vajna
... Sttb See tdf#94879 for motivation. Change-Id: Ifc5637a97fced3a4bbab64b4ef9784cb4f586694 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136135 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2022-06-19ofz#47706 TimeoutCaolán McNamara
2m34s->1.6s Change-Id: I2370237e07d6e2a45c831c70ac1c1158efef7816 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136107 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-06-19sw: prefix namespace Justify with sw.Mark Hung
Change-Id: Ia813b93dc719a5715804aa06b555c99eaf99b039 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135594 Tested-by: Jenkins Reviewed-by: Mark Hung <marklh9@gmail.com>
2022-06-18o3tl: ensure that the initializer of enumarray contains enough elementsMichael Stahl
Currently this silently succeeds. Turns out oox already contains some too-short initializers, let's guess the missing properties are all invalid. One downside of the templated parameter pack approach in the enumarray ctor, as witnessed in vcl/win/window/salframe.cxx, is that argument types can no longer be implicitly deduced and thus need to be spelled explicitly now in certain cases. There were also three uses of enumarry with V being unsigned short (aka sal_uInt16) that started to cause narrowing conversion errors now and needed to be adapted: In editeng/source/uno/unonrule.cxx the obvious fix was to use the proper type for V. In sw/source/core/unocore/unosett.cxx with its odd mix of saL_Int16 and USHRT_MAX, lets keep things that way for now (probably awaiting later clean up) and use casts to avoid the implicit narrowing. And in sw/source/filter/ww8/wrtw8esh.cxx the ESCHER_Prop_* values, while presumably conceptionally of type sal_uInt16, are plain #defines (thus of type int), so rather than changing V to int it looked more consistent to explicitly cast the ESCHER_Prop_* vlaues to sal_uInt16. (And in tools/source/fsys/urlobj.cxx the poor loplugin:redundantfcast started to unhelpfully kick in for (only) the first argument now.) Change-Id: If06c29e673ec7e565e283c6f447889cf1f777cb7 Co-authored-by: Stephan Bergmann <sbergman@redhat.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135970 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-06-17CppunitTest_sw_layoutwriter: use more SwParaPortion::dumpAsXml()Miklos Vajna
See commit feeed3e762cf077fbd9cf48f82e949365108ccc1 (CppunitTest_sw_layoutwriter: avoid some a11y-based layout testing, 2022-04-07) for motivation. Change-Id: I0336c35df7b9b9d1704cc6611b8ffe1f111977a6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136004 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2022-06-16tdf#134759 sw: clear items in SwAttrSet::CopyToModify()Michael Stahl
Setting new items but not clearing existing items smells like an obvious omission. Why would we want a union of two nodes' items? This improves things a bit for the bugdoc, but now it ends up with a different wrong list on the node 254. Change-Id: I3f5db0a4f81ac6e9af56d1faaefc2cb107dff597 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131841 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2022-06-16tdf#149524: fix crash in Writer after a label has just been createdJulien Nabet
see bt here: https://bugs.documentfoundation.org/attachment.cgi?id=180683 Change-Id: Iba461ffe65392a7e0e779f68d1f0737a444ae724 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135675 Tested-by: Jenkins Tested-by: Heiko Tietze <heiko.tietze@documentfoundation.org> Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org> Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-06-16sw HTML export, XHTML mode: fix lost <li> with a list header + itemMiklos Vajna
There is a general mismatch between XHTML and Writer lists: XHTML can only contain list items (for ordered or unordered lists), while Writer can contain list headers and list items. List headers have no bullet or number at the start, list items are the normal text nodes. Commit 8c2607ae3ce143586e623532b8ae5288277ec3ac (sw HTML export, XHTML mode: fix lost </li> when last list item is not numbered, 2022-02-21) fixed the list item end side of this problem: if all text nodes in a list are headers, then don't write ul/ol at all, otherwise end list headers with </li> as well to make sure the output XML is valid. However, this created a mis-match, the starting <li> for list headers in a list which have non-header text nodes at as was not adapted. Fix the problem by extending OutHTML_SwFormat() so list headers in a list with non-header text nodes always have a <li> and </li>, and this condition is the same on the start/end side. Calculating if at least one text node is non-header in a list may not be cheap, so reuse the already calculated info from OutHTML_NumberBulletListStart() in OutHTML_SwFormat(). Change-Id: I3817a489f16166fc5b4c33ee64e2283c41a4402c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135999 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2022-06-16tdf#128150 Add OOXML import/export for "use background fill"Samuel Mehrbrodt
and allow editing this fill property in area dlg Change-Id: Ic63ba11e9d499d4a0fb22f6739587e3e25140b8f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134406 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
2022-06-16tdf#149089 snap to grid if IsSnapToChars() is falseMark Hung
for non-CJK scripts. Non Asian text was centered within as many cells as required according to ODF1.2 20.301. But it also required that text should be snapped to grid if style:layout-grid-snap-to is true ( i.e. IsSnapToChars() is false ) per ODF1.2 20.305. That means ODF1.2 20.301 ruled. This patch changes the width of inserted SwKernGridPortion so that non-CJK text aligns to the edge of text grid to make ODF1.2 20.301 rule, an provide more consistent layout result as expected. Change-Id: Id6b4d2b965e20670eb9ddf657d36b8a49073f32a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135654 Tested-by: Jenkins Reviewed-by: Mark Hung <marklh9@gmail.com>
2022-06-16tdf#125040 Recreate Contextual Single for WriterMaxim Monastirsky
Change-Id: I791631aedb9efbb7bbdc41234ee39e1d3c834ce1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135959 Tested-by: Jenkins Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>