summaryrefslogtreecommitdiff
path: root/filter
AgeCommit message (Collapse)Author
2018-10-23clang-tidy performance-unnecessary-copy-init in editeng..i18npoolNoel Grandin
Change-Id: I2ee2c8d15d8700cfaa1697363da4557c741a5f36 Reviewed-on: https://gerrit.libreoffice.org/62216 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-23tdf#120795: fix ooo2wordml_list.xsl syntaxJulien Nabet
See errors in comments from tracker Regression from: https://cgit.freedesktop.org/libreoffice/core/commit/?id=1501df419ea4d40358d705a281fd9662088ba51e Change-Id: I9bbf970ac2b8cbf8fcc448f0847f61e8606797c7 Reviewed-on: https://gerrit.libreoffice.org/62205 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-10-22pvs-studio: V581 identical conditional expressions situated alongsideCaolán McNamara
Change-Id: I063bd0dbfe1d7b00e56cd4e01affa5465ae04d9a Reviewed-on: https://gerrit.libreoffice.org/62192 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-10-22pvs-studio: V794 The assignment operator should be protectedCaolán McNamara
Change-Id: Ia443a0e61a091d877c8da26bf7d45bf4261f8669 Reviewed-on: https://gerrit.libreoffice.org/62166 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-10-21tdf#120703 (PVS): redundant nullptr checkMike Kaganski
V668 There is no sense in testing the 'pCGM' pointer against null, as the memory was allocated using the 'new' operator. The exception will be generated in the case of memory allocation error. Change-Id: Ib07d1ceaf01f657e67572c0f5bcd6aae497d2d07 Reviewed-on: https://gerrit.libreoffice.org/62132 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-10-21tdf#120703 (PVS): redundant nullptr checkMike Kaganski
V668 There is no sense in testing the 'aNewSdrGrafObj' pointer against null, as the memory was allocated using the 'new' operator. The exception will be generated in the case of memory allocation error. Change-Id: I78159c7bd19bacea7120abc8015b866e6179c719 Reviewed-on: https://gerrit.libreoffice.org/62128 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-10-21tdf#120703 (PVS)Mike Kaganski
V668 There is no sense in testing the 'pBuf' pointer against null, as the memory was allocated using the 'new' operator. The exception will be generated in the case of memory allocation error. V547 Expression 'ePageKind == PPT_NOTEPAGE' is always true. V581 The conditional expressions of the 'if' statements situated alongside each other are identical. Check lines: 3724, 3727. V1023 A pointer without owner is added to the 'aCharPropList' container by the 'emplace_back' method. A memory leak will occur in case of an exception. Change-Id: I5edae28a6ca1023a512fd5f86208951d439db941 Reviewed-on: https://gerrit.libreoffice.org/62131 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-10-21tdf#120703 (PVS): redundant nullptr checks; use range-based forMike Kaganski
V668 There is no sense in testing the 'pRet' pointer against null, as the memory was allocated using the 'new' operator. The exception will be generated in the case of memory allocation error. V1029 Numeric Truncation Error. Result of the 'size' function is written to the 16-bit variable. V595 The 'pStData' pointer was utilized before it was verified against nullptr. Check lines: 6380, 6384. V1004 The 'pStData' pointer was used unsafely after it was verified against nullptr. Check lines: 6384, 6389. V668 There is no sense in testing the 'pData' pointer against null, as the memory was allocated using the 'new' operator. The exception will be generated in the case of memory allocation error. Change-Id: I9110c25dee3751ddd9a875ea52969ec097730780 Reviewed-on: https://gerrit.libreoffice.org/62129 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-10-19clang-tidy readability-misleading-indentationNoel Grandin
Change-Id: I4673fc7c694924b41d048a1918ddb8b0e0af1f79 Reviewed-on: https://gerrit.libreoffice.org/61935 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-18clang-tidy readability-simplify-boolean-exprNoel Grandin
Change-Id: I78fa01a6c803dec782488490b730af3a11814d64 Reviewed-on: https://gerrit.libreoffice.org/61902 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-17loplugin:staticvar in editeng..frameworkNoel Grandin
Change-Id: I8e555a98f74f61e6e40122564b7ad19ca07a8a91 Reviewed-on: https://gerrit.libreoffice.org/61866 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-17clang-tidy readability-redundant-smartptr-getNoel Grandin
redundant get() call on smart pointer Change-Id: Icb5a03bbc15e79a30d3d135a507d22914d15c2bd Reviewed-on: https://gerrit.libreoffice.org/61837 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-17loplugin:singlevalfieldsNoel Grandin
tighten up the handling of binary operators Change-Id: I262ec57bf7142fa094d240738150a94d83fd15ee Reviewed-on: https://gerrit.libreoffice.org/61777 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-15add SvStream::TellEndNoel Grandin
and simplify callsites to use it instead of the current "seek to end, find pos, seek back to original pos" pattern Change-Id: Ib5828868f73c341891efc759af8bd4695ae2f33c Reviewed-on: https://gerrit.libreoffice.org/61738 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-09Extend loplugin:redundantinline to catch inline functions w/o external linkageStephan Bergmann
...where "inline" (in its meaning of "this function can be defined in multiple translation units") thus doesn't make much sense. (As discussed in compilerplugins/clang/redundantinline.cxx, exempt such "static inline" functions in include files for now.) All the rewriting has been done automatically by the plugin, except for one instance in sw/source/ui/frmdlg/column.cxx that used to involve an #if), plus some subsequent solenv/clang-format/reformat-formatted-files. Change-Id: Ib8b996b651aeafc03bbdc8890faa05ed50517224 Reviewed-on: https://gerrit.libreoffice.org/61573 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-10-08tdf#42949 Fix IWYU warnings in include/comphelper/[m-z]*Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I04c5ba277d5b3398c07de6ae66713d977636088d Reviewed-on: https://gerrit.libreoffice.org/61347 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-10-06weld ImpSWFDialogCaolán McNamara
Change-Id: I0650ab2b95eddde0337b1d65e957a58083d993bf Reviewed-on: https://gerrit.libreoffice.org/61477 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-10-06make OGenericUnoDialog take an awt::XWindowCaolán McNamara
Change-Id: I7c63397d0579306f4ade1947ce5bf9e1866bf876 Reviewed-on: https://gerrit.libreoffice.org/61469 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-10-02consistent 3.18 version require in .uisCaolán McNamara
Change-Id: I5102c218c969cf9302405e4146f92e187c1998ce Reviewed-on: https://gerrit.libreoffice.org/61215 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-10-02make all notebooks scrollable and enable_popupCaolán McNamara
Change-Id: I16a6d556ca4c6b3f876dc0c8380d01fe3022209e Reviewed-on: https://gerrit.libreoffice.org/61195 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-10-01loplugin:useuniqueptr in PCXReader::ImplReadBodyNoel Grandin
Change-Id: I8aa249fbd5fd05fb9b5ca0dd1cddf3e0111cf201 Reviewed-on: https://gerrit.libreoffice.org/61110 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-09-24tdf#42949 Fix IWYU warnings in include/comphelper/[a-l]*Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I22ba2c8aec235e34cd7835b8a0a716bf3057db7a Reviewed-on: https://gerrit.libreoffice.org/60837 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-09-19Avoid unused functions in the !HAVE_FEATURE_SCRIPTING caseTor Lillqvist
Change-Id: I4b3cb1d696adb7f9a6f35b8529e49d55bd5d957b
2018-09-17rename to weld::ComboBox are they are not text only nowCaolán McNamara
Change-Id: Ice26d1fd2ad97a6959c6916fef428777efea9c2d Reviewed-on: https://gerrit.libreoffice.org/60500 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-09-17New loplugin:externalStephan Bergmann
...warning about (for now only) functions and variables with external linkage that likely don't need it. The problems with moving entities into unnamed namespacs and breaking ADL (as alluded to in comments in compilerplugins/clang/external.cxx) are illustrated by the fact that while struct S1 { int f() { return 0; } }; int f(S1 s) { return s.f(); } namespace N { struct S2: S1 { int f() { return 1; } }; int f(S2 s) { return s.f(); } } int main() { return f(N::S2()); } returns 1, both moving just the struct S2 into an nunnamed namespace, struct S1 { int f() { return 0; } }; int f(S1 s) { return s.f(); } namespace N { namespace { struct S2: S1 { int f() { return 1; } }; } int f(S2 s) { return s.f(); } } int main() { return f(N::S2()); } as well as moving just the function f overload into an unnamed namespace, struct S1 { int f() { return 0; } }; int f(S1 s) { return s.f(); } namespace N { struct S2: S1 { int f() { return 1; } }; namespace { int f(S2 s) { return s.f(); } } } int main() { return f(N::S2()); } would each change the program to return 0 instead. Change-Id: I4d09f7ac5e8f9bcd6e6bde4712608444b642265c Reviewed-on: https://gerrit.libreoffice.org/60539 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-09-10tdf#42949 Fix IWYU warnings in include/cppuhelper/*Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: Ib420e9216b8313f5ed7634ec375e39ceb741fd45 Reviewed-on: https://gerrit.libreoffice.org/59297 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-09-09Fix typoAndrea Gelmini
Change-Id: Ifcf29e6f79346b80ea5c8ca1e8a2653ff0b58dc2 Reviewed-on: https://gerrit.libreoffice.org/60201 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-09-08Revert "tdf#110987: type detection, binary Office formats > templates"Aron Budea
This reverts commit c1817a5b12da642e365a3ef72b556d33c6e29a76. Change-Id: Ia1442dedd07436e5954943c6ff09ed8d9d2b9fc6 Reviewed-on: https://gerrit.libreoffice.org/60197 Tested-by: Jenkins Reviewed-by: Aron Budea <aron.budea@collabora.com>
2018-09-08loplugin:simplifyconstruct in filter..frameworkNoel Grandin
Change-Id: Ida4307a92dfb1dbd14da5a30b6ee1f0fd6a9455e Reviewed-on: https://gerrit.libreoffice.org/60194 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-09-08loplugin:useuniqueptr in CGMElementsNoel Grandin
Change-Id: Icff5c5c3790f06af19d463a66a2dcef0a7917f44 Reviewed-on: https://gerrit.libreoffice.org/60190 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-09-08Fix typosAndrea Gelmini
Change-Id: I75692373028a64ba71899a4fd8c240fa4f2f1c02 Reviewed-on: https://gerrit.libreoffice.org/60172 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins
2018-09-08clang bugprone-unused-return-valueNoel Grandin
most of these changes just make the change of ownership when using std::unique_ptr clearer, but there is one definite leak fix in PlainTextFilterDetect::detect Change-Id: I8282a68007222a4fee84004f394bde0cca8569e9 Reviewed-on: https://gerrit.libreoffice.org/60159 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-09-07tdf#108691, tdf#119639 Don't print hidden objects in XLS(X)Aron Budea
In Excel hidden drawing objects aren't printed. When not hidden, printing is controlled by a separate 'Print object' setting. Only rely visibility setting for now, but properly: visible means also printed, hidden means not printed. Ie. import visible property also as printable, and only output visible property in XLS(X) formats. For the future, in XLSX format printability is controlled by attribute 'fPrintsWithSheet' of element 'clientData', don't know about XLS, there fUsefPrint/fPrint bits don't appear to be used anymore (see note in tdf#119639). Change-Id: I728107b30056f7bf073f2fefddece1bef1eb2e7a Reviewed-on: https://gerrit.libreoffice.org/59915 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-08-30Translate German commentsJohnny_M
Change-Id: I8e3b98e1ddc3f4f9826aa14383908d6b77f4827a Reviewed-on: https://gerrit.libreoffice.org/59592 Tested-by: Jenkins Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
2018-08-29Fix typoAndrea Gelmini
Change-Id: Ice092364268cdae09ad5ac31a922bbde049cfd8f Reviewed-on: https://gerrit.libreoffice.org/59105 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-08-29loplugin:constantparam (2)Noel Grandin
Change-Id: I528f22876497f87159e3b9453362ebbfb55b7092
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-29new loplugin:oustringbufferNoel Grandin
look for places where we are appending the temporary result of adding strings together, to an OUStringBuffer, where we could rather call append repeatedly and avoid the temporary creation Change-Id: I481435124291ac7fb54b91a78344a9fe5b379a82 Reviewed-on: https://gerrit.libreoffice.org/59708 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-24Fix typosAndrea Gelmini
Change-Id: Ie6e3f3edabcd1ef9b44aefeb81ea84ca28654606 Reviewed-on: https://gerrit.libreoffice.org/59578 Tested-by: Jenkins Reviewed-by: Jens Carl <j.carl43@gmx.de>
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-08-21loplugin:useuniqueptr in PPTNumberFormatCreatorNoel Grandin
Change-Id: I6c2e155834d3c75807bee12b1ab03d575b6a8413 Reviewed-on: https://gerrit.libreoffice.org/59355 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-20loplugin:useuniqueptr in svt::DialogNoel Grandin
Change-Id: Ib13cd74f186de0db1be4414e893b2d4f66048b44 Reviewed-on: https://gerrit.libreoffice.org/59304 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-17Consolidate: basegfx::clamp -> o3tl::clampStephan Bergmann
Change-Id: Iffd8b0a19d4479b6c70dc834c6f64499e87e01b1 Reviewed-on: https://gerrit.libreoffice.org/59265 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-08-16Fix typo: s/an other/another/gAndrea Gelmini
Change-Id: I203c546cfca841e7853282267190e20b60919add Reviewed-on: https://gerrit.libreoffice.org/59098 Tested-by: Jenkins Reviewed-by: Jens Carl <j.carl43@gmx.de>
2018-08-16PDF export: allow API users to opt in for version 1.6Miklos Vajna
Don't make it the default yet, though. Change-Id: Ida56eb25a84bf5425d4879c062c084bb68984d9a Reviewed-on: https://gerrit.libreoffice.org/59180 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins
2018-08-16loplugin:useuniqueptr in swf::WriterNoel Grandin
Change-Id: Id10d9b120cf81b1576da48840f84353537466d17 Reviewed-on: https://gerrit.libreoffice.org/59027 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-15loplugin:useuniqueptr in CGMChartNoel Grandin
Change-Id: I55e11d158c50a76b0fad1da0e1adc3712990aa8f Reviewed-on: https://gerrit.libreoffice.org/59028 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-06coverity#1438216 Resource leakCaolán McNamara
Change-Id: I2b105221cd90ac224bb140a005ed40c30ad92837 Reviewed-on: https://gerrit.libreoffice.org/58627 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-08-05Fix typosAndrea Gelmini
Change-Id: I2ea9b44f180a44efb0bfd37d4273009cf3f44480 Reviewed-on: https://gerrit.libreoffice.org/58591 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins