summaryrefslogtreecommitdiff
path: root/sw
AgeCommit message (Collapse)Author
2023-02-15Add paraIdParent to LOK notification attributesParis Oplopoios
paraIdParent has to do with which comments are replies to other comments which differs from the parent attribute which has to do with which comments are in the same thread with other comments Change-Id: I27feba55eadeeff22d409f69d8df976ad85e0ba6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147021 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-02-15simplify s_getCalendarWrapperNoel Grandin
it is not really using the SingletonRef, since it never allows it to be destroyed. Change-Id: I17226fd9766e8dcc53eb515cdd9c276ca5174d74 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147045 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-02-15sw: 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/+/147052 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2023-02-15replace RES_GRAPHIC_PIECE_ARRIVED and RES_LINKED_GRAPHIC_STREAM_ARRIVEDBjoern Michaelsen
- also use SfxHintIds and get rid of some dynamic_casts Change-Id: Id12d72fb726c1d747008f72defd6ba9eba3ba253 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146820 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2023-02-15SwContentNode: assert on dead codeBjoern Michaelsen
Change-Id: Id094b0c244a55581fe3db1773788b4dd31698a24 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146963 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2023-02-15Fix typoAndrea Gelmini
Change-Id: I738be032f9300c556a0643c0ab04b54bd5ad8ea4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147042 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2023-02-15tdf#153519 Another TreeListEntryUIObject heap-use-after-freeStephan Bergmann
...similar to the one addressed with the commits leading up to 9a23ded27470a4c57015e9e5d686259a60d464f2 "Fix thinko when to sleep" Change-Id: I13d974600275554fb3c66f836a07b96b5d6a2639 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147039 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-02-15DOCX filter: fix horizontal pos of floattables with compat mode >= 15Miklos Vajna
The floating table in the bugdoc has a small negative horizontal indent, which carefully aligns it so that the contained paragraph lines up with the text above the table. It turns out that compatibilityMode >= 15 doesn't do this anymore in Word, so we should at least avoid this tweak on import/export when we know the compat mode. Fix the problem by avoiding the <w:tblpPr w:tblpX="..."> decrease during import and the matching increase on export. This is similar to what commit 9a31d1c83e08600507689dc18f6f0973bc7e4389 (tdf#106742: OOXML import/export: treat "tblInd" properly., 2017-04-04) did for non-floating tables. I discovered this while working on multi-page sw floattables, but this is relevant for single-page sw floattables as well. Next to the modified testcase, sw/qa/core/layout/data/floattable.docx is also a good test file, which shows how the left border now lines up with the body frame, and there used to be a noticeable gap there. Now sw/qa/core/layout/data/floattable.docx gets rendered ~perfectly (with SW_FORCE_FLY_SPLIT=1). Change-Id: Ia52202f1bc3274f4ce2b7ee02c85d07589454ae9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147037 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2023-02-15osl::Mutex->std::mutex in SvxShapeNoel Grandin
Change-Id: I4b2d13dcd87f49cb73e7239102498629239005d0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147036 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-02-15Refactored SwAuthorityField::GetAuthorityVojtěch Doležal
The current version takes pointer to too complex of a structure, does some insane (and completely pointless) const_casting with it, and isn't very practically usable due to only supporting calculation for format of a default TOX. This refactor solves all these issues. Change-Id: I582be2ecdbd83650c0c30ee9df786feffdc6cb99 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147000 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-02-15CppunitTest_sw_htmlexport: avoid preTest() in testSkipImagesEmbeddedMiklos Vajna
Set the filter option explicitly, rather than inferring it from the test name. Change-Id: I943a33ff71ac957db8abd0748397330fe61e60e5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147025 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-02-15tdf#153499 missing colon in subdialog to Insert Index EntrySeth Chaiklin
Change-Id: I50236c71835fb03ab243417252e5f54075a4b0be Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146989 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2023-02-14tdf#153602 writerfilter: clear isDummyPara after processing table.Justin Luth
Once the table is processed, the fact that we had a dummy paragraph is no longer relevant to the section. So, after carefully figuring out that we have had some other paragraph in the main text body, clear the dummy status used to control bRemove. This fixes the problem of adding an empty paragraph each round-trip. Unfortunately, this would still fail if for example there was only another table following the first one. Well, it wouldn't fail that badly because the first save would add an empty paragraph, and then following saves would use that single empty paragraph as the one that resets things. So we always have at least one CR following a table, but at least they aren't multiplying. Unfortunately this isn't at all clean, because as soon as the table starts, we no longer know that it is the first paragraph in the section. (The other table paragraphs and potentially header, comment, footnote, shape etc can all set IsFirstParagraphInSection to off. Basically, most flags are completely useless since they are not stacked in any way. So we are left with a multitude of conditions to check for everything. Change-Id: Ic6a9795a6c529f8b5dd4f5d1cccc89db01b03d28 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146955 Tested-by: Jenkins Reviewed-by: Justin Luth <jluth@mail.com>
2023-02-14tdf#134283: MakeSetList should iterate Setters, not GettersBjoern Michaelsen
Change-Id: I811a3b562ead942c98705da29774b77c593eabc4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146828 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2023-02-14sw floattable: improve handling of split flys in SwTextFrame::FormatEmpty()Miklos Vajna
The bugdoc had a non-empty paragraph after the floating table, we painted that text on both page 1 and page 2, while only page 2 is expected. We want that paragraph to be on both pages, but we want to split it before the first char, so apart from providing a place to serve as an anchor, it should be invisible on page 1. Fix the problem by extending SwTextFrame::FormatEmpty() to consider the master anchor text frame as empty in case it has no text, just intersects with a fly frame. Also improve SwTextFrame::HasNonLastSplitFlyDrawObj() a bit, so it returns early when the own and the follow offset is not the same. These are cheap checks and some callers already did it before iterating over all the draw objects of the text frame, but other callers didn't do this. Now we check for this consistently, everywhere. Change-Id: I4b399ae3f9e9f364c61d977359f6c9b16c648629 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146969 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2023-02-14UBSan needs SwFlowFrame RTTI to be public nowStephan Bergmann
...for CppunitTest_sw_core_layout_flycnt newly introduced in 995198bfff4ae8abaf2129fe99d9f8ef899a4f25 "sw floattable: handle table-in-fly in SwFrame::GetNextFlyLeaf()" Change-Id: If006a912d365642181b0bc80dc21c55d42214e87 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146967 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-02-14sw: document SwAuthorityFieldMiklos Vajna
Its invariant was already documented, but it wasn't mentioned that the UI's bibliography entry is called an authority field internally. Change-Id: I55a946a5bdb59e8d6e1def54b16d0c986e531c34 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146942 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-02-14tdf#153592 writerfilter: don't defer breaks into shapes/commentsJustin Luth
When starting a pargraph, we already had a clause to avoid deferring page and column breaks when we were in a shape or a comment. These clauses are also necessary in the other sections of the code where we defer these breaks. The provided test proves the two shape cases in lcl_utext. I just took IsInComments along for the ride, as it certainly would apply in that case as well. make CppunitTest_sw_ooxmlexport18 CPPUNIT_TEST_NAME=testTdf153592_columnBreaks ooxmlexport4's testTdf81345_045Original proves that it is also needed in lcl_text. However, it is such a complex document that I wasn't confident that a unit test would be stable enough. Change-Id: I2de15341d3e756bf47fcd85b868a849c8a2419cd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146939 Tested-by: Jenkins Reviewed-by: Justin Luth <jluth@mail.com>
2023-02-13Fix typoAndrea Gelmini
Change-Id: I587c742957da0bb40ff858180f27b62549ebadbf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146912 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2023-02-13tdf#152605 (tdf#137968) "heading level" -> "outline level"Seth Chaiklin
Reformulate error messages for headings whose outline levels are not in sequence. UX cleanup: Add missing periods to error messages. Change-Id: I62b8f7af79460b644fae20dd521a160907605b76 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146807 Reviewed-by: Seth Chaiklin <sdc.blanco@youmail.dk> Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2023-02-13tdf#153499 Add missing colons to labels with buddy controlsSeth Chaiklin
Change-Id: I1260503e12516b3b29d34a317ca3a58cc314b608 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146920 Reviewed-by: Seth Chaiklin <sdc.blanco@youmail.dk> Tested-by: Jenkins
2023-02-13sw floattable: handle table-in-fly in SwFrame::GetNextFlyLeaf()Miklos Vajna
Trying to lay out a split fly that contains a table resulted in a stack overflow. The reason for this was that SwObjectFormatter::FormatObjsAtFrame_() has a loop that will format all objects of the current fly frame, but we managed to anchor the follow fly into itself. Fix the problem by improving SwFrame::GetNextFlyLeaf(), somewhat based on how SwFrame::GetNextSctLeaf() has special cases for tables. This way once we split the fly frame, we'll try to move the follow anchor frame to the next page's body frame, and not to a child of the follow fly itself. Also add a first floattable testcase, we can already assert that the table is split correctly. Do this in a separate suite for now, since the pool's default SwFormatFlySplit is only created once, so SwFormatFlySplit::SetForce(false) doesn't have the wanted effect. The anchor's text is still on both pages, should be on page 2 only. Change-Id: Ie2ce75dbace5d9716008351aedb6a8989036badb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146854 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2023-02-13tdf#152964: sw: move UItest to CppUnittestXisco Fauli
Change-Id: I9470bce1350a87d5773674b55148b64b02997210 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146902 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2023-02-13sw: use try/finally to reset the changes in OptionsTreeDialogXisco Fauli
Otherwise it might affect other tests if it hits an assert Change-Id: I16b818edc0f4414937f28b8459d06712c7db9eac Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146896 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2023-02-13sw: use try/finally to reset the changes in OptionsTreeDialogXisco Fauli
Otherwise it might affect other tests if it hits an assert Change-Id: Iee4ee4964640114126c2ec404df567598668ed99 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146894 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2023-02-13sw: use try/finally to reset the changes in OptionsTreeDialogXisco Fauli
Otherwise it might affect other tests if it hits an assert Change-Id: I987d5b4493d599a7ad21c916464efca52f24f548 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146897 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2023-02-13tdf#143148 Use pragma once instead of include guard in swbuldi
Change-Id: I9b4d2ccb608ceaafb3ee71a34831ce9cb69db6f7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146729 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2023-02-13Fix typo, improve code readability, fix commentParis Oplopoios
Change-Id: I7221222e8c84ee40e4edaec5325565dae4193aff Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145825 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-02-12Fix typoAndrea Gelmini
Change-Id: I8ab5346e38b6eac508018aced86339d6342224a7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146832 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2023-02-12Fix typoAndrea Gelmini
Change-Id: I28253e80065c690dca45658111a2cd54857b186a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146833 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2023-02-12tdf#152605 "heading level"->"outline level" and other tip correctionsSeth Chaiklin
Change-Id: I3751b8586ffe47233f3cd27602bcb5cad4d9ecb5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146797 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2023-02-11tdf#152605 change "heading level" to "outline level" in UISeth Chaiklin
This patch addresses extended tips in the UI that refer to a heading or chapter level, with the aim to remove this kind of terminology. In many cases, tooltips are added, and extended tips are corrected. Also, add "Outline" in front of "level" in the UI for Caption Options and AutoCaption. Change-Id: Idcf16892599913af31372b89d180251c86945d21 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146622 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2023-02-11sw wrtsh1: cleanup unused pointerJustin Luth
Having a separate pCurRule was made useless by commit 3234a9deaa8db760bbd7dbb6414aa3e8f9993c34 Author: Vladimir Glazounov <vg@openoffice.org> Date: Mon Feb 21 15:07:41 2005 +0000 INTEGRATION: CWS swqcore05 (1.40.82); FILE MERGED Change-Id: I5fe0c7b09245acd9376d46b448708f29594a7266 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146824 Tested-by: Jenkins Reviewed-by: Justin Luth <jluth@mail.com>
2023-02-11tdf#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>
2023-02-11sw: rename getFieldmarkFor() to getInnerFieldmarkFor()Justin Luth
The same change was made for getBookmarkFor() in https://gerrit.libreoffice.org/c/core/+/145412 Because otherwise it's quite confusing that we have a For() and an At() which could only be differentiated by a code read. Also improve getInnerFieldmarkFor() a tiny bit, so we process the first hit only once. Suggested at <https://gerrit.libreoffice.org/c/core/+/145348/1#message-286262286f234823b390e8f962e3ba11f5fa71b2>. Change-Id: I47e815eea0b8ac0df4957ac0d224acb6c5975b8e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145486 Tested-by: Jenkins Reviewed-by: Justin Luth <jluth@mail.com>
2023-02-10tdf#153205 related: Improve selection mode control icon updateJim Raykowski
This patch makes the status bar selection mode control icon change to adding selection when the mouse is used to select text while the ctrl key is pressed and the mouse is moving, which is the behaviour when the mouse is not moving and selection begins. It also makes the icon show the correct mode when doing DnD. Change-Id: I9aeb47301ab3c8b9be2159186bcc8c8ede7bf3de Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146726 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com>
2023-02-10tdf#153205 related: Fix selection problems caused by cursor shellJim Raykowski
push pop during insert state update This patch renames the SelectHiddenRange function to IsInHiddenRange and modifies it to take a bool argument that when true selects the hidden range if the current cursor position is in a hidden range. When the argument is false, the hidden range is not selected if the current cursor position is in a hidden range. This makes using cursor push pop unnecessary when all that is wanted to know is if the current cursor position is in a hidden range. Change-Id: I622dfaf8e73c5b432bb74a48d36433ff755542b2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146725 Tested-by: Jenkins Reviewed-by: Justin Luth <jluth@mail.com> Reviewed-by: Jim Raykowski <raykowj@gmail.com>
2023-02-10tdf#153341: sw_htmlimport: Add unittestXisco Fauli
Change-Id: I048a95a3bb36981f5f2d3d243021952b34529075 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146753 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2023-02-10tdf#153244: sw: Add UItestXisco Fauli
Change-Id: I8e992d84171aa4ee10f24b754214965ffb70645e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146749 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2023-02-09tdf#153042 doc/x/rtf: pre-emptive unit tests for numbering tabstopJustin Luth
These existing unit tests need to have a tabstop in the front. Although different versions of MS Word can handle similar situations differently (regardless of compatibility settings - i.e. buggy) in these cases they are all rendered the same way by Word 2003/2010/2019. make CppunitTest_sw_rtfimport CPPUNIT_TEST_NAME=testTdf78506 make CppunitTest_sw_rtfimport CPPUNIT_TEST_NAME=testTdf116265 In this one, LO's chapter numbering defaults to none-numbering followed by a tabstop. The tabstop should not be there/never become visible. make CppunitTest_sw_ww8export3 CPPUNIT_TEST_NAME=testPresetDash For this added test, older versions of Word 2010/2003 don't show a tabstop. According to MS Word 2019 however, this should have a tabstop in the front. make CppunitTest_sw_ooxmlexport18 CPPUNIT_TEST_NAME=testTdf153042_largeTab ... but this nearly identical file does not display with any tabstop, and looks the same in all versions of Word. make CppunitTest_sw_ooxmlexport18 CPPUNIT_TEST_NAME=testTdf153042_noTab Change-Id: I59d904ef7dd37b694b02f57d6743ee5b232b42a6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146731 Tested-by: Jenkins Reviewed-by: Justin Luth <jluth@mail.com>
2023-02-09sw: fix crash in SwModule::InsertLabXisco Fauli
Seen in https://crashreport.libreoffice.org/stats/crash_details/e17357e9-d5e2-4eee-868e-ecf72e04dc41 Change-Id: I32f239249e72b6644b3a38d4dd9bbae65f7bede0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146692 Tested-by: Jenkins Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-02-09make default selected table style to Default Table Style for only onlineMert Tumer
unfortunately when the table has a style sw/qa/uitest/writer_tests4/tdf115573.py fails because tables that have pre-applied style resets the style of the elements in their cells when a new row is inserted and the ui test above relies on that. For now this is LOK only Signed-off-by: Mert Tumer <mert.tumer@collabora.com> Change-Id: I2f60376fc2d929498aef45259a5ef291922ccdcd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132124 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Gökay ŞATIR <gokaysatir@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146723 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2023-02-09sw: change inserttable style option default to 1Mert Tumer
Right now it is default to NONE in the list if the user explicitly choses otherwise but that does not align with inserttable option on the toolbar there it is defaulted to "Default Table Style" 1 means "Default Table Style" Signed-off-by: Mert Tumer <mert.tumer@collabora.com> Change-Id: I1db19f0292ac6775653b0db3f2860fea9e3b0adf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131971 Tested-by: Andras Timar <andras.timar@collabora.com> Reviewed-by: Andras Timar <andras.timar@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146722 Tested-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2023-02-09use new baseclass member insteadCaolán McNamara
Change-Id: I8a1855f24370c250d0d9aecd583fa47ffaa03afb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146686 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-02-09sw: call FormatEmpty() in SwTextFrame::Format() for split fly mastersMiklos Vajna
The problem was that the text in the anchor frame of a split fly frame was duplicated on the old page and the new page as well. The reason for this seems to be that the master has no content and the follow has all the content (this is wanted), but then there is no code to explicitly clear the master. In other cases the master always gets some new content where portion building for that new content starts by throwing away the old portions. Once SwTextFrame::Format() and SwTextFrame::FormatEmpty() explicitly checks for these master anchors, the unwanted text in the master anchor disappears. An extra tweak is needed in SwTextFrame::PaintEmpty() to even hide the paragraph marker: this frame is empty but has a follow frame, so we should not show a paragraph marker there. Finally introduce a SwTextFrame::HasNonLastSplitFlyDrawObj() to be able to check for this "empty master anchor for split fly" case at a single place. With this <https://bugs.documentfoundation.org/attachment.cgi?id=185144> from <https://bugs.documentfoundation.org/show_bug.cgi?id=61594> gets laid out reasonably: the position is not perfect but we detect that only 1 para of the text frame fits page 1, we create a 2nd page and we correctly move exactly the text frame's 2nd para to page 2. Change-Id: I871bba2de5b829e667d5cfb1cbe0ba4cc2274edd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146680 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2023-02-09sw floattable: fix cid#1520804Miklos Vajna
GetFrameRstHeight() already assumes the m_pFrame is non-nullptr, so no need to check for this. The logic in the block will be necessary elsewhere as well, I'll extract that to a function in a follow-up change, so let's just do a minimal fix here. Change-Id: I6cb2a44e629c273f473278d61607705a2b9a7a4d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146679 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-02-09sw: fix undo comment of FN_UPDATE_TEXT_FORMFIELDMiklos Vajna
It's an update, not an insert. One has to dispatch .uno:TextFormField, then move inside the formfield with the cursor finally dispatch .uno:UpdateTextFormField to see this in action. Change-Id: Id9e3c7b9d08582cbf83f64ff04c97dff5cbb88f4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146671 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-02-08tdf#153423 tdf#150197: use getToken in proper orderJustin Luth
This fixes a LO 7.5 regression from my commit 727c5ed30f68abc28bb04531b25a1df30810760f getToken steps along the string and consumes it, so these needed to remain in the same order as they had been originally. Dumb thing to overlook. Change-Id: I483980eafb7deb0c224063ad41616bb21ddb2191 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146672 Tested-by: Jenkins Reviewed-by: Justin Luth <jluth@mail.com>
2023-02-08Revert "tdf#148360 doc import: add NO_NUMBERING_SHOW_FOLLOWBY(true)"Justin Luth
This reverts commit 2405a36f3bcd43f80371ccaed47f7523ff0d8757 which was backported to 7.4.1. This solves the regression report for DOC in tdf#153042. The problem is that the tab-without-numbering is displaying in cases where it shouldn't (i.e. when the tabstop position matches the first line indent). Although the patch itself is fine (DOC should do the same thing as DOCX) the feature is incomplete, even for DOCX/RTF. So just remove DOC from this mix - especially since there seem to be a LOT more instances of DOC files that need the incomplete aspect. Once it is proven to work OK for DOCX, we can add DOC back in. Change-Id: I3c550fc2ca29cf1490ec0a5e3979a6acbd102385 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146670 Tested-by: Justin Luth <jluth@mail.com> Reviewed-by: Justin Luth <jluth@mail.com>
2023-02-08htmlexport: close li mark not only in xhtmlSzymon Kłos
As commented in sw/source/filter/html/htmlatr.cxx:766 "// OutHTML_NumberBulletListEnd() will end a list item" We have to do it also in HTML not only XHTML so node will be closed and we get correct structure. This is followup for: commit 2466b9fcf20ee61f6fc621298011c0efaa55e7c6 Author: Miklos Vajna <vmiklos@collabora.com> Date: Mon Feb 21 16:38:51 2022 +0100 sw HTML export, XHTML mode: fix lost </li> when last list item is not numbered Change-Id: I99baa59b437572b157df8057445cf6c741f936b4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143508 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146651 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>