summaryrefslogtreecommitdiff
path: root/sdext
AgeCommit message (Collapse)AuthorFilesLines
2019-07-31Improved loplugin:stringconstant (now that GCC 7 supports it): sdextStephan Bergmann8-13/+13
Change-Id: I3124c3e91c2bbf918113544d5d01b55a3f6b6005 Reviewed-on: https://gerrit.libreoffice.org/76649 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-07-29Simplify Sequence iterations in sdextArkadiy Illarionov11-128/+87
Use range-based loops and STL algorithms Change-Id: I0ffc0c7481b35cf6a297f8123b567d4331ff1a3f Reviewed-on: https://gerrit.libreoffice.org/76478 Tested-by: Jenkins Reviewed-by: Arkadiy Illarionov <qarkai@gmail.com>
2019-07-28loplugin:collapseifNoel Grandin1-3/+2
Change-Id: I69bfafa97c66ef944cc6ae35c7e2f66d0430d6a4 Reviewed-on: https://gerrit.libreoffice.org/76496 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-07-24Fix typosAndrea Gelmini1-1/+1
Change-Id: Ib778a6598f3797fe871a25b56b7b4b7761889296 Reviewed-on: https://gerrit.libreoffice.org/76269 Tested-by: Jenkins Reviewed-by: Andrea Gelmini <andrea.gelmini@gelma.net>
2019-07-24cid#1448446 Unchecked dynamic_castCaolán McNamara1-4/+4
Change-Id: I790f55e5edfce37b28dfc8b915970e123425f434 Reviewed-on: https://gerrit.libreoffice.org/76244 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-07-23cid#1448446 Unchecked dynamic_castCaolán McNamara1-4/+4
Change-Id: I888ca249e0e9551c74611dcfb8ba7c7c1dc36880 Reviewed-on: https://gerrit.libreoffice.org/76133 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-07-20loplugin:referencecasting in sdextNoel Grandin21-61/+50
Change-Id: I4599375fae2516da20df0bdfc09f391e0189fc46 Reviewed-on: https://gerrit.libreoffice.org/75978 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-07-19cid#1448489 Uncaught exceptionCaolán McNamara1-1/+1
Change-Id: Id0c55bdf3a51d21f4d0e9cc407dbff1db5eb55f4 Reviewed-on: https://gerrit.libreoffice.org/75899 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-07-04remove some unneede vcl/bitmap.hxx includesNoel Grandin1-1/+0
Change-Id: Ibdc79538276992193e61f6dc16ddd3fd1ab80b82 Reviewed-on: https://gerrit.libreoffice.org/75069 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-06-21simplify some getSupportedServiceNamesNoel Grandin1-2/+1
Change-Id: I81195505d6006b6587f7b98c1545919083f0e588 Reviewed-on: https://gerrit.libreoffice.org/74497 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-06-18loplugin:passstuffbyrefNoel Grandin1-1/+1
Change-Id: Icb7c22cf4ac95eab54d04e79312fb471ca27bceb Reviewed-on: https://gerrit.libreoffice.org/74246 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-06-17loplugin:logexceptionnicely in scripting..sdextNoel Grandin3-6/+9
Change-Id: Ib08f41bb0bed494e7ed00f5bae92eae2b8e80d93 Reviewed-on: https://gerrit.libreoffice.org/74113 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-06-06Refactor a bit of the presentation minimizerJan-Marek Glogowski6-82/+51
This was originally just about getting rid of the resource leak. Turned out to include a little refactoring to hide most of the UnoDialog member variables. * use cppu::component_getFactoryHelper * free leaked createPeer resources in destructor Change-Id: I45449c49e32af4935908b801ed9bd9732af944d3 Reviewed-on: https://gerrit.libreoffice.org/73565 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2019-05-22New loplugin:dataStephan Bergmann2-4/+4
...following up on 1453c2c8f13bac64ecd1981af7cebf1c421808ac "prefer vector::data to &vector[0]" Change-Id: I7c113747d92d144a521d49b89384dd8bf1215c01 Reviewed-on: https://gerrit.libreoffice.org/72765 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-05-14Presentation minimizer: Handle also presentation.GraphicObjectShape URLTamás Zolnai1-2/+4
Change-Id: I326b2803bf2d98d440e14d7f3f75ca61c2c9e49a Reviewed-on: https://gerrit.libreoffice.org/72303 Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com> Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2019-05-13fix wrong SET/QUERY flags passed to uno::ReferenceNoel Grandin15-33/+33
By creating deleted methods for the wrong calls. Avoids the compiler needing to construct a temporary Change-Id: I3b8c648d6bb22d22827bf74f21ea5a2a17fc0f6a Reviewed-on: https://gerrit.libreoffice.org/72103 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-05-12Use hasElements to check Sequence emptiness in sax..sdextArkadiy Illarionov5-8/+8
Similar to clang-tidy readability-container-size-empty Change-Id: If6a567708d3c59355d54933fad23c85195846624 Reviewed-on: https://gerrit.libreoffice.org/71763 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-05-09regenerate PCH headers for the 4 new levelsLuboš Luňák3-32/+132
Plus some build fixes triggered by this. Change-Id: I59b21def706598ceffd45ae5b1f0262ec9c1ad50 Reviewed-on: https://gerrit.libreoffice.org/71581 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2019-04-30improve loplugin:stringconstantNoel Grandin4-4/+4
to find more places we can elide the OUString() constructor at call sites Change-Id: Ie09f3c61f2c4b4959c97dc98ebcbaf7c51d5d713 Reviewed-on: https://gerrit.libreoffice.org/71514 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-04-19loplugin:sequentialassign in sdNoel Grandin6-24/+11
Change-Id: I7d592b8929ca46c64a622551b039af0d6a7911db Reviewed-on: https://gerrit.libreoffice.org/70716 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-04-14tdf#120703 PVS: Silence V522 warningsMike Kaganski1-7/+10
V522 There might be dereferencing of a potential null pointer. Change-Id: Ie4bc74a734a6d5a73838a27e0d80cc8e51595839 Reviewed-on: https://gerrit.libreoffice.org/70730 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-04-08improve combining in hash functionsNoel Grandin1-32/+34
specifically, use boost::hash_combine to combine values in hash functions, except for a couple of places where I use the small-prime-number strategy popular in the Java world, to avoid including boost in header files that are widely shared. Change-Id: I0e184c9ec8803bf09fc6e84fe20131b203e1652a Reviewed-on: https://gerrit.libreoffice.org/70384 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-29loplugin:useuniqueptr in PDFReaderNoel Grandin3-12/+11
Change-Id: I22a96bbf9266cc8dfbe223b985d0ba005a6367e9 Reviewed-on: https://gerrit.libreoffice.org/69881 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-09loplugin:unusedmethodsNoel Grandin2-7/+0
Change-Id: I242f56f2bc5dc8fce6db1ba8f1f8269da4fec0fa Reviewed-on: https://gerrit.libreoffice.org/68938 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-07build: support disabling popplerAshod Nakashian2-1/+19
This adds --enable-poppler configure option. Poppler can be enabled/disabled by setting this parameter to yes or no. Change-Id: I42ba2d27de7b5014d28523394310616d20073b71 Reviewed-on: https://gerrit.libreoffice.org/68602 Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/68842 Tested-by: Jenkins
2019-03-07log nice exception messages whereever possibleNoel Grandin3-5/+10
Change-Id: Idd125c18bee1a39b9ea8cc4f8c55cddfd37c33e1 Reviewed-on: https://gerrit.libreoffice.org/68579 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-05OptimizerDialog: use local method to reduce OUString operationsMatteo Casalin1-11/+17
Change-Id: I356693ba9992c691c9079b3eaa2f26e57b005e1c Reviewed-on: https://gerrit.libreoffice.org/67640 Tested-by: Jenkins Reviewed-by: Matteo Casalin <matteo.casalin@yahoo.com>
2019-03-05re-land "new loplugin typedefparam""Noel Grandin1-5/+5
This reverts commit c9bb48386bad7d2a40e6958883328145ae439cad, and adds a bunch more fixes. Change-Id: Ib584d302a73125528eba85fa1e722cb6fc41538a Reviewed-on: https://gerrit.libreoffice.org/68680 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-03Extend cast to whole expressionStephan Bergmann1-3/+3
...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-28remove some unused typedefsNoel Grandin1-2/+0
Change-Id: I7775a7d86e9641cd514e58f03d3727d2ad846120 Reviewed-on: https://gerrit.libreoffice.org/68485 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-27loplugin:unusedfields look for classes where we can make all the..Noel Grandin1-2/+3
fields private Change-Id: Id3c6b123f06ab5dcf87628de4c347626110d2d27 Reviewed-on: https://gerrit.libreoffice.org/68302 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-24loplugin:unusedfields in sdextNoel Grandin10-43/+5
Change-Id: Ifec87ab2b54fa18c5089bac53457e376826645cb Reviewed-on: https://gerrit.libreoffice.org/68222 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-18loplugin:simplifybool, check for !(!a op !b)Noel Grandin2-3/+3
Change-Id: Ic3ee9c05705817580633506498f848aac3ab7ba6 Reviewed-on: https://gerrit.libreoffice.org/67866 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-13Indexing is not needed for single getToken() callMatteo Casalin1-6/+4
Change-Id: I38b916d217af05359754925f2ae68351486aa399 Reviewed-on: https://gerrit.libreoffice.org/67639 Tested-by: Jenkins Reviewed-by: Matteo Casalin <matteo.casalin@yahoo.com>
2019-02-13OptimizerDialog: simplify string operations when selecting...Matteo Casalin1-16/+18
... image resolution: introduce local method to: * use indexed getToken * avoid getting all tokens in advance * reduce calls to non-trivial getString method Change-Id: Ib47c2e9bb5788132328fbda1b1dce05e495ad3ed Reviewed-on: https://gerrit.libreoffice.org/67638 Tested-by: Jenkins Reviewed-by: Matteo Casalin <matteo.casalin@yahoo.com>
2019-02-12loplugin:flatten in sdextNoel Grandin34-1513/+1511
Change-Id: I5a7c2d38ef2e4af54316becd807bffab83d402d0 Reviewed-on: https://gerrit.libreoffice.org/67715 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-11new loplugin writeonlyvarsNoel Grandin3-27/+0
largely based on the relevant portion of the unusedfields loplugin, but adapted for local vars Change-Id: Ic522a941573940e8f75c88f90ba5f37508ca49b1 Reviewed-on: https://gerrit.libreoffice.org/66835 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-09loplugin:indentation in sdNoel Grandin9-17/+17
Change-Id: I8ce307b8c467ac1e3f19faca1df15a079bc14169 Reviewed-on: https://gerrit.libreoffice.org/67563 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 Kelemen2-9/+7
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>
2019-01-15poppler: upgrade to release 0.73.0Michael Stahl1-0/+1
Change-Id: If20998f8565b5534a96b3f29ccec572273edca1d Reviewed-on: https://gerrit.libreoffice.org/66306 Tested-by: Jenkins Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
2019-01-15sdext: fix build with poppler 0.73Michael Stahl3-6/+10
... which has removed Guchar, Gushort, Guint, Gulong... Change-Id: Ia54ad378031f167f6779f6ffe574b85c1e72f26d Reviewed-on: https://gerrit.libreoffice.org/66305 Tested-by: Jenkins Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
2019-01-11Replace OUStringBuffer::appendCopy with append(std::u16string_view)Stephan Bergmann2-3/+8
...which is more general Change-Id: I94f28f8eda887120cf5f143b4549e0339b60e6a7 Reviewed-on: https://gerrit.libreoffice.org/66155 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-01-08Fix build with poppler-0.72Andreas Sturmlechner1-0/+8
Change-Id: I0664d1b39e97b7555c0a3cba442db52b84f37134 Reviewed-on: https://gerrit.libreoffice.org/65960 Tested-by: Jenkins Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
2018-12-21use unique_ptr in sdextNoel Grandin2-10/+16
Change-Id: I8362cf42dd6a838752b25a4b184da614eb81805e Reviewed-on: https://gerrit.libreoffice.org/65532 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-11presentation minimizer: warn user about unsaved presentationVasily Melenchuk4-1/+31
If minimizer is used on current presentation without making a copy and it has local modification we should suggest user to save it before, since not all minimization opearions could be reverted later. Change-Id: I12600c9a818698418f3ec957d43b13c6044609d2 Reviewed-on: https://gerrit.libreoffice.org/64261 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2018-12-10Fix build with poppler 0.71Aleksei Nikiforov3-2/+10
Change-Id: I470ece9dc4766e10e1ccb5e99b25a8d8cc4cbf38 Reviewed-on: https://gerrit.libreoffice.org/63860 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-12-08Remove misguided FALLTHROUGH commentsStephan Bergmann1-2/+0
...between adjacent switch labels without any intervening statements Change-Id: Ieb8a0d9f71ea4382b5f7d005cdf7111d06aeb5d0 Reviewed-on: https://gerrit.libreoffice.org/64789 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-12-07HAVE_BROKEN_CONST_ITERATORS is always false nowStephan Bergmann2-16/+0
...but for safety, leave the configure.ac check in for some longer. Change-Id: Ife94cdfd56696edb113e32d84f563dd805e757e5 Reviewed-on: https://gerrit.libreoffice.org/64769 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-12-06-Werror,-Wunused-variableStephan Bergmann1-1/+0
Change-Id: I8c59f7aa0cde22468c9451f7d910cf0106138fd7
2018-12-05loplugin:unnecessaryparen include more assignmentsNoel Grandin1-2/+2
Change-Id: I9fb8366634b31230b732dd38a98f800075529714 Reviewed-on: https://gerrit.libreoffice.org/64510 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>