summaryrefslogtreecommitdiff
path: root/filter
AgeCommit message (Collapse)AuthorFilesLines
2018-09-19Avoid unused functions in the !HAVE_FEATURE_SCRIPTING caseTor Lillqvist1-0/+8
Change-Id: I4b3cb1d696adb7f9a6f35b8529e49d55bd5d957b
2018-09-17rename to weld::ComboBox are they are not text only nowCaolán McNamara5-11/+11
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 Bergmann18-54/+58
...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 Kelemen3-0/+3
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 Gelmini1-1/+1
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 Budea1-8/+8
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 Grandin17-43/+3
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 Grandin3-33/+16
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 Gelmini1-1/+1
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 Grandin1-2/+1
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 Budea2-7/+20
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_M1-2/+2
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 Gelmini1-1/+1
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 Grandin1-1/+1
Change-Id: I528f22876497f87159e3b9453362ebbfb55b7092
2018-08-29replace rtl_allocateMemory with std::mallocNoel Grandin1-24/+24
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 Grandin1-12/+12
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 Gelmini1-1/+1
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 Bergmann1-0/+10
...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 Grandin1-3/+3
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 Grandin1-2/+2
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 Bergmann1-4/+7
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 Gelmini1-1/+1
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 Vajna1-0/+3
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 Grandin3-7/+5
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 Grandin3-28/+9
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 McNamara1-3/+3
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 Gelmini2-2/+2
Change-Id: I2ea9b44f180a44efb0bfd37d4273009cf3f44480 Reviewed-on: https://gerrit.libreoffice.org/58591 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins
2018-08-04Use more basegfx deg<->rad functions, instead of direct formulasMike Kaganski2-5/+6
Also make the functions constexpr. Due to slight changes in floating-point arithmetics (90.0 instead of 180.0, M_PI2 instead of M_PI resp.), results might differ in last digits (usually 17th decimal digit). This has lead to need to tweak char2dump's PieChartTest unit test. Change-Id: I20323dd7dab27e4deb408ea4181e390cc05e7cd3 Reviewed-on: https://gerrit.libreoffice.org/58583 Tested-by: Jenkins Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-08-03Move angle normalization code from various places to toolsMike Kaganski4-15/+9
Also rename svx angle normalization functions in include/svx/svdtrans.hxx, that deal with 100ths of degree, to avoid confusion: NormAngle180 -> NormAngle18000; NormAngle360 -> NormAngle36000. Some places were fixed that previously returned inclusive ranges (i.e., both 0 and 360), see changes in these files: chart2/source/view/main/PlottingPositionHelper.cxx chart2/source/view/main/PolarLabelPositionHelper.cxx chart2/source/view/main/ShapeFactory.cxx filter/source/graphicfilter/idxf/dxf2mtf.cxx sw/source/core/graphic/grfatr.cxx (the latter now matches the comment in the function). Change-Id: I9f274bbb4168360d60dceff02aeba6332c519a59 Reviewed-on: https://gerrit.libreoffice.org/58556 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-08-03forcepoint#70 give all escher client data objects a common parent classCaolán McNamara2-43/+50
and make NotifyFreeObj a virtual method of SvxMSDffClientData, finding the sc case where the client data was neither SvxMSDffImportData nor ProcessData. make the sc case a XclImpDrawObjClientData whose NotifyFreeObj is a noop Change-Id: I07422e7a3415114674bb1e3c1ef120299adf2dc8 Reviewed-on: https://gerrit.libreoffice.org/58551 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-08-02loplugin:returnconstant in filterNoel Grandin10-27/+19
Change-Id: I0ebbd835ddc50e984920950e1559faf163c2c30f Reviewed-on: https://gerrit.libreoffice.org/58429 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-01fix up non standard indent and stray ;Caolán McNamara1-30/+30
Change-Id: Ica713270278046ec8f64531eb67be17787fbedf7 Reviewed-on: https://gerrit.libreoffice.org/58413 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-08-01forcepoint#63 null derefCaolán McNamara1-1/+1
Change-Id: Ib22ff870cd0d8cdd2350b2aa8698f5a2e3866bdc Reviewed-on: https://gerrit.libreoffice.org/58410 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-07-30Add missing sal/log.hxx headersGabor Kelemen25-0/+25
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 from filter to jvmfwk Change-Id: I2a73d63f2aaef5f26d7d08957daaa8a30b412ac5 Reviewed-on: https://gerrit.libreoffice.org/58204 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-07-28loplugin:stringloop in filterNoel Grandin5-56/+46
Change-Id: Icb2df9854975544ae3e164b5d25a6628824027e5 Reviewed-on: https://gerrit.libreoffice.org/58212 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-27use boost::optional for OUString instead of std::unique_ptrNoel Grandin1-2/+2
Change-Id: I4539380956dad232f3ce92498b8f58a205fe00b1 Reviewed-on: https://gerrit.libreoffice.org/58196 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-26filter: avoid -Werror=deprecated-copy (GCC trunk towards GCC 9)Stephan Bergmann5-35/+10
...by explicitly defaulting the copy/move functions (and, where needed in turn, also a default ctor) for classes that have a user-declared dtor that does nothing other than an implicitly-defined one would do, but needs to be user- declared because it is virtual and potentially serves as a key function to emit the vtable, or is non-public, etc.; and by removing explicitly user- provided functions that do the same as their implicitly-defined counterparts, but may prevent implicitly declared copy functions from being defined as non- deleted in the future. (Even if such a user-provided function was declared non-inline in an include file, the apparently-used implicitly-defined copy functions are already include, so why bother with non-inline functions.) Change-Id: I20a2c713f0fea62659d44298c1d98dc9b7f2d5aa Reviewed-on: https://gerrit.libreoffice.org/58076 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-07-25ofz#8539 share LineInfo to save memoryCaolán McNamara2-11/+24
Change-Id: I6a97d82e55fb91f2c45add4d066522f36fabff6c Reviewed-on: https://gerrit.libreoffice.org/57983 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-07-24Fix typosAndrea Gelmini2-2/+2
Change-Id: I07cf04cd2acc5b50d64224edb9f2c2de2c61e356 Reviewed-on: https://gerrit.libreoffice.org/57884 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins
2018-07-22Fix typosAndrea Gelmini1-1/+1
Change-Id: Ia78310bd85c9a582245074bd46154516a1f21c86 Reviewed-on: https://gerrit.libreoffice.org/57826 Tested-by: Jenkins Reviewed-by: Jens Carl <j.carl43@gmx.de>
2018-07-22Fix typosAndrea Gelmini1-1/+1
Change-Id: I326827c394347cbe9fad242e9da5702cba7a4d95 Reviewed-on: https://gerrit.libreoffice.org/57761 Tested-by: Jenkins Reviewed-by: Jens Carl <j.carl43@gmx.de>
2018-07-21Fix typosAndrea Gelmini4-6/+6
Change-Id: I8dd681eebf5534224d1b5e886d6a0600767f9c98 Reviewed-on: https://gerrit.libreoffice.org/57600 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-07-18Related: rhbz#1602589 dead_error_line: Execution cannot reach this statementCaolán McNamara1-5/+1
Change-Id: If0e4ea982ede92d564aafb247c789cc6cc3013ca Reviewed-on: https://gerrit.libreoffice.org/57638 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-07-18Related: rhbz#1602589 copy_paste_error: 'getKeyTimes'Caolán McNamara1-1/+1
Change-Id: I2b48d8c75af42429ce41a8f809fc3ac82cb354de Reviewed-on: https://gerrit.libreoffice.org/57636 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-07-13tdf#110987: type detection, binary Office formats > templatesAron Budea1-8/+8
The templates for binary MS Office formats were higher prioritized than non-templates, this caused files in binary format and lacking file extension to be identified as templates. Change-Id: I5638b38dfa0a7520dd09cb497c05b6af0eb00834 Reviewed-on: https://gerrit.libreoffice.org/40651 Tested-by: Jenkins Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2018-07-11tdf#118232 Allow load and insert of SVGs with no GeometryArmin Le Grand2-14/+63
Change-Id: Iaf3d6a0423c5f11dda1e623dd730af01dbd6551c Reviewed-on: https://gerrit.libreoffice.org/57284 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@cib.de>
2018-07-10Make EscherPropertyContainer::CreatePolygonProperties saferArmin Le Grand2-201/+252
Additionally adapted EscherPropertyContainer's AddOpt methods to be more safe and flexible. Added support for SvMemoryStream. Changed Data handling in EscherPropSortStruct to use std::vector<sal_uInt8>, adapted all usages and converions throgh all modules. This makes memorty handling for these parts much safer (no more local new-ops, no longer delete[] there). Currently there are quite some usages of nProp.size() and &nProp[0] to access the data. but the base for further changes to work more on std::vector is done. Change-Id: I982225c5bfc06fdd9e195d18cd3c550d15f1d48d Reviewed-on: https://gerrit.libreoffice.org/57061 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@cib.de>
2018-07-10tdf#42949 Fix IWYU warnings in include/osl/*hxxGabor Kelemen1-0/+1
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I7b19938246ca8498fa300f781589bf17b3d486aa Reviewed-on: https://gerrit.libreoffice.org/56723 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-07-10pass SvStream around by std::unique_ptrNoel Grandin2-3/+3
and give utl::OStreamWrapper a new constructor so that it knows it is taking ownership of the SvStream, which appears to fix several leaks Change-Id: Idcbcca9b81a4f0345fd8b8c8a2f4e84213686a6b Reviewed-on: https://gerrit.libreoffice.org/57187 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-09tdf#112690: make page size of exported PDF closer to what is setAron Budea1-1/+2
regression from 3a2ccb419c5face6fbf56b1a4877e675d4cd5fe8 Change-Id: Ia0fddeb112fa0867ec367c085e3682eac078d5f8 Reviewed-on: https://gerrit.libreoffice.org/57166 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>