summaryrefslogtreecommitdiff
path: root/sw
AgeCommit message (Collapse)Author
2023-07-10Update pdfium to 5408Miklos Vajna
- drop cg-instead-of-carbon.patch.1, no longer needed after https://pdfium-review.googlesource.com/c/pdfium/+/99753 - drop AndroidNDK19.patch.1, no longer needed after https://pdfium-review.googlesource.com/c/pdfium/+/96530 - drop gcc-c++20-comparison.patch, no longer needed after <https://pdfium.googlesource.com/pdfium/+/065698acf82962a3168a0d56bb1d5964bc593d00> "Fix interaction between RetainPtr<T> and transparent comparisons" since chromium/5321 Change-Id: I1f861dd8a3d490400bb39c108bd4e767a2f45d30 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142474 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com> (cherry picked from commit 5a69fd3052bb638857f30a4cfd5913634275d23d) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154140 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2023-06-24lok: use correct shell when doing undoSzymon Kłos
When doing undo we save EditShell reference in the context object. Later it is used to get cursor we want to move to the place where modification was done (in sw/source/core/undo/unins.cxx:281). In LOK case when 2 different sessions were used and undo was done by user A - then user's B cursor was moved. This fixes that issue. We use current shell instead of getting it indirectly through SwDoc::GetEditShell() Change-Id: I7a10ea98587f48818e8d0aaa9ad739d4eed514f5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153461 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153492 Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-06-04tdf#155611: SwFrame::FindNext sometimes returns a sub-frame of this frameMike Kaganski
This resulted in wrong split of the section frame, when the table frame was the last in the section, the split needed to happen after that table (i.e., at the very end of the section), and passing the table frame as pFrameStartAfter gave its last cell's subtable as pSav (i.e., the frame to move after the split). The first frame of the last cell (the one prior to pSav) got lost from the layout, and wasn't destroyed when SwRootFrame was destroyed, and then it crashed referencing destroyed root frame and view shell. Change-Id: I1a539818aa890f65e961f4185ce50916ce7e4e4f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152454 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152465 Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152484 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2023-05-26sw: fix wrong downcast in UndoManager::IsViewUndoActionIndependent()Miklos Vajna
In case a user types in one view, an other user types in an other view, finally the first user deletes, then getting the undo state resulted in a memory corruption. This went wrong in commit 2875c65946e59f5dd7968155463bf00bd71d440b (sw, out of order undo: allow a subset of a non-empty redo list, 2021-11-11), the intention was to check if we have a redo item and it has the expected type, but we checked the type of an earlier undo action that belongs to the view. Fix the problem by checking the type of the correct undo action, this was probably a copy&paste error of mine. Resolves <https://github.com/CollaboraOnline/online/issues/6412>. (cherry picked from commit f0a9d4d4eea6562e98fd92a2797d16504e1d4db5) Change-Id: I6cb2a081067695a045d86b4ef427cc5a76c0f9c4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152269 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-05-22put floating frames under managed links controlCaolán McNamara
like we do for sections and ole objects that link to their content individual commits in trunk are: extract a OCommonEmbeddedObject::SetInplaceActiveState for reuse no behaviour change intended Change-Id: Ia1d12aa5c9afdc1347f6d4364bc6a0b7f41ee168 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150341 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 183e34a3f8c429c0698951e24c17844e416a3825) use parent window as dialog parent it makes no odds, but is more convenient for upcoming modification Change-Id: Ibc5333b137d2da089b3b701ff615c6ddf43063d0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150342 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit f93edf343658abd489bde3639d2ffaefd50c0f99) adjust IFrameObject so it could reuse mxFrame for a reload of content Change-Id: I7eec3132a23faafd9a2878215a0a117a67bc9bf2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150343 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 3a727d26fd9eb6fa140bc3f5cadf3db079d42206) query getUserAllowsLinkUpdate for the case of content in a floating frame similarly to how it works for the more common "normal" embedded objects Change-Id: I83e38dfa2f84907c2de9680e91f779d34864a9ad Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149971 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 52aa46468531918eabfa2031dedf50377ae72cf7) add a route to get writer Floating Frame links under 'manage links' Change-Id: If90ff71d6a96342574799312f764badaf97980eb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150349 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 8b8a2844addbd262befb1a2d193dfb590dfa20be) allow SvxOle2Shape::resetModifiedState to survive having no SdrObject Change-Id: Iea059262c124e3f44249e49b4189732310d28156 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150538 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 02379929bd0e1d1676635f0ca1920422702ebb7c) create the FloatingFrameShape in a separate step to inserting it this is derived from the path taken by the AddShape(const OUString&) function for this case. No change in behavior is intended. Change-Id: Id09ae0c65a55a37743ad7c184070fb8dd97d8a7f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150526 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit bafec47847a0b9697b3bbe9358e53f8118af3024) add a route to get calc Floating Frame links under 'manage links' much harder than writer because the organization and ordering of properties and object activation etc is different. This ended up ugly, but functions. We set FrameURL before AddShape, we have to do it again later because it gets cleared when the SdrOle2Obj is attached to the XShape. But we want FrameURL to exist when AddShape triggers SetPersistName which itself triggers SdrOle2Obj::CheckFileLink_Impl and at that point we want to know what URL will end up being used. So bodge this by setting FrameURL to the temp pre-SdrOle2Obj attached properties and we can smuggle it eventually into SdrOle2Obj::SetPersistName at the right point after PersistName is set but before SdrOle2Obj::CheckFileLink_Impl is called in order to inform the link manager that this is an IFrame that links to a URL Change-Id: I67fc199fef9e67fa12ca7873f0fe12137aa16d8f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150539 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 07179a5a5bd00f34acfa8a3f260dd834ae003c63) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150755 Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152118 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com>
2023-05-17lok: Hide file name labelSzymon Kłos
this is followup for: commit 80c423520baa94cd3546e02cb383946a7d448ce9 lok: Hide file linking in section Change-Id: I28f965766758d87f457e8471bf88b5db886fbba3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151256 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com>
2023-05-17lok: avoid painting writer windows to a giant virtual-device.Michael Meeks
When layout changes, we don't want to immediately redraw lots of windows; we should be able to wait for tiles to be rendered instead. Certainly we don't want to allocate a giant virtual device. Unfortunately we also believe that full document invalidations are cheap - so warn about that. Change-Id: Ib56320d4860c4b6f4e100b30cc6d3e490a1c7a90 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150117 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-04-27tdf#155011: Fix assert/checkMike Kaganski
pFrameStartAfter may be a section frame itself, thus its FindSctFrame would not return this. Same for pSav. Change-Id: Ib592965b30eb47f37ba54fe7f39af0b8689b3175 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150981 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> (cherry picked from commit 9ca317ff313958706c63b132113d3f706813587d) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151015 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2023-04-25tdf#154113: do not forget to split the outermost section frameMike Kaganski
... when the inserted section node is not the first one. The very first frame, where InsertCnt_ puts content to, may already have some content after the insertion position. When an inner section ends, the current section needs a new frame, and the rest of content must go to that new frame. Previously, the new empty frame was created without taking the content move into account. This moves the split into the single place inside InsertCnt_, to avoid special processing in MakeFrames. Change-Id: I1335ebbc620af0f2b064141e8267e5bd1af0b195 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150675 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150740 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2023-04-23lok: Hide file linking in sectionSzymon Kłos
this is followup for 6f56317 Change-Id: I87227b3e665a6d15378ee294556bcd2f95801e6b
2023-04-23Make encodeForXml accessible for other modulesSzymon Kłos
and share similar code Change-Id: I7729a46d40845893f577c273c1ab340f69ebb51b
2023-04-12Revert "tdf#143574 sw: textboxes in group shapes - part 3 take 2"Justin Luth
This reverts commit d3daa7ed0361785d8667f726340538ada1607937. It was added for T38690 and removed for T41585 There was no urgency to get T38690 out, so these regression-prone patches should not have been backported into to a stable product. All of these patches are in master and LO 7.4, so they will be part of 23.05 already. So T38690 is solved still in 23.05. Change-Id: I113fb13ea9ca62f63d6e74a0da77108ba32cc440 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150296 Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com>
2023-04-12Revert "tdf#143574 sw: textboxes in group shapes -- part 4"Justin Luth
This reverts commit d4b87c11b451cb08aa950e09efed3cc6fa1422f3. It was added for T38690 and removed for T41585 Change-Id: Ifc3fed831dc321f4b27cff295037b525768e3e55 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150295 Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com>
2023-04-12Revert "tdf#143574 OOXML export/import of textboxes in group shapes"Justin Luth
This reverts commit b5034017e566cd4e5a236bf59555196598fd01cf. It was added for T38690 and removed for T41585 Change-Id: Icca77965ddeece69c01129aebb7b4af3092cd85f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150294 Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com>
2023-04-12Revert "tdf#147126 sw: fix missing as_char anchoring of group textboxes"Justin Luth
This reverts commit 341e397d970d10281fbc9691874b4441a841837d. It was added for T38690 and removed for T41585 Change-Id: I39cd0711047a131a3d60106b8682097411318781 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150293 Reviewed-by: Justin Luth <jluth@mail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com>
2023-04-12Revert "tdf#147485 sw: fix group shape crash using std::shared_ptr"Justin Luth
This reverts commit 044c63c631f0af832aa8452bc4a8b0b38dc91c23. It was added for T38690 and removed for T41585 Change-Id: I0010c40e486843e942fb958982e60ea92fddbb3c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150292 Reviewed-by: Justin Luth <jluth@mail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com>
2023-04-12Revert "tdf#149550 sw: fix crash by implementing nested textbox copy"Justin Luth
This reverts commit d981737bcebf825949cd8b13c2c609a109abc984. It was added for T38690 and removed for T41585 Change-Id: Iae7f0f273f81f050a2fbfa589451e6039a1a2193 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150291 Reviewed-by: Justin Luth <jluth@mail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com>
2023-04-12Revert "Related tdf#66039 DOCX import: fix Z-order of group shapes"Justin Luth
This reverts commit 0cb370d02bebf6a9d65b5852815e2c617b33a89a. It was added for T38690 and removed for T41585 Change-Id: I2a019d739f91d9aef2765ee5142825da7ca09a32 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150290 Reviewed-by: Justin Luth <jluth@mail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com>
2023-04-12Revert "tdf#66039 DOCX: import textboxes (with tables, images etc.)Justin Luth
... in group shapes" This reverts commit c4f3aa127ad33fe691b00336cdc9d6c88a9ebfb9. It was added for T38690 and removed for T41585 Change-Id: I55631e3e2b0035bb133363761d30f2724f6c4741 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150288 Reviewed-by: Justin Luth <jluth@mail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com>
2023-04-12Revert "tdf#148687 tdf#149173 tdf#149546 sw: fix crash with textboxes"Justin Luth
This reverts commit 05eaee071ba6eb93ccc4da31b11ee01d102a960c. It was added for T38690 and removed for T41585 Change-Id: Ia50f6bff6e7f15dd7d5f28795fdfe9df7ad048ad Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150287 Reviewed-by: Justin Luth <jluth@mail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com>
2023-04-12Revert "tdf#153289: remove problematic assertion"Justin Luth
This reverts commit d506ca99d9ecbedadc7d6a83669313eca78768c0. It was added for T38690 and removed for T41585 There was no urgency to get T38690 out, so these regression-prone patches should not have been backported into a stable product. All of these patches are in master and LO 7.4, so they will be part of 23.05 already. So T38690 is solved still in 23.05. Change-Id: I0deb4ba8ee09645957e51c930e1052f47050f0da Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150286 Reviewed-by: Justin Luth <jluth@mail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com>
2023-03-31sw CopyBookmarks: ensure that Move copies can renameJustin Luth
The problem was that a reference to the bookmark name was failing - since the move was adding a "Copy 1" at the end. That rename line is very deceptive because AFAICS it fails every time. I'm going to look at removing it in a followup commit. Two other unit tests also found with make sw.check -tdf149089.docx -tdf149507.docx but they also didn't have references to the bookmark to visually notice. make CppunitTest_sw_ooxmlexport10 CPPUNIT_TEST_NAME=testTdf92157 Change-Id: Idd695ec4a89057b28a68bc051b73f17fd4c3de56 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149574 Tested-by: Jenkins Reviewed-by: Justin Luth <jluth@mail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149641 Tested-by: Justin Luth <jluth@mail.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149766 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2023-03-29tdf#146955 DOCX import: fix SAX exception with footnotesLászló Németh
(Likely broken) DOCX documents exported by Writer raised a SAX exception, when PopFootOrEndnote() tried to access to a not-existent footnote, because PushFootOrEndnote() failed to create that. Note: the original ODT contains hundreds of frames, and these and the text content of the document have been put into the TOC section during Writer's DOCX export, resulting a broken document. Regression from commit 9b39ce0e66acfe812e1d50e530dc2ccdef3e1357 "tdf#76260 DOCX import: fix slow footnote import". Change-Id: I9e32feb0cae778a87f034a8b5c41989fec90899d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134934 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org> (cherry picked from commit 73696a01224a3758bde686f32ec7e6f4c90877fe) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149727 Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2023-03-23Fix wrong layout of textbox in headerJaume Pujantell
In some cases the text box wasn't properly moved afeter it's position had been calculated. Also now when the shape and text element are brought together in the Z ordering, the one with higher Z moves down. Change-Id: I0512db4b6466532b5af4e3c091fd65bd0a416381 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149221 Tested-by: Jenkins Reviewed-by: Andras Timar <andras.timar@collabora.com> (cherry picked from commit 826b20b049449c9c335ce00c781cdb52e4ee0512) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149305 Tested-by: Andras Timar <andras.timar@collabora.com>
2023-03-22tdf#150966 oox export avoid bottom above top for text areaRegina Henschel
If bottom and top insets set so that the bottom edge of the resulting text area is above the top edge, then LO and MS Office behave different in how this is rendered. With commit e2169886 insets are converted on import to make rendering in LO similar to MS Office, but the implemented export has some problems, see analysis in bug report. LibreOffice normalizes the resulting text area in case bottom edge is above top edge. So this patch exports the insets so, that MS Office gets a normalized resulting text area and will not apply its special rules. A roundtrip starting with pptx will not regenerate the old values but will produce inset values, which give same rendering in MS Office than in LO. Because the method is different now, the inset values have changed and test testTextDistancesOOXML_Export is adapted. When you compare the result with the screenshot on slide 2, you see that the new method works as well. The old method did not work for exporting an odp file. That is covered by the new unit test. The docx unit test file covers the case, that the export tweak was erroneously triggered. Change-Id: I0091f284d9bdd635dd87ddb9e9b0e415cc0cc51e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142185 Tested-by: Jenkins Reviewed-by: Regina Henschel <rb.henschel@t-online.de> (cherry picked from commit 933768ffcd8617942f45481de77e656ded9dcfe2) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142265 Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> (cherry picked from commit 59b44e72f46021c070095a75a0d7e0ae12c43399) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149187 Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com>
2023-03-22tdf#153964 writerfilter compat15: top margin after break splitJustin Luth
The problem was that the top margin was being applied to the new paragraph after the split. This is absolutely attrocious in MS Word before 2013. If I am going to be in error, I want to error on the side of being compliant with compat15, since all other versions of MS Word are now unsupported. I think I have the logic of it mostly figured out. In compat15, the top margin never applies after the break. In compat14, if the paragraph properties are not applied to a run before the break, then they can be applied after the break. make CppunitTest_sw_ooxmlexport18 \ CPPUNIT_TEST_NAME=testTdf153964_topMarginAfterBreak14 make CppunitTest_sw_ooxmlexport18 \ CPPUNIT_TEST_NAME=testTdf153964_topMarginAfterBreak15 Change-Id: I8816b391e898cfea58c2e0dbf01c881f87bbc4c4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148451 Tested-by: Justin Luth <jluth@mail.com> Reviewed-by: Justin Luth <jluth@mail.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149226 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-03-14sw content control: fix lost properties on copy&pastecp-22.05.11-1Miklos Vajna
E.g. a checkbox content control was turned into a rich text one on copy&paste, so toggling didn't work on the copied content control. (cherry picked from commit c804c5354855188b5a37219cfe11dc079dc235f4) Change-Id: Ia7262e0b88dff12a2f87acd7b0e6cc3fbde3c3a8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148836 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Tested-by: Justin Luth <jluth@mail.com> Reviewed-by: Justin Luth <jluth@mail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-03-07sw: fix crash in GetUpperSpaceAmountConsideredForPrevFrameAndPageGrid()Miklos Vajna
Crashreport signature: program/libswlo.so SwFlowFrame::GetUpperSpaceAmountConsideredForPrevFrameAndPageGrid() const sw/source/core/layout/flowfrm.cxx:1741 program/libswlo.so objectpositioning::SwAnchoredObjectPosition::GetTopForObjPos(SwFrame const&, SwRectFnCollection* const&, bool) const include/svl/itemset.hxx:101 program/libswlo.so objectpositioning::SwToContentAnchoredObjectPosition::CalcPosition() sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx:1020 program/libswlo.so SwAnchoredDrawObject::MakeObjPosAnchoredAtPara() sw/source/core/layout/anchoreddrawobject.cxx:424 Change-Id: If162602f6a1cc2108c0de385652e93e23be920be Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148375 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-03-06tdf#153613 writerfilter: handle defered break before SDT startJustin Luth
If there are deferred column or page breaks before an SDT, then before starting the SDT we need to determine if the existing run needs to split - same as everywhere else. There was only one existing unit test that had any defered page or column breaks, so only two example documents to work from. That was tdf125778_lostPageBreakTOX.docx. Change-Id: I02d71577af13399d8aaf3ba0ce40fc6bed5e6e3c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148148 Tested-by: Jenkins Reviewed-by: Justin Luth <jluth@mail.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148195 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-03-06related tdf#151548 sw: KEY_DOWN access to FieldmarkWithDropDownButtonJustin Luth
There was no way to use only a keyboard to access dropdown formfields. (This should also work for LO's unique DateFieldMark - however you get one of those.) Change-Id: I2b0b2bd38a43817bbbf1801910815ebe87614f94 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141488 Tested-by: Jenkins Reviewed-by: Justin Luth <jluth@mail.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147680 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-02-17sw: rename WeakContentNodeContainer to WeakNodeContainerTomaž Vajngerl
Change-Id: Ic80c0753b600ff6e846f2f38a1c46cb67763e2fc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142820 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit bada1fc45d6ec65c12cf9ed36e15927b27d6d49c) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144500 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2023-02-17sw: change statusbar to use an icon, fix statusbar updatingTomaž Vajngerl
Change-Id: I98e862c4c1124b1db8eb3e0ea7ff96effd629185 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142721 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit f8b990aaac155f0b45de3a4452bc300dcf2bb49b) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144499 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2023-02-17sw: test online a11y check - splitting and joining nodesTomaž Vajngerl
Change-Id: I9be3df3a4c00e7f1bbfc4f2462c8cf9a0f813f9d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142656 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit e7f78c3123c7bb7b8c830fa11241c357d89bad6a) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144498 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2023-02-15tdf#147892 DOCX: fix corrupt export at para marker revision historyLászló Németh
OOXML export of tracked deletion of tracked paragraph insertion resulted invalid document.xml, because change tracking history of paragraph markers isn't supported by OOXML. Export the tracked deletion of the last run of paragraphs without history (tracked insertion). This way w:p/w:pPr/w:rPr contains only w:del or w:ins, not both of them (with broken tag order). Note: it's possible to optimize the fix to keep the change tracking history of the characters of the last run of the paragraph, except the paragraph marker. Regression from commit eeee19b3fcf8b0374c361c7f6c285fd5c89b5a2f "tdf#142387 DOCX track changes: export w:del in w:ins". Minimal unit test document was created by Miklós Vajna. Change-Id: I425f4d63c8c6ac29ccd807c1574748c7b9b39e80 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146782 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org> (cherry picked from commit 382892341a63e400f221e1a533fd5a5d6b4d9d70) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146795 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> (cherry picked from commit 4eb34d281260d7c9b6f2268ca1fa439655238a55) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147022 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-02-14Content Control Properties dialog alignmentSzymon Kłos
Make explicit that ok/cancel buttons should be the last row Change-Id: If22da5222fc9dc1c1c5f94fd08c945364284daee Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146904 Reviewed-by: Henry Castro <hcastro@collabora.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2023-02-13sw: fix crash in SwView::AttrChangedNotify()Miklos Vajna
Crashreport signature: program/../program/libswlo.so SwView::AttrChangedNotify(LinkParamNone*) sw/source/uibase/uiview/view.cxx:507 program/../program/libswlo.so SwWrtShell::DrawSelChanged() sw/source/uibase/wrtsh/wrtsh3.cxx:261 program/../program/libswlo.so SwDrawView::MarkListHasChanged() sw/source/core/draw/dview.cxx:767 program/libmergedlo.so SdrMarkView::MarkObj(SdrObject*, SdrPageView*, bool, bool, std::vector<basegfx::B2DRange, std::allocator<basegfx::B2DRange> >&&) svx/source/svdraw/svdmrkv.cxx:2196 program/../program/libswlo.so SwDrawContact::DisconnectFromLayout(bool) /opt/rh/devtoolset-10/root/usr/include/c++/10/bits/stl_vector.h:336 This seems to happen when the SwDrawContent delete is in progress, so we no longer have the shells at hand that are usually present. Change-Id: Iba0601654c946b85e7c2de33fe76d99b26a20eae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146649 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Justin Luth <jluth@mail.com>
2023-02-13tdf#91265 Use same plot area distance as used in MSOGülşah Köse
Changes the postion calculation for pie charts, where the margin min distance is now constant for pie charts, but unchanged for other chart types. This changes the positions of various pie charts used in tests, which have been changed to the new value after the cases have been checked. Added a new test with all 3 use cases (chart area width equals height, width is greater than height, width is less than height). Change-Id: I51f98f336a7c64a3e6762144fc7dc8d9df80f696 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143179 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146603 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Pedro Silva <pedro.silva@collabora.com>
2023-02-09Fix build errors by suppressing warnings when building with Xcode 14.2Patrick Luby
Apple started marking sprintf as deprecated in Xcode 14 so we need to suppress the deprecated warnings in order to build on iOS and macOS with Xcode 14 and higher. This also fixes the inability to open documents in the iOS app. Loading a document would fail to load the following symbols: com_sun_star_xml_crypto_SEInitializer_get_implementation com_sun_star_security_DocumentDigitalSignatures_get_implementation The problem was that these symbols are within an #if HAVE_FEATURE_NSS block in the generated workdir/CustomTarget/ios/native-code.h so we need to add an #include <config_crypto.h> in solenv/bin/native-code.py like was added in commit fa5db38ae5bbe9abfd41b6765074ca1200b8def2. Change-Id: I541279eb307e5a9d589e3b39c684a49bf8cca14d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146536 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Patrick Luby <plubius@neooffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2023-02-07tdf#151548 sw content controls: keyboard navigation with tab keyJustin Luth
Combine content controls with legacy formfield controls in keyboard tab navigation. MS Word (I tested 2010) is extremely irrational and inconsistent in its behaviour, so I modeled my implementation on the specification and general logic, and not at all on "compatible misbehaviour". There is a third category of form control (activeX rich content), but these are mapped to internal LO controls that are only exposed at VCL level, and don't pass the keystrokes back to SW. Plus, they are not inline, but fly controls. However, it is still a TODO to handle these if reasonably possible. Change-Id: I1fef34d05a779e9d4f549987238435acb6c043d2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146219 Tested-by: Jenkins Reviewed-by: Justin Luth <jluth@mail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146563 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2023-02-07lok: form controls: rendering and mouse event forwardingMarco Cecchetti
What we got - Most controls rendered on Writer and Impress (on Calc already implemented by Tomaž Vajngerl) - Text labels rendered correctly - Mouse events forwarded to controls - Control state changed on click for Writer and Calc - Control invalidation for all apps - Fixed broken LOK_CALLBACK_MOUSE_POINTER msg - Correct pointer style when mouse is hovering over a control Need to be improved - in impress click method for a control is not executed even if the mouse event is forwarded correctly - avoid not needed control invalidations (as the one occurring on document autosaving) Change-Id: I4d5012af7f90a2c726b6b6b5b068e2be1ed5568a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146569 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-02-07related tdf#151548 formfield navigation: loop to beginning/endJustin Luth
When reaching the end of the form using keyboard navigation, the next tabstop should return the user to the beginning of the form. This patch adds that to the existing legacy formfield navigation. I'll wait with a unit test until I have added activeX/contentControls into the mix. Change-Id: I24a15a60f5a0a2721f512cca50397efddcbf7e4b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146035 Tested-by: Jenkins Reviewed-by: Justin Luth <jluth@mail.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146562 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-01-31tdf#153289: remove problematic assertionMike Kaganski
It is unclear what it should guarantee; but at least when ungrouping, SwDoc::UnGroupSelection copy-constructs a shared pointer (increasing the refcount), then a copy-constructed argument passed to lcl_CollectTextBoxesForSubGroupObj increases it once again, and then the assertion expectedly fails. Change-Id: I0cb5f303c67b2dc67d5583a9eb03fe405af3573d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146327 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-01-31tdf#148687 tdf#149173 tdf#149546 sw: fix crash with textboxesAttila Bakos (NISZ)
Regression from 2110597ac730fa07dbbdd603fda82b182ed27c9e "tdf#147485 sw: fix group shape crash using std::shared_ptr". Details: 1) Using reference instead of copy assignment in SwTextBoxHelper. 2) Cleanup: Unused parts of SwTextBoxHelper were removed. 3) Fixing destruction of textboxes, in case when first the shape is removed, with clearing all textboxes from the doc and the shape before the pointer is released. All of this only have to be done if the call is not coming from the swdoc dtor, unless there will be double freeing. 4) Missing style conversion was fixed in writerfilter. 5) Don't import sections in textboxes, unless the hack of dummy paragraph before tables in sections will be applied and the paragraph with anchored objects inside will be removed with the objects; 6) ConvertTextRangeToTextFrame also fixed, so embed frames in frames are imported from now. (Also textboxes in frames, this can be useful when there is a floating table having group textbox with nested complex content inside, or floating table in floating table, etc...) Note: Follow up commit will enable group textbox import in frames and tables. 7) Import of group textboxes with complex content in header/footer was impossible, from now this is also supported both from DOCX and ODT (test included). 8) Guard class for blocking unwanted recursive textbox sync has been introduced, and maybe some speedup with group textbox import has been achieved. 9) The anchor sync method got a new function which avoids unnecessary sync when the anchor is the same. 10) Sync of As_char textboxes during layout calculation caused crash so that has a workaround from now, for DOCX import anchor change and Undo. That syncs starts before the layout calculation so sync not needed later. 11) A memory leak was found in Undo, which has been fixed. Note: layout test "testTdf147485Forcepoint" has to be limited to Windows and Mac builds, because font substitution causes crash on the Unix based systems. Change-Id: I69d5d79cc120e3a70ba9285be32ec36a434b2a04 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136192 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143373 Tested-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-01-30tdf#151548 sw content controls: preserve tabIndex val="-1"Justin Luth
Either we have to read sal_uInt32 (which I can't figure out how to do) or else we have to write it out as sal_Int32. Microsoft isn't much help here because their documentation does not give any example of a non-tabsltop, and one errata document indicates that MS Word simply ignores tabIndex altogether for Sdt (and ffData). According to the documentation, tabIndex is a CT_UnsignedDecimalNumber which we do not have in our model.xml so it was defined as being a CT_DecimalNumber which works fine for reading something human sensible like -1. However, in our exporting we were exporting a sal_uInt32 which creates large, all positive numbers which were not being read on import. Nothing I tried worked to read these large numbers. Perhaps it is even illegal to do so in MS formats? Since it doesn't seem to matter to MS Word, and for a human it is easier to understand -1, and it is easier to solve in export than import, I'm taking the easy road. Change-Id: I6b296703c9a37149d9e11f29901e6db32bd041b7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146149 Tested-by: Jenkins Reviewed-by: Justin Luth <jluth@mail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146296 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2023-01-26tdf#152045 DOCX export: fix empty display text for content control list itemsMiklos Vajna
Regression from commit f726fbc2699b05199a8dec3055710a7131e0aad6 (tdf#151261 DOCX import: fix dropdown SDT when the item display text is missing, 2022-10-10), the problem was that the correct way to represent "no display value" is not an attribute with empty value but a missing attribute. Change-Id: I25b2bb564444f43d1ca1bf95d1c59b208cb24530 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143048 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com> (cherry picked from commit 017c38a9702da0566ac1ce5d758444e5ff25df9d) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146090 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Aron Budea <aron.budea@collabora.com>
2023-01-24sw: lok: avoid creating callback json if kit is not activePranam Lashkari
Signed-off-by: Pranam Lashkari <lpranam@collabora.com> Change-Id: I60ae5a37acdbe4ea01b730702cc499833ce5b77c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146036 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-01-24sw: send LOK call back on section deletionPranam Lashkari
this helps with zotero when user deletes or undo a bibliography stored as a section without this online will be unaware of any such changes made by user Signed-off-by: Pranam Lashkari <lpranam@collabora.com> Change-Id: I6a8ae3924d548e97299a8d74f8c93c3345d1a430 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146007 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-01-24sw: add a new .uno:DeleteSections UNO commandMiklos Vajna
This is similiar to commit 1d6593dd799ff4eb931ffbb5338e4856fb87f77f (sw: add a new .uno:DeleteFields UNO command, 2023-01-16), but that deleted refmarks (used for e.g. Zotero citations), while this deletes sections (used for e.g. Zotero bibliography). Implement the section "unlinking" (delete the section, but not its data) by deleting the section format: that will remove the matching section node as well, but not the content nodes. (cherry picked from commit a5a1ea2f7d784c5c6c33f332ba61aceb7af3eca4) Change-Id: Ib00a8f592ddbb77c5e8e08ff94bb0eebfcf7cea8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145895 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Justin Luth <jluth@mail.com>
2023-01-23sw: send LOK call back on refmark deletionPranam Lashkari
this helps with zotero when user deletes a refmark or use undo without this online will be unaware of any such changes made by user Signed-off-by: Pranam Lashkari <lpranam@collabora.com> Change-Id: Ia4326fd03f6b7d27fdb59ccc25d60331ba7923d5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145774 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-01-23sw: send LOK call back on bookmark deletionPranam Lashkari
this helps with zotero when user deletes a bookmark or use undo without this online will be unaware of any such changes made by user Signed-off-by: Pranam Lashkari <lpranam@collabora.com> Change-Id: Id5ea4ee0ee1d16c399460cd177ec8e33256ce3dd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145777 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>