322 Commits
Author SHA1 Message Date
Andrea Gelmini dcc6b53e0c Fix typos
Change-Id: Iffb8e4d53fa6a3b9f4c2a1a5e2547bef60c8304d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209940
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
2026-08-25 11:31:10 +02:00
Alexandru Ogrezeanu 531fa71b48 tdf#147021 Replace SAL_N_ELEMENTS() macro with std::size()
Change-Id: I40bdf727a41ec17e7b78aca6505ac468aaf73dd0
Signed-off-by: Alexandru Ogrezeanu <alexogrezeanu2004@gmail.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204894
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
2026-06-02 09:50:49 +02:00
zanaira 2a8cd66367 tdf#147021 Use std::size() instead of SAL_N_ELEMENTS in paper.cxx
Change-Id: I459812a9a04931762ba17cd9416e21bf0bb7bb5f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204652
Tested-by: Jenkins
Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2026-05-19 12:32:29 +02:00
Stephan Bergmann 811769f009 Consistently use __EMSCRIPTEN__ instead of EMSCRIPTEN macro
...as emsdk 5.0.3 deprecated the predefined EMSCRIPTEN macro (see
<https://github.com/emscripten-core/emscripten/commit/506052bd8b4e23ded7f2351c62ca3b24d40c8cf3>
"Warn about usage of deprecated EMSCRIPTEN macro. NFC (#26381)"), causing
failures like

> In file included from static/source/unoembindhelpers/PrimaryBindings.cxx:29:
> In file included from include/sfx2/viewsh.hxx:35:
> In file included from include/editeng/outliner.hxx:32:
> In file included from include/tools/color.hxx:26:
> include/osl/endian.h:66:15: error: macro 'EMSCRIPTEN' has been marked as deprecated: use __EMSCRIPTEN__ instead [-Werror,-Wdeprecated-pragma]
>    66 | #elif defined EMSCRIPTEN
>       |               ^
> /home/sberg/emsdk/5.0.4/emsdk/emscripten/main/cache/sysroot/include/emscripten/emscripten.h:35:66: note: macro marked 'deprecated' here
>    35 | #pragma clang deprecated(EMSCRIPTEN, "use __EMSCRIPTEN__ instead")
>       |                                                                  ^

To avoid confusion, also suppress the -D$(OS) in
solenv/gbuild/platform/unxgcc.mk that would unnecessarily keep defining
EMSCRIPTEN.

Change-Id: Ic1f187cf1c6417cd95d4092e9cea01a665bd1b2f
Reviewed-on: https://gerrit.collaboraoffice.com/c/core/+/34
Reviewed-by: Michael Stahl <michael.stahl@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit 50291c2ed83bdb49bb827a4a12905d94b8c42035)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205167
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-05-14 10:11:38 +02:00
Jonathan Clark 7d4a9f683c tdf#168698 i18nutil: Adjust Syriac justification rules
This change makes two adjustments to the Syriac justification kashida
insertion position algorithm:

- Previously, the first pass scanned from end to midpoint exclusive.
  This has been updated so kashida positions at the midpoint are
  prioritized over kashida positions in the first half of the word.

- Fixes a bug that made midpoint calculation include vowel marks and
  other diacritics.

Change-Id: I615cde5cdb54e7afe5fccdf4d536ce7aef211395
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204141
Reviewed-by: Jonathan Clark <jonathan@libreoffice.org>
Tested-by: Jenkins
2026-04-23 04:33:30 +02:00
Jonathan Clark e09c5de0c6 tdf#63929 sw: Show bidi control characters as formatting marks
Updates Writer to visually indicate the following Unicode bidi control
characters when "Show Formatting Marks" is enabled:

- U+200E LEFT-TO-RIGHT MARK
- U+200F RIGHT-TO-LEFT MARK
- U+202A LEFT-TO-RIGHT EMBEDDING
- U+202B RIGHT-TO-LEFT EMBEDDING
- U+202C POP DIRECTIONAL FORMATTING
- U+202D LEFT-TO-RIGHT OVERRIDE
- U+202E RIGHT-TO-LEFT OVERRIDE

Change-Id: I1989eb793f8f89633c067a4bcbf0f1245dc0b9f0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/203132
Reviewed-by: Jonathan Clark <jonathan@libreoffice.org>
Tested-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2026-04-01 19:08:28 +02:00
AnamayNarkar 5936fab3e6 tdf#106137 i18nutil: Add helper to process Unicode escapes
Adds a new utility function processUnicodeEscapes() to i18nutil.
This supports parsing:
* Standard escapes: \uhhhh (e.g. \u0041)
* Extended escapes: \Uhhhhhhhh (e.g. \U0001F600)
* Escaped backslashes: \\

Change-Id: I589eb2403376c8cef694f52f1c785d42fba94ff9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198777
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2026-03-03 07:19:32 +01:00
Mike Kaganski 6171ccd8e6 tdf#162488: do not assume printer drivers only providing portrait paper
This assumption is false e.g. for Microsoft XPS Document Writer, where
both portrait and landscape paper are in the list. The orientation and
the size of the paper must be detected from the dimensions.

Change-Id: Ibcfc68f64243ec144743a385f73586ca67f0cbe5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199824
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
2026-02-20 14:39:44 +01:00
Mike Kaganski 6de0be9005 Avoid multiple divisions when looking for paper
Also use o3tl::convert to convert from mm100 to mm

Change-Id: If42cd5854c01a1609084c5e816c7ece5da76e7f4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199127
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2026-02-11 17:12:36 +01:00
Mike Kaganski dc21a19d91 Define to constexpr
Change-Id: I65ab39fc9645e495e607094c329642f3a34f86dd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199126
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2026-02-11 13:52:46 +01:00
Gabor Kelemen 3fc666e120 Fix some non self contained headers in modules [a-r]*
Change-Id: I844cfcfa2bc31fae0256e0c7b757b6223ac8ac35
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196633
Reviewed-by: Gabor Kelemen <gabor.kelemen@collabora.com>
Tested-by: Jenkins
2026-01-18 00:34:04 +01:00
Jonathan Clark 69e902d085 tdf#162120 Implement style:writing-mode-automatic
Implements the ODF 1.2 paragraph attribute style:writing-mode-automatic,
and supporting runtime features. When set, this attribute allows
programs to automatically recompute the paragraph writing mode when the
contents of the paragraph have been edited.

The ODF standard does not suggest any particular algorithm for
automatically determining paragraph direction. This implementation uses
the rules from Unicode UAX #9 3.3.1.

Currently, LO will only automatically change the writing direction when
new text is typed or deleted. Other known interesting cases are already
tracked as separate enhancement requests.

Change-Id: I49eecea36952588dc98f2a98ebce712cd2846c0c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193547
Reviewed-by: Jonathan Clark <jonathan@libreoffice.org>
Tested-by: Jenkins
2025-11-13 04:45:50 +01:00
Xisco Fauli 0ddd3d71a5 ICU: fix version check
after
commit a02e38567e
Author: Xisco Fauli <xiscofauli@libreoffice.org>
Date:   Fri Oct 31 14:40:11 2025 +0100

    ICU: upgrade to 78.1

Thanks to Taichi for spotting it

Change-Id: I6d850da770108f784d3faffdf7cea027cb3933de
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193451
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2025-11-05 12:34:59 +01:00
Xisco Fauli a02e38567e ICU: upgrade to 78.1
0001-ICU-23054-const-up-struct-that-gencmn-outputs.patch.2 and
Wunnecessary-virtual-specifier.patch have been fixed
upstream

Downloaded from https://github.com/unicode-org/icu/releases/tag/release-78.1

Change-Id: Iaec032611e6616f7d553d4c807b75dfa21a32e7d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193269
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2025-11-03 11:40:50 +01:00
Mike Kaganski ab23b2cdde Replace some defines with proper C++
Change-Id: I5e31e9c07b416c5ac51ef1b868ed8f74d0fd4e12
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192679
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
2025-10-20 11:49:16 +02:00
Mike Kaganski ae2b099101 Using static non-thread-local variables as cache is scary
I think that these functions may easily be used in different threads.
No idea how useful the cache is (if at all: do we call the functions
repeatedly for same character often enough?); but at least it must be
correct.

Change-Id: Ide2f7317bed55e201cd075ca93ee617e16a2654e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192678
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2025-10-20 11:07:17 +02:00
Jonathan Clark 1df13d7ff1 tdf#166012 Implemented GUI support for style:script-type
Previously, when authoring documents containing multiple languages,
certain characters (e.g. smart quotes) could use the wrong/undesired
font. For example, if a Chinese word is quoted inside English text, the
right quotation mark would use the Chinese font rather than the
intuitively-expected English font. Users had no way to control this
behavior.

With this change, Writer will now set an appropriate style:script-type
hint when the user manually specifies a language for a selection in the
user interface. This can be used to quickly correct instances of the
above problem.

Change-Id: I6f8c924d230e3518272e2abb1cbea5e0e7451e9b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/186394
Reviewed-by: Jonathan Clark <jonathan@libreoffice.org>
Tested-by: Jenkins
2025-06-12 04:54:55 +02:00
Mike Kaganski 58a7c6ccfd tdf#166943: zero passed to AllowMoreInput means "no more input"
Users of ToggleUnicodeCodepoint keep reading next characters to the left,
until AllowMoreInput returns false (or selection ends). Attempting to
read more characters to the left then there are, SwCursorShell::GetChar
returns 0. This needs to be treated by AllowMoreInput as hard stop. It
failed, when the previous character was a combining character.

Change-Id: I203b150154e1948d4cebfd69442e30a076710f46
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/186341
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2025-06-11 05:52:28 +02:00
Jonathan Clark 0b979c50b6 tdf#166011 Implemented style:script-type
Implemented the ODF 1.0 style:script-type text property. This property
can be used by documents to influence which script type-dependent
attributes are used when rendering certain characters.

This implementation uses the following semantics:

- If unset, the behavior is as it was in previous versions.
- If set to latin, asian, or complex, those characters not mapped by the
  ODF standard to a script type are treated as latin, asian, or complex,
  respectively.
- If set to ignore, all characters will be treated as latin. This value
  is intended to be used for interoperability with file formats that
  don't implement script types (e.g. HTML).

Change-Id: If81a1390ee455fd971dea655d161d9c3f44fd08a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/186309
Tested-by: Jenkins
Reviewed-by: Jonathan Clark <jonathan@libreoffice.org>
2025-06-10 07:09:17 +02:00
Jonathan Clark 86ffb10882 tdf#166104 sw: Fix for apostrophes changing to Asian font
Regression from 537645c083
"tdf#66791 sw: Treat weak punctuation as Asian in Asian paragraphs"

The fix for tdf#66791 extended the script change scanner to always treat
weak quotation-like punctuation as Asian script in paragraphs containing
Asian characters. That new behavior emulates the behavior of other word
processing programs.

Unfortunately, the change proved too disruptive. This change
substantially reverts the new behavior added for tdf#66791, but leaves
the refactoring and testing work intact.

Change-Id: I9eaf91f27a4e8f7440c949a713c6b64fe8dc579b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185812
Tested-by: Jenkins
Reviewed-by: Jonathan Clark <jonathan@libreoffice.org>
2025-05-29 17:14:48 +02:00
Taichi Haradaguchi 5d09908418 Update ICU to 77.1
Downloaded from https://github.com/unicode-org/icu/releases/tag/release-77-1

Change-Id: I05060c281b70ad7e9733268796b695d1cf4ea30a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175841
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2025-03-14 09:54:11 +01:00
Mike Kaganski 6d78861299 tdf#164989: Disallow combining characters when a hex already appeared
We either expect a single (maybe combined) character to convert into "U+"
notation, or a sequence of hexadecimal numbers (possibly with U+) for
conversion to characters. If we already saw a hexadecimal ASCII character,
it can't be preceded by a character combining with it, so stop as soon as
such an unexpected character appears.

Change-Id: Ic480fe8f173240eb263d5a77286b149c933049a6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181007
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2025-02-02 12:01:13 +01:00
Jonathan Clark 1afdda6bca tdf#164493 Update script change algorithm to always make progress
Fixes ofz#385256118 Timeout on ImpEditEngine::InitScriptTypes.

Previously, the script assignment algorithm could backtrack in certain
cases where a script run ends with weak characters that should be
included in the following run. Fuzz testing unearthed a case involving
right-to-left override and a CJK combining mark, which caused the
algorithm to make no progress and hang.

The algorithm now always makes progress on each iteration.

Change-Id: I4da138c51d391c152afcee2428c21dc762a2dafc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179888
Tested-by: Jenkins
Reviewed-by: Jonathan Clark <jonathan@libreoffice.org>
2025-01-07 16:44:06 +01:00
Jonathan Clark 9b505f5839 tdf#66791 sw: Apply first-seen script type to leading weak characters
Previously, leading weak characters were always assigned a script type
derived from the application language. This change updates the algorithm
to instead use the logical-order first-seen non-weak script type.

Change-Id: I5f6732c6faa1eb35aff51e98e82a87c8008f70ab
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179824
Tested-by: Jenkins
Reviewed-by: Jonathan Clark <jonathan@libreoffice.org>
2025-01-06 13:45:19 +01:00
Jonathan Clark de29bec27e tdf#163660 sw: Treat strong CJK inside RTL runs as Asian script
Previously, Asian-script characters following an explicit direction mark
or inside an RTL embedding would be rendered using the Complex font,
rather than the Asian font. This change updates script detection to
treat these characters as Asian regardless of text direction.

This change also consolidates more duplicated script detection code from
Writer and Edit Engine.

Change-Id: I3931c3ec0cb447f3c504fdbfb3ee62185fd14422
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178817
Tested-by: Jenkins
Reviewed-by: Jonathan Clark <jonathan@libreoffice.org>
2024-12-19 18:18:30 +01:00
Jonathan Clark 537645c083 tdf#66791 sw: Treat weak punctuation as Asian in Asian paragraphs
This change modifies script detection to treat certain weak punctuation
marks, particularly left- and right- quotation marks, as Asian script in
paragraphs containing Chinese and Japanese characters, but no Complex
characters. This change improves our script detection compatibility with
other programs.

As part of this change, duplicated script detection code has been
extracted from Writer and Edit Engine, and consolidated.

Change-Id: Ib2880f2e832aaac4c0093971daa88223c7232d63
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178608
Tested-by: Jenkins
Reviewed-by: Jonathan Clark <jonathan@libreoffice.org>
2024-12-16 22:46:05 +01:00
Bogdan Buzea 1b8c22c319 tdf#163486: PVS: Identical branches
V1037 Two or more case-branches perform the same actions. Check lines: 438, 446
V1037 Two or more case-branches perform the same actions. Check lines: 442, 450
V1037 Two or more case-branches perform the same actions. Check lines: 483, 659
V1037 Two or more case-branches perform the same actions. Check lines: 492, 896
V1037 Two or more case-branches perform the same actions. Check lines: 501, 791, 944
V1037 Two or more case-branches perform the same actions. Check lines: 549, 725
V1037 Two or more case-branches perform the same actions. Check lines: 552, 842
V1037 Two or more case-branches perform the same actions. Check lines: 618, 642
V1037 Two or more case-branches perform the same actions. Check lines: 648, 734
V1037 Two or more case-branches perform the same actions. Check lines: 698, 854
V1037 Two or more case-branches perform the same actions. Check lines: 974, 977

Change-Id: Iadd03f3813deaffcebdb1a661489b86b83bf9d5b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175219
Reviewed-by: David Gilbert <freedesktop@treblig.org>
Tested-by: Jenkins
2024-11-01 01:20:27 +01:00
Jonathan Clark 224fae69b2 tdf#163215: Enable kashida justification for AAT fonts
Currently, we use HarfBuzz-provided kashida insertion position
information to decide on positions to insert kashida. This data is used
both while ranking kashida insertion positions, and to avoid inserting
kashida in positions that would break shaping on a per-font basis.

Unfortunately, HarfBuzz cannot validate kashida insertion positions for
AAT fonts. As a result, kashida were previously not inserted for text
using AAT fonts.

This change updates kashida justification to skip validation against
HarfBuzz when AAT fonts are used.

Change-Id: If0d31512b1db0f1f8155963f9b1031eb01bacc45
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175165
Tested-by: Jenkins
Reviewed-by: Jonathan Clark <jonathan@libreoffice.org>
2024-10-18 21:49:03 +02:00
Jonathan Clark 99c7cf2816 crashtesting: fix font-dependent infinite loop in kashida justification
Commit c3c29d31d7 (tdf#140767 Implemented
Syriac justification) indirectly introduced a font-dependent infinite
loop in Writer layout by relaxing some restrictions on kashida candidate
positions. The infinite loop was found in tdf97806-2.odt.

This change fixes an underlying logic bug in Writer, which caused Writer
to attempt to apply kashida justification to non-Arabic/Syriac CTL
scripts. This change also reintroduces some of the previously-lifted
restrictions on kashida candidate positions.

Change-Id: I783bf327f4ef0f1f6a032f0d3dddbcfd60a026fa
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174503
Tested-by: Jenkins
Reviewed-by: Jonathan Clark <jonathan@libreoffice.org>
2024-10-05 00:05:05 +02:00
Jonathan Clark c3c29d31d7 tdf#140767 Implemented Syriac justification
This change extends kashida justification to Syriac, using custom
insertion rules.

Change-Id: I7508d2c32e95abb12a098e989c7153828ba81c87
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173990
Tested-by: Jenkins
Reviewed-by: Jonathan Clark <jonathan@libreoffice.org>
2024-09-27 03:50:01 +02:00
Jonathan Clark d8f430e4be tdf#163105 Use HB data while selecting kashida insertion positions
Previously, Writer and Edit Engine would skip inserting kashida in words
if the highest-priority candidate position is marked as invalid by
HarfBuzz. This would happen even if the word contained multiple
lower-ranked valid candidate positions.

This change updates Writer and Edit Engine to pass HarfBuzz kashida
position data to the selection algorithm. The algorithm has been updated
to return the highest-priority valid position, if any. The algorithm has
also been updated to use raw positions marked as valid by HarfBuzz as a
fallback, if no better positions could be found.

Change-Id: I40c6432c4607aee197e8767e5667db504469956a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173963
Tested-by: Jenkins
Reviewed-by: Jonathan Clark <jonathan@libreoffice.org>
2024-09-26 22:44:03 +02:00
Jonathan Clark 5b494880e8 tdf#163105 Require kashida after Seen, even before a final Yeh
Small tweak to the kashida insertion rules to restore some previous
behavior. Kashida should not be inserted after a final Yeh, but should
be inserted after an initial or medial Seen, even if it is followed by a
final Yeh.

Change-Id: I1fef2d32961c6f55006b2df456827588f62af40b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173889
Reviewed-by: Jonathan Clark <jonathan@libreoffice.org>
Tested-by: Jenkins
2024-09-25 07:15:23 +02:00
Jonathan Clark a3b0ef4088 tdf#163105 Restore some missing kashida opportunities
This change partially reverts the fix for tdf#65344, to allow more
candidate kashida insertion positions.

The final position fallback from the original ruleset has been restored.
Instead, tdf#65344 is now fixed by explicitly prohibiting kashida under
a final-position Yeh.

Change-Id: I9fe8c656768777c160205ad9892f2fe916a2a926
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173887
Tested-by: Jenkins
Reviewed-by: Jonathan Clark <jonathan@libreoffice.org>
2024-09-25 03:54:35 +02:00
Jonathan Clark fe4687ed17 tdf#163105 Consolidated duplicated kashida justification code
The kashida candidate position selection logic was copied-and-pasted
from Writer into Edit Engine. This change consolidates the shared code
into a library. This change also adds some minimal characteristic tests,
which previously did not exist.

Change-Id: I2bfbfa79858347803474b754566436f3e74d1a54
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173883
Reviewed-by: Jonathan Clark <jonathan@libreoffice.org>
Tested-by: Jenkins
2024-09-25 01:25:07 +02:00
Xisco Fauli 994834e072 ICU: upgrade to 75.1
Downloaded from https://github.com/unicode-org/icu/releases/tag/release-75-1

Change-Id: I882c57bf5ab613dc71f7ae1c31305596e1ca791f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168750
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
2024-09-12 12:09:09 +02:00
Mike Kaganski b54f188b38 Drop newly unused ToggleUnicodeCodepoint::CharsToDelete
Change-Id: I25654d911b1cc11f8c0e7d0ef3e87898418c3408
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172535
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-08-28 20:52:12 +02:00
Mike Kaganski ac0117713e tdf#162657: re-check the result of combining surrogates
They may constitute a combining mark, and require more characters
to the left to be processed.

Change-Id: Ie626badf66edaf44c56e0ba2d294304f139d2bca
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172533
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-08-28 20:52:04 +02:00
Noel Grandin d573e2ae17 loplugin:ostr in various
Change-Id: I9f399b3752da9df930e0647536ffcd4e82beb1ac
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167856
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-05-20 22:09:56 +02:00
Noel Grandin 23e3de725e use more string_view in i18nutil::PaperInfo
Change-Id: I54e75c14b7dbfbfb03e827b5c6167f1256f2733e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167628
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2024-05-14 19:49:10 +02:00
Andrea Gelmini 30f9afa18d Remove duplicate include
Change-Id: Ifc9b71acc50e2a53cee194801245c287079b62ef
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166069
Tested-by: Julien Nabet <serval2412@yahoo.fr>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2024-04-14 10:30:49 +02:00
Mike Kaganski ec40e3edd3 Use more o3tl::convert
Change-Id: I281ff1be4663d752a4e1a7e4d38556cefb641bd4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166060
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-04-14 06:54:24 +02:00
Gabor Kelemen ab95ed2c4b Use less boost_headers in low level libraries
Most of these don't use boost themselves, nor do they need
it transitively since the use of boost::optional was removed

Change-Id: Ic9dee1c4e160b313ec5b91677b02ffdea6c5779d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164440
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2024-03-06 21:23:17 +01:00
Caolán McNamara f0a8b5b81d move IsFuzzing to comphelper
and try something a bit more generic

Change-Id: I1d8256576cd02f0a589df350ba7b53059dd586a5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161250
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-12-30 12:45:45 +01:00
Patrick Luby c92d01f82f tdf#158379 check if PageDesc's m_pPSName is a nullptr
Change-Id: If9f6d695d40c1d55ee2dfbdf1e3523b33343d7ce
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160504
Tested-by: Jenkins
Reviewed-by: Patrick Luby <plubius@libreoffice.org>
2023-12-09 00:50:00 +01:00
Stephan Bergmann 19ea4aaddc Extended loplugin:ostr: i18nutil
Change-Id: I9d7ab34967229087e4fa52b6714b6b75d6c4d196
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160118
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2023-11-29 21:37:25 +01:00
Khaled Hosny 2e6e40b745 i18nutil: Make unicode::getUnicodeType() take a UTF-32 code point
Still need to fix call sites to handles surrogate pairs.

Change-Id: I3ba896714fc6a90596c041148a3c9d965f60f4a1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154874
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-07-25 02:14:56 +02:00
Khaled Hosny 8922952429 i18nutil: Fix ICU case folding of surrogate pairs
It can’t be easily made to work when mixing our case folding data (which
seems to work on individual surrogates) and ICU functions, so port it
over completely to ICU.

Change-Id: I0e12b81b23a053a2a9a299e51908930a3d0b82d6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154843
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-07-25 01:02:30 +02:00
Khaled Hosny 851f0dc7cd i18nutil: Port unicode::getUnicodeType() to ICU
One-less Unicode data table to forget to update.

Change-Id: Icf64e55ec322578b2eefb9065842c218d6f3e061
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154873
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-07-24 21:19:53 +02:00
Khaled Hosny 88790291dd tdf#97152: Fix upper case mapping of lunate sigma (U+03F2)
It was mapped to uppercase sigma (U+03A3) while it should be mapped to
uppercase lunate sigma (U+03F9). Fix by letting this slot fallback to
ICU case folding.

Change-Id: I14ffa0151c740779b67af14be8c7af8c51c3a1e0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154845
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-07-24 20:20:21 +02:00
Khaled Hosny 9eb88d78c8 tdf#96343, tdf#134766, tdf#97152: Fallback to ICU for case mapping
If we are requested to case map a character not present in our case
mapping data, fallback to ICU case mapping functions.

We should switch completely to ICU at some point, but we need to
evaluate our case mapping data and see if it differs from ICU and if
there is a reason for it.

Does not handle the case of U+03F2 turning into Sigma from tdf#97152.

Change-Id: Icf13ac7aab6d07b2a90fc0ff5ef1c4f50c7a7f8c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154803
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-07-24 20:20:07 +02:00