/source/ve/extensions/

/core Git repository'/>
summaryrefslogtreecommitdiff
path: root/sc/source/filter/excel/xelink.cxx
AgeCommit message (Collapse)Author
8 dayscrashtesting: raw & exported unescaped to xl/externalLinks/externalLink1.xmlCaolán McNamara
seen on reimport of xlsx export of forum-mso-en4-136321.xlsx as: XmlFilterBase::importFragment - XML parser failed in fragment 'xl/externalLinks/externalLink1.xml' com.sun.star.xml.sax.SAXParseException message: "[xl/externalLinks/externalLink1.xml line 2]: xmlParseEntityRef: no name Change-Id: I71f2d5b01905349bedff7c66fc4b087358569bd0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179845 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-11-12loplugin:reftotemp in scNoel Grandin
Change-Id: Ibd0efec208447d0ad3f5d85354cbfc7d276064af Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176420 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-08-19cid#1606552 silence Overflowed constantCaolán McNamara
Change-Id: Ia93330fa9b6b0fa4ca09a89e57c3dcf55d357383 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172026 Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-07-18make ScRange single-arg constructor explicitNoel Grandin
Change-Id: Ie24e1e601b639dd62dbb8a201378a970699b20ab Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170686 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-07-01Fix 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-17loplugin:ostr in sc/../filterNoel Grandin
Change-Id: I3c986d9e7f9780f08653131205626471ac75896f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167759 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-10-11Deduplicate O(U)StringConcatenationMike Kaganski
And use an overloaded helper function with a better (?) unified name to show that the result is not an O(U)String. Change-Id: I8956338b05d02bf46a6185828130ea8ef145d46b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141203 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
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-02-10remove most hardcoded MAXCOL/MAXROW from Calc filtersLuboš Luňák
Change-Id: I50d4a5c22a2b224526978e41fc7b8cb194b4bf3a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129780 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2021-10-19fix crash of OOXML export of deleted, empty range namesBalazs Varga
since... commit 12ee423c7549ddd2b86dfc3fc6fed2c617dcca7f Date: Mon Sep 13 12:17:37 2021 +0200 tdf#144397 tdf#144636 XLSX: cache external named ranges and their formulas Change-Id: Ib5591d2a680cb58d248cf4e8fa4a4cbe777002f5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123822 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.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-10-03A more lightweight O[U]StringConcatenationStephan Bergmann
...compared to a full-blown O[U]String, for temporary objects holding an O[U]StringConcat result that can then be used as a std::[u16]string_view. It's instructive to see how some invocations of operator ==, operator !=, and O[U]StringBuffer::insert with an O[U]StringConcat argument required implicit materialization of an O[U]String temporary, and how that expensive operation has now been made explicit with the explicit O[U]StringConcatenation ctor. (The additional operator == and operator != overloads are necessary because the overloads taking two std::[u16]string_view parameters wouldn't even be found here with ADL. And the OUString-related ones would cause ambiguities in at least sal/qa/rtl/strings/test_oustring_stringliterals.cxx built with RTL_STRING_UNITTEST, so have simply been disabled for that special test-code case.) Change-Id: Id29799fa8da21a09ff9794cbc7cc9b366e6803b8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122890 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-09-17rather return ref from GetCollatorNoel Grandin
since we never return a nullptr. Also add a new utility method to simplify the call sites that need to pick the right collator Change-Id: I5deb009cb5144fd182bbc6470ae30ea05e6979c9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122237 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-13split SvNumberFormatter into it's own headerNoel Grandin
so I can make changes without running into cyclic dependencies between header files Change-Id: I98a91c7cc66002ba745cdb8239e5cc267922a45c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120412 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-02-03Fix typoAndrea Gelmini
Change-Id: I9ce663427a7c967fa8825631412a07215bbb0229 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107183 Tested-by: Jenkins Reviewed-by: Eike Rathke <erack@redhat.com>
2020-12-29loplugin:stringviewparam: operator +Stephan Bergmann
Change-Id: I044dd21b63d7eb03224675584fa143009c6b6008 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108418 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-12-21tdf#138824 tdf#137937 XLSX export: fix parent directory pathAttila Szűcs
Parent directory paths (../) removed by XclExpHyperlink::BuildFileName() resulted broken external reference. Note: on Linux, now this fix creates a working, but still fragile path relative to the root directory. Co-authored-by: Tibor Nagy (NISZ) Change-Id: I9401d75d1fba0194d4ff509d9b7305969b8804e2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107603 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2020-12-11Adapt the remaining OUString functions to std string_viewStephan Bergmann
...for LIBO_INTERNAL_ONLY. These had been missed by 1b43cceaea2084a0489db68cd0113508f34b6643 "Make many OUString functions take std::u16string_view parameters" because they did not match the multi-overload pattern that was addressed there, but they nevertheless benefit from being changed just as well (witness e.g. the various resulting changes from copy() to subView()). This showed a conversion from OStringChar to std::string_view to be missing (while the corresponding conversion form OUStringChar to std::u16string_view was already present). The improvement to loplugin:stringadd became necessary to fix > [CPT] compilerplugins/clang/test/stringadd.cxx > error: 'error' diagnostics expected but not seen: > File ~/lo/core/compilerplugins/clang/test/stringadd.cxx Line 43 (directive at ~/lo/core/compilerplugins/clang/test/stringadd.cxx:42): simplify by merging with the preceding assignment [loplugin:stringadd] > File ~/lo/core/compilerplugins/clang/test/stringadd.cxx Line 61 (directive at ~/lo/core/compilerplugins/clang/test/stringadd.cxx:60): simplify by merging with the preceding assignment [loplugin:stringadd] > 2 errors generated. Change-Id: Ie40de0616a66e60e289c1af0ca60aed6f9ecc279 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107602 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-12-09tdf#138741 XLSX export: fix crash in setSkipUnusedFileIdsAttila Szűcs
Changed size of maConvertFileIdToUsedFileId vector to the same as maSrcFiles size. Some external references was not inserted into maRefCells, that resulted a smaller maConvertFileIdToUsedFileId as was needed. This crash was caused by: tdf#87973 XLSX export: fix lost file names in modified links f85d860ccbebd99bc128218148e2992c9415f221 Co-authored-by: Tibor Nagy (NISZ) Change-Id: I1501f5222483bf3e9e41c9e921a024320231dce8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107434 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-12-03tdf#87973 XLSX export: fix lost file names in modified linksAttila Szűcs
Calculate new indexes for external reference files to export it to xlsx. These indexes are calculated only temporary, only for exporting. Much better solution would be to change the indexes permanently, but the original indexes are stored so many places in the code (for example it is stored in cells formula tokens converted to string). So it would be a much bigger refactoring to be able to delete an external reference permanently... even just to reorder the indexes, require to modify a lot of code. Co-authored-by: Tibor Nagy (NISZ) Change-Id: If9254f6e62ec739e2b159a066ada7efdbceb3ad8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106895 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2020-11-24loplugin:stringviewparam extend to comparison operatorsNoel
which means that some call sites have to change to use unicode string literals i.e. u"foo" instead of "foo" Change-Id: Ie51c3adf56d343dd1d1710777f9d2a43ee66221c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106125 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
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-06-05add boost::intrusive_ptr to list of smart points in pluginsNoel Grandin
and fix some loplugin:simplifypointertobool warnings Change-Id: I3644c390a3339a4cb8d66d6d034a0f043de9320c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95572 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-30pass ScSheetLimits aroundNoel Grandin
instead of MAXROW, MAXCOL. In preparation for more conversion work that needs to be done to make jumbo sheets work. Change-Id: I4698b8fe111e060ae2a965afc7276b7e7bfb482a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95153 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
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-25convert excel filter in calc from shared_ptr to rtl::ReferenceNoel Grandin
ref-counting traffic here accounts for 10% of the profile on some of my calc imports. Change-Id: I1b32e0e61d7bf5eb65780ec0e7fcb99f6576050a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92694 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-03-12tdf#130977 replace `rtl::math::isFinite` with `std::isfinite`.Yukio Siraichi
- make all calls look like `std::isfinite`. - change the comments referring `rtl::math::isFinite`. Change-Id: I0cde9ceb9f20150467b454cddde5e62003cfde1a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90234 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-01-24loplugin:makeshared in scNoel Grandin
Change-Id: Ie287b5c11a1276c56f416f17ea69cddd5992b4a2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87326 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>