summaryrefslogtreecommitdiff
path: root/tools
AgeCommit message (Collapse)AuthorFilesLines
2020-07-21Fix uses of char16_t*/wchar_t* stream insertersStephan Bergmann1-1/+1
...that are helpfully deleted in C++20, as now implemented at least by VS 2019 16.6.4 when using --with-latest-c++ Change-Id: Iaf80f793e73fc90768bb146c9cf3d300d6747c8c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99170 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-07-10replace usage of blacklist with excludelist for IWYUThorsten Behrens1-1/+1
Background and motivation: https://tools.ietf.org/html/draft-knodel-terminology-02 Change-Id: I2f22d455d2a936a85750eaab1fda215ebb6d9d48 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98182 Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2020-07-02Upcoming improved loplugin:staticanonymous -> redundantstatic: toolsStephan Bergmann7-11/+11
Change-Id: I832fbcde277a87ab873ce3477a6886c7002e24ad Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97709 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-07-01loplugin:constantparamNoel Grandin2-6/+3
Change-Id: Ie9d4761747f7e97f63f34394b5a8b9f0bb287a0e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97528 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-06-29tools: fix 32bit Android buildMiklos Vajna1-1/+1
tools/source/misc/json_writer.cxx:289:34: error: format specifies type 'long' but the argument has type 'sal_Int64' (aka 'long long') [-Werror,-Wformat] mPos += sprintf(mPos, "%ld", nPropVal); ~~~ ^~~~~~~~ %lld 1 error generated. Change-Id: Ieacf2f521f77292d61fa714bf584c9e2045c2e1b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97367 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2020-06-25use tools::JsonWriter for dumping property treeNoel Grandin2-3/+60
Change-Id: I8f55af19ba10b71bd621e69b27000ab7cb565309 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96677 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-06-25Fix typosAndrea Gelmini2-2/+2
Change-Id: I2bccc7beb2e9dfccd84b118a33a7aee9753a8be1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97040 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-06-24fix JsonWriter::reallocBufferNoel Grandin1-0/+1
was not updating mSpaceAllocated Change-Id: Ie5404e58c6520d32b72c19ddfa58b2ab2b895199 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97049 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-06-24Add test as an example how to add CPU intrinsics supportTomaž Vajngerl4-0/+203
Also makes sure that if the CPU dataction or compiler detection doesn't work correctly, the test could potentially crash. Change-Id: If0862c0a736c8e1f5ba1117b248918e4c1fb2f4d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96779 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2020-06-22Consolidate unique_ptr deleters calling freeStephan Bergmann1-7/+3
Change-Id: I57a977dbb521270a466d464df8c31c364179ec20 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96854 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-06-21Avoid one more unhelpful -Werror=stringop-truncationStephan Bergmann1-1/+1
...after cb95276e6e6bf12a1c06d5c252551e55c788fcb2 "use JsonWriter for the rest of ITiledRenderable", similar to de32eb539bbcf291f9968ae12696e1317fdb855d "Avoid unhelpful -Werror=stringop-truncation" Change-Id: I8782a8a936a5ff0351b6e6d171a00cb8f4a1b2d0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96820 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-06-20use JsonWriter for the rest of ITiledRenderableNoel Grandin2-16/+139
and fix bug in buffer reallacotion where mPos pointing at the beginning of the new buffer instead of at the correct index inside it. Change-Id: Ie1ffaa176f6165e2cec85c93adc945312eff38e4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96650 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-06-19asan: need to use malloc instead of new for tools::JsonWriterNoel Grandin2-6/+20
because the LOK API expects memory returned from those calls to be malloc'ed Change-Id: If6fbfb60c433bd6e58bc90a9a90a90663e2e1c60 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96676 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-06-19Fix typosAndrea Gelmini1-1/+1
Change-Id: I887a86506b700a21b56bbc66d8b3b2e1bcec0da5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96651 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-06-18Avoid unhelpful -Werror=stringop-truncationStephan Bergmann1-5/+5
...emitted at least by recent GCC 11 trunk (even with --disable-optimized, where optimization level traditionally has some impact on what warnings of this kind are emitted exactly): > tools/source/misc/json_writer.cxx: In member function ‘tools::ScopedJsonWriterNode tools::JsonWriter::startNode(const char*)’: > tools/source/misc/json_writer.cxx:42:12: error: ‘char* strncpy(char*, const char*, size_t)’ output truncated before terminating nul copying 5 bytes from a string of the same length [-Werror=stringop-truncation] > 42 | strncpy(mPos, "\": { ", 5); > | ~~~~~~~^~~~~~~~~~~~~~~~~~~ etc. Change-Id: Id96964b178b61879cf2373c5b418f5c9df4a226f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96593 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Jenkins
2020-06-18new json writer for LOKNoel Grandin4-0/+312
we shave about 3 memory copies off in the process, and make the class play nicely with our string types. Change-Id: I1f614fb35b1de499ac99e3b33ac638ad81054bed Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96393 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-06-01tools: extend test for UnitConversionTomaž Vajngerl1-14/+24
Change-Id: I8fbc2a83f40fb04656f690b4b63d3cac9f0410c1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95273 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2020-05-10new loplugin:simplifypointertoboolNoel Grandin1-2/+2
Change-Id: Iff68e8f379614a6ab6a6e0d1bad18e70bc76d76a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91907 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-04-20add tools::Rectangle::JustifyNoel Grandin1-0/+9
so rectangles can be constructed already valid Change-Id: I3ae5e24add3c81f79dcdf863f855dca439876f11 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92521 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-04-17loplugin:buriedassign in tools..xmloffNoel Grandin3-18/+31
Change-Id: I31df6c4fd82c6f6d15bbe5228e92e5171cacba51 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92410 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-03-15Revert "loplugin:constfields in tools"Noel Grandin4-19/+19
This reverts commit 833c4965fc0941ea997852e3d99dcd7688e58c14. Change-Id: I130a91538627f9e83d94615e2ddd48da5a075d4a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90517 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-03-07clang-format toolkit, tools, uui with under 5-percent lines of changeMuhammet Kara1-4/+4
Files which could become clang-format conformant with under 5-percent lines of change relative to the total count of lines in the file are found by using bin/find-clang-format.py, and fixed with /opt/lo/bin/clang-format -i <path-of-the-file> There will be follow-up patches to fix all 'under-5-percent' files. Change-Id: I4952f350f4d22913ea94689b902ffa26c223ff96 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90152 Tested-by: Jenkins Reviewed-by: Muhammet Kara <muhammet.kara@collabora.com>
2020-02-21tdf#75280: Convert inappropriate use of sal_uIntPtr to better integer typesCanberk TURAN1-2/+2
I fixed if-conditons in UnoGraphicExporter.cxx and I deleted extra slash character at start of zcodec.cxx file. Change-Id: I464e7b0dcbfe835d04c5031bfbd6e46bccbb1216 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87470 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2020-02-19use FILE_ATTRIBUTE_TEMPORARY on Windows for temp filesNoel Grandin1-1/+6
which acts as a hint to the OS that these files do not need persistent storage. If there is sufficient system RAM, these files will never even hit disk. Change-Id: I25b83aad67fda58ec39cead8bd1eb038892d3cde Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88124 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-02-16GBUILD_TRACE, support for finding out where the build time is spentLuboš Luňák1-0/+2
See instructions in solenv/gbuild/Trace.mk . This generates a file than can be viewed e.g. in the Chromium tracing view. Change-Id: I5f90647c58ca729375525b6daed2d4918adc8188 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88754 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2020-02-12clang-analyzer-deadcode.DeadStoresNoel Grandin1-2/+2
Change-Id: Ifa384933569b27d0d08eb479bb95b799163ae386 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88450 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-02-03loplugin:unsignedcompare (clang-cl)Stephan Bergmann1-3/+3
Change-Id: I69cc1b352221ca053ccd0c5b78e926480a8c9ccd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87884 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-01-28New loplugin:unsignedcompareStephan Bergmann1-5/+6
"Find explicit casts from signed to unsigned integer in comparison against unsigned integer, where the cast is presumably used to avoid warnings about signed vs. unsigned comparisons, and could thus be replaced with o3tl::make_unsigned for clairty." (compilerplugins/clang/unsignedcompare.cxx) o3tl::make_unsigned requires its argument to be non-negative, and there is a chance that some original code like static_cast<sal_uInt32>(n) >= c used the explicit cast to actually force a (potentially negative) value of sal_Int32 to be interpreted as an unsigned sal_uInt32, rather than using the cast to avoid a false "signed vs. unsigned comparison" warning in a case where n is known to be non-negative. It appears that restricting this plugin to non- equality comparisons (<, >, <=, >=) and excluding equality comparisons (==, !=) is a useful heuristic to avoid such false positives. The only remainging false positive I found was 0288c8ffecff4956a52b9147d441979941e8b87f "Rephrase cast from sal_Int32 to sal_uInt32". But which of course does not mean that there were no further false positivies that I missed. So this commit may accidentally introduce some false hits of the assert in o3tl::make_unsigned. At least, it passed a full (Linux ASan+UBSan --enable-dbgutil) `make check && make screenshot`. It is by design that o3tl::make_unsigned only accepts signed integer parameter types (and is not defined as a nop for unsigned ones), to avoid unnecessary uses which would in general be suspicious. But the STATIC_ARRAY_SELECT macro in include/oox/helper/helper.hxx is used with both signed and unsigned types, so needs a little oox::detail::make_unsigned helper function for now. (The ultimate fix being to get rid of the macro in the first place.) Change-Id: Ia4adc9f44c70ad1dfd608784cac39ee922c32175 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87556 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-01-22 don't warn about 0/0/0 year, commonly used as a default-value/no-valueNoel Grandin1-1/+3
Change-Id: I2f6dc371f99d6963753ffaf5365a7d69ca866ca8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87190 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-01-17loplugin:redundantcast (size_t vs. std::size_t)Stephan Bergmann1-8/+8
...which happen to be found by 6efffbbfce9c27439f54970f7a569b069ce46eba "Improve loplugin:redundantcast for sal_Int... vs. ::sal_Int..." only on macOS, not on Linux: At least for my Linux builds, size_t is a typedef in my local LLVM installation's lib/clang/11.0.0/include/stddef.h while std::size_t is an unrelated typedef (but to the same type) in /usr/include/c++/9/x86_64-redhat-linux/bits/c++config.h. Change-Id: I98dd605cb7b4ba5fb9bd3902bd9b1ae960a804e7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86994 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-01-08 tdf#96505 Get rid of cargo cult long integer literalsYusuf Keten1-1/+1
Change-Id: Ic0cde7c087d54a80a57d2a2574fa1f3932192367 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86311 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2019-12-28pdf: extract XMP metadata writing and use XmlWriterTomaž Vajngerl1-3/+8
Instead of writing XMP metadata with a string buffer, change to use XmlWriter instead. Extract XMP metadata writing into its own class vcl::pdf::XmpMetadata. This also needs a change to the XmlWriter to not write a classic XML header: '<?xml version="1.0" ... ?>' Change-Id: I95ea0e7ba58e7c43a0c707bf9c676994210ff104 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/85908 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2019-12-23sal_Char->char in toolsNoel Grandin8-81/+81
Change-Id: Id8be02e445ac439439b2f78ba4a7376dd19ce360 Reviewed-on: https://gerrit.libreoffice.org/85744 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-12-18tools: define DbgTestSolarMutex() unconditionallyMiklos Vajna1-4/+0
See the discussion at <https://gerrit.libreoffice.org/#/c/58170/>, and this came up on IRC today again. The above change broke the invariant that you can mix product and debug (but not dbgutil) builds. Restore this, without mandating dbgutil for the solar mutex assert code, which is useful for plain debug builds as well. Change-Id: I1f8bdb114b129fc4f39f186ba917e35e346a16b5 Reviewed-on: https://gerrit.libreoffice.org/85369 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-12-12SvFileStream::Lock/UnlockRange are only called from within SvFileStream itselfStephan Bergmann2-115/+34
...and only for whole-file locking, so simplify the implementations in strmunx.cx and strmwnt.cxx accordingly Change-Id: I973e0ea41f246ad614232b107c8bf152073867be Reviewed-on: https://gerrit.libreoffice.org/85039 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-12-11Fix typosAndrea Gelmini1-1/+1
Change-Id: I89ff5493c70d6e64ee6ab65b1b789a0db543c0aa Reviewed-on: https://gerrit.libreoffice.org/84917 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2019-12-07clang-tidy(WIP): bugprone-signed-char-misuse findings 3Tamás Zolnai1-1/+1
Convert char to unsigned char first in some found use cases. In these cases the chart is converted to an unsigned integer, so characters with negativ values would be converted to wierd values around the maximum value of sal_uInt32. Change-Id: I5570b414ff9c0178222ec40830b490824d8abb07 Reviewed-on: https://gerrit.libreoffice.org/84690 Tested-by: Jenkins Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2019-12-07clang-tidy(WIP): bugprone-signed-char-misuse findings 2Tamás Zolnai1-58/+2
The caughed code is actually unused, so remove it. Change-Id: I82c21cef7e125087f167ccb571a9f8efe1aa548c Reviewed-on: https://gerrit.libreoffice.org/84689 Tested-by: Jenkins Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2019-12-03remove some useless comment linesNoel Grandin3-4/+0
which merely announce that the next declaration is a class Change-Id: Ifdb1398bcd99816b13e0b3769b46d0562bfbc1dc Reviewed-on: https://gerrit.libreoffice.org/84229 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-11-22Extend loplugin:external to warn about classesStephan Bergmann4-0/+25
...following up on 314f15bff08b76bf96acf99141776ef64d2f1355 "Extend loplugin:external to warn about enums". Cases where free functions were moved into an unnamed namespace along with a class, to not break ADL, are in: filter/source/svg/svgexport.cxx sc/source/filter/excel/xelink.cxx sc/source/filter/excel/xilink.cxx svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx All other free functions mentioning moved classes appear to be harmless and not give rise to (silent, even) ADL breakage. (One remaining TODO in compilerplugins/clang/external.cxx is that derived classes are not covered by computeAffectedTypes, even though they could also be affected by ADL-breakage--- but don't seem to be in any acutal case across the code base.) For friend declarations using elaborate type specifiers, like class C1 {}; class C2 { friend class C1; }; * If C2 (but not C1) is moved into an unnamed namespace, the friend declaration must be changed to not use an elaborate type specifier (i.e., "friend C1;"; see C++17 [namespace.memdef]/3: "If the name in a friend declaration is neither qualified nor a template-id and the declaration is a function or an elaborated-type-specifier, the lookup to determine whether the entity has been previously declared shall not consider any scopes outside the innermost enclosing namespace.") * If C1 (but not C2) is moved into an unnamed namespace, the friend declaration must be changed too, see <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71882> "elaborated-type-specifier friend not looked up in unnamed namespace". Apart from that, to keep changes simple and mostly mechanical (which should help avoid regressions), out-of-line definitions of class members have been left in the enclosing (named) namespace. But explicit specializations of class templates had to be moved into the unnamed namespace to appease <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92598> "explicit specialization of template from unnamed namespace using unqualified-id in enclosing namespace". Also, accompanying declarations (of e.g. typedefs or static variables) that could arguably be moved into the unnamed namespace too have been left alone. And in some cases, mention of affected types in blacklists in other loplugins needed to be adapted. And sc/qa/unit/mark_test.cxx uses a hack of including other .cxx, one of which is sc/source/core/data/segmenttree.cxx where e.g. ScFlatUInt16SegmentsImpl is not moved into an unnamed namespace (because it is declared in sc/inc/segmenttree.hxx), but its base ScFlatSegmentsImpl is. GCC warns about such combinations with enabled-by-default -Wsubobject-linkage, but "The compiler doesn’t give this warning for types defined in the main .C file, as those are unlikely to have multiple definitions." (<https://gcc.gnu.org/onlinedocs/gcc-9.2.0/gcc/Warning-Options.html>) The warned-about classes also don't have multiple definitions in the given test, so disable the warning when including the .cxx. Change-Id: Ib694094c0d8168be68f8fe90dfd0acbb66a3f1e4 Reviewed-on: https://gerrit.libreoffice.org/83239 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-11-21tdf#128862: fix HSQLDB odb-files with apostrophe crashJulien Nabet1-0/+2
see bt: 0 0x00007ffff209866a in std::type_info::name() const (this=0x0) at /usr/include/c++/9/typeinfo:100 1 0x00007ffff20966e1 in exceptionToStringImpl(rtl::OStringBuffer&, com::sun::star::uno::Any const&) (sMessage="DBG_UNHANDLED_EXCEPTION in bool connectivity::hsqldb::OHsqlConnection::impl_isTextTable_nothrow(const rtl::OUString&) exception: com.sun.star.sdbc.SQLException message: Unexpected token: S in statemen"..., caught= uno::Any("com.sun.star.sdbc.SQLException": {<com::sun::star::uno::Exception> = {Message = "Unexpected token: S in statement [s]", Context = uno::Reference to (com::sun::star::uno::XInterface *) 0x555559269238}, SQLState = "37000", ErrorCode = -11, NextException = uno::Any(void)})) at /home/julien/lo/libreoffice/tools/source/debug/debug.cxx:113 2 0x00007ffff209855d in DbgUnhandledException(com::sun::star::uno::Any const&, char const*, char const*, char const*, char const*) (caught= uno::Any("com.sun.star.sdbc.SQLException": {<com::sun::star::uno::Exception> = {Message = "Unexpected token: S in statement [s]", Context = uno::Reference to (com::sun::star::uno::XInterface *) 0x555559269238}, SQLState = "37000", ErrorCode = -11, NextException = uno::Any(void)}), currentFunction=0x7fffdb5ca340 "bool connectivity::hsqldb::OHsqlConnection::impl_isTextTable_nothrow(const rtl::OUString&)", fileAndLineNo=0x7fffdb5ca2e8 "/home/julien/lo/libreoffice/connectivity/source/drivers/hsqldb/HConnection.cxx:301: ", area=0x7fffdb5c9f49 "connectivity.hsqldb", explanatory=0x0) at /home/julien/lo/libreoffice/tools/source/debug/debug.cxx:418 3 0x00007fffdb58a16a in connectivity::hsqldb::OHsqlConnection::impl_isTextTable_nothrow(rtl::OUString const&) (this=0x555558a43de0, _rTableName="William Kidwell's Address Book") at /home/julien/lo/libreoffice/connectivity/source/drivers/hsqldb/HConnection.cxx:301 https://bugs.documentfoundation.org/attachment.cgi?id=155952 Change-Id: I2bc744164b1470d8f09bcb126b02e48af180e886 Reviewed-on: https://gerrit.libreoffice.org/83245 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-11-11Don't compile cpuid test with INTRINSICS_CXXFLAGSTomaž Vajngerl2-20/+1
This will compile test with maximal supported instruction set supported by the compiler, but the CPU might not support the instructions sets. As this tests some aspects of runtime CPU detection only we actually don't need to compile it with the INTRINSICS_CXXFLAGS flags. Change-Id: I612785949b42efbd08d1961a746025f66e99aebc Reviewed-on: https://gerrit.libreoffice.org/82422 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2019-11-03size some stringbuffer to prevent re-allocNoel Grandin2-5/+5
I started with 32 and kept doubling the size until the site did not need re-alloc, but clamped it at 512. Change-Id: I55fe36b31cd3d40f86e5729337a927cf920f2af6 Reviewed-on: https://gerrit.libreoffice.org/81960 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-26size some stringbuffer to prevent re-allocNoel Grandin2-4/+6
I started with 32 and kept doubling the size until the site did not need re-alloc, but clamped it at 512 (e.g. in emfio/). Change-Id: Ib7caf35a1b7e42b0e4ed8aa812493449e3eefc8f Reviewed-on: https://gerrit.libreoffice.org/81540 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-23size some stringbuffer to prevent re-allocNoel Grandin1-1/+1
Change-Id: I385587a922c555c320a45dcc6d644315b72510e9 Reviewed-on: https://gerrit.libreoffice.org/81278 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-21-fsanitize=nullptr-with-nonzero-offsetStephan Bergmann1-1/+8
...(new with Clang 10 trunk), as seen during CppunitTest_emfio_wmf: > tools/source/stream/stream.cxx:808:32: runtime error: applying non-zero offset 10 to null pointer > #0 in SvStream::SeekRel(long) at tools/source/stream/stream.cxx:808:32 > #1 in (anonymous namespace)::ImplReadDIBFileHeader(SvStream&, unsigned long&) at vcl/source/gdi/dibtools.cxx:1085:19 > #2 in (anonymous namespace)::ImplReadDIB(Bitmap&, AlphaMask*, SvStream&, bool, bool, bool) at vcl/source/gdi/dibtools.cxx:1656:12 > #3 in ReadDIB(Bitmap&, SvStream&, bool, bool) at vcl/source/gdi/dibtools.cxx:1738:12 > #4 in emfio::EmfReader::ReadEnhWMF() at emfio/source/reader/emfreader.cxx:1507:33 > #5 in emfio::emfreader::XEmfParser::getDecomposition(com::sun::star::uno::Reference<com::sun::star::io::XInputStream> const&, rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at emfio/source/emfuno/xemfparser.cxx:148:72 > #6 in non-virtual thunk to emfio::emfreader::XEmfParser::getDecomposition(com::sun::star::uno::Reference<com::sun::star::io::XInputStream> const&, rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at emfio/source/emfuno/xemfparser.cxx > #7 in VectorGraphicData::ensureSequenceAndRange() at vcl/source/gdi/vectorgraphicdata.cxx:172:137 > #8 in VectorGraphicData::getPrimitive2DSequence() const at vcl/source/gdi/vectorgraphicdata.cxx:279:45 > #9 in ImpGraphic::ImplGetGDIMetaFile() const at vcl/source/gdi/impgraph.cxx:844:110 > #10 in Graphic::GetGDIMetaFile() const at vcl/source/gdi/graph.cxx:365:26 > #11 in ReadWindowMetafile(SvStream&, GDIMetaFile&) at vcl/source/filter/wmf/wmf.cxx:62:25 > #12 in WmfTest::testEmfProblem() at emfio/qa/cppunit/wmf/wmfimporttest.cxx:116:5 An invariant of SvStream appears to be that m_pRWBuf can be null and that m_pBufPos is null iff m_pRWBuf is null. So don't update m_pBufPos here when m_pRWBuf is null. (And assert the assumed invariant.) Change-Id: Iad2eb2723394f5564d43dfa8a3a1a8b8de79158d Reviewed-on: https://gerrit.libreoffice.org/81237 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-10-21size some stringbuffer to prevent re-allocNoel Grandin3-14/+17
found by the simple expidient of putting asserts in the resize routine. Where an explicit const size is used, I started with 32 and kept doubling until that site did not need resizing anymore. Change-Id: I998787edc940d0a3ba23b5ac37131ab9ecd300f4 Reviewed-on: https://gerrit.libreoffice.org/81138 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-18make bin/update_pch.s always include code in trivial #if'sLuboš Luňák1-2/+3
E.g. #ifdef LIBO_INTERNAL_ONLY is always true for code that builds with our PCHs. Change-Id: I3cf311ea3621b909105754cfea2cb0116b8b67f5 Reviewed-on: https://gerrit.libreoffice.org/80961 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2019-10-17Remove some memset callsMike Kaganski1-9/+2
Replace them with default initialization or calloc Change-Id: I747f53c2ced2d0473fd5a5ede4f8520a0633dcc1 Reviewed-on: https://gerrit.libreoffice.org/80805 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-10-16loplugin:bufferadd loosen some constraintsNoel Grandin1-10/+6
and extend O*StringView to have a constructor that takes a pointer and a length Change-Id: I6120e96280f030757e855a6596efdae438b7e1e8 Reviewed-on: https://gerrit.libreoffice.org/80872 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>