Commit graph

477847 commits

Author SHA1 Message Date
Noel Grandin
edc5240a96 rename SwPaM::GetContentNode to GetPointContentNode/GetMarkContentNode
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-14 12:03:26 +02:00
Noel Grandin
ab0d9af99b rename SwPaM::GetNode to GetPointNode/GetContentNode
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-14 12:02:57 +02:00
Noel Grandin
25a299a885 use more SwPosition::GetNode instead of nNode
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-14 09:03:59 +02:00
Noel Grandin
8bd23aaffd improve lcl_HighestLevel
only need to check for max when we are incrementing the level

Change-Id: Ic8ae07783b6085c7566239d949cf351a11d0875f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138236
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-08-14 09:03:35 +02:00
Justin Luth
ba8f6ca5b3 tdf#77964 doc import: 0x1 placeholder is for AS_CHAR
It looks like MS always provides an sprm that confirms
this, but Kingsoft was saving without that sprm.

Something similar ought to be done for ImportOLE,
but it doesn't have a ready option for specifying
that, so I just left it because I don't care about OLE.

Change-Id: I0ae304a08b381c8c29f3db24f791f25f5e33b0c1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138234
Tested-by: Jenkins
Reviewed-by: Justin Luth <jluth@mail.com>
2022-08-14 04:37:37 +02:00
Noel Grandin
df3b7599f5 pass SwNode instead of SwNodeIndex to InsertTable
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-13 20:23:26 +02:00
Noel Grandin
89581c26be fix UBSAN downcast...does not point to an object of type 'ScUndoManager'
after
    commit 640a6488a3
    Date:   Thu Jul 28 19:06:59 2022 +0200
    sc: allow undo of typing in 2 views independent from each other

/sc/source/ui/view/tabvwshb.cxx:815:35: runtime error: downcast of
address 0x6030007d3c20 which does not point to an object of type
'ScUndoManager'
0x6030007d3c20: note: object is of type 'EditUndoManager'
00 00 00 00  30 0a 0d 67 ed 7f 00 00  d0 d6 11 00 f0 60 00 00  40 7b b7
00 c0 60 00 00  00 00 00 00
              ^~~~~~~~~~~~~~~~~~~~~~~
              vptr for 'EditUndoManager'
/sc/source/ui/view/tabvwshb.cxx:815:35
SfxItemSet&) /workdir/SdiTarget/sc/sdi/scslots.hxx:1456:1
SfxItemSet&, SfxSlot const*) /sfx2/source/control/dispatch.cxx:1658:9
/sfx2/source/control/bindings.cxx:260:22
/sfx2/source/control/bindings.cxx:1275:17
/sfx2/source/control/bindings.cxx:1220:5
/sfx2/sour

Change-Id: I4a505132184800a26725d602d3e27d1094e3ff65
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138233
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-08-13 20:23:05 +02:00
Noel Grandin
1743d74e87 clang-tidy modernize-pass-by-value in various
Change-Id: Ie091b22bd77d4e1fbff46545bc86c12f1dbafcfe
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138171
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-08-13 19:11:49 +02:00
Noel Grandin
a0b9a7e7f0 pass SwNode instead of SwNodeIndex to CopyFlyInFlyImpl
part of the process of hiding the internals of SwPosition

Change-Id: Ib2ac69352ca7e37117ad449fa7cb9f7cd69dd333
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138232
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-08-13 19:08:46 +02:00
Noel Grandin
0182491e5f pass SwNode instead of SwNodeIndex to GetSectionLevel
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-13 19:08:28 +02:00
Noel Grandin
95639e7473 unique_ptr->optional in DocxAttributeOutput
Change-Id: Idd7432689700ad13765c50c22c30ae230647b24a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138159
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-08-13 18:10:52 +02:00
Noel Grandin
235d12c5f0 pass SwNode instead of SwNodeIndex to MakeEmptySection
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-13 17:05:16 +02:00
Andrea Gelmini
796c626fe7 Fix typo
Change-Id: Ifa97ec24b479c11531e5e73f05da055df74ada60
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138186
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-08-13 16:58:37 +02:00
Andrea Gelmini
788be5ee62 Fix typo
Change-Id: I66a7297e94c152920ac6c00a5a1aa61344a75fe6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138185
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-08-13 16:56:49 +02:00
Noel Grandin
f7748dfefe pass SwNode instead of SwNodeIndex to CopyNode
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-13 15:41:38 +02:00
Noel Grandin
38c1cba406 pass SwNode instead of SwNodeIndex to SwNode constructors
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-13 15:40:07 +02:00
Noel Grandin
9122786717 unique_ptr->optional in SwUndoInsTable
Change-Id: I30920fb2353b5d8616361c995f0947abc3d34370
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138160
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-08-13 14:29:58 +02:00
Caolán McNamara
43c3b74404 cid#1507934 Big parameter passed by value
and

cid#1507935 Big parameter passed by value

Change-Id: I11c2868960a22ca09c82aba9ee343535ac2c5ae8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138228
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-08-13 14:19:05 +02:00
ehsan
9b5f0234da tdf#145614 Convert #define to constexpr
Change-Id: If783e2fbb65cae8e9c79ad9718f344dedf9dfe4f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135074
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
2022-08-13 12:09:17 +02:00
Noel Grandin
740d45184f pass SwNode instead of SwNodeIndex to SwNodes::InsertTextSection
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-13 12:02:41 +02:00
Michael Stahl
f8f9552386 sw: fix crash in InitBookmarks() with forum-mso-en-8410.docx
Error: attempt to dereference a past-the-end iterator.

Probably this only crashes in the assert(iter->pNode...) as the rest of
the function already checks that "iter == end".

(regression from commit 46e04a712e)

Change-Id: If652a15d1cdebb21fbce028fceeaee8dce8f7f6d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138205
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-08-13 11:14:52 +02:00
Caolán McNamara
46784e03d9 complete the FIXME for the font substitution
Change-Id: I9527bce0276f2aa77331f5bb16b21fc6c4402944
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138201
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-08-13 11:12:05 +02:00
Noel Grandin
56cf1d210b pass SwNode to DelFlyInRange instead of SwNodeIndex
part of the process of hiding the internals of SwPosition

Change-Id: I84fd5fbb800c822868840710e1b9fda3de2abaf5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138173
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-08-13 11:05:54 +02:00
Noel Grandin
4ea594c701 pass SwNode instead of SwNodeIndex to SwNodes::SplitTable
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-13 10:13:29 +02:00
Noel Grandin
8d99841e2c pass SwNode instead of SwNodeIndex to SwNodes::MergeTable
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-13 10:13:00 +02:00
Noel Grandin
0cedac9c64 no need to allocate these on the heap
Change-Id: I692428cc8821f3dea53b4d6b52ced965b17f2ec4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138218
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-08-13 10:12:43 +02:00
Arnaud VERSINI
642017c88a bridges/jni : remove useless using and use css instead of com::sun::star
Change-Id: I1b73d68b007ba0dfa54f99ff8f8fea55e94a1ed2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137651
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-08-13 09:11:58 +02:00
Noel Grandin
1c46755808 flatten SwNodes a little
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-13 08:36:48 +02:00
Noel Grandin
aeefec8d79 pass SwNode instead of SwNodeIndex to SwUndoInsert::SwUndoInsert
part of the process of hiding the internals of SwPosition

Change-Id: I00501617d8e602f51fbe6c79ba92654292e30f0f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138214
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-08-13 08:36:24 +02:00
Noel Grandin
dc05dfde93 unique_ptr->optional in UndoTransliterate_Data
Change-Id: Ibb694d7257124a8fe4c22da45c854df3be56526e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138213
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-08-13 08:35:46 +02:00
Noel Grandin
030eb8b168 unique_ptr->optional in SwSubFont::DoOnCapitals
Change-Id: I936d6e7d6bc40b81af10930642ca2a180f27c908
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138161
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-08-13 08:35:18 +02:00
Noel Grandin
cb41806ad9 loplugin:unusedmethods
tweak the python script to code with some clang weirdnes

Change-Id: I88fc9f901748ff44af2b67704cc437b770ef0737
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138196
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-08-13 08:34:01 +02:00
Caolán McNamara
f4027dd967 warning: empty <p> tag
Change-Id: I6fb9dd331fe6ff9e35477a122a84ab0a6d3d8426
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138179
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-08-13 00:35:17 +02:00
Noel Grandin
d57ad60d8e unique_ptr->optional in SwXTextPortion
Change-Id: I6b55ed9fb907473ff2e44bfa0bd5ccced750ca60
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138158
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-08-12 22:12:45 +02:00
Noel Grandin
d624c87094 can store this SwNodeRange on the stack
Change-Id: Ic3e985fc67dcfef7f9fd59c185e1223258123896
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138194
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-08-12 21:31:50 +02:00
Noel Grandin
02821cc814 can store this SwAttrSet on the stack
Change-Id: I9e091c0fbbf75b899962db9d71138dc306c4b90a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138175
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-08-12 21:31:34 +02:00
Noel Grandin
da2bd0555f only store one node pointer/index in SwHyphArgs
rather than two that have to be kept in sync

Change-Id: Ic6443a6af80f63cc40570665d6680f9a49cdb8ec
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138174
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-08-12 21:30:55 +02:00
Michael Stahl
656ff63ed0 tdf#149548 Revert "tdf#119840 loop backwards in ...
... DocumentRedlineManager::SplitRedline"

This reverts commit 4701d17bfe.

Somehow this reintroduces the crash.

Change-Id: If6866cc59a1032f283aa8374d303b028f2cba486
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138094
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-08-12 21:29:46 +02:00
Andrea Gelmini
451b3e8ee8 Fix typo
Change-Id: I354805dc54769cfa4564b0c1fd3be15f6c060b1d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138188
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2022-08-12 21:08:33 +02:00
Caolán McNamara
f6cc8cfae5 fix various glyph substitution asserts when using --without-fonts
Change-Id: I1824e1a4a0ea03ba83e0a02a9436ce7cd728ebc2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138203
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-08-12 20:15:48 +02:00
Noel Grandin
8fa80d7439 unique_ptr->optional in MakeRegion
Change-Id: I7295e337ca45761dc986c2dc660ea9a7432280b3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138151
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-08-12 19:55:24 +02:00
Noel Grandin
b0ec87af1b loplugin:unusedfields
Change-Id: I8d15b380cd02237f688b8946530e1f024b698e90
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138195
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-08-12 19:53:45 +02:00
Noel Grandin
fd26ff2418 tdf#150325 Newly created animated gif is not saved
regression from
    commit 6621c3c67f
    Author: Noel Grandin <noel.grandin@collabora.co.uk>
    Date:   Wed Jun 20 16:51:48 2018 +0200
    loplugin:useuniqueptr in AnimationWindow

Change-Id: I995a278aff3945070af45b01f1e63b253cceb24c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138202
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-08-12 19:53:16 +02:00
Andrea Gelmini
65f6447f89 Fix typo
Change-Id: I2fbcd745717cf6c55f1ff47ca3de9ce12b8e6879
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138187
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2022-08-12 19:27:58 +02:00
Andrea Gelmini
af37006924 Fix typo
Change-Id: Ib7c38adc1a8d4d27197cc65b8bb704699bf1069e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138198
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Jenkins
2022-08-12 18:15:16 +02:00
Andrea Gelmini
5ba38316f8 Remove duplicated include
Change-Id: I2496cdd6652eb5f5c11ba70bc9101cf3e7e0c87d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138197
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Jenkins
2022-08-12 18:14:59 +02:00
Noel Grandin
b0c9f07151 pass SwNode to RestFlyInRange instead of SwNodeIndex
part of the process of hiding the internals of SwPosition

Change-Id: Id56cbeaa67cdbfc620d26c8590f1c9eeaea26281
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138172
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-08-12 17:13:37 +02:00
Justin Luth
835cda5612 related tdf#150197: use SetListFormat or SetPrefix/Suffix
GetListFormat DEPENDS on having managed prefix/suffix itself,
since it uses their getLength to modify the sListFormat.
So any modification via SetPrefix/Suffix
(potentially) invalidates the ListFormat.
I added some code to ensure this doesn't get out of sync.

One place that still uses PREFIX/SUFFIX is old ODT files.
After import they are updated, but during import they use
the old UNO properties, so I didn't add any assert here.

Change-Id: I3bab780fb8e8e985c3573075bc7aac9216d116d8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138073
Tested-by: Jenkins
Reviewed-by: Vasily Melenchuk <vasily.melenchuk@cib.de>
Reviewed-by: Justin Luth <jluth@mail.com>
2022-08-12 16:27:42 +02:00
Mike Kaganski
acf2a2f179 lok: This is tooltip, not alt
Thinko from commit 0b92cf674c

Change-Id: I66a142441f83f8cd43f2579a85651e3364e74c6f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138170
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-08-12 16:08:43 +02:00
Andrea Gelmini
1367614cc0 Fix typo
Change-Id: I7ea9f6ab605dbc06f4c6d0caa152f48490854926
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138184
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Jenkins
2022-08-12 15:43:30 +02:00