summaryrefslogtreecommitdiff
path: root/sw
AgeCommit message (Collapse)Author
2023-02-16SfxViewShell never takes a null SfxViewFrame*Caolán McNamara
Change-Id: I36f3a5c77a7fb2d3cf267184e403e6cd24dbd70b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147112 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-02-16sw floattable: limit vertical position for the follows of split flysMiklos Vajna
The bugdoc has 2 pages and the 2nd page had a fly frame with an unexpected vertical shift towards the bottom. The problem is that the floattable has a vertical offset defined, but Word only handles that on the first page of the split table, not on later pages. This makes sense: we split the table to multiple pages so that the content fits, an additional offset on follow pages would result in a lot of additional pages. Fix the problem by adjusting SwToContentAnchoredObjectPosition::CalcPosition(), so that the vertical offset is only applied on master flys, not on follow flys. This implicitly means that the behavior is unchanged for non-split flys, since those always have a first page, which is nicely consistent. Change-Id: I8c86cd2df6868cc5c1a10dfec359f3e02f5c1102 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147141 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2023-02-16tdf#72955 - Modified Bibliography entry dialog to work inside bibl. tableVojtěch Doležal
Change-Id: I5d4072e136eb321f92973ca8e3cd749e4ce06bd5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147001 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-02-16Fix issue where comment replies would not get a para id on roundtripParis Oplopoios
Also adjusted the test file to account for this Change-Id: I34f1d9d3a77f91396dd733785eb5b7853289508a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147034 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-02-16Drop 'using namespace ::std' in dirs s*Gabor Kelemen
Change-Id: If3119a1f2274aac0bf70576458e3adb4505a2a45 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147076 Tested-by: Jenkins Reviewed-by: Gabor Kelemen <kelemeng@ubuntu.com>
2023-02-16osl::Mutex->std::mutex in SwDrawModellListener_ImplNoel Grandin
Change-Id: I150ac67a3f053046a6d6a7cd79323fa4595078c3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147105 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-02-16sw: fix undo comment of FN_UPDATE_TEXT_FORMFIELDSMiklos Vajna
It's updates, not an insert. One has to dispatch .uno:TextFormFields to see this in action. Change-Id: I3049fa34110731e15082a0163de4b08e83c76098 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147109 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-02-16osl::Mutex->std::mutex in SwXDocumentIndex::ImplNoel Grandin
Change-Id: Iaaa57af9bb298f4495b4a51d3553c55a63c5b069 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147099 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-02-15dont use RES_MSG_{BEGIN,END} outside hintids.hxxBjoern Michaelsen
Change-Id: Iee08120ec4ebfd39f03a949f4a759eaa415ca894 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147029 Tested-by: Jenkins Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
2023-02-15check GetFEShell()Xisco Fauli
Similar to 24889135773204c6e3002dcb417c75ff1a99ccd0 "check GetEditShell()" These two crash reports might be related: - https://crashreport.libreoffice.org/stats/signature/SwView::GetDocShell() - https://crashreport.libreoffice.org/stats/signature/SwFEShell::UpdateTableStyleFormatting(SwTableNode%20*,bool,rtl::OUString%20const%20*) Change-Id: I7ce286f7be933b34af270abd11a4c9c4c58fe4a8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147097 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-02-15tdf#153613 writerfilter: anchors ignore prior run with page breakJustin Luth
Although an image that is INLINE with the text DOES move to the following page when it is preceded by a w:br, an anchored image does not (when it is the last property in the paragraph). make CppunitTest_sw_ooxmlexport18 CPPUNIT_TEST_NAME=testTdf153613_anchoredAfterPgBreak make CppunitTest_sw_ooxmlexport18 CPPUNIT_TEST_NAME=testTdf153613_inlineAfterPgBreak I also tested with <w:t>x<</w:t> following the anchor and it already works correctly. make CppunitTest_sw_ooxmlexport18 CPPUNIT_TEST_NAME=testTdf153613_anchoredAfterPgBreak2 I also tested with <w:splitPgBreakAndParaMark/> and it already works correctly. make CppunitTest_sw_ooxmlexport18 CPPUNIT_TEST_NAME=testTdf153613_anchoredAfterPgBreak3 Change-Id: Ibf9c0d38c4dfe56db4e05416a40e3b7881693b17 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147032 Tested-by: Jenkins Reviewed-by: Justin Luth <jluth@mail.com>
2023-02-15clean up SwRefMarkFieldUpdate a bitBjoern Michaelsen
- remove SwRefMarkFieldUpdate: * it has only one unused field * replace with a plain SwPtrMsgPoolItem - hint constness: * SwUndoFieldFromDoc: make ctor arg hint const * DocumentFieldsManager: make UpdateField arg hint const * however, seeing this hint is: a/ constructed on the stack, but b/ stored as pointer in undo likely it would be best to remove it altogether. For now, make it at least static, so that there is no use after free. Change-Id: Ica51a2a2ce19e1938c3a367e9b4a9e01bbb75374 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147030 Tested-by: Jenkins Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
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>