summaryrefslogtreecommitdiff
path: root/vbahelper
AgeCommit message (Collapse)AuthorFilesLines
2019-11-06loplugin:indentation find broken if statementsNoel Grandin1-1/+1
so I don't read the "then" block as being a sequential statements Change-Id: Ib2004acd3518bd4ebd2246f02a26c2c0a8bbab4c Reviewed-on: https://gerrit.libreoffice.org/82069 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-11-03loplugin:stringaddNoel Grandin1-4/+3
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-18make bin/update_pch.s always include code in trivial #if'sLuboš Luňák2-6/+14
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-02new loplugin:stringaddNoel Grandin1-3/+1
look for places where we can replace sequential additions to OUString/OString with one concatentation (i.e. +) expression, which is more efficient Change-Id: I64d91328bf64828d8328b1cad9e90953c0a75663 Reviewed-on: https://gerrit.libreoffice.org/79406 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-09-26loplugin:constmethod in vbahelperNoel Grandin6-8/+8
Change-Id: I40a59224286cb1eaece58f5f52b26f9191171be8 Reviewed-on: https://gerrit.libreoffice.org/79581 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-09-23do not require $(SRCDIR) in every gb_Library_set_precompiled_headerLuboš Luňák2-2/+2
Change-Id: I7b3a22584bb2e4d501f509ffcd80929feed23a4c Reviewed-on: https://gerrit.libreoffice.org/79360 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2019-08-28Typo: HAPICOLOR_WITHE->HAPICOLOR_WHITE (vbahelper)Julien Nabet2-2/+2
Change-Id: I51a43e190345a1e981f9bd524d8b2feaf0eb2521 Reviewed-on: https://gerrit.libreoffice.org/78207 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2019-08-23Fix typoAndrea Gelmini1-1/+1
Change-Id: I94efc4ce7e197fb8dc68840939ed75393983be1c Reviewed-on: https://gerrit.libreoffice.org/77980 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2019-08-22More hacks for quit requests from an OLE Automation clientTor Lillqvist1-0/+4
Actually I am now not so sure whether the TerminationVetoer thing is needed or not. Will have to experiment later with the customer use case what happens if I remove all that. Maybe adding it was a mistake, as misinterpretation of what was going on. Change-Id: I252e1233cae1622099bc3310814132dae58b2aed (cherry picked from commit 9c50273a9f3a15d1ff7ea4880638ca833570e0bd) Reviewed-on: https://gerrit.libreoffice.org/77948 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <tml@collabora.com> Tested-by: Tor Lillqvist <tml@collabora.com>
2019-08-15loplugin:sequenceloop in unoxml..vclNoel Grandin3-3/+3
Change-Id: Ic3c48ec4d86252b62d3dd25bbc198f7d7fb75e90 Reviewed-on: https://gerrit.libreoffice.org/77533 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-08-15Try harder to avoid exceptions screwing stuff up for OLE clientsTor Lillqvist2-4/+30
Change-Id: I5e9ae8669c4f5c561a09f5f21f11a675a40e5929 Reviewed-on: https://gerrit.libreoffice.org/77463 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <tml@collabora.com> Tested-by: Tor Lillqvist <tml@collabora.com>
2019-07-31Improved loplugin:stringconstant (now that GCC 7 supports it): vbahelperStephan Bergmann40-50/+50
Change-Id: I10c543744f22a9f4db4e99c97629bb0e0b7f37db Reviewed-on: https://gerrit.libreoffice.org/76628 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-07-29Fix typosAndrea Gelmini3-4/+4
Change-Id: Iec31617554fae0f6c5a3d795a917ce9096d84405 Reviewed-on: https://gerrit.libreoffice.org/76521 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-07-22tdf#42949 Fix IWYU warnings in include/vbahelperGabor Kelemen3-0/+3
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I31ca76998b4fab5fe383993c89319b3a08d30401 Reviewed-on: https://gerrit.libreoffice.org/75181 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-07-21loplugin:referencecasting in vbahelper..vclNoel Grandin2-2/+2
Change-Id: I2bd9e2c4e8a3d56a7b2168bd2ccff389051e5b4c Reviewed-on: https://gerrit.libreoffice.org/76032 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-06-20Simplify Sequence iterations in vbahelperArkadiy Illarionov10-133/+64
Use range-based loops or replace with comphelper or STL functions Change-Id: I7613057ba7063e04ca39a654f8a15c0354694783 Reviewed-on: https://gerrit.libreoffice.org/74309 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-05-13fix wrong SET/QUERY flags passed to uno::ReferenceNoel Grandin7-26/+26
By creating deleted methods for the wrong calls. Avoids the compiler needing to construct a temporary Change-Id: I3b8c648d6bb22d22827bf74f21ea5a2a17fc0f6a Reviewed-on: https://gerrit.libreoffice.org/72103 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-05-09regenerate PCH headers for the 4 new levelsLuboš Luňák2-131/+32
Plus some build fixes triggered by this. Change-Id: I59b21def706598ceffd45ae5b1f0262ec9c1ad50 Reviewed-on: https://gerrit.libreoffice.org/71581 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2019-05-02Use hasElements to check Sequence emptiness in [v-x]*Arkadiy Illarionov3-5/+5
Similar to clang-tidy readability-container-size-empty Change-Id: I71e7af4ac3043d8d40922e99f8a4798f0993294c Reviewed-on: https://gerrit.libreoffice.org/71603 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-04-28rename animate.hxx to animate/Animation.hxx, more changes followTomaž Vajngerl1-1/+1
This is the first step of refactoring Animation where it is needed to separate AnimationBitmap(s) from the Animation class, which is also responsible for displaying of animation. General idea is to make Graphic work only with AnimationBitmaps, which can be freely be swapped out and in, make copies - all transparantly from the actually displaying them and possibly it will also remove the need to copy the animation objects. Change-Id: If5d55ac1a5b26c3880d4f7602be57742b086f9da Reviewed-on: https://gerrit.libreoffice.org/71406 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2019-04-23Fix typoAndrea Gelmini1-1/+1
Change-Id: I9fa72190a843d1f229deec8dad7f8ef0d5dd5570 Reviewed-on: https://gerrit.libreoffice.org/71081 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-04-15loplugin:sequentialassign in ucb..vbahelperNoel Grandin5-17/+8
Change-Id: I0fff9ee06225d4ff2e9c0611b1b11f1d3b896be2 Reviewed-on: https://gerrit.libreoffice.org/70733 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-04-08tdf#42949 Fix IWYU warnings in include/sfx2/[t-z]*Gabor Kelemen1-0/+2
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>
2019-04-08improve combining in hash functionsNoel Grandin1-3/+6
specifically, use boost::hash_combine to combine values in hash functions, except for a couple of places where I use the small-prime-number strategy popular in the Java world, to avoid including boost in header files that are widely shared. Change-Id: I0e184c9ec8803bf09fc6e84fe20131b203e1652a Reviewed-on: https://gerrit.libreoffice.org/70384 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-04-02Add a few SAL_INFOsTor Lillqvist1-1/+7
Change-Id: Ibdb013f4eeee8a2b2e29e3adb56943b5fccf9772
2019-04-02Implement the FullName property correctly in the Automation caseTor Lillqvist1-0/+10
Return a complete pathname. For or internal Basic, keep the existing semantics, that for some reason returns just the filename. Change-Id: I897cc797ca2158ca7c798f3e8adcdfa57a41ee3b
2019-03-07tdf#123819: Revert "Use comphelper::getProcessComponentContext()"Tor Lillqvist1-3/+2
Even though in theory it was worse to get an exception and return an empty Any for CommandBars, in practice there are not resources to figure out why that change apparently then caused a crash in the customer application. Let's hope that it doesn't actually need the CommandBars object for anything essential. This reverts commit 87b4bd61792b28fe475c71d4484cd219c1e533ae. Change-Id: Id2ec3a7254c5dd5a36ce2d5e930a457b9abd44f1 Reviewed-on: https://gerrit.libreoffice.org/68881 Reviewed-by: Tor Lillqvist <tml@collabora.com> Tested-by: Tor Lillqvist <tml@collabora.com>
2019-03-07tdf#42949 Fix IWYU warnings in include/basic/*Gabor Kelemen2-0/+3
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I9dd7984affc4343f148c66077feaac19176adf51 Reviewed-on: https://gerrit.libreoffice.org/68769 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-03-02Use comphelper::getProcessComponentContext()Tor Lillqvist1-2/+4
The context in the mxContext member does not seem to be usable for what we need it for here. Using what comphelper::getProcessComponentContext() returns works better. Let's hope it has no unintended side-effects. This likely makes the mxContext member unused, but I did not bother removing it yet, to keep this commit minimal. Change-Id: Ic048683b066af7952e2e84b03ea306e7daaba259 Reviewed-on: https://gerrit.libreoffice.org/68592 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <tml@collabora.com>
2019-03-02Use sal_Int32 for the index as it comes in as a LONG at least from VBScriptTor Lillqvist1-1/+1
Change-Id: If39054148f72211eae3c897675708aab58f425b2 Reviewed-on: https://gerrit.libreoffice.org/68593 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <tml@collabora.com>
2019-02-25I did figure it outTor Lillqvist1-6/+0
Change-Id: Iabf2dd2daf9d079e7588a1175a2d1e763ccc1c64
2019-02-22loplugin:unusedfields in vbahelperNoel Grandin1-7/+4
Change-Id: I5b5820f236fa81a08faa8bd4d928ace2cc49cf25 Reviewed-on: https://gerrit.libreoffice.org/68157 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-15Add a FIXME noteTor Lillqvist1-0/+6
Change-Id: Iedda7ca9cff1bda763845e665e0e21656b253793
2019-02-13Pointer is pointlessNoel Grandin4-11/+8
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>
2019-02-11loplugin:indentation in unotools..vbahelperNoel Grandin8-33/+33
Change-Id: I76de5678dd21f207e9e9c2a0c446f2c0b9be974e Reviewed-on: https://gerrit.libreoffice.org/67609 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-08o3tl::make_unique -> std::make_unique in tools..xmloffGabor Kelemen1-2/+1
Since it is now possible to use C++14, it's time to replace the temporary solution with the standard one Change-Id: Ib3201f865d43f372007cdf381c7e244e9cbeae26 Reviewed-on: https://gerrit.libreoffice.org/67474 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-01-11Replace OUStringBuffer::appendCopy with append(std::u16string_view)Stephan Bergmann1-2/+3
...which is more general Change-Id: I94f28f8eda887120cf5f143b4549e0339b60e6a7 Reviewed-on: https://gerrit.libreoffice.org/66155 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-12-10tdf#42949 Fix IWYU warnings in include/vcl/s*Gabor Kelemen1-0/+1
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: Ie87d27dd2c385a63349e0b322fd067ba03d2d152 Reviewed-on: https://gerrit.libreoffice.org/64479 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2018-12-05loplugin:unnecessaryparen include more assignmentsNoel Grandin2-2/+2
Change-Id: I9fb8366634b31230b732dd38a98f800075529714 Reviewed-on: https://gerrit.libreoffice.org/64510 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-29tdf#42949 Fix IWYU warnings in include/vcl/[i-m]*Gabor Kelemen1-0/+1
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: If1b2e04872eb0dd6725802c1709a9085f4cd8c91 Reviewed-on: https://gerrit.libreoffice.org/64141 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2018-11-22improve function-local statics in vbahelperNoel Grandin33-186/+109
Change-Id: Id54660390baa337d8bd54a19924e138c2ccb0bc7 Reviewed-on: https://gerrit.libreoffice.org/63790 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-27tdf#120703 (PVS): V519 The variable is assigned values twice successivelyMike Kaganski1-2/+2
Change-Id: I9265425a215609ef6bf4298ba39c8399f215ce27 Reviewed-on: https://gerrit.libreoffice.org/62406 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-10-24clang-tidy performance-unnecessary-copy-init in test..xmlscriptNoel Grandin1-1/+1
Change-Id: I1ae16467a8e58e8a50f59b7a140e9f8b68bde07e Reviewed-on: https://gerrit.libreoffice.org/62254 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-19clang-tidy readability-misleading-indentationNoel Grandin1-2/+2
Change-Id: I4673fc7c694924b41d048a1918ddb8b0e0af1f79 Reviewed-on: https://gerrit.libreoffice.org/61935 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-15Simplify containers iterations in unotools, unoxml, uui, vbahelperArkadiy Illarionov3-14/+8
Use range-based loop or replace with STL functions. Change-Id: I5a43f6fc62c81453dcef3820bb715f4da76915af Reviewed-on: https://gerrit.libreoffice.org/61762 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-08tdf#42949 Fix IWYU warnings in include/comphelper/[m-z]*Gabor Kelemen1-0/+1
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-10-04pass AbstractGeometryAttributes around by std::unique_ptrNoel Grandin33-70/+85
Change-Id: I6e06c89b5e4b77c8fc5e3e1a6bf7d76d8ebd7810 Reviewed-on: https://gerrit.libreoffice.org/61349 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-09-26loplugin:useuniqueptr in VbaApplicationBase_ImplNoel Grandin1-16/+2
Change-Id: I4ce3cba4a6f5cfec677550a4263bb3e4cc795c49 Reviewed-on: https://gerrit.libreoffice.org/60974 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-09-18loplugin:constfields in vbahelperNoel Grandin10-15/+15
Change-Id: I6121e2b41a5e6116be8027fe5197ce53d8f6797f Reviewed-on: https://gerrit.libreoffice.org/60562 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-09-17New loplugin:externalStephan Bergmann2-4/+4
...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>