Age | Commit message (Collapse) | Author |
|
for the ItemInstanceManager the identification was done
using typeid/hash_code, but that has problems - it is
only defined to be identical for two instances of the
same type, but other types can have the same code.
Thanks to Noel to find that out, that is not reliable
to be used.
In the meantime we have SfxItemType to identify Item
instances, so I changed the code to use that.
The master had five additionally added Items that
use the (2a) method of this mechanism (see comments
in svl/source/items/globalpool.cxx for that). The
gloal is to use as less as possible of this Items in
that mechanism, so I checked.
For four of these hashing was used, so the mem/runtime
aspect is okay -> access is fast enough to prefer
mem over runtime. Adding hashed Items (or any other
fast mechanism) is always okay.
One did not have that (SvxBoxItem) and used just the
fallback ItemInstanceManager, so I removed it. We
now have 18 Items for which that mechanism is
initialized immediately.
Noel also already moved the countdown for starting
to use the mechanism in case of default handling
(case (1), NUMBER_OF_UNSHARED_INSTANCES) to the
unorderd_set. someting I had already planned to do,
too - thanks!
Change-Id: Icf6f427e5ea64672f385357aaad75bb5b7fcbf98
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170314
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
|
|
and
cid#1607910 COPY_INSTEAD_OF_MOVE
cid#1607818 COPY_INSTEAD_OF_MOVE
cid#1557402 COPY_INSTEAD_OF_MOVE
cid#1556530 COPY_INSTEAD_OF_MOVE
cid#1557396 COPY_INSTEAD_OF_MOVE
cid#1556522 COPY_INSTEAD_OF_MOVE
cid#1555628 COPY_INSTEAD_OF_MOVE
cid#1554705 COPY_INSTEAD_OF_MOVE
Change-Id: Iae3fbf4a04bf3714f416995640b9d70fe204cf73
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170321
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
|
|
This reverts commit 85fd526fc681a994415bb422090d1d23aa7d54f6.
Change-Id: I5019f72f88497f50a77666d57f2d16c2749bd1c9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170218
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I40a4dc9bc13bfb769b2f9f15b0ab1ff9490639da
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170076
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
|
|
found by doing some git grepping, we should now have values
for all items in the hierarchy
Change-Id: I397ca7e8f53f53737201385c4c8029b436895c1d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170016
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
|
|
after commit 85fd526fc681a994415bb422090d1d23aa7d54f6
"fix and simplify the ItemInstanceManager mechanism"
The problem is that some *Item classes in sw/ and sc/
share WhichIds, and a whole bunch of SfxBoolItem
subclasses share the same SfxItemType enum value.
So we ended up mixing and matching objects
of different concrete subclasses in a given
*ItemManager collection.
Add some asserts to the global pool code to catch
issues like this earlier on.
Add unique value of the SfxItemType enum for all
the SfxBoolItem subclasses
Change-Id: I3c8d4e02be1cd412b0292e973a6498df5f8e7102
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170003
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Ic96d53c113cd6ae5b805df5a8e80d4da7adfec59
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169966
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
|
|
Change-Id: Ic5c78a0de4e7edafc0ba97bf69d43c377f7b5503
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169633
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Ic03c78f6dde68f5557d474147336fa62be6f3aaa
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169967
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
The mechanism is currently broken because it uses hash values as keys,
in two different places. But hash values are not required to be unique,
and as soon as there are enough items of a given type, a collision is
inevitable.
So just simplify this whole mechanism. There is no reason we need
type-specific item managers. Stuff everything into a single global pool,
that uses hashing correctly.
Notes
(*) Performance, as far as I can tell, is the same or slightly better.
(*) I removed the NUMBER_OF_UNSHARED_INSTANCES thing, in favour
of just having a simpler mechanism
Change-Id: I9068baf9bf6fae2500ae5748c6d1aabe6c3a18a4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169709
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
|
|
Change-Id: I7d798b233eae9906f9caff9da411b27d3e26ebb9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169858
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
|
|
Change-Id: Id790c9f8433e7dd780aeaec1a1dd614c6ab3daa9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169791
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
|
|
Change-Id: Icd6bf3bc72ac9728b4a7f3c602cb919bfdef18e6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169790
Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
|
|
otherwise we get the weird behaviour where two SvxTabStop instances
which are constructed the same, return false from operator==
because one instance has had getDecimal() called on it, and the
other not.
Change-Id: I1f708c1b1e03efcd9fc554eaf2777c4c3e8a80b8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169774
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
|
|
Change-Id: I073ac7358c1bcb82992ec7746f4b3986d6d35633
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169755
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
This reverts commit ae56dc05b27f05ffcee99845d661a237e70a7a51
"tdf#96787: AutoCorrect: after deleting a replacement entry, it's still used".
Change-Id: Ifb4cf1b359b852c7610337d4bd389a8ca5dce610
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169713
Tested-by: Jenkins
Reviewed-by: László Németh <nemeth@numbertext.org>
|
|
Change-Id: I7aa939681720bc0dc81c8f114a3608a8cdfb4f60
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169722
Tested-by: Julien Nabet <serval2412@yahoo.fr>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
|
|
which did I not see when I did
commit cb3c65fb706cb1c7c9224222fd16875e924a9759
Author: Noel Grandin <noel.grandin@collabora.co.uk>
Date: Thu Jun 27 19:24:28 2024 +0200
assert when SfxObjectItems are modified while in a pool
Change-Id: I16e2ee72eda4b3ca69f83eb70ad4f4b0a14748a2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169696
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
which has always been a problem, but becomes a more obvious problem when
I implement some upcoming optimisations
Change-Id: I8b0368b0b8e9a726c71d241841afeed3876281d9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169657
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
|
|
If the paragraph marker is formatted as Uppercase,
then Uppercase is applied to that line's numbering as well.
However, if the marker is formatted as SmallCaps,
it MUST NOT be applied for MSO formats.
Apparently MSO only supports Uppercase and SmallCaps,
not Lowercase or Titlease.
I don't like these adhoc exceptions, so I didn't
attempt to apply them to ODF formats.
Let's keep it simple for ODF - any char format that applies
to the entire paragraph should apply to numbering as well
(except for the existing underline/overline exceptions).
- if you don't like that char attributes apply at all, blame MSO.
- if you don't like that DOCX is missing your goofy formatting,
blame MSO for being inconsistent.
ooxmlexport12's tdf143384_tableInFoot_negativeMargins.docx
is almost interesting because it applies superscript
and small caps. However, the list is already uppercase,
so it can't be used for the test.
make CppunitTest_sw_ooxmlexport21 \
CPPUNIT_TEST_NAME=testTdf43767_caseMapNumbering
Change-Id: I273baebc996adfd001e1c591dbb9aef9272a42f0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169476
Reviewed-by: Justin Luth <jluth@mail.com>
Tested-by: Jenkins
|
|
create a template class to reduce repetition
Change-Id: I8c9c71fdfdac20a3b34432affac07aa1d46e8373
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169613
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
|
|
Change-Id: I324a1814fc1b3321eed5b29922790600e7092c17
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169344
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
|
|
CheckIdleFormatter() already does that
Change-Id: Ie6b9e3285303899e3f67cccb0fc5f5625c8db684
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169343
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
|
|
so we have the implementation in one class, instead of bouncing
back and forth between two.
Change-Id: I851578ff553b01fb7d48cf5aa8f7a2d795496751
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169340
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
|
|
SvxAutoCorrDoc::ChgAutoCorrWord() implementations: correct multiple patterns
* include/editeng/svxacorr.hxx, editeng/source/misc/svxacorr.cxx:
- Add classes SvxAutocorrWordList::{Iterator,WordSearchStatus}.
- Make SvxAutocorrWordList::SearchWordsInList() return WordSearchStatus
so the search can be continued with the added
SvxAutocorrWordList::SearchWordsNext() method.
- Make SvxAutoCorrect::SearchWordsInList(), and its lcl_SearchWordsInList()
companion, return WordSearchStatus propagated from
SvxAutocorrWordList::SearchWordsInList().
- SvxAutocorrWordList::WordMatches():
The existing mechanism of preventing collision of patterns like in
tdf#83037 (→ and ← and ↔ autocorrect collisions) was by storing
the matched string of wildcard pattern back to the list without
overwriting existing one. If the matched string was found in the list,
it would just be treated as no matching.
While this worked well for collision prevention, it caused failure
on the new exhaustive wildcard pattern visiting method when autocorrecting
the second text chunk with the same content. In such situation,
all intermediate stages of corrections of the first text chunk would be
recorded into the list. And, in the second chunk, the first stage would
just be applied from the recorded pattern, but all the next stages
would be refused due to the "collision" with the recorded patterns.
Moreover, the new method would cause the list to grow more quickly
as the autocorrections are done.
To solve the problem, just "peek" for the collision instead of
actually storing it. And SvxAutocorrWordList::ContainsPattern()
is added for this purpose.
* editeng/qa/unit/core-test.cxx:
- Modify TestAutoCorrDoc::ChgAutoCorrWord() to iterate through all patterns,
instead of finishing at the first one.
* editeng/source/editeng/edtspell.cxx:
- Ditto for EdtAutoCorrDoc::ChgAutoCorrWord().
* sw/source/core/edit/acorrect.cxx:
- Ditto for SwAutoCorrDoc::ChgAutoCorrWord().
- SwAutoCorrDoc::ChgAutoCorrWord(): Remove old dead code for autocorrection
on text with redlines.
* sw/qa/extras/uiwriter/uiwriter6.cxx,
+sw/qa/extras/uiwriter/data/tdf158454.odt:
- Add unit test "testTdf158454".
Change-Id: I8fb4a628a977b79b0ed2f239fd3749f15823b5df
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160160
Tested-by: Jenkins
Reviewed-by: Jonathan Clark <jonathan@libreoffice.org>
|
|
Change-Id: I4bc67811e228b4806db9f9b9bf9fb0de0eb36de2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169263
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Ia216da9bd7764f2d21aaee761a02eafda88d892e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169257
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
|
|
Copy a single world from the Impress bugdoc to Writer, number of
paragraph styles increase from 126 to 221, while only +0 or +1 are
expected.
It seems the problem is that the editeng doc of the shape refers to all
styles of the masterpage and we write the style table before the
content, so we export all styles to be on the safe side.
Fix the problem by iterating the paragraphs of the selection in the
"copy" (not "export") case, assuming that typically the selection
doesn't refer to all available styles in the document, and the number of
paragraphs in a shape is not a large amount.
An alternative would be to limit the style import on the RTF reading
side, but not producing those not needed styles in the first place looks
superior.
Change-Id: I43e4c542e530ff6422357a28399718e89fdbabe9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169251
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
|
|
Change-Id: I0b82778c57b0da2dc4f1e685349d5f423a3d4090
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169241
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
|
|
Change-Id: I3bcbaa4005e65ecdb8d1344a792a465b83aec9fe
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169237
Tested-by: Julien Nabet <serval2412@yahoo.fr>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
|
|
Change-Id: I7aa8ed716998a185996482dc561219b398a1c919
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169080
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
so we have the implementation in one class, instead of bouncing
back and forth between two.
Change-Id: I103c53783b286be0c8472b1850e3cf3e3d6a925f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169057
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
so we have the implementation in one class, instead of bouncing
back and forth between two.
Change-Id: I437ab776ccf50dda6c34d458c6a7eaaea09e4d7b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169056
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
so we have the implementation in one class, instead of bouncing
back and forth between two.
Change-Id: Ic2387c75209496ea9301e4c5a129c56e15cfe955
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169055
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
so we have the implementation in one class, instead of bouncing
back and forth between two.
Change-Id: I9ca9c6cfe1b92de8ef6fa93ccc0a4c84a11e8686
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169054
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
so we have the implementation in one class, instead of bouncing
back and forth between two.
Change-Id: Ic0d740d336f291f80d82989283dafc0704e97958
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169053
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
|
|
The SfxPoolItem has a new member SfxItemType m_eItemType to
compare types based on enums instead of typeinfo() which
consumes a lot of time e.g. while AutoFormat is running
Change-Id: I033ce67bc9a28ee4790f162380314de85fb4154e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166452
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
|
|
so we have the implementation in one class, instead of bouncing
back and forth between two.
Change-Id: Ied2b0ed968987f44446abf1066b7e9af106e909d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169039
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
so we have the implementation in one class, instead of bouncing
back and forth between two.
Change-Id: I3979577a82539c6b9d36bef0faa2a34689be2a17
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169038
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
ever since
commit 2d8056d884ee3ab7b4454c378618dceb6f5a7ae8
Author: Noel Grandin <noel.grandin@collabora.co.uk>
Date: Thu Apr 4 10:55:36 2024 +0200
loplugin:unusedmethods
Change-Id: I2ccdbf45ac688e39df23fd69b8ec21efebad044c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169003
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
|
|
so we have the implementation in one class, instead of bouncing
back and forth between two.
Change-Id: I153b36b8cc5e91f46bff42dba2f36fce733a8df9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169002
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
so we have the implementation in one class, instead of bouncing
back and forth between two.
Change-Id: I75995fb7640977276feeea2e2963725974adbe42
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169001
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
|
|
so we have the implementation in one class, instead of bouncing
back and forth between two.
Change-Id: Ie653fc6880e096ca4fad4dc1cf77bb3f16915dbf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169000
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
so we have the implementation in one class, instead of bouncing
back and forth between two.
Change-Id: I55f419e08323d0fe7cc16bc525fc93920980f4c1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168999
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
so we have the implementation in one class, instead of bouncing
back and forth between two.
Change-Id: Ie755b1cbc175d98756f6e6ecc173f32c65c7ff7c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168955
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
|
|
so we have the implementation in one class, instead of bouncing
back and forth between two.
Change-Id: I061481f7218bc0365c6783662c24642da5f63370
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168954
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
|
|
so we have the implementation in one class, instead of bouncing
back and forth between two.
Change-Id: Ifc82d3dd2624868f812533b9df9a34af51a06888
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168953
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
so we have the implementation in one class, instead of bouncing
back and forth between two.
Change-Id: Iec53dad76756241b0f0ec31e76def89e336ee6ad
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168952
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
|
|
so we have the implementation in one class, instead of bouncing
back and forth between two.
Change-Id: I07642b427461d76f4fb0a48158598d62f1d2d24e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168951
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
|
|
so we have the implementation in one class, instead of bouncing
back and forth between two.
Change-Id: I65f827cd4cf5fdb2a9f0db5f0a26bfce38629222
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168950
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|