summaryrefslogtreecommitdiff
path: root/sw/inc/ndarr.hxx
AgeCommit message (Collapse)Author
2024-03-05make more symbols private in writerNoel Grandin
Change-Id: I2c4745910fc3654f2021e77f9fa590d3da3464ea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163749 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-02-17Generalize search algorithms in sorted_vectorMike Kaganski
This allows to simplify the code somewhat, and also to relax requirements to the arguments, e.g. allowing to pass const objects to search in vector containing non-const objects. Change-Id: Id34911a8694bbdec275d22b51ca4a0845c9fa4c4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163519 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-02-16Deduplicate and unify SwNodes::Go(Next|Prev)(Section)Mike Kaganski
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-02-15tdf#159565: make sure to handle leading hidden section correctlyMike Kaganski
Change-Id: I41c7d2b6e765f03c72a968fd05e8de7047f1ce41 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163371 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-05-20loplugin:unusedmethodsNoel Grandin
Change-Id: Ief95f111350808f010539bb733a553007d30a9df Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152006 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-09-05use more SwPosition::AssignNoel Grandin
part of hiding the internals of SwPosition Change-Id: Ib9012888a7d75e75a9301ac612349ed28d02a8a3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139359 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-09-04the mode parameter to MergeTable is unusedNoel Grandin
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-25add version of SwNodes::ForEach that takes SwNode paramsNoel Grandin
instead of SwNodeIndex. Part of the process of hiding the internals of SwPosition. Change-Id: I86f3eed9b614295857eb9219d76f3cd00c48a634 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138840 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-08-24pass SwNode to FindPrvNxtFrameNode instead of SwNodeIndexNoel Grandin
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-20Add a SwNodes::Delete variant that takes an SwNodeNoel Grandin
and use it to replace usage of SwPosition::nNode with SwPosition::GetNode Change-Id: I67449ce1cba1ea33c975a546df6e348bffe2d280 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138568 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-08-17pass sal_Int32 to MoveNodes instead of SwContentIndexNoel Grandin
Part of the process of hiding the implementation of SwPosition. Change-Id: I22858f1be5315141e3efd28db7b7cc2c9fdc5c68 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138400 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-08-13pass SwNode instead of SwNodeIndex to InsertTableNoel Grandin
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>
2022-08-13pass SwNode instead of SwNodeIndex to GetSectionLevelNoel Grandin
part of the process of hiding the internals of SwPosition Change-Id: I08f28a918c0d165ef4d143b8121d0aad5771dec0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138231 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-08-13pass SwNode instead of SwNodeIndex to MakeEmptySectionNoel Grandin
part of the process of hiding the internals of SwPosition Change-Id: Ic24e646571eec0ff764d307e20e784d39d8411e4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138230 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-08-13pass SwNode instead of SwNodeIndex to CopyNodeNoel Grandin
part of the process of hiding the internals of SwPosition Change-Id: Icaecb1c2eee09baf3f1630937bca9a96556eb023 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138225 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-08-13pass SwNode instead of SwNodeIndex to SwNode constructorsNoel Grandin
part of the process of hiding the internals of SwPosition Change-Id: I0b2dd3e24c82c1551a7275ffc78991823354858a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138224 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-08-13pass SwNode instead of SwNodeIndex to SwNodes::InsertTextSectionNoel Grandin
part of the process of hiding the internals of SwPosition Change-Id: Iddf8af8c7c9242bd3d9a48a59059b1cc8321be16 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138223 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-08-13pass SwNode instead of SwNodeIndex to SwNodes::SplitTableNoel Grandin
part of the process of hiding the internals of SwPosition Change-Id: I23b23f23f2aeb559861f1328a2d795de5c54a013 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138220 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-08-13pass SwNode instead of SwNodeIndex to SwNodes::MergeTableNoel Grandin
part of the process of hiding the internals of SwPosition Change-Id: Ia3b2563c23aaaf86f58b56bcdd60ded3c9d8404f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138219 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-08-13flatten SwNodes a littleNoel Grandin
SwOutlineNodes does not need to be allocated separately. Change-Id: I134d3293b9b9c489c327b8c283b324875705541f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138215 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-08-06make MakeTextSection take a SwNode, not an SwNodeIndexNoel Grandin
as part of the process of hiding the internals of SwPosition Change-Id: Ia64ddd3e1f34c7c160af0134ef5526faf43108e4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137895 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-08-06no need to allocate on heap hereNoel Grandin
Change-Id: I889690c136f200cffd0398254ec9935e2027a32c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137893 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-08-05introduce GoNextSection(SwPosition... and similarNoel Grandin
as part of the process of hiding the internals of SwPosition No functional change intended Change-Id: Ia34d7f19685308ff2b9bddcfc40f9d13df348b16 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137849 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-08-05introduce SwNodes::GoNext(SwPosition*) and similar GoPreviousNoel Grandin
as part of the process of hiding the internals of SwPosition These are still the easy ones, i.e. no functional change intended Change-Id: Ic1128d9e31fb87c015e1e9e66f5c365b3c2ebdca Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137803 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-12-22tdf#135061 sw_redlinehide: create frames following hidden tableMichael Stahl
When pasting, the entire document body is covered by a delete redline. The insert position is in the last node, following a table; table nodes do hot have any connection to frames if they are hidden by redlines, so MakeFrames() won't create frames for the inserted nodes. Refactor SwNodes::FindPrvNxtFrameNode() so that it can detect that table nodes are hidden in the current layout and continue to search in this case. For multiple layouts, MakeFrames() may need to use different nodes per layout, as the "nearest" one in one layout may be hidden in another. Change-Id: I3bb2c861c861438ac2695ab49dd91dc2bde87db4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127272 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-12-22sw: simplify SwNodes::FindPrvNxtFrameNode(), pEnd is always passedMichael Stahl
Change-Id: I6bd606e8c70704cb716b1eb474934dedb54d81da Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127270 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-10-21introduce SwNodeOffset strong typedefNoel Grandin
for indexing into node children. Replaces various usage of sal_uLong, tools::Long, sal_uInt32 with an underlying type of sal_Int32. Also add a NODE_OFFSET_MAX constant to replace usage of ULONG_MAX Change-Id: I2f466922e1ebc19029bb2883d2b29aa4c0614170 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123892 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-09-29expand out SwNodePtr typedefNoel Grandin
instead of having a mix of SwNode* and SwNodePtr Also change the call signature of FnForEach_SwNodes - passing around a const& to a pointer is both unnecessary and inefficient. Change-Id: Ib2caab53071f434e85f7dc4795cbde38609c28df Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122830 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-09-30SwNodes::GetDoc can return a reference insteadCaolán McNamara
Change-Id: I6c3b2e5b95fb9fac8faa36fc6ae378b92e08fd89 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103639 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-09-29SwNodes never passed a null SwDoc*Caolán McNamara
and some more like that Change-Id: I02dae666d8935a90afd9c43cfb32a048c69a1d4a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103628 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-03-31Translate German variable namesJohnny_M
Ende -> End Change-Id: I5d9cb8b91f20ed957c90558bc41b1da1c2ffb099 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91219 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2019-12-03remove some useless comment linesNoel Grandin
which merely announce that the next declaration is a class Change-Id: Ifdb1398bcd99816b13e0b3769b46d0562bfbc1dc Reviewed-on: https://gerrit.libreoffice.org/84229 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-11-26sw: remove SwNodes::CheckNodesRange()Michael Stahl
Looks like it's the same as ::CheckNodesRange(..., false). Change-Id: I1938892cdba9ff1d9758a0f1b6cb516e28f5d8bd Reviewed-on: https://gerrit.libreoffice.org/83708 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2019-08-01Fix typosAndrea Gelmini
Change-Id: I2238961a7b124652e90e948e27a6ca9d98dc54ac Reviewed-on: https://gerrit.libreoffice.org/76826 Tested-by: Jenkins Reviewed-by: Andrea Gelmini <andrea.gelmini@gelma.net>
2019-01-11use unique_ptr in SwNodes::ExpandRangeForTableBoxNoel Grandin
Change-Id: I31cc9d6b962c116c64789d886b82ea476f4e5144 Reviewed-on: https://gerrit.libreoffice.org/66124 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-09-19sw: add a real create-no-frames flag to MakeCopy/MakeTextNodeMichael Stahl
SwNodes::CopyNodes calling MakeCopy() and then immediately DelFrames() considered silly. Apparently SwOLENode/SwGrfNode don't actually create frames anyway since that is done via their SwFrameFormats, so they just ignore the parameter. Change-Id: I8a8f52da1d25bb5689345e956a33aebd727e8fc7
2018-04-25sw: fix remaining IWYU warnings in inc/*.hxxMiklos Vajna
Also check for not needed forward declarations. Change-Id: I92759f3f40d9458fd192665b39b87a78d8b97e5a Reviewed-on: https://gerrit.libreoffice.org/53418 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-04-07Revert "long->sal_Int32 in tools/gen.hxx"Stephan Bergmann
This reverts commit 8bc951daf79decbd8a599a409c6d33c5456710e0. As discussed at <https://lists.freedesktop.org/archives/libreoffice/2018-April/079955.html> "long->sal_Int32 in tools/gen.hxx", that commit caused lots of problems with signed integer overflow, and the original plan was to redo it to consistently use sal_Int64 instead of sal_Int32. <https://gerrit.libreoffice.org/#/c/52471/> "sal_Int32->sal_Int64 in tools/gen.hxx" tried that. However, it failed miserably on Windows, causing odd failures like not writing out Pictures/*.svm streams out into .odp during CppunitTest_sd_export_ooxml2. So the next best approach is to just revert the original commit, at least for now. Includes revert of follow-up 8c50aff2175e85c54957d98ce32af40a3a87e168 "Fix Library_vclplug_qt5". Change-Id: Ia8bf34272d1ed38aac00e5d07a9d13fb03f439ae Reviewed-on: https://gerrit.libreoffice.org/52532 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-04-04loplugin:useuniqueptr in SwNodesNoel Grandin
Change-Id: If2b317cbafca62c111938840754c6211f60ff898 Reviewed-on: https://gerrit.libreoffice.org/52344 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-04-03long->sal_Int32 in tools/gen.hxxNoel Grandin
which triggered a lot of changes in sw/ Change-Id: Ia2aa22ea3f76463a85ea077a411246fcfed00bf6 Reviewed-on: https://gerrit.libreoffice.org/48806 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-28Fix some IWYU warningsMiklos Vajna
Change-Id: I5aa3744ee7f26dfefecbe9b9fa6aef700049ff32 Reviewed-on: https://gerrit.libreoffice.org/50469 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-11-27loplugin:countusersofdefaultparams in sw (2)Noel Grandin
Change-Id: Ibb045a0b7750cf6807d6f5caba86a9e6e59828ae Reviewed-on: https://gerrit.libreoffice.org/45237 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-31Drop bDelayed from SwNodes::MakeGrfNodeJan-Marek Glogowski
There is no caller, which sets bDelayed. The comment "// create object delayed, only from a SW/G-reader" doesn't help me much either. But in case of a linked image, it seems appropriate to just drop the empty image and use the delayed SwGrfNode constructor. At least a linked PDF and PNG still work. Change-Id: Idff5599ac0ff04c3efcb141c731c0ee1cfa747de Reviewed-on: https://gerrit.libreoffice.org/43908 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2017-10-23loplugin:includeform: swStephan Bergmann
Change-Id: Ifc3c4c31a31ee7189eeab6f1af30b94d64f2f92a
2017-10-23loplugin:finalclasses in swNoel Grandin
Change-Id: I3b1d689d5eb800a36466376bca735dd31fe4567c Reviewed-on: https://gerrit.libreoffice.org/43639 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-04loplugin:constparams in sw part4Noel Grandin
Change-Id: Ic42b2691869b61ba906222db893e284d8b9c39c1 Reviewed-on: https://gerrit.libreoffice.org/40767 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-04loplugin:constparams in sw part3Noel Grandin
Change-Id: I05ad3204af4e6ec3c832b185a1b35fdb75a229b2 Reviewed-on: https://gerrit.libreoffice.org/40760 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-03loplugin:constparams in sw part2Noel Grandin
Change-Id: I51ae0e8caaf46f141d3d15ace47612df1e476de7 Reviewed-on: https://gerrit.libreoffice.org/40735 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-06sw: comment cosmeticsMichael Stahl
Change-Id: I572bf8b28738e82e2f207b5201a0c27d9d9b623d
2017-05-08loplugin:checkunusedparams in sw(part2)Noel Grandin
Change-Id: Ic6829542628ed1f5ed7d6b3d6be1d28ed1b5c75b Reviewed-on: https://gerrit.libreoffice.org/37292 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>