summaryrefslogtreecommitdiff
path: root/sw/source/core/docnode/ndtbl.cxx
AgeCommit message (Collapse)AuthorFilesLines
2024-03-22tdf#157241 sw: assert when importing ToX in table in rhbz589883-2.docxMichael Stahl1-6/+9
ndtbl.cxx:1417: SwNodes::TextToTable(): Assertion `!rNode.IsSectionNode()' failed. (regression from commit 62cb3b8b8d6106c6aeb073b12d84973a107182ef) Change-Id: Iec12282573cb914d1924f4da4a28e26e01b866df Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165164 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2024-03-14tdf#157241 sw: fix crash on RTF paste or insert of nested tablesMichael Stahl1-1/+35
The problem is that there are tables with only empty cell frames in the layout, which causes a crash in IsAllHiddenCell() added in commit ab7893544dc6be6dc192dffefd57cd5ddd421c35. This happens because first inner tables are created, with layout frames because the layout already exists. Then when SwNodes::TextToTable() is called for the outer table, it deletes the SwTextFrames, but not the SwTabFrames/SwCellFrames, so they remain uselessly in the layout. Delete these too, they will be recreated when the frame for the outer table is created. Also the transfer of any existing break to the outer table was missing. Change-Id: Idc2bc1d4c6572702510ae4355e4015c42770eb3e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164788 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2024-02-16Deduplicate and unify SwNodes::Go(Next|Prev)(Section)Mike Kaganski1-6/+6
The "Next" methods are made static, just as "Prev" ones. Overloads taking SwNodeIndex and SwPosition are implemented using a common implementation function, to avoid code duplication. Change-Id: I4035188b5c29d19824cd6d031e05d668d5cf1e86 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163443 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-01-08Revert "Related tdf#76007: Make it possible to insert a Table in a Footnote ↵Julien Nabet1-0/+5
or Endnote" This reverts commit 75680dd751062b7ca34ff91e03de3add3fc973c6. I won't be able to debug layout problems indicated by Miklos. Change-Id: Ie610949a229468ba00d04b3542e14bdb68d7e1dd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161752 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2024-01-07Related tdf#76007: Make it possible to insert a Table in a Footnote or EndnoteJulien Nabet1-5/+0
There's still layout refresh pb. Change-Id: I613cbf77a32452fdc42501e2eaf8450b7dedf327 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161085 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2023-11-24sw: rename the rest of the SwHistory Add() member functionsMichael Stahl1-1/+1
Change-Id: I990fe383341757087d468b3eeae38fca4d8d0175 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159874 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2023-09-28tdf#157492 sw: fix tracked drag & drop of table rowLászló Németh1-2/+2
Selecting table rows by the left row border, and moving them via drag & drop resulted only tracked deletion, but not tracked insertion. See also commit 3e6125c72f8c07c14df42d45571cab44f24e9f70 "tdf#155846 sw tracked table column: fix drag & drop". This reverts also commit 5a1c19624eda0c8b847af0dcee70b82502578ceb "tdf#146965 sw track changes: fix tracked table row moving". Change-Id: I7287e46188eee123b5fd36a5ec7ac5311699840b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157382 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2023-09-28tdf#155846 sw tracked table column: fix drag & dropLászló Németh1-2/+2
Selecting table columns by the top border, and moving them via drag & drop resulted only tracked deletion, but not tracked insertion. See also commit 912336f3c85d9a631fa0ac0f270bab04b204f619 "tdf#154599 sw: fix crash at drag & drop table columns". Change-Id: Ib392f0700ec8c17a342df435c8bb1883967b0711 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157370 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
2023-07-23cid#1538889 Pointer to local outside scopeCaolán McNamara1-1/+2
Change-Id: I32c6336d33b6fa7caa2a3b7861220f12096ae53b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154767 Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-07-19tdf#153115 sw: SwDoc::TextToTable(), first remove all redlinesMichael Stahl1-1/+10
The problem is that there are redlines that overlap the created table cell nodes. For the writerfilter-import-API TextToTable() that was solved by splitting the redlines, but that would take a lot of effort here as it's not known ahead of time where the cells start and end, so just get rid of the redlines. Another issue is that the temporary SwPaM in DocumentRedlineManager::AcceptRedline() caused ~SwIndexReg() assert. (reportedly regression from commit 471212d464f54054f7419ef1890267d0def852d9) Change-Id: I6b211b6c8e5c7e4bdab1dac858707d7d7fd85029 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154655 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2023-07-14tdf#156267 sw: remove DdeBookmarks in SwDoc::DelTable()Michael Stahl1-0/+5
On Copy, a SwTransferDdeLink is created, which also creates a DDE_BOOKMARK (it's the only thing that does that) without Undo. On Delete, the DelTable() creates SwUndoDelete which creates a SwHistoryBookmark; then the DeleteAndJoin() deletes the DdeBookmark. On Undo, the SwHistoryBookmark doesn't find its bookmark, and crashes. Because the DdeBookmark is artificial and deliberately created without Undo, DelTable() should prevent the SwHistoryBookmark by deleting it first. (regression from commit d81379db730a163c5ff75d4f3a3cddbd7b5eddda) Change-Id: Ib24c788a49a6fee364b44a1dbc8d53870c074596 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154440 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2023-07-12Simplify a bitMike Kaganski1-11/+4
Change-Id: I452619c5a1d0b414f09c1e3178fac9905b6d0374 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154349 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-06-15tdf#155685 sw: fix another ExtendedSelectAll Redo crash w table at endMichael Stahl1-10/+36
This can be reproduced with a table containing in the last cell a paragraph followed by a table, then ExtendedSelectAll in the cell and delete. On Redo of the SwUndoDelete: warn:legacy.osl:326138:326138:sw/source/core/frmedt/tblsel.cxx:1775: MakeSelUnions with pStart or pEnd not in CellFrame In function: const_reference std::vector<SwTableBox *>::operator[](size_type) const [_Tp = SwTableBox *, _Allocator = std::allocator<SwTableBox *>] Error: attempt to subscript container with out-of-bounds index 0, but container only holds 0 elements. The problem is that DelTable() calls PaMCorrAbs() with a target that is outside of the outer table, so the SwEditShell::DeleteSel() rPam has one end in the last table cell and other end outside the table. Change-Id: Ia2764a4c99ba12102957153e005284a44be04fd0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153114 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2023-06-06tdf#155685 sw: fix crash on undo of ExtendedSelectAll with table at endMichael Stahl1-127/+135
While the selection with table at the end works for Copy, unfortunately it doesn't work for Delete, because SwUndoDelete can't handle it, and an empty SwTableNode+SwEndNode pair remains. This needs some extra code, extract a SwDoc::DelTable() out of SwDoc::DeleteRowCol() and call it from SwEditShell::DeleteSel() to create separate SwUndoDelete objects per table, which appears to work. (regression from commit d81379db730a163c5ff75d4f3a3cddbd7b5eddda) Change-Id: I1534b100d31bc279bce298d3c2bd235cffc1f9d5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152628 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2023-04-28Revert "Revert "introduce sw::SpzFrameFormat ...""Bjoern Michaelsen1-2/+1
apparently, in SwHistoryChangeFlyAnchor::SetInDoc, m_rFormat might actually reference a DrawFormat, not a FlyFormat, and that is likely fundamentally broken. But for now, lets just make m_rFormat a sw::SpzFrameFormat -- this already removes some pointless up and downcasting. This reverts commit 52acefd6024ec79f8333ba40eef83816eda3046f. Change-Id: I040d98548bf9ac1c25b93214224eb0812f8cb653 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151150 Tested-by: Jenkins Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
2023-04-27Revert "introduce sw::SpzFrameFormat ..."Stephan Bergmann1-1/+2
This reverts commit 09cdcb5f37bb4e42da7b28db6e757b9f2affed14. It broke at least CppunitTest_sw_uiwriter3 (<https://ci.libreoffice.org//job/lo_ubsan/2756/>), > /sw/source/core/undo/rolbck.cxx:938:46: runtime error: downcast of address 0x61300041fd00 which does not point to an object of type 'SwFlyFrameFormat' > 0x61300041fd00: note: object is of type 'SwDrawFrameFormat' > 00 00 00 00 70 83 cf 09 25 7f 00 00 00 83 47 00 30 61 00 00 40 e5 43 00 30 61 00 00 80 66 5d 00 > ^~~~~~~~~~~~~~~~~~~~~~~ > vptr for 'SwDrawFrameFormat' > #0 0x7f24fca9c5b9 in SwHistoryChangeFlyAnchor::SetInDoc(SwDoc*, bool) /sw/source/core/undo/rolbck.cxx:938:46 > #1 0x7f24fca880f3 in SwHistory::Rollback(SwDoc*, unsigned short) /sw/source/core/undo/rolbck.cxx:1208:15 > #2 0x7f24fcb47832 in SwUndoDelete::UndoImpl(sw::UndoRedoContext&) /sw/source/core/undo/undel.cxx:1031:33 > #3 0x7f24fcb703c2 in SwUndo::UndoWithContext(SfxUndoContext&) /sw/source/core/undo/undobj.cxx:225:5 > #4 0x7f2543b8b57c in SfxUndoManager::ImplUndo(SfxUndoContext*) /svl/source/undo/undo.cxx:712:22 > #5 0x7f2543b8c4f8 in SfxUndoManager::UndoWithContext(SfxUndoContext&) /svl/source/undo/undo.cxx:664:12 > #6 0x7f24fca6a074 in sw::UndoManager::impl_DoUndoRedo(sw::UndoManager::UndoOrRedoType, unsigned long) /sw/source/core/undo/docundo.cxx:696:32 > #7 0x7f24fca6b38f in sw::UndoManager::UndoWithOffset(unsigned long) /sw/source/core/undo/docundo.cxx:731:16 > #8 0x7f24fa830b18 in SwEditShell::Undo(unsigned short, unsigned short) /sw/source/core/edit/edundo.cxx:141:57 > #9 0x7f250088f448 in SwWrtShell::Do(SwWrtShell::DoType, unsigned short, unsigned short) /sw/source/uibase/wrtsh/wrtundo.cxx:45:26 > #10 0x7f24ff7f16e2 in SwBaseShell::ExecUndo(SfxRequest&) /sw/source/uibase/shells/basesh.cxx:651:27 > #11 0x7f24ff7eea14 in SfxStubSwBaseShellExecUndo(SfxShell*, SfxRequest&) /workdir/SdiTarget/sw/sdi/swslots.hxx:2203:1 > #12 0x7f2523fbc059 in SfxDispatcher::Call_Impl(SfxShell&, SfxSlot const&, SfxRequest&, bool) /sfx2/source/control/dispatch.cxx:254:9 > #13 0x7f2523fd1ced in SfxDispatcher::Execute_(SfxShell&, SfxSlot const&, SfxRequest&, SfxCallMode) /sfx2/source/control/dispatch.cxx:753:9 > #14 0x7f2523f61333 in SfxBindings::Execute_Impl(SfxRequest&, SfxSlot const*, SfxShell*) /sfx2/source/control/bindings.cxx:1060:22 > #15 0x7f252437496b in SfxDispatchController_Impl::dispatch(com::sun::star::util::URL const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&, com::sun::star::uno::Reference<com::sun::star::frame::XDispatchResultListener> const&) /sfx2/source/control/unoctitm.cxx:688:53 > #16 0x7f2524377211 in SfxOfficeDispatch::dispatchWithNotification(com::sun::star::util::URL const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&, com::sun::star::uno::Reference<com::sun::star::frame::XDispatchResultListener> const&) /sfx2/source/control/unoctitm.cxx:266:16 > #17 0x7f24cad28dd6 in framework::DispatchHelper::executeDispatch(com::sun::star::uno::Reference<com::sun::star::frame::XDispatch> const&, com::sun::star::util::URL const&, bool, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /framework/source/services/dispatchhelper.cxx:163:30 > #18 0x7f24cad27cb2 in framework::DispatchHelper::executeDispatch(com::sun::star::uno::Reference<com::sun::star::frame::XDispatchProvider> const&, rtl::OUString const&, rtl::OUString const&, int, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /framework/source/services/dispatchhelper.cxx:120:16 > #19 0x7f24cad29684 in non-virtual thunk to framework::DispatchHelper::executeDispatch(com::sun::star::uno::Reference<com::sun::star::frame::XDispatchProvider> const&, rtl::OUString const&, rtl::OUString const&, int, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /framework/source/services/dispatchhelper.cxx > #20 0x7f24e91d386d in unotest::MacrosTest::dispatchCommand(com::sun::star::uno::Reference<com::sun::star::lang::XComponent> const&, rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /unotest/source/cpp/macros_test.cxx:94:33 > #21 0x7f25319b2012 in testTdf132321::TestBody() /sw/qa/extras/uiwriter/uiwriter3.cxx:982:5 Change-Id: Ibeb181bc38cd6f88df76403cca8a15b45090633f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151027 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-04-24introduce sw::SpzFrameFormat ...Bjoern Michaelsen1-2/+1
- ... as a base class of frame formats allowed into the spz frame format container - with a private ctor and friends SwDrawFrameFormat and SwFlyFrameFormat so only these two classes derive from it - with that, switch over the SpzFrameFormats to only ever allow these types into the container - in followups, likely quite a bit of stronger typing can be introduced. - ultimately, it would be nice to have each SwDrawFrameFormats and SwFlyFrameFormats in their own strongly typed container in the end. Change-Id: Ic30efc1220aded701533c9ca5003d2aaf8bbdaec Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150452 Tested-by: Jenkins Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
2023-04-20introduce sw::FrameFormats<>Bjoern Michaelsen1-4/+4
- a drop-in replacement for SwFrameFormats - ... but strongly typed sw::FrameFormats<SwTableFormat*> returns SwTableFormats - replace in SwDoc for GetTableFormats - also: use tags to name indices, lose the references to them as members - add an explicit Rename() member to allow both SwFrameFormats and sw::FrameFormat<> to be updated if a format is rename. This should be removed once all SwFrameFormats have been moved to sw::FrameFormats<>. - Ultimately it seems like a few linear iterations of the table formats can be replaced with an index-based accesss by name (in a follow-up). Change-Id: I1c49d64621104c964c95c6da0c84e01ee7f97028 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150243 Tested-by: Jenkins Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
2023-04-04RES_TBLHEADINGCHG no more ...Bjoern Michaelsen1-2/+1
- replaced LegacyModifyHint by a proper SfxHint - Refactor SwTabFrame for table heading change: * split out Invalidate(SwTabFrameInvFlags) * split out HandleTableHeadlineChange() Change-Id: I374db7a3b16a3062d6ad54c32527ec1056cbc00b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149929 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2023-03-31tdf#154486: Use known name when inserting the table into the documentMike Kaganski1-2/+5
... instead of assinging a unique name at insertion time, then changing to the final value. As discussed in commit 1dd71d79e15bd8098e7c17c8fcea3748592a902f (tdf#154486: use importer-local map to deduplicate table names, 2023-03-31), the lookup for a unique table name has an O(n^2) complexity, and can make loading of thousands tables impossible. This changes import time from 23 s to ~2.5 s, and the time now depends on the number of tables linearly (e.g., 200 000 tables load in ~45 s). Change-Id: I0f2b5e37db2d370bccbc8c3430f895c864d9a4c2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149840 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-03-30SwTableFormulaUpdate: SwMsgPoolItem no moreBjoern Michaelsen1-2/+1
- get rid of legacy call with unused WhichId (TABLEFML_UPDATE) - simplify and inlune ChangeSate, by now only handling TBL_CALC - simplify params for UpdateTableFields (explictly just one SwTable*) Change-Id: Ie356c2a17eab0b557efb54719d33e278b887eef5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149591 Tested-by: Jenkins Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
2023-03-27refactor table splitBjoern Michaelsen1-17/+6
Change-Id: Ifd7e77b29205fa505ed2fe41d08b4253f50a99a8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149185 Tested-by: Jenkins Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
2023-03-27refactor table mergeBjoern Michaelsen1-5/+1
Change-Id: Ia4d5b3fc04cc032a182b4bf7f7570fc250ed8504 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148739 Tested-by: Jenkins Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
2023-03-16Related: tdf#154205 skip Invalidating content a11y relations when closing docCaolán McNamara1-0/+1
Change-Id: If6dbc02f1ec22be9f020290572199f89548c76e1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148939 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-03-15Add SwTable::SwitchFormulasToInternalRepresentationBjoern Michaelsen1-23/+6
- and get rid of most of the TBL_BOXPTR stuff it replaces - instead of using a TBL_BOXPTR on UpdateTableFields SwTable::SwitchFormulasToInternalRepresentation should be used - TBL_BOXPTR is not used via UpdateTableFields anymore and an assert assures it will never be Change-Id: I56eca0e339e0d87a60009ea4dd53f4fe96fe639a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148249 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2023-03-06tdf#153819 sw: fix crashing MakeFramesForAdjacentContentNode()László Németh1-2/+5
In Hide Changes mode, copying cells before a tracked deleted table crashed in SwTableNode::MakeFramesForAdjacentContentNode(). Regression from commit 794fd10af7361d5a64a0f8bfbe5c8b5f308617a5 "tdf#147347 sw: hide deleted table at deletion in Hide Changes". Change-Id: I3ac070d35006e61b01a065359431e302e6974e17 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148344 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
2023-03-03Refactor TBL_{REL,}BOXNAME to SwTableBjoern Michaelsen1-3/+1
- because those only modify the fields of that one table - also add lots of const_cast unfortunately, but not because it makes things worse: * this was modifying the table before (thus non-const) * at least now this is a bit more explicit Change-Id: I0174daecabcc6de9b7c9867b24c94659c0dbcafe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148080 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
2023-02-15check GetFEShell()Xisco Fauli1-7/+15
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-08editeng: remove SvxLRSpaceItem::nTxtLeftMichael Stahl1-1/+1
Several parts of SvxLRSpaceItem appear to maintain an invariant of the 3 members nTxtLeft/nLeftMargin/nFirstLineOffset: nLeftMargin is either equal to nTxtLeft if nFirstLineOffset is positive, otherwise equal to nTxtLeft + nFirstLineOffset. But not every part maintains it: there are functions SetLeftValue() and SetLeft() which simply write into nLeftMargin regardless, and a constructor that takes 3 separate numbers without any checks. The constructor calls violate the invariant in 2 ways: nTxtLeft is simply set to 0 (many cases), and one case in OutlineView::OutlineView() that sets nTxtLeft to 2000 but the other 2 at 0. Another odd thing is that the UNO services that expose SvxLRSpaceItem either expose a property for MID_L_MARGIN or for MID_TXT_LMARGIN but never both. It looks like there are 2 distinct usages of SvxLRSpaceItem: for anything that's applied to paragraphs, all 3 members are used; for anything else, nTxtLeft is unused. Try to simplify this by removing the nTxtLeft member, instead GetTextLeft() simply calculates it. Also assert in SetLeftValue()/SetLeft() that nFirstLineOffset is 0. Change-Id: Ida900c6ff04ef78e92e8914beda1cc731a695b06 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146643 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2023-02-03sw layout xml dump: extract SwTable::dumpAsXml() from SwTableNodeMiklos Vajna1-11/+1
The idea is that each class only dumps itself & what it owns, otherwise the same info is dumped multiple times. Change-Id: Ib21bd2d31aa0d70d58b2b8aa453e0ede788c7144 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146511 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2022-12-22check GetEditShell()Caolán McNamara1-5/+3
Change-Id: I975c7dca9ea569e326fc5d8670a078959ab9f093 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144761 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-11-25tdf#141438 Clean old comments //FEATURE::CONDCOLLBogdan B1-4/+0
Change-Id: I350a9c0a033edddf805170534561b6dca0bf5ae0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143172 Tested-by: Jenkins Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2022-11-24add SwFormatAnchor::GetAnchorNode methodNoel Grandin1-4/+4
as a step towards switching away from using SwPosition inside SwFormatAnchor (because SwFormatAnchor wants to do weird stuff with the internals of SwPosition) Change-Id: I1527b6585d1e130b46e1e51b1e40eea043339d8f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143205 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-10-11use more string_view in swNoel Grandin1-3/+3
Change-Id: Ibefb8549834ba5011286e3221f1ae276e2c0c0bf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141153 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-10-09use more SwPosition::AssignNoel Grandin1-2/+1
part of the process of hiding the internals of SwPosition Change-Id: Ibfd5e03966a96338e987b8794c49e6ac92f02153 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141141 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-10-08use more SwPosition::AssignNoel Grandin1-2/+2
part of the process of hiding the internals of SwPosition Change-Id: Icb2d1017f57483b58069f0cb1347793f1d057e08 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141099 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-10-07use more SwPositionNoel Grandin1-3/+3
part of the process of hiding the internals of SwPosition Change-Id: I3107ad6cb8636125ec98342ec4ed69d2c703a74b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141090 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-10-07use more SwPosition::AssignNoel Grandin1-3/+2
part of the process of hiding the internals of SwPosition Change-Id: I7a0990c3fba08c0a8d68fa7007854457e05f0016 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141044 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-09-16create less SwPosition temporariesNoel Grandin1-2/+2
because they need to hook themselves into global rings, which results in a lot of unnecessary pointer chasing Change-Id: I27173c5f0d5e2998fdbfbb7781e2cbd1be6d14b4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140065 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-09-05add InsertText and EraseText overloads that take SwPositionNoel Grandin1-1/+1
part of the process of hiding the internals of SwPosition Change-Id: I7affb1ee002869ea3ed8c7da0c79b1a3750e5c97 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139411 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-09-04the mode parameter to MergeTable is unusedNoel Grandin1-9/+4
and has been since initial import Change-Id: I0bf75a001e4d4b17729f3810210b8db295480697 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139332 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-08-26make the parameter to SwTableNode::MakeOwnFrames optionalNoel Grandin1-11/+7
since most of the call sites seem to be just creating a temporary and then ignoring it Change-Id: Ia50cdd4ce5eca665351d3f76e395178bab827b08 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138879 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-08-24pass SwNode to FindPrvNxtFrameNode instead of SwNodeIndexNoel Grandin1-5/+8
part of the process of hiding the internals of SwPosition Change-Id: Ib0c24ca1179f9c8dd92e9b327daea8a5079cead1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138765 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-08-23use more SwPosition::GetNodeNoel Grandin1-4/+4
Change-Id: Iad8d3247062f459960767487d603711aff01f10e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138698 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-08-20SwNodeIndex->SwNode in ClearBoxNumAttrsNoel Grandin1-2/+2
Change-Id: I7f1bd63bd151b4a00fed23c5507e8474428dc829 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138586 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-08-17convert more nNode to SwPosition::GetNodeNoel Grandin1-2/+2
in places where we are using the result with operator< Change-Id: I2aae14e9130efc31f5afd3450defdf6df4099950 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138403 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-08-14rename SwPaM::GetContentNode to GetPointContentNode/GetMarkContentNodeNoel Grandin1-1/+1
Using a parameter to select point/mark makes the code much harder to read Change-Id: Ic24098a6045ff2262d4c808228ded7bf8206fe8b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138085 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-08-14rename SwPaM::GetNode to GetPointNode/GetContentNodeNoel Grandin1-3/+3
Using a parameter to select point/mark makes the code much harder to read Change-Id: I4ac8b904ac423e2b99253b7e4b6adc72c8afe1a7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138083 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-08-14use more SwPosition::GetNode instead of nNodeNoel Grandin1-2/+2
as part of the process of hiding the internals of SwPosition. This just changes the places we are passing nNode to the constructor of SwNodeIndex Change-Id: I3dffba5df6c044a69da27b6a1254592695b976af Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138200 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-08-13pass SwNode instead of SwNodeIndex to InsertTableNoel Grandin1-4/+4
part of the process of hiding the internals of SwPosition Change-Id: I58e20facfb8987a31e354542a9a5e7824daa0b26 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138235 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>