summaryrefslogtreecommitdiffstats
path: root/basctl/source/basicide/baside2b.cxx
Commit message (Collapse)AuthorAgeFilesLines
* use tools::Long in accessibility..basctlNoel2020-10-211-23/+23
| | | | | | | Change-Id: I67087c7a281e5bdecbaf227bd3147e7c12828791 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104587 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* loplugin:const* make some params and methods constNoel2020-10-061-1/+1
| | | | | | | Change-Id: Idec482c21c270912f9bcaeb980077c1616f67c8c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104022 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* Turn OUStringLiteral into a consteval'ed, static-refcound rtl_uStringStephan Bergmann2020-09-161-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ...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>
* Change OUStringLiteral from char[] to char16_t[]Stephan Bergmann2020-08-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* move TextWindowPeer to its only userCaolán McNamara2020-08-181-3/+2
| | | | | | | Change-Id: I16cc2f75c3e639915c90edc626829e455bda4383 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100889 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
* tdf#135639: check the return value of GetDim32Mike Kaganski2020-08-111-30/+33
| | | | | | | | | ... to avoid crash accessing non-existing element of pChildItem->vIndices Change-Id: I248a9301abd69883f940051d9d9671298dcc8453 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100540 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
* use std::string_viewNoel Grandin2020-08-081-4/+4
| | | | | | | Change-Id: Iac8367a1ea3ec603b5db8b3dd8bdc7dd7265eb83 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100377 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* move getUIRootDir to AllSettingsCaolán McNamara2020-07-251-1/+1
| | | | | | | Change-Id: I3b7774a043a2c99531e1c76b531df4358699bba7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99440 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
* have just one way to set expander imageCaolán McNamara2020-06-051-3/+3
| | | | | | | Change-Id: Ic07709a864620c6146616c8e0a1417343c0937de Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95590 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
* uitest: add wrapper for macro editorXisco Fauli2020-05-231-0/+9
| | | | | | | Change-Id: I729c5cdbc3ba925a0c08750eba199a400babba1e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94445 Tested-by: Jenkins Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
* Resolves: tdf#114258 defer LoseFocus treeview updateCaolán McNamara2020-05-191-1/+18
| | | | | | | | | | | until the next event cycle in cas the LoseFocus is happening due to an in-progress selection event from a mouse down in the treeview that would be updated Change-Id: Ia4448aa798a8af7cd35bc17215891f6c5ca8678a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94494 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
* use for-range on Sequence in basctl..canvasNoel Grandin2020-05-151-12/+6
| | | | | | | Change-Id: Idad3d8fbe785c7b1b8b287a3227372adb2757de8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94260 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* Make upcasting css::uno::Reference ctor require complete typesStephan Bergmann2020-04-271-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* loplugin:flatten in basctlNoel Grandin2020-04-181-224/+227
| | | | | | | | Change-Id: I66e3f46fcaae4e15d230a5a7c98c1b20cfb4dbda Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92485 Tested-by: Jenkins Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* rename vcl::Window::Update to PaintImmediatelyNoel Grandin2020-04-111-2/+2
| | | | | | | | | To make the code easier to read. Change-Id: Iebc648150391939fba5d1cd815c72dbcf02ceec6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90378 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* weld CodeCompleteWindowCaolán McNamara2020-02-191-111/+108
| | | | | | | Change-Id: Ibe620a42592761ee25d6329d26b1b1c452bdfd2b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89007 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
* merge common code togetherCaolán McNamara2020-02-191-21/+2
| | | | | | | Change-Id: I1c514c1a83dac4556ad68b44972a97fb4b3384e3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88991 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
* remove and replace newly unused ctorCaolán McNamara2020-02-191-2/+2
| | | | | | | Change-Id: I67e0dc6fe419ad0cac04105cb2e89435dd3fc107 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88990 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
* weld WatchWindow panelCaolán McNamara2020-02-191-296/+239
| | | | | | | Change-Id: Idb43d7bd168ce37fce8694946be6c7de7ca5a2c3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88930 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
* weld StackWindow DockingWindowCaolán McNamara2020-02-171-25/+30
| | | | | | | Change-Id: I46626fdbfcaeabed48da9ae14fe5d351c335df55 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88859 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
* tdf#42949 Fix IWYU warnings in basctl/Gabor Kelemen2020-01-221-0/+4
| | | | | | | | | | Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: Id956a2aaffb7ac8787847eedc4860bf9f4b70184 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86943 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
* tdf#129360: don't try to use uninitialized objectsMike Kaganski2020-01-141-15/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | And also don't forget to re-initialize member list of watch item. Another old bug masked by hacks removed in commit 62f3f3d92aa204eaaa063b30d7ade44df501b997. E.g., previously in code Type t1 var1 var2 End Type Type t2 var1 var2 var3 End Type Sub test Dim v1 As t1, v2 As t2, v v = v1 v = v2 End Sub breaking on line 'v = v1', expanding v in Watch, and stepping to next line, didn't update the children count. After the change, this surfaced, and now fixed. Change-Id: Ia47f5363a2fc62042701ff14d084870d1cced392 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86792 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
* tdf#129360: fix old unsigned underflowMike Kaganski2020-01-131-10/+16
| | | | | | | | | | | | | | | | ... discovered thanks to 62f3f3d92aa204eaaa063b30d7ade44df501b997: properties count may be 0, and unconditionally subtracting 3 from that will give a big number. Previously this was masked by a "Very Hot Fix" in SbxArray::GetRef that was dropped in the said commit. This unifies property count correction in the two places that use it: in WatchTreeListBox::RequestingChildren, where it was correct, and in WatchTreeListBox::UpdateWatches, where underflow happened. Change-Id: Ie980bc9571b2555cc2f643e770d824d5e2eb3731 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86700 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
* sal_Char->char in avmedia..basicNoel Grandin2019-12-181-1/+1
| | | | | | | Change-Id: Ied1331d979539ef1183da64c55351b57d24f4a4f Reviewed-on: https://gerrit.libreoffice.org/85371 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* SbxArray: drop 16-bit indicesMike Kaganski2019-12-091-29/+30
| | | | | | | Change-Id: I43b478187636b9bb53fdf7ab938436ae364bd7a7 Reviewed-on: https://gerrit.libreoffice.org/84733 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
* boost::optional: replace uses of get_value_or with value_orStephan Bergmann2019-12-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | ...in preparation for wholesale replacement of boost::optional with o3tl::optional, which will be an alias for either std::optional or boost::optional, and std::optional only has value_or. boost::optional::value_or was added with <https://github.com/boostorg/optional/ commit/3984c9f9a157ef116cea69bc8bb20f433320eb61> "Added function value_or()", which according to git-describe first appeared in tag boost-1.56.0. We appear to have no strict Boost baseline (the closest we get is with > [AC_MSG_ERROR(boost/spirit/include/classic_core.hpp not found. install boost >= 1.36)] in configure.ac), and at least CentOS 7 TDF machine tb76 only has boost-devel-1.53.0-27.el7.x86_64. However, any environment using Xcode < 10 that needs to make o3tl::optional fall back to boost::optional should use --without-system-boost, and external/boost is currently at 1.69.0, so should be safe. ATTENTION: In isolation, this commit will break in any environment that uses Boost older than 1.56.0. It requires the following commit introducing o3tl::optional. (But doing these changes in individual commits was deemed more valuable than supporting a hypothetical future git-bisect against an old Boost.) Change-Id: Ib31affa3eebf0d0029d8620dc6abb7a60f6c7629 Reviewed-on: https://gerrit.libreoffice.org/84127 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
* Extend loplugin:external to warn about classesStephan Bergmann2019-11-221-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ...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>
* loplugin:constmethod in basctlNoel Grandin2019-08-211-1/+1
| | | | | | | Change-Id: Ib4d7a6690aea4e6f009162cd5b6407906deaaa75 Reviewed-on: https://gerrit.libreoffice.org/77925 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* tdf#74702: use OutputDevice::GetBackgroundColor()Chris Sherlock2019-08-081-1/+1
| | | | | | | | | | | | | | | Apply the Liskov substitution principle to OutputDevice::GetBackgroundColor(). This helps in SmTmpDevice::Impl_GetColor() because it no longer needs to know about what type of OutputDevice it is calling to get the background color. This forced a rename of basctl::ModulWindowLayout::GetBackgroundColor() to be GetSyntaxBackgroundColor(), but this is a happy coincidence as it makes the function intent clearer anyway. Change-Id: I11298a63cb01c187f3a8a4a2c9e90eacda6c3e6b Reviewed-on: https://gerrit.libreoffice.org/75521 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
* Use hasElements to check Sequence emptiness in accessibility..canvasArkadiy Illarionov2019-06-111-2/+2
| | | | | | | | | Similar to clang-tidy readability-container-size-empty Change-Id: I24c3f04b4eed3c1cd973166885660f113a26844f Reviewed-on: https://gerrit.libreoffice.org/71805 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* Resolves: tdf#124704 need to state the area the tooltip is forCaolán McNamara2019-04-281-7/+12
| | | | | | | | | | to make it work under gtk3 Change-Id: I4c895181af233a16292ce16b194f0a60994446fb Reviewed-on: https://gerrit.libreoffice.org/71478 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
* tdf#123043 make type character detection unicode-awareTomoyuki Kubota2019-04-231-4/+4
| | | | | | | Change-Id: I98886a7d13a43cc3202d45f96ceb5062f76f0784 Reviewed-on: https://gerrit.libreoffice.org/71013 Tested-by: Jenkins Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
* tdf#42949 Fix IWYU warnings in include/sfx2/[t-z]*Gabor Kelemen2019-04-081-0/+3
| | | | | | | | | | Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: Ib3252828385d1dc8faf48a428b1593199647a679 Reviewed-on: https://gerrit.libreoffice.org/70383 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
* tdf#42949 Fix IWYU warnings in include/sfx2/[a-D]*Gabor Kelemen2019-03-251-0/+1
| | | | | | | | | | Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I444cb71bc3d045072a4b1f9eed279ed7e425a0d4 Reviewed-on: https://gerrit.libreoffice.org/69481 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
* Simplify containers iterations in basctl, basegfx, basic, bridgesArkadiy Illarionov2019-03-161-26/+3
| | | | | | | | | Use range-based loop or replace with STL functions Change-Id: I8594740103bdc2091c2d03d4b92bbe8393f5378c Reviewed-on: https://gerrit.libreoffice.org/69223 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* Pointer is pointlessNoel Grandin2019-02-131-1/+2
| | | | | | | | | since it is just a wrapper around PointerStyle Change-Id: I51f065e0d4ad8bd91f5c84c5819048c720a19267 Reviewed-on: https://gerrit.libreoffice.org/67711 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* tdf#42949 Fix IWYU warnings in include/vcl/[v-x]*Gabor Kelemen2019-01-071-0/+1
| | | | | | | | | | Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I98f49765c6b74808dcbd692e0f375dd2848fcfd4 Reviewed-on: https://gerrit.libreoffice.org/65614 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
* use Image(OUString) instead of Image(Bitmap(OUString))Noel Grandin2018-12-081-2/+2
| | | | | | | | | | | | | | | | | | | | | which benefits LOOL since we can delay creating the image until we know the dpi setting of the display we are going to write to. Achieved by perl -pi -w -e "s/\bImage\s*\(\s*BitmapEx\s*\((\w+)\s*\)\s*\)/Image\(\1\)/g" $( git grep -lw "BitmapEx" ) followed by git grep -nP '\bImage\s*\(\s*BitmapEx\s*\(' followed by commenting out the BitmapEx(OUString) constructor and seeing what needed adjusting. Change-Id: I3224e11937d720fa484b0d659d25673a9e809267 Reviewed-on: https://gerrit.libreoffice.org/64760 Tested-by: Jenkins Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
* loplugin:singlevalfields extend to all static varsNoel Grandin2018-12-071-3/+1
| | | | | | | Change-Id: Ic238bb5291539fd1b7e98cb4afc9b25f37e7d528 Reviewed-on: https://gerrit.libreoffice.org/64710 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* move SvTreeListBox to vclCaolán McNamara2018-11-071-1/+1
| | | | | | | | Change-Id: I04a146d3d8a428ac1678827dc883525c40240a44 Reviewed-on: https://gerrit.libreoffice.org/62787 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
* tdf#120703 PVS: this fix was wrongMike Kaganski2018-11-051-4/+7
| | | | | | | | | | This partially reverts commit 2a3f5d11522cd69f0ce221cde3a63b7e85e94b53 to reimplement the proper index check. Thanks to Svyatoslav Razmyslov. Change-Id: If0928eed8ff137efbb2d7605135375d147e9accf Reviewed-on: https://gerrit.libreoffice.org/62862 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
* tdf#120703 PVS: V547 Expression is always true/falseMike Kaganski2018-11-031-21/+12
| | | | | | | Change-Id: I856345576ff5c10a41509a97ad4539272bd55568 Reviewed-on: https://gerrit.libreoffice.org/62803 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
* loplugin:returnconstantNoel Grandin2018-10-301-5/+3
| | | | | | | Change-Id: I5b859de6ccd908eee4356acbe1f12b441ab36df3 Reviewed-on: https://gerrit.libreoffice.org/62539 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* tdf#42949 Fix IWYU warnings in include/unotools/*Gabor Kelemen2018-10-261-0/+1
| | | | | | | | | | 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>
* clang-tidy performance-unnecessary-copy-initialization inNoel Grandin2018-10-231-2/+1
| | | | | | | | | basctl..basic Change-Id: I4009282869cd8a2f269093564bd4fafccab80ec3 Reviewed-on: https://gerrit.libreoffice.org/62212 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* clang-tidy readability-container-size-emptyNoel Grandin2018-10-191-1/+1
| | | | | | | Change-Id: I1df70b7dff5ebb6048f7fc618789faa15ca5d422 Reviewed-on: https://gerrit.libreoffice.org/61967 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* loplugin:useuniqueptr in SvImpLBoxNoel Grandin2018-09-251-1/+1
| | | | | | | Change-Id: I59aa026217ed250fab68afc4aa0086d4d1300eac Reviewed-on: https://gerrit.libreoffice.org/60627 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* weld BreakPointDialogCaolán McNamara2018-09-201-5/+5
| | | | | | | | Change-Id: Icecef8b0b939c5d87bdf1bb781731df8fc4419b5 Reviewed-on: https://gerrit.libreoffice.org/60756 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
* add operator+=(OUStringBuffer) method to OUStringNoel Grandin2018-08-011-1/+1
| | | | | | | | | | | | | to reduce needless object creation and copying some more And fix what looks like a bug in CSS hex color parsing at line 609 in sw/../parcss1.cxx that has been there since commit 7b0b5cdfeed656b279bc32cd929630d5fc25878b "initial import" Change-Id: Ibad42b23721a56493bd1edcd7165e6104494a5c3 Reviewed-on: https://gerrit.libreoffice.org/58357 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* loplugin:stringloop basctl,chart2,connectivityNoel Grandin2018-07-281-16/+16
| | | | | | | Change-Id: I21353dace60705d55b3d70f1e0bc610d55b84d63 Reviewed-on: https://gerrit.libreoffice.org/58210 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>