summaryrefslogtreecommitdiff
path: root/writerperfect
AgeCommit message (Collapse)Author
2021-02-23loplugin:refcounting check for managing OWeakObject with raw pointerNoel
Change-Id: I7471725f1e658940b5e6993361c327be6ccf0d31 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111064 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-02-18loplugin:referencecasting in writerperfectNoel
Change-Id: I2b8dfca7344caa4b9dd503fc3fca383a6cee8f04 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111077 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-01-16drop unwanted stray yalignCaolán McNamara
Change-Id: Ic397aae6e9a9cd2258b0e65cd66c72c4218c6946 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109415 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-01-15replace stock button labelsCaolán McNamara
Change-Id: I726ba7846322863d9f38314b6c6ccc7f71124a0a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109197 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-01-15tdf#138848 add truncate-multiline to all GtkEntries and GtkSpinButtonsCaolán McNamara
except for extensions/uiconfig/spropctrlr/ui/multiline.ui Change-Id: Ia2eca14332ffd4ac6e277c7529f17eca3ba29c0e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109310 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-01-10fix coverity parse errorsCaolán McNamara
Change-Id: I4884bfb67a061b865e8cf38b2fea6de0cb1bc3d6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109057 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-01-09fix coverity parse errorsCaolán McNamara
Change-Id: I3a1179947704452e3ffec02be59d0f7bf0b75ab0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109017 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-12-29loplugin:stringviewparam: operator +Stephan Bergmann
Change-Id: I044dd21b63d7eb03224675584fa143009c6b6008 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108418 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-12-26New loplugin:stringliteralvarStephan Bergmann
See the comment at the top of compilerplugins/clang/stringliteralvar.cxx for details. (Turned some affected variables in included files into inline variables, to avoid GCC warnings about unused variables.) Change-Id: Ie77219e6adfdaaceaa8b4e590b08971f2f04c83a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108239 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-12-26tdf#124176 Use pragma once in writerperfecthalfhiddencode
Change-Id: I2484df85c3f3d6011f04844ff30de53c287ab36d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108317 Tested-by: Jenkins Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2020-12-23drop deprecated GtkAlignment, move left/top-padding into child margin-start/topCaolán McNamara
for writerperfect Change-Id: Ia401f8e92f1ef16df646c1adc9e6ad05a0f9af0d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108205 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-12-19don't mention VclBuilder in the dialog tests docsCaolán McNamara
Change-Id: Id18a25e3d3310342887757fe417769f4213b8a3c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107981 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-12-19make *String(string_view) constructors explicitNoel Grandin
to make it more obvious when we are constructing heap OUStrings code and potentially inadvertently throwing away performance. And fix a handful of places so revealed. Change-Id: I0cf390f78026f8a670aaab53424cd31510633051 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107923 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-12-11Adapt the remaining OUString functions to std string_viewStephan Bergmann
...for LIBO_INTERNAL_ONLY. These had been missed by 1b43cceaea2084a0489db68cd0113508f34b6643 "Make many OUString functions take std::u16string_view parameters" because they did not match the multi-overload pattern that was addressed there, but they nevertheless benefit from being changed just as well (witness e.g. the various resulting changes from copy() to subView()). This showed a conversion from OStringChar to std::string_view to be missing (while the corresponding conversion form OUStringChar to std::u16string_view was already present). The improvement to loplugin:stringadd became necessary to fix > [CPT] compilerplugins/clang/test/stringadd.cxx > error: 'error' diagnostics expected but not seen: > File ~/lo/core/compilerplugins/clang/test/stringadd.cxx Line 43 (directive at ~/lo/core/compilerplugins/clang/test/stringadd.cxx:42): simplify by merging with the preceding assignment [loplugin:stringadd] > File ~/lo/core/compilerplugins/clang/test/stringadd.cxx Line 61 (directive at ~/lo/core/compilerplugins/clang/test/stringadd.cxx:60): simplify by merging with the preceding assignment [loplugin:stringadd] > 2 errors generated. Change-Id: Ie40de0616a66e60e289c1af0ca60aed6f9ecc279 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107602 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-11-30loplugin:stringviewparam include comparisons with string literalsNoel
Change-Id: I8ba1214500dddaf413c506a4b82f43d63cda804b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106559 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-24loplugin:stringviewparam extend to comparison operatorsNoel
which means that some call sites have to change to use unicode string literals i.e. u"foo" instead of "foo" Change-Id: Ie51c3adf56d343dd1d1710777f9d2a43ee66221c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106125 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-15add <!-- n-columns=1 n-rows=1 --> before every GtkGridCaolán McNamara
for a in `git ls-files '*.ui'`; do sed -i 's/^\( *\)\(<object class="GtkGrid".*\)/\1<!-- n-columns=1 n-rows=1 -->\n\1\2/' $a; done so we get the same behavior in glade as before 3.38 in that the grid preview don't show any unoccupied grid squares replace all existing n-columns=X n-rows=Y lines because they are all wrong, except for cui/uiconfig/ui/additionsfragment.ui sw/uiconfig/swriter/ui/pageheaderpanel.ui sw/uiconfig/swriter/ui/pagefooterpanel.ui which are correct. Change-Id: I401bbe8e098c26e7f57d6a872d3b70fc1ce85a00 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105846 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-11-13Fix (some of) fallouts from tools::Long change to 64 bit on _WIN64Mike Kaganski
Change-Id: I297d43c594c5d8c3378e8b7f29ad798e89e4ebaf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105776 Tested-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-11-11make tools::Long 64-bit on Windows platformNoel Grandin
This is only for the 64-bit windows platform. I don't see the point in messing with the 32-bit platforms, they are (a) become more and more rare (b) unlikely to even have enough available process memory to load extremely large calc spreadsheets The primary problem we are addressing here is bringing Windows-64bit up to same capability as Linux-64bit when it comes to handling very large spreadsheets, which is caused by things like tools::Rectangle using "long", which means that all the work done to make Libreoffice on 64-bit Linux capable of loading large spreadsheets is useless on Windows, where long is 32-bit. The operator<< for tools::Rectangle needs to be inside the tools namespace because of an interaction with the cppunit printing template stuff that I don't understand. SalPoint changed to use sal_Int32, since it needs to be the same definition as the Windows POINT structure. Change-Id: Iab6f1af88847b6c8d46995e8ceda3f82b6722ff7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104913 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-26switching long to a 64-bit type on 64-bit windowsNoel
(*) create a rewriting plugin to do most of the work, heavily based on the fakebool plugin (*) but there are still a number of "long"s in the codebase that will need to be done by hand (*) the plugin needs lots of handholding, due to needing to add #include and update macros Change-Id: I8184d7000ca482c0469514bb73178c3a1123b1e9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104203 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-22set all .ui min require version of gtk to 3.20Caolán McNamara
and update the version mentioned in our min req in the readme.xrm follow up to commit 0c9ccc7dbf6deb4d012e0d1e6eb934e54e0f19bc Author: Caolán McNamara <caolanm@redhat.com> Date: Fri Oct 2 21:21:45 2020 +0100 raise min version of gtk to 3.20.0 Change-Id: Ibae55c97e1ee577f4b7435d124cda6a21005ad0c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104692 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-10-16writerfilter: use the fastparser API when possibleNoel
part of the process of making SvXMLImport fastparser-only Change-Id: I9bb2d337954354be63984892e1fc4a7950ca3628 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104411 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-05lint-ui: validate has_default and can_defaultNoel
check that if a widget has has_default=='True', then it also has can_default=='True' Change-Id: Ie51d9d8fff6d7cc0cc42a09331f59e7ef6d559be Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103834 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins
2020-09-28upload libmwaw 0.3.17David Tardon
Change-Id: I24c6c5a5d93a76a9fcc2213cd48beb8e5a5ca479 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103519 Tested-by: Jenkins Reviewed-by: David Tardon <dtardon@redhat.com>
2020-09-27add import test file for Pocket WordDavid Tardon
Change-Id: Idbd2ddb113f77a6dc3966110757c4037d993bd4a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103515 Tested-by: Jenkins Reviewed-by: David Tardon <dtardon@redhat.com>
2020-09-27restore PocketWord filter, this time backed by libwpsDavid Tardon
Change-Id: If9843ae717f58e683252c8ea55360a567978395e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103514 Tested-by: Jenkins Reviewed-by: David Tardon <dtardon@redhat.com>
2020-09-17writerperfect: include sal/config.h firstMiklos Vajna
To confirm to the convention outlined at <https://gerrit.libreoffice.org/c/core/+/102899/2#message-96d023d6a393bfa29ea537d46f6975e935d649a4>. Change-Id: Ib3f5f872e7635df355ca0d9f12e55fc0b1da2cb0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102964 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2020-09-17writerperfect: make sure "own" header is the first oneMiklos Vajna
So that we have a build-time check that the header is self-contained. Change-Id: Idbaab48c3f4dba03c383c3c152bca47883376396 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102899 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2020-09-16Turn OUStringLiteral into a consteval'ed, static-refcound rtl_uStringStephan Bergmann
...from which an OUString can cheaply be instantiated. This is the OUString equivalent of 4b9e440c51be3e40326bc90c33ae69885bfb51e4 "Turn OStringLiteral into a consteval'ed, static-refcound rtl_String". Most remarks about that commit apply here too (this commit is just substantially bigger and a bit more complicated because there were so much more uses of OUStringLiteral than of OStringLiteral): The one downside is that OUStringLiteral now needs to be a template abstracting over the string length. But any uses for which that is a problem (e.g., as the element type of a container that would no longer be homogeneous, or in the signature of a function that shall not be turned into a template for one reason or another) can be replaced with std::u16string_view, without loss of efficiency compared to the original OUStringLiteral, and without loss of expressivity. The new OUStringLiteral ctor code would probably not be very efficient if it were ever executed at runtime, but it is intended to be only executed at compile time. Where available, C++20 "consteval" is used to statically ensure that. The intended use of the new OUStringLiteral is in all cases where an object that shall itself not be an OUString (e.g., because it shall be a global static variable for which the OUString ctor/dtor would be detrimental at library load/unload) must be converted to an OUString instance in at least one place. Other string literal abstractions could use std::u16string_view (or just plain char16_t const[N]), but interestingly OUStringLiteral might be more efficient than constexpr std::u16string_view even for such cases, as it should not need any relocations at library load time. For now, no existing uses of OUStringLiteral have been changed to some other abstraction (unless technically necessary as discussed above), and no additional places that would benefit from OUStringLiteral have been changed to use it. Global constexpr OUStringLiteral variables defined in an included file would be somewhat suboptimal, as each translation unit that uses them would create its own, unshared instance. The envisioned solution is to turn them into static data members of some class (and there may be a loplugin coming to find and fix affected places). Another approach that has been taken here in a few cases where such variables were only used in one .cxx anyway is to move their definitions from the .hxx into that one .cxx (in turn causing some files to become empty and get removed completely)---which also silenced some GCC -Werror=unused-variable if a variable from a .hxx was not used in some .cxx including it. To keep individual commits reasonably manageable, some consumers of OUStringLiteral in rtl/ustrbuf.hxx and rtl/ustring.hxx are left in a somewhat odd state for now, where they don't take advantage of OUStringLiteral's equivalence to rtl_uString, but just keep extracting its contents and copy it elsewhere. In follow-up commits, those consumers should be changed appropriately, making them treat OUStringLiteral like an rtl_uString or dropping the OUStringLiteral overload in favor of an existing (and cheap to use now) OUString overload, etc. In a similar vein, comparison operators between OUString and std::u16string_view have been added to the existing plethora of comparison operator overloads. It would be nice to eventually consolidate them, esp. with the overloads taking OUStringLiteral and/or char16_t const[N] string literals, but that appears tricky to get right without introducing new ambiguities. Also, a handful of places across the code base use comparisons between OUString and OUStringNumber, which are now ambiguous (converting the OUStringNumber to either OUString or std::u16string_view). For simplicity, those few places have manually been fixed for now by adding explicit conversion to std::u16string_view. Also some compilerplugins code needed to be adapted, and some of the compilerplugins/test cases have become irrelevant (and have been removed), as the tested code would no longer compile in the first place. sal/qa/rtl/strings/test_oustring_concat.cxx documents a workaround for GCC bug <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96878> "Failed class template argument deduction in unevaluated, parenthesized context". That place, as well as uses of OUStringLiteral in extensions/source/abpilot/fieldmappingimpl.cxx and i18npool/source/localedata/localedata.cxx, which have been replaced with OUString::Concat (and which is arguably a better choice, anyway), also caused failures with at least Clang 5.0.2 (but would not have caused failures with at least recent Clang 12 trunk, so appear to be bugs in Clang that have meanwhile been fixed). Change-Id: I34174462a28f2000cfeb2d219ffd533a767920b8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102222 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-09-02Remove some unused includesMiklos Vajna
Change-Id: I90d4e3db3eefa41f8492cfe23c5088ea93134afc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101890 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-08-28Change OUStringLiteral from char[] to char16_t[]Stephan Bergmann
This is a prerequisite for making conversion from OUStringLiteral to OUString more efficient at least for C++20 (by replacing its internals with a constexpr- generated sal_uString-compatible layout with a SAL_STRING_STATIC_FLAG refCount, conditionally for C++20 for now). For a configure-wise bare-bones build on Linux, size reported by `du -bs instdir` grew by 118792 bytes from 1155636636 to 1155755428. In most places just a u"..." string literal prefix had to be added. In some places char const a[] = "..."; variables have been changed to char16_t, and a few places required even further changes to code (which prompted the addition of include/o3tl/string_view.hxx helper function o3tl::equalsIgnoreAsciiCase and the additional OUString::createFromAscii overload). For all uses of macros expanding to string literals, the relevant uses have been rewritten as u"" MACRO instead of changing the macro definitions. It should be possible to change at least some of those macro definitions (and drop the u"" from their call sites) in follow-up commits. Change-Id: Iec4ef1a057d412d22443312d40c6a8a290dc6144 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101483 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-08-11loplugin:flattenNoel Grandin
Change-Id: I6560756eb63856a22b43e3e65a7b7843cd2d5376 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100447 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-07-20compact namespace: writerperfectNoel Grandin
Change-Id: I178bc76636d7fc3f4b11d836555a8ad53725b072 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99013 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-07-10replace usage of blacklist with excludelist for IWYUThorsten Behrens
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: writerperfectStephan Bergmann
Change-Id: I13fcde3b0c847a622be0305c6d2bd21057d3402c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97758 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-06-11tdf#119114 Add writerperfect / epub screenshotOlivier Hallot
Create writerperfect screenshot Change-Id: I59d33d7e60cbe7326f3ebd8fbe57e1a4545c31c9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95008 Tested-by: Jenkins Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
2020-05-27Remove some unused includesMiklos Vajna
Change-Id: Id5a31185faf2a3a13b6ea266e058a7df41d44423 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94890 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-05-12filter,writerperfect: adapt XHTML,EPUB to draw:mime-type in ODF 1.3Michael Stahl
Change-Id: I6391f7b4f0183a0193aaa10f2a41fac416a22c09 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92984 Reviewed-by: Michael Stahl <michael.stahl@cib.de> Tested-by: Jenkins
2020-05-07fix memory leak of xmlDoc objectsNoel Grandin
in unit tests Change-Id: Id16731bbbe2f1b0e3642722d77aba04fc98db4cc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93508 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-01improve loplugin:makesharedNoel Grandin
to find places where we are converting stuff to unique_ptr instead of using std::make_shared. As a bonus, this tends to find places where we are using shared_ptr where we can instead be using unique_ptr avoiding the locking overhead. Change-Id: I1b57bbc4a6c766b48bba8e25a55161800e149f62 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93207 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-04-30no need to use strlen hereNoel Grandin
since librevenge's string class already has the length Change-Id: I194ae49596dacc1205bdfb10d0a6a1833914f884 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93171 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-04-27Make upcasting css::uno::Reference ctor require complete typesStephan Bergmann
The main reason for the "home-grown" UpCast introduced with 904b3d1fceee5827076758ed2a81f80cb73493ca "Up-cast conversion constructor for css::uno::Reference" in 2013 was probably that we could not yet rely on C++11 std::is_base_of back then. A (welcome) side effect was that the derived class could be incomplete. However, specializations of UpCast relying on whether or not T2 is incomplete are obviously an ODR violation if the type is incomplete in some TUs and complete (and derived from T1) in others. And even if UpCast had internal linkage, it would still be brittle that its behavior depends on the completeness of T2 at the point of the template's instantiation, and not necessarily at the point of use. That means we should better base that ctor on std::is_base_of (which we can do now since 39a1edd6fec902ef378acce8af42c4d7fba280d0 "Make css::uno::Reference upcast ctor LIBO_INTERNAL_ONLY"), which causes a compilation error at least on Clang and GCC if the completeness requirements are not met. This change fixes all the cases where types need to be complete now, plus any resulting loplugin:referencecasting warnings ("the source reference is already a subtype of the destination reference"). Change-Id: Ieb9e3552e90adbf2c5a5af933dcb872e20661a2f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92950 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-03-25Remove unused using declarations in oox...xmlsecurityGabor Kelemen
Found by: run-clang-tidy-10 -checks=-*,misc-unused-using-decls Change-Id: I3e95791e223ef01e140a6217e29a9efae428a784 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90876 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-03-16Revert "loplugin:constfields in writerfilter"Noel Grandin
This reverts commit e7c6c05ae5a62e1705ffda97c5405eecd1f62a1e. Change-Id: I9072c4ef9c1a941ac3169e2b53dfd25ae7863770 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90545 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-03-05Remove some unused includesMiklos Vajna
Change-Id: I808b7e3f6b580ee6f1876aa06038b5741d7ff6a2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90001 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-02-11Fix typoAndrea Gelmini
Change-Id: I57990148b75dc00ab7725e6917bc7971f5dde2d0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88445 Tested-by: Jenkins Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-02-11tdf#42949 Fix IWYU warnings in writerperfect/Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: Ia1ac2b3d254487f6b4e85b52eead13635d30a5af Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88416 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-02-07test: move component context from subclasses to BootstrapFixtureMiklos Vajna
To avoid duplication. Change-Id: I0ee7c26d5d55bd868ead04c77e7f4ef2582f90e2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88138 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-01-31clang-tidy modernize-concat-nested-namespaceNoel Grandin
Change-Id: Iab35a8b85b3ba1df791c774f40b037f9420a071a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86708 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-01-28New loplugin:unsignedcompareStephan Bergmann
"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>