summaryrefslogtreecommitdiff
path: root/sw/source/filter/ww8/ww8par5.cxx
AgeCommit message (Collapse)Author
2020-10-20use tools::Long in swNoel
Change-Id: I44be72b3a9b14823ec37a3c799cffb4fb4d6e1de Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104527 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-02SwWW8FltAnchorStack ctor never given a null SwDoc*Caolán McNamara
and similar Change-Id: I046be0e41b79f2fd51ebec0da20fccb17d947732 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103823 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-09-30SwPaM::GetDoc can return a reference insteadCaolán McNamara
and remove discovered redundant null checks Change-Id: Iac8ad7821d9acfcc9550a96402c02ac248f16f2d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103672 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-09-04Make many OUString functions take std::u16string_view parametersStephan Bergmann
...instead of having individual overloads for OUString, OUStringLiteral, and literal char16_t const[N]. (The variants taking OUString are still needed for !LIBO_INTERNAL_ONLY, though. The variants taking ASCII-only literal char const[N] are also left in place.) This nicely reduces the number of needed overloads. std::u16string_view allows to pass as arguments: * OUString * OUStringLiteral * OUStringChar (with the necessary conversion added now) * OUStringNumber * u"..." char16_t string literals * u"..."sv std::u16string_view literals * std::u16string, plain char16_t*, and more A notable exceptions is OUStringConcat, which now needs to be wrapped in OUString(...), see the handful of places that needed to be adapted. One caveat is the treatment of embedded NUL characters, as std::u16string_view(u"x\0y") constructs a view of size 1, while only u"x\0y"sv constructs a view of size 3 (which matches the old behavior of overloads for literal char16_t const[N] via the ConstCharArrayDetector<>::TypeUtf16 machinery). See the new checkEmbeddedNul in sal/qa/rtl/strings/test_oustring_stringliterals.cxx. The functions that have been changed are generally those that: * already take a string of determined length, so that using std::u16string_view, which is always constructed with a determined length, is no pessimization (e.g., there are operator == overloads taking plain pointers, which do not need to determine the string length upfront); * could not benefit from the fact that the passed-in argument is an OUString (e.g., the corresponding operator = overload can reuse the passed-in OUString's rtl_uString pData member); * do not run into overload resolution ambiguity issues, like the comparison operators would do. One inconsistency that showed up is that while the original replaceAll(OUString const &, OUString const &, sal_Int32 fromIndex = 0) overload takes an optional third fromIndex argument, the existing replaceAll overloads taking OUStringLiteral and literal char16_t const[N] arguments did not. Fixing that required a new (LIBO_INTERNAL_ONLY) rtl_uString_newReplaceAllFromIndexUtf16LUtf16L (with test code in sal/qa/rtl/strings/test_strings_replace.cxx). Another issue was posed by test code in sal/qa/rtl/strings/test_oustring_stringliterals.cxx that used the RTL_STRING_UNITTEST-only OUString(Except*CharArrayDetector) ctors to verify that certain function calls should not compile (and would compile under RTL_STRING_UNITTEST by taking those Except*CharArrayDetector converted to OUString as arguments). Those problematic "should fail to compile" tests have been converted into a new CompilerTest_sal_rtl_oustring. Change-Id: Id72e8c4cc338258cadad00ddc6ea5b9da2e1f780 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102020 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-09-03-Werror,-Wcompound-token-split-by-spaceStephan Bergmann
Between <https://github.com/llvm/llvm-project/commit/ 0e00a95b4fad5e72851de012d3a0b2c2d01f8685> "Add new warning for compound punctuation tokens that are split across macro expansions or split by whitespace" and <https://github.com/llvm/llvm-project/commit/ 0da84535b1e328188efbc1bb697dc7276f9e7d27> "Remove -Wcompound-token-split-by-space from -Wall", Clang 12 trunk emitted such "'::' and '*' tokens forming pointer to member type are separated by whitespace" warnings, so just clean those places up for good even if the warning would not hit out of the box with any official Clang release. Change-Id: Ic58c0da4b3dcce428f5aaa54e13d15299394cf9e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101987 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-07-31loplugin:flatten in sw/filter/ww8Noel Grandin
Change-Id: Ia296fc6e6c8f78edf533dedf52996560ae62d143 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99853 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-07-29Remove some unused includesMiklos Vajna
Change-Id: I9af7e2fa0a450ebe396c0f049831a20100dbdc9c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99659 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2020-07-13tdf#134618 sw: WW8 import: don't insert fieldmark for SHAPE fieldMichael Stahl
Follow DomainMapper_Impl::CloseFieldCommand() and just don't waste effort creating a fieldmark that doesn't provide any benefit. This should avoid any fieldmark related problems introduced in e511a0ca5dde6d731bb126bbfe21768867890102..d9030ad6298e2f49ee63489d6158ea6ad23c0111 Change-Id: I6688dcda1e3b41ac648f3d69740f05d34bb46191 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98542 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2020-06-10loplugin:buriedassign in swNoel Grandin
limited this only fixing assignments inside "if" statements, since other things are harder to change Change-Id: If3188a3e3d5fcd94123211c97fee097ece5e2797 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95990 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-06-05Upcoming loplugin:elidestringvar: swStephan Bergmann
Change-Id: I3805d7a0f8f0e93463a2285a1ce52f6a5daba27d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95578 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-05-29loplugin:simplifybool in swNoel Grandin
Change-Id: Ib842d5a768806fc41a66802908acc8679cf7a985 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95107 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-28Make loplugin:simplifypointertobool handle parenthesized expressionsStephan Bergmann
...as discussed as an open TODO in the commit message of fe6cce01c88d045a1fcf09acf049c34c22299b02 "Fix loplugin:simplifypointertobool for libstdc++ std::shared_ptr". The necessary changes across the code base have been done fully automatically with the rewriting plugin on Linux. (All those changes apparently involve uses of macro arguments wrapped in parentheses in the macro body, but always in conditionally-converted-to-bool contexts. In other contexts, such automatic rewriting would add the "bool" to the macro body, which would be wrong in general, but we apparently get away with that sloppy coding for now.) The parenExprs_ stack that fe6cce01c88d045a1fcf09acf049c34c22299b02 had introduced to treat such (then-undetected, it had turned out) parenthesized cases now turns out to not be needed after all. Change-Id: I2021f61c2e2805be7e18b38edf8744d186cac3cb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95010 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-04-30loplugin:makeshared in swNoel Grandin
Change-Id: I58d91e75ef96beaab7ec34df519ae3a376dce976 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93201 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-03-11tdf#39674 Translate German variable namesJohnny_M
Titel -> Title Thema -> Subject In "strings.hrc", translated the defines, but kept the their NC_(...) translation references to prevent a need to update translations. Change-Id: Ie8b4a94376495d5e148bc50dcc9902e805deff0d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90156 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2020-02-03loplugin:constantparamNoel Grandin
Change-Id: If2dee122bf07dc179fd8f6e766442ec1891a5f3d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87845 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-12-23sal_Char->char in swNoel Grandin
Change-Id: I63fb87a8e8eaf9c9da7bf7b8b6f5706222ffcc07 Reviewed-on: https://gerrit.libreoffice.org/85730 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-12-20tdf#42949 Fix IWYU warnings in sw/source/filter/*/*cxxGabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I87263017cb0802c9f5ca21d630bf3701b9c5e73a Reviewed-on: https://gerrit.libreoffice.org/85167 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-12-19tdf#129247 writerfilter,sw: improve handling of CONTROL fieldsMichael Stahl
The "CONTROL Forms.CheckBox.1" field has a shape as its result. Previously this was imported as an unknown generic field by writerfilter and exported as a CONTROL field followed by a SHAPE field; the CONTROL field was discarded by Writer on a subsequent import. Now this is exported as nested fields to WW8, i.e., SHAPE inside the result of CONTROL, which is an improvement. Unfortunately the WW8 import discards the result of the CONTROL field, because its field code is written as ww::eUNKNOWN = 1, not ww::eCONTROL = 87. To fix that, set the ODF_ID_PARAM parameter in writerfilter for these fields, which is checked in MSWordExportBase::OutputTextNode(). This reveals that the field code was set wrongly on the fieldmark too, it should be set as a ODF_CODE_PARAM parameter and not as the type. Furthermore the WW8 import needs to allow nested fields in the eCONTROL field. Change-Id: If79a186ea30c3b4a933ba1d8325111215250b833 Reviewed-on: https://gerrit.libreoffice.org/85418 Reviewed-by: Michael Stahl <michael.stahl@cib.de> Tested-by: Michael Stahl <michael.stahl@cib.de>
2019-12-11convert SectionType to scoped enumNoel Grandin
Change-Id: Ib05b88b05c90b835107128f42c70170660788d00 Reviewed-on: https://gerrit.libreoffice.org/84851 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-11-26sw: WW8 import: fix again asserts on fdo45983-1.doc export to ODTMichael Stahl
The problem is that we now insert 2 dummy characters at the start of a fieldmark instead of 1, so the checks in RedlineStack::MoveAttrs() were off by 1 and we get the same invalid redline containing the start but not the end of a fieldmark. (regression from 7f2e61f884949ab27bcb7e1a02ece9a5cb4354b9) Change-Id: I9752ca4c3a281539e37ddac4fe811e2f9d7374a6 Reviewed-on: https://gerrit.libreoffice.org/83783 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2019-11-26ofz#19065 sw: invalid fieldmarks created in SwWW8ImplReader::End_FieldMichael Stahl
The problem is that the check added in commit 06767a5394f1dfba71c4f0a2a07daa5664bdbd01 "sw: WW8: do not create fieldmark with start in frame and end in body" doesn't work as well as imagined; the CheckNodesRange will only check against mismatching top-level and second-level (in the non-body-text top-levels) sections, whereas in this case the start is in one table cell and the end in the next one. So replace that and move the check into MarkManager::makeMark(), so other things than WW8 import are also checked. Change-Id: I2bf32e7b579d87600b6b6718a3222f37c14aa53d Reviewed-on: https://gerrit.libreoffice.org/83585 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-11-15ofz#18526 sw: WW8 import: don't insert control charactersMichael Stahl
Sanitize string before calling InsertString(). This segfaults since: commit b522fc0646915d4da94df38dd249c88b28f25be7 Date: Tue Sep 24 18:11:45 2019 +0200 sw: maintain fieldmarks in DeleteRange()/DeleteAndJoin()/ReplaceRange() Change-Id: I9ef73d924420686f6838fa21900ec57b4d25c905 Reviewed-on: https://gerrit.libreoffice.org/81949 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-11-03loplugin:stringaddNoel Grandin
tweak the plugin to be more permissive, then validate by hand afterwards Change-Id: I40c5c911fe6ff7e45baaca372abf7dac211d9654 Reviewed-on: https://gerrit.libreoffice.org/81942 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-31sw: WW8 import: filter control characters in GetFieldResult()Michael Stahl
Triggers the assert in SwSubFont::GetTextSize_() on ooo58234-1.doc, which has a field result with ^G cell separators that is converted to SwInputField, which inserts the field result into SwTextNode. Change-Id: Ibdb93390862a11462d62cf744bac912d6009777e Reviewed-on: https://gerrit.libreoffice.org/81788 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2019-10-23sw: WW8 import: be a little more flexible with FORMTEXT fieldsMichael Stahl
The subsequent export change will somehow create things like (rr) p pF->nLCode $1 = 13 (rr) p rStr $2 = " FORMTEXT \001\062\060" ... so be a little less strict with the 0x01. Change-Id: Ie99002d099a3803989b71ae8c26b7f4bfe61c943 Reviewed-on: https://gerrit.libreoffice.org/81083 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2019-10-23sw: WW8: fix the separator positionMichael Stahl
WW8 inserts the fieldmark at the end of the result, so separator should be at the start; writerfilter inserts fieldmark at the end of command so separator should be at the end. Change-Id: I44c9811139a34f529c553dd2fd46fdaccd554732 Reviewed-on: https://gerrit.libreoffice.org/80674 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2019-10-17Rename OUStringLiteral1 to OUStringCharStephan Bergmann
It started out as a wrapper around character literals, but has by now become a wrapper around arbitrary single characters. Besides updating the documentation, this change is a mechanical for i in $(git grep -Fl OUStringLiteral1); do sed -i -e s/OUStringLiteral1/OUStringChar/g "$i"; done Change-Id: I1b9eaa4b3fbc9025ce4a4bffea3db1c16188b76f Reviewed-on: https://gerrit.libreoffice.org/80892 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-10-11sw: WW8: fix crashtesting asserts on fdo45983-1.doc export to ODTMichael Stahl
The problem is that a redline is created that contains the CH_TXT_ATR_FIELDSTART but not the corresponding CH_TXT_ATR_FIELDEND: (rr) p aRegion $39 = SwPaM = { point = SwPosition (node 443, offset 185), mark = SwPosition (node 442, offset 0) } (rr) p aRegion.GetText() $40 = "\aDie Studierendenvertiefen ihre Fertigkeit bei einfachen Handverletzungen, einen Befund zu stellen, Therapieziele zu formulieren, einen ergotherapeutischen Behandlungsplan zu erstellen und durchzuführen" This is because commit d195a3e5f4ec5c616ae83f99d48f5d4eefe5f22e only adapted one place in SwWW8ImplReader::End_Field() where a fieldmark is inserted, but there's a second one ... Change-Id: Ib931c6b0d55f42e4f6bc170216f495f1f6e931e1 Reviewed-on: https://gerrit.libreoffice.org/80622 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2019-10-11replace numbers with their enumCaolán McNamara
Change-Id: I9b4abdea7cf762cda001c39953f7d33219ffd382 Reviewed-on: https://gerrit.libreoffice.org/80623 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-10-11simplify "a = a +" to "a +="Noel Grandin
mostly so that my stringadd loplugin can point out places to improve Change-Id: I9920ee1c99cdb6b811ba67ff9d8e32aa261884b5 Reviewed-on: https://gerrit.libreoffice.org/80618 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-10sw: WW8: do not create fieldmark with start in frame and end in bodyMichael Stahl
Actually the start and end must have the same start node; presumably CheckNodesRange(..., true) does that. Change-Id: I04b34b593a4383b565289254bdb756d95c2b7916 Reviewed-on: https://gerrit.libreoffice.org/80594 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2019-09-20convert SwFieldTypesEnum to scoped enumNoel Grandin
clamp it to sal_uInt16 since we convert it that type when passing it via SfxItemSet Change-Id: I4b7bd4ba5e19015af357d5a81a629239451d71e4 Reviewed-on: https://gerrit.libreoffice.org/79289 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-09-06Fixing '....' and '..'Andrea Gelmini
Change-Id: I926069d6c1f2712e5020d930f7ff6c62fd00e912 Reviewed-on: https://gerrit.libreoffice.org/78667 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-08-20loplugin:constvars in swNoel Grandin
Change-Id: Ic1f11240561ba8fffc51710c9a49933c3ab3849d Reviewed-on: https://gerrit.libreoffice.org/77826 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-08-13warn on load when a document binds an event to a macroCaolán McNamara
a) treat shared/Scripts equivalently to document scripts This doesn't automatically warn/block running those scripts when used in a freshly loaded document on its own however because DocumentMacroMode::checkMacrosOnLoading will see at... if ( m_xData->m_rDocumentAccess.documentStorageHasMacros() || hasMacroLibrary() ) that the document contains no macros and flip the allow macros flag to true so that potentially new uses of macros added by the user during the edit are allowed to run b) so, add an additional flag to indicate existence of use of macros in a document c) for odf import, set it when a script:event-listener tag is encountered d) for html import when registerScriptEvents or SwFormatINetFormat::SetMacroTable is called e) for doc import when Read_F_Macro or StoreMacroCmds is called as well for good measure f) for xls import when registerScriptEvent or ScMacroInfo::SetMacro is called g) for oox import when VbaProject::attachMacros is called Change-Id: Ic1203d8ec7dfc217aa217135033ae9db2888e19b Reviewed-on: https://gerrit.libreoffice.org/77131 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-07-09Revert "Fix typo"Julien Nabet
This reverts commit af61870279db31da2a278c953feab9162794b543. Change-Id: I86a37a3d521c35cae818104029bcfc341721baed Reviewed-on: https://gerrit.libreoffice.org/75293 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2019-07-09Fix typoAndrea Gelmini
Change-Id: I8d5cc10c7b405a56456ad58a854e5dcdc7ee7bd6 Reviewed-on: https://gerrit.libreoffice.org/75259 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-06-20tdf#42949 Fix IWYU warnings in sw/source/filter/*/*hxxGabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I7ccd6af737c21a50fe7df25266198ee6989c4c69 Reviewed-on: https://gerrit.libreoffice.org/74110 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-04-14loplugin:sequentialassign in swNoel Grandin
Change-Id: Iec56b41dba502e438dfdc7a99385545b3efdf8c7 Reviewed-on: https://gerrit.libreoffice.org/70720 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-22ofz#13250 Direct-leakCaolán McNamara
Change-Id: Idf5984399f2d8bdf4751667e01f170bed15a4443 Reviewed-on: https://gerrit.libreoffice.org/68205 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-02-10loplugin:indentation in swNoel Grandin
Change-Id: I4936284bff568b6bb47e5df3821f4ddd78260e92 Reviewed-on: https://gerrit.libreoffice.org/67568 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-01-15use unique_ptr in swNoel Grandin
Change-Id: I02026ffd808fa4939666c791c476cd0c0632cde3 Reviewed-on: https://gerrit.libreoffice.org/66319 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-08Remove obsolete SAL_FALLTHROUGH completelyStephan Bergmann
...after 7ffdd830d5fb52f2ca25aa80277d22ea6d89970b "HAVE_CPP_ATTRIBUTE_FALLTHROUGH is always true now" Change-Id: I54e5ff4e036a6bb3e5774d1c0524158aae18e937 Reviewed-on: https://gerrit.libreoffice.org/64800 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-11-16loplugin:buriedassign in swNoel Grandin
Change-Id: If2adf22a0ac3e030fca1b4ecd0173cac58f0f21e Reviewed-on: https://gerrit.libreoffice.org/63470 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-15sw_redlinehide_3: add second result to SwGetExpField, SwSetExpFieldMichael Stahl
This is quite tricky & somewhat ugly due to the SwValueField base class & we need to duplicate its member too :( It would be possible to filter the deleted fields in SwDocUpdateField::MakeFieldList(), but the problem with that is that the instance is long-lived & might be used with different layout settings, so it's probably better to filter in the 5 or so client functions that iterate over the GetSortList(). Note that this will also filter other fields including database fields, hopefully that shouldn't cause problems. Change-Id: I0cdbc7757fa529598b5dbceec0bd2c4a619be05a
2018-11-03Simplify containers iterations in sw/source/filterArkadiy Illarionov
Use range-based loop or replace with STL functions. Change-Id: Ifffb7ba08b3a9950ee076558ec4048b0788a38c8 Reviewed-on: https://gerrit.libreoffice.org/62806 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-26tdf#42949 Fix IWYU warnings in include/unotools/*Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I444c43b9d549977039f25bec2b5bf666c3e15e0e Reviewed-on: https://gerrit.libreoffice.org/62041 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-10-08tdf#42949 Fix IWYU warnings in include/comphelper/[m-z]*Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I04c5ba277d5b3398c07de6ae66713d977636088d Reviewed-on: https://gerrit.libreoffice.org/61347 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-09-28Fix DI_TITEL -> DI_TITLEAndrea Gelmini
It passed "make check" on Linux. Change-Id: I3239622286c07914f88727ffdbb0be8d2ca724ea Reviewed-on: https://gerrit.libreoffice.org/61084 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-09-17New loplugin:externalStephan Bergmann
...warning about (for now only) functions and variables with external linkage that likely don't need it. The problems with moving entities into unnamed namespacs and breaking ADL (as alluded to in comments in compilerplugins/clang/external.cxx) are illustrated by the fact that while struct S1 { int f() { return 0; } }; int f(S1 s) { return s.f(); } namespace N { struct S2: S1 { int f() { return 1; } }; int f(S2 s) { return s.f(); } } int main() { return f(N::S2()); } returns 1, both moving just the struct S2 into an nunnamed namespace, struct S1 { int f() { return 0; } }; int f(S1 s) { return s.f(); } namespace N { namespace { struct S2: S1 { int f() { return 1; } }; } int f(S2 s) { return s.f(); } } int main() { return f(N::S2()); } as well as moving just the function f overload into an unnamed namespace, struct S1 { int f() { return 0; } }; int f(S1 s) { return s.f(); } namespace N { struct S2: S1 { int f() { return 1; } }; namespace { int f(S2 s) { return s.f(); } } } int main() { return f(N::S2()); } would each change the program to return 0 instead. Change-Id: I4d09f7ac5e8f9bcd6e6bde4712608444b642265c Reviewed-on: https://gerrit.libreoffice.org/60539 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>