summaryrefslogtreecommitdiff
path: root/sdext/source/pdfimport/pdfparse/pdfentries.cxx
AgeCommit message (Collapse)Author
2024-05-16loplugin:ostr in sdextNoel Grandin
Change-Id: I0b67b8c8f9dbdf2fdc8192e22b838c15db960cfd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167704 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-11-19Extended loplugin:ostr: sdextStephan Bergmann
Change-Id: If4e8ccf288846fc768b3e035706a8bd0b2207f4f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159678 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-03-30loplugin:stringadd in sd/sdextNoel Grandin
when applying my upcoming patch to also consider O[U]StringBuffer Change-Id: Ic95e72e1c857c6814d6e25b9820494cdfa535465 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149746 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-07-22elide some makeStringAndClear() callsNoel Grandin
Change-Id: I3b80d0f5b6d39c071242bc6ccc1e4333886c835d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137309 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-09-02clang-tidy:readability-redundant-member-initNoel Grandin
Change-Id: I0a9b238c0ba551b330bee7b89eb6cd48fad1b265 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121488 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-05-03loplugin:stringadd improvement for appending numbersNoel Grandin
I was wrong, the Concat framework already optimised appending numbers by stack-allocating small buffers, so include them in the plugin Change-Id: I922edbdde273c89abfe21d51c5d25dc01c97db25 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115037 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-04-22no need to create temporaries when appending number to O[U]StringBufferNoel Grandin
Change-Id: I36d82423b5f75010552696a66cec7e53ee265ce4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114395 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-03-21cid#1474243 Uninitialized scalar variableCaolán McNamara
and cid#1473901 Uninitialized scalar variable Change-Id: I6a1d0784865c1a77eacbe25497b97ea63cf3705c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112849 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-12-20No longer need to worry about ambiguous operator== in loplugin:stringviewparamStephan Bergmann
...after 46c5de832868d2812448b2caace3eeaa9237b9f6 "make *String(string_view) constructors explicit" Change-Id: I6e884c762a2fc91f5dd6fbb197a596fd60f17cae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108043 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-07-02Upcoming improved loplugin:staticanonymous -> redundantstatic: sdextStephan Bergmann
Change-Id: I767b6ca4bc2bfc3623aa2ba502f075bde1347df7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97657 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-02-12clang-analyzer-deadcode.DeadStoresNoel Grandin
Change-Id: Ifa384933569b27d0d08eb479bb95b799163ae386 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88450 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-12-22sal_Char->char in scaddins..sdextNoel Grandin
Change-Id: If2456800ace3696c2582e19a4c8612fee7d77f90 Reviewed-on: https://gerrit.libreoffice.org/85700 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-11-13tdf#42949 Fix IWYU warnings in sdext/Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I73e11bb945df16d2599b5421b552e155dacdf860 Reviewed-on: https://gerrit.libreoffice.org/82411 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-10-18cid#1448423 silence Wrapper object use after freeCaolán McNamara
Change-Id: I5369a82507845bbe248c35c7faf517ac57f73f67 Reviewed-on: https://gerrit.libreoffice.org/81025 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-10-17Remove some memset callsMike Kaganski
Replace them with default initialization or calloc Change-Id: I747f53c2ced2d0473fd5a5ede4f8520a0633dcc1 Reviewed-on: https://gerrit.libreoffice.org/80805 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-10-16loplugin:bufferadd loosen some constraintsNoel Grandin
and extend O*StringView to have a constructor that takes a pointer and a length Change-Id: I6120e96280f030757e855a6596efdae438b7e1e8 Reviewed-on: https://gerrit.libreoffice.org/80872 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-03Extend cast to whole expressionStephan Bergmann
...which has no effect on the result, but silences benign Clang -fsanitize=implicit-signed-integer-truncation warnings Change-Id: Ic2cf38466f12462d67ceb6268d5197e13cc6143a Reviewed-on: https://gerrit.libreoffice.org/68627 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-02-12loplugin:flatten in sdextNoel Grandin
Change-Id: I5a7c2d38ef2e4af54316becd807bffab83d402d0 Reviewed-on: https://gerrit.libreoffice.org/67715 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-01-28o3tl::make_unique -> std::make_unique in sax...svtools (except sc)Gabor Kelemen
Since it is now possible to use C++14, it's time to replace the temporary solution with the standard one Change-Id: I6eea0877eaa1886b64c0cce06a43b8088cbccd8e Reviewed-on: https://gerrit.libreoffice.org/66751 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2018-12-21use unique_ptr in sdextNoel Grandin
Change-Id: I8362cf42dd6a838752b25a4b184da614eb81805e Reviewed-on: https://gerrit.libreoffice.org/65532 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-01clang-tidy: (WIP) bugprone-too-small-loop-variable findingsTamás Zolnai
Change-Id: Iaa255b39928ac45dec1ed37e368c149d6027f561 Reviewed-on: https://gerrit.libreoffice.org/62701 Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com> Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2018-10-20tdf#120703 (PVS)Mike Kaganski
V1023 A pointer without owner is added to the 'm_aSubElements' container by the 'emplace_back' method. A memory leak will occur in case of an exception. V560 A part of conditional expression is always true: !pNum. V701 realloc() possible leak: when realloc() fails in allocating memory, original pointer '* pOutBuf' is lost. Consider assigning realloc() to a temporary pointer. V586 The 'delete' operator is called twice for deallocation of the same memory space. V581 The conditional expressions of the 'if' statements situated alongside each other are identical. Check lines: 867, 869. Change-Id: I2832bf7228914b48cf2c5178ed9c0719b53c883c Reviewed-on: https://gerrit.libreoffice.org/62040 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-10-19clang-tidy readability-container-size-emptyNoel Grandin
Change-Id: I1df70b7dff5ebb6048f7fc618789faa15ca5d422 Reviewed-on: https://gerrit.libreoffice.org/61967 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-09-13new loplugin simplifyconstructNoel Grandin
no need to init smart pointers with nullptr, they all have default constructors that do this already Change-Id: Ief20c060daa0def8c1aa82f1cf8dc4bc696761e9 Reviewed-on: https://gerrit.libreoffice.org/59818 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-30loplugin:useuniqueptr in PDFObjectNoel Grandin
Change-Id: I605dd193f4fd32b07762208766db5f529adf7998 Reviewed-on: https://gerrit.libreoffice.org/59774 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-29replace rtl_allocateMemory with std::mallocNoel Grandin
where used directly, since rtl_allocateMemory now just calls into std::malloc Change-Id: I59f85bdb7efdf6baa30e8fcd2370c0f8e9c999ad Reviewed-on: https://gerrit.libreoffice.org/59685 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-24iRelated rhbz#1618703: Properly handle failure en-/decoding PDF fileStephan Bergmann
...when e.g. FIPS mode makes the various calls to rtl_cipher_initARCFOUR fail. Change-Id: Id1b2222249c151470e233ab814b21228f3a8b561 Reviewed-on: https://gerrit.libreoffice.org/59543 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-07-30Add missing sal/log.hxx headersGabor Kelemen
rtl/string.hxx and rtl/ustring.hxx both unnecessarily #include <sal/log.hxx> (and don't make use of it themselves), but many other files happen to depend on it. This is a continuation of commit 6ff2d84ade299cb3d14d4110e4cf1a4b8070c030 to be able to remove those unneeded includes. This commit adds missing headers to every file found by: grep -FwL sal/log.hxx $(git grep -Elw 'SAL_INFO|SAL_INFO_IF|SAL_WARN|SAL_WARN_IF|SAL_DETAIL_LOG_STREAM|SAL_WHERE|SAL_STREAM|SAL_DEBUG') to directories scripting, sd, sdext Change-Id: I47889cd889cf1d68353184229bfd4712f1528fbf Reviewed-on: https://gerrit.libreoffice.org/58220 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-07-29loplugin:stringloop in sdNoel Grandin
Change-Id: I5b0cd65b6e69490c79e0ac37c137283d19711787 Reviewed-on: https://gerrit.libreoffice.org/58252 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-24loplugin:constparamsNoel Grandin
Change-Id: I7c695073d9a9d3b7a641d6eb9fe01a47d8c3a504 Reviewed-on: https://gerrit.libreoffice.org/48392 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-16tdf#114939 sdext: don't use StarOffice MD5 in PDF importMichael Stahl
Always use real MD5 here, to avoid interop issues. Change-Id: Id6f43952bace1654ac761aecc77676d933737d1d
2018-01-12More loplugin:cstylecast: sdextStephan Bergmann
auto-rewrite with <https://gerrit.libreoffice.org/#/c/47798/> "Enable loplugin:cstylecast for some more cases" plus solenv/clang-format/reformat-formatted-files Change-Id: Ie9eca6a78912a62f5a46ecacb1da052621c79ea4
2017-11-17loplugin:useuniqueptr in PDFContainerNoel Grandin
Change-Id: I25c2a5a078450ed921c7e981f4c9fac242aa7178 Reviewed-on: https://gerrit.libreoffice.org/44863 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-23overload std::hash for OUString and OStringNoel Grandin
no need to explicitly specify it anymore Change-Id: I6ad9259cce77201fdd75152533f5151aae83e9ec Reviewed-on: https://gerrit.libreoffice.org/43567 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-18loplugin:constparams in sdextNoel Grandin
Change-Id: Ia5d2c00b02bf1758f7502065dd109f0f54fda2d3 Reviewed-on: https://gerrit.libreoffice.org/40124 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-06use OString::operator== in preference to ::equalsNoel Grandin
Change-Id: Ib291521963a791a9c6175964571e9d9895072acf Reviewed-on: https://gerrit.libreoffice.org/39646 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-12no need to use OUStringToOString in SAL_INFONoel Grandin
Change-Id: I707e0d72aba89b7e644def6f4c251e14f6599ad2 Reviewed-on: https://gerrit.libreoffice.org/36451 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-25loplugin: unnecessary destructor scaddins..sdextNoel Grandin
Change-Id: I6ae02ad25863ec7e0f780020dbc69c9a99488c24 Reviewed-on: https://gerrit.libreoffice.org/33511 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-17new loplugin: useuniqueptr: sdextNoel Grandin
Change-Id: Iae1dfc7f566d2f5bd1652f170218b502b5663126 Reviewed-on: https://gerrit.libreoffice.org/33205 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-11loplugin:stringconstant: handle OStringBuffer::appendStephan Bergmann
Change-Id: I283da52c0ee2b63c19e31e9a61ab24997c037a6a
2016-09-22loplugin:unusedmethods in sc..vclNoel Grandin
Change-Id: I70fcf95dfd3db05b4fd6e5cee37866f673d3afa8 Reviewed-on: https://gerrit.libreoffice.org/29183 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-08-18cppcheck: nullPointerRedundantCheckCaolán McNamara
Change-Id: I9d6c38ad3104369c7661bc8a8561807598aecfcb
2016-03-08tdf#91794 remove OSL_DEBUG_LEVEL > 1 conditionalsRohan Kumar
I replaced OSL_DEBUG_LEVEL > 1 to OSL_DEBUG_LEVEL > 0 in most of the files as suggested in easy hack Change-Id: I2c46dfd9de2ae965680494146120ea3c7530cc98 Reviewed-on: https://gerrit.libreoffice.org/23012 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
2016-02-23new loplugin: commaoperatorNoel Grandin
Change-Id: I03f24e61f696b7619855e3c7010aa0d874e5a4ff
2016-02-09Remove excess newlinesChris Sherlock
A ridiculously fast way of doing this is: for i in $(pcregrep -l -M -r --include='.*[hc]xx$' \ --exclude-dir=workdir --exclude-dir=instdir '^ {3,}' .) do perl -0777 -i -pe 's/^ {3,}/ /gm' $i done Change-Id: Iebb93eccbee9e4fc5c4380474ba595858a27ac2c Reviewed-on: https://gerrit.libreoffice.org/22224 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2016-01-14loplugin:unusedmethods unused return value in sdextNoel Grandin
Change-Id: Ie919a094630da57371b13081ab2f04984dd96c78
2015-11-10loplugin:nullptr (automatic rewrite)Stephan Bergmann
Change-Id: I8aec30601862feaeb99e3ce01adf61665688fa9a
2015-09-27cppcheck: noExplicitConstructorCaolán McNamara
Change-Id: Ibb94d40706fced3c1c053fd58ef4e2af2d849587
2015-06-15remove unnecessary check for null when calling deleteNoel Grandin
Idea originally from caolan. Found using the following command: find . -name *.cxx | xargs /opt/local/bin/grep -zlP '(?m)if\s*\(\s*\w+\s*\)\s*delete\s+\w+\;' Change-Id: I3338f4e22193a6dfd6219c8c75835224a3392763
2015-06-08loplugin:cstylecast: deal with remaining pointer castsStephan Bergmann
Change-Id: I8bd47784ae34ecd57f43b1e680ab863a6272c32f