850 Commits
Author SHA1 Message Date
Andreas Heinisch aa306ba447 tdf#154463 - Prevent crash from AutoCorrect copying fieldmark char
A wildcard AutoCorrect entry like ".*->.*" copied that character into
its replacement text, inserting a second FIELDSTART into the node which
crashes FindFieldSep.

Extend the delimiter check to the entire 0x01 ... 0x08 char range
put in the text (CH_TXTATR_BREAKWORD, CH_TXT_ATR_FIELDSEP,
CH_TXT_ATR_INPUTFIELDSTART/END, CH_TXT_ATR_FORMELEMENT,
CH_TXT_ATR_FIELDSTART/END).

Change-Id: Ib58bb7e3c614977082cd9d23722497f77fe9ca8a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211447
Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
Tested-by: Jenkins
2026-09-25 14:24:19 +02:00
Andrea Gelmini 6e811dff28 Fix typo in code
Change-Id: Ie0046f75e1e501b7d4e3e4762a5a6f6a3ff08730
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210039
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
2026-08-27 10:42:33 +02:00
Andrea Gelmini d76d4ded86 Fix typos
Change-Id: I39a83a3b7930f46e3b89216146a143ac80d4812a

Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209797
Tested-by: Julien Nabet <serval2412@yahoo.fr>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2026-08-25 15:56:01 +02:00
Pranam Lashkari 417ebad37a Autocorrect: undo of a typographic quote left a straight quote behind
When an apostrophe or quotation mark is typed, autocorrect replaces it
with the matching typographic quote. This was done in two edits: the
typed straight character was inserted first, then replaced with the
typographic one. Since each edit is its own undo step, undoing the
autocorrect first turned the quote back into a straight quote and only a
second undo removed it. In languages that never use straight quotes, for
example French, typing 'un and undoing left a stray straight quote in the
text.

Build the typographic quote with a single edit, so one undo removes the
whole quote.

The change is limited to the quote handling. Autocorrections that insert
a character and then act on something else, such as turning a web or mail
address into a link after a space, keep their existing per-step undo

Change-Id: Ibf47fb8f37d29d5ba180ed692f730d20e9f3e431
Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/5897
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit e2ba52e1996f81ff3b93fa70ecf625b7709d07fb)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207621
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-07-06 10:51:31 +02:00
Xisco Fauli 667fe200a9 Revert "[API CHANGE] remove deprecated XSpell1 and XSupportedLanguages"
This reverts commit bce4b4af9d.

Reason for revert: Revert it for now until there is a policy
for removal of published APIs

Change-Id: Ia1cbcfcd6b953be48a60d8ef67333b1e3265e563
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207150
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-06-23 10:58:29 +02:00
Noel Grandin bce4b4af9d [API CHANGE] remove deprecated XSpell1 and XSupportedLanguages
in favour of their replacements XSpell and XSupportedLocales

Change-Id: I3ad20d0c6c3bf0a00d7ef3947705059027a1ff6f
Signed-off-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/4228
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit 35842d441f2e82204ce77ba8c53735be3f18dc78)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206467
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-06-16 14:55:20 +02:00
Michael Weghorn f26084217a weld: Move weld::Button to own header/Rename weld.hxx
In the past, weld.hxx used to contain the class
definitions for weld::Widget and all subclasses.

By now, weld::Widget and almost all subclasses have
been moved to separate headers, to make it easier
to keep the overview and to avoid having to
recompile ~all UI code when one class changes.

By now, only weld::Button is left in weld.hxx.
Rename the header to Button.hxx.
Drop weld.hxx includes and instead add Button.hxx
includes (or weld::Button forward declarations) where
weld::Button is used.
(Don't simply replace all weld.hxx includes with
Button.hxx ones, since many of them were for the
use of other widgets that have since been moved
to their own headers.)

Add further includes where needed now that the
(direct or transitive) includes of weld.hxx were removed.

Change-Id: I8ea6201446a418d5e38b46337059dcd517ee29d7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205937
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-06-05 07:58:07 +02:00
Michael Weghorn 8f7cf9c32c weld: Move weld::CheckButton to own header
Move the class out of weld.hxx into its own header, in
order to make it easier to keep an overview and to avoid
having to recompile ~all UI code when the class is
modified.

Add missing includes/forward declarations in places
previously depending on transitive includes that
are now dropped.

Change-Id: I3215b358e0fa45ffce08756218c386e1a4d7ebc6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205928
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-06-04 08:39:19 +02:00
Michael Weghorn 911a89ddeb weld: Move weld::WaitObject to own header/source
Move the class out of weld.hxx into its own header and
source file, in order to make it easier to keep an overview
and to avoid having to recompile ~all UI code when the class
is modified.

Change-Id: I91bae842e5b18a83db45de12150c21f75e537fb9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205900
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-06-03 23:19:30 +02:00
Neil Roberts b1e6f3cc25 svxacorr: Use lcl_IsInArr instead of chain of ch=='a'||ch=='b'...
This makes the code a little bit easier to read.

Change-Id: I679d5bb05fa9c7f87828ccd756132098f2403cfb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205449
Tested-by: Jenkins
Reviewed-by: Neil Roberts <nroberts@libreoffice.org>
2026-05-20 20:58:51 +02:00
Neil Roberts b16d490e5a tdf#171135 Disable unrelated auto-format options when making bullets
If bSetNumRule and bSetNumRuleAfterSpace are set then auto formatting is
applied whenever space is pressed on a line with only two characters in
order to convert the two characters to a bullet point if applicable.
However this would also end up running all of the other auto-format
options such as removing trailing spaces. These aren’t designed to be
executed in the middle of editing a paragraph so it would end up
removing the space that the user just tried to type. This patch fixes
that by disabling any unrelated flags in SvxSwAutoFormatFlags before
executing the auto formatting so that only the bullet point formatting
will be applied.

A new method is added to SvxSwAutoFormatFlags to reset all of the flags
to false so that the bullet code can re-enable the relevant ones. In
order to avoid having a long list of assignments that is likely to get
out of sync as new options are added, the flag members of
SvxSwAutoFormatFlags are now declared using a macro that can be reused
to define the assignments.

Change-Id: I33155f45ba6cfd316222ad4d552beeb7979f8f4a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205225
Reviewed-by: Neil Roberts <nroberts@libreoffice.org>
Tested-by: Jenkins
2026-05-19 08:37:23 +02:00
Neil Roberts b07500ec55 autocorrect: Add method to SvxAutoCorrDoc to retrieve paragraph text
The autocorrect functions take as arguments an abstract interface to a
document and a string reference containing the text for the paragraph
being updated. The string needs to be a reference to the actual text
used for the document because the functions rely on it being
automatically updated when modifications are made to the paragraph. This
causes problems when redlines are enabled and the text comes from a
MergedPara because some operations can cause the MergedPara to be
recreated. The SvxAutoCorrect::DoAutoCorrect function has many
workarounds to try and fix this problem. The one from the commit below
tries to fix it for the case where a small group of autocorrect
functions can all be run together by making a temporary copy of the
string. This isn’t ideal because the different functions can no longer
see the result of the other functions. This is particularly bad for the
Esperanto hat function that was added after the patch was created. For
example “cxu” at the start of a sentence will be corrected to “Cu”
instead of “Ĉu” beause the word capitaliser can’t see the result of the
esperanto hat function adding the hat so it only capitalises the letter
“c”.

To fix this this patch adds a method to SvxAutoCorrDoc to get the latest
version of the paragraph text. That way each function can query the
string at the start and it won’t matter if it comes from a recreated
MergedPara. Ideally I think we should eventually move all autocorrect
functions to use this method and then remove the rTxt parameter to make
the code a bit more robust.

commit 22baeb9f9e
Author: Andras Timar <andras.timar@collabora.com>
Date:   Thu Mar 19 10:19:21 2026 +0100

    sw autocorrect: fix use-after-free with track changes enabled

Change-Id: Id407be018bdfa31c6f4642a9503c65e4c9e736d4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205235
Reviewed-by: Neil Roberts <nroberts@libreoffice.org>
Tested-by: Jenkins
2026-05-18 12:37:17 +02:00
Andras Timar 22baeb9f9e sw autocorrect: fix use-after-free with track changes enabled
When typing after a period in a document with tracked changes,
AutoCorrect's FnCapitalStartSentence (and other functions) modify
the document via rDoc.Replace. With track changes enabled, this can
cause the text frame's text to be freed and reallocated, making
the rTxt reference passed to DoAutoCorrect a dangling pointer.

Subsequent autocorrect functions (FnCapitalStartWord,
FnChgToEnEmDash) then read from freed memory, causing heap
corruption detected as STATUS_HEAP_CORRUPTION on Windows.

Fix by making a local OUString copy of rTxt before the block of
autocorrect functions that can modify the document, and passing
the copy instead of the potentially-dangling reference.

Confirmed with Valgrind (Invalid read at svxacorr.cxx:590 in
FnChgToEnEmDash, called from DoAutoCorrect line 1717).

Change-Id: I5e3f2c8d4a1b7e9f0c6d3a2b8e4f1a7c9d5b3e6f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/202151
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
(cherry picked from commit 7fac4f1cbf880711f18084600f616aca2b326829)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205196
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-05-14 21:15:07 +02:00
Neil Roberts 9f822cde2c tdf#172042 Make AutoCorrect replace X’s with circumflexes in Esperanto
Adds an AutoCorrect option that corrects text like “sxangxigxis” to
“ŝanĝiĝis”. The former is a common alternative way to type the special
Esperanto letters when the user doesn’t have the right software
installed to type them properly.

Change-Id: I822f4239667bf60dad77e60497488e04514d46a2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205066
Tested-by: Jenkins
Reviewed-by: Neil Roberts <nroberts@libreoffice.org>
2026-05-14 10:51:43 +02:00
Neil Roberts 7b6d441439 tdf#166019 Fix mask used to disable autocorrect options after load
After loading the autocorrect config, the code tries to unset all of the
flags that weren’t set in the config. However, it was using a hardcoded
magic number for the mask and this wasn’t updated when the DOI option
was added. This patch changes the magic number to be a constexpr that is
declared next to where the flag enum is declared to increase the
likelihood that future contributors will notice it if any more options
are added.

Change-Id: Ieadeb12613e61e57c02e10167cafdf04d6bbbe07
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205042
Tested-by: Jenkins
Reviewed-by: Neil Roberts <nroberts@libreoffice.org>
2026-05-12 09:06:29 +02:00
Andrea Gelmini 23e66a1c71 Fix typo "then"->"than"
Change-Id: I1fb43e16d4a15b7e2cb15939fac408322e3531a3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/202913
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2026-03-29 09:46:56 +02:00
Gabor Kelemen 0a42ddbdf1 tdf#146619 Use more forward declarations in include/xmloff
Change-Id: I49e39d669ba77a99b77322275d2e54e211da5b11
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199386
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen <gabor.kelemen@collabora.com>
2026-02-22 10:42:36 +01:00
Michael Weghorn ab3635b2f3 weld: Move weld::MessageDialog to own header
Move the class out of weld.hxx into its own header, in
order to make it easier to keep an overview and to avoid
having to recompile ~all UI code when the class is
modified.

Change-Id: I5b23b02151c75bb49831a2bbf8d515eb0b54415e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199068
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-02-11 07:32:45 +01:00
Mike Kaganski 9fe65e5c3e Fix setting nullopt to the optional autocorrect entries
Trying to replace the manual management of settings in testTdf151801
with ScopedConfigValue, I found out that it broke other tests there:

 C:/lo/core/sw/qa/extras/autocorrect/autocorrect.cxx(64) : error : Assertion
 Test name: testTdf38394::TestBody
 equality assertion failed
 - Expected: l’« 
 - Actual  : l‹ »

 C:/lo/core/sw/qa/extras/autocorrect/autocorrect.cxx(45) : error : Assertion
 Test name: testTdf92029::TestBody
 equality assertion failed
 - Expected: Ik ben ’s morgens opgestaan
 - Actual  : Ik ben ›s morgens opgestaan

It looked like restoring the settings in ScopedConfigValue dtor had
no effect. But manually testing the restored values using officecfg
demonstrated that it worked as expected: the optional value appeared
empty, as before the test.

It turned out, that the problem was in SvxBaseAutoCorrCfg::Load: it
listened to the registry changes, but only loaded new value, when
it was not empty, meaning that setting a non-empty value, and then
resetting it back to empty would keep the last non-empty value in
SvxAutoCorrCfg.

This change modifies SvxBaseAutoCorrCfg::Load to properly handle
empty values. Booleans are now checked using Any::operator==(bool),
which checks the type. For other values, the usual operator >>= is
used, which is simply no-op for empty Any.

testTdf151801 is modified to use ScopedConfigValue.

Change-Id: Ia3f413583541cde482db234fe73d7f665be507ae
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198502
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
2026-02-02 08:33:09 +01:00
Gabor Kelemen 495fa42afa tdf#146619 Use more forward declarations in include/vcl/weld/
after recent split of these headers

This shaves off another 150M input

Change-Id: Ia4e42781cdc6fd6e795c9fb55c6c24dd641b8f0d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197339
Reviewed-by: Gabor Kelemen <gabor.kelemen@collabora.com>
Tested-by: Jenkins
2026-01-31 11:06:42 +01:00
Heiko Tietze ed0c84dcc7 Resolves tdf#170428 - Add NBSP at quotation for fr-ch
Reverts 8d7ec20395

Change-Id: I436236e17cd3d2387b905a02c972b70e2456929c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198126
Tested-by: Jenkins
Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2026-01-26 15:09:07 +01:00
Gabor Kelemen 31ea498486 tdf#146619 Use more forward declarations in include/vcl/[q-w]*
Found after running bin/find-unneeded-includes --headersfwd include/vcl/[q-w]*

This shaves off about 100M input

Change-Id: Ib4d0af44b383d34d856a9797fe70a974b359402f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196398
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen <gabor.kelemen@collabora.com>
2026-01-18 00:33:10 +01:00
Michael Weghorn 5b16b3acc6 weld: Move weld.hxx and weldutils.hxx to new include/vcl/weld subdir
This is in preparation of moving code out of weld.hxx
to separate headers/source files, in order to make it
easier to keep an overview and to avoid having to
recompile ~all UI code when anything changes.

Also move weldutils.cxx to a new vcl/source/weld
directory.

Change-Id: Ia75b42f21e560dd248307282a522f186a64cd742
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195777
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2025-12-17 18:20:13 +01:00
Mike Kaganski b280efcb9b Drop some uses Sequence::getConstArray
Replace by operator[], begin() and end(), which don't have overhead
since commit 2484de6728 (Remove non-
const Sequence::begin()/end() in internal code, 2021-10-15)
and commit fb3c04bd19 (Drop non-const
Sequence::operator[] in internal code, 2021-11-05).

Change-Id: I221470b3439bb0dc6e7705b0d99deb3cd2063484
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195176
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2025-12-07 12:54:23 +01:00
Caolán McNamara 42de271b19 cid#1557959 Variable copied when it could be moved
and

cid#1660011 Variable copied when it could be moved
cid#1660458 Variable copied when it could be moved

Change-Id: I1073f7d1af6d8055353b5f36e30cf81cafac3fad
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195161
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2025-12-07 11:41:40 +01:00
Caolán McNamara 8416b3b8ce cid#1675328 Variable copied when it could be moved
and

cid#1660521 Variable copied when it could be moved
cid#1660513 Variable copied when it could be moved
cid#1660502 Variable copied when it could be moved
cid#1660458 Variable copied when it could be moved
cid#1660399 Variable copied when it could be moved
cid#1660300 Variable copied when it could be moved
cid#1660011 Variable copied when it could be moved
cid#1659730 Variable copied when it could be moved
cid#1659713 Variable copied when it could be moved
cid#1557959 Variable copied when it could be moved

Change-Id: I974cda301c10ce5c5c79a95d3ef0453195a9e31d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195053
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2025-12-05 11:13:45 +01:00
Samuel Mehrbrodt 5bd1efb830 tdf#168228 Don't replace styles unconditionally
When using Autocorrect->Apply, styles were applied unconditionally.

Add a second checkbox to allow disabling "Apply styles" in that case.

Change-Id: I4891f906b5518f518f3ac3e256e21392ade3f824
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190955
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@collabora.com>
2025-11-10 08:21:52 +01:00
Caolán McNamara 8788657853 drop some more COVERITY stuff
Change-Id: Ib2ac522e2ae5143fee86cb93f1e779f241129087
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192153
Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2025-10-10 11:13:00 +02:00
Mike Kaganski a25c152abb tdf#96787 tdf#168603 Skip primary language list, when country-specific found
... but don't skip the [All] (LANGUAGE_UNDETERMINED) list. See bug 141773
and commits ae56dc05b2 (tdf#96787: AutoCorrect:
after deleting a replacement entry, it's still used, 2021-01-10) and
50be3fa1f0 (tdf#141773 AutoCorrect: fix broken
[All] dictionaries, 2024-06-29).

A separate issue is that the languags list in autocorrect options now lists
[Multiple] and [Undetermined], which shouldn't be there (the latter is the
same as [All]). It needs an own bug and a separate fix.

Change-Id: I1de8879c892efec23ce976b9e450088a22fdd652
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191643
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2025-09-29 23:20:11 +02:00
Mike Kaganski a65d470ad0 Pass string view to FindInWordStartExceptList
It uses the argument to pass to sorted_vector::find; and that can use
the string view instead of OUString.

Change-Id: I9c31aadae82a0dd1d28969ce073a6acc9e5729b5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191585
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
2025-09-29 07:06:42 +02:00
Mike Kaganski 7ff6d60175 Drop loplugin:stringadd exclusion for svxacorr.cxx
Change-Id: I5fe854267738a9ab873c493effbac6bcfe70820c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191577
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
2025-09-28 14:11:10 +02:00
Gabor Kelemen f9af3767bd tdf#146619 Run IWYU on editeng/
Change-Id: I2c124548ab312ec21558f22207952d2315f5a805
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190908
Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
Tested-by: Jenkins
2025-09-19 08:21:25 +02:00
Caolán McNamara e75369aff8 use gperf -fpic friendly version mode
nm -S --size-sort --print-size instdir/program/libmergedlo.so| grep ' [Dd] ' | c++filt | tail -n 10

before:
... 00000000000027f0 d aFmFormShellSlots_Impl
... 0000000000002920 d pRGBTable
... 0000000000003b80 d vcl::pdf::BuildinFontFace::m_aBuildinFonts
... 0000000000004140 d C.16.0
... 0000000000004d80 d (anonymous namespace)::aMethods
... 00000000000066a8 d aRTFTokenTab
... 000000000000cf60 d xmloff::(anonymous namespace)::wordlist
... 000000000000cf60 d xmloff::token::getNames(int)::{lambda()#1}::operator()() const::sppcTokenNames
... 00000000000172c0 d oox::(anonymous namespace)::wordlist
... 00000000000172c0 d oox::TokenMap::getUtf8TokenName(int)::{lambda()#1}::operator()() const::sppcTokenNames

after:
... 0000000000002790 d STR_ARR_SVT_LANGUAGE_TABLE
... 00000000000027a8 d RID_STRLIST_FUNCTION_NAMES
... 00000000000027f0 d aFmFormShellSlots_Impl
... 0000000000002920 d pRGBTable
... 0000000000003b80 d vcl::pdf::BuildinFontFace::m_aBuildinFonts
... 0000000000004140 d C.16.0
... 0000000000004d80 d (anonymous namespace)::aMethods
... 00000000000066a8 d aRTFTokenTab
... 000000000000cf60 d xmloff::token::getNames(int)::{lambda()#1}::operator()() const::sppcTokenNames
... 00000000000172c0 d oox::TokenMap::getUtf8TokenName(int)::{lambda()#1}::operator()() const::sppcTokenNames

See also: https://www.akkadia.org/drepper/dsohowto.pdf

Change-Id: Ic1141c466d06d79d71e573c5f283cd1f089d7067
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/187578
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2025-07-09 16:49:00 +02:00
Mike Kaganski 4cc3dc9cb7 Remove XML_NAMESPACE_NONE noise from editeng
Change-Id: I2bec2d648cca788bac1d2a52118e66a3176cd2aa
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/186097
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2025-06-01 15:21:03 +02:00
Noel Grandin 8c0d8f5071 tdf#141415 reduce time spent loading language data
cache LocaleDataWrapper because otherwise we spend quite a bit of
time doing function-pointer-symbol lookups.

Change-Id: Ic1bd07dabac95a2e1bdad70cffbc2b4cabdc62ed
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183221
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2025-03-22 17:26:53 +01:00
Mike Kaganski 599ab8dc3a Rename con-const vcl::Font property getters for clarity
There are two sets of getters there; and the non-const ones may copy
the COW mpImplFont, and may call its AskConfig.

The name overload is unfortunate. It is not obvious at the call site,
which of the two will be called; and what is different. IMO, the way
to fix it would be to keep only one set of getters (the const one),
and make the call to AskConfig explicit (in the places that set font
name, and know that resolution of other properties will be needed).

But in this change, I only rename the non-const getters, making sure
to keep the behavior unchanged (at least the intention is to have a
non-functional change, meaning that the places that called non-const
overload, now use the renamed functions), to make it clear where we
actually may copy and initialize it.

Change-Id: I9a5cd91d5c1c0de7ff8577b9b982d165e4cdd2c1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183116
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
2025-03-19 17:24:38 +01:00
Mike Kaganski f9cac88fc2 Let ESelection use EPaM for simplification
And drop EPosition, which duplicates EPaM, except for its default
ctor (used in a single place).

Change-Id: I48bb6dafcba84465d61579df0ec71b815945532a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177075
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
2024-11-24 08:12:55 +01:00
Noel Grandin ed0b12f4ea no need to take a copy of the getProcessComponentContext return value
we can just take a "const &".

(found by running clang-tidy with the
performance-unnecessary-copy-initialization warning)

Change-Id: I20fd208c65303da78170b1ac06c638fdf3aa094b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176267
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2024-11-08 15:23:52 +01:00
Caolán McNamara 92f5913aef cid#1556442 COPY_INSTEAD_OF_MOVE
and

cid#1607753 COPY_INSTEAD_OF_MOVE
cid#1554790 COPY_INSTEAD_OF_MOVE
cid#1556463 COPY_INSTEAD_OF_MOVE
cid#1554838 COPY_INSTEAD_OF_MOVE
cid#1556231 COPY_INSTEAD_OF_MOVE
cid#1556878 COPY_INSTEAD_OF_MOVE
cid#1554913 COPY_INSTEAD_OF_MOVE
cid#1558064 COPY_INSTEAD_OF_MOVE
cid#1557043 COPY_INSTEAD_OF_MOVE
cid#1556985 COPY_INSTEAD_OF_MOVE
cid#1556766 COPY_INSTEAD_OF_MOVE
cid#1557351 COPY_INSTEAD_OF_MOVE
cid#1554863 COPY_INSTEAD_OF_MOVE
cid#1556764 COPY_INSTEAD_OF_MOVE
cid#1556279 COPY_INSTEAD_OF_MOVE
cid#1555970 COPY_INSTEAD_OF_MOVE
cid#1556942 COPY_INSTEAD_OF_MOVE
cid#1557964 COPY_INSTEAD_OF_MOVE
cid#1555166 COPY_INSTEAD_OF_MOVE
cid#1556496 COPY_INSTEAD_OF_MOVE
cid#1557175 COPY_INSTEAD_OF_MOVE
cid#1558054 COPY_INSTEAD_OF_MOVE
cid#1557392 COPY_INSTEAD_OF_MOVE
cid#1557850 COPY_INSTEAD_OF_MOVE
cid#1555118 COPY_INSTEAD_OF_MOVE
cid#1557131 COPY_INSTEAD_OF_MOVE
cid#1556614 COPY_INSTEAD_OF_MOVE
cid#1609650 COPY_INSTEAD_OF_MOVE
cid#1555114 COPY_INSTEAD_OF_MOVE
cid#1555241 COPY_INSTEAD_OF_MOVE
cid#1555442 COPY_INSTEAD_OF_MOVE
cid#1556473 COPY_INSTEAD_OF_MOVE
cid#1557654 COPY_INSTEAD_OF_MOVE
cid#1554689 COPY_INSTEAD_OF_MOVE
cid#1556316 COPY_INSTEAD_OF_MOVE
cid#1557929 COPY_INSTEAD_OF_MOVE
cid#1554807 COPY_INSTEAD_OF_MOVE
cid#1554858 COPY_INSTEAD_OF_MOVE
cid#1555103 COPY_INSTEAD_OF_MOVE
cid#1555517 COPY_INSTEAD_OF_MOVE
cid#1556424 COPY_INSTEAD_OF_MOVE
cid#1557252 COPY_INSTEAD_OF_MOVE
cid#1557566 COPY_INSTEAD_OF_MOVE
cid#1608020 COPY_INSTEAD_OF_MOVE
cid#1557742 COPY_INSTEAD_OF_MOVE
cid#1555884 COPY_INSTEAD_OF_MOVE
cid#1554809 COPY_INSTEAD_OF_MOVE
cid#1555336 COPY_INSTEAD_OF_MOVE
cid#1555173 COPY_INSTEAD_OF_MOVE
cid#1556067 COPY_INSTEAD_OF_MOVE
cid#1557040 COPY_INSTEAD_OF_MOVE
cid#1556235 COPY_INSTEAD_OF_MOVE
cid#1557366 COPY_INSTEAD_OF_MOVE
cid#1555910 COPY_INSTEAD_OF_MOVE
cid#1556716 COPY_INSTEAD_OF_MOVE
cid#1558022 COPY_INSTEAD_OF_MOVE
cid#1555769 COPY_INSTEAD_OF_MOVE
cid#1555940 COPY_INSTEAD_OF_MOVE
cid#1557077 COPY_INSTEAD_OF_MOVE
cid#1555270 COPY_INSTEAD_OF_MOVE
cid#1555660 COPY_INSTEAD_OF_MOVE
cid#1556302 COPY_INSTEAD_OF_MOVE
cid#1555678 COPY_INSTEAD_OF_MOVE
cid#1556538 COPY_INSTEAD_OF_MOVE
cid#1557689 COPY_INSTEAD_OF_MOVE
cid#1555009 COPY_INSTEAD_OF_MOVE
cid#1555433 COPY_INSTEAD_OF_MOVE
cid#1555671 COPY_INSTEAD_OF_MOVE
cid#1555255 COPY_INSTEAD_OF_MOVE
cid#1557681 COPY_INSTEAD_OF_MOVE
cid#1557512 COPY_INSTEAD_OF_MOVE
cid#1554958 COPY_INSTEAD_OF_MOVE
cid#1555758 COPY_INSTEAD_OF_MOVE
cid#1555597 COPY_INSTEAD_OF_MOVE
cid#1558040 COPY_INSTEAD_OF_MOVE
cid#1556476 COPY_INSTEAD_OF_MOVE
cid#1557646 COPY_INSTEAD_OF_MOVE
cid#1557950 COPY_INSTEAD_OF_MOVE
cid#1557019 COPY_INSTEAD_OF_MOVE
cid#1557885 COPY_INSTEAD_OF_MOVE
cid#1556402 COPY_INSTEAD_OF_MOVE
cid#1557906 COPY_INSTEAD_OF_MOVE
cid#1556619 COPY_INSTEAD_OF_MOVE
cid#1554683 COPY_INSTEAD_OF_MOVE
cid#1556549 COPY_INSTEAD_OF_MOVE
cid#1554747 COPY_INSTEAD_OF_MOVE
cid#1554929 COPY_INSTEAD_OF_MOVE
cid#1555362 COPY_INSTEAD_OF_MOVE
cid#1557053 COPY_INSTEAD_OF_MOVE
cid#1557891 COPY_INSTEAD_OF_MOVE
cid#1555043 COPY_INSTEAD_OF_MOVE
cid#1555107 COPY_INSTEAD_OF_MOVE
cid#1557203 COPY_INSTEAD_OF_MOVE
cid#1556728 COPY_INSTEAD_OF_MOVE
cid#1557773 COPY_INSTEAD_OF_MOVE
cid#1556845 COPY_INSTEAD_OF_MOVE

Change-Id: I001fb67e597b096e992fd8a0cd6f3ec577767c33
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176098
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
2024-11-06 13:58:54 +01:00
Caolán McNamara 6f1508f4de cid#1555767 COPY_INSTEAD_OF_MOVE
and

cid#1555770 COPY_INSTEAD_OF_MOVE
cid#1555788 COPY_INSTEAD_OF_MOVE
cid#1555789 COPY_INSTEAD_OF_MOVE
cid#1555798 COPY_INSTEAD_OF_MOVE
cid#1555816 COPY_INSTEAD_OF_MOVE
cid#1555822 COPY_INSTEAD_OF_MOVE
cid#1555835 COPY_INSTEAD_OF_MOVE
cid#1555845 COPY_INSTEAD_OF_MOVE
cid#1555859 COPY_INSTEAD_OF_MOVE
cid#1555864 COPY_INSTEAD_OF_MOVE
cid#1555868 COPY_INSTEAD_OF_MOVE
cid#1555892 COPY_INSTEAD_OF_MOVE
cid#1555896 COPY_INSTEAD_OF_MOVE
cid#1555921 COPY_INSTEAD_OF_MOVE
cid#1555932 COPY_INSTEAD_OF_MOVE
cid#1555935 COPY_INSTEAD_OF_MOVE
cid#1555944 COPY_INSTEAD_OF_MOVE
cid#1555952 COPY_INSTEAD_OF_MOVE
cid#1555985 COPY_INSTEAD_OF_MOVE
cid#1556024 COPY_INSTEAD_OF_MOVE
cid#1556038 COPY_INSTEAD_OF_MOVE
cid#1556042 COPY_INSTEAD_OF_MOVE
cid#1556044 COPY_INSTEAD_OF_MOVE
cid#1556060 COPY_INSTEAD_OF_MOVE
cid#1556083 COPY_INSTEAD_OF_MOVE
cid#1556085 COPY_INSTEAD_OF_MOVE
cid#1556090 COPY_INSTEAD_OF_MOVE
cid#1556136 COPY_INSTEAD_OF_MOVE
cid#1556157 COPY_INSTEAD_OF_MOVE
cid#1556159 COPY_INSTEAD_OF_MOVE
cid#1556172 COPY_INSTEAD_OF_MOVE
cid#1556179 COPY_INSTEAD_OF_MOVE
cid#1556187 COPY_INSTEAD_OF_MOVE
cid#1556255 COPY_INSTEAD_OF_MOVE
cid#1556256 COPY_INSTEAD_OF_MOVE
cid#1556266 COPY_INSTEAD_OF_MOVE
cid#1556275 COPY_INSTEAD_OF_MOVE
cid#1556290 COPY_INSTEAD_OF_MOVE
cid#1556294 COPY_INSTEAD_OF_MOVE
cid#1556301 COPY_INSTEAD_OF_MOVE
cid#1556311 COPY_INSTEAD_OF_MOVE
cid#1556318 COPY_INSTEAD_OF_MOVE
cid#1556326 COPY_INSTEAD_OF_MOVE
cid#1556369 COPY_INSTEAD_OF_MOVE
cid#1556374 COPY_INSTEAD_OF_MOVE
cid#1556387 COPY_INSTEAD_OF_MOVE
cid#1556388 COPY_INSTEAD_OF_MOVE
cid#1556417 COPY_INSTEAD_OF_MOVE
cid#1556425 COPY_INSTEAD_OF_MOVE
cid#1556435 COPY_INSTEAD_OF_MOVE
cid#1556495 COPY_INSTEAD_OF_MOVE
cid#1556497 COPY_INSTEAD_OF_MOVE
cid#1556501 COPY_INSTEAD_OF_MOVE
cid#1556503 COPY_INSTEAD_OF_MOVE
cid#1556520 COPY_INSTEAD_OF_MOVE
cid#1556523 COPY_INSTEAD_OF_MOVE
cid#1556562 COPY_INSTEAD_OF_MOVE
cid#1556573 COPY_INSTEAD_OF_MOVE
cid#1556576 COPY_INSTEAD_OF_MOVE
cid#1556598 COPY_INSTEAD_OF_MOVE
cid#1556615 COPY_INSTEAD_OF_MOVE
cid#1556626 COPY_INSTEAD_OF_MOVE
cid#1556671 COPY_INSTEAD_OF_MOVE
cid#1556689 COPY_INSTEAD_OF_MOVE
cid#1556701 COPY_INSTEAD_OF_MOVE
cid#1556713 COPY_INSTEAD_OF_MOVE
cid#1556758 COPY_INSTEAD_OF_MOVE
cid#1556759 COPY_INSTEAD_OF_MOVE
cid#1556788 COPY_INSTEAD_OF_MOVE
cid#1556811 COPY_INSTEAD_OF_MOVE
cid#1556821 COPY_INSTEAD_OF_MOVE
cid#1556824 COPY_INSTEAD_OF_MOVE
cid#1556825 COPY_INSTEAD_OF_MOVE
cid#1556862 COPY_INSTEAD_OF_MOVE

Change-Id: I4925a79688a983bb07252600430039ec0bcb75b8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175678
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
2024-10-26 19:25:03 +02:00
Caolán McNamara 7cf8cffcb8 cid#1633347 COPY_INSTEAD_OF_MOVE
and

cid#1633346 COPY_INSTEAD_OF_MOVE
cid#1633344 COPY_INSTEAD_OF_MOVE
cid#1633343 COPY_INSTEAD_OF_MOVE
cid#1633340 COPY_INSTEAD_OF_MOVE
cid#1608137 COPY_INSTEAD_OF_MOVE
cid#1608131 COPY_INSTEAD_OF_MOVE
cid#1607860 COPY_INSTEAD_OF_MOVE
cid#1607432 COPY_INSTEAD_OF_MOVE
cid#1607394 COPY_INSTEAD_OF_MOVE
cid#1607310 COPY_INSTEAD_OF_MOVE
cid#1607156 COPY_INSTEAD_OF_MOVE
cid#1607093 COPY_INSTEAD_OF_MOVE
cid#1607090 COPY_INSTEAD_OF_MOVE
cid#1607039 COPY_INSTEAD_OF_MOVE
cid#1606709 COPY_INSTEAD_OF_MOVE
cid#1558053 COPY_INSTEAD_OF_MOVE
cid#1558052 COPY_INSTEAD_OF_MOVE
cid#1558042 COPY_INSTEAD_OF_MOVE
cid#1558038 COPY_INSTEAD_OF_MOVE
cid#1558037 COPY_INSTEAD_OF_MOVE
cid#1558034 COPY_INSTEAD_OF_MOVE
cid#1558031 COPY_INSTEAD_OF_MOVE
cid#1558027 COPY_INSTEAD_OF_MOVE
cid#1557994 COPY_INSTEAD_OF_MOVE
cid#1557977 COPY_INSTEAD_OF_MOVE
cid#1557970 COPY_INSTEAD_OF_MOVE
cid#1557966 COPY_INSTEAD_OF_MOVE
cid#1557957 COPY_INSTEAD_OF_MOVE
cid#1557954 COPY_INSTEAD_OF_MOVE
cid#1557941 COPY_INSTEAD_OF_MOVE
cid#1557933 COPY_INSTEAD_OF_MOVE
cid#1557918 COPY_INSTEAD_OF_MOVE
cid#1557907 COPY_INSTEAD_OF_MOVE
cid#1557890 COPY_INSTEAD_OF_MOVE
cid#1557883 COPY_INSTEAD_OF_MOVE
cid#1557881 COPY_INSTEAD_OF_MOVE
cid#1557861 COPY_INSTEAD_OF_MOVE
cid#1557842 COPY_INSTEAD_OF_MOVE
cid#1557840 COPY_INSTEAD_OF_MOVE
cid#1557830 COPY_INSTEAD_OF_MOVE
cid#1557830 COPY_INSTEAD_OF_MOVE

Change-Id: If5ee3396eafdb8b338d9e6cf0705be6e2b431fd5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175577
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-10-25 10:48:12 +02:00
Mike Kaganski 7e5f69aa33 Make tools::Time ctor taking sal_Int64 private
This ctor is meant to set the value of nTime directly; and that value
is not nanoseconds, but an encoded value, using SEC_/MIN_/HOUR_MASK.
But in some places, this ctor was misused for setting of nanoseconds,
which would only accidentally work for values less than one second.
All places that initialized tools::Time with 0, now use EMPTY.

This makes the ctor private; and for the very few cases where really
the encoded value of nTime is stored / restored, fromEncodedTime is
introduced.

Change-Id: I1f1994bd9aab1b51a41b1de637619049fe820da4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175283
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-10-21 10:30:58 +02:00
Caolán McNamara ccbf0c4d6d cid#1607858 silence Overflowed constant
and

cid#1608350 Overflowed constant

Change-Id: I63ad25445df936821c896628b95686a535ef52cf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174209
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
2024-09-30 21:34:33 +02:00
Mike Kaganski 3a37d8320c Optimize TokenMap and AttributeList in oox and xo
Shaves lots of string allocations, and uses optimized code paths

Change-Id: I8e33e2aecdc7e0d2f2c31b774daa36304b3973ac
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173179
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-09-12 23:09:23 +02:00
Caolán McNamara d7056b1456 cid#1558088 COPY_INSTEAD_OF_MOVE
and

cid#1558080 COPY_INSTEAD_OF_MOVE
cid#1558077 COPY_INSTEAD_OF_MOVE
cid#1558055 COPY_INSTEAD_OF_MOVE
cid#1558043 COPY_INSTEAD_OF_MOVE
cid#1558039 COPY_INSTEAD_OF_MOVE
cid#1558015 COPY_INSTEAD_OF_MOVE
cid#1558014 COPY_INSTEAD_OF_MOVE
cid#1558009 COPY_INSTEAD_OF_MOVE
cid#1558002 COPY_INSTEAD_OF_MOVE
cid#1557998 COPY_INSTEAD_OF_MOVE
cid#1557996 COPY_INSTEAD_OF_MOVE
cid#1557990 COPY_INSTEAD_OF_MOVE
cid#1557986 COPY_INSTEAD_OF_MOVE
cid#1557980 COPY_INSTEAD_OF_MOVE
cid#1557971 COPY_INSTEAD_OF_MOVE
cid#1557968 COPY_INSTEAD_OF_MOVE
cid#1557967 COPY_INSTEAD_OF_MOVE
cid#1557961 COPY_INSTEAD_OF_MOVE
cid#1557959 COPY_INSTEAD_OF_MOVE
cid#1557958 COPY_INSTEAD_OF_MOVE
cid#1557956 COPY_INSTEAD_OF_MOVE
cid#1557953 COPY_INSTEAD_OF_MOVE
cid#1557949 COPY_INSTEAD_OF_MOVE
cid#1557947 COPY_INSTEAD_OF_MOVE
cid#1557940 COPY_INSTEAD_OF_MOVE
cid#1557931 COPY_INSTEAD_OF_MOVE
cid#1557930 COPY_INSTEAD_OF_MOVE
cid#1557915 COPY_INSTEAD_OF_MOVE
cid#1557913 COPY_INSTEAD_OF_MOVE
cid#1557910 COPY_INSTEAD_OF_MOVE
cid#1557886 COPY_INSTEAD_OF_MOVE
cid#1557884 COPY_INSTEAD_OF_MOVE
cid#1557880 COPY_INSTEAD_OF_MOVE
cid#1557875 COPY_INSTEAD_OF_MOVE
cid#1557871 COPY_INSTEAD_OF_MOVE
cid#1557862 COPY_INSTEAD_OF_MOVE
cid#1557847 COPY_INSTEAD_OF_MOVE
cid#1557845 COPY_INSTEAD_OF_MOVE
cid#1557844 COPY_INSTEAD_OF_MOVE
cid#1557843 COPY_INSTEAD_OF_MOVE
cid#1557838 COPY_INSTEAD_OF_MOVE
cid#1557835 COPY_INSTEAD_OF_MOVE
cid#1557834 COPY_INSTEAD_OF_MOVE
cid#1557828 COPY_INSTEAD_OF_MOVE
cid#1557823 COPY_INSTEAD_OF_MOVE
cid#1557817 COPY_INSTEAD_OF_MOVE
cid#1557813 COPY_INSTEAD_OF_MOVE
cid#1557812 COPY_INSTEAD_OF_MOVE

Change-Id: I55d4a920daa2d148683419169eb828325fd3c757
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171732
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-08-11 20:14:54 +02:00
Caolán McNamara 7f135227a9 cid#1556131 COPY_INSTEAD_OF_MOVE
and

cid#1556135 COPY_INSTEAD_OF_MOVE
cid#1556146 COPY_INSTEAD_OF_MOVE
cid#1556164 COPY_INSTEAD_OF_MOVE
cid#1556171 COPY_INSTEAD_OF_MOVE
cid#1556177 COPY_INSTEAD_OF_MOVE
cid#1556181 COPY_INSTEAD_OF_MOVE
cid#1556182 COPY_INSTEAD_OF_MOVE
cid#1556183 COPY_INSTEAD_OF_MOVE
cid#1556192 COPY_INSTEAD_OF_MOVE
cid#1556201 COPY_INSTEAD_OF_MOVE
cid#1556208 COPY_INSTEAD_OF_MOVE
cid#1556215 COPY_INSTEAD_OF_MOVE
cid#1556224 COPY_INSTEAD_OF_MOVE
cid#1556227 COPY_INSTEAD_OF_MOVE
cid#1556228 COPY_INSTEAD_OF_MOVE
cid#1556238 COPY_INSTEAD_OF_MOVE
cid#1556246 COPY_INSTEAD_OF_MOVE
cid#1556247 COPY_INSTEAD_OF_MOVE
cid#1556288 COPY_INSTEAD_OF_MOVE
cid#1556293 COPY_INSTEAD_OF_MOVE
cid#1556305 COPY_INSTEAD_OF_MOVE
cid#1556310 COPY_INSTEAD_OF_MOVE
cid#1556317 COPY_INSTEAD_OF_MOVE
cid#1556321 COPY_INSTEAD_OF_MOVE
cid#1556322 COPY_INSTEAD_OF_MOVE
cid#1556331 COPY_INSTEAD_OF_MOVE
cid#1556339 COPY_INSTEAD_OF_MOVE
cid#1556342 COPY_INSTEAD_OF_MOVE
cid#1556351 COPY_INSTEAD_OF_MOVE
cid#1556358 COPY_INSTEAD_OF_MOVE
cid#1556370 COPY_INSTEAD_OF_MOVE
cid#1556379 COPY_INSTEAD_OF_MOVE
cid#1556390 COPY_INSTEAD_OF_MOVE
cid#1556423 COPY_INSTEAD_OF_MOVE
cid#1556532 COPY_INSTEAD_OF_MOVE
cid#1556561 COPY_INSTEAD_OF_MOVE
cid#1556662 COPY_INSTEAD_OF_MOVE
cid#1556704 COPY_INSTEAD_OF_MOVE
cid#1556730 COPY_INSTEAD_OF_MOVE
cid#1556988 COPY_INSTEAD_OF_MOVE
cid#1557071 COPY_INSTEAD_OF_MOVE
cid#1557081 COPY_INSTEAD_OF_MOVE
cid#1557177 COPY_INSTEAD_OF_MOVE

Change-Id: I2c723f0fe9a4eefa62a68f47049ed690d06eb0ba
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170932
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-07-24 22:12:32 +02:00
Yuki Joou cfe6ce1656 tdf#145538 - related: Make tools::PolyPolygon iterable
This patch allows tools::PolyPolygon to be iterated using c++11's
fancy range-based for-loops. It also upgrades a bunch of old-style
for-loops iterating over polypolygons to the new style to make code
more readable.

Note that not all for-loops iterating over polypolygons have been
upgraded, as I didn't find a way to automatically find those. I just
did a few I found manually.

Change-Id: Ifa8d0d44e6f0aa28fdcfd87d70058b12f48c1349
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168730
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2024-07-14 12:24:14 +02:00
Caolán McNamara 21f58d0411 cid#1545929 Using invalid iterator
Change-Id: I7d798b233eae9906f9caff9da411b27d3e26ebb9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169858
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-07-02 13:41:50 +02:00
László Németh 50be3fa1f0 tdf#141773 AutoCorrect: fix broken [All] dictionaries
This reverts commit ae56dc05b2
"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>
2024-06-29 09:25:26 +02:00
Theppitak Karoonboonyanan 76c96ca7c9 tdf#158454 Add Thai Autocorrect Support, coding part
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>
2024-06-21 20:34:22 +02:00