summaryrefslogtreecommitdiff
path: root/tools
AgeCommit message (Collapse)Author
2016-04-04loplugin:constantparam in toolsNoel Grandin
Change-Id: I8b2a722b525722bd09ed1f27c648062d6f29cce7 Reviewed-on: https://gerrit.libreoffice.org/23723 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-03-31use SAL_N_ELEMENTS in for loopsNoel Grandin
for with git grep -n 'for.*sizeof' Change-Id: I6211024385e03ac5eeeb38690d2c1c699e015c2f Reviewed-on: https://gerrit.libreoffice.org/23569 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-03-17loplugin:constantparam in toolsNoel Grandin
Change-Id: I3774661799c074561c694515baba42a375d0a077 Reviewed-on: https://gerrit.libreoffice.org/23301 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-03-11tdf#97966: Remove 'static' keywordsWastack
Change-Id: Iced527f48afa828cc9acf5b6461674a2706cbcd7 Reviewed-on: https://gerrit.libreoffice.org/23135 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2016-03-10loplugin:constantparam in toolsNoel Grandin
Change-Id: Ibd093ba4e8140ed3fda87ef340280433302f82a5
2016-03-07loplugin:unuseddefaultparamsNoel Grandin
Change-Id: Ia414f7845425ef73859ed04853378e96cc738795 Reviewed-on: https://gerrit.libreoffice.org/22971 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-03-07tdf#97703 removed empty setUp/tearDown methodsChirag Manwani
Change-Id: I244d481bce4723d172e26c0d31aab0a541334604 Reviewed-on: https://gerrit.libreoffice.org/22959 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-03-06Minor optimization, and improved commentsMatteo Casalin
Change-Id: I6732725ef48d69f4c01762a117a60447e313aea0 Reviewed-on: https://gerrit.libreoffice.org/22936 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-03-06Remove unuseful nStartIndex data member (and fix indexing)Matteo Casalin
The methods that modify nUinqIndex already maintain class invariants: * Insert() never decrease its value * Remove() can replace its value with that of the removed item, which was no lower than the one specified in constructor call. Besides, boundary checks against nStartIndex are not really needed since the various methods rely on map::find. Finally, FirstIndex/NextIndex/LastIndex/GetIndexOf did not adjust with nStartIndex the index value retrieved from tha map, thus provifing wrong values. Since the map now stores the real indexes, consistency is granted. Change-Id: I5e47cd2672677805304d4c4860826fe272812abf Reviewed-on: https://gerrit.libreoffice.org/22935 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-03-06Simplify recycling/search of freed UniqueIndex-esMatteo Casalin
Change-Id: Icb8b375a95718a72abdd6650dda49fb9f43026a4 Reviewed-on: https://gerrit.libreoffice.org/22934 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-03-05Delete obsolete/unuseful commentsMatteo Casalin
Change-Id: Iadec409743e144a97c4468052dc0a04b91ca9619
2016-03-05Do not duplicate count of itemsMatteo Casalin
Change-Id: I373b39f36fee7c37f2c10cc748f309412d68b688
2016-03-05Let find fail, instead of using a dubious upper bound checkMatteo Casalin
Change-Id: I874ef402d241aa4de02057ca9dc747ae0497b1e0
2016-03-05Use Index consistentlyMatteo Casalin
Change-Id: I20b7c1bd2ecccc21967c4edab37a94c971aa8a8d
2016-03-04loplugin:unuseddefaultparam in toolsNoel Grandin
Change-Id: I027f4d53e3aa793bd61bf110899e464a9b6430ec Reviewed-on: https://gerrit.libreoffice.org/22891 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-03-02tdf#57950 Replace chained O(U)StringBuffer::append() with operator+Sedat Ak
Change-Id: I956832e69f25ddc25523ffc1c0f289aecf930f68 Reviewed-on: https://gerrit.libreoffice.org/21927 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: jan iversen <jani@documentfoundation.org>
2016-03-01sal_uIntPtr/sal_uLong to Index (aka sal_uInt32) in UniqueIndexMatteo Casalin
Change-Id: I212cb3bb9d920741629fc4564bbd28b393e8fe00
2016-03-01UniqueIndexImpl::size() is unneededMatteo Casalin
Change-Id: I36c4d80ecf3ba3c88c98f5ad0a3fc1728332b25b
2016-03-01loplugin:unuseddefaultparam in toolsNoel Grandin
Change-Id: I2a974ba76566700c2037fcb38de3ecfea9d2651d
2016-02-23new loplugin: commaoperatorNoel Grandin
Change-Id: I03f24e61f696b7619855e3c7010aa0d874e5a4ff
2016-02-21WaE vs2015 bug, add a temporary warning disableNorbert Thiebaud
Microsoft say that the warning c4592 we get there in vs2015-r1 is a bug on their side. Ignore it for now Change-Id: I820840a50932e42371947cdc10d1e09278f744ca Reviewed-on: https://gerrit.libreoffice.org/22593 Reviewed-by: David Ostrovsky <david@ostrovsky.org> Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
2016-02-17use consistent #define checks for the Windows platformNoel Grandin
stage 2 of replacing usage of various checks for the windows platform with the compiler-defined '_WIN32' macro In this stage we focus on replacing usage of the WIN macro Change-Id: Ie8a4a63198a6de96bd158ecd707dadafb9c8ea84 Reviewed-on: https://gerrit.libreoffice.org/22393 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-02-16use consistent #define checks for the Windows platformNoel Grandin
stage 1 of replacing usage of various checks for the windows platform with the compiler-defined '_WIN32' macro Change-Id: Iece73abdee530937e0737190b1aa97a46cd3075f Reviewed-on: https://gerrit.libreoffice.org/22390 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-02-15Rename rtl::isValidCodePoint -> rtl::isUnicodeCodePointStephan Bergmann
...and fix its documentation, and use it throughout the code base. Change-Id: I349bc2009b1b0aa7115ea90bc6ecd0a812f63698
2016-02-15cppcheck: noExplicitConstructorCaolán McNamara
Change-Id: I92f41cde892d47abcd31e2b85ace7d228cbfd9fe
2016-02-09Remove excess newlinesChris Sherlock
A ridiculously fast way of doing this is: for i in $(pcregrep -l -M -r --include='.*[hc]xx$' \ --exclude-dir=workdir --exclude-dir=instdir '^ {3,}' .) do perl -0777 -i -pe 's/^ {3,}/ /gm' $i done Change-Id: Iebb93eccbee9e4fc5c4380474ba595858a27ac2c Reviewed-on: https://gerrit.libreoffice.org/22224 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2016-02-08loplugin:unusedmethodsNoel Grandin
using an idea from dtardon: <dtardon> noelgrandin, hi. could you try to run the unusedmethods clang plugin with "make build-nocheck"? that would catch functions that are only used in tests. e.g., i just removed the whole o3tl::range class, which has not been used in many years, but htere was a test for it... <noelgrandin> dtardon, interesting idea! Sure, I can do that. Change-Id: I5653953a426a2186a1e43017212d87ffce520387 Reviewed-on: https://gerrit.libreoffice.org/22041 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-01-31OSL_THIS_FUNC is a rip-off of BOOST_CURRENT_FUNCTION so we can use thatCaolán McNamara
as a direct drop in I guess Change-Id: I3add63f1459f4e659019bd6db54da2f5431958ce Reviewed-on: https://gerrit.libreoffice.org/21941 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-01-25workaround ICE in VisualStudio2013Noel Grandin
Change-Id: Ia28d6b67f3f76a9101b035d8a61e775d9a5039b4
2016-01-18loplugin: unused return valuesNoel Grandin
Change-Id: I9c61a46c57894bc63a57740206c0bcb4a16553af Reviewed-on: https://gerrit.libreoffice.org/21571 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-01-15loplugin:unusedmethods unused return value in include/toolsNoel Grandin
Change-Id: I77a6a46ca20cb41ed73050185fb2064a1bbf2009 Reviewed-on: https://gerrit.libreoffice.org/21485 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-01-10Fix typosAndrea Gelmini
Change-Id: I9a5940027423ff0791fa7da0b79b617412ce6b86 Reviewed-on: https://gerrit.libreoffice.org/21209 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2016-01-07Avoid memory leaks upon (de)compression failureStephan Bergmann
This e.g. reduces the LSan-reported leakage during CppunitTest_sd_filters_test from SUMMARY: AddressSanitizer: 504104 byte(s) leaked in 4654 allocation(s). to SUMMARY: AddressSanitizer: 115048 byte(s) leaked in 4639 allocation(s). Change-Id: If922e872d9f696847face198e082144ccd5f12de
2015-12-21loplugin:unusedmethodsNoel Grandin
Change-Id: Ifafdaf6da0225f244853a0042a6458643b570623
2015-12-14tdf#96206: Avoid scaling objects while copying to clipboardMike Kaganski
... to prevent duplicating masters on slide copy-paste. Also fixed a 10-year copy-paste error (pRefPage wasn't replaced with pNPage). Fixed argument evaluation order issue (aStream.GetEndOfData() depends on Flush() but doesn't call it, so will return incorrect result if called before aStream.GetBuffer()). Replaced compare of hashes with results of stringify(), because it removes useless overhead (hashes are calculated from stringify() anyway, and are not cached anywhere). Removed Flush() called from SvMemoryStream::GetBuffer(), because it calls GetData(), which calls Flush() itself. Thanks to Andras Timar for unit test framework. Change-Id: Ia46d4e9a017fc628d424949a9d229045a249a4ca Reviewed-on: https://gerrit.libreoffice.org/20367 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2015-11-29tdf#57950 Replace chained O(U)StringBuffer::append() with operator+Sedat Ak
Change-Id: I373afdd529b403ee2aa314ee5380fb4667717a3f Reviewed-on: https://gerrit.libreoffice.org/20265 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2015-11-28-Werror,-Wunused-variableStephan Bergmann
Change-Id: I07f77584b1c8848a17dc2be94a8f90aef2e02ef8
2015-11-26loplugin:unusedfields variousNoel Grandin
Change-Id: I18f94269a1172cf195ee402384f7144610e1e82d
2015-11-25loplugin:unusedfields in include/toolkit,include/toolsNoel Grandin
Change-Id: I22966b66b1b8e4dff2e565de456f21a668f33f28
2015-11-24loplugin:unusedfields in tools/Noel Grandin
Change-Id: Ic460bf42cbcf356cdcebbd5060a0dad3d3caa4ef
2015-11-20don't warn on Color streaming missing Solar VersionCaolán McNamara
Change-Id: I47e6a21fde77028c7a717b095883497888806501
2015-11-17use unique_ptr for pImpl in tools/Noel Grandin
Change-Id: I7ac7eca32a67524f6c87696c16b16128e6d8518b
2015-11-17Don't assume sal_Unicode is unsigned shortStephan Bergmann
Change-Id: Idcfa500c491fcedfff7d4c6e1bef25fd2d948d36
2015-11-17Add SvStream::ReadUtf16 (don't assume sal_Unicode is unsigned short)Stephan Bergmann
Change-Id: I74f34e3389582617fa83f8f4a3d6867cf87189e1
2015-11-15Fast PCH generator and optimized PCH filesAshod Nakashian
Ported update_pch.sh to Python with improved performance and features. The new script is invoked from the same update_pch.sh which calls it for each library in parallel, although it can be invoked directly. The ported script (update_pch) updates all PCH files in ~15 seconds where the old script took ~4500 seconds. In addition, the new script supports 3-tiered headers (system, module, and local) and is very flexible to support other improvement. It has a per-library optimal configuration settings that can be updated using another new scripts (update_pch_autotune.sh) which finds optimal per-PCH settings. PCH files have been generated using the new scripts which builds significantly faster (2-3x, depending on module and configuration) and the intermediate binaries are noticably smaller (by several GBs). The new script stamps each generated PCH file with the command that generated it to make it trivial for users to update them, and also adds the command to invoke another script (update_pch_bisect) that helps find missing headers or conflicting headers that may break the build after updating the PCH. Finally update_pch has built-in unit-tests for makefile parsing and other core functionality. Change-Id: Ib933b50e50374d7e2e7e3e95ba8799b0cc8a27fa Reviewed-on: https://gerrit.libreoffice.org/19965 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-11-13underscores are reservedTomaž Vajngerl
Change-Id: Iee60389ccc9e348db6ed00e48e32b1e86f17b530
2015-11-13improve compile time SSE2 detection, fix broken android buildTomaž Vajngerl
Prereq. to enable runtime SSE2 detection is that the compiler supports it in the first place. MSVS and GCC use different compiler flags for this so use __LO_SSE2_AVAILABLE__ to make this build platform independent. emmintrin.h is unavailable on ARM Android so include this and compile the SSE2 specific code only when we are sure we can build SSE2 code (__LO_SSE2_AVAILABLE__ is defined). Change-Id: I212c4e0b99a314d087b9def822a81325b25f3469
2015-11-13remove SSE detection code (but keep SSE2)Tomaž Vajngerl
For corner case CPUs out there that support SSE and not SSE2 it makes more sense to use the "fallback" code path instead of writing a SSE only version. For this reason detecting SSE is not relevant anymore - so removing it. Change-Id: I3f1425af2cb5cdf9fba699e2996014598a15b5c1
2015-11-13tools: runtime SSE/SSE2 detectionTomaž Vajngerl
Change-Id: I29330061e2986ec2ae899c2f3a63d0eadd9cc194
2015-11-11stream version doesn't matter hereCaolán McNamara
Change-Id: I318b0268143bef376f324afdd42692991c3bab4c