829 Commits
Author SHA1 Message Date
Xisco Fauli c64f9804ac expat: upgrade to 2.9.0
With this new version, the build started to fail with
error: ‘XML_Size XML_GetCurrentColumnNumber(XML_Parser)’ is deprecated: please use XML_GetCurrentColumnNumber64 instead [-Werror=deprecated-declarations]
so we need to check the expat version in case the system expat
is older than 2.9

Also add 0001-fix-XML_GE-is-not-defined-evaluates-to-0-Werror-unde.patch
to fix
error: "XML_GE" is not defined, evaluates to 0 [-Werror=undef]
1087 | # if XML_GE == 1
| ^~~~~~
cc1plus: all warnings being treated as errors

Change-Id: If4f1d652941b7766ed94b65a6eaa018f37c89387
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211867
Tested-by: Jenkins
Tested-by: René Engelhard <rene@debian.org>
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-10-06 22:29:58 +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
Aryan Mishra f26600d7f7 tdf#163691 Use copy_n / copy_backward instead of memcpy / memmove
Replaces the memcpy() and memmove() with std::copy_n() and
std::copy_backward() in fastserializer.cxx.

Change-Id: I6d971f18d1138f03ab62a5007db5d0da63f7679a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/203377
Tested-by: Jenkins
Reviewed-by: Jonathan Clark <jonathan@libreoffice.org>
2026-04-16 20:21:36 +02:00
Gabor Kelemen 8017995ea3 tdf#146619 Use more forward declarations in include/sax
Change-Id: I3223a9e8a804c33fe98b0e72e435654f3ccadd88
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199382
Reviewed-by: Gabor Kelemen <gabor.kelemen@collabora.com>
Tested-by: Jenkins
2026-02-20 21:00:17 +01:00
Mike Kaganski e18a815190 Use rtl::isAscii(Hex)Digit and o3tl::convertToHex
Since some code needs flexibility in error handling, where hardcoded
error value of -1 wasn't handy, o3tl::convertToHex was changed to
accept the error value as its template parameter.

Change-Id: Ifc771cc8fa29a801d4556dea969fc3ea7e620df5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199367
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
2026-02-14 11:40:50 +01:00
Mike Kaganski 7b04ef05cd Drop some uses Sequence::getConstArray
Similar to commit b280efcb9b
(Drop some uses Sequence::getConstArray, 2025-12-07).

Change-Id: Ieac325a660fe64e8172c5ed139380caa3d26a73c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195200
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2025-12-08 10:00:21 +01:00
Michael Meeks d66a2686d0 Add content mapping into XFastParser.
Ideally this gets done for free in the parsing thread.

Change-Id: I2392fd51c8152c48cf03ac9ed26e6f62aa6ac4f8
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193626
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195191
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2025-12-08 09:42:21 +01:00
Noel Grandin c09561bb3d improve debug message
Change-Id: I7cb060833d20eba45894c10d32e54c118fea2b68
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193956
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2025-11-14 06:54:28 +01:00
Yui Nguyen 83a030d305 tdf#143148: Use pragma once instead of include guards
Change-Id: I97524116acf345112eed477b594a9caefb635157
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193636
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
Tested-by: Jenkins
2025-11-09 11:15:13 +01:00
Noel Grandin 5a9e966b32 mso-test: invalid datetime in props
This is using the test document from tdf119234-3.odt.
When importing and exporting to DOCX, we generate an invalid entry in
  docprops/custom.xml
because we dont know how to handle a DateTimeWithTimezone value..

Change-Id: I79981f8a09db432730a9b0c1cf186305b0055923
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193400
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Michael Stahl <michael.stahl@collabora.com>
(cherry picked from commit 97cf170c20c7ff1e1b3820a769cd3167a57d0c46)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193600
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2025-11-08 13:11:38 +01:00
Mike Kaganski 97bc8766e2 tdf#165733: fix leap year detection BCE
lcl_isLeapYear used a simple "is divisible" method to check if a given
year is leap. But that didn't take BCE into account: we use historical
numbering system, where before year 0001 was year -0001; and that year
was leap.

Use comphelper::date::getDaysInMonth for that, which is correct, and
also deduplicates the code. Make sure that years beyond sal_Int16 are
considered an error: they are not representable in css::util::Date,
and comphelper::date::getDaysInMonth takes years as sal_Int16.

Change-Id: I34f1ad4d5d03e05a7cf787f9997b04b1d705b583
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193302
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2025-11-02 18:24:21 +01:00
Noel Grandin 15abdbe674 fix integer overflow in SaxWriterHelper (tdf#167205)
found while investigating the bug mentioned, sadly does not fix it

Change-Id: I669c50d718fcb219a854513aa0a0cb89dadbd435
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191119
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2025-09-18 15:22:14 +02:00
Caolán McNamara 71a13b0369 Related: cid#1660010 don't need this now
Change-Id: Ie243d8c58598ef1653fd31608fc7dc426a7d6779
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190637
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2025-09-06 14:17:46 +02:00
Caolán McNamara 9c73fcad37 cid#1660010 silence Overflowed constant
Change-Id: I8b02798e933404737711bbf776917a9d406d42a6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190519
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2025-09-02 16:22:37 +02:00
Arnaud VERSINI 4b8371bffd sax : use frozen::unordered_map instaed std::map
Change-Id: I845a71b22debf8b786048a8b4132e5ef87434600
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190136
Tested-by: Jenkins
Reviewed-by: Arnaud Versini <arnaud.versini@pm.me>
2025-08-25 14:57:20 +02:00
Caolán McNamara 1cecf9f2a4 cid#1660010 Overflowed constant
Change-Id: Ie8d50e3178713029197a1df3a80ce3319c0f77ea
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190107
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2025-08-23 22:05:20 +02:00
Caolán McNamara 3d1651574e move markup to directly above line it refers to
Change-Id: Ie78ca5392428bfb09a6a03bf415b1ef12bb5cc01
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189413
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2025-08-12 16:23:24 +02:00
Caolán McNamara c3f19a505f cid#1660477 suppress Data race condition
accept the comment's claim about the known lack of lock

Change-Id: I0d2aab6db86ca4e6715136098fe4c7ee3e166666
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189319
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2025-08-11 09:33:15 +02:00
Caolán McNamara ce27c8f9d0 move some data into rodata
Change-Id: Iaa77f8a430740c112f1c13943ff6d97890a33bc3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/187473
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2025-07-07 16:46:17 +02:00
Stephan Bergmann 19c32b44fe Missing include (for SHRT_MIN/MAX)
Change-Id: I1755b440515724315aa2e540fe3de4a473371dc4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/186304
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2025-06-10 08:42:00 +02:00
Noel Grandin ed1f295018 reduce time in strlen when parsing xml prefix
Change-Id: Ieac59782b502cf90cbc4c939b14317ac7c637c99
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183754
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2025-04-06 14:48:02 +02:00
Caolán McNamara 4de4466d38 use std::string_view for TokenValue
we will need the length anyway, and in the case that its constructed
from OString then that strlen can be elided. (For the const char* case
then std::string_view[4] will compute the len)

Change-Id: Ifc06595573625cf93f07dd72ceec8a20745e12f9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182123
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2025-02-25 09:25:42 +01:00
Caolán McNamara 2373a13d4c realloc-ing to 0 is common
which frees, we can use a std::vector for this temp storage and
avoid the reallocation churn.

Change-Id: If7ea4ecb1e6c6a13934b5b9cc59fbb6c80180a42
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181186
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2025-02-05 18:25:07 +01:00
Caolán McNamara 796097c546 use more ByteSequence in sax
Change-Id: I514b022256acc60c20e430ef6e68815a47859ab6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181185
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
2025-02-05 18:24:54 +01:00
Caolán McNamara b73e153090 avoid uno_type_sequence_construct cost
Change-Id: I5ef2d5d0b88fdffa1e425ffb182586a897858fde
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180915
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2025-01-30 09:53:32 +01:00
Tomaž Vajngerl 2990620e20 remove code duplication - conversion hex char to value
We use the same funciton all over the place, so create a common
function in o3tl and use that in all instances where we duplicated
the code.

Change-Id: I74091fbbde8c2ba8c7e4ab30194ab53e2a338e52
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180372
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2025-01-20 01:39:16 +01:00
Caolán McNamara 0a9c19ca56 cid#1607623 Data race condition
Change-Id: Id0c2ec62a246a301d41732d71c99dfa3d02631b5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179313
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-12-27 22:12:17 +01:00
Jonathan Clark d3a59f7a91 tdf#36709 sw: Writer layout for font-relative first-line indent
This change implements layout for font-relative paragraph first-line
indentation in Writer.

Change-Id: Ie8f386bcc13a43ab92d5c15654c24bfdfc62bd69
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176216
Tested-by: Jenkins
Reviewed-by: Jonathan Clark <jonathan@libreoffice.org>
2024-11-13 09:35:20 +01:00
Noel Grandin 8030c5cfbb loplugin:reftotemp in pyuno..sax
Change-Id: Ia616256e06f64ad3c635ac30abf521e5dab107d7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176401
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-11-11 15:47:38 +01:00
Xisco Fauli 957fea5f3d tdf#163486: PVS: variable is assigned but not used
Since
commit 2e25618fe7
Author: Mike Kaganski <mike.kaganski@collabora.com>
Date:   Mon Jul 8 12:12:49 2024 +0500

    Make convert*Angle strict

V1001 	The 'fAngle' variable is assigned but is not used by the end of the function.
V1001 	The 'fAngle' variable is assigned but is not used by the end of the function.

Change-Id: Ie0c9059e18518cae46854715fa7d39cc9c942549
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175933
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2024-11-05 20:30:40 +01:00
Jonathan Clark 6f16beca51 tdf#36709 Refactor Converter to separate parsing from unit conversion
Previously, Converter::convertMeasure parsed measure strings and
performed unit conversion in a single call. This was appropriate, as all
such measure strings could be converted to a common unit ahead of time.

tdf#36709, however, will introduce measures that are relative to the
current font and font size. In order to perform layout, the original
measure unit must be preserved and passed along with the original value.

This change introduces Converter::convertMeasureUnit, which parses a
measure string and returns both the value and the unit. Existing unit
conversion code has been refactored to facilitate this change.

Change-Id: Ic8dfda432e1ca117ad80c05c1939ebaf43e79a9f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175937
Tested-by: Jenkins
Reviewed-by: Jonathan Clark <jonathan@libreoffice.org>
2024-11-01 22:41:03 +01:00
Caolán McNamara 0a5ce68dc3 cid#1632259 COPY_INSTEAD_OF_MOVE
and

cid#1632258 COPY_INSTEAD_OF_MOVE
cid#1632257 COPY_INSTEAD_OF_MOVE
cid#1632256 COPY_INSTEAD_OF_MOVE
cid#1632255 COPY_INSTEAD_OF_MOVE
cid#1632254 COPY_INSTEAD_OF_MOVE
cid#1632253 COPY_INSTEAD_OF_MOVE
cid#1632252 COPY_INSTEAD_OF_MOVE
cid#1632251 COPY_INSTEAD_OF_MOVE
cid#1632250 COPY_INSTEAD_OF_MOVE
cid#1632249 COPY_INSTEAD_OF_MOVE
cid#1632248 COPY_INSTEAD_OF_MOVE
cid#1632247 COPY_INSTEAD_OF_MOVE
cid#1632246 COPY_INSTEAD_OF_MOVE
cid#1632245 COPY_INSTEAD_OF_MOVE
cid#1632244 COPY_INSTEAD_OF_MOVE
cid#1632243 COPY_INSTEAD_OF_MOVE
cid#1632242 COPY_INSTEAD_OF_MOVE
cid#1632241 COPY_INSTEAD_OF_MOVE
cid#1632240 COPY_INSTEAD_OF_MOVE
cid#1632239 COPY_INSTEAD_OF_MOVE
cid#1632238 COPY_INSTEAD_OF_MOVE
cid#1632237 COPY_INSTEAD_OF_MOVE
cid#1632236 COPY_INSTEAD_OF_MOVE
cid#1632235 COPY_INSTEAD_OF_MOVE
cid#1632234 COPY_INSTEAD_OF_MOVE
cid#1632233 COPY_INSTEAD_OF_MOVE
cid#1632232 COPY_INSTEAD_OF_MOVE
cid#1632231 COPY_INSTEAD_OF_MOVE
cid#1558073 COPY_INSTEAD_OF_MOVE
cid#1557945 COPY_INSTEAD_OF_MOVE
cid#1557916 COPY_INSTEAD_OF_MOVE
cid#1557898 COPY_INSTEAD_OF_MOVE
cid#1557808 COPY_INSTEAD_OF_MOVE

Change-Id: Ibf417c154255fe3b0598127df5b5805ed543c8d5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174660
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-10-08 13:16:08 +02:00
Mike Kaganski 9c9d2e21be tdf#163344: improve Converter::convertDuration
Let it use the same calculation as ImpSvNumberInputScan::GetTimeRef.
Decreases rounding errors.

Change-Id: I6474a1a5913d78c236adc511389c4abcebed2de6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174650
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-10-08 07:32:15 +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
Mike Kaganski 0c43f53222 Simplify a bit
Change-Id: Ib684a85f31d7416793fed6d560b3976840565800
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173184
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-09-12 20:02:58 +02:00
Noel Grandin 6f56c8da07 use more concrete UNO type in sax
Change-Id: I3b3423242012b4f637195fb3c35c0315830e06a5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173135
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-09-10 15:41:28 +02:00
Andrea Gelmini 7be0d9dfe5 Fix "lets" -> "let's"
Change-Id: Ie9b6961a2786a518876db7b26258e67e8afee848
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169760
Reviewed-by: Andrea Gelmini <andrea.gelmini@gelma.net>
Tested-by: Jenkins
2024-07-19 14:40:23 +02:00
Mike Kaganski 2e25618fe7 Make convert*Angle strict
Only the permitted units are accepted, and must follow the number immediately.

Change-Id: Iccfcbe044334f28f31ba0f8e336f96e6147af694
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170137
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
2024-07-09 05:46:32 +02:00
Regina Henschel 9f62c7a0f2 tdf#161483 enable LO to read ODF angle units
ODF uses in several places data type 'angle' (18.3.1, ODF 1.3). That is
a double followed by unit identifier 'deg', 'grad' or 'rad' or a unit
less value in degrees. LO uses in the API angles in degrees, 1/10 of
degrees and 1/100 of degrees in data types 'double', 'short' and 'long'.

Without the fix LO does not interpret the units, but takes only the
number part.

Change-Id: Ib3f2a518a25199e3cf7a7a8572e169785f75c427
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169360
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Tested-by: Jenkins
Reviewed-by: Regina Henschel <rb.henschel@t-online.de>
2024-06-25 16:21:42 +02:00
Regina Henschel 567dbcf687 tdf#161327 Interpret angle units in dr3d:end-angle ..
.. and draw:rotation in <draw:hatch> element.

ODF 1.1 has not specified the syntax of datatype 'angle'. Since ODF 1.2
it is specified as double with unit "deg", "grad" or "rad", or without
unit. The unit-less value is specified to be in degrees. But OOo, AOO
and all LO versions had written the value unit-less in 1/10th of a
degree in some cases.

To fix it, LibreOffic will be enabled to read units. When then the
active versions are able to read units, starting with the then actual
version, LibreOffice will write angles with unit 'deg'.

This has already be done for gradients, see tdf#89475. This patch
starts the first step to make LibreOffice able to read units for
dr3d:end-angle (UNO D3DEndAngle) and for draw:rotation (UNO
FillHatch.Angle). I have not found further cases of writing 1/10deg.

The patch still writes unit-less 1/10th of a degree for export to
ODF 1.3 and earlier. When it is time to write unit degree or when
LibreOffice supports the next ODF versions, some places need to be
adapted. They are marked.

The converter convertAngle is renamed to convert10thDegAngle() to
indicate, that it is special. The parts, which were specific to
gradients are moved to the gradients, so that it is now usable for
dr3d:angle and draw:rotation too.

I intend to write next a patch that enables LibreOffice to read angle
units for cases where LibreOffice already writes unit-less values in
degree. That is not so urgent, but to bring LibreOffice nearer to ODF,
reading angle units should be implemented nevertheless.

The file xmlbahdl.hxx is moved from xmloff/source/style to xmloff/inc
to have access to it from xmloff/source/draw.

Change-Id: I8ffc2735f8bcfefb86efa80eb05f900c32403f31
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168336
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Reviewed-by: Regina Henschel <rb.henschel@t-online.de>
2024-06-11 10:29:17 +02:00
Noel Grandin 509ed148fc loplugin:ostr in sax
Change-Id: Ia7572db738f1a3d6f7bec8c3a93ec02d93a531ba
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167437
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-05-10 12:40:26 +02:00
Stephan Bergmann d98e014cf6 Extended loplugin:ostr manual changes
I had done these a while ago, when I looked into extending loplugin:ostr to do
more automatic rewriting, and these were places where I needed to do something
manually, for one reason or another, because the automatic rewriting would not
pick it up correctly.

However, I got distracted, and a wholesale automatic rewrite would still run
into cases where an _ostr/_ustr instance from a library's .rodata would still be
referenced after the library has already been dlcose'd.  So I never came around
to finishing all that.

But there appears to be renewed interest in (automatic) rewritings here now, so
it probably makes sense if I share this part of my work anyway.

Change-Id: I3da9d38398e4bca373cb0000a9d34b49a36ad58a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166792
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
Tested-by: Jenkins
2024-04-28 11:29:52 +02:00
Gabor Kelemen 828ad91196 tdf#146619 Drop unused 'using namespace' in: sax/
Change-Id: I1959402cb06f051ffe5f4a7e2e9f591b4908ea21
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165521
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
2024-03-31 09:41:18 +02:00
Mike Kaganski 0fa827dbb2 Drop std::as_const from css::uno::Sequence iterations
Obsoleted by 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: Idbafef5d34c0d4771cbbf75b9db9712e504164cd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162640
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-01-27 12:43:48 +01:00
Caolán McNamara 283aa103b9 cid#1545177 COPY_INSTEAD_OF_MOVE
and

cid#1545179 COPY_INSTEAD_OF_MOVE
cid#1545187 COPY_INSTEAD_OF_MOVE
cid#1545188 COPY_INSTEAD_OF_MOVE
cid#1545189 COPY_INSTEAD_OF_MOVE
cid#1545196 COPY_INSTEAD_OF_MOVE
cid#1545197 COPY_INSTEAD_OF_MOVE
cid#1545204 COPY_INSTEAD_OF_MOVE
cid#1545223 COPY_INSTEAD_OF_MOVE
cid#1545236 COPY_INSTEAD_OF_MOVE
cid#1545239 COPY_INSTEAD_OF_MOVE
cid#1545253 COPY_INSTEAD_OF_MOVE
cid#1545274 COPY_INSTEAD_OF_MOVE
cid#1545286 COPY_INSTEAD_OF_MOVE
cid#1545309 COPY_INSTEAD_OF_MOVE
cid#1545311 COPY_INSTEAD_OF_MOVE
cid#1545345 COPY_INSTEAD_OF_MOVE
cid#1545358 COPY_INSTEAD_OF_MOVE
cid#1545361 COPY_INSTEAD_OF_MOVE
cid#1545365 COPY_INSTEAD_OF_MOVE
cid#1545367 COPY_INSTEAD_OF_MOVE
cid#1545372 COPY_INSTEAD_OF_MOVE
cid#1545373 COPY_INSTEAD_OF_MOVE
cid#1545377 COPY_INSTEAD_OF_MOVE
cid#1545392 COPY_INSTEAD_OF_MOVE
cid#1545399 COPY_INSTEAD_OF_MOVE
cid#1545404 COPY_INSTEAD_OF_MOVE
cid#1545408 COPY_INSTEAD_OF_MOVE
cid#1545430 COPY_INSTEAD_OF_MOVE
cid#1545439 COPY_INSTEAD_OF_MOVE
cid#1545449 COPY_INSTEAD_OF_MOVE

Change-Id: I3afe836a0bbc8bd70937035e60eb020435e413d2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160539
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-12-10 17:41:18 +01:00
Stephan Bergmann 1e6cb9302d Extended loplugin:ostr: sax
Change-Id: I7ee95e170b09a5a6765042ede50218332a822c7d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160104
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2023-11-29 17:43:08 +01:00
Miklos Vajna c8f7408db7 tdf#158302 fix build against system-libxml-2.12
Seen in a fedora:40 container, using --with-system-libcmis,
--with-system-liblangtag and --with-system-xmlsec.

Change-Id: I9d748d3dc0b70dbfdfcb6b99c9ce8440bda6f326
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159980
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-11-27 16:09:13 +01:00
Stephan Bergmann 1f43e2071f Extended loplugin:ostr: sax
Change-Id: Icf6ffbc746dbbc790a5a248002ecd161413f120c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159681
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-11-19 22:04:09 +01:00
Stephan Bergmann 68486cc18e Extended loplugin:ostr: Automatic rewrite O[U]StringLiteral: sax
Change-Id: I16c763164567293b096e132650c509cfc32fd407
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158215
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-10-20 09:16:44 +02:00
Mike Kaganski 176e8cf09a Use exception ctors, instead of setting members later
Avoids overwriting source location in message

Change-Id: Ia0290c7dd1ab3ea1357712a27ecab75c7b583dd4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157893
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-10-14 15:37:17 +02:00