summaryrefslogtreecommitdiff
path: root/sw
AgeCommit message (Collapse)Author
2024-10-25sw: Resave renameobjectdialog.ui with glade 3.40Michael Weghorn
Change-Id: Ib977073b0c7b851f67abc78727b08ba559a501cb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175566 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins
2024-10-25speedup saving large XLS file with lots of query formula(2)Noel Grandin
reduce cost of OUString construction by avoiding initialising a temporary and then overwriting it. 12s to 10s Change-Id: I889152ba71947004ca7d5c96f073182c94d95ed5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175539 Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-10-25-Werror,-Wunused-variableStephan Bergmann
...after 64e8d5d8b9a56f31caff66675180342773f847a0 "sw/qa: use getSwDoc() more" Change-Id: Ib13fe63cac26ff083da5d8c104921c510fa5bb7e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175579 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2024-10-24sw/qa: use getSwDoc() moreXisco Fauli
Change-Id: I742309d99c4d9839dcd4f8b747fc9aef549998ef Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175555 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2024-10-24Resolves tdf148513 - Illustration for line break optionsHeiko Tietze
Change-Id: I729c4a1e5c4b2a73cdb8d3a5c4969e3b43510deb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174038 Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org> Tested-by: Jenkins
2024-10-24Reapply "Prevent cursor invalidation if the cursor position doesn't change."Gülşah Köse
This reverts commit 8da753752898984425c98a7f3db02b1aa69b74c8. Merge cells case were failing. Fixed now. Change-Id: I1dfd7e939c5590d64d096707edff40cb414ef3cd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174813 (cherry picked from commit a260cc52b2fae1382805b4389c95f29ed8671f42) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175302 Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Tested-by: Jenkins
2024-10-24sw a11y: Don't prevent zooming into print preview when AT activeMichael Weghorn
In Writer's print preview ("File" -> "Print Preview"), allow zooming in or out using Ctrl + mouse wheel regardless of whether assistive technology is enabled (on Windows) or not. I see no reason to prevent this when AT is active. This was originally introduced in commit 70de0c38fd177b3c95837118c5fb35e380c87e90 Author: Jens-Heiner Rechtien <hr@openoffice.org> Date: Thu Mar 27 14:45:43 2003 +0000 MWS_SRX644: migrate branch mws_srx644 -> HEAD with a //#106746# zoom has to be disabled if Accessibility support is switched on comment, but that unfortunately only refers to a ticket in the StarDivision internal issue tracker, so the reasoning from back then remains unclear. (`git show --ignore-space-change` to see the "actual change" more clearly) Change-Id: Iccec17a334dbe19de14cf7889d7f70f0051f152e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175502 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins
2024-10-23tdf#131728 sw inline heading: fix missing/broken DOCX exportLászló Németh
Fix layout interoperability during DOCX round-trip by grab- bagging w:p/w:pPr/w:rPr/w:specVanish, i.e. the style separators. Note: use FrameInteropGrabBag to select the text frames, which are inline headings, exporting only their text content (a single paragraph), and use also ParaInteropGrabBag to export w:specVanish. Note: specVanish lost completely originally, converting inline headings to normal paragraphs. After commit 56588663a0fddc005c12afaa7d3f8874d036875f, text frames (the workaround for inline heading/ToC/bookmark support) were exported instead of plain paragraphs, which were broken at least in LibreOffice. Follow-up to commit 56588663a0fddc005c12afaa7d3f8874d036875f "tdf#131728 sw inline heading: fix DOCX paragraph layout interoperability". Change-Id: Ic61617f9c9652c9364f8262914c66dec093d6910 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175372 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
2024-10-23Try to apply indents a bit sanerMike Kaganski
It was too convoluted; the three properties that were set there all used different logic (PROP_PARA_FIRST_LINE_INDENT was only set when the parent style id was present; PROP_PARA_LEFT_MARGIN was set when it was found either in the entry or in its parent; PROP_PARA_RIGHT_MARGIN was only set when parent style was found, and it had properties). It seems to be just some leftovers from iterative partial changes of the code. This makes the code more uniform. For PROP_PARA_RIGHT_MARGIN it keeps setting PROP_PARA_FIRST_LINE_INDENT/PROP_PARA_LEFT_MARGIN from getNumberingProperty; but otherwise, all three are handled similarly: if the property is set either in the entry itself or in its parent, it is processed. This changes the logic slightly, but hopefully in the correct direction. Change-Id: I1a8fb95d055101dcbc3aaec6207721146c94cc21 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175437 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins
2024-10-23Deduplicate a bitMike Kaganski
Change-Id: Iace3fdfdaed79054fda2894b5d9f4275f80a5e0a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175440 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-10-23Simplify a bitMike Kaganski
Change-Id: I7d24774fb591fe2090523da29a2a0aa7608deccc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175435 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins
2024-10-23tdf#163486: PVS: Expression is always trueXisco Fauli
V560 A part of conditional expression is always true: pRotate. V560 A part of conditional expression is always true: pRotate. Change-Id: Icf39c1a7e3a31fb360dde684a5ebfbc176027f6c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175450 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> Tested-by: Jenkins
2024-10-23tdf#161359 fix opening RTF with broken imagesNoel Grandin
The try/catch block prevents an exception that looks like com.sun.star.lang.IllegalArgumentException message: "at /Users/noelgrandin/lode/dev/core/svx/source/unodraw/unoshap2.cxx:1423" which is inside SvxGraphicObject::setPropertyValueImpl Not sure where would be a better place to handle this. regression from commit 060b0fb4b93ee09770ed9398cca46e365dda5be8 Author: Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> Date: Thu Mar 8 16:37:46 2018 +0900 change RTFDocumentImpl to use Graphic instead of GraphicURL Change-Id: Iec3df20a2192df2bf595293037c8214fea151ae3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175418 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-10-23tdf#163486: PVS: Expression is always trueXisco Fauli
Expression 'pChangesSet' is always true. Change-Id: Ib1f654b0b30d0e8e73121a7448a392a134be888f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175459 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2024-10-23tdf#163486: PVS: Expression is always trueXisco Fauli
V547 Expression 'pFollowTextFlow' is always true. Change-Id: I07696ef443e7eaa263d325eed225dfb5c0b89c51 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175461 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2024-10-23tdf#163486: PVS: Expression is always trueXisco Fauli
V560 A part of conditional expression is always true: pFlt. Change-Id: Ia05e42b8700ceb3dc1ab23becf71fd281695924e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175449 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2024-10-23tdf#163486: PVS: Expression is always trueXisco Fauli
V560 A part of conditional expression is always true: pSection. Change-Id: If097740c8ea3b89da42c07c4e419fee731948fe7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175453 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2024-10-23tdf#163486: PVS: Expression is always trueXisco Fauli
V560 A part of conditional expression is always true: pFlt. Change-Id: I208c6f64fe49dec422173b9465b18182c1aac318 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175452 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> Tested-by: Jenkins
2024-10-23tdf#143148 Use #pragma once instead of include guardsOromidayo Owolabi
Replace include guards to pragma once in some header files in sw/inc/ Change-Id: I8e790a89ab2326748590d7a1ff2d1daee0ae0f4b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175191 Tested-by: Jenkins Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2024-10-22tdf#163486: PVS: Expression is always trueXisco Fauli
V560 A part of conditional expression is always true: pStyleSheetProperties. Change-Id: Ia6f0ecbf80d8de488695441c86b0b34e23c6348a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175444 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> Tested-by: Jenkins
2024-10-22tdf#163575 sw smart justify: fix size resolution for SwBidiPortionLászló Németh
Negative space sizes (i.e. shrunk lines at image wrapping) stored over LONG_MAX/2, and these values had no resolution in SwBidiPortion, causing crash/assert in conversion of DOCX document containing e.g. Arabic text wrapping around images. Note: apply the resolution in SwDoubleLinePortion, too. Regression since commit 1fb6de02709a5f420f21ebd683915da50ce0d198 "tdf#163149 sw smart justify: fix line shrinking at image wrapping". Change-Id: I6e45592c4eed247871d35e1f02fd5a038baddf85 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175419 Reviewed-by: László Németh <nemeth@numbertext.org> Tested-by: Jenkins
2024-10-22tdf#163486: PVS: Expression is always trueXisco Fauli
V560 A part of conditional expression is always true: pNumFormat. V560 A part of conditional expression is always true: pNumFormat != nullptr. Change-Id: I6c780fa67bd65da06cfdde37d34eda93bb4ab13c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175445 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2024-10-22cid#1555259 COPY_INSTEAD_OF_MOVECaolán McNamara
and cid#1555264 COPY_INSTEAD_OF_MOVE cid#1555280 COPY_INSTEAD_OF_MOVE cid#1555303 COPY_INSTEAD_OF_MOVE cid#1555313 COPY_INSTEAD_OF_MOVE cid#1555314 COPY_INSTEAD_OF_MOVE cid#1555323 COPY_INSTEAD_OF_MOVE cid#1555333 COPY_INSTEAD_OF_MOVE cid#1555338 COPY_INSTEAD_OF_MOVE cid#1555349 COPY_INSTEAD_OF_MOVE cid#1555364 COPY_INSTEAD_OF_MOVE cid#1555379 COPY_INSTEAD_OF_MOVE cid#1555398 COPY_INSTEAD_OF_MOVE cid#1555410 COPY_INSTEAD_OF_MOVE cid#1555411 COPY_INSTEAD_OF_MOVE cid#1555416 COPY_INSTEAD_OF_MOVE cid#1555429 COPY_INSTEAD_OF_MOVE cid#1555434 COPY_INSTEAD_OF_MOVE cid#1555441 COPY_INSTEAD_OF_MOVE cid#1555446 COPY_INSTEAD_OF_MOVE cid#1555480 COPY_INSTEAD_OF_MOVE cid#1555490 COPY_INSTEAD_OF_MOVE cid#1555524 COPY_INSTEAD_OF_MOVE cid#1555527 COPY_INSTEAD_OF_MOVE cid#1555531 COPY_INSTEAD_OF_MOVE cid#1555578 COPY_INSTEAD_OF_MOVE cid#1555581 COPY_INSTEAD_OF_MOVE cid#1555591 COPY_INSTEAD_OF_MOVE cid#1555614 COPY_INSTEAD_OF_MOVE cid#1555619 COPY_INSTEAD_OF_MOVE cid#1555633 COPY_INSTEAD_OF_MOVE cid#1555654 COPY_INSTEAD_OF_MOVE cid#1555707 COPY_INSTEAD_OF_MOVE cid#1555712 COPY_INSTEAD_OF_MOVE cid#1555746 COPY_INSTEAD_OF_MOVE cid#1555763 COPY_INSTEAD_OF_MOVE Change-Id: Ibcc1a3649c5663328e60474c06e51902aa74db52 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175407 Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Tested-by: Jenkins
2024-10-22tdf#163486: PVS: Identical branchesBogdan Buzea
Since commit 97075a384aed0b4853b78bd5ffc681cdf9003f11 Author: Michael Brauer <mib@openoffice.org> Date: Wed Oct 24 13:16:17 2001 +0000 #91961#: Support of language V1037 Two or more case-branches perform the same actions. Check lines: 1462, 1465 Change-Id: Ie27fb47ec7e22b9dbe9a2338c661c261bea8926b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175383 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2024-10-22cid#1545605 COPY_INSTEAD_OF_MOVECaolán McNamara
and cid#1545841 COPY_INSTEAD_OF_MOVE cid#1554682 COPY_INSTEAD_OF_MOVE cid#1554686 COPY_INSTEAD_OF_MOVE cid#1554715 COPY_INSTEAD_OF_MOVE cid#1554750 COPY_INSTEAD_OF_MOVE cid#1554759 COPY_INSTEAD_OF_MOVE cid#1554770 COPY_INSTEAD_OF_MOVE cid#1554779 COPY_INSTEAD_OF_MOVE cid#1554794 COPY_INSTEAD_OF_MOVE cid#1554800 COPY_INSTEAD_OF_MOVE cid#1554826 COPY_INSTEAD_OF_MOVE cid#1554836 COPY_INSTEAD_OF_MOVE cid#1554862 COPY_INSTEAD_OF_MOVE cid#1554865 COPY_INSTEAD_OF_MOVE cid#1554872 COPY_INSTEAD_OF_MOVE cid#1554883 COPY_INSTEAD_OF_MOVE cid#1554906 COPY_INSTEAD_OF_MOVE cid#1554921 COPY_INSTEAD_OF_MOVE cid#1554926 COPY_INSTEAD_OF_MOVE cid#1554946 COPY_INSTEAD_OF_MOVE cid#1554956 COPY_INSTEAD_OF_MOVE cid#1554970 COPY_INSTEAD_OF_MOVE cid#1554986 COPY_INSTEAD_OF_MOVE cid#1554991 COPY_INSTEAD_OF_MOVE cid#1555013 COPY_INSTEAD_OF_MOVE cid#1555037 COPY_INSTEAD_OF_MOVE cid#1555050 COPY_INSTEAD_OF_MOVE cid#1555057 COPY_INSTEAD_OF_MOVE cid#1555066 COPY_INSTEAD_OF_MOVE cid#1555067 COPY_INSTEAD_OF_MOVE cid#1555083 COPY_INSTEAD_OF_MOVE cid#1555097 COPY_INSTEAD_OF_MOVE cid#1555135 COPY_INSTEAD_OF_MOVE cid#1555140 COPY_INSTEAD_OF_MOVE cid#1555146 COPY_INSTEAD_OF_MOVE cid#1555148 COPY_INSTEAD_OF_MOVE cid#1555149 COPY_INSTEAD_OF_MOVE cid#1555155 COPY_INSTEAD_OF_MOVE cid#1555157 COPY_INSTEAD_OF_MOVE cid#1555168 COPY_INSTEAD_OF_MOVE cid#1555195 COPY_INSTEAD_OF_MOVE cid#1555196 COPY_INSTEAD_OF_MOVE cid#1555237 COPY_INSTEAD_OF_MOVE Change-Id: I90531c19c28dca77fe99c72efdfc0972c311da98 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175377 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-10-22cid#1607845 silence Overflowed constantCaolán McNamara
Change-Id: I97af2c10eab0ecc3c00416e1e7263b779964def8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175375 Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Tested-by: Jenkins
2024-10-22drop newly unused Broadcast argumentCaolán McNamara
Change-Id: I80b4689bb6fe48e37217d5eb45007326672303fe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175362 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
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-22set stylesheet parent at creation timeNoel Grandin
avoids a bunch of broadcasting. a similar mega-master-page scenario as reported in tdf#158773 9.1 - 7.0s Some re-ordering of SVG output occurs, which means tweaking some unit tests. Change-Id: I447a4639a96c12c627a074f7e0f1ede8b3cbaf72 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175299 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-10-21Optimize JsonToPropertyValues a bitMike Kaganski
1. Make it take string view: helps to avoid extra string allocation e.g. in desktop::jsonToPropertyValuesVector, and will help more, when C++26 stringstream ctor taking string view is available. 2. Factor out a function taking boost::property_tree::ptree, making implementation simpler for [][]com.sun.star.beans.PropertyValue and []com.sun.star.beans.PropertyValue, without writing a child node to a JSON string, and parsing it again. Change-Id: I16ac2641633ea67a7c9c054c9df09a790500e6fb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175361 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-10-21tdf#163543: check GetDocShell()Xisco Fauli
Similar to commit c5f4fe10589acff4d253cc3d32acaf67c7456bd7 Author: Caolán McNamara <caolan.mcnamara@collabora.com> Date: Thu Oct 3 15:14:05 2024 +0100 check for null DocShell before deref Change-Id: I910fb934a36b0e68fd8bda59516c21aa9d27d09a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175338 Reviewed-by: Balazs Varga <balazs.varga.extern@allotropia.de> Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2024-10-21drop StyleSheetCreatedNoel Grandin
the only place that references it, effectively ignores it. I cant find anything that really uses it, as far back in the git history as commit 59bb5ba445352f88e3ac2d00a5dc3f9bb872326a Author: Vladimir Glazounov <vg@openoffice.org> Date: Wed Apr 11 18:36:28 2007 +0000 INTEGRATION: CWS hedaburemove01 (1.1.2); FILE ADDED when it was introduced. Removing this removes a bunch of expensive broadcast operations. a similar mega-master-page scenario as reported in tdf#158773 20s -> 17s Change-Id: I84ee269aa0ea96e9f77601b01d4795edd3294044 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175175 Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Tested-by: Jenkins
2024-10-21tdf#163486: PVS: identical sub-expressionsXisco Fauli
Since commit b7d2a9c824aca1a4dfd1b857a3620e73ade6bc0d Author: Michael Weghorn <m.weghorn@posteo.de> Date: Fri Oct 27 17:55:59 2023 +0200 tdf#135586 sw a11y: Use BLOCK_QUOTE role for "Block Quotation" para V501 There are identical sub-expressions 'xParaContext->getAccessibleRole() == AccessibleRole::PARAGRAPH' to the left and to the right of the '||' operator. Change-Id: I2c0c843c492aeffb2b1506821796d39804d01343 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175329 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins
2024-10-21tdf#163486 sw: PVS: identical sub-expressionsMichael Stahl
Copypasta in commit c799de145f7e289f31e3669646e5bd12814e6c5e, we want to compare the rows where the 2 objects are anchored. Change-Id: Ifdf267b8d70d6410ce50a507783d284ac128c1aa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175326 Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> Tested-by: Jenkins
2024-10-21tdf#163486: PVS: Two similar code fragments were foundXisco Fauli
commit 14a73d8de3f04e3087a8c2872cd1c53096f605ba Author: Ivo Hinkelmann <ihi@openoffice.org> Date: Wed Jul 16 12:35:11 2008 +0000 INTEGRATION: CWS tl55 (1.13.50); FILE MERGED V778 Two similar code fragments were found. Perhaps, this is a typo and 'm_xGCIterator' variable should be used instead of 'm_xLngSvcMgr'. Change-Id: Ic8df89aa951761903d955c4b571bd0b70829ad3f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175300 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-10-21tdf#163551 fix filter comments by author bugMohit Marathe
This patch fixes the bug in which you have to reset the date filter for filter by author to work i.e. when switching the filter from one author to another Change-Id: Ib5d3bebf587c0e940d4984dd78f9d4a94f5cbb06 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175189 Tested-by: Jenkins Reviewed-by: Sarper Akdemir <sarper.akdemir@allotropia.de>
2024-10-21In MSVC, non-static constexpr objects are initialized at run-timeMike Kaganski
Similar to commit c785399884650fd0a1a4ffc3008fbb665e47a9d3 (In MSVC, non-static constexpr objects are initialized at run-time, 2024-09-04). Change-Id: Id1c9ca961efdcbfd897a03e4f85869a6f4e5260b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175297 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins
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-21use frozen::make_unordered_set to skip the number of elementsTomaž Vajngerl
Change-Id: I715ab2bfc586f8854313b270580faa8e003f1c5d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175190 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2024-10-20cid#1555723 Data race conditionCaolán McNamara
Change-Id: Icc056dffe6e81402aecf1363958d83101190186e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175181 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-10-20tdf#163486: PVS: Identical branchesBogdan Buzea
V1037 Two or more case-branches perform the same actions. Check lines: 871, 879 V1037 Two or more case-branches perform the same actions. Check lines: 891, 899 Change-Id: I027615d9acef9aae4c554f2dcbb033edac01940e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175239 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> Tested-by: Jenkins
2024-10-20cid#1606970 Overflowed constantCaolán McNamara
Change-Id: I676b2db3baeca7e99d63c1078e2b280edb0336fd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175184 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-10-20cid#1607805 Overflowed constantCaolán McNamara
Change-Id: I14c02ef847f4cc2ab17fa6efb1a4d8c92c585eeb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175245 Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Tested-by: Jenkins
2024-10-20cid#1607208 Overflowed constantCaolán McNamara
Change-Id: I9e4aa51281e1fcaa208a0992281ac9050fe40306 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175244 Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Tested-by: Jenkins
2024-10-20if this could happen, then this loop would never endCaolán McNamara
so in practice it isn't happening. (Or the --i should be conditional on something getting removed) Change-Id: I0d74a46eced77c5bb1474c60c26e39061de791a7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175243 Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-10-20cid#1607360 Overflowed constantCaolán McNamara
Change-Id: I3bc311b2a9eab23de8f8a4db095ce2e068721f21 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175242 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-10-20cid#1608476 Overflowed constantCaolán McNamara
just set nRead to an initial 2 and leave nLen2 alone, nRead and nLen2 are only used for the loop condition Change-Id: I269db2d986070f010a05eb58f200d19afc1bff1c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175241 Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-10-20nRead is just an alias for m_cbSTDBaseInFile, clarify thatCaolán McNamara
Change-Id: I6917a48b9e9d1169eb9155503ad7ece2fcb33d6e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175200 Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-10-20tdf#163486: PVS: fix std:swap argumentsXisco Fauli
Since commit 81c4be45829826ae73ac14e1cb862e38dd73344d Author: Caolán McNamara <caolan.mcnamara@collabora.com> Date: Sat Dec 16 20:18:13 2023 +0000 cid#1545561 std::swap COPY_INSTEAD_OF_MOVE V549 The first argument of 'swap' function is equal to the second argument. Change-Id: Ieeb06744afe4ea09b986c78e8b25a5b5fc87d434 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175253 Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Tested-by: Jenkins Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-10-20tdf#163486: PVS: Identical branchesBogdan Buzea
V1037 Two or more case-branches perform the same actions. Check lines: 976, 983 Change-Id: If40078b2a6ea2654d22f6cf559d19ed6c64bc44a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175218 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>