summaryrefslogtreecommitdiff
path: root/scripting
AgeCommit message (Collapse)Author
2013-04-26fix memory leak with orphaned controls created on the flyNoel Power
Change-Id: Iabdd7d906bd7f72592c8e4b2d2b1774807e9dbdb
2013-04-19handle various ReturnXXXX types for formsNoel Power
Change-Id: I6d017da640804d95c605739ca70566b34c4c5e5a
2013-02-18Fix typoJulien Nabet
Change-Id: Id5aff315b1d52ac5a869a17b3a654c2d1e670b08 Reviewed-on: https://gerrit.libreoffice.org/2216 Reviewed-by: Andras Timar <atimar@suse.com> Tested-by: Andras Timar <atimar@suse.com>
2013-02-17fdo#60670: Create a new document in case there's noneXisco Fauli
Change-Id: I7e03481beb1d4e60601fd93d787bc7354495e41f
2013-01-16make emailmerge work with python3 and python2 at the same timeCaolán McNamara
squashed single 4-0 backport commit to sync 4-0 mailmerge.py with that of current master to get a mailmerge.py that works with python3 and python2, and successfully a) sends utf-8 plain text b) html c) odt, pdf, doc attachments (cherry picked from commit c25bee9ca3c3015c46c8fcb28654e5bed8a4d912) i118736 - i118787 : fix XMailMessage implementation in mailmerge.py (cherry picked from commit 4166969f3b8ed05e91c10a724ce7bd39074012a1) (cherry picked from commit 3f2f92b753474883b5cd97aff3e00ac55fd23f3f) i118791 - Encode ReadableName in UTF-8 only when necessary (cherry picked from commit a5cefd4007be4789f550ee559aa832ddb04c2dc3) i118814 - Allow set connection timeout in Mail API (cherry picked from commit 8a324a3ba599bee03311e5f6ba6e1c83edc1e343) make emailmerge work for me with python3 (cherry picked from commit e48a060eb80b76c943e7dbd815b63429905a14b6) Change-Id: I6289b522513a2fc86e261c85a04ca9c89fd55b63 Reviewed-on: https://gerrit.libreoffice.org/1713 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2013-01-14fdo#59249: mailmerge.py: adapt to changes in smtplib:Michael Stahl
Apparently the login() method in Python 3.3 expects str arguments for user and password, since it calls encode on them, but for Python 2.6 the "encode" calls were explicitly added in the caller since login() does not encode itself; add an ugly version check for that. Change-Id: Iebfce44073a837e9cb845855ba448d5b6a2ebd11 (cherry picked from commit 1a5b3d8e4d88aa27647cc7b99623dd6f6e706bbc) Reviewed-on: https://gerrit.libreoffice.org/1669 Reviewed-by: Noel Power <noel.power@suse.com> Tested-by: Noel Power <noel.power@suse.com>
2013-01-11fdo#59249: String literal needs a "b" prefix in Pyhton 3Stephan Bergmann
as the corresponding test is otherwise seen to fail, with user being b, but I have no idea if this is the most Python-3-ish approach to fix that, or whether more code needs to be fixed, too. Change-Id: Ia7fbcbca3cf578ffe1bd5ce3c7c5b709cc77317e (cherry picked from commit 7a7e19c166df326c45f76a142b478b0629f784c9) Signed-off-by: Michael Stahl <mstahl@redhat.com>
2012-12-12officehelper.py: fix obvious Python 3 issuesMichael Stahl
Change-Id: I40691cd6b1a0a6777e6469bf242fb41dac423587 (cherry picked from commit 37c6cfde4db921699a1b2660beeb581a9e963630)
2012-12-11mailmerge.py: fix obvious Python 3 issuesMichael Stahl
Change-Id: I796696fbfe1756d625dcabc56c8769bed3d5dbc1 (cherry picked from commit 2462391f4cc2ffad4fb218afe83ce0ed38f45207)
2012-12-10Python: fix deprecated + "== None" instead of "is None"Julien Nabet
Change-Id: Ic19c2ac5817cf5f6359bccda14795ec4f17aad7e Reviewed-on: https://gerrit.libreoffice.org/1275 Reviewed-by: Tomáš Chvátal <tchvatal@suse.cz> Tested-by: Tomáš Chvátal <tchvatal@suse.cz>
2012-11-30c++ API: use css alias in generated headers, adds global css declThorsten Behrens
This changes all generated API headers (.hpp and .hdl) to use a namespace alias 'css' instead of the pointlessly long com::sun::star Makes the change in cppumaker & associated tools, adds a global namespace alias definition in sal/types.h, and removes a kiloton of local, now pointless-to-harmful versions of that alias from all over the code. Change-Id: Ice5a644a6b971a981f01dc0589d48f5add31cc0f
2012-11-30Turn Python Scripting Provider from bundled extension to plain codeStephan Bergmann
To avoid unnecessary confusion between the newly plain code and any instance of the old extension still installed (per-user or shared), I renamed the UNO implementation identifier org.openoffice.pyuno.LanguageScriptProviderForPython to org.libreoffice.pyuno.LanguageScriptProviderForPython. Also, existing installations of the extension are explicitly not migrated to new user profiles. Change-Id: Id3dd66ba5e52e0962f7ad0ccb5e4ad5b0bec97fa
2012-11-28OUString::concat() does not modify in-placeTor Lillqvist
Change-Id: I298f33a23e44146d7ce5fbf72d176020804e03d6
2012-11-28fdo#46808, Adapt reflection::ProxyFactory UNO service to new styleNoel Grandin
The service is deprecated, but we still have a handful of in-tree users, and converting it lets me thread XComponentContext through a bunch of classes. Change-Id: Iffdfe537ada6b9e4a89f9b3c8dd82ca85f4bfaba
2012-11-27fdo#48317 - Support jumping to next/previous changeMuhammad Haggag
Added two new writer commands: NextTrackedChange (FN_REDLINE_NEXT_CHANGE) and PreviousTrackedChange (FN_REDLINE_PREV_CHANGE). Rewrote the logic for Accept/Reject change (FN_REDLINE_ACCEPT_DIRECT and FN_REDLINE_REJECT_DIRECT) to work well with the newly introduced commands. Change-Id: I03d583bef4225409f69934f16db1854564c2db5f Reviewed-on: https://gerrit.libreoffice.org/1156 Reviewed-by: Bosdonnat Cedric <cedric.bosdonnat@free.fr> Tested-by: Bosdonnat Cedric <cedric.bosdonnat@free.fr>
2012-11-26API CHANGE: com.sun.star.lang.IllegalArgumentExceptionMichael Stahl
... derives from com.sun.star.uno.RuntimeException instead of com.sun.star.uno.Exception. Only test that breaks with this change is jurt_uno/AnyConverter_Test, which for mysterious reasons effectively tests that IllegalArgumentException is a subclass of Exception and not RuntimeException. Presumably this is just a generic exception test that happens to use IllegalArgumentException. Some further testing indicates there are no problems expected at runtime: Running "make subsequentcheck" with all Java test code compiled against a ridl.jar that does not contain the change, running against a soffice that uses ridl.jar and rdbs with the change + ridl.jar with the change on the test side yields exactly the same AnyConverter_Test failure, with no other failures. Change-Id: Iad183de76ec7e0d56648084e97cdcc160b5b033d
2012-11-25scripting: Capitalise.py example: fix Python 3 syntax errorsMichael Stahl
Change-Id: I000e32ed1701c657046ae3b7f836012a7fd56fe4
2012-11-25scripting: pythonscript.py: adapt to Python 3Michael Stahl
- "unicode" compatiblity - convert "exec", "print" statements - exception syntax - use "ast" module instead of deprecated "compiler" Change-Id: I2995b79d8854433824fdfafe8314ee5c7a3eacf6
2012-11-22AllSettings with LanguageTagEike Rathke
Change-Id: I710ae66e51139662eb442b681fdf9cc9d158551d
2012-11-16targetted cleanup of misc. vba pieces.Noel Power
2012-11-15fdo#46808, use service constructor for ucb::SimpleFileAccessNoel Grandin
I upgraded the service to return XSimpleFileAccess3, since it already implemented that interface, and it's backwards compatible. Change-Id: I40001a46048bd21a23b6a2f58a95376f06fc634b
2012-11-08scripting: warning C4804 usafe use of type boolMichael Stahl
Change-Id: I2db644a3c18658b07834fe6653b17713fd8201a7
2012-11-03basic: String -> OUString in basicmanagerNorbert Thiebaud
Change-Id: I6607bfe8b6bf4d29ffd01cd88a19af5e53d616b5
2012-10-30squeeze all Exceptions through RuntimeException for exception sigCaolán McNamara
Change-Id: I50377a12c2baadf48767e1d4c265417d3c8ab765
2012-10-26fdo#49517: Revert "fdo#46102: Load Java scripts with class loaders [...]"Stephan Bergmann
This reverts commit dd6c4f4db1d62268d73e09ae52d23f760a967dcc "fdo#46102: Load Java scripts with class loaders that actually find them." That commit broke support for macros embedded in documents (as new java.net.URL("vnd.sun.star.tdoc:...") throws a MalformedURLExcetpion), and it looks like that commit was not necessary after all -- or rather that what it tried to work around must have been some other problem that has been fixed meanwhile. "It is unclear to me how the Java script provider shall ever have found the script jars in the past" indicates that something must have been fishy, and what I failed to notice back then is that createURL creates java.net.URL instances with a UCBStreamHandler that does allow to obtain content from weird-looking URLs. Anyway, with that reverted, all three following scenarios work on both current master (towards LO 3.7) and libreoffice-3-6 (towards LO 3.6.4); I haven't yet come around to test on libreoffice-3-5: 1 Stock macros, "Tools - Macros - Run Macro... - LibreOffice Macros - HelloWorld", running all of the four "helloworld.bsh", "helloworld.js", "HelloWorldPyhton", and "org.libreoffice.example.java_scripts.HelloWorld.printHW". 2 Per-document macros, loading test.odt attached to fdo#49517, then "Tools - Macros - Run Macro... - test.odt - HelloWorld", running "org.libreoffice.example.java_scripts.HelloWorld.printHW". 3 Extension macros, installing ScriptDispatch.oxt attached to fdo#46012 as shared extension, then loading StartScriptDispatch.odt attached to fdo#46012 and pressing the "Start Java via ScriptProvider" button. Change-Id: I31cd16b3720ffeb1058722d4d1fdffb773f8a067
2012-10-24fdo#46808, Adapt awt::Toolkit UNO service to new styleNoel Grandin
Create a merged XToolkit2 interface for this service to implement. Which is backwards-compatible, but does not require creating a new service. Also mark sub-interfaces as non-optional. Change-Id: I278d0288e92be277033013302267cf93f7d70480
2012-10-23gbuild: let ExtensionTarget expect manifest below META-INFMichael Stahl
Change-Id: Ia07d3fd856578ab6976c02f8a0ec96273db19a2c
2012-10-23fdo#46808, use service constructor for beans::IntrospectionNoel Grandin
Change-Id: Ieb49277020d31779979d8eb508391d6f8b97bf94
2012-10-23fdo#46808, use service constructor for uri::UriReferenceFactoryNoel Grandin
Change-Id: I4e72bf5880fa28cb96d93ede7730a63220af7fa6
2012-10-22drop rdbmaker completelyMatúš Kukan
Change-Id: I313afb391562adae4f91c55480a036c228e0b540
2012-10-10Fix "Content is not allowed in prolog" warningCaolán McNamara
One of the javascript examples parcel-descriptor.xml ended up with a c++ comment instead of a xml comment Change-Id: Ie63a30e19de2caae08e9a489b6592e1046037416
2012-10-04sal_Bool->bool in scriptingNoel Grandin
Change-Id: Ibb61dc696c4341a0b58d8fd7c2fdfb4c5b991596
2012-10-03Dead codeStephan Bergmann
Change-Id: Id851bacb21bbe289cebd635853f4d2028aed9f78
2012-10-02Use prefixTor Lillqvist
Change-Id: I0323e3eb9446c4f2b18f84f5ed33909a877163c8
2012-09-29Use comphelper::getComponentContextStephan Bergmann
...and some further clean up. Change-Id: Id294c0f38fe0041646fc86cacbd2e19734c746a9
2012-09-28gbuild: invert handling of standard system libraries:Michael Stahl
Always link in gb_STDLIBS, except when the library explicitly opts out with gb_LinkTarget_disable_standard_system_libs. Change-Id: I489a99114fbfa46d0421a27cf6c7b899dc268a4a
2012-09-28gbuild: replace direct gb_STDLIBS use with ...Michael Stahl
... new gb_LinkTarget_add_standard_system_libs Change-Id: Ib2bc843098db3d8c6822b45a3d21724e67f57d69
2012-09-28gbuild: split uwinapi out of gb_STDLIBSMichael Stahl
Change-Id: I53316e0b9369d806197bccb42cf22d3497af43e7
2012-09-26fdo#51304: Remove the author of some java source filesMarcos Paulo de Souza
This patch remove some '@author' for Java souce files, and removes some commented code founded when removing the '@author'. Change-Id: I7bff1507212e967069f3d18e6c1040f69501694a Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
2012-09-25replace remaining InterlockedCount() with inlined versionNorbert Thiebaud
Change-Id: Ifcfa48fc87f905a91470a5b0fd597b02f220784c Reviewed-on: https://gerrit.libreoffice.org/671 Tested-by: Norbert Thiebaud <nthiebaud@gmail.com> Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
2012-09-14Improvement on previous commit, UCB clean upStephan Bergmann
* As UCB is only ever initialized with "Local"/"Office", remove this configuration vector completely. The "create" ctor creates an instance internally initialized with those "Local"/"Office" keys. Special (test) code can still instantiate an uninitialized one via plain createInstance. And for backwards compatilibity process startup still ensures to create an initialized instance early, in case there is still code out there (in extensions) that later calls plain createInstance and expects to get the already-initialized (single) instance. * XInitialization is an "implementation detail" of the UniversalContentBroker service, do not expose in XUniversalContentBroker. * ucbhelper/configurationkeys.hxx is no longer needed and is removed. * ucbhelper/contentbroker.hxx is an empty wrapper and is removed; however, that requires ucbhelper::Content constructors to take explicit XComponentContext arguments now. * The only remaining code in ucbhelper/source/client/contentbroker.cxx is Android-only InitUCBHelper. Is that relevant still? Change-Id: I3f7bddd0456bffbcd13590c66d9011915c760f28
2012-09-12targetted VBA re-work.Noel Power
2012-09-10Java cleanup, convert ArrayList and Vector to use genericsNoel Grandin
Change-Id: Ic668b46872ee0bfd259ca335aed9d68fb545c3a4
2012-09-10Java cleanup, remove unnecessary importsNoel Grandin
I guess I missed some last time :-) Change-Id: I164a8baa07850f783b8cdf2e7f3eeaac53a3d29b
2012-09-10Java5 update, Convert ArrayList and Vector code to use genericsNoel Grandin
Change-Id: I6cf6fa8e55005ffdc1d173aeee1e374efbb214fd
2012-09-06Java cleanup, remove unnecessary importsNoel Grandin
Change-Id: Iacfcb2e16cb0e3c25a4cd0678a374fe5111284f7
2012-09-05Java cleanup, fix compile errorsNoel Grandin
Change-Id: Ia16a54432291935125d53de9d7cc010917b8373d
2012-09-05Java cleanup, fix compile errorsNoel Grandin
Change-Id: I2620ccf17a24572b4bd6a79f2410c4b746164b9a
2012-09-05Java cleanup, make the package name match the folder nameNoel Grandin
Note that the code doesn't compile after this change, it is still very out of date with respect to changes in the UNO framework Change-Id: I5a001002a3fcf20496bba4367b9f2da4ceba9f88
2012-09-05Java cleanup, fix a couple of compile errorsNoel Grandin
Change-Id: I83a51dc7a68413d9fea16c8cafdb82e665940775