summaryrefslogtreecommitdiffstats
path: root/tools
Commit message (Collapse)AuthorAgeFilesLines
* add COVERITY_NOEXCEPT_FALSECaolán McNamara2017-06-061-1/+1
| | | | | | | | | | | | to markup dtors that coverity warns might throw exceptions which won't throw in practice, or where std::terminate is an acceptable response if they do Change-Id: I32b94814e8245372e1d1dc36be0d81e3564042f4 Reviewed-on: https://gerrit.libreoffice.org/38318 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
* replace SVSTREAM_OK with ERRCODE_NONENoel Grandin2017-06-064-10/+10
| | | | | | | | | since the first is #define'd to the second, and offers no extra value Change-Id: I2c67e09ea3aa5361b8e7dfe7a20858c6ae054450 Reviewed-on: https://gerrit.libreoffice.org/38406 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* Improved loplugin:cstylecast to reference types: toolsStephan Bergmann2017-06-051-1/+2
| | | | Change-Id: I3351bffc0f6a0725be780c7611138d6a4db5888e
* teach redundantcast plugin about functional castsNoel Grandin2017-05-301-1/+1
| | | | | | | Change-Id: Iac8ccd17d9e46ebb2cb55db7adb06c469bbd4ea0 Reviewed-on: https://gerrit.libreoffice.org/37910 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
* make string translation loading more uniformCaolán McNamara2017-05-191-1/+1
| | | | | | | | | | | | | | | change various ResId classes that use conversion operator to OUString to functions that return a OUString drop various defines drop unnecessary toString calls Change-Id: Ibeccdf2b91a46a2ed5b4b74e6024e301a023bc92 Reviewed-on: https://gerrit.libreoffice.org/37817 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
* loplugin:unusedmethodsNoel Grandin2017-05-181-12/+0
| | | | | | | Change-Id: I1c50d176e793397a1f9625f797a3750cf191a61c Reviewed-on: https://gerrit.libreoffice.org/37679 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* cleanup osl/diagnose.h includesJochen Nitschke2017-05-092-2/+0
| | | | | | | | | | | | | | with command > git grep -l osl/diagnose.h *.cxx | xargs grep -L -w 'OSL_\w*' | xargs sed -i '/#include *\(<\|\"\)osl\/diagnose.h\(>\|\"\).*/d' headers need more work Change-Id: I906519ebbd47a04703b4fa5943b2f7abea7a97ab Reviewed-on: https://gerrit.libreoffice.org/37350 Tested-by: Jochen Nitschke <j.nitschke+logerrit@ok.de> Reviewed-by: Michael Stahl <mstahl@redhat.com>
* tdf#43157 Cleanup DBG_ASSERT in pstm.cxxFakabbir Amin2017-05-081-13/+11
| | | | | | | Change-Id: Ibc7b7399ccc827168768ee94b6e75e4116fc95c9 Reviewed-on: https://gerrit.libreoffice.org/33882 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
* cleanup tools/debug.hxx includesJochen Nitschke2017-05-082-2/+0
| | | | | | | | | | | | | | with command > git grep -l tools/debug.hxx | xargs grep -L DBG_ | xargs sed -i '/#include *\(<\|\"\)tools\/debug.hxx.*/d' don't change files in includes/ and */pch Change-Id: Ie429d6a7dca5dfa1073e0f5ba037f7c84bdbec08 Reviewed-on: https://gerrit.libreoffice.org/37349 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* revert OSL_ASSERT changesChris Sherlock2017-05-071-3/+3
| | | | Change-Id: I365d140446bd2a62cf8256acbfdd53fe72987380
* tdf#43157: convert tools from OSL_ASSERT to assertChris Sherlock2017-05-071-3/+3
| | | | Change-Id: If932ad6282bac2ca0caa1a824ce58cad9e61045c
* DateTime::GetWin32FileDateTime: FILETIME is uint64Eike Rathke2017-05-061-8/+15
| | | | | | | Truncate to 0 at 1601-01-01 See source code comment for pointers and reasoning. Change-Id: Iea961e0c0302f4f48a0ddbdd23036cbbbf53c00f
* Fix typosAndrea Gelmini2017-05-052-2/+2
| | | | | | | | | | To complete commit 0ef94e2b559547bc4e906e7f24e57ff5d642e108 and f12096272e684ddcd8ffa4e34dcb0a680cc594c2 Change-Id: Ie86bbfbd58dd728a013bef221e4d5c8fbcaf8e03 Reviewed-on: https://gerrit.libreoffice.org/37199 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
* DateTime::CreateFromWin32FileDateTime: FILETIME is uint64Eike Rathke2017-05-051-30/+21
| | | | | | | | | | Called with a (stray value read from file?) sometimes absurdly high value treated as an int64 negative value which the algorithm couldn't cope with, resulting in weird DateTime ctor arguments that now assert. Changed to uint64 and replaced calculation with Date::operator+=(long) Change-Id: Ia8dbc10c4c633208730fce583e43afd828e7546f
* Use gcd from boost::math::gcdDavid Ostrovsky2017-05-051-2/+3
| | | | | | | | | | | | According to the documentation "Run-time GCD & LCM Determination": [1], gcd should be consumed from boost::math::gcd. [1] <http://www.boost.org/doc/libs/1_64_0/libs/math/doc/html/math_toolkit/run_time.html> Change-Id: I026a4e8ead75399765eb73fa5434a57958676383 Reviewed-on: https://gerrit.libreoffice.org/37260 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
* Replace all OUString("") with OUString()Arnaud Versini2017-05-041-1/+1
| | | | | | | Change-Id: Ie14c4d76cb61cfbe0410103adfc1afc8ade0f3e0 Reviewed-on: https://gerrit.libreoffice.org/37146 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* tools: don't use std::tie when comparing resourcesMichael Stahl2017-05-031-2/+4
| | | | | | | | | | | | | This is unbelievably slow, Impress is basically unusable in a non-optimized build; every time you enter or leave text edit mode, some svx::sidebar::AreaPropertyPanel is created, which loads the color palette standard.soc, and there are lots of resource lookups for the strings in there; the std::tie and std::tuple::operator< make those 10x slower. (regression from d26f7537a57e4fc4c041db852b23c27149bc213d) Change-Id: I073b0187f6c173487e781a42c49631cb9ff2e625
* remove excessive forward declarationsJochen Nitschke2017-05-031-74/+24
| | | | | | | | | and move comments. Change-Id: Ice44cfb4bbfb8973cd67a168727f2273976f8979 Reviewed-on: https://gerrit.libreoffice.org/37158 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* Assert that nMonth and nDay <100 to be representableEike Rathke2017-05-021-0/+2
| | | | Change-Id: Ie52269478ecac75519d04310a17873904c8167e6
* Add more unit tests for Date::Normalize()Eike Rathke2017-05-021-0/+29
| | | | Change-Id: I013317bfa9dad02194177cca0907b0ffbb171ccd
* Date::Normalize: handle day 0 and empty dateEike Rathke2017-05-021-0/+16
| | | | | | | | | | | | | * Empty date (initialized with Date::EMPTY == all 0) stays empty. * Day 0 is normalized to the last day of the previous month. * Day 0 AND month 0 is also normalized to the last day of the previous month (and not the last day of the previous-1 month). * Before, * all day 0 cases weren't handled at all and day 0 stayed day 0, which doesn't make sense in a Normalize() context * empty date wasn't detected and resulted in nonsense date -0001-12-00 Change-Id: Ib12ff7694e1adb17724af038a266f6f284285f36
* Test that empty date is not a valid dateEike Rathke2017-05-021-0/+4
| | | | Change-Id: If5f2db3d4bae9158b482b01ce7dbb7335b4cb16b
* Date::IsValidDate: year 0 is notEike Rathke2017-05-021-0/+2
| | | | Change-Id: I44e476f354d04a1d070a7348e3b00d75497231c2
* untranslated strings are just stringsCaolán McNamara2017-05-021-4/+8
| | | | | | | | | | removes starmaths InsertCommand in favour of InsertCommandText Change-Id: I5659adcaa28e5b5861d1a1cc5d2afa84009490f6 Reviewed-on: https://gerrit.libreoffice.org/37113 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
* Move getProcessWorkingDir from tools to unotoolsChris Sherlock2017-04-292-61/+0
| | | | | | | Change-Id: Ifd86ab3c89c285ad5329fc86cc57967ebd1af91a Reviewed-on: https://gerrit.libreoffice.org/37100 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
* use std container for ParameterListJochen Nitschke2017-04-282-114/+61
| | | | | | | | | | | | | | | | | | | | 'ParameterList::find' was used to detect duplicate sections and sort the parameters by attribute and section. Checking for duplicates is done by 'std::any_of' and the predicate 'Parameter::IsSameSection' now. The parameters are inserted as they are parsed and sorted later with 'std::sort' algorithm and 'Parameter::operator<' Adapt loops to use iterators. Change a weird 'for' loop in 'parseParameters' to a 'do .. while ..' loop to match style of a preceding loop. Extend unit test with a case of duplicate sections. Change-Id: If2789c0cee8f64deae84bc720807d2d26d81dc9f Reviewed-on: https://gerrit.libreoffice.org/37075 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* loplugin:salunicodeliteral: toolsStephan Bergmann2017-04-281-5/+5
| | | | Change-Id: I9b428f4c5ff34a574d13a138cda4444502817e5c
* Add unit tests for Date::Normalize()Eike Rathke2017-04-281-0/+17
| | | | Change-Id: I4edb04748b1f407eb6ce17cd24ff022cef6e1f67
* Month 100 was always wrongEike Rathke2017-04-281-1/+1
| | | | | | | | | | | | | Though only in case localtime() couldn't be obtained, which is about ~never. Fallout from commit a3de32acc06cfcf9bb343a29c4b9854c92645f70 Date: Wed Oct 28 11:23:36 2015 +0100 Rename (private) Date::init and reuse it Change-Id: Idbbac69f3d90e7556cd83bbf442ef8ccaecec86e
* loplugin:cppunitassertequals: toolsStephan Bergmann2017-04-281-18/+18
| | | | Change-Id: I8dc45fbbe3ea8c3fb898250e55cee582d1d8199d
* split nTypeAndId into two fields in ImpContentNoel Grandin2017-04-271-27/+41
| | | | | | | | | preparatory to making the id part into strong_int Change-Id: Ied96193a6db9d45b24267b51b3014eb923319598 Reviewed-on: https://gerrit.libreoffice.org/37027 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
* no bitmaps in .src files anymoreCaolán McNamara2017-04-271-11/+0
| | | | Change-Id: I0228cae8590366be5d5f0d431cf655942bbb891c
* loplugin:unusedmethodsNoel Grandin2017-04-261-20/+0
| | | | | | | Change-Id: If2e1241bbe8a3d17859e3ca076b0f55f25c48ea5 Reviewed-on: https://gerrit.libreoffice.org/36983 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
* extend unit test for INetMIME::scanContentTypeJochen Nitschke2017-04-262-16/+108
| | | | | | | | | | | | | | | | | | This reverts parts of commit 631b67952909a73ba1851417bd2edbe02ad7be5a and commit abc6071b7a8af354a56c91e4caecd8afc79f55cc. some of the removed fields are usefull, m_bConverted should be checked by callers fixed 2 bugs and added test cases: * extended attributes with more than 2 sections were not parsed * extended attributes with more than 1 section were not parsed if there was an other attribute Change-Id: I61ab2af7c5151ef1bcd80cc159fa2b99559374a8 Reviewed-on: https://gerrit.libreoffice.org/36913 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
* errinf.hxx moved out of tools and into vcl moduleChris Sherlock2017-04-252-351/+0
| | | | | | | | | | ErrorInfo has a hard depency on VCL, yet is in the tools package. It is more appropriate to have it reside in the VCL module. Change-Id: Ica54a46c3a7f86cf0331ed7245234bea69c05650 Reviewed-on: https://gerrit.libreoffice.org/36839 Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com> Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
* tools: svstream.hxx needs only errcode.hxx & not errinf.hxxChris Sherlock2017-04-252-0/+2
| | | | | | | Change-Id: Ia28e35ae5af4f601e9a586a3deffbcd61702b0ca Reviewed-on: https://gerrit.libreoffice.org/36896 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
* tools: cleanup tools/source/ref/errinf.cxxChris Sherlock2017-04-241-18/+18
| | | | | | | | | Make the code more readable, some whitespace formatting changes and changed ppDcr, etc. to clearer variable names. Change-Id: I9d0f3eec6607376b6648241cea80922f11d9773e Reviewed-on: https://gerrit.libreoffice.org/36837 Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com> Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
* tools: change internal DynamicErrorInfo struct nameChris Sherlock2017-04-231-16/+16
| | | | | | | | | | | | Change of an internal struct's name in errinf.cxx - renaming EDcrData to DynamicErrorRegistry as EDcr makes very little sense to me. EDcrData is an internally used struct consisting of collections of error data, error handlers and error contexts, and uses only DynamicErrorInfo instances. Change-Id: I79d7f7db5d9550dffca6adcb2a286a2d6e1fa2e7 Reviewed-on: https://gerrit.libreoffice.org/36836 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* gbuild: Remove MSVC 2013 legacy codeDavid Ostrovsky2017-04-213-3/+0
| | | | | | | | | Uwinapi is discontinued. Change-Id: I063b4d0d8fab2d60de168e960a63b8181158ac01 Reviewed-on: https://gerrit.libreoffice.org/23198 Reviewed-by: David Ostrovsky <david@ostrovsky.org> Tested-by: David Ostrovsky <david@ostrovsky.org>
* remove unnecessary explicit linefeeds from end of SAL and OSL log callsNoel Grandin2017-04-211-1/+1
| | | | | | | Change-Id: I3fa363c8e76e6cfb297f4ec346e3f031c09d6fbf Reviewed-on: https://gerrit.libreoffice.org/36727 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* remove some old MSVC workaroundsNoel Grandin2017-04-212-2/+2
| | | | | | | Change-Id: I6abd8aaffb27b3c85df7c0518f7f576be4e32222 Reviewed-on: https://gerrit.libreoffice.org/36660 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* loplugin:unusedmethodsNoel Grandin2017-04-203-27/+1
| | | | | | | Change-Id: Ib7a9b1b0802ca751da258065e89b412b090bb672 Reviewed-on: https://gerrit.libreoffice.org/36718 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* remove freshly unused menu support from src filesCaolán McNamara2017-04-192-98/+0
| | | | | | | | Change-Id: I038711a0c4d440d452d5b2ae1bfcba5c9305815b Reviewed-on: https://gerrit.libreoffice.org/36646 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
* Add minimal INetMIME::scanContentType test and fix bugs thus foundStephan Bergmann2017-04-122-4/+32
| | | | Change-Id: I8fcbeb2b0804bc4f9ee8f97f7d02737ba79a7f20
* Revert "remove duplicate charset entries"Noel Grandin2017-04-121-0/+10
| | | | | | | This reverts commit 98973e40e8753e96c7ae271a2a13078646fadb1b. Not actually duplicates, the entries have underscore instead of dash.
* remove duplicate charset entriesJochen Nitschke2017-04-121-10/+0
| | | | | | | Change-Id: I0e216af87b3dfaa57533418286fbf290d564cb25 Reviewed-on: https://gerrit.libreoffice.org/36418 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* loplugin:inlinefields in INetMIMEMessageStreamNoel Grandin2017-04-101-11/+9
| | | | | | | Change-Id: I675b53a55e02899f0cf325245cedb298f6903281 Reviewed-on: https://gerrit.libreoffice.org/36266 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* use correct string lengthJochen Nitschke2017-04-091-3/+1
| | | | | | | Change-Id: I2a5a0e496e80e1f5868e5ac09bfdba57a598ec90 Reviewed-on: https://gerrit.libreoffice.org/36271 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* loplugin:redundantcast find cstyle arithmetic castsNoel Grandin2017-04-071-2/+2
| | | | | | | Change-Id: If7c259f0d12a41182f476ddb558f7cb5f76f9577 Reviewed-on: https://gerrit.libreoffice.org/36253 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* loplugin:useuniqueptr extend to catch more localvar casesNoel Grandin2017-04-061-8/+6
| | | | | | | | | | | | | | | i.e. where the code looks like { foo * p = new foo; ... delete p; return ...; } Change-Id: Id5f2e55d0363fc62c72535a23faeaaf1f0ac6aee Reviewed-on: https://gerrit.libreoffice.org/36190 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>