summaryrefslogtreecommitdiff
path: root/tools
AgeCommit message (Collapse)AuthorFilesLines
2018-02-26use less RGB_COLORDATANoel Grandin1-3/+3
part of removing ColorData Change-Id: If31b5b88545529863377e9a178f45f4516bf6cbb Reviewed-on: https://gerrit.libreoffice.org/50345 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-22loplugin:changetoolsgen in tools..toolkitNoel Grandin3-26/+26
Change-Id: I3d87ee59258567b5a82cb459248539faea1b3ca9 Reviewed-on: https://gerrit.libreoffice.org/50101 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-21Revert "simplify ImpXPolygon"Stephan Bergmann2-23/+0
This reverts commit f9c2bcc8b761f5e21354c0fb7bca6aa432d11ec2. Drawing all sorts of curves and polygons in Draw causes various crashes in svx/source/svdraw/svdopath.cxx, apparently because in the past ImpXPolygon's pPointAry had a "buffer" of more elements (nSize) than it had nPoints, and the code heavily relied on that, assigning to such excess elements of pPointAry past nPoints (and presumably calling XPolygon::SetPointCount later?). Conflicts: svx/source/xoutdev/_xpoly.cxx (Reverted the mostly, if not completely, automatic changes there done by 924c0e34fdc36cd44100dafc2c68656ce32374e6 "loplugin:changetoolsgen in svx"; they will need to be re-done.) Change-Id: I6cb41fd218c3bdd0b3bbeb45f5b3d68649901a48 Reviewed-on: https://gerrit.libreoffice.org/50057 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-02-16Resolves: tdf#115750 SvStream::WriteStream was brokenCaolán McNamara1-6/+5
and didn't stop copying at the size limit arg Change-Id: I8f1be0310160f5158d2f64c62d6b2c09c0157930 Reviewed-on: https://gerrit.libreoffice.org/49838 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-02-06simplify ImpXPolygonNoel Grandin2-0/+23
just use a std::vector<std::pair<Point,PolyFlags>> Change-Id: I85de832af9095a33bda1620781c3b231a345e07c Reviewed-on: https://gerrit.libreoffice.org/49275 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-02tools: MSVC: pragma warning: make more specific, remove obsoleteMike Kaganski1-9/+0
Change-Id: If36242e93a700313becbd37ceae06491fcd84b8a Reviewed-on: https://gerrit.libreoffice.org/49052 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-02-01Support for webdav:// and webdavs:// schemes from command lineVasily Melenchuk1-4/+29
We have currently support for WebDAV schemes as vnd.sun.star.webdav:// but it is not user and tools friendly. Some related refactoring in ucb to reuse existing code instead of manual parsing of URLs. Change-Id: Ib14411796d6cf11afd80d5132abe67d4e46a42e1 Reviewed-on: https://gerrit.libreoffice.org/48585 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
2018-01-27improve subtyping when dealing with tools::WeakReferenceNoel Grandin1-0/+7
tweak the templating to make it easier to declare a WeakReference that points to a subclass for a weak-capable class. Which lets us declare some fields with more specific types, and dump a lot of unnecessary casting. And make WeakBase be inherited from virtually, so we don't end up with weird states where two weak refernces could point to two different parts of the same object. Change-Id: I3213ea27e087038457b0761b5171c7bce96e71f3 Reviewed-on: https://gerrit.libreoffice.org/48650 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-25Remove stdlib.h from sal/config.hStephan Bergmann1-0/+1
This reverts 5da3337c007e0572028283d70bad43e9a29d45c1 "readded include stdlib.h, because of missing NULL definition in many headers, #100000, #101685", which is no longer relevant. Change-Id: I544ed9a7afbf7b611bc481b8d50acca3193d93de Reviewed-on: https://gerrit.libreoffice.org/48131 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2018-01-23Point default ctor already zero-initializes the membersStephan Bergmann1-5/+1
Change-Id: I9cb59c77a420c975933070eea691cda52b066b0b Reviewed-on: https://gerrit.libreoffice.org/48397 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-01-23More loplugin:cstylecast on WindowsStephan Bergmann2-3/+3
Automatic rewrite (of loplugin:cstylecast and loplugin:unnecessaryparen) after cab0427cadddb3aaf1349c66f2fa13a4234ba4b2 "Enable loplugin:cstylecast for some more cases" and a409d32e7f6fc09e041079d6dbc3c927497adfed "More loplugin:cstylecast" Change-Id: Ib3355159dd08333e1b7a8d091caf2069cdcc7862 Reviewed-on: https://gerrit.libreoffice.org/48317 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-01-20More loplugin:cstylecast on macOSStephan Bergmann1-1/+1
Automatic rewrite (of loplugin:cstylecast and loplugin:unnecessaryparen) after cab0427cadddb3aaf1349c66f2fa13a4234ba4b2 "Enable loplugin:cstylecast for some more cases" and a409d32e7f6fc09e041079d6dbc3c927497adfed "More loplugin:cstylecast" Change-Id: Iff4877e8a42804c952c48c13332caf0a83c92870 Reviewed-on: https://gerrit.libreoffice.org/48216 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-01-20loplugin:unused-returns in filter,tools,xmloffNoel Grandin2-9/+8
Change-Id: I7a57be7e241883adac4417baa699a97d6304a631 Reviewed-on: https://gerrit.libreoffice.org/48188 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-20loplugin:unusedmethodsNoel Grandin1-16/+0
Change-Id: If00b0e659e1818c29ae39b89f8b4f7ea29d14986 Reviewed-on: https://gerrit.libreoffice.org/48185 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-19ofz#5475 Integer-overflowCaolán McNamara1-1/+18
Change-Id: I11d706c544698d57b75231e33e3d49f1ac1d4d73 Reviewed-on: https://gerrit.libreoffice.org/48159 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-01-17Missing includes (Windows --disable-pch)Stephan Bergmann1-0/+4
Change-Id: I5cd3297cff31b88c53cd04232bed40cbf04fa2f6 Reviewed-on: https://gerrit.libreoffice.org/48028 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-01-15More loplugin:cstylecast: toolsStephan Bergmann1-2/+2
Change-Id: I0d7318a5f781c81630a8ca43d30a7552132e7b11
2018-01-15convert a<b?a:b to std::min(a,b)Noel Grandin1-3/+3
with something like git grep -nP '(.*)\s*<\s*(.*)\s*\?\s*\g1\s*:\s*\g2' -- *.?xx Change-Id: Id5078b35961847feb78a66204fdb7598ee63fd23 Note: we also convert a>b?b:a Reviewed-on: https://gerrit.libreoffice.org/47736 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-13loplugin:useuniqueptr in PolyPolygonNoel Grandin2-265/+84
Also - convert to o3tl::cow_wrapper - drop the second param to the constructor and just let vector use it's own resize logic - bump MAX_POLYGONS from 0x3FF0 to 0xffff so that the ios2met filter can load it's files properly. Change-Id: I9db19e4f7b4f946e801ea07c31d2d0ded7837a0e Reviewed-on: https://gerrit.libreoffice.org/47789 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-12More loplugin:cstylecast: toolsStephan Bergmann14-153/+153
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: Ifb9ebc9623c8df14ea0d4c907001bd16c5b9ae59
2018-01-11loplugin:useuniqueptr in tools,stoc,unotoolsNoel Grandin5-122/+89
Change-Id: Ia72b65577143623cedc7a40bc34f7fb897add097 Reviewed-on: https://gerrit.libreoffice.org/47726 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-09ofz#5000 Integer-overflowCaolán McNamara1-10/+10
Change-Id: I74871848ddddafd1a89ddb3eee4a307cc5d7c16b Reviewed-on: https://gerrit.libreoffice.org/47573 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-01-08UL->UCaolán McNamara1-5/+5
Change-Id: I564e7604729f04e1fb9334b175c345938734640d Reviewed-on: https://gerrit.libreoffice.org/47547 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-01-07ofz#4995 Integer-overflowCaolán McNamara1-5/+7
Change-Id: Iad6e1c90cb099077809cc5684f683a0ba25b303b Reviewed-on: https://gerrit.libreoffice.org/47519 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-01-07Remove XmlWriter in test module and use tools::XmlWriterTomaž Vajngerl1-0/+6
Change-Id: I0a0e07a6a71ed95d783d35b7d94b857074ec3450 Reviewed-on: https://gerrit.libreoffice.org/47523 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2018-01-05long->sal_Int32 in BigIntNoel Grandin2-57/+45
And fix an issue discovered in the PPT parsing, where one of the test files has dodgy values that trigger the assert in BigInt::operator long(). Change-Id: Ic324ac38ecef4153cc434376317643ababe0a537 Reviewed-on: https://gerrit.libreoffice.org/47314 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-03loplugin:singlevalfields improve copy constructor checkNoel Grandin1-21/+8
Change-Id: Id1e7fbecd9e9f816553d2e678c3f1b7890fc4db8 Reviewed-on: https://gerrit.libreoffice.org/47293 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-25tdf#114684: don't print pages for ranges completely outside ...Mike Kaganski1-3/+16
... of possible pages range. Change-Id: Ibe50f116aecdad8c7cba7f9844bc04c15716d127 Reviewed-on: https://gerrit.libreoffice.org/47052 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-12-21new loplugin: convertlongNoel Grandin2-2/+2
merge the droplong and convertuintptr into one new plugin. Limit the analysis to looking at var decl's, since that seems to be safest proposition, even if that too needs some careful analysis. Change-Id: Id005baaf05cfb157ce44a06a1c81f08559a07d1f Reviewed-on: https://gerrit.libreoffice.org/46851 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-18sal_uIntPtr->sal_uInt32 in ConfigNoel Grandin1-10/+10
Change-Id: Ifca1e69c0b9f1def49b4b1973e7582fb3e8b8826 Reviewed-on: https://gerrit.libreoffice.org/46706 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-15merge ImplPolygon and ImplPolygonDataCaolán McNamara2-24/+10
Change-Id: Ia59a4533965bb3b76c73cc23c31bff4718768339 Reviewed-on: https://gerrit.libreoffice.org/46454 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-12-14use std::unique_ptrCaolán McNamara2-226/+181
Change-Id: I9f94077e7ce3b43007172a34666b502770f2c581 Reviewed-on: https://gerrit.libreoffice.org/46453 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-12-14sal_uIntPtr->sal_Int32 in MultiSelectionNoel Grandin1-38/+38
also replace the long/size_t with sal_Int32 so we have some consistency Change-Id: I9d3099b881354af7b9f59d312e6b15b213d1e580 Reviewed-on: https://gerrit.libreoffice.org/46395 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-13tools: remove unused #include from solar.hMichael Stahl1-0/+1
Change-Id: I214e13add371380701ae39403d90a574a63e495d
2017-12-13sal_uIntPtr->size_t in ZCodecNoel Grandin1-1/+1
to match the underlying fields Change-Id: I79ce52b80e2589b3194616b3d43846cdefd7adae Reviewed-on: https://gerrit.libreoffice.org/46349 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-12sal_IntPtr->sal_uInt32 in INetMIMEMessageStreamNoel Grandin1-9/+9
Change-Id: I5c57b0bf28a395a0617d1c16ccaeff759915974e Reviewed-on: https://gerrit.libreoffice.org/46225 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-12sal_uIntPtr->sal_uInt32 in m_nMIMEIndexNoel Grandin1-2/+2
Change-Id: I1373f11f07679569ef338178e56ffd269baf3c30 Reviewed-on: https://gerrit.libreoffice.org/46224 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-11ofz#4592 Direct-leakCaolán McNamara1-11/+11
regression from commit 225115af05cba9a603130914b49c5b28ed451108 Date: Fri Sep 15 09:17:17 2017 +0200 tdf#62525 tools: use cow_wrapper class for Polygon Change-Id: Ibd9173bfb005f8a30317d95adea4e5fb25f1df1d Reviewed-on: https://gerrit.libreoffice.org/46229 Reviewed-by: Andreas Brandner <Andreas.Brandner@cib.de> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-12-11Revert "just delete, don't check for null and then delete"Caolán McNamara1-3/+7
no time for this This reverts commit 4b941b7b7fd79415935c8f2d3ce900eb64a40f66.
2017-12-11just delete, don't check for null and then deleteCaolán McNamara1-7/+3
Change-Id: I4b3ebaadfe72c2c369ae6ad49abfb0d6626e9d71 Reviewed-on: https://gerrit.libreoffice.org/46228 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-12-10tdf#62525 tools: use cow_wrapper class for PolygonAndreas Brandner2-514/+478
Change-Id: I78f141762f593b36d32eb3eb2cda8fdae54b7277 Reviewed-on: https://gerrit.libreoffice.org/42309 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2017-11-29lokdialog: Changed dialog painting to allow for modal dialogsPranav Kant1-0/+10
Split IDialogNotifier from IDialogRenderable and make SfxViewShell implement it. We now just send the dialog UNO command to the backend and wait for core to emit a 'created' dialog callback which signals dialog creation in the backend. The client is then supposed to send the paint commands for rendering the dialog. Change-Id: I1bfbce83c17955fa0212408376d6bcd1b2d2d1dd
2017-11-29loplugin:unusedmethodsNoel Grandin1-13/+0
Change-Id: I2efb5c0e5735c179314c6c5de87821cee3b033e1 Reviewed-on: https://gerrit.libreoffice.org/45386 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-27loplugin:unnecessaryparen (clang-cl)Stephan Bergmann1-2/+2
Change-Id: I5452235287fd5986de25ee542edd57bf1abded52 Reviewed-on: https://gerrit.libreoffice.org/45338 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-11-23loplugin:simplifybool can't invert conditions involving float typesNoel Grandin1-2/+2
so revert some of the changes from commit 7a1c21e53fc4733a4bb52282ce0098fcc085ab0e loplugin:simplifybool for negation of comparison operator Change-Id: I937d575b86c1e418805d399b0dc16ae91876b4fe Reviewed-on: https://gerrit.libreoffice.org/45130 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-23loplugin:simplifybool for negation of comparison operatorNoel Grandin1-2/+2
Change-Id: Ie56daf560185274754afbc7a09c432b5c2793791 Reviewed-on: https://gerrit.libreoffice.org/45068 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-22cpuid is only for x86 processors.jan Iversen1-0/+7
clang for macOS did not like cpuid when compiling for arm cpu. Change-Id: Iede658a524e5c3e1aa2d33137ed399679b021987
2017-11-22drop duplicate methodCaolán McNamara1-2/+2
Change-Id: Idadd0a64e41cd02f5167b275081c3576a6224b12 Reviewed-on: https://gerrit.libreoffice.org/45075 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-11-21halve the number of threads if HT is activeDennis Francis1-2/+9
added hasHyperThreading() function to tools::cpuid to detect hyperthreading. Change-Id: I13fab4b6c649e681c329b7e3f4c9f36bda879d84
2017-11-13inline INetMIMEOutputSinkNoel Grandin1-42/+27
Change-Id: Id76cf021658936301dd6b9685cafe7ece7ffa228 Reviewed-on: https://gerrit.libreoffice.org/44589 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>