summaryrefslogtreecommitdiff
path: root/oovbaapi
AgeCommit message (Collapse)AuthorFilesLines
2018-06-13Add a MailMerge class and object to the Writer VBA APITor Lillqvist4-0/+60
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/55727 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tor Lillqvist <tml@collabora.com>
2018-06-12Add ExistingBookmark() to WordBasicTor Lillqvist1-0/+1
Change-Id: I8f433b1ae5cc23aaa08935e87fca7674064ce881 Reviewed-on: https://gerrit.libreoffice.org/55706 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tor Lillqvist <tml@collabora.com>
2018-06-12Add ooo.vba.word.XWordBasic.WindowName() methodTor Lillqvist1-0/+1
Change-Id: I0ff24c3bc331d55212855d79060eaa6f8f3dc013 Reviewed-on: https://gerrit.libreoffice.org/55705 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tor Lillqvist <tml@collabora.com>
2018-06-12Add ooo.vba.word.XWindow.Caption propertyTor Lillqvist1-0/+1
Change-Id: Ifa94b95d935975a87322afebfe604a4016f5a53f Reviewed-on: https://gerrit.libreoffice.org/55692 Reviewed-by: Tor Lillqvist <tml@collabora.com> Tested-by: Tor Lillqvist <tml@collabora.com>
2018-06-07Add ooo.vba.word.Application.StatusBar property for debug output from clientTor Lillqvist1-0/+10
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/55413 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tor Lillqvist <tml@collabora.com>
2018-05-31Add WordBasic property and its FileOpen "command"Tor Lillqvist3-0/+26
Change-Id: I74aca823bb871040b15f35b92f961dfe48807843 Reviewed-on: https://gerrit.libreoffice.org/55136 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tor Lillqvist <tml@collabora.com>
2018-05-31Implement NewWorkbook and WorkbookOpen Automation callbacks in CalcTor Lillqvist1-0/+1
Change-Id: I1ff31d692100695a706bf128c18c4e3ae8b55ce3
2018-05-31Add Author property to ooo::vba::excel::XWorkbook and implement itTor Lillqvist1-0/+1
Corresponds to the Author attribute of css::document::XDocumentProperties. I.e. the initial creator of the document. Change-Id: I07d3ce9dfb87900948d2bb7af14109b17546fb4c
2018-05-31Can simplify, our IDL compiler is more clever nowadaysTor Lillqvist1-10/+0
Change-Id: Ie62c47a0b60df5b7a7237cce981e850cbbe5aee9
2018-05-31Initial steps to make also Calc usable from Automation clientsTor Lillqvist2-0/+4
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
2018-05-31Add ooo.vba.excel.XApplicationOutgoingTor Lillqvist2-0/+35
Change-Id: I50ba5482742296609187e8b41bd3a2910c44ca4e
2018-05-31Can simplify, our IDL compiler is more clever nowadaysTor Lillqvist1-11/+0
Change-Id: Ia5f8c0fcc8d1eb9f6ec3db82b947a16ed3762d01
2018-05-31Add window geometry attributes, too, to ooo.vba.word.XApplicationTor Lillqvist1-0/+4
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
2018-05-31Add Move() to ooo.vba.word.XApplicationTor Lillqvist1-0/+1
Change-Id: Ib230e730f68a30b82915ed6d7898bf1c02690b70
2018-05-31Add Resize() method to ooo.vba.word.XApplicationTor Lillqvist1-0/+1
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 Lillqvist1-0/+1
It seems to be something 3rd-party VB6 clients expect to be able to get and put. Change-Id: If5079da8ba99fde74b12b9590737d575f6636210
2018-05-31Can simplify, our IDL compiler is more clever nowadaysTor Lillqvist1-8/+3
Change-Id: I785c115ab7bcb7cfddc8e79bd5d31278f0c544dc
2018-05-31Add DocumentOpen and NewDocument to XApplicationOutgoing and emit suchTor Lillqvist1-1/+3
Change-Id: Ia2a0ade0af45f1ba99b0cfa860bd1986edcf272e
2018-05-31Add ooo::vba::word::XDocuments::OpenNoRepairDialog()Tor Lillqvist1-5/+3
Just call Open() with the same parameters. (Most of which are cheerfully ignored.) Change-Id: Ia9b980bf870bac04fab7e23843d29f66d5859037
2018-05-31Add ooo::vba::word::XApplicationOutgoing::DocumentBeforeClose() callbackTor Lillqvist1-0/+1
Change-Id: Iccdb7bc262b8f85caf7efb4407a1f00ff0cfb4a8
2018-05-31Prepare to handle out (and inout) parameters to event callbacksTor Lillqvist2-2/+2
Change-Id: I47054c1df40d1058618b0fbd3fdb82fa93ca8836
2018-05-31Add Document.Close event generationTor Lillqvist1-1/+4
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>
2018-05-31Add ooo.vba.word.XDocumentOutgoingTor Lillqvist3-1/+37
Change-Id: I0243ee3e492d8445ebcc059293dcc4cb3c5c889b Reviewed-on: https://gerrit.libreoffice.org/55105 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tor Lillqvist <tml@collabora.com>
2018-05-30Work in progress related to invoking events in Automation clientsTor Lillqvist9-1/+245
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>
2018-05-30Add a (dummy) ooo::vba::word::XApplication::ShowMe() implementationTor Lillqvist1-0/+1
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>
2018-05-30Add Caption property to ooo::vba::XApplicationBaseTor Lillqvist1-0/+1
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>
2018-05-30Whitespace fixTor Lillqvist1-6/+2
Change-Id: Ife4040b181f0688d67de4a2a36e2d2f810e4fce5
2018-04-12Fix typosAndrea Gelmini1-1/+1
Change-Id: Ie6ce882d5d39cdd24d0647b9fdddabafeee1d25f Reviewed-on: https://gerrit.libreoffice.org/52277 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-02-12Fix typosAndrea Gelmini1-1/+1
Change-Id: I141de4716df406f2cbcbc77e454dbadf0fb8c164 Reviewed-on: https://gerrit.libreoffice.org/49586 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2017-11-13Fix typosAndrea Gelmini1-1/+1
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 Bunth3-0/+84
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 Gelmini1-1/+1
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 Grandin1-1/+1
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 Bunth4-0/+95
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 Bunth1-0/+1
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 Bunth1-0/+1
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 Vajna1-0/+1
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 Vajna1-0/+1
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 Vajna2-0/+13
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 Grandin1-4/+0
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 McNamara1-1/+4
Change-Id: I0585582f485399d1c21492738d26f3ef3dc9af2a
2014-09-02coverity#707382 Uncaught exceptionCaolán McNamara1-2/+5
Change-Id: Idad4fbff404c23b74a83c2d3e745363c52c3d90a
2014-09-02coverity#707409 Uncaught exceptionCaolán McNamara1-1/+6
Change-Id: I0f19cd6411c7008a4698fc81fd2ce9c4108ce8eb
2014-07-14coverity#707036 Uncaught exceptionCaolán McNamara2-2/+2
Change-Id: If4e5fdad7261ba6b92a04e615e28d2b474ad4234
2014-07-10coverity#1224987 Uncaught exceptionCaolán McNamara1-2/+2
and coverity#1224988 Uncaught exception Change-Id: Idba0a2d289f00c8629be59b990a121044a099aa1
2014-07-10coverity#707401 Uncaught exceptionCaolán McNamara1-2/+2
and coverity#707404 Uncaught exception Change-Id: I710963e601121d736ecd55c9dd8f9ec0a17ed815
2014-07-03coverity#707193 Uncaught exceptionCaolán McNamara1-1/+3
Change-Id: Ie3e6bc593365311bfe80972b26d1189acbb6afcb
2014-06-13coverity#707393 Uncaught exceptionCaolán McNamara1-1/+1
Change-Id: I89ea074bacf7884fe8b8471cfd208f643326a7e1
2014-06-13coverity#707016 Uncaught exceptionCaolán McNamara1-1/+1
Change-Id: Ie2299485b8017232b6cfcb855b6f2dbff2c5db6e
2014-05-24coverity#738462 Uncaught exceptionCaolán McNamara1-6/+2
Change-Id: I1450211333d2c04cacc80bc66eb228d5c2e7281d