summaryrefslogtreecommitdiff
path: root/hwpfilter
AgeCommit message (Collapse)Author
2023-10-23Extended loplugin:ostr: Rewrite some O[U]StringLiteral -> O[U]StringStephan Bergmann
...in include files. This is a mix of automatic rewriting in include files and manual fixups (mostly addressing loplugin:redundantfcast) in source files that include those. Change-Id: I1f3cc1e67b9cabd2e9d61a4d9e9a01e587ea35cc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158337 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-10-19Extended loplugin:ostr: Automatic rewrite O[U]StringLiteral: hwpfilterStephan Bergmann
Change-Id: I49a08f7102ad6669a5f307c412d07a8040249b12 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158201 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-10-03ofz#62935 avoid negative numbers in olHanglJasoCaolán McNamara
Change-Id: I3898b95e9d2fe60690889ba259859ed9f66636d1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157512 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-09-10using decls should come after #includeNoel Grandin
Change-Id: I058551e87bca42adede860f6f299b0f7ae2af3b5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156798 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-07-23ofz#49217 Out-of-memoryCaolán McNamara
just abandon in this case Change-Id: I2234f130e3c8de0b044256921f5d6941acc72e59 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154769 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-04-30ofz#58400 TimeoutCaolán McNamara
Change-Id: I6ded0d0613b66f7ec075796e257d93cf25822d2b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151189 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-04-24loplugin:unnecessarygetstr extend to more std::string checkingNoel Grandin
suggested by mike kaganski Change-Id: I5f5f254142767aca45a6101abdd84a0163ca6a34 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150936 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-04-24cid#1524749 Copy into fixed size bufferCaolán McNamara
Change-Id: I0a4d11fc15c9e7603f6c46c2075373722722b437 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150905 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-04-10Drop MzStringMike Kaganski
Change-Id: Id0b0541e5069379ef387b3c9309cdda38929b97f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150194 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-03-20tdf#145614 convert all #define into enum in hwpfilter/source/grammar.hMoazAlaa
Change-Id: I8496b95cc55732d72d36cfc4d2fadc5cbea53e6a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148261 Tested-by: Jenkins Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
2023-03-15Silence a false warning also for GCC 13Stephan Bergmann
...as it still hits at least with gcc-c++-13.0.1-0.7.fc38.x86_64 Change-Id: I25f48c241cec17d277c2ff6d4216ee63fdcfc6e6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148901 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-02-27Use SAL_NEWLINE_STRING to avoid some wheel re-inventionMike Kaganski
Change-Id: Ib60ddf2b1111fb2d6caf22ac6e0848bd27373b9e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147750 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-02-11ofz: Use-of-uninitialized-valueCaolán McNamara
Change-Id: I033fab3ea016d3b57891a35602920b7de811ccb4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146784 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-02-10operator [] out of range assertCaolán McNamara
presumably since: commit 0e45f8318ee73361fecb049b33b0662fabe295d3 Date: Sat Nov 5 15:59:27 2022 +0100 -Werror,-Wdeprecated-declarations (sprintf, macOS 13 SDK): hwpfilter Change-Id: I1e93526d46d1357a8f11f7ff7ed4c3f2274b9c7a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146783 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-02-09tdf#143148 Use pragma once instead of include guards in hwpfilterDevansh Jain
Change-Id: I010b6c76c1f859340f544409bbaab946cf2a6aa2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146554 Tested-by: Jenkins Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2023-02-07ofz#55751 check that level is validCaolán McNamara
Change-Id: I971bdcc62fd3775f8f75bf69db41182afc4baefc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146595 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-02-04ofz: Use-of-uninitialized-valueCaolán McNamara
Change-Id: I97fb4edcad3a014b622f1a936adecd634121ad3f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146559 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-01-30ofz#55520 check level is < MAX_OUTLINE_LEVELCaolán McNamara
Change-Id: I61ac10f40cd754a1ea3186ab89e9bfd1e99dc563 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146340 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-12-20cid#1517796 Out-of-bounds readCaolán McNamara
Change-Id: I930e3888cfa3363b9183619225f0d4cdca197cdd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144547 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-12-18ofz#54402 check boundsCaolán McNamara
git show -w Change-Id: I8e7c719a9f1c38f151eb7e59ec222849eb2e28f9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144402 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-11-24hwpfilter: Fix use of std::char_trait<unsigned short>Stephan Bergmann
...now that it is gone from libc++ 16 trunk since <https://github.com/llvm/llvm-project/commit/aeecef08c385b1e4955155dd649a2d3724463849> "[libc++] Remove default definition of std::char_traits", causing > In file included from hwpfilter/source/formula.cxx:20: > In file included from hwpfilter/source/formula.h:23: > In file included from workdir/UnoApiHeadersTarget/offapi/normal/com/sun/star/xml/sax/XDocumentHandler.hpp:6: > In file included from workdir/UnoApiHeadersTarget/offapi/normal/com/sun/star/xml/sax/XDocumentHandler.hdl:6: > In file included from workdir/UnoApiHeadersTarget/udkapi/normal/com/sun/star/uno/XInterface.hdl:6: > In file included from include/com/sun/star/uno/Any.h:30: > In file included from include/rtl/ustring.hxx:34: > In file included from ~/llvm/inst/bin/../include/c++/v1/ostream:170: > In file included from ~/llvm/inst/bin/../include/c++/v1/bitset:131: > ~/llvm/inst/bin/../include/c++/v1/string:676:46: error: implicit instantiation of undefined template 'std::char_traits<unsigned short>' > static_assert(( is_same<_CharT, typename traits_type::char_type>::value), > ^ > hwpfilter/source/hwplib.h:47:10: note: in instantiation of template class 'std::basic_string<unsigned short>' requested here > if (s.length() > o3tl::make_unsigned(std::numeric_limits<sal_Int32>::max())) { > ^ > ~/llvm/inst/bin/../include/c++/v1/__fwd/string.h:22:29: note: template is declared here > struct _LIBCPP_TEMPLATE_VIS char_traits; > ^ Change-Id: Ied437a079cb66c8b49f9980ab29b59ec5e2097d3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143238 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-11-06ofz#52490 TimeoutCaolán McNamara
Change-Id: I0aa462bea2975e6532dc3cd4b2f088d5dde8852f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142352 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-11-05-Werror,-Wdeprecated-declarations (sprintf, macOS 13 SDK): hwpfilterStephan Bergmann
Change-Id: I91aa4dc3cedccf341a5b7a936c171323a3e58630 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142327 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-09-29split utl::TempFile into fast and named variantsNoel Grandin
which makes it easier to know what each variant requires to stay on it's happy path Change-Id: I3275a2543573367714bc78092e882f6535507285 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140469 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-08-25ofz#47118 TimeoutCaolán McNamara
Change-Id: I8bb03b567acd4419aff15267d936298378ca03d7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138848 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-08-23tdf#148251 Use std::swap instead of using temporary valuesLiu Hao
Change-Id: Ibbc46bfb17d4d27dc40e63c65190b3f3a5f2d9c4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138256 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins
2022-08-13clang-tidy modernize-pass-by-value in variousNoel Grandin
Change-Id: Ie091b22bd77d4e1fbff46545bc86c12f1dbafcfe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138171 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-08-06ofz#49832 Integer-overflowCaolán McNamara
Change-Id: I35efe0b78546b4804206f78159b2fc18172ca4f4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137885 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-07-24ofz#49217 height_sp member, etc unusedCaolán McNamara
massif peak from 37.10MB to 28.16MB Change-Id: I3d773637cee4243f235a4784e29a066d2c8b747a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137384 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-07-17ofz: Use-of-uninitialized-valueCaolán McNamara
Change-Id: I4afb1f9893eadda28d4d9d2e90d5d6293a8ee60c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137128 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-06-21ofz#48161 Container-overflowCaolán McNamara
Change-Id: I99a63c3cfa48344221dbe4a7400d313d875abd82 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136207 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-06-20ofz#47118 TimeoutCaolán McNamara
Change-Id: I544074822cfa51ae162afa370c488a1f6132088c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136145 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-06-20ofz#47463 OOM only first byte of 'font', 'ratio' and 'space' are usedCaolán McNamara
1.098GB -> 854.6MB Change-Id: I3390c3a5abe457f8d0ad49b03b50a2d353566c2a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136142 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-06-03No need for a cast here when comparing against const int DATE_SIZE = 40Stephan Bergmann
Change-Id: I2e9190ac08dc79fe624572ff3a96c32c18afce29 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135341 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-05-16ofz#47473 OOM just skip the unused "reserved" data on readCaolán McNamara
and don't store it Change-Id: I7e68111b5ed724c5eab9e8040b8c28f542064ae5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134353 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-05-07GCC 12 is still just as brokenStephan Bergmann
Change-Id: Ic2e151eb78512388150492b6dff0c39046d4d3c6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133979 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-05-02Pick a better variable typeStephan Bergmann
Change-Id: I2a24201d0e9cb230aefbb92dadf30907b0d1dccb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133677 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-05-01ofz#47118 TimeoutCaolán McNamara
Change-Id: I5cf7f07c00faebb8005b150c9638dfbb742d156f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133666 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-04-27remove static bufferCaolán McNamara
Change-Id: I77ebc45000e09d1553c8e63402f30e720852c057 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133458 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-04-26ofz#47042 previous use of static variable affecting later runsCaolán McNamara
Change-Id: I64fb184e43fb025798781c85c9a0a8e0354b21b0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133452 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-04-26Use o3tl::make_unsigned in some placesStephan Bergmann
...where a signed and an unsigned value are compared, and the signed value has just been proven to be non-negative here Change-Id: I9665e6c2c4c5557f2d4cf1bb646f9fffc7bd7d30 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133442 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-04-25ofz#46794 TimeoutCaolán McNamara
Change-Id: I58bfdbe4bab0ee8b7ff49f937711dff649392bbc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133373 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-04-25vector is a little faster than deque hereCaolán McNamara
Change-Id: I0471143b13ea8113919ed71abe956f27729cecad Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133372 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-04-14Pick a better variable typeStephan Bergmann
Change-Id: I1c9d3bcb1e750b130a04105ab9cf370b7f31f392 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132994 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-04-07ofz#46467 TimeoutCaolán McNamara
Change-Id: Ib2a248a6f912a340d2f0b79a068b68036fa357c1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132690 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-04-04ofz#46331 Null-dereference READCaolán McNamara
Change-Id: Id03c7fc437d67e01d6a1ec0547b2584396066201 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132497 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-03-25ofz: ensure unsigned indexCaolán McNamara
Change-Id: I38d6238a6eede0188f942229b2fb931614e56309 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132090 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-03-21ofz#45816 Direct-leakCaolán McNamara
Change-Id: I73ed541c9a8fb6d9b0a8ee86ce7cf581721a9b73 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131889 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-03-21ofz#45816 Direct-leakCaolán McNamara
Change-Id: I63f4828fb35a1f24c98ccd235af91d186b48058a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131897 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-03-21YYDEBUG is always 0Caolán McNamara
Change-Id: I9255b0c6447126e5b0907b12622b668bb4c79474 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131896 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>