Commit Graph
1521 Commits
Author SHA1 Message Date
Gabor Kelemen 2633d5f97f Recheck include/ with IWYU
See tdf#42949 for motivation

Change-Id: Ifc253bf800bb1468b5774663a93f4fb30bec81d3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113657
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2021-04-09 11:56:36 +02:00
Noel b624b13b3d loplugin:flatten
Change-Id: Ib7a895fba66f8dc9b6501e61631c02694053b7fc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113157
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-03-26 18:02:19 +01:00
dipanshu124 7ed980aa6a tdf#120469 Move anchored object if enter is inserted at Para begin
Currently the anchored object stays with the empty paragraph if enter
is inserted at the beginning of paragraph. It would be better if the
anchored object moves down in this case.

Change-Id: Iacefd9b2de33522158f155fb7035f1640e8eefe1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112738
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
2021-03-22 14:47:57 +01:00
Caolán McNamara 7a5014b24e silence coverity unchecked return value from library on xmlText* functions
Change-Id: I651abb00d8ae1bdbf758a6a0176fd8912531a585
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112753
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-03-19 21:07:04 +01:00
Noel e4e80ed313 loplugin:staticdynamic now with extra salt
because it wasn't quite there yet - now checks for casts with and
without const, because const doesn't really matter here.

Change-Id: I319025b2095a803fcaad2a7a696d2730b7fd2f81
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112098
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-03-07 13:22:28 +01:00
Michael Stahl c598e0accf sw: fix copying and deleting of table in section via API
This is a follow-up to 7ab349296d.

The first problem was that tables that contain protected cells refused
to be deleted, which caused an infinite loop in
SwXTextRange::DeleteAndInsert().

This also affected SwXTextTable::dispose(), and DDE tables.

Fix this by forcibly deleting even protected cells from UNO APIs;
protection is an UI feature.

The second problem was that pasting the table SwFEShell::Paste() would
set up aCpyPam so that it selects from the start node of the table to
the last text node in the table, excluding the table cell and table end
nodes, which caused:

DocumentContentOperationsManager.cxx:3548: An insufficient number of nodes were copied!

Fix this by setting up aCpyPam over the entire body section of the
clipboard document.

Change-Id: I8c6caee5e75260dff79f106efc11f9669feddc0c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110411
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-02-04 18:34:49 +01:00
Miklos Vajna e267fe1a3d sw: don't repaint all text frames on selecting and deleting several bullets
This is similar to disabling bullets for a paragraph, but in this case
the text nodes are deleted as well.

It seems to me that both invalidations are only useful in the numberging
(e.g. Arabic) case, and not in the bullet case.

Change-Id: Ie03e2847e5e50d9464399f4ea0840910e43a663a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110240
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
2021-02-01 11:50:39 +01:00
Bjoern Michaelsen d77552970a remove SwCache bookkeeping from SwModify
- only very few classes (SwNode, SwFormat) are the "owners"
  of SwBorderAttrs in the SwCache
- this bookkeeping should not be in such a fundamental class of writer
- also: encapsulate most of the interaction with the cache in the new
  sw::BorderCacheOwner. This is mostly to protect the innocent user:
  * As interacting with the SwCache directly is very errorprone, because
    its glorious idea of using void* of the "owners" as keys to the
    entries.
  * In C++, reinterpret_cast<void*>(this) might be different along the
    class heirachy. This might easily slip under the radar of a casual
    user.

Change-Id: I0da774b47885abf52f63aab8d93ebbf41dcf8040
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110112
Tested-by: Jenkins
Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
2021-01-29 23:10:59 +01:00
Bjoern Michaelsen 8addde21e0 Revert "Revert "NotifyClients no more""
- ... and ensure caching gets checked in SwFormat this time.

This reverts commit d988b0cdeb.

Change-Id: Iea887f841c47cde4a025a305eb0984392e3bb5cc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109037
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
2021-01-11 21:43:59 +01:00
Stephan Bergmann d988b0cdeb Revert "NotifyClients no more"
This reverts commit 96bafa464e.  It started to
cause an ASan heap-use-after-free during CppunitTest_sw_uiwriter, see the
comments starting at <https://gerrit.libreoffice.org/c/core/+/108604/
5#message-681a6100cff11cb51d20e5a2b2fb38da1f92ab32> "NotifyClients no more".

Change-Id: Id0eef2e75ea047d4b337c51df929eea81fb69f5a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108717
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-01-05 12:23:16 +01:00
Bjoern Michaelsen 96bafa464e NotifyClients no more
... and prevent recursive invalidation in SwAnchoredObject.

Change-Id: I6f386f3ffded29663fcc74c2679b76c1b839f367
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108604
Tested-by: Jenkins
Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
2021-01-03 22:47:00 +01:00
Jan-Marek Glogowski 2e0b757e62 Rename sorted_vector::erase(size_t) to erase_at
emscripten clang fails with:

sc/source/core/data/attarray.cxx:378:44: \
    error: call to member function 'erase' is ambiguous
                        aNewCondFormatData.erase(nIndex);
                        ~~~~~~~~~~~~~~~~~~~^~~~~
include/o3tl/sorted_vector.hxx:86:15: note: candidate function
    size_type erase( const Value& x )
              ^
include/o3tl/sorted_vector.hxx:97:10: note: candidate function
    void erase( size_t index )

This looks like a compiler error, but if the vector contained
size_t values, this would also be ambiguous to begin with. So
this just renames erase(size_t) to erase_at.

And instead of a 2nd find in the failing code, after copying
the vector, it mow uses std::distance to remove the item.

Change-Id: I7d03ff32352a1890cc01ca241452c0f00d6a9302
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108212
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2020-12-23 11:44:47 +01:00
Michael Stahl 6c1e6b188e tdf#138897 sw: avoid creating SwUndoResetAttr in CopyImplImpl()
The problem is that SwTextNode::CopyCollFormat() both creates the
SwTextFormatColl with undo and applies it with undo.

The first is desirable, the second causes a problem because it
necessarily happens after SplitNode() and currently happens before
copying the non-start/end nodes, so the node-index may not match in
Undo, regardless if it runs before or after SwUndoCpyDoc.

But SwUndoInserts restores the SwTextFormatColl on the node itself,
so it can just be suppressed, which looks easier than refactoring this
to call SplitNode() with Undo enabled.

(regression from b4365b9851)

Change-Id: I4d15fb88cd5ae4cc53d9afb3397dec8fcf7635fa
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107921
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2020-12-18 09:39:28 +01:00
Bjoern Michaelsen 0b5e4ce50b SwSectionFormat: Call SwFrameFormat::SwClientNotify instead of ::Modify
Change-Id: Ic24002ed519b120e83df117fccd76f49753bd3a3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107272
Tested-by: Jenkins
Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
2020-12-06 04:11:12 +01:00
Gabor Kelemen fe88ffb661 tdf#42949 Fix new IWYU warnings in directory sw
Found with bin/find-unneeded-includes
Only removal proposals are dealt with here.

Change-Id: I4bb84c3f401aba8a3dede9cec3a7f2187a2ba02a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106473
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-11-24 15:45:27 +01:00
Noel bb06f51308 loplugin:stringviewparam extend to comparison operators
which means that some call sites have to change to use
unicode string literals i.e. u"foo" instead of "foo"

Change-Id: Ie51c3adf56d343dd1d1710777f9d2a43ee66221c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106125
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-24 09:45:04 +01:00
Bjoern Michaelsen 5fc6a601d7 section.cxx: Remove remaining SwClientNotifyCalls
Change-Id: I569c5952a7491c37c677ad6b6d5f803a50b2e701
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106341
Tested-by: Jenkins
Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
2020-11-23 08:59:35 +01:00
Bjoern Michaelsen 4ee947f221 Refactor SwSectionFormat::UpdateParent
- This ancient piece of code managed to stack premature optimization on
  premature optimization all the while obfuscating the intend pretty
  well.
- It also ultimately resulted in a pessimization, e.g. when a
  SwSectionFormat is found first, in which case GetSection() is called,
  which starts a new loop from the start.

Change-Id: I8e33b3bc592740d7d144e7d4463eb62b27bc8fe4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106327
Tested-by: Jenkins
Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
2020-11-22 09:45:51 +01:00
Michael Stahl 4cf151aa73 sw_fieldmarkhide: adapt SwUndoInsSection with ToX
... similar to commit 405661a98f.

Change-Id: Id4faa6334816f361d5543ba38af50b85dbc2b2a6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106127
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2020-11-19 14:19:29 +01:00
Philipp Hofer 695280feb9 tdf#123936 Formatting files in module sw with clang-format
Change-Id: I6243bc95129bf81a124d006ce0fc1aa1b5f618bb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105718
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Tested-by: Jenkins
2020-11-19 01:33:36 +01:00
Michael Stahl 8d380d1fe9 sw_fieldmarkhide: replace IsHideRedlines() with HasMergedParas()
... where obvious.

Change-Id: Id941d59feea5a3539da9006725ef376b14bc7d1c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105982
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2020-11-17 22:18:58 +01:00
Bjoern Michaelsen 6935532108 replace RES_GRF_REREAD_AND_INCACHE with sw::GrfRereadAndInCacheHint
Change-Id: I8b36fd0dde6f4e7f83cf73dc8b6aefb196babb8f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105571
Tested-by: Jenkins
Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
2020-11-12 00:11:59 +01:00
Bjoern Michaelsen ab72e9fe38 Make SwClientNotifyCall protected
Change-Id: I1da6cd45c5039f2b36ae6d8a64febc69eda9c6d5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105569
Tested-by: Jenkins
Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
2020-11-12 00:11:29 +01:00
Noel Grandin 3d90997fb6 make tools::Long 64-bit on Windows platform
This is only for the 64-bit windows platform.
I don't see the point in messing with the 32-bit platforms, they are
(a) become more and more rare
(b) unlikely to even have enough available process memory to load extremely large calc spreadsheets

The primary problem we are addressing here is bringing
Windows-64bit up to same capability as Linux-64bit when it
comes to handling very large spreadsheets,
which is caused by things like tools::Rectangle using "long",
which means that all the work done to make Libreoffice on 64-bit
Linux capable of loading large spreadsheets is useless on Windows,
where long is 32-bit.

The operator<< for tools::Rectangle needs to be inside
the tools namespace because of an interaction with the cppunit
printing template stuff that I don't understand.

SalPoint changed to use sal_Int32, since it needs to be
the same definition as the Windows POINT structure.

Change-Id: Iab6f1af88847b6c8d46995e8ceda3f82b6722ff7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104913
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-11 06:34:17 +01:00
Miklos Vajna 69edfcf789 DOCX import: fix assertion failure when redline ends right before a ToC
This was always a problem, but now more visible since commit
8b3c861c46 (tdf#89991 DOCX: import Show
changes from older formats, 2019-06-13), as it now affects more
documents: tracked changes can be hidden by the time the initial layout
is created.

With that aside, the immediate problem is an assertion failure in
InsertCnt_(), because it assumes that an end node for a section has to
have a matching pActualSection, created by start node of the same
section. This will fail in case the start node is hidden, but not the
end node.

The deeper problem is that redlines are not supposed to cross section
boundaries: if e.g. multiple cells are selected in a table and the user
deletes while tracking changes, then the UI creates multiple redlines
instead.  The problem here is similar: a delete redline ends right
before the section start, so when SwNodes::InsertTextSection() inserts a
section node, the end of that redline is automatically moved to the
start of the section content (its index increases, the actual SwNode
doesn't change).

Fix the problem by explicitly checking for a redline end at ToX start and
moving it back to the end of last content node. This matches the doc
model produced by the WW8 import.

Change-Id: Ic7b279185a20d2a32abd054d3fc6be530ddde12a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105412
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
2020-11-06 17:58:04 +01:00
Bjoern Michaelsen c44fa10aa2 retire most of SwModify
only remaining uses are:
- in calbck.{c,h}xx
- in uwriter unittests
- as a parameter of SwClientNotify

all other uses have been replaced with sw::BroadcastingModify, which
contains sw::BroadcastingMixin functionality. Existing code should then
be moved to sw::BroadcastingMixin (only) as soon as possible.

Change-Id: Ief7895597633c2fcb97e1cbc182905d75feb1567
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105320
Tested-by: Jenkins
Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
2020-11-05 14:10:32 +01:00
Bjoern Michaelsen 2e32f4ed5a get rid of long deprecated SwModify::BroadcastModify
Change-Id: I9c65de16bf1f1a604c0045444203a16f30f2833e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105318
Tested-by: Jenkins
Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
2020-11-05 08:01:12 +01:00
Bjoern Michaelsen 5f9650e542 move SwCondCollCondChg on top of SfxHint
... and get rid of ModifyNotifications along the way.

Change-Id: I10fc9d24743d50cef771ff63dae004d31dce1846
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105195
Tested-by: Jenkins
Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
2020-11-02 22:34:11 +01:00
Bjoern Michaelsen f899c28f21 ndtbl: remove remaining use of ModifyNotification
Change-Id: I31ccf872fbfaad9867e7e193491a525df46952e0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105198
Tested-by: Jenkins
Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
2020-11-02 21:43:26 +01:00
Bjoern Michaelsen f269467ab5 SwGrfNode: ModifyNotification no more ...
Change-Id: I6c1fda1d92c4e3511113fcd8a8bc09efba96e3e3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105180
Tested-by: Jenkins
Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
2020-11-02 15:07:34 +01:00
Bjoern Michaelsen d0292dd0a3 sw/source/core/undo: ModifyNotification no more ...
- also: introduce SwFormat::RemoveAllUnos() as a member function,
  because that is where this belongs ...
- ... and then also use it elsewhere if possible.

Change-Id: I9cc073a41ef1077429f648309806fa433bdcec99
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105173
Tested-by: Jenkins
Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
2020-11-02 15:05:55 +01:00
Bjoern Michaelsen fccbd1211c move UpdateAttr sanity check to DBG_UTIL
Change-Id: I9a6fd1ef8ea704a0ea3f8182d06cbbe938fd1937
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105137
Tested-by: Jenkins
Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
2020-11-01 21:34:07 +01:00
Bjoern Michaelsen 63076928d4 Make SwClient::ModifyNotification non-virtual
Change-Id: Ic34b0b7a3ad906da5f25103f32a28e2a3efd82fb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105150
Tested-by: Jenkins
Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
2020-11-01 20:56:54 +01:00
Bjoern Michaelsen 59684a321e sw/source/core/doc: Stop abusing observer pattern for code obfuscation.
The old SwClient/SwModify combo is a questionable implementation of the
observer pattern (among other things). The one thing the observer
pattern is good for is dependency inversion: The creator of the message
does not need to know the type of the receiver. Calling the message
handling on the receiver directly introduces tight coupling and entirely
defeats the purpose, leaving us with the worst of both worlds.

In such case, at least be honest about the tight coupling and call a
somewhat more explicit member function of the target.

Thus introduce SwFootNoteInfo::UpdateFormatOrAttr,
SwContentNode::UpdateAttr, remove some useless SwFormatChg clutter in
Set{Foot,End}NodeInfo, and check for some invariants in
SwContentNode::SwClientNotify to limit some of the "a message are two
void pointers" madness.

Change-Id: I32a8d6973231bb5f65c9e144be72d5bcf98f3f44
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105104
Tested-by: Jenkins
Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
2020-11-01 10:35:40 +01:00
Noel f2be3d31cd convert some tools::Long->sal_Int32
in places where it is obvious we only need a sal_Int32, because
we are dealing with rows and columns, and not even calc needs
more than 32 bits for that.

Change-Id: I114417e639c224d45bfd9fc6838122ab195eefa3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104584
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-30 08:57:07 +01:00
Bjoern Michaelsen 6b367107d7 Section: dont call obsolete ModifyNotification directly
Change-Id: Iefc502d5bd7cd3650a4abf3e79794d06fadd894e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104982
Tested-by: Jenkins
Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
2020-10-29 22:16:57 +01:00
Bjoern Michaelsen 9542f3bd21 move ClientNotifyAttrChg to calbck.hxx ...
... and also use it from SwNode.

Change-Id: Icc71eabbc918aa7d61fb0bb4b72c3dd7d91cdbff
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104981
Tested-by: Jenkins
Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
2020-10-29 20:26:34 +01:00
Noel 7a09d67e1c convert some more long -> tools::Long
Change-Id: Ide9811c1a7582454b3fcf655b70ea106ed56509a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104914
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-28 12:03:48 +01:00
Bjoern Michaelsen 6cec484aeb Section/SectionFormat: Modify no more ...
Change-Id: I4f890013401c0ca1313ec0b9f6c2827019759446
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104778
Tested-by: Jenkins
Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
2020-10-26 07:30:59 +01:00
Noel 1e822e401e use tools::Long in sw
Change-Id: I44be72b3a9b14823ec37a3c799cffb4fb4d6e1de
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104527
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-20 08:04:53 +02:00
Noel 51f807841a static_cast after dynamic_cast
Change-Id: I68c20dfbedb84660cf25df785e1e0b13a7592994
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104229
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-13 13:29:26 +02:00
Caolán McNamara 38746ee9df SwUndoDelete::CanGrouping never passed a null SwDoc*
ditto:
SwUndoOverwrite::CanGrouping
SwUndoTOXChange ctor
SwUndoDefaultAttr ctor
SwUndoFootNoteInfo ctor
SwUndoEndNoteInfo ctor
SwUndoRenameBookmark ctor
SwSdrUndo ctor
SwUndoDrawGroup ctor
SwUndoDrawUnGroup ctor
SwUndoDrawUnGroupConnectToLayout ctor
SwUndoDrawDelete ctor
SwUndoOverwrite ctor
SwUndoSplitNode ctor
SwUndoTableCpyTable ctor
SwUndoCpyTable ctor
SwUndoTableStyleMake ctor
SwUndoTableStyleDelete ctor
SwUndoTableStyleUpdate ctor

Change-Id: I138729e37777c7960017f9004c31a533f86315a4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103961
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-10-05 21:24:57 +02:00
Michael Stahl 309868c32f sw: improve comments, dump rowspan to nodes.xml
Change-Id: Ifcd011f6d55ac534c449050d07009680dcd71d51
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103771
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2020-10-05 12:53:55 +02:00
Caolán McNamara 5ec50565b3 MakeCopy family never called with a null SwDoc* arg
Change-Id: I4ba4569a529425a5e92fb3f82990e34ae4db3228
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103877
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-10-04 15:03:32 +02:00
Noel 9373320fc8 loplugin:reducevarscope in sw
Change-Id: Ifed7220c6acf7049b2985f1911a806b37a54d794
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103646
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-09-30 12:32:18 +02:00
Caolán McNamara 55dfe2c12e SwNode::GetDoc can return a reference instead
and remove discovered redundant null checks

Change-Id: I6b8bc9593434f38947e399a48888a8fa0d4f7e77
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103640
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-09-30 09:46:21 +02:00
Caolán McNamara ac94aa6f7d SwNodes::GetDoc can return a reference instead
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-30 09:45:56 +02:00
Caolán McNamara 89f0a8be67 SwNodes never passed a null SwDoc*
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-09-29 20:22:22 +02:00
Miklos Vajna eacb86d332 sw: prefix members of PaMIntoCursorShellRing, SwDPage, ...
... SwIntrnlSectRefLink and SwTextFrameInfo

See tdf#94879 for motivation.

Change-Id: Iecf5a06b020488fae6f209133bcaed016feeb44f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102142
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
2020-09-07 10:51:52 +02:00
Michael Stahl 1d6e919046 tdf#135056 sw_redlinehide: when moving sections to undo nodes-array,
... delete frames with utmost prejudice - the code that was checking
for empty frames or cells was going into infinite loop because
first the *outer* section is moved to the undo nodes array, then when
the *inner* (index header) section is moved, its section node's
m_pStartOfSection points to the section node that is already in
undo nodes array and so SwNodes::GoPrevSection() goes very wrong
and CheckNodesRange() is called with positions in 2 different arrays.

(regression from a60dd9ef13)

Change-Id: I5682ebc2081ffc7dc49a9c43e613f72c26e93673
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101755
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2020-09-01 08:15:53 +02:00