summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Update documentation accidentally missing from previous commitdistro/cib/libreoffice-6-4Stephan Bergmann5 days1-2/+2
| | | | | | | | | | ...951e255ac70fc64726012ac13d521010f24b255e "Allow overriding crash report dialog texts" Change-Id: I4cc7ce4ce911871bffa0979a12e55dc0f3f73374 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166128 Tested-by: allotropia jenkins <jenkins@allotropia.de> Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
* Allow overriding crash report dialog textsStephan Bergmann5 days2-1/+44
| | | | | | | | | | | | | | | | | | ...building on fb6cbbdcefbcc526405f517677a3214b4292b39e "Adapt crash submitted dialog", which had already modified the dialog somewhat. (The two new configuration properties are marked as non-nillable, even though the default actually is nil. That way, the nil default causes no overriding of the dialog's content from the .ui file in any locale, while any non-nil strings for at least one locale will always cause those strings to be used, even as a last resort fallback for non-matching locales. Which is probably a better outcome here than falling back to the non-overridden .ui file content for non-matching locales.) Change-Id: I1028707f7aa1117c16ae6de131cd776ff96eeaa2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166126 Tested-by: allotropia jenkins <jenkins@allotropia.de> Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
* At least capture (English-only) cURL error when something goes wrongStephan Bergmann7 days1-0/+6
| | | | | | | | | | | | | ...so that svx/source/dialog/crashreportdlg.cxx can at least present that, instead of confusingly being silent about the error Change-Id: I5e8af5f8df4cbcad84f8b60c2de4c55621b28890 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166037 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de> (cherry picked from commit 324401ced3c2234903f9e0430a0380be968b492b) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165941 Tested-by: allotropia jenkins <jenkins@allotropia.de>
* New Expert Configuration setting to not offer Safe Mode in the UIStephan Bergmann8 days4-3/+35
| | | | | | | | | | | | | | | | | | | | | | | | /org.openoffice.Office/Common/Misc/OfferSafeMode (default: true), controlling: * "Help - Restart in Safe Mode..." menu entry * "Restart LibreOffice to enter safe mode" checkbox in the "Crash Report" dialog * "To start temporarily with a fresh user profile,..." tip of the day (It does not control the --safe-mode command line argument, though.) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165926 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de> (cherry picked from commit fe66cf8c8048bfd8a4386c0c711bd6912af9ec63) Conflicts: cui/source/dialogs/tipofthedaydlg.cxx framework/source/uielement/menubarmanager.cxx officecfg/registry/schema/org/openoffice/Office/Common.xcs svx/source/dialog/crashreportdlg.cxx Change-Id: I66084448a1ba9427aaafef630187b4bf25219a2c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165928 Tested-by: allotropia jenkins <jenkins@allotropia.de> Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
* ofz#67708 ignore oversized colspansCaolán McNamara2024-04-031-2/+10
| | | | | | | | | | | | that can't fit in SCCOL ignore negative colspan and rowspans too Change-Id: I79a010bcd7d9d84de70f6dac2e09614d6d448227 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165480 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> (cherry picked from commit b2c3ca63d28f7849d33d7a0c6436102fdbf6dbbb)
* ofz: negative column offsetCaolán McNamara2024-04-031-0/+5
| | | | | | | | | Change-Id: Ieeb06e5c5d28f1c457db369a732bc37a7d5f2be8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165419 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> (cherry picked from commit 3f8c81f3f9ba1e27c97894c73e8802e5fdecf94b)
* ofz#67540 negative offsetCaolán McNamara2024-04-031-11/+14
| | | | | | | | Change-Id: I498985962feb7d77c1a71af7002a85aa02aa3e65 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165189 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> (cherry picked from commit d2210a5b418e7cbdef9a0de0fe3d9fd91115eb49)
* tdf#157241 sw: assert when importing ToX in table in rhbz589883-2.docxMichael Stahl2024-04-031-6/+9
| | | | | | | | | | | | | | | | ndtbl.cxx:1417: SwNodes::TextToTable(): Assertion `!rNode.IsSectionNode()' failed. (regression from commit 62cb3b8b8d6106c6aeb073b12d84973a107182ef) Change-Id: Iec12282573cb914d1924f4da4a28e26e01b866df Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165164 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> (cherry picked from commit df6fdb0041f8bfd251a4b03030b8bc47f0614c36) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165172 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> (cherry picked from commit 921abac0a5a0caa46875db640e3432379a5bcfa7)
* tdf#157241 sw: fix crash on RTF paste or insert of nested tablesMichael Stahl2024-04-031-1/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | The problem is that there are tables with only empty cell frames in the layout, which causes a crash in IsAllHiddenCell() added in commit ab7893544dc6be6dc192dffefd57cd5ddd421c35. This happens because first inner tables are created, with layout frames because the layout already exists. Then when SwNodes::TextToTable() is called for the outer table, it deletes the SwTextFrames, but not the SwTabFrames/SwCellFrames, so they remain uselessly in the layout. Delete these too, they will be recreated when the frame for the outer table is created. Also the transfer of any existing break to the outer table was missing. Change-Id: Idc2bc1d4c6572702510ae4355e4015c42770eb3e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164788 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> (cherry picked from commit 62cb3b8b8d6106c6aeb073b12d84973a107182ef) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164814 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> (cherry picked from commit 56676a8cb6899f376d9893392700e096ad589bed)
* add notify for script useCaolán McNamara2024-03-291-0/+3
| | | | | | | Change-Id: I84af197cec7755f6803a578e1e21c03966ad5f3e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165412 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
* Best effort to create directories of SAL_LOG_FILEStephan Bergmann2024-03-252-0/+8
| | | | | | | | | | | | | | | Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165272 Tested-by: Stephan Bergmann <stephan.bergmann@allotropia.de> Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de> (cherry picked from commit 1339c42c4aea269e5265277647361ae91882d8a5) Conflicts: sal/Library_sal.mk sal/osl/all/log.cxx Change-Id: Ia86ac0e022579d155e92de3b853d57860b5b97e5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165192 Tested-by: allotropia jenkins <jenkins@allotropia.de> Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
* python3: upgrade to release 3.8.19Michael Stahl2024-03-202-3/+3
| | | | | | | | | | Fixes CVE-2023-6597 and also CVE-2024-0450 Change-Id: Iebca2608e16a966356736201c63f1be5185430d4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165053 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> (cherry picked from commit 0633e4b4205334dd65ec64d7f3e306ee125e31be)
* a Frame has max two childrenCaolán McNamara2024-03-201-1/+1
| | | | | | | | | | | during creation it might not have all its children created yet if a11y querys it during its setup. Change-Id: Ifbbec7eeb80409dc5e871c2022d1ee1e36c6e74f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135526 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit b1d57168b8cecc1713e729c22260feaf33fab29f)
* if the label is explicitly set there is no ambiguity as to the labelCaolán McNamara2024-03-201-1/+1
| | | | | | | | | | | | | | a child-count of 3 can arise for a temporary period during loading of widgets inside GtkScrolledWindow where the child widget supports its own scrolling and is parented as a sibling of the GtkScrolledWindow during load until the node is complete and then the redundant GtkScrolledWindow is removed after mirroring its properties to the scrolled-child Change-Id: I1a7dbf9ec2415beb0f7e920fec5c05e87ddaaeee Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108221 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit c9f8e68ce3d56b0e52915a07d0bce661882039ee)
* ucb: webdav-curl: always set CURLOPT_NOBODY for HEADMichael Stahl2024-03-141-10/+5
| | | | | | | | | | | | | Otherwise there will be timeout that depends on when the server will close the connection, which varies by server but can be several minutes; getting a potential error document from the server for this one request when logging is enabled is less important. Change-Id: I505b014b148ba009c400d37d826c9edb8c3a6da2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164838 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> (cherry picked from commit c8400f5acc36d2cf0c007260bdc94534a53bba90)
* ucb: webdav-curl: improve fallback authenticationMichael Stahl2024-03-141-9/+41
| | | | | | | | | | | | | The bundled curl on Linux doesn't support Negotiate, and a system curl may not support NTLM either. If setting the auth method fails with CURLE_NOT_BUILT_IN, abort. Change-Id: I7b7f7afd1ebedd665d9475fd40cac0e0641062a6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164837 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> (cherry picked from commit 3d56fb36c47f5cfdf646e26d241b2bd7f1d68884)
* sw: oops, forgot to commit test changesMichael Stahl2024-03-141-6/+6
| | | | Change-Id: I8cde7ee17d1e717bf2228affe6f88d3461e4b5b3
* Support environment variable expansion in logging.iniStephan Bergmann2024-03-131-1/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The syntax is a stripped-down subset of what is available for variable expansion in bootstrap ini-files: It only supports "${name}", to be replaced with the contents of an environment variable of that name (which itself is not expanded further). If no such environment variable exists, it is replaced with the empty string. If the name contains a NUL character, or if there is a syntax error (i.e., missing opening or closing curly brace), the corresponding text is left unchanged. Also, backslash quoting is supported to allow for verbatim, uninterpreted "${name}" content. But logging.ini is typically used to specify Windows-style LogFilePath=C:\log.txt pathnames containing backslashes, so restrict backslash quoting to just "\$" (replaced with "$") and "\\" (replaced with "\"), and leave all other backslashes alone. (It is not possible to reuse the bootstrap macro expansion code here, as that would cause recursive dependencies. Therefore, this only implements this stripped-down subset.) Change-Id: I8c949a1637a7f14e0672a9cc1c79014edfa336bd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164759 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de> (cherry picked from commit ef28f693351411c0d1651196b99e501acba7e7d5) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164743 Tested-by: allotropia jenkins <jenkins@allotropia.de>
* sw: layout: use page style set on hidden paragraphMichael Stahl2024-03-134-10/+42
| | | | | | | | | | | | | | SwPageFrame::FindPageDesc() now ignores paragraphs hidden for any reason, but to maintain layout compatibility it should only ignore paragraphs in a hidden section, not paragraphs hidden by fields. (regression from commit 0c96119895b347f8eb5bb89f393351bd3c02b9f1) Change-Id: Iad5e76f5cc437d35b4ae9bde6bc9b73dbe32bf3d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164761 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> (cherry picked from commit 7335babda93974104a39202c434e9499b8086f3a)
* vcl: interface for WinAPI FlashWindow() functionVasily Melenchuk2024-03-127-0/+35
| | | | | | | | | | | | | | | | | | | | | | | | | To improve LibreOffice UX it will be great to have possibility to signal user on some event did happen, but without capuring focus and bringing LO to foreground, like it is happenings sometimes. It can be annoying. For example, if dialog window is opening slowly and user did switch to another application, this is used to inform user that there are some updates in LO window: dialog finally alive. There are somewhat confusing implementation of this feature: VCL dialog window became visible and actual Windows window should use ::FlashWindow() are very different in hierarchies, so it is somewhat challenging to find window to flash or even decide shoud we flash window or not. Change-Id: I6ca6706d2dda8902aea273ebe6e318ec9bf4beda Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158472 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164719 Tested-by: Thorsten Behrens <thorsten.behrens@allotropia.de> Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
* ucb: webdav-curl: add missing returnMichael Stahl2024-03-121-1/+5
|
* ucb: webdav-curl: only set CURLOPT_NOBODY for HEADMichael Stahl2024-03-121-10/+9
| | | | | | | | | | | | | | | | | | | | | | | | | Some testing with Apache httpd+mod_dav reveals that it usually sends a body with a 401 status, which causes the CURLE_WEIRD_SERVER_REPLY error code from curl. So we should either ignore this error in case there's a HTTP status too, or stop using CURLOPT_NOBODY. The latter seems to have no downside, except for HEAD requests, where strangely the server keeps the connection open and curl waits for 5 seconds for no body to arrive, blocking the UI, so continue to use CURLOPT_NOBODY for HEAD. The other methods don't seem to block. It turns out that the SAL_LOG-dependent setting of g_NoBody turned HEAD into GET anyway if logging is enabled, so explicitly set the method. Change-Id: Ibe2eef8e7a827d4e356ba37c4b56bee0be3b9c13 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164569 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> (cherry picked from commit e0259d4c0951c4dd77c74d08b9d905728d4c8dfd)
* ucb: webdav-curl: avoid crashing in SAL_INFOMichael Stahl2024-03-121-1/+3
| | | | | | It's not clear why calling sqlite3_errmsg would crash, but avoid it... Change-Id: If2a375671fd5484d72af1c0f538f424f02149a0a
* sal: the old MSVC doesn't know _Pragma, only __pragmaMichael Stahl2024-03-081-3/+3
| | | | Change-Id: I139922d9cfabb3772782589f097234fd33e41809
* Implement SAL_WNODEPRECATED_DECLARATIONS_[PUSH/POP] on MSVCMike Kaganski2024-03-081-0/+6
| | | | | | | | | | | | Required for --disable-nss build on Windows, which needs the same fix as in commit 71d4abc51b556e147ab53a9a52b15be36fc710a3 (-Werror,-Wdeprecated-declarations (Emscripten), 2024-01-18). Change-Id: I4206cbc0cb80be7ddee1c3f21de50d853828300e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163704 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> (cherry picked from commit 6329a56f601748f5a8dd6da9f0a90d3e57efcaf2)
* ucb: webdav-curl: don't set CURLOPT_NOBODY for OPTIONSMichael Stahl2024-03-081-3/+2
| | | | | | | | | | | | | The problem is that if the server does send a body, then curl returns CURLE_WEIRD_SERVER_REPLY error code, which is translated to DAVException; this looks unnecessary now because write_callback will just return if there's no stream to write to anyway. Change-Id: Iddaee9778ac7bbd538b64584f822f65ab0e395c2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164550 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> (cherry picked from commit 980ca3953084560806cd980d2ec16951d9e30c2b)
* sw: SelectAll of section with RES_PAGEDESC corner-caseMichael Stahl2024-03-0710-47/+441
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The main problem here is that if a document has a RES_PAGEDESC on its first body text node, and you paste a section whose first text node also has a RES_PAGEDESC, the result inevitably has a page break that wasn't there before, and which is unwanted. SwEditShell::CopySelToDoc() needs a change to include the end node of a section at the start, so it is copied. Change CopyImplImpl() to insert a non-textnode *before* a text node at the insert position, instead of after it. This simplifies the implementation: only SwFEShell::Paste() needs to care about removing an empty trailing paragraph, but SwEditShell::CopySelToDoc() needs no changes; both functions would need to delete the empty paragraph when inserting after. Several tests such as CppunitTest_sw_ooxmlexport3 testCrashWhileSave fail because of this, which can be solved by removing the DelFullPara() call in SwXText::copyText() that is now unnecessary. Generalise and simplify the "bAfterTable" code in CopyImplImpl(): it doesn't really matter what is before the insert position, what matters is if the pasted text starts with a table or section. Also, the fly-anchor-correction code (both here and in SwUndoInserts::RedoImpl()) needs to move to the first text node also in case a section was inserted (but the equal-looking code *before* inserting remains as is!), in the situation where the last node will be deleted. Now there are some test failures: unowriter.cxx:430:Assertion Test name: (anonymous namespace)::testSectionAnchorCopyTableAtStart::TestBody equality assertion failed - Expected: quux foo bar - Actual : quux foo This is because the end position was created from SwNodeIndex aInsPos only, it needs to take also the aDestIdx from the "if (pEndTextNd)" branch. testTdf134250::TestBody finished in: 867ms uiwriter2.cxx:462:Assertion Test name: testTdf134250::TestBody equality assertion failed - Expected: 1 - Actual : 2 The section is pasted now, so there are 2. uiwriter3.cxx:1519:Assertion Test name: testTdf135733::TestBody equality assertion failed - Expected: 1 - Actual : 2 Table is now inserted before the first paragraph, which has a RES_PAGEDESC. (presumably regression from commit 9667e5ffd18d6167344e102b89a393bc981644ec) For the backport, this also fails: uiwriter2.cxx:1220:testTdf141175::TestBody equality assertion failed - Expected: 2 - Actual : 1 Because the clipboard doc starts with a table node, it takes different path in Paste and merges the source table cells into target table cells. Probably users don't care about this corner case, and it doesn't do anything obviously wrong. On master it does yet different things because Cut creates table delete redlines. Change-Id: I820e381113fee90a81249afbc2280bfc3ddb7647 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164401 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> (cherry picked from commit fcd4222d36e1864452163e5c94976eea353bbaf0)
* Related: tdf#133933 sw: fix assertion failure in the SwIndexReg dtorMiklos Vajna2024-03-072-3/+7
| | | | | | | | | | | Make sure that by the time we delete a text node, no SwIndexes point to us. Change-Id: I9248a2ebe529e5a0aab0e37bf676e669b9bddb1d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112698 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com> (cherry picked from commit e782937228479054336b564a4c34697a12530469)
* tdf#152710 fixes squashed required by testTdf134250Michael Stahl2024-03-063-8/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | tdf#152710 sw: invalidate SwUnoCursors properly in DeleteRangeImpl() This crashes with: list.cxx:44: corrupt document structure, bailing out of infinite loop ndtxt.cxx:5437: void SwTextNode::TriggerNodeUpdate(const sw::LegacyModifyHint&): Assertion `dynamic_cast<SwTextFormatColl const*>(static_cast<const SwFormatChg*>(pOldValue)->pChangedFormat)' failed. Because the redline from 7 to 9 is deleted, but then some cursor ends up on node 10 which is invalid as it is an end node. [ 6] 0x60666a0 StartNode , [ 7] 0x61195e0 StartNode , [ 8] 0x61197a8 TextNode "tainment", [ 9] 0x6119670 EndNode , [ 10] 0x6066730 EndNode , The first problem is that DeleteRangeImpl() uses the point node as the target position for PaMCorrAbs(), but in this case the point node will be deleted. PaMCorrAbs() has a check to invalidate SwUnoCursors that would be moved out of their parent sections, but due to the first problem it can't check it, and the second problem is that lcl_FindUnoCursorSection() doesn't work on redline sections, as those have node type SwNormalStartNode. After fixing the invalidation, subsequent access to the SwXTextCursor throws exceptions and importing the file fails. (regression from commit 477e489e71b4a96ff10d9f2d2b802d91dec3e319) Thanks to Dave Gilbert for identifying the problematic DeleteRange() call. Change-Id: I48a373cc122073b82bc47513fdae684f45b0efb8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145077 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> (cherry picked from commit 8e05bdd26f21fc304978ff3b454cf355841ec75f) tdf#152710 sw: call and fix DeleteSection() instead Turns out there's a function to delete a complete nodes array section - and it has the same problem? Why does it move indexes only from startnode + 1? Let's try to fix it to be more consistent. Change-Id: Iedacc10e29c1646c4ccc85e53a479b0351f5cfcc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145078 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> (cherry picked from commit 475e59d29b7a6cc7f058af8ff863b3bb1a2a84a5)
* sw: fix ASAN use-after-free in testTdf39721Michael Stahl2024-03-061-0/+4
| | | | | | | | | | | The problem is that the cursor is positioned somehow on an SwEndNode. Then lcl_CursorOk(pNew) is false and it gets deleted immediately. Change-Id: I1789280a5116da4e5b7739e311b18c5c54074b1f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109541 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com> (cherry picked from commit 43fbe2fbd6a65fa63fa819c6778c3378c2ff6e1f)
* sw: fix copying and deleting of table in section via APIMichael Stahl2024-03-068-23/+191
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a follow-up to 7ab349296dac79dad3fec09f60348efcbb9ea17e. The first problem was that tables that contain protected cells refused to be deleted, which caused an infinite loop in SwXTextRange::DeleteAndInsert(). This also affected SwXTextTable::dispose(), and DDE tables. Fix this by forcibly deleting even protected cells from UNO APIs; protection is an UI feature. The second problem was that pasting the table SwFEShell::Paste() would set up aCpyPam so that it selects from the start node of the table to the last text node in the table, excluding the table cell and table end nodes, which caused: DocumentContentOperationsManager.cxx:3548: An insufficient number of nodes were copied! Fix this by setting up aCpyPam over the entire body section of the clipboard document. Change-Id: I8c6caee5e75260dff79f106efc11f9669feddc0c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110411 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> (cherry picked from commit c598e0accf24e149520a22a8c062249f147844c7)
* tdf#159565: make sure to handle leading hidden section correctlyMike Kaganski2024-03-047-11/+97
| | | | | | | | | | | Change-Id: I41c7d2b6e765f03c72a968fd05e8de7047f1ce41 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163371 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163478 Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> (cherry picked from commit a0485be018a68c96329a2fd30d59cdf07cb36363)
* tdf#159565 prerequisite: make hidden sections have zero-height framesMike Kaganski2024-03-0429-161/+362
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As mentioned in commit bb733957dd39e6f0b9d80bb59eb0177188794797 (tdf#114973 sw: enable SelectAll with hidden para at start/end, 2023-01-27), the hidden sections didn't have frames. That prevented correct handling of the case when such a frame was in the beginning of the document. This change re-implements the hidden section to use 0-height frames, like hidden paragraphs, as a pre-requisite for a follow-up change. Some layout breakages noticed while working on this are unit-tested now. This change needed to handle the case when the first section is hidden, and then goes a page break with page style. In this case, the page style must apply to the very first page of the document. Implementing this now, when the frame that defines the page style is not the first in the document, I accidentally fixed also the previously broken case when the first paragraph was hidden. Now the page style defined in the second paragraph's page break will apply correctly. This change makes hidden sections break outer section's frames. This means that when text borders are shown, there will be an artifact in the place of the hidden sections (a horizontal line breaking outer frame). I suppose it's not a problem, actually helping to see the layout better, so in line with the "show text borders" helper functionality. If this proves to be problematic, this can be handled specially in a follow-up. [backport: move invalidations from SwSectionFrame::SwClientNotify() to SwSectionFrame::Modify()] Change-Id: I14ebf0559b463186aba28902cd10c5cc978ba456 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163151 Tested-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163477 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> (cherry picked from commit ff7f1b59e22092d8548459e75fe912db852f056f)
* sw layout xml dump: avoid a static_cast in SwFrame::dumpAsXmlAttributes()Miklos Vajna2024-03-043-8/+14
| | | | | | | | | | Move the code to SwLayoutFrame from SwFrame, then no cast is needed. Change-Id: Ieb402efb19710adf94bce022fca484178fce719f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159227 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com> (cherry picked from commit 052c917d97aa88f21008cc3d978c6ca2ad83c88e)
* sw: fix stack overflow on kde45196-1.htmlMichael Stahl2024-03-042-3/+26
| | | | | | | | | | | | | | | | | | | | | | | | | Previously, the shell cursor was put onto a SwGrfNode in the top left corner, which is invalid, but didn't crash immediately. With commit b20ca8d951e8205c8b963c6b7407f984053b4094 the cursor is instead put onto the first SwTextNode in the body, which happens to be in a table, and the entire table is hidden; this causes an infinite recursion in SwCursorShell::UpdateCursorPos() because GetModelPositionForViewPoint() no longer moves it to SwGrfNode. So try to move the cursor out of a hidden node, which requires an additional change in SwCursor::IsSelOvr() to allow moving from a node without a frame to another node without a frame. Change-Id: Ia33c7b558755f7e8b65ea3ff2c46aea20be577dd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158119 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> (cherry picked from commit fa4fe53aa775cdc50eec715f4bd88469fe5e0d32) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158048 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> (cherry picked from commit 92d75686181349f4b79aef413a070ab8335f97b9)
* Revert "sw: revert Select All improvements"Michael Stahl2024-03-0416-227/+835
| | | | This reverts commit 6eb71b1778d8bc44ec642f3e61096350e4c868dc.
* Use SAL_WNODEPRECATED_DECLARATIONS_(PUSH|POP)Mike Kaganski2024-03-024-77/+16
| | | | | | | Change-Id: I2810d22e8f5e1c81647b9e9b15519de65939630a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163895 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
* tdf#159502 libxml2: apply Solaris ld patch only on SolarisMichael Stahl2024-02-281-1/+1
| | | | | | | | | | | Diverging from upstream by inventing a LIBXML2_GLOBAL_VARIABLES version should only be done if actually required. Change-Id: I1520ca5078dc24ffd83e927f9c857d625e71749b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163455 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> (cherry picked from commit eebdda4e221327cae5a9177893394819ca510d5f)
* std::size/SAL_N_ELEMENTS also counts the null terminatorcib-6.4-24Caolán McNamara2024-02-271-4/+4
| | | | | | | | | | | | | | which libxml2 2.12 will fail on with error: 'Extra content at the end of the document' Change-Id: I9d5da9fdd826cce8462ede8c510eaea7281b760f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161627 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> (cherry picked from commit cbb17a548b5cc6a99b6ed7735479bb4f2bc40f26) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161643 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
* Missing includeStephan Bergmann2024-02-2716-0/+42
| | | | | | | | | (for std::unique_ptr, with recent libstdc++ 12 trunk) Change-Id: I61b7823dd740ea7cdfe0d7403a50ac73b24d1c4e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120229 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
* Missing #include <stdint.h> in various external codeStephan Bergmann2024-02-274-0/+32
| | | | | | | | | | | | | ...which is a problem presumably since GCC 13 trunk <https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=6f038efd93593da6e661b829d1bd3877e75550f1> "libstdc++: Avoid including <cstdint> for std::char_traits". (All the broken C++ code used unqualified uintptr_t etc. rather than std::uintptr_t etc., so I deemed it more appropriate to include <stdint.h> rather than <cstdint>.) Change-Id: Id9dfc383c5986126a425971c4557b90ac45ac963 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134760 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
* Revert "tdf#159502 remove --without-system-libxml from LibreOfficeLinux.conf"Thorsten Behrens2024-02-271-0/+1
| | | | | | | This reverts commit 678b716506c20566167d19168f33aa94db7407e3. Reason for revert: lets not change baseline/system requirements on an LTS branch.
* Bump version to 6.4.0.24Thorsten Behrens2024-02-271-1/+1
| | | | Change-Id: I59cdcb3965724cddb0ad514a467584eb57901d3a
* helpcompiler: suppress deprecation warningMichael Stahl2024-02-271-1/+7
| | | | | | | | | Commit 77cb90532d14d5035990d078977fce7b407c4fad removed these 2 lines but i don't want to check if the "I can find no difference in our output help dir with these removed" is true also in this older branch so suppress the warning instead. Change-Id: I35865e3accd018462ef4d65c8c11fb914f53ac38
* tdf#158302 fix build against system-libxml-2.12Miklos Vajna2024-02-2620-14/+32
| | | | | | | | | | | | | | | Seen in a fedora:40 container, using --with-system-libcmis, --with-system-liblangtag and --with-system-xmlsec. Change-Id: I9d748d3dc0b70dbfdfcb6b99c9ce8440bda6f326 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159980 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com> (cherry picked from commit c8f7408db73d2f2ccacb25a2b4fef8dfebdfc6cb) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161661 Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> (cherry picked from commit 764890a53cea2ccb6d2fb6d8c7edb5e1c91ecdc0) (cherry picked from commit 81cc1e539114cf826f82c3d3718fe0dfacf66a9a)
* sw: revert Select All improvementsMichael Stahl2024-02-2616-835/+227
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Revert "tdf#157129 sw: fix wrong cursor position after paste" This reverts commit 68310c73c1755d2e8a4d6f80084ef3d6b7a1d10e. Revert "tdf#156546 sw: fix infinite loop in SwUndoInsert::RedoImpl()" This reverts commit e43f09bec7bc1d7f367a9b6f6a8ec001a102645d. Revert "tdf#156267 sw: remove DdeBookmarks in SwDoc::DelTable()" This reverts commit 20c272631877d2c77bd0b14fee41acfb056aade7. Revert "tdf#155685 sw: ExtendedSelectAll with tables, group the Undo objects" This reverts commit 1f1078e0cbcc5879128d20e0748b0dd1583a471e. Revert "tdf#155685 sw: fix another ExtendedSelectAll Redo crash w table at end" This reverts commit 15e494724ab728962f133eb8d81c5fcd475b9197. Revert "cool#6580 sw: fix infinite loop when changing document language" This reverts commit a7a1f426374f865ef31f5c5162eac4c1c11efc6c. Revert "tdf#155685 sw: fix crash on undo of ExtendedSelectAll with table at end" This reverts commit a2b206ec80119000c581aa954632a1a9839408ba. Revert "tdf#155346 sw: fix crash from changing modal mode" This reverts commit 86d9b8f6f353f5d268f67f2c33681b8fa4f46ea7. Revert "tdf#154877 sw: generalise ExtendedSelectAll()" This reverts commit 9667e5ffd18d6167344e102b89a393bc981644ec. Revert "sw: SelectAll should copy section before table at start of document" This reverts commit 53c9990152ef19b0a8d07fc514cef0a73496514c.
* tdf#159502 remove --without-system-libxml from LibreOfficeLinux.confMichael Stahl2024-02-221-1/+0
| | | | | | | | | | | | configure.ac explicitly excludes libxml from --without-system-libs but this distro-config "helpfully" adds it explicitly, when the system already contains a usable libxml/libxslt anyway. Change-Id: I79d65d9ed9185277ffde8624efc152b290a6ffb3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163438 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> (cherry picked from commit 6f6364e572a0570fb097fec098314bffadc5b474)
* libxml2: upgrade to release 2.12.5Michael Stahl2024-02-221-2/+2
| | | | | | | | | | | | | Fixes CVE-2024-25062 Change-Id: I0e98fd919328e9633a602c4872de0b06eb972cc0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163734 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> (cherry picked from commit 4c3ee61e3eda0cbfd812443f80af89aa3a24ac73) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163753 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> (cherry picked from commit ca089311678ca6f84771c145178bf4153243ed45)
* upgrade libxml2, libxslt & liblangtagCaolán McNamara2024-02-226-10/+59
| | | | | | | | | | | | | | | | | | | | what I'm really after is some vexating not-reproducible oss-fuzz msan warnings when using libxml2 in the fodt2pdf fuzzer. So lets upgrade libxml2 to the latest, which requires bumping libxslt, and then requires a newer liblangtag because of no longer implicit includes that it depended on. xmlKeepBlanksDefaultValue and xmlSubstituteEntitiesDefault are deprecated, we should get around to updating those uses Change-Id: I8fda0dffda0a7ea65407d246a3121875cb8ad4a4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161598 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> (cherry picked from commit 6875c975f80d8b813b1829a530162869a1e2d92e) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163751 Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> (cherry picked from commit 050a2db3964d5f02e2dd149cb7f76342457a6719)
* Fix Linux --without-system-libxml buildStephan Bergmann2024-02-221-1/+1
| | | | | | | | | | | | | | ...after 362dfc50a28a918ec73609a00d2851eb3058375d "libxslt: upgrade to release 1.1.38" Change-Id: Id0ebf5676f79c43bb4fab3a33a2a19e303881aef Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153942 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com> (cherry picked from commit d1fc1c326470461def5ab092a311afee31950880) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154000 Reviewed-by: Taichi Haradaguchi <20001722@ymail.ne.jp> (cherry picked from commit 2808d5a6874d5956d99e02feb0fbf55a7343d63c)