Age | Commit message (Collapse) | Author |
|
Refactored include guards into pragma once for some files
alphabetically c-d in sw/inc.
Change-Id: I8cf8059851169472d7953f4e6f5408666d27c2c4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176688
Tested-by: Jenkins
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
|
|
This takes my load time from 48s to 6s.
The specific problem site is DocumentRedlineManager::SplitRedline,
which is hard hit when loading DOCX files.
Speed it up by caching the redline with the max end pos, which works
because most of the time we are trying to split around a position
which is the past of the end of the existing redlines.
Possibly a better solution would be not to call SplitRedline
at all, but propogating that information around is tricky given
that we are crossing module boundaries here, calling from xmloff/
into sw/
Change-Id: Ia8e5703c1cc9e861e27a24c24f207f12e594ff44
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167892
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
|
|
Text is never clear, it means paragraph in this case, since we have
SwCharFormats for character styles.
Change-Id: Iba21df71053f0b4fbcc0616c024e5cd2972ad44a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165902
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
|
|
Change-Id: If62cf2011ae63501cdf5e87a6ee7402aa74b2b3b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163525
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
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>
|
|
Made accept/reject handle move redlines other pair, (moveto-movefrom)
and handle the whole move redline, even if it is split into small pieces
that separated from each other.
Added unique ID to every move redline to help find their other parts.
This move ID is generated in case of:
move recognition
moveing a paragraph. (directly create move redline with unique id without
calling the recognition it is faster and more stable)
(there are other cases that could be improved to not use recognition,
but generate ID directly, like moveing selected partial text with mouse)
Implemented the odt export/import of this move ID.
it is a tag like this: "<loext:move-id>4</loext:move-id>"
next to creator/date
Improved the docx import to generate this move ID, so move redlines can
find their other parts
(Not changed Docx export... it works a bit, but far from perfect)
Improved move reckognition:
It can find them even if they are split into multiple parts differently.
(like "ab"+"cd" == "a"+"bcd")
Disabled this because of probably performance issue.
made a complex unit test for it.
Note: Left the move recognition on every place, to avoid as much
regressions as possible.. but in the future, we may can disable it
in some cases.
Note2: We will have to keep move recognitnion, because there are documents
from past, saved without any move informations in the file, and users
expect to see move redlines there. (generated by the recognition.)
Change-Id: If968d4235b676c5e538cfaf4187a4482a86eae9f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157740
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158611
Tested-by: Jenkins
|
|
- 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>
|
|
See tdf#42949 for motivation
Change-Id: I99558e6b6952b3f2c1ee32dd07354ff659ad9cd0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131183
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
|
|
and with double strikethrough or underlines during
change tracking to speed up reviewing, e.g. re-ordered
list elements or changed paragraph or sentence order
is more visible this way.
Note: skip terminating white spaces of the changes
during recognition of the text movement, as a
workaround for a typical difference resulted by
e.g. Writer UX: selecting a sentence or a word, and
moving it with the mouse, Writer removes a space at
the deletion to avoid double spaces, also inserts a
space at the insertion point automatically. Because
the result can be different (space before and space
after the moved text), compare the changes without
terminating spaces.
See also commit bcdebc832b272662d28035007a4796e42d1305ae
"tdf#104797 DOCX change tracking: handle moveFrom and moveTo".
Change-Id: If2a16f1f43315ecab659b24425692ac14bcda619
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123814
Tested-by: László Németh <nemeth@numbertext.org>
Reviewed-by: László Németh <nemeth@numbertext.org>
|
|
...introduced in d467cd0dd9e9cf3b018859a592e2638527bc7add "tdf#135683 speedup
DocumentRedlineManager::GetRedlinePos", causing isssues like
> [_RUN_____] SwDocTest::testFileNameFields
> /sw/inc/docary.hxx:238:50: runtime error: load of value 190, which is not a valid value for type 'bool'
> #0 0x2b89dcc7897e in SwRedlineTable::HasOverlappingElements() const /sw/inc/docary.hxx:238:50
> #1 0x2b89dcc40efc in sw::DocumentRedlineManager::GetRedlinePos(SwNode const&, RedlineType) const /sw/source/core/doc/DocumentRedlineManager.cxx:2624:25
> #2 0x2b89df2a4e8c in SwScriptInfo::selectRedLineDeleted(SwTextNode const&, MultiSelection&, bool) /sw/source/core/text/porlay.cxx:2653:44
> #3 0x2b89df285fbe in SwScriptInfo::CalcHiddenRanges(SwTextNode const&, MultiSelection&, std::__debug::vector<std::pair<sw::mark::IBookmark const*, SwScriptInfo::MarkKind>, std::allocator<std::pair<sw::mark::IBookmark const*, SwScriptInfo::MarkKind> > >*) /sw/source/core/text/porlay.cxx:2687:5
> #4 0x2b89df29359b in SwScriptInfo::GetBoundsOfHiddenRange(SwTextNode const&, int, int&, int&, std::__debug::vector<int, std::allocator<int> >*) /sw/source/core/text/porlay.cxx:1917:9
> #5 0x2b89dfa1c1e6 in SwTextNode::CalcHiddenCharFlags() const /sw/source/core/txtnode/ndtxt.cxx:4522:5
[...]
during CppunitTest_sw_uwriter at <https://ci.libreoffice.org/job/lo_ubsan/2135/>
Change-Id: I42c8801f83d2e92a826864494b1f0f4c63f30f6f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122109
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Jenkins
|
|
use binary search
Change-Id: Icd442ba18cb27cdcb5955fa8bbce421b26d5ad44
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121205
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I1e17e43bfe4a18034e9c0ff483097fe6ca0e777a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118782
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
reduces load time by 10%
Change-Id: Ic5c90588825592245d09f8ebe03b13e34676496a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117699
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
can just call IsAlive
Change-Id: I7cd3b33520261b68d549783cabd5cf3f6f4847a3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117696
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
by re-arranging the boost::multi_index key, we can re-use
that index to find all formats matching a name
Change-Id: I3b3b6ceb7137926be3981578a64052f47f279af0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117676
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
in preparation for adding optimised implementations of it for subclasses
Change-Id: I6d8ff54864d2d3c605a1cd0b4da2c6136e2a21cb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117672
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Fix Undo of embedded tracked deletions in paragraphs, for example
Undo of deletions Lorem->Loem->Lm resulted only Loem, moreover
a crash in the case of typing (not tracked) text before the
tracked deletions.
Now the last tracked deletion is chosen by the biggest
SwRangeRedline ID during Undo instead of the lost/modified
redline range in case of hidden redlines of the ChangesInMargin
mode.
Note: revert commit 4ad0459494303745b377c848c681a747f294fc64
(tdf#138135: sw ChangesInMargin: join characters at backspac) to
avoid crash on extra Undo (tdf#137769). Showing deleted
character sequence in margin needs grouping of hidden redlines,
as for managing tracked changes.
Change-Id: Ia9dab5cbbc08f39e05ff8e499efff37bc825c624
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106582
Tested-by: László Németh <nemeth@numbertext.org>
Reviewed-by: László Németh <nemeth@numbertext.org>
|
|
Words deleted by pressing multiple backspaces weren't shown
on margin, only their first letter.
Change-Id: I2f5d0bb057250d3bfd788e1007f1ad24f8c3c2fd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105807
Tested-by: Jenkins
Reviewed-by: László Németh <nemeth@numbertext.org>
|
|
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>
|
|
from 11m46 to 11m21
Used ClangBuildAnalyzer to find headers that took a long time
to parse (in total, across all modules).
(*) moved the boost stuff out of sw/inc/docary into a new header.
(*) make sw/inc/ndtxt no longer include doc.hxx
Change-Id: Ia1d4ebddb4ddd4ec4ffbc011f4a5e24a42b46d3f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89808
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I00ab3a3f6a8bbc85320e7b4fd1aa13af798e7e4c
Reviewed-on: https://gerrit.libreoffice.org/82062
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I084502d8c5607f103ef987b54252ef95341f0bef
Reviewed-on: https://gerrit.libreoffice.org/81981
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
it is just obfuscating the code
Change-Id: I72491d4861d06bd032bb014314c18605967aa3c9
Reviewed-on: https://gerrit.libreoffice.org/72824
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
sooner or later someone is going to need more than 65535 redlines
Change-Id: I34a913a0beaac14b64b58964ace022210a8eac40
Reviewed-on: https://gerrit.libreoffice.org/72773
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
and move the auto-format embedded flag to a separate field
Change-Id: I02155702389178fbfdf874f592d47a29f8759974
Reviewed-on: https://gerrit.libreoffice.org/72771
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Iddfc94618e70d3ca8414d526e58746720610c552
Reviewed-on: https://gerrit.libreoffice.org/69861
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I66e6ce7f2d5f2b9ba8bbf6046a87f2d208a9a768
Reviewed-on: https://gerrit.libreoffice.org/69860
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
this is the single biggest chunk of stuff my upcoming paramtypedef
loplugin will warn about, so do it separately
Change-Id: I412e69e76406d6d947101885d4cd92c65e021508
Reviewed-on: https://gerrit.libreoffice.org/68486
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Ic7e6aa31e5c6d210101da7223a294092ab5b7481
Reviewed-on: https://gerrit.libreoffice.org/62334
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
|
|
At least with the randomised test, it can happen that deleting one
redline will recursively delete other redlines that are located in
the hidden content section of the redline, or at least try to and
crash because those have already been deleted before.
The callers will either delete 1 redline, or delete all of them
via DeleteAndDestroyAll(), so put a safer loop into
DeleteAndDestroyAll() and have DeleteAndDestroy() only delete 1.
Change-Id: I9c4225544a43a4a03f4eb7b6f56e7fe848c8ca54
|
|
...by explicitly defaulting the copy/move functions (and, where needed in turn,
also a default ctor) for classes that have a user-declared dtor that does
nothing other than an implicitly-defined one would do, but needs to be user-
declared because it is virtual and potentially serves as a key function to
emit the vtable, or is non-public, etc.; and by removing explicitly user-
provided functions that do the same as their implicitly-defined counterparts,
but may prevent implicitly declared copy functions from being defined as non-
deleted in the future. (Even if such a user-provided function was declared
non-inline in an include file, the apparently-used implicitly-defined copy
functions are already include, so why bother with non-inline functions.)
Change-Id: Ib4a48431398d40858d9e2ee1fd685b1f223a5423
Reviewed-on: https://gerrit.libreoffice.org/58168
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
SwVectorModifyBase and its DestructorPolicy look like they beg for clean up, but
it's not immediately clear to me what the best solution would be, so just mark
the dangerous status quo with a TODO comment for now.
Change-Id: I24164553baefb124969d4ac37247dabdaead0cd5
Reviewed-on: https://gerrit.libreoffice.org/58169
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
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>
|
|
Change-Id: Ie1639cc4017d696ea3fd9ffb96f1559aa3ac6397
Reviewed-on: https://gerrit.libreoffice.org/49340
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
|
|
Change-Id: I753fcdd35d461880a8d8160213cabd465cfde967
Reviewed-on: https://gerrit.libreoffice.org/48189
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Ia544298334364ece3b3963a4adc00c5e01189b91
Reviewed-on: https://gerrit.libreoffice.org/44654
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mark Page <aptitude@btconnect.com>
|
|
Change-Id: Ifc3c4c31a31ee7189eeab6f1af30b94d64f2f92a
|
|
Change-Id: I5c115389af7d24c18ddaf5fbec8c00f35017a5b4
Reviewed-on: https://gerrit.libreoffice.org/40671
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Icc576de378c27764aa50457f8d548564eb4a3aec
|
|
since...
commit ddd84d08c9bb6e00fbd9a73bd52a28688a8c1ba7
Date: Fri Jul 20 17:16:03 2012 +0200
Convert SV_DECL_PTRARR_SORT_DEL(_SwRedlineTbl) to o3tl::sorted_vector
Change-Id: Ie7edc6b32b373619d4c0ac154da93650743049cf
otherwise that p = nullptr line at the end doesn't make sense
Change-Id: Ibd5230beb87240cba4b3896dfa2217e25a4db697
Reviewed-on: https://gerrit.libreoffice.org/37760
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
|
|
Change-Id: Ib17e612d8d9b9e9fb712f3fdb4dba24d583a6dba
|
|
This is a bad idea as the function is sometimes used to check if a
SwFormat has been deleted, which can happen in Undo.
Replace with ContainsFormat() and IsAlive(), and don't require a
non-const SwFormat parameter so that the dynamic_cast using one
isn't called all the time but only called once where it's safe.
Change-Id: Ib74b79629f5c8ed432a912ada5974a6d816e7d31
|
|
This is a bad idea as the function is sometimes used to check if a
SwFrameFormat has been deleted, which can happen in Undo, and for
SwCallMouseEvent before commit 32403675bf9d2d0380956f9a82da71593edbb53c
Replace with ContainsFormat() and IsAlive(), and don't require a
non-const SwFrameFormat parameter.
Change-Id: I87ede94dfbfe7f6985f13faab4c156015c3a5fc0
|
|
This reverts commit f894da4e687302702d14218138f96ed1c4983124.
the default behaviour of SwVectorModifyBase is to free the
elements in it's destructor
Change-Id: I7a34fe5cc3cb8ffbcbb92068f4bb816dfd9acd43
Reviewed-on: https://gerrit.libreoffice.org/37168
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
This reverts commit 5eaad8eb1d46b6f85605c5ac210e8b1397b18b22.
cause it now leaks as the ~SwVectorModifyBase base deletes the entries
Change-Id: I02374f4b439b9cf3e8f331aa9c6892b4418f37f0
|
|
Change-Id: I10b43a71c8cedc6efbb30056d3da7fd431f04791
Reviewed-on: https://gerrit.libreoffice.org/37121
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I0b20f4dfdbc692e9122f64a11b65bd4234e00ee7
Reviewed-on: https://gerrit.libreoffice.org/37120
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
No automatic tools. Manual checked and tested.
Change-Id: Ife260fa4e1d786cf81f2917a901664cc54943754
Reviewed-on: https://gerrit.libreoffice.org/36371
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Use a static integer counter as identifier to each redline
Change few unit-tets that was testing redlines by using a hardcoded array
index. Instead use these unique redline identifiers now.
Change-Id: I63aec3fc8ab10d0dad0c936600d16e96999a2bcd
Reviewed-on: https://gerrit.libreoffice.org/35276
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
|
|
Change-Id: I1488e2147fa0cd4a821eb5bfe172a58a4e396ace
Reviewed-on: https://gerrit.libreoffice.org/35224
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
|