summaryrefslogtreecommitdiff
path: root/include/vbahelper
AgeCommit message (Collapse)AuthorFilesLines
2018-05-31Add Caption property to ooo::vba::XApplicationBaseTor Lillqvist1-0/+2
Implementation is just a dummy, though. At first I thought that it would work to get the XModel of the "current" document (as returned by getCurrentDocument()), and then get the XFrame of that, and then use the XFrame's getName() and setName(). But, it seems that getCurrentDocument() and what it calls is tightly coupled to StarBasic, and it doesn't do anything sane in the case of Automation clients. Change-Id: I74ded5114ecce06e72862f69d0c06d963e55fd75 Reviewed-on: https://gerrit.libreoffice.org/55064 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tor Lillqvist <tml@collabora.com> (cherry picked from commit 857a33404626f8df04882478d026969691624cbb)
2018-05-31Remove two unnecessary forward declarationsTor Lillqvist1-5/+0
Change-Id: I5bf56b6216835870b4beefd588f070a127835514 Reviewed-on: https://gerrit.libreoffice.org/55068 Reviewed-by: Tor Lillqvist <tml@collabora.com> Tested-by: Tor Lillqvist <tml@collabora.com> (cherry picked from commit 64980d88fb75b8a34b1fce4ed1d0d64d0f2d5e09)
2018-03-26Bin incorrect comments, this is not "org::openoffice" but "ooo::vba"Tor Lillqvist1-2/+2
Change-Id: I044bb3afa1e134dd851dd30f639b475400f4ceea Reviewed-on: https://gerrit.libreoffice.org/51006 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tor Lillqvist <tml@collabora.com> (cherry picked from commit cf42f0916d1f30d8939de15bff626cabb6836d35)
2017-11-13Fix typosAndrea Gelmini1-3/+3
Change-Id: Ia544298334364ece3b3963a4adc00c5e01189b91 Reviewed-on: https://gerrit.libreoffice.org/44654 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mark Page <aptitude@btconnect.com>
2017-10-23overload std::hash for OUString and OStringNoel Grandin1-1/+1
no need to explicitly specify it anymore Change-Id: I6ad9259cce77201fdd75152533f5151aae83e9ec Reviewed-on: https://gerrit.libreoffice.org/43567 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-05loplugin:finalclasses in unotools..vbahelperNoel Grandin4-4/+0
Change-Id: I9350f9d37eaba99a1d74e103c969a9dcfe795497 Reviewed-on: https://gerrit.libreoffice.org/43160 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-08oovbaapi: create XOval and XLine shape typesTamas Bunth1-0/+2
This is needed in order to make "TypeOf myLine Is Line" or similar expressions return the expected "true" value. The implementation of the basic interpreter of TypeOf uses XTypeProvider to determine the type of an object by getting the last part of the type name. E.g. "ooo:vba::msforms::XLine" is determined as a "Line". That's why I created the XLine and XOval blank classes. TypeOf doc: https://docs.microsoft.com/en-us/dotnet/visual-basic/language-reference/operators/typeof-operator Change-Id: Ia49cc92d672e30d0126f02d61a55a956ac1425f0 Reviewed-on: https://gerrit.libreoffice.org/42083 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Bunth <btomi96@gmail.com>
2017-09-04New loplugin:dyncastvisibilityStephan Bergmann1-2/+2
...to find uses of dynamic_cast where the static (base) type has hidden visibility while the dynamic (derived) one has default visibility, and which may thus fail at least on macOS like happened in d5ed3cd6dbd22bb18542778f1c48f4d5b3ae0f95 "Make WinMtfFontStyle's base class EMFIO_DLLPUBLIC, too". libcxxabi's __dynamic_cast takes static_type and dst_type arguments. Now, if dst_type (the derived type, with default visibility) is taken from .so A (and thus references the version of the base type info hidden in .so A) but the __dynamic_cast call is made from .so B, it passes for static_type the base type information hidden in .so B, and __dynamic_cast will consider the cast to fail. I'm not sure whether hidden intermediary types (in the hierarchy between the dynamic_cast's base and derived types) acutally cause a problem too, but lets flag them with the plugin anyway. The fixes use SAL_DLLPUBLIC_RTTI. For one, there appear to be no other reasons than type visibility to make those classes SAL_DLLPUBLIC. For another, this nicely avoids any actual changes on Windows (where SAL_DLLPUBLIC expands to nothing, and many of the affected classes were explicityl introduced into class hierarchies as "MSVC hacks"). Change-Id: Ia85a9635cebffb1009a9efc1484b8bd4025585d4 Reviewed-on: https://gerrit.libreoffice.org/41802 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-08-31inline some use-once typedefsNoel Grandin2-9/+5
and remove some dead ones Change-Id: I6946d717d3c15dc5207489ed3d56d985dd953d59 Reviewed-on: https://gerrit.libreoffice.org/41746 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-03loplugin:constparams in sw part1Noel Grandin1-5/+5
Change-Id: Id8d8afe268a82585ec2d3699411073dfb905d6ba Reviewed-on: https://gerrit.libreoffice.org/40734 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-01loplugin:constparams in variousNoel Grandin1-4/+4
Change-Id: Id15f3562f42afa6c679cea3c839172557ead0395 Reviewed-on: https://gerrit.libreoffice.org/40624 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-01loplugin:checkunusedparamsNoel Grandin2-4/+2
the "check for taking address of function" part was generating false+ Change-Id: Iad6203850901229b7b1b2f8938c68ec703cd343f Reviewed-on: https://gerrit.libreoffice.org/40613 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-13use more OUString::operator== in forms..salNoel Grandin2-2/+2
Change-Id: I70d7e50f8c1e019524ccad915f0cca912c5035dc Reviewed-on: https://gerrit.libreoffice.org/39899 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-28Fix typosAndrea Gelmini1-1/+1
Change-Id: I59777c29fe20f112327ce28a1c0b9cdd2f60857c Reviewed-on: https://gerrit.libreoffice.org/39354 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2017-06-21convert ErrCode to strong typedefNoel Grandin1-3/+4
would have preferred to re-use o3tl::strong_int, of which this is a modified copy, but there are lots of convenience accessors which are nice to define on the class. Change-Id: I301b807aaf02fbced3bf75de1e1692cde6c0340a Reviewed-on: https://gerrit.libreoffice.org/38497 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-20cleanup unused css/script/ includesJochen Nitschke4-4/+0
but keep exception includes in headers for now Change-Id: I826828675a2d14b906e57068cbced2e790e12bce Reviewed-on: https://gerrit.libreoffice.org/37846 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-09make loplugin constantparam smarter about string paramsNoel Grandin1-1/+1
Change-Id: Id3df69b38fd35f46735246a6d307a89aa10d4294 Reviewed-on: https://gerrit.libreoffice.org/37426 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-05loplugin:checkunusedparams in toolkit..vbahelperNoel Grandin2-2/+2
the extra argument on the runtimeexception method was only ever passed an "OUString()" Change-Id: I0ea19ae9328760918f1267f27ba103432fff0b47 Reviewed-on: https://gerrit.libreoffice.org/37274 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-25Fix typosAndrea Gelmini1-1/+1
Change-Id: Ia8bd59be341b0731198d48df974b60ecb04e289c Reviewed-on: https://gerrit.libreoffice.org/35635 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-03-03Remove redundant 'inline' keywordStephan Bergmann1-4/+4
...from function definitions occurring within class definitions. Done with a rewriting Clang plugin (to be pushed later). Change-Id: I9c6f2818a57ccdb361548895a7743107cbacdff8 Reviewed-on: https://gerrit.libreoffice.org/34874 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-01-27loplugin: unnecessary destructor vbahelper..vclNoel Grandin6-6/+0
Change-Id: I6b7800d4a456391251168f7923a1ec7a5ca9efc9 Reviewed-on: https://gerrit.libreoffice.org/33577 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-26Remove dynamic exception specificationsStephan Bergmann20-285/+273
...(for now, from LIBO_INTERNAL_CODE only). See the mail thread starting at <https://lists.freedesktop.org/archives/libreoffice/2017-January/076665.html> "Dynamic Exception Specifications" for details. Most changes have been done automatically by the rewriting loplugin:dynexcspec (after enabling the rewriting mode, to be committed shortly). The way it only removes exception specs from declarations if it also sees a definition, it identified some dead declarations-w/o-definitions (that have been removed manually) and some cases where a definition appeared in multiple include files (which have also been cleaned up manually). There's also been cases of macro paramters (that were used to abstract over exception specs) that have become unused now (and been removed). Furthermore, some code needed to be cleaned up manually (avmedia/source/quicktime/ and connectivity/source/drivers/kab/), as I had no configurations available that would actually build that code. Missing @throws documentation has not been applied in such manual clean-up. Change-Id: I3408691256c9b0c12bc5332de976743626e13960 Reviewed-on: https://gerrit.libreoffice.org/33574 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-01-19New loplugin:dynexcspec: Add @throws documentation, vbahelperStephan Bergmann13-15/+102
Change-Id: I44f1c8f7f2ffdbd050ea219c6b89b246fcbd2473
2017-01-07Typo: Acess->AccessJulien Nabet1-1/+1
Found thanks to Buovjaga Change-Id: I73e36f50a1fd393859ba775ab084a488047864a3 Reviewed-on: https://gerrit.libreoffice.org/32810 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2016-11-07loplugin:unnecessaryvirtual in test..vbahelperNoel Grandin1-1/+1
Change-Id: I0e110af6eab798e11f96d0f7d282d59440d91965 Reviewed-on: https://gerrit.libreoffice.org/30649 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-25loplugin:expandablemethods in UnoControls..vbahelperNoel Grandin1-2/+0
Change-Id: I7e607df2a1f6d4eb207ee0d3eb30f41fac44a0c6 Reviewed-on: https://gerrit.libreoffice.org/30262 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-13loplugin:unnecessaryoverrideNoel Grandin1-2/+0
Change-Id: I08c55a3023ec2e8990098eeb60e91cd18556e7ae Reviewed-on: https://gerrit.libreoffice.org/29656 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-09-13loplugin:dllprivateStephan Bergmann1-5/+5
Change-Id: I1fe70a39c50aba8b84c117653185fc37dbbfeab0
2016-09-13loplugin:override: No more need for the "MSVC dtor override" workaroundStephan Bergmann12-12/+12
The issue of 362d4f0cd4e50111edfae9d30c90602c37ed65a2 "Explicitly mark overriding destructors as 'virtual'" appears to no longer be a problem with MSVC 2013. (The little change in the rewriting code of compilerplugins/clang/override.cxx was necessary to prevent an endless loop when adding "override" to OOO_DLLPUBLIC_CHARTTOOLS virtual ~CloseableLifeTimeManager(); in chart2/source/inc/LifeTime.hxx, getting stuck in the leading OOO_DLLPUBLIC_CHARTTOOLS macro. Can't remember what that isAtEndOfImmediateMacroExpansion thing was originally necessary for, anyway.) Change-Id: I534c634504d7216b9bb632c2775c04eaf27e927e
2016-09-01loplugin:countusersofdefaultparamsNoel Grandin1-1/+1
Change-Id: Icfc2fdde493619fefaf6119d366f8f7166b3ff36 Reviewed-on: https://gerrit.libreoffice.org/28547 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-07-27improve passstuffbyref return analysisNoel Grandin2-2/+2
Change-Id: I4258bcc97273d8bb7a8c4879fac02a427f76e18c Reviewed-on: https://gerrit.libreoffice.org/27317 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-07-07loplugin:passstuffbyref also for {css::uno,rtl}::ReferenceStephan Bergmann3-3/+3
Change-Id: I1d02b91f908c744dd3f7664cd453a791da7bd675
2016-06-13tdf#42949: clean up includes in include/vbahelper with iwyuJorenz Paragas21-74/+400
Change-Id: Iaf93ff58229e9362b03b3e810611e969ef8baf38 Reviewed-on: https://gerrit.libreoffice.org/26206 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-05-26loplugin:unusedmethodsNoel Grandin3-26/+0
Change-Id: Ib36bc0e87d00abb638cbfec511cd13b6179eabda Reviewed-on: https://gerrit.libreoffice.org/25431 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-22Avoid reserved identifierStephan Bergmann1-1/+1
Change-Id: Iefea30eb0db96462aee87349968baf4756e1b786
2016-04-20loplugin:salbool: Automatic rewrite of sal_False/TrueStephan Bergmann1-2/+2
Change-Id: I94b3d976bd6d4cd3ce918668a5a921857675b6c9
2016-04-14loplugin:passstuffbyref in vbahelperNoel Grandin1-1/+1
Change-Id: I09e6ea5cbab5b06dd284a096503b19c15b2136ce
2016-04-11clang-tidy performance-unnecessary-value-param in vbahelperNoel Grandin1-2/+2
Change-Id: Ifbe78c4a43b9d77d6ecf481bb1a9aaac6bcd01a6
2016-03-14inline some use-once macrosNoel Grandin1-29/+14
Change-Id: I7ebd8fe70b083a772118a1aab8cdfbf795d6f1e5 Reviewed-on: https://gerrit.libreoffice.org/23235 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-03-11work on sane lifecylce for SfxFilterMarkus Mohrhard1-1/+1
all SfxFilter instances should now be hold inside of a std::shared_ptr. This fixes a number of huge memory leaks in the test framework and removes one huge source of memory issue in sfx2. SfxMedium contains a pointer to the SfxFilter but does not own. Therefore it is required that any SfxFilter belonging to a SfxMedium lives longer. However this seems to work mostly by hoping that all SfxFilter instances are stored in a global array. As we have seen with the tests this is not true (there are also some cases inside of sd that seem to not follow that pattern as well). Change-Id: I12fd04a504cc4efc0a94967abd91c6fe2c6a8ce8 Reviewed-on: https://gerrit.libreoffice.org/23140 Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2016-02-26loplugin:unuseddefaultparam in include/vbahelperNoel Grandin1-3/+3
Change-Id: Idac2134dce40a54cc04f595464357a0f9ca71be0
2016-02-09Remove excess newlinesChris Sherlock3-13/+0
A ridiculously fast way of doing this is: for i in $(pcregrep -l -M -r --include='.*[hc]xx$' \ --exclude-dir=workdir --exclude-dir=instdir '^ {3,}' .) do perl -0777 -i -pe 's/^ {3,}/ /gm' $i done Change-Id: Iebb93eccbee9e4fc5c4380474ba595858a27ac2c Reviewed-on: https://gerrit.libreoffice.org/22224 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2015-12-23loplugin:unusedfields in /includeNoel Grandin1-8/+2
Change-Id: Ia406e727890a365cc89831c96140cad8240f9b61
2015-11-17use unique_ptr for pImpl in vcl,vbahelper,uuiNoel Grandin1-1/+2
Change-Id: Icb7573c24c681a8fc0570d61b6a30dab91378eb8
2015-11-10loplugin:nullptr (automatic rewrite)Stephan Bergmann1-1/+1
Change-Id: I6eb8949e3e14d82b52af9a2ba26d67bf1bd8e1a5
2015-10-27loplugin:unusedmethodsNoel Grandin1-3/+3
Change-Id: I161cd52606c11b6008f5d8b1d8ee391692f91861 Reviewed-on: https://gerrit.libreoffice.org/19231 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-10-23com::sun::star->css in include/ucbhelper to include/xmlscriptNoel Grandin2-3/+3
Change-Id: Iaa7f0b8455a601d3992c08cde0943c709c417256
2015-10-12Replace "SAL_OVERRIDE" with "override" in LIBO_INTERNAL_ONLY codeStephan Bergmann18-245/+245
Change-Id: I2ea407acd763ef2d7dae2d3b8f32525523ac8274
2015-10-06vba: convert to variadic InheritedHelperInterfaceImpl&WeakImpl etcDouglas Mencken15-72/+40
Variadic templates ~-i.e. templates, which can take an arbitrary number of arguments of any type-~ is new C++11 feature note that uno::Reference and cppu::UnoType can only take one parameter thus leave XNamedObjectCollectionHelper non-variadic in vbacollectionimpl.hxx Change-Id: I22e60fa050ee31d39ae8bb7cac06cf243c4587b1 Reviewed-on: https://gerrit.libreoffice.org/19145 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2015-09-29Renamed wrongly prefixed boolean variablesStefan Heinemann1-1/+1
Fixed tdf#94269 Change-Id: I63109cc4e095bad680d7637a065080ea368860ae Reviewed-on: https://gerrit.libreoffice.org/18851 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>