summaryrefslogtreecommitdiff
path: root/svtools/util
ModeNameSize
-rw-r--r--svt.component3192logplain
/span>Fix unwanted code behavior change in sc/Hossein While changing the code to use std::optional instead of bool, some unwanted code behavior changes were introduced in this commit: commit fbe8071e4f6be57d3e372d69a4c7cc4d37a83eb9 Date: Sat Oct 15 14:20:31 2022 +0200 refactor functions: return optional instead of bool Part of those unwanted changes are fixed in this commit: commit 243e811abc441ec7f55e1395f23343dfa6f7c812 Date: Wed Jun 5 10:14:49 2024 +0100 cid#1603200 Uninitialized scalar variable cid#1603199 Uninitialized scalar variable This commit undoes changes in the above (second) commit, and tries to fix the problems by making the code look closer to what it was before the first commit. Change-Id: I47d692a5cf46abad582d7f162e2180e6c26b7e5d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169037 Tested-by: Jenkins Reviewed-by: Hossein <hossein@libreoffice.org> 2024-06-05cid#1603200 Uninitialized scalar variableCaolán McNamara cid#1603199 Uninitialized scalar variable and other fixups for: commit fbe8071e4f6be57d3e372d69a4c7cc4d37a83eb9 Date: Sat Oct 15 14:20:31 2022 +0200 refactor functions: return optional instead of bool Change-Id: I192017d0fc710ada7686e4c6dd313727b02f3889 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168453 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> 2024-06-04refactor functions: return optional instead of boolAndrea Rosetti Change-Id: Ic4ff3ddaac161df13bf1e3e1372811a0685ec6c5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141417 Reviewed-by: Jonathan Clark <jonathan@libreoffice.org> Reviewed-by: Hossein <hossein@libreoffice.org> Tested-by: Jenkins 2024-05-06WaE: C6011 Dereferencing NULL pointer warningsCaolán McNamara Change-Id: I71d20c4d35b5123216da55a8b314400c93cae6fd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167173 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> 2023-02-17crashtesting: crash on export of forum-mso-en4-568138.xlsx to xlsCaolán McNamara recurses to death warn:legacy.osl:186588:186588:sc/source/filter/excel/xeformula.cxx:518: XclExpFmlaCompImpl::CreateFormula - unknown garbage behind formula warn:legacy.osl:186588:186588:sc/source/filter/excel/xeformula.cxx:518: XclExpFmlaCompImpl::CreateFormula - unknown garbage behind formula warn:legacy.osl:186588:186588:sc/source/filter/excel/xeformula.cxx:2235: XclExpFmlaCompImpl::PopOperandPos - token stack broken Segmentation fault (core dumped) Change-Id: I17172be42c9992ceb3a90c5a92344a58328dc483 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147204 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> 2022-08-18loplugin:moveitNoel Grandin Change-Id: I34de7408553e4ca702cab9aa611c03dc60b9b6a1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138472 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2022-08-07clang-tidy modernize-pass-by-value in scNoel Grandin Change-Id: Ia7ff651d1cbc119b36a9f8052594d03650988f59 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137848 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2022-05-09tdf#148993 XLS export: fix broken formula regressionLászló Németh Exported XLS documents lost their formulas opened in MSO. Regression from commit 12ee423c7549ddd2b86dfc3fc6fed2c617dcca7f "tdf#144397 tdf#144636 XLSX: cache external named ranges and their formulas". Change-Id: I009630a41b29bb21349711cc07d0ed181f816374 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134075 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org> 2022-02-14Recheck modules s[a-c]* with IWYUGabor Kelemen See tdf#42949 for motivation Change-Id: I867e1f7a2c44210de3281b36e22708a5d32ddb7f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129476 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de> 2021-11-19Use M_PI* instead of F_PI*Mike Kaganski Change-Id: Ie2b7a1c74fc516781a17a20157b8217bc41e383d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125504 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> 2021-10-11tdf#144397 tdf#144636 XLSX: cache external named ranges and their formulasBalazs Varga XLSX round-trip resulted corrupt XLSX with invalid named range, triggering Excel file repair, because of incomplete handling of external file reference of the named ranges (tdf#144636). Cache external named ranges and their formulas in case of updating formulas without data loss. Also we can copy cell formulas and we get valid results of formulas from the cached tables, instead of an error type. Now Calc resolves the external file reference of the named ranges, e.g. see "rangenameinotherfile" of the unit test document in Manage Names (Ctrl-F3). After the fix, it contains full path of the external file, and recalculating the sheet or changing data in the target file reveals that the named range works correctly (tdf#144397). Change-Id: Ic011a29290f8cabcc39fdc4b8d775ecf9d33612f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122026 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org> 2021-07-28Resolves: tdf#76310 Preserve whitespace TAB, CR, LF in formula expressionsEike Rathke Allowed whitespace in ODFF and OOXML are U+0020 SPACE U+0009 CHARACTER TABULATION U+000A LINE FEED U+000D CARRIAGE RETURN Line feed and carriage return look a bit funny in the Function Wizard if part of a function's argument but work. Once a formula is edited, CR are converted to LF though, probably already in EditEngine, didn't investigate. Change-Id: I6278f6be48872e0710a3d74212db391dda249ed2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119635 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins 2020-09-14ScCompiler::MoveRelWrap never passed a null ScDocument*Caolán McNamara Change-Id: I8a5847877bf3de458a9ec81ed02602f067c3a279 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102615 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com> 2020-09-13ScTokenArray ctor always dereferences its ScDocument* argCaolán McNamara Change-Id: Ie65ca182fd00600670c1e916343fef511d6cdcc8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102588 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com> 2020-09-13toAbs always dereferences its ScDocument*Caolán McNamara Change-Id: I6bddbca2289074ecf333227b3fc1a49da4b431a6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102529 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com> 2020-08-08loplugin:flatten in sc/filter/excelNoel Grandin Change-Id: I48ab5b20a3345cd40d4715c3ff025d2df3b491fd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100337 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2020-07-01Upcoming improved loplugin:staticanonymous -> redundantstatic: scStephan Bergmann Change-Id: Ie2d2d26bac69f4b228eadef712b06b665b3974eb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97650 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com> 2020-05-28Make loplugin:simplifypointertobool handle parenthesized expressionsStephan Bergmann ...as discussed as an open TODO in the commit message of fe6cce01c88d045a1fcf09acf049c34c22299b02 "Fix loplugin:simplifypointertobool for libstdc++ std::shared_ptr". The necessary changes across the code base have been done fully automatically with the rewriting plugin on Linux. (All those changes apparently involve uses of macro arguments wrapped in parentheses in the macro body, but always in conditionally-converted-to-bool contexts. In other contexts, such automatic rewriting would add the "bool" to the macro body, which would be wrong in general, but we apparently get away with that sloppy coding for now.) The parenExprs_ stack that fe6cce01c88d045a1fcf09acf049c34c22299b02 had introduced to treat such (then-undetected, it had turned out) parenthesized cases now turns out to not be needed after all. Change-Id: I2021f61c2e2805be7e18b38edf8744d186cac3cb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95010 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com> 2020-05-26Fix loplugin:simplifypointertobool for libstdc++ std::shared_ptrStephan Bergmann ...where the get member function is defined on a std::__shared_ptr base class, so loplugin:simplifypointertobool used to miss those until now. (While e.g. using libc++ on macOS found those cases.) 366d08f2f6d4de922f6099c62bb81b49d89e0a68 "new loplugin:simplifypointertobool" was mistaken in breaking isSmartPointerType(const clang::Type* t) out of isSmartPointerType(const Expr* e); c874294ad9fb178df47c66875bfbdec466e39763 "Fix detection of std::unique_ptr/shared_ptr in loplugin:redundantpointerops" had introduced that indivisible two-step algorithm on purpose. The amount of additional hits (on Linux) apparently asked for turning loplugin:simplifypointertobool into a rewriting plugin. Which in turn showed that the naive adivce to just "drop the get()" is not sufficient in places that are not contextually converted to bool, as those places need to be wrapped in a bool(...) functional cast now. If the expression was already wrapped in parentheses, those could be reused as part of the functional cast, but implementing that showed that such cases are not yet found at all by the existing loplugin:simplifypointertobool. Lets leave that TODO for another commit. Besides the changes to compilerplugins/ itself, this change has been generated fully automatically with the rewriting plugin on Linux. Change-Id: I83107d6f634fc9ac232986f49044d7017df83e2a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94888 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Jenkins 2020-05-24inline some use-once typedefsNoel Grandin Change-Id: Idddba2f3fd05265b08dbc88edb6152d34a166052 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94730 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2020-04-15loplugin:buriedassign in scNoel Grandin Change-Id: I9b4146c4e8814a36c7bfcd4c31f913c8412320e8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92244 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>