summaryrefslogtreecommitdiff
path: root/oovbaapi
AgeCommit message (Collapse)Author
2018-09-17oovbaapi: hack Excel / OptionButton compatibility into Button for now.Michael Meeks
Change-Id: I22d2d545a6201cbb89d430c65f66e0fea8794d83 Reviewed-on: https://gerrit.libreoffice.org/60543 Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com>
2018-06-30Add a MailMerge class and object to the Writer VBA APITor Lillqvist
Just a dummy implementation so far. Needed because customer Automation client software seems to access it (through the very obsolete WordBasic API, even). It remains to be seen whether any actual mail merge functionality is needed. Change-Id: I40419da544f61173e4bcf759b887997c7f233b02 Reviewed-on: https://gerrit.libreoffice.org/55731 Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com>
2018-06-30Add ExistingBookmark() to WordBasicTor Lillqvist
Change-Id: I8f433b1ae5cc23aaa08935e87fca7674064ce881 Reviewed-on: https://gerrit.libreoffice.org/55711 Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com>
2018-06-30Add ooo.vba.word.XWordBasic.WindowName() methodTor Lillqvist
Change-Id: I0ff24c3bc331d55212855d79060eaa6f8f3dc013 Reviewed-on: https://gerrit.libreoffice.org/55710 Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com>
2018-06-30Add ooo.vba.word.XWindow.Caption propertyTor Lillqvist
Change-Id: Ifa94b95d935975a87322afebfe604a4016f5a53f Reviewed-on: https://gerrit.libreoffice.org/55709 Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com>
2018-06-08Add WordBasic property and its FileOpen "command"Tor Lillqvist
Change-Id: I74aca823bb871040b15f35b92f961dfe48807843 Reviewed-on: https://gerrit.libreoffice.org/55136 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tor Lillqvist <tml@collabora.com> (cherry picked from commit 56a7ddaadc4a6fd7fc4019813041e93b10c91504) Reviewed-on: https://gerrit.libreoffice.org/55456 Tested-by: Tor Lillqvist <tml@collabora.com>
2018-06-07Add ooo.vba.word.Application.StatusBar property for debug output from clientTor Lillqvist
In many cases you don't want to use a bunch of MessageBox() calls in a VB6 client you are developing against LibreOffice, as that disrupts the working of the client. The developer might not mind, but other people trying it will be bothered by having to click through a stream of message boxes. Also, it is hard to correctly interpret the chronological sequence of LibreOffice's own debug output lines and such MessageBox() windows. WScript.Echo calls from a VBScript client are a bit better as they don't require any click-through, but still there is the problem of correlating with LibreOffice's own debug output. Setting this StatusBar property causes LibreOffice to output a SAL_INFO line with the tag "extensions.olebridge". Thus they are automatically merged with LibreOffice's own output and displayed in correct order. Sure, the intent of some existing 3rd-party client that sets this property would be to actually display a message in the status bar (whatever that corresponds to in LibreOffice), but until some such need is actually encountered, it's enough to just use it for this debug output functionality. After all, this property was not implemented at all earlier, so adding it now with somewhat special semantics is not a regression. (Note that on the Calc side, ooo.vba.excel.XApplication did have a StatusBar property already, and setting that does seem to attempt to display the text in some way. Possibly it should be enhanced to also do the SAL_INFO thing, for consistency? And possibly we should also have the message being displayed in the same fashion on the Writer side?) Change-Id: I5bf1e776d6401adfc43a558a2d919bd675298e1a Reviewed-on: https://gerrit.libreoffice.org/55415 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com>
2018-05-31Implement NewWorkbook and WorkbookOpen Automation callbacks in CalcTor Lillqvist
Change-Id: I1ff31d692100695a706bf128c18c4e3ae8b55ce3
2018-05-31Add Author property to ooo::vba::excel::XWorkbook and implement itTor Lillqvist
Corresponds to the Author attribute of css::document::XDocumentProperties. I.e. the initial creator of the document. Change-Id: I07d3ce9dfb87900948d2bb7af14109b17546fb4c (cherry picked from commit 034e8bfafadf3dfe930447696b7a686345aa6632)
2018-05-31Can simplify, our IDL compiler is more clever nowadaysTor Lillqvist
Change-Id: Ie62c47a0b60df5b7a7237cce981e850cbbe5aee9 (cherry picked from commit b11329eed924483a24f2c05d97c573b9a95b26e8)
2018-05-31Initial steps to make also Calc usable from Automation clientsTor Lillqvist
Largely parallel to what we do for Writer. Yes, there is a fair amount of duplicated code now for the outgoing ("sink") stuff in sw and sc, that should be factored out (to vbahelper, probably). Change-Id: I8df4a81c3b9043e8d6b0b206e3c04660205987c7 (cherry picked from commit b9ef6b66e7a67a448b1a840c47146d8789a92a6d)
2018-05-31Add ooo.vba.excel.XApplicationOutgoingTor Lillqvist
Change-Id: I50ba5482742296609187e8b41bd3a2910c44ca4e (cherry picked from commit a03d44076f74d73398d632cee5358bfc3103dd01)
2018-05-31Can simplify, our IDL compiler is more clever nowadaysTor Lillqvist
Change-Id: Ia5f8c0fcc8d1eb9f6ec3db82b947a16ed3762d01 (cherry picked from commit c4cd61e7efd0c898c7bd304747c595871e97be6f)
2018-05-31Add window geometry attributes, too, to ooo.vba.word.XApplicationTor Lillqvist
Like the other similar attributes and methods added lately, they just forward to the corresponding attributes of the "active window". Whether setting and retrieving such then actually does something useful or not I don't know. My main concern is that Automation and COM clients at least won't complain and abort because of unimplemented APIs. Change-Id: Ia8d22e3137d314268ac6771bb355e9f0686f52dc (cherry picked from commit fe1438c1bee05f81039787c8c533bdecaa56e90b)
2018-05-31Add Move() to ooo.vba.word.XApplicationTor Lillqvist
Change-Id: Ib230e730f68a30b82915ed6d7898bf1c02690b70 (cherry picked from commit 569d5dc085dd093c7a1bc3ff97118ce8d2acb44c)
2018-05-31Add Resize() method to ooo.vba.word.XApplicationTor Lillqvist
Seems to be commonly called by 3rd-party Automation (and VB6) client code. Change-Id: I29ee5e7d95f3da2ffae0fac44151148be6e272ee
2018-05-31Add a WindowState attribute to ooo.vba.word.XApplication, tooTor Lillqvist
It seems to be something 3rd-party VB6 clients expect to be able to get and put. Change-Id: If5079da8ba99fde74b12b9590737d575f6636210 (cherry picked from commit 269c29131f5921ab92acf167ca24e8880cfa8bd4)
2018-05-31Can simplify, our IDL compiler is more clever nowadaysTor Lillqvist
Change-Id: I785c115ab7bcb7cfddc8e79bd5d31278f0c544dc (cherry picked from commit a5a8346cca567b7657fd144c4f0ad7f2113c5dae)
2018-05-31Add DocumentOpen and NewDocument to XApplicationOutgoing and emit suchTor Lillqvist
Change-Id: Ia2a0ade0af45f1ba99b0cfa860bd1986edcf272e (cherry picked from commit 05101334e6d15eb77782dfc36c2065561f7e57e6)
2018-05-31Add ooo::vba::word::XDocuments::OpenNoRepairDialog()Tor Lillqvist
Just call Open() with the same parameters. (Most of which are cheerfully ignored.) Change-Id: Ia9b980bf870bac04fab7e23843d29f66d5859037 (cherry picked from commit fd01684f639fc7d47215ba8dfa334b876e19de12)
2018-05-31Add ooo::vba::word::XApplicationOutgoing::DocumentBeforeClose() callbackTor Lillqvist
Change-Id: Iccdb7bc262b8f85caf7efb4407a1f00ff0cfb4a8 (cherry picked from commit b01c131e5776c104e86da2966d5ac93aa4601d24)
2018-05-31Prepare to handle out (and inout) parameters to event callbacksTor Lillqvist
Change-Id: I47054c1df40d1058618b0fbd3fdb82fa93ca8836 (cherry picked from commit 2ee43cff5cf0e4125e7b2bbb7c763069c6aca95c)
2018-05-31Add Document.Close event generationTor Lillqvist
Use a similar idea as for the Application events. Use the SwDocShell to keep the XSinkCaller. Call the Close event from SwXTextDocument::close(). Change-Id: Ie873238c5a966fc859d45b59f424ae0e9f4fbfc7 Reviewed-on: https://gerrit.libreoffice.org/55110 Reviewed-by: Tor Lillqvist <tml@collabora.com> Tested-by: Tor Lillqvist <tml@collabora.com> (cherry picked from commit 6c8c727ffd97e247f1ea43c1a47a55e6d5f68331)
2018-05-31Add ooo.vba.word.XDocumentOutgoingTor Lillqvist
Change-Id: I0243ee3e492d8445ebcc059293dcc4cb3c5c889b Reviewed-on: https://gerrit.libreoffice.org/55105 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tor Lillqvist <tml@collabora.com> (cherry picked from commit 20e6e0c507119a190adb3454da9eca44d470df1a)
2018-05-31Work in progress related to invoking events in Automation clientsTor Lillqvist
XConnectable interfaces need a second IID, for the interface "itself", not the coclass. (I am sure there is some catchy short term for that, I just can't find it right now.) Allow several simultaneous sinks for a SwVbaApplication. Not sure in what case such would be needed, but you never know about 3rd-party client code, and it's trivial to handle anyway, so why not. Lots of FIXMEs still. There is likely also a lot of leaks. But at least an event handler in a simple VBScript script does get invoked. Note that the changed and added code in extensions/source/ole is totally unaware of what outgoing ("event") interfaces Writer or Calc implements, it is all handled generically through the UNO interfaces I added recently. One particular thing that needs doing is to actually make Writer (and Calc) raise this kind of events when necessary. The current code to invoke events handlers in StarBasic (including StarBasic code running in "VBA" compaibility) is very much tied to having StarBasic running (not surprisingly), which of course is not at all the case when it is an Automation client that is manipulating a Writer or Calc instance and wants events. There is demonstration-only code in SwVbaApplication::Documents() to raise the "Quit" event. (I would have put that in the SwVbaApplication destructor but that doesn't seem to get called.) That should of course go away once we invoke other relevant events in appropriate places. And the "Quit" event needs to be invoked when the application is quitting. The whole callback mechanism with IConnectionPoint etc is still partly a mystery to me. It is entirely possible that even if this now works for a simple VBScript client, it won't work for (for instance) a VB6 client that might exercise the APIs of the COM interfaces we provide in a different way. Add XSinkCaller, for something that perhaps calls one or several XSinks. Change-Id: Ica03344010e374542f4aceff5ec032c78579f937 Reviewed-on: https://gerrit.libreoffice.org/55093 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tor Lillqvist <tml@collabora.com> (cherry picked from commit f7e0297b01f739e17f2f9517bf3d89baaee654ab)
2018-05-31Add a (dummy) ooo::vba::word::XApplication::ShowMe() implementationTor Lillqvist
Some customer VB6 code calls it. It doesn't seem to do anything interesting in Word either, so I don't feel that bad for it not doing anything in Writer. Change-Id: I81162fcdd0caa22b19760f8cb40266f7f571d8ce Reviewed-on: https://gerrit.libreoffice.org/55069 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tor Lillqvist <tml@collabora.com> (cherry picked from commit 4eb739592d0de1cb02a2604c45b60e9453b532b7)
2018-05-31Add Caption property to ooo::vba::XApplicationBaseTor Lillqvist
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-31Whitespace fixTor Lillqvist
Change-Id: Ife4040b181f0688d67de4a2a36e2d2f810e4fce5 (cherry picked from commit 925fe6609f39098ee69d94087f11e593a60476a1)
2017-11-13Fix typosAndrea Gelmini
Change-Id: Ia544298334364ece3b3963a4adc00c5e01189b91 Reviewed-on: https://gerrit.libreoffice.org/44654 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mark Page <aptitude@btconnect.com>
2017-09-08oovbaapi: create XOval and XLine shape typesTamas Bunth
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-08-17Fix typosAndrea Gelmini
Change-Id: Iaa9c0aea3ea1a239e378bd714ba335f91bb1faf3 Reviewed-on: https://gerrit.libreoffice.org/41194 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2017-07-25fix some "deffer" spellingNoel Grandin
Change-Id: I8fa9782242e92d754eaa131d424eb0a26f04a319 Reviewed-on: https://gerrit.libreoffice.org/40394 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-14implement Application.FileDialog attributeTamas Bunth
Documentation: https://msdn.microsoft.com/en-us/vba/excel-vba/articles/application-filedialog-property-excel https://msdn.microsoft.com/VBA/Office-Shared-VBA/articles/filedialog-object-office Using FilePicker and FolderPicker uno services. Change-Id: Ifd3b3fc9c135efb0663d2ef36ecbe2b2fbe6132f Reviewed-on: https://gerrit.libreoffice.org/39806 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Bunth <btomi96@gmail.com>
2017-06-30oovbaapi: add Borders.TintAndShade PropertyTamas Bunth
As documented at: https://msdn.microsoft.com/VBA/Excel-VBA/articles/borders-tintandshade-property-excel A stub for now. Change-Id: Id422f3585ced7df59112f6757aeef0860bb0210e Reviewed-on: https://gerrit.libreoffice.org/39381 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Bunth <btomi96@gmail.com>
2017-06-24oovbaapi: add Application.OperatingSystem propertyTamas Bunth
stub As documented at: https://msdn.microsoft.com/en-us/vba/excel-vba/articles/application-operatingsystem-property-excel Change-Id: I2ccf17c698eb631e7b5ca420752b2268d2142d2a Reviewed-on: https://gerrit.libreoffice.org/39208 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Bunth <btomi96@gmail.com>
2017-06-08oovbaapi: add Interior.PatternTintAndShade Property (Excel)Miklos Vajna
As documented at <https://msdn.microsoft.com/en-us/library/office/ff192986.aspx>. Change-Id: I390c22e75c8cfb41034287848f92578ad67e724f Reviewed-on: https://gerrit.libreoffice.org/38524 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-06-08oovbaapi: add Interior.TintAndShade Property (Excel)Miklos Vajna
As documented at <https://msdn.microsoft.com/en-us/library/office/ff197557.aspx>. Change-Id: I4ffa74293978e4642e043a9cda80a7b4a9b5512c Reviewed-on: https://gerrit.libreoffice.org/38523 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-06-08oovbaapi: add XlThemeColor Enumeration (Excel)Miklos Vajna
As documented at <https://msdn.microsoft.com/en-us/library/office/ff839402.aspx>. And also extend ov::excel::XInterior with a ThemeColor property, as documented at <https://msdn.microsoft.com/en-us/library/office/ff820778.aspx>; implementation is just a stub for now. Change-Id: I05f1490cdc366f5db127d340cab5f51efcafa862 Reviewed-on: https://gerrit.libreoffice.org/38522 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-05-03remove empty commentsNoel Grandin
found with: git ls-files | xargs grep -Pzl '/\*\* (\*|\s| )*\*/' Change-Id: I1f47bcb94d5a7b290a6c622c6941195fbb578597 Reviewed-on: https://gerrit.libreoffice.org/37159 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2014-09-02coverity#707022 Uncaught exceptionCaolán McNamara
Change-Id: I0585582f485399d1c21492738d26f3ef3dc9af2a
2014-09-02coverity#707382 Uncaught exceptionCaolán McNamara
Change-Id: Idad4fbff404c23b74a83c2d3e745363c52c3d90a
2014-09-02coverity#707409 Uncaught exceptionCaolán McNamara
Change-Id: I0f19cd6411c7008a4698fc81fd2ce9c4108ce8eb
2014-07-14coverity#707036 Uncaught exceptionCaolán McNamara
Change-Id: If4e5fdad7261ba6b92a04e615e28d2b474ad4234
2014-07-10coverity#1224987 Uncaught exceptionCaolán McNamara
and coverity#1224988 Uncaught exception Change-Id: Idba0a2d289f00c8629be59b990a121044a099aa1
2014-07-10coverity#707401 Uncaught exceptionCaolán McNamara
and coverity#707404 Uncaught exception Change-Id: I710963e601121d736ecd55c9dd8f9ec0a17ed815
2014-07-03coverity#707193 Uncaught exceptionCaolán McNamara
Change-Id: Ie3e6bc593365311bfe80972b26d1189acbb6afcb
2014-06-13coverity#707393 Uncaught exceptionCaolán McNamara
Change-Id: I89ea074bacf7884fe8b8471cfd208f643326a7e1
2014-06-13coverity#707016 Uncaught exceptionCaolán McNamara
Change-Id: Ie2299485b8017232b6cfcb855b6f2dbff2c5db6e
2014-05-24coverity#738462 Uncaught exceptionCaolán McNamara
Change-Id: I1450211333d2c04cacc80bc66eb228d5c2e7281d
2014-05-16idl: fix some include guardsThomas Arnhold
Change-Id: I6f306ba26d888a617aae89d29fc80acd00bd71d8