summaryrefslogtreecommitdiff
path: root/scripting/source
AgeCommit message (Collapse)AuthorFilesLines
2018-08-13Fix typosAndrea Gelmini1-1/+1
Change-Id: I47725a9f56528a88cd3db1798eae954eff337560 Reviewed-on: https://gerrit.libreoffice.org/58611 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins
2018-08-04use C++11 exception rethrowingCaolán McNamara1-5/+5
for those cases where we are doing relatively simple catching and rethrowing e.g. catch in one thread and throw in main thread. Change-Id: I6192017c4ec99dd671a9582f7b004096b0fc4525 Reviewed-on: https://gerrit.libreoffice.org/58588 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-07-30Add missing sal/log.hxx headersGabor Kelemen6-0/+6
rtl/string.hxx and rtl/ustring.hxx both unnecessarily #include <sal/log.hxx> (and don't make use of it themselves), but many other files happen to depend on it. This is a continuation of commit 6ff2d84ade299cb3d14d4110e4cf1a4b8070c030 to be able to remove those unneeded includes. This commit adds missing headers to every file found by: grep -FwL sal/log.hxx $(git grep -Elw 'SAL_INFO|SAL_INFO_IF|SAL_WARN|SAL_WARN_IF|SAL_DETAIL_LOG_STREAM|SAL_WHERE|SAL_STREAM|SAL_DEBUG') to directories scripting, sd, sdext Change-Id: I47889cd889cf1d68353184229bfd4712f1528fbf Reviewed-on: https://gerrit.libreoffice.org/58220 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-06-15tdf#96099 Remove some trivial std::vector iterator typedefsArkadiy Illarionov2-18/+16
Change-Id: Iced10ed59c475dff4d33ff06151b2015a27a860b Reviewed-on: https://gerrit.libreoffice.org/55715 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <tml@collabora.com>
2018-06-12simplify calls to *DialogFactory::Create methodsNoel Grandin1-9/+3
we don't need to check for nullptr here, it's never null. Change-Id: I3cc5337a8f4dec6747821679e39ccba3cec20f56 Reviewed-on: https://gerrit.libreoffice.org/55114 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-05-25Improve re-throwing of UNO exceptionsNoel Grandin3-13/+17
(*) if we are already throwing a Wrapped*Exception, get the exception using cppu::getCaughtexception. (*) when catching and then immediately throwing UNO exceptions, use cppu::getCaughtException to prevent exception slicing (*) if we are going to catch an exception and then immediately throw a RuntimeException, rather throw a WrappedTargetRuntimeException and preserve the original exception information. Change-Id: Ia7a501a50ae0e6f4d05186333c8517fdcb17d558 Reviewed-on: https://gerrit.libreoffice.org/54692 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-05-05Fix typosAndrea Gelmini1-2/+2
Change-Id: Id7d66c06e18dbccd5c85ba36143bdb6cee7a5197 Reviewed-on: https://gerrit.libreoffice.org/53564 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-04-27tdf#117202 more pythonic and allow spaces as argumentLaurent Godard1-11/+13
space argument must be encapsulated in double-quotes that will be stripped Change-Id: I0387cc7f3fcb4cc48c5a94afcd481306bb4644e2 Reviewed-on: https://gerrit.libreoffice.org/53453 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2018-04-25tdf#117202 - parse function name to get argumentsLaurent Godard1-4/+30
they are then aggregated to the other and passed to the function Change-Id: I158a747de9c22d50716fc066074a593b4928d6bf Reviewed-on: https://gerrit.libreoffice.org/53424 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2018-04-15remove some unused comphelper includesJochen Nitschke1-2/+0
and fix the fallout Change-Id: I5d0c2040f57a3ac354a7e277592da31d09a5f359 Reviewed-on: https://gerrit.libreoffice.org/52894 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2018-04-03pass area param to DBG_UNHANDLED_EXCEPTIONNoel Grandin4-10/+10
and update sallogareas plugin to enforce this Change-Id: Id0782c8a1f619372e10d931aec3c6a4743a4c86a Reviewed-on: https://gerrit.libreoffice.org/52249 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-28Fix class name in debug messageTor Lillqvist1-1/+1
Change-Id: I171e74a34273ddf969e49260fec487dd8cf2fb12 Reviewed-on: https://gerrit.libreoffice.org/51981 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tor Lillqvist <tml@collabora.com>
2018-03-27Filter out "SynchronMode" tooTor Lillqvist1-4/+6
Change-Id: I2c5111ee34929b9740796f5e1f08b3a8a58218e4 Reviewed-on: https://gerrit.libreoffice.org/51964 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tor Lillqvist <tml@collabora.com>
2018-03-27Bin some dead codeTor Lillqvist1-5/+0
We defined the same function member in the class PythonScriptProvider twice. The first one was some accidental leftover surely. Change-Id: I10eebab7084af790a9263176f01f7817fa5124ff Reviewed-on: https://gerrit.libreoffice.org/51965 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tor Lillqvist <tml@collabora.com>
2018-03-27Add a separator between two words in an exception messageTor Lillqvist1-1/+1
Change-Id: I5c2e01249058e03edfcf036036f9595b87f0a070 Reviewed-on: https://gerrit.libreoffice.org/51963 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tor Lillqvist <tml@collabora.com>
2018-02-22weld native message dialogsCaolán McNamara1-2/+5
just the straight-forward MessageDialog cases first a) remove border_width from message dialog .ui so as to take the default border width b) retain 12 as default message dialog border for vcl widget case c) remove layour_style from message dialog button boxes so as to take the default mode (a no-op for vcl widget case) d) use gtk response ids (vcl builder will converts to vcl ones) Change-Id: I7de281093a1b64f92f71ca11e7cbba42bb658154 Reviewed-on: https://gerrit.libreoffice.org/50143 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-01-30tdf#63388: use SMTP_SSL for port 465Justin Luth1-2/+5
Thanks to Jurassic Pork and prrychr (tdf#99363) for the 2016 patch. I used smtp.gmail.com as my testing server. Port 587 is the "official" port to use for encrypted email. I confirmed that 587 CANNOT use SMTP_SSL [SSL: UNKNOWN_PROTOCOL], so I limited SMTP_SSL use to common TLS port 465 only. Port 465 was temporarily recommended, but OFFICIALLY has long since been abandoned. However, LOTS of documentation and ISPs still recommend it as the port to use. I confirmed that 465 DOES NOT support STARTTLS, so it is specifically excluded. So, technically the button should say use STARTTLS instead of SSL, but only for SMTP. IMAP/POP do use SSL, so terminology gets rather confusing. This patch forces SSL without STARTTLS for port 465 regardless of the "use SSL" setting due to all the confusion. Currently we don't support ANY SSL/TLS connections. With this patch we now at least support the extremely common use case of port 465. Change-Id: I210cc307491157c1121cfffd70cbb94347ee2856 Reviewed-on: https://gerrit.libreoffice.org/48210 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Justin Luth <justin_luth@sil.org>
2018-01-24scripting: add missing vim modelines to python filesMiklos Vajna1-0/+2
Change-Id: Iedc3a8ab37deeb7a686fa709afb0cf350f815ec6 Reviewed-on: https://gerrit.libreoffice.org/48418 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2018-01-12More loplugin:cstylecast: scriptingStephan Bergmann1-3/+3
auto-rewrite with <https://gerrit.libreoffice.org/#/c/47798/> "Enable loplugin:cstylecast for some more cases" plus solenv/clang-format/reformat-formatted-files Change-Id: I52e58aa38c600faf677e932cb3caad07547ccbb7
2018-01-10tdf#96099 Removed some trivial typedefs related to UnOrderedMap and size_t.ekuiitr1-8/+5
Change-Id: I59d3d0b2c1097b5ca96505dc99a4a104b4f8ab48 Reviewed-on: https://gerrit.libreoffice.org/47082 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2018-01-02loplugin:passstuffbyref improved return in sd,variousNoel Grandin2-2/+2
Change-Id: I4b6ea89ae2072f4389a696ea3c96d8f7a5731e7a Reviewed-on: https://gerrit.libreoffice.org/47246 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-11loplugin:salcall fix functionsNoel Grandin10-31/+31
since cdecl is the default calling convention on Windows for such functions, the annotation is redundant. Change-Id: I1a85fa27e5ac65ce0e04a19bde74c90800ffaa2d Reviewed-on: https://gerrit.libreoffice.org/46164 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-05loplugin:salcall fix non-virtual methodsNoel Grandin2-3/+3
first, since those are safer to change than virtual methods Change-Id: Ie3b624019d75ee2b793cee33b3c5f64e994e8bfe Reviewed-on: https://gerrit.libreoffice.org/45798 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-30mailmerge.py: Use strip in server nameXisco Fauli1-2/+2
Using spaces in the dialog might lead to incorrect server name Change-Id: I29a1ffa867d2e415338accf98bb45c7d65b14fa2 Reviewed-on: https://gerrit.libreoffice.org/44052 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
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-11-06loplugin:constparams in various(2)Noel Grandin2-2/+2
Change-Id: I533a7eb724b15e168a28dc92cd5962a39bc96e7c Reviewed-on: https://gerrit.libreoffice.org/44313 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-23loplugin:includeform: scriptingStephan Bergmann6-14/+14
Change-Id: I5b1280426667636703c996af8ee08ffeeffeb7e1
2017-10-23overload std::hash for OUString and OStringNoel Grandin6-16/+8
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-04add << operator for css::uno::ExceptionNoel Grandin4-7/+6
Change-Id: Ia23dafd07133779144965682df3b7125a3214235 Reviewed-on: https://gerrit.libreoffice.org/43046 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Jenkins <ci@libreoffice.org>
2017-09-27loplugin:flatten in variousNoel Grandin1-33/+31
Change-Id: I42dca691ffadbddad38a7e8f978b1da9d5d9a7b0 Reviewed-on: https://gerrit.libreoffice.org/42842 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-22loplugin:flatten in scaddins..sdNoel Grandin3-96/+83
Change-Id: I190323ce910224f883c4370b2c752644a5a35edd Reviewed-on: https://gerrit.libreoffice.org/42626 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-31inline some use-once typedefsNoel Grandin1-4/+1
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-16tdf#39468 Translate German comments/termsJens Carl1-1/+1
Change-Id: I3c8d8ba10de007429b1cdf26f5e8b207f7cc5eea Reviewed-on: https://gerrit.libreoffice.org/41201 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-08-11convert std::map::insert to std::map::emplaceNoel Grandin1-1/+1
which is considerably less verbose Change-Id: Ifa373e8eb09e39bd6c8d3578641610a6055a187b Reviewed-on: https://gerrit.libreoffice.org/40978 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-02remove unnecessary use of 'this->'Noel Grandin1-1/+1
Change-Id: I5c115389af7d24c18ddaf5fbec8c00f35017a5b4 Reviewed-on: https://gerrit.libreoffice.org/40671 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-31loplugin:constparams in extensions,scripting,sdextNoel Grandin5-7/+7
Change-Id: I3d47e144db17358bf6e2e5e3f4ad29de888c01b1 Reviewed-on: https://gerrit.libreoffice.org/40583 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-31loplugin:oncevarNoel Grandin4-29/+16
extend oncevar to any POD type Change-Id: Ia98ee0a67f183e40fb0c38477760124b2c411dc0 Reviewed-on: https://gerrit.libreoffice.org/40564 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-21de-hrc various thingsCaolán McNamara1-1/+0
e.g. helpid[s].hrc -> helpids.h and insert include guards where missing move "ordinary" defines into .hxx files remove .hrc entries that are used as arguments to dialog factory when a dedicated method can be added instead Change-Id: I792fb8eb0adfaa63cf354e6e57401fc943e9196e
2017-07-21migrate to boost::gettextCaolán McNamara1-14/+12
* all .ui files go from <interface> to <interface domain="MODULE"> e.g. vcl * all .src files go away and the english source strings folded into the .hrc as NC_("context", "source string") * ResMgr is dropped in favour of std::locale imbued by boost::locale::generator pointed at matching MODULE .mo files * UIConfig translations are folded into the module .mo, so e.g. UIConfig_cui goes from l10n target to normal one, so the res/lang.zips of UI files go away * translation via Translation::get(hrc-define-key, imbued-std::locale) * python can now be translated with its inbuilt gettext support (we keep the name strings.hrc there to keep finding the .hrc file uniform) so magic numbers can go away there * java and starbasic components can be translated via the pre-existing css.resource.StringResourceWithLocation mechanism * en-US res files go away, their strings are now the .hrc keys in the source code * remaining .res files are replaced by .mo files * in .res/.ui-lang-zip files, the old scheme missing translations of strings results in inserting the english original so something can be found, now the standard fallback of using the english original from the source key is used, so partial translations shrink dramatically in size * extract .hrc strings with hrcex which backs onto xgettext -C --add-comments --keyword=NC_:1c,2 --from-code=UTF-8 --no-wrap * extract .ui strings with uiex which backs onto xgettext --add-comments --no-wrap * qtz for gettext translations is generated at runtime as ascii-ified crc32 of content + "|" + msgid * [API CHANGE] remove deprecated binary .res resouce loader related uno apis com::sun::star::resource::OfficeResourceLoader com::sun::star::resource::XResourceBundleLoader com::sun::star::resource::XResourceBundle when translating strings via uno apis com.sun.star.resource.StringResourceWithLocation can continue to be used Change-Id: Ia2594a2672b7301d9c3421fdf31b6cfe7f3f8d0a
2017-07-14 use more OUString::operator== in scaddins..sdextNoel Grandin2-8/+5
Change-Id: I8bc5c925f940283bc54698bbcba77efcca883273 Reviewed-on: https://gerrit.libreoffice.org/39937 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-13loplugin:oncevar: empty strings: scriptingStephan Bergmann1-2/+1
Change-Id: I5f9df200e0b221670c1646dec011c2647804b9e0
2017-07-11simplify some OUString::concat usageNoel Grandin5-29/+14
Change-Id: Ifa150dc9d694981ffe03c254ea8c3fd820c99795 Reviewed-on: https://gerrit.libreoffice.org/39812 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-11use more range-for on uno::SequenceNoel Grandin1-3/+2
Change-Id: Ifad32425d79be5a22d33d721bdc5fb993f699759 Reviewed-on: https://gerrit.libreoffice.org/39763 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-06use more begin()/end() for SequenceNoel Grandin1-4/+2
Change-Id: I399be6b6ef7a6ce01e883569a177c0969bc29c69
2017-07-05new loplugin unnecessaryparenNoel Grandin1-1/+1
Change-Id: Ic883a07b30069ca6342d7521c8ad890f4326f0ec Reviewed-on: https://gerrit.libreoffice.org/39549 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-04loplugin:casttovoidStephan Bergmann1-3/+1
...cases that were initially missed due to the broken containsProcessingConditionalInclusion() Change-Id: Ib7d801ab5173ee590ef35a9e075d3ce4d4aa06da
2017-07-02loplugin:casttovoid: scriptingStephan Bergmann6-42/+12
Change-Id: I9f77eca5a80ad4e9d3cee8f7400a245f5fa78bbb
2017-06-26loplugin:oncevar in scaddins..sotNoel Grandin3-40/+17
Change-Id: I657a131374b9f1153135e00ed429889518b91427 Reviewed-on: https://gerrit.libreoffice.org/39258 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-21s/ERRCODE_SBX_OK/ERRCODE_NONENoel Grandin1-2/+2
adds no value Change-Id: Iedf7a6a7be28fed4059b576312890be8cbb980d7 Reviewed-on: https://gerrit.libreoffice.org/39056 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-18remove unused osl/mutex.hxx includesJochen Nitschke5-6/+0
Change-Id: I3b50e45fdb99e9cd8bfda07356ee3ddb4dd0f8bb Reviewed-on: https://gerrit.libreoffice.org/38905 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>