summaryrefslogtreecommitdiff
path: root/filter
AgeCommit message (Collapse)Author
2021-11-19Drop F_PI1800/F_PI18000, and unify deg2rad/rad2deg conversionsMike Kaganski
Change-Id: Ib89b00c3dc8cd440e8a88906eea133becd1cef64 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125509 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins
2021-11-16Use basegfx::deg2rad instead of *0.01745329251994Hossein
* Replaced multiplying by magic number 0.01745329251994 with basegfx::deg2rad() which is equal to M_PI/180.0 * Instances of this could be found using: git grep 0.01745329251994 *.cxx *.hxx Change-Id: Ib813251f6223e4218fe977c0211732c22199295d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125294 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-11-16Related tdf#139031: add missing colonsIlmari Lauhakangas
Reporter mentioned a bunch of missing colons across the UI. Change-Id: I278d0ad7073fb399c979f0fc52adc306f51ae49d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125147 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2021-11-15use OUStringLiteral in SVGFilterNoel Grandin
Change-Id: Ib01737e8d679ae69612e6612cc39337681953fee Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125250 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-15tdf#139031 Better align dropdowns in PDF export dialogMichael Weghorn
* set "hexpand" to True for the "PDF/A version" and the "Submit format" comboboxes (and relevant containers) and add a 6px margin for the parent container ("frame4"), so the comboboxes expand to the right and still have a proper margin at the right * Set "halign" to "start" for the "PDF/A version" label, as is the case for the "Submit format" one Change-Id: I2651da2770134aae8d6a494e9de3ec8184664b3f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125104 Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org> Tested-by: Jenkins
2021-11-15Use basegfx::rad2deg() instead of *57.29577951308Hossein
* Replaced multiplying by magic number 57.29577951308 with basegfx::rad2deg() which is equal to 180.0/M_PI * Instances of this could be found using: git grep 57.29577951308 *.cxx *.hxx Change-Id: I0ae99a5d63d104b79c6df2dc88e9dda6973a1d3b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124226 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins
2021-11-13Use o3tl::convertMike Kaganski
Change-Id: I78db3001d602ec1a0847785b3c127b9d345f5af7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125173 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-11-12coverity: annotate with markup so they will stay silencedCaolán McNamara
Change-Id: I8ac0ae4cd64d8171eebd98d89d1fe954280987b9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125072 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-11-08use more OUStringLiteral in MediaDescriptorNoel Grandin
Change-Id: I0567d103db8db401c737fed98483912a39352929 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124835 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-07use a std::vectorCaolán McNamara
Change-Id: I186f34025863882951aaa70f94ea21b8ac556dab Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124821 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-11-07ofz: Use-of-uninitialized-valueCaolán McNamara
Change-Id: Ic96e20570f0aae9a7fab66fd39d0fadc0b72d3f0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124820 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-11-07these are the only calls to memset that explicitly ignore its returnCaolán McNamara
it seems hardly necessary to be weird here memcpy likewise Change-Id: I57df9ffd92b4e1d1ebff281498832250f4e1caf0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124819 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-11-04elide unnecessary UNO_QUERY_THROW callsNoel Grandin
Change-Id: I0d0fc57f352e9717e721416c8941cfcf48af24c7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124650 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-10-31add o3tl::span ctor from std::vectorLuboš Luňák
Makes code simpler, and std::span can be constructed from std::vector too. Change-Id: Iae26b53c52148c19d9068a63126a7393d098d654 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124507 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Luboš Luňák <l.lunak@collabora.com> Tested-by: Jenkins
2021-10-30tools::Long->sal_Int32 in the DX arraysNoel Grandin
Change-Id: I36ddc11b39763dc77086591fe9bb756195b4294f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124459 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-10-30Prepare for removal of non-const operator[] from Sequence in filterMike Kaganski
Change-Id: I3296bf6dbacfc47a7e51afe88082c4801ea28ea8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124365 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-10-30tdf#145361 fix XSLT for older libxsltNoel Grandin
regression from commit 3eb870f0843a00042ca7dd89837fbe0cc6f918c2 Author: Noel <noel.grandin@collabora.co.uk> Date: Fri Feb 26 12:45:19 2021 +0200 fix xhtml list export in other locales where I used 'replace' which is not available on older libxslt, so switch to 'translate' which works just as well here, and is available Change-Id: Idd1224e23c0d48956d94b6fc2c2a7b1afa05fa0c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124435 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-10-29pass DX array around using o3tl::span instead of pointerNoel Grandin
so we get bounds checking in debug mode Note that I cannot just pass around the std::vectors involved because there is a place in editeng which calls with a subset of a vector. Change-Id: I5088a139593c27bf9cbe5d843ab4b0048ac6d508 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124330 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-10-25Converting pointer to reference in svgwriterHossein
Previously, pElementId (old name) was either nullptr or a pointer to OUString created from sPlaceholderTag literal. In the methods that consumed it, it was checked for being nullptr. Now, this is checked with if the aElementId (new name) is empty or not. If the variable is an empty string, it implies that it should not be used. Change-Id: I560fd479f428341c834ee99b0f8a34e95862e3e0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123439 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-10-22Use size_t instead of sal_uLong in filter/source/svgJulien Nabet
Change-Id: I741307bdecbb6e5104a8fcdf892ea609671ae6fa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124032 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-10-20loplugin:indentation check for indent inside blockNoel Grandin
look for places where the statements inside a block are not indented Change-Id: I0cbfa7e0b6fb194b2aff6fa7e070fb907d70ca2f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123885 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-10-16Simplify vector initialization in filterJulien Nabet
Change-Id: I78653b32a5418e44733e3d2740a9a7dd784f17ae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123686 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-10-15Remove non-const Sequence::begin()/end() in internal codeMike Kaganski
... to avoid hidden cost of multiple COW checks, because they call getArray() internally. This obsoletes [loplugin:sequenceloop]. Also rename toNonConstRange to asNonConstRange, to reflect that the result is a view of the sequence, not an independent object. TODO: also drop non-const operator[], but introduce operator[] in SequenceRange. Change-Id: Idd5fd7a3400fe65274d2a6343025e2ef8911635d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123518 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-10-14use std::vector::insert instead of push_backNoel Grandin
because it will pre-allocate space and often is optimised to memcpy Change-Id: I03ed7915f2762d3d27e378638052a47a28bbf096 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123588 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-10-12T602 is an obsolete format, don't assume .txt files are T602Jan Holesovsky
Without this, when the user tries to open a 0-bytes .txt file, they are asked for a Save As operation after they hit the Save button. When we remove the 'txt' from the T602 detection, it rather asks if the user wants to use ODT or Plain text (and lose formatting). Change-Id: Ic48fa61064a9ed78c64d56bc8864f0e12528e072 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123216 Tested-by: Jenkins Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2021-10-11loplugin:moveparam in filterNoel Grandin
Change-Id: I4f41f834035fcefc22486723c971929890143dd4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123423 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-10-11In O[U]StringBuffer, make string_view params replacements for OUString onesStephan Bergmann
...for LIBO_INTERNAL_ONLY, instead of having them as additional overloads. That way, loplugin:bufferadd and loplugin:stringviewparam found many further opportunities for simplification (all addressed here). Some notes: * There is no longer an implicit conversion from O[U]String to O[U]StringBuffer (as that goes via user-defined conversions through string_view now), which was most noticeable in copy initializations like OStringBuffer buf = someStr; that had to be changed to direct initialization, OStringBuffer buf(someStr); But then again, it wasn't too many places that were affected and I think we can live with that. * I made the O[U]StringBuffer ctors taking string_view non-explicit, mainly to get them in line with their counterparts taking O[U]String. * I added an OUStringBuffer::lastIndexOf string_view overload that was missing (relative to OUStringBuffer::indexOf). * loplugin:stringconstant needed some addition to keep the compilerplugins/clang/test/stringconstant.cxx checks related to OStringBuffer::append and OStringBuffer::insert working. * loplugin:stringviewparam no longer needs the special O[U]StringBuffer-related code that had been introduced in 1250aecd71fabde4dba990bfceb61bbe8e06b8ea "loplugin:stringviewparam extend to new.." Change-Id: Ib1bb8c4632d99b744e742605a9fef6eae959fd72 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122904 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-10-09Simplify SvXMLExport::AddAttribute overloadsMike Kaganski
Remove overloads taking const char* which were not needed, because every their use eventually took a string literal convertible to OUString directly. Many other literals were converted to OUStringLiterals. Change-Id: Ia1e742a8087776cd20bf5094dc415dafd9a8834a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123155 Tested-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-10-08const OUString -> constexpr OUStringLiteralHossein
* Defining the constant strings as "constexpr OUStringLiteral" instead of using macros * Changing "const OUString" to "constexpr OUStringLiteral" where possible * Using "inline" in the header files to avoid duplicate copies of the global variable inside the files that included them * Read more: https://learncpp.com/cpp-tutorial/sharing-global-constants-across-multiple-files-using-inline-variables/ Change-Id: Ic0741c0044ff160734e641d072fef9be956815a3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123104 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-10-07drop 'using namespace std' in filter/qaJulien Nabet
Change-Id: I7b5a1a773c26e8ef0fe3dcd0a1cdf5ebba75d52f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123191 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-10-04ofz: MemorySanitizer: use-of-uninitialized-valueCaolán McNamara
Change-Id: If6ebf0fb1fa0e3db830ff9d22b1a90446bd3c2d8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123039 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-10-03drop 'using namespace std' in desktop, e*, f*Julien Nabet
Change-Id: I277dc957798093001f9a3935f97db8ac0314e6a7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123022 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-10-02ofz: MemorySanitizer: use-of-uninitialized-valueCaolán McNamara
Change-Id: I774d7da0304735907da31ca0d7b3bde85718066b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122954 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-09-30loplugin:constparams improve handling of pointer paramsNoel Grandin
Change-Id: I4c0002e72703eded435bfe4985f5b0121bf8524b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122843 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-09-28vcl: rename OutDevState to StackChris Sherlock
I have moved the header file to include/vcl/rendercontext as this will eventually be part of the RenderContext split from OutputDevice. State and associated enums have also been moved to the vcl namespace. I have also moved ComplexTextLayoutFlags into the vcl::text namespace. Change-Id: I0abbf560e75b45a272854b267e948c240cd69091 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121524 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-09-24ofz: MemorySanitizer: use-of-uninitialized-valueCaolán McNamara
Change-Id: I0be145f25cfa90d52873e9baf30cbac9de9cba31 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122558 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-09-22ofz: MemorySanitizer: use-of-uninitialized-valueCaolán McNamara
Change-Id: Iaa7f59fbc412f3d5e4d6e4793d7a4459f6a03c8b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122424 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-09-19ofz: check radius argCaolán McNamara
Change-Id: Ife72cf379e60c96046205746c62a35ead7f09b16 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122326 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-09-19ofz#38969 fail earlierCaolán McNamara
Change-Id: Iae8cfe3ad8f4741be3850e5cd62787459f54c421 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122320 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-09-19ofz: MemorySanitizer: use-of-uninitialized-valueCaolán McNamara
Change-Id: Ic5c4e91e3712a25165e7327dbb8d377212125067 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122316 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-09-17Some test-code simplifications, using starts/endsWith rest parameterStephan Bergmann
Change-Id: I3376ddc30e8ddc0e2dfc052ab47fe086108e015a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122221 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-09-16ofz: MemorySanitizer: use-of-uninitialized-valueCaolán McNamara
Change-Id: I8867ab619acf0dcb7ba056f2b8754bd1778f1ccb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122175 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-09-15Use <comphelper/servicehelper.hxx> implementing XUnoTunnel part 5Mike Kaganski
- Revise uses of getSomething to use getFromUnoTunnel Where that is impossible, use getSomething_cast to unify casting, and minimize number of places doing low-level transformations. The change keeps the existing tunnel references that last for the duration of the pointers' life, because sometimes destroying such reference may destroy the pointed object, and result in use after free. Change-Id: I291c33223582c34cd2c763aa8aacf0ae899ca4c0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122101 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-09-15Use <comphelper/servicehelper.hxx> implementing XUnoTunnel part 3 [API CHANGE]Mike Kaganski
- Replace all uses of OImplementationId in core with UnoIdInit - Deprecate OImplementationId in <cppuhelper/typeprovider.hxx> OImplementationId uses broken double checked locking; additionally, it uses it at the first call to getImplementationId, not when the object is constructed. This implementation can't be changed, cince it's part of published API; it can't rely on C++11, which would be required for use of thread-safe statics and move the initialization to ctor. The class has obsolete _bUseEthernetAddress member, that is unused and ignored since 4e9fa7e339a1cd6cb2fec643715991bcf5057cec. No need to implement it when replacing its uses to UnoIdInit. The deprecation is the API CHANGE. No published API is introduced to replace it; 3rd-party code should seek alternative solutions, or just keep using the deprecated functionality. TODO (in separate commits): - Change implementations of getSomething to use getSomethingImpl - Revise uses of getSomething to use getFromUnoTunnel Change-Id: I8b6e684e5389bc0d5bb3b7f21f72a4c8f684107d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122077 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-09-15Use <comphelper/servicehelper.hxx> implementing XUnoTunnel part 1Mike Kaganski
The header got some changes: 1. Move UnoTunnelIdInit and isUnoTunnelId into 'comphelper' namespace 2. Rename UnoTunnelIdInit to UnoIdInit, as a precondition to replace of uses of OImplementationId with it, including in XTypeProvider 3. Introduce convenience functions 'getSomething_cast' to cast between sal_Int64 and object pointers uniformly. 4. Rename getUnoTunnelImplementation to getFromUnoTunnel, both to make it a bit shorter, and to reflect its function better. Templatize it to take also css::uno::Any for convenience. 5. Introduce getSomethingImpl, inspired by sw::UnoTunnelImpl; allow it handle cases both with and without fallback to parent. 6. Adjust UNO3_GETIMPLEMENTATION_* macros TODO (in separate commits): - Drop sw::UnoTunnelImpl and sw::UnoTunnelGetImplementation - Replace all uses of OImplementationId in core with UnoIdInit - Deprecate OImplementationId in <cppuhelper/typeprovider.hxx> - Change implementations of getSomething to use getSomethingImpl - Revise uses of getSomething to use getFromUnoTunnel Change-Id: If4a3cb024130f1f552f988f0479589da1cd066e7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122022 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-09-14ofz: MemorySanitizer: use-of-uninitialized-valueCaolán McNamara
Change-Id: I5906dc1f9f0295d406c01871e5fed1da0025682f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122081 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-09-12clang:optin.performance.PaddingNoel Grandin
Excessive padding in 'struct chart::TickInfo' (11 padding bytes, where 3 is optimal). Excessive padding in 'class EscherBlibEntry' (10 padding bytes, where 2 is optimal). Excessive padding in 'struct oox::drawingml::ConditionAttr' (8 padding bytes, where 0 is optimal). Excessive padding in 'struct oox::drawingml::Constraint' (12 padding bytes, where 4 is optimal). Excessive padding in 'struct (anonymous namespace)::Number' (10 padding bytes, where 2 is optimal). Change-Id: If7573afa8a794497c9a2bf1c7c15e8f11ff11407 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121993 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-09-08simplify static_cast after dynamic_castNoel Grandin
Change-Id: I53ae7f18519fdd878730d1d0316ebc408271c66d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121811 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-09-08Drop unused rUsedDetectors argumentMike Kaganski
... ever since commit e4003b67062e575f9b77772488f9b9691fa9fc38 Author: Kohei Yoshida Date: Thu Mar 7 01:35:09 2013 -0500 Make check passes. Remove deep-only detection for real. Now the type detection process is a lot more simpler. Change-Id: Ib0c08e28edf85a3642e187798a08ed2e143bf56c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121765 Tested-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-09-06ofz: MemorySanitizer: use-of-uninitialized-valueCaolán McNamara
Change-Id: I6db44a3a56f3eca02970bdce393355715564299e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121701 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>