where it was obsoleted by commits 2484de6728
(Remove non-const Sequence::begin()/end() in internal code, 2021-10-15) and
fb3c04bd19 (Drop non-const Sequence::operator[]
in internal code 2021-11-05).
Change-Id: I64683093afc48ddf2307dc1dee2302cf0b3cbecc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167110
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
where it was obsoleted by commits 2484de6728
(Remove non-const Sequence::begin()/end() in internal code, 2021-10-15) and
fb3c04bd19 (Drop non-const Sequence::operator[]
in internal code 2021-11-05).
Change-Id: I4ccc647bb794515c8c11f8dfd9a26563f4aa094b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166819
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
...at the expense of losing, at least for now, the script editor for it (which
had been hacked into the old upstream sources in a hard-to-maintain way).
rhino-1.7.14.zip is taken from
<https://github.com/mozilla/rhino/releases/download/Rhino1_7_14_Release/rhino-1.7.14.zip>.
Building it would now use Gradle, but instead just hack together an invocation
of javac and jar in external/rhino/ExternalProject_rhino.mk that effectively
generates the same jar as the upstream-built jar available at
<https://github.com/mozilla/rhino/releases/download/Rhino1_7_14_Release/rhino-1.7.14.jar>.
All the various patches are no longer necessary:
* external/rhino/rhino1_5R5.patch and external/rhino/OfficeScriptInfo.java were
mostly for the hacked-in script editor, which has been abandoned at least for
now (see above).
* external/rhino/rhino1_5R5-find_swing.patch (originally from
0a7f934650 "ause109: #i106296# make build.xml
aware of TARFILE_LOCATION") appears to be obsolete.
* external/rhino/rhino1_5R5-updateToolTip.patch is covered by
<ab20a73b16>
"Fix bug 414869: Rhino debugger fails to launch due to updates in mac os x
leopard".
* external/rhino/rhino-classpath.patch.1 from
bb58293296 "rhino: unbreak build on Fedora 34"
was only relevant when building with Ant.
Change-Id: I5fca5915d785716f7aaf313ff2469a20f55f707a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165190
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
SbxValue::SetType clears the original value. We need to use the Get/Put
cycle, asking for a specific type in Get, and then making sure that the
variable is not fixed on Put.
Change-Id: I0a6c106d511e8491c89a5a2153f47a708f83ee1e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162664
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
The "ehlo" calls look redundant, smtplib will do these implicitly if
required (checked in Python 3.5.9); it will also check that the STARTTLS
is successful which very old versions of Python didn't do.
Change-Id: Ice8b24bc2c9773c1171e856f1aefb191b1e2e947
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159078
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
This reverts commit 7fc6063914.
sberg noticed that there is a difference now:
there's a subtle difference now, in that if y was null originally, it would have thrown a (caught) exception, whereas now it will crash in the y.query<X>() call.
Change-Id: Idbb5a08d635d15b5ca63f4822eddf05fb0a5afa0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156002
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
look for methods where we don't need to guard access
to the field, because the field is never modified
Change-Id: I62c33cc3f52881557515765d3733c4afc78547aa
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155836
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
since querying with exceptions is consideably more expensive
Change-Id: I968a9a40766b2abb0d3058549b0ed44011fd5716
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155791
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
...when dispose is called without a preceding call to initialize (as would
happen with an improved CppunitTest_services)
Change-Id: Ic632d736ecb27509b092ef526cf0dfc964023663
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150576
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
- Check the loop termination in readBytes() properly: currently it increments
totalBytesRead while also decrementing nBytesToRead, so when compared to
each other, the loop terminates when the buffer is half full. Only check
for nBytesToRead instead.
- Deal with the possibility of available() returning 0 in readSomeBytes().
Patch by: me
Cherry-picked from
7e29bacc90
"Fix some errors in the scripting module's XInputStreamImpl:"
Change-Id: I951dc10565afa3519b0ddf98de559a7b585b1627
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149156
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Jenkins
The vnd.sun.star.expand: payload must be URL-decoded prior to passing
it to expandMacros; the protocol must be checked case-insensitively.
Use startsWithIgnoreAsciiCase for that.
Change-Id: I2be993a0400a27cb7dc57207cd0824b4505afd2b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146855
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Similar to what is done in bootstrap_expandUri, expandUnoRcUrl,
UrlReference::expand, JavaLoader.expand_url, and is documented
in XVndSunStarExpandUrl interface.
Change-Id: I65349b52734f212e6a04e615d39fa2563f62d472
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146840
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
SfxObjectShell::Current() can return null, it's based on the equally
vile SfxViewFrame::Current()
Change-Id: Ia5c7783680e9d8e5d3075078f16a2c15cb6f7a47
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144339
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
As reported by the user, if you go to Tools - Macro - Run Macro and select the InsertText macro (under Application Macros), you'll get an error.
The reason for this is that the InsertText macro is not meant to be called from the Macro Selector since it requires 1 positional argument.
Therefore, this patch creates a simple callable Python macro that uses the InsertText funcion, so that this error message no longer happens.
Change-Id: I63f766795bda2d2ae1b95a7c0d8110f41f9fbea2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140384
Tested-by: Jenkins
Tested-by: Hossein <hossein@libreoffice.org>
Reviewed-by: Hossein <hossein@libreoffice.org>
...so that its TOOLS_WARN_EXCEPTION can be used in
comphelper/source/misc/logging.cxx in a follow-up commit. (And while at it,
rename from diangose_ex.h to the more appropriate diagnose_ex.hxx. The
comphelper module is sufficiently low-level for this immediate use case, so use
that at least for now; o3tl might be even more suitable but doesn't have a
Library until now. Also, for the immediate use case it would have sufficed to
only break DbgGetCaughtException, exceptionToString, TOOLS_WARN_EXCEPTION,
TOOLS_WARN_EXCEPTION_IF, and TOOLS_INFO_EXCEPTION out of
include/tools/diagnose_ex.h into an additional new
include/comphelper/diagnose_ex.hxx, but its probably easier overall to just move
the complete include file as is.)
Change-Id: I9f3222d4ccf1a9ac29d7eb9ba1530d53e2affaee
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138451
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
look for local variables that can be std::move'd to parameters
off by default, since it doesn't do proper data flow analysis
Change-Id: I3403a0fcffd165bdea6a772528bc53995c5fdb40
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135527
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This reverts commit 418533f0af. Turned out that
closing the given URLClassLoader once the script's main class has been loaded
prevents the script from loading further classes located next to that main
class. So abandon the Coverity suggestion that such class loaders should be
closed promptly to avoid resource leaks.
Change-Id: I1bcf83117836cfe317eac9850d413f2c3767bd8e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135158
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
off by default, since each warning needs careful inspection
Change-Id: I805c1d1cdde531a1afdc76e87b22f879fc3c9753
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134641
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
where instantiating and allocating a whole map just to extract a single
key is way inefficient
Change-Id: I55248bc71a9e8826cab9b76fa6916bfa888efa0b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134226
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>