summaryrefslogtreecommitdiff
path: root/editeng
AgeCommit message (Collapse)Author
2024-11-08cid#1634530 COPY_INSTEAD_OF_MOVECaolán McNamara
Change-Id: Iae03c8a982659503d7f73dbabbcece7bdb9c8e55 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176259 Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-11-07cid#1555009 COPY_INSTEAD_OF_MOVECaolán McNamara
and cid#1555173 COPY_INSTEAD_OF_MOVE cid#1555255 COPY_INSTEAD_OF_MOVE cid#1556619 COPY_INSTEAD_OF_MOVE cid#1556766 COPY_INSTEAD_OF_MOVE cid#1557131 COPY_INSTEAD_OF_MOVE Change-Id: Ia581e7858d8ff4db08308b4118116781db1464a6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176193 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-11-07[API CHANGE] a11y: Switch AccessibleRelationType to enumMichael Weghorn
Switch css::accessibility::AccessibleRelationType from integer constants to an enum. This provides more type safety and improves the debugging experience, e.g. GDB now prints com::sun::star::accessibility::AccessibleRelationType::AccessibleRelationType_CONTENT_FLOWS_TO instead of just "2" when printing the value of a corresponding variable, so it's no longer necessary to manually look up what constant has that integer value to know what relation this refers to. offapi/com/sun/star/accessibility/AccessibleRelationType.idl had this comment: > <p>We are using constants instead of a more typesafe enum. The reason > for this is that IDL enums may not be extended. Therefore, in order to > include future extensions to the set of roles we have to use constants > here.</p> However, the a11y UNO API is internal (not published), so that shouldn't be a concern. Change-Id: I44a7d56cb085dc24effb24fcd34bb222b78ef4cd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176153 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins
2024-11-07editeng a11y: Use range-based forMichael Weghorn
Change-Id: Ie686eb0c76e77139e9d59b1d08a7ac7e99f71316 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176151 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins
2024-11-07editeng a11y: Drop "typedef std::pair<short int,short int> RD"Michael Weghorn
Use initializer syntax for the array elements. Change-Id: Ibe8dbc372cfb5f7134267f26d5bd27fd153a797b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176150 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-11-06aGraphic.IsNone was checked aboveMike Kaganski
It seems that the else branch position wasn't adjusted in commit 7a8ed362eb163ac15a000ba1cfc74b58315800a1 ([API CHANGE] revert and deprecate *BackGraphicURL add *BackGraphic, 2018-05-07). Change-Id: Ib4b68ee813539b4d62ffd8664d496467d7789547 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176158 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins
2024-11-06Simplify a bitMike Kaganski
Change-Id: Ie058f0856b64b4284ed9620857ed6dddfe5a3149 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176070 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-11-06tdf#163748: checking Any's value type is anti-patternMike Kaganski
The type could be XInterface - yet it may hold XGraphic. Testing for exact type would fail then. And it looks like Java bridge code does just that: a code like XGraphic graphic = xGraphicProvider.queryGraphic(v); xStyleProps.setPropertyValue("BackGraphic", graphic); sends the XGraphic as an Any with XInterface type (unlike a similar code in Basic). It's sad that we *move* tests to Python, instead of having both - it's not like "Python works -> Java would work, too". Change-Id: I5cd9b1f750e71895232b2c31174ef969a7b15b7c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176149 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-11-06Simplify a bitMike Kaganski
Change-Id: I62299212957f491ff0ead9e64816d70cb7f19e08 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176061 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-11-06loplugin:passstuffbyref in editengNoel Grandin
Change-Id: I015616d7a008692b63586cd5d2ae9cc5586ead4b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176135 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-11-06cid#1556442 COPY_INSTEAD_OF_MOVECaolán McNamara
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-06fix memcpy in ImplExpandCompressedPortionNoel Grandin
regression from commit 11b15571475414ef853e21a6c96afa2ac81f848f Author: Noel Grandin <noel.grandin@collabora.co.uk> Date: Wed Oct 30 09:51:26 2024 +0200 convert KernArray from sal_Int32 to double Change-Id: I43a3af79159944ac84cb473a0f258f0815228bfc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176109 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-11-06tdf#122716: take encoding defined for font into accountMike Kaganski
Before this, the non-ASCII Windows-1252 characters get exported to RTF without Unicode markup, regardless of the font-defined charset; and on import to Writer (and other compliant RTF readers), this 8-bit markup was interpreted using the font data, producing different characters. Change-Id: I2032930b6585287fde3eb3b5e6abed0298d29330 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176048 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-11-04new loplugin:staticconstexprNoel Grandin
Change-Id: Ida1996dfffa106bf95fd064e8191b8033b4002f3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175336 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-11-04tdf#163486: PVS: Identical branchesBogdan Buzea
V1037 Two or more case-branches perform the same actions. Check lines: 815, 819 Change-Id: I86c8065de5bb83671bcc499bb46b5e5723ec01d0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175277 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-11-02tdf#36709 Add loext:text-indent supporting font-relative unitsJonathan Clark
This change adds an ODF font-relative first-line indent paragraph style attribute as a LibreOffice extension. The corresponding ODF standard change is tracked by OFFICE-4165. This change only implements what is minimally necessary to serialize, deserialize, and check for ODF files containing this attribute. Further changes are necessary. * Added cssLength to schema, which is equivalent to length but also allows ic and em as units. * Added loext:text-indent to schema as a paragraph style attribute. This attribute is equivalent to fo:text-indent, but accepts cssLength instead of length. * Added XML_TYPE_UNIT_MEASURE to the ODF parser, which currently accepts only the font-relative measures and forces fallback in other cases. * Added loext:text-indent to the ODF parser. This attribute accepts font-relative metrics, and will behave as an import-only alias for fo:text-indent in other cases. * Updated SvxFirstLineIndentItem to handle unit-denominated measures. * Added proof-of-concept indentation handler to Writer. This implementation is incomplete and temporary, and will be revised in future changes. Change-Id: I7eb5c7382093cb18a9b0afbf93dacb34ba1d35ef Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175941 Tested-by: Jenkins Reviewed-by: Jonathan Clark <jonathan@libreoffice.org>
2024-10-31convert KernArray from sal_Int32 to doubleNoel Grandin
which allows us to eliminate a bunch of rounding at various layers, and consequently maintain a lot more precision Change-Id: I911dedd7c041c1d67396c082e5695346ea689acb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175814 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-10-29treat divs as requiring a new block/paraCaolán McNamara
but consider inserting a paragraph as fulfilling that requirement, and only insert a new para if content shows up before a new para does. Change-Id: I7455575a77a1f3b176ed8d5b16a7e5a688ba9dbc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174507 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com> (cherry picked from commit 0287036fa4ae6d709aedc6b721329251fa6f412f) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175754 Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Tested-by: Jenkins
2024-10-28don't use iterateItemSurrogates for EE_FEATURE_FIELDNoel Grandin
Change-Id: I96cd1728e2358d4ea49275952726aae85e6f52a7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175726 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins
2024-10-27tdf#163486: PVS: Identical branchesBogdan Buzea
V1037 Two or more case-branches perform the same actions. Check lines: 804, 820, 832 Change-Id: I25b810a91c6981f36fbad34c6ad64bc3656f6ddb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175278 Reviewed-by: David Gilbert <freedesktop@treblig.org> Tested-by: Jenkins
2024-10-26cid#1555767 COPY_INSTEAD_OF_MOVECaolán McNamara
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-26editeng: unnedded assigmentXisco Fauli
After commit f04ab0ea41db4e91c3dd898a560426867a466988 Author: Xisco Fauli <xiscofauli@libreoffice.org> Date: Wed Oct 23 16:13:04 2024 +0200 tdf#163486: PVS: Expression is always true Change-Id: I33a3cbdc2c7013d5d739c55d3b129f05a329197f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175669 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2024-10-25cid#1633347 COPY_INSTEAD_OF_MOVECaolán McNamara
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-23tdf#163486: PVS: Expression is always trueXisco Fauli
V547 Expression 'eFunc == KeyFuncType::DONTKNOW' is always true. Change-Id: Ia88333958bfc80555ecabd7113ef6a1805714c06 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175506 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> Tested-by: Jenkins
2024-10-22move vcl::DeleteOnDeinit to toolsNoel Grandin
so we can fix a shutdown use-after-free in sot. Change-Id: I32f83bd94627d72d7bee7ea2ebd6ab77a7f78435 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175335 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-10-21Make tools::Time ctor taking sal_Int64 privateMike Kaganski
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-14version COVERITY conditionalsCaolán McNamara
so there's a recheck on each major if they are still needed Change-Id: I351f731fe4eaec0ebf735147a9a168cccba3bca5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174883 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-10-10cid#1557590 Data race conditionCaolán McNamara
Change-Id: I1c100c65eb2671802550db5629b994ebeb92580b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174684 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-10-08cid#1608062 Overflowed constantNoel Grandin
Change-Id: I03b3cc85b3571806ad87bf678d83e4c89dca8a8e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174622 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-10-08cid#1606728 Overflowed integer argumentNoel Grandin
The problem here is that coverity thinks that ParaPortion::GetLineNumber can return -1, which it can, but only if things are already broken, so add an assert tbere. Change-Id: Iceea035edb49bb3e1e0a39a9b63a9176308346ea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174621 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-10-08cid#1632259 COPY_INSTEAD_OF_MOVECaolán McNamara
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-08cid#1608272 Overflowed constantNoel Grandin
Change-Id: I280718f38900752d2c5090b0a25d7883a6062117 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174620 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins
2024-10-08cid#1607133 Overflowed constantNoel Grandin
Change-Id: I63d1ca446491b8b376bb54e410b3d9edc543a734 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174619 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-10-05use ConvertStringToHTML for the URL tooCaolán McNamara
Change-Id: Iee10356c6311c4ac791dc59081ca2a208d3c0710 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174505 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-10-05add a 'simple-html' export to editengCaolán McNamara
currently justs supports hyperlinks and nothing else over plain text. puts each paragraph in a separate div Change-Id: I645d28e0bb6ed13e930e1555753846d10ecf5dd9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174388 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174504 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-10-04allow editeng html import to treat divs as inserting a newlineCaolán McNamara
optional, currently cowardly defaulted off, except for the specific use-case. Change-Id: I8a6176ee356fa4d2b665d5325d9b7aba2a6579f6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174472 Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Tested-by: Jenkins
2024-10-04Split out this html parsing hunk as a separate NewLine methodCaolán McNamara
Change-Id: I1fb034af2419306f96152ce6802d193d7a1560af Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174441 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-09-30cid#1607858 silence Overflowed constantCaolán McNamara
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-29cid#1606889 Overflowed constantNoel Grandin
Change-Id: I5c0b458aca0ffc1b16eba31ace4039cd359160f1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174178 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins
2024-09-29cid#1607049 Overflowed constantNoel Grandin
Change-Id: I9f031fa3ad7a216435c72692d92d7b566417977b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174156 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-09-29cid#1606997 Overflowed constantNoel Grandin
Change-Id: I7973793a084c2bcd05f1ede9546094410ffc31cc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174157 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-09-26tdf#163105 Use HB data while selecting kashida insertion positionsJonathan Clark
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-25tdf#163105 Consolidated duplicated kashida justification codeJonathan Clark
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-12Optimize TokenMap and AttributeList in oox and xoMike Kaganski
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-12use more concrete UNO type in editengNoel Grandin
Change-Id: I5cad4808a1e5f10022f8a0441eb81a279d9b6386 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173196 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins
2024-09-09tdf#162803 editeng: Fix invalid kashida array after layoutJonathan Clark
This change updates editeng to clear the kashida array during layout, at the same time it clears other justification data. Previously, editeng could recycle stale kashida arrays and apply them to lines with different lengths. This would result in stray kashida rendered at inappropriate positions in lines, or accessing memory past the end of the kashida array, resulting in assertions or nondeterministic crashes. Change-Id: I9c06239298d630f2d61b5e67a54f4c3e079c1193 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172967 Reviewed-by: Jonathan Clark <jonathan@libreoffice.org> Tested-by: Jenkins
2024-09-04tdf#151748 editeng: Fix crash in kashida justification after updateJonathan Clark
Commit 937023bca427f803a9e7085d5090d5d2b17623ed aggravated a bug that would cause editeng to use stale kashida positions after document changes (for example, font changes). This could cause crashes or spurious kashida, and both much more often after the above commit. This change fixes the underlying logic error. Change-Id: Id6465e739740a38ed11c9d9378d30faa51948731 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172866 Reviewed-by: Jonathan Clark <jonathan@libreoffice.org> Tested-by: Jenkins
2024-09-03use less dynamic_cast when broadcasting SfxHintNoel Grandin
Change-Id: I24c947c20afeffffebe5ac794108c4ccecb680f1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172828 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-08-30tdf#151748 editeng: Improve kashida position validationJonathan Clark
Previously, editeng did not validate whether kashida insertion positions had enough room for at least a single kashida glyph. This caused kashida glyphs to overlap other characters in some situations. Editeng will now drop candidate kashida insertion positions from the beginning of the line, until there is enough room to safely justify the remaining text. This approximates Writer's behavior. Change-Id: I804cae72503332bea8dc9e60cdfe08bd3429dc52 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172641 Reviewed-by: Jonathan Clark <jonathan@libreoffice.org> Tested-by: Jenkins
2024-08-30cid#1607168 Overflowed constantCaolán McNamara
Change-Id: I18856301045008938d5222ceb6774ff6fbb557fa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172634 Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>