Age | Commit message (Collapse) | Author |
|
Regression from 2157a3536f97ff5ae7c82611a801fef7e3708983
sfx2 store: try rename before copying
Rename is cheaper then copying the content over manually, so try that
first.
On Windows, we need to keep the file's dentity, including metadata (e.g.,
creation time, which is kept in FS). WinAPI has ReplaceFileW specifically
for this, and it keeps ACLs of the original file, and otherwise makes the
changed file not a separate entry, but updated old file from system's PoV.
Eventually, we could try to restructure creating backup copies (e.g., for
documents when configured so) to take advantage of this function being able
to do that.
Change-Id: I6001a2a3af5e10bc010f5ef129f4bb6f83ee1581
Reviewed-on: https://gerrit.libreoffice.org/60163
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Jenkins
|
|
Including:
* expanding STDAPI to its definition (as per
<https://msdn.microsoft.com/library/ms686631(vs.85).aspx> "STDAPI"), to add
__declspec(dllexport) into its middle, in
extensions/source/activex/so_activex.cxx; as discussed in the comments at
<https://gerrit.libreoffice.org/#/c/60691/> "Get rid of Windows .def files in
setup_native, use __declspec(dllexport)", having a function both listed in a
.def file EXPORTS and marking it dllexport is OK, and the latter helps the
heuristics of loplugin:external; however, the relevant functions in
extensions/source/activex/so_activex.cxx probably don't even need to be
exported in the first place?
* follow-up loplugin:salcall in sal/osl/w32/file-impl.hxx
Change-Id: Ida6e17eba19cfa3d7e5c72dda57409005c0a0191
Reviewed-on: https://gerrit.libreoffice.org/60938
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
...warning about (for now only) functions and variables with external linkage
that likely don't need it.
The problems with moving entities into unnamed namespacs and breaking ADL
(as alluded to in comments in compilerplugins/clang/external.cxx) are
illustrated by the fact that while
struct S1 { int f() { return 0; } };
int f(S1 s) { return s.f(); }
namespace N {
struct S2: S1 { int f() { return 1; } };
int f(S2 s) { return s.f(); }
}
int main() { return f(N::S2()); }
returns 1, both moving just the struct S2 into an nunnamed namespace,
struct S1 { int f() { return 0; } };
int f(S1 s) { return s.f(); }
namespace N {
namespace { struct S2: S1 { int f() { return 1; } }; }
int f(S2 s) { return s.f(); }
}
int main() { return f(N::S2()); }
as well as moving just the function f overload into an unnamed namespace,
struct S1 { int f() { return 0; } };
int f(S1 s) { return s.f(); }
namespace N {
struct S2: S1 { int f() { return 1; } };
namespace { int f(S2 s) { return s.f(); } }
}
int main() { return f(N::S2()); }
would each change the program to return 0 instead.
Change-Id: I4d09f7ac5e8f9bcd6e6bde4712608444b642265c
Reviewed-on: https://gerrit.libreoffice.org/60539
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
They were introduced with 9399c662f36c385b0c705eb34e636a9aec450282 "initial
import" without any trace of being exported DLLPUBLIC-style, and were probably
included in error in the initial sal/util/sal.map when that was introduced in
92b0714c409bd3cffcefd338371ee000fa1b5805 "new".
That means the functions themselves can be moved from extern "C" to an unnamed
namespace (and the resulting loplugin:salbool warnings be fixed).
Change-Id: Ida99540edce9560e69081f507e41db2af34966fb
Reviewed-on: https://gerrit.libreoffice.org/60469
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: I7d2a754cdc5576b5a5b35db2fbffd19ea17c16ff
Reviewed-on: https://gerrit.libreoffice.org/60224
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
this was not really testing anything before, because it was doing
sizeof(char*)
which is 4 or 8
Change-Id: I7eccdd3c6ae14a6fabb27202737fdb2fd12663dc
Reviewed-on: https://gerrit.libreoffice.org/60182
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
...%d vs. DWORD aka unsigned long, but no need for sprintf anyway
Change-Id: I7e97ada40abf7785a0678c76c76b547d6571f497
Reviewed-on: https://gerrit.libreoffice.org/60160
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: I4d6d04873d69d2ff1e5409372b353e0bb9a5d68d
Reviewed-on: https://gerrit.libreoffice.org/60120
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
Change-Id: I6213706ace039492429349c2459923b0e9a5d758
Reviewed-on: https://gerrit.libreoffice.org/60127
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I5660fe6ddc745894c1e36176f4aa38ad568f09ba
Reviewed-on: https://gerrit.libreoffice.org/60119
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
(--disable-assert-always-abort --enable-cipher-openssl-backend)
Change-Id: I0cf10fd6c788432a3312048cbde31ccc6f8fcbad
Reviewed-on: https://gerrit.libreoffice.org/59860
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Also remove SlideSorter::CreateController which only calls new;
fix a memory leak in osl_Security's MyTestPlugInImpl::initialize
Change-Id: I70b6e888984f8543adbf879162e752556d2b3f0e
Reviewed-on: https://gerrit.libreoffice.org/59805
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
Change-Id: Icc820a47ac891c358883f9c01224f676c58fdd11
Reviewed-on: https://gerrit.libreoffice.org/59744
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
* Don't lowercase the name.
Change-Id: I8addd735bf8ee48256ec53f01063e96e7a4b41cd
Reviewed-on: https://gerrit.libreoffice.org/58632
Tested-by: Jenkins
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
|
|
where used directly, since rtl_allocateMemory now just calls into std::malloc
Change-Id: I59f85bdb7efdf6baa30e8fcd2370c0f8e9c999ad
Reviewed-on: https://gerrit.libreoffice.org/59685
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I0dc22130b5dec5eb2250c9625773b6c9720182a9
Reviewed-on: https://gerrit.libreoffice.org/59740
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
now that those functions are entirely malloc/free based, we can skip a
function call layer.
Change-Id: Ib091de0bdf4cdd58cee45185df17d96d3e8af402
Reviewed-on: https://gerrit.libreoffice.org/59576
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
...with new configuration option --enable-cipher-openssl-backend
rtl/cipher.h (which is part of the stable URE interface) offers functionality to
en-/decrypt data with Blowfish in ECB, CBC, and streaming CFB mode, and with RC4
(aka ARCFOUR; which is a stream cipher). LO itself only uses Blowfish CFB and
RC4, so only those are wired to OpenSSL for now, for simplicity. Using Blowfish
ECB and CBC, or Blowfish CFB in DirectionBoth mode would cause failures for now
(cf. sal/qa/rtl/cipher/rtl_cipher.cxx); the assumption is that no external code
actually makes use of this functionality.
Using NSS instead of OpenSSL could be an alternative, but there appears to be no
support in NSS for Blowfish in streaming CFB mode, only CKM_BLOWFISH_CBC for
CBC mode.
Change-Id: I0bc042961539ed46844c96cb1c808209578528a0
Reviewed-on: https://gerrit.libreoffice.org/59428
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
...which had accidentally been broken with
87707670c993794ab12b0fad0f048f11429269c2 "Make OUStringLiteral more useful".
(std::strlen unfortunately isn't constexpr, so need to use an explicit loop
instead.)
Change-Id: I9a820e2940b99a0c37124477810ef879d82c8325
Reviewed-on: https://gerrit.libreoffice.org/59344
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Use range-based loop or replace with std::any_of, std::find and
std::find_if where applicable.
Change-Id: I2f80788c49d56094c29b102eb96a7a7c079567c6
Reviewed-on: https://gerrit.libreoffice.org/59143
Tested-by: Jenkins
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Ib717870185bdf4ac43af8fcd3a7233b051e23d30
Reviewed-on: https://gerrit.libreoffice.org/58888
Tested-by: Jenkins
Reviewed-by: Regina Henschel <rb.henschel@t-online.de>
|
|
Change-Id: Iab3302d20fb9b0be4b97331709f83f818a46b2da
Reviewed-on: https://gerrit.libreoffice.org/59100
Tested-by: Jenkins
Reviewed-by: Jens Carl <j.carl43@gmx.de>
|
|
Change-Id: Ie3baa2f843a98c1edc523050db53beaa2c803394
Reviewed-on: https://gerrit.libreoffice.org/58801
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Jenkins
|
|
Change-Id: I98d9120160fb652cae490513765670f447cf5911
Reviewed-on: https://gerrit.libreoffice.org/58791
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Jenkins
|
|
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')
in files formerly omitted for oversight or non-cxx extension
Change-Id: I327c573f44076c6ccfecf737eafccba2da72e1bd
Reviewed-on: https://gerrit.libreoffice.org/58600
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
|
|
Change-Id: Ib05e209bfe71bacca99862f0e3266008bb436995
Reviewed-on: https://gerrit.libreoffice.org/58569
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I54cf8e4fc430feb2e34d3f6f0f2abce81973b09a
Reviewed-on: https://gerrit.libreoffice.org/58481
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
|
|
rtl_[u]String_alloc now requires that the length be >= 0.
Since this function is only @since Libreoffice 4.1, it is unlikely
to be widely used externally.
Removed some unit tests that were testing invalid or out of
range paramers, which are already not allowed according to the
documented contract of those functions.
The change in writerfilter is because the new asserts triggered
when running testFdo74745
The change in SwTextNode::EraseText is because testFdo60842
triggered the assert in replaceAt.
The change in SwFieldSlot::SwFieldSlot is because
testMoveRange::Import_Export_Import triggered the assert in
replaceAt.
The changes in SwFieldSlot::SwFieldSlot and TabControl::ImplGetItemSize
are due to failures in the uitests.
Change-Id: Ib317261067649b0de96df12873ce31360cd24681
Reviewed-on: https://gerrit.libreoffice.org/58390
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: If0072a2fd7d3111b48413143610025124f365207
Reviewed-on: https://gerrit.libreoffice.org/58275
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
This effectively reverts 271a663d2f098f3f665cab6da2e13b265a7eab93 "rtl: support
start/stop threads around pre-init" again, now that
df6ba650469a6f2fda06ef1c2e107ccdd3570505 "Remove 'officially dead now' rtl_cache
slab allocator mechanism" removed the wsupdate thread.
(rtl_alloc_preInit is an internal-use-only C function, so changing its arguments
doesn't affect URE compatibility.)
Change-Id: Ie9bce86377f9520e2600e4111ac525dddace10f8
Reviewed-on: https://gerrit.libreoffice.org/58443
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
...as with the combination of old ce906b8096081dee15dc8cc96e570d5b0b587955
"skip tricky allocators on G_SLICE=always-malloc" and recent
bc6a5d8e79e7d0e7d75ac107aa8e6aa275e434e9 "Disable custom allocator", rtl_cache
unconditionally just uses malloc/free now (see also
db354dfad541fe2edd64a618a2d7cc83a6be2b9e "the custom SAL allocator is no longer
used" and df6ba650469a6f2fda06ef1c2e107ccdd3570505 "Remove 'officially dead now'
rtl_cache slab allocator mechanism"). So simplify the code.
Change-Id: Ia665fd381ee4757e2c8b3d0460363bd34efd373a
Reviewed-on: https://gerrit.libreoffice.org/58424
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: Ia9459d29ebe823a8e08eed0a7418e89b05ed360b
Reviewed-on: https://gerrit.libreoffice.org/58412
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
...after <https://gerrit.libreoffice.org/#/c/58263/> "the custom SAL allocator
is no longer used" got merged. According to my July 31, 2018 comment there:
"However, [...] this change is effectively a final coffin nail for the
'rtl_cache' mechanism. It could be argued that the alleged benefits of that
mechanism (if it were still working) might be real (at least on some platforms;
which would need measurements), and that it should be made working again (by
reverting the effects of both ce906b8096081dee15dc8cc96e570d5b0b587955 'skip
tricky allocators on G_SLICE=always-malloc' and
bc6a5d8e79e7d0e7d75ac107aa8e6aa275e434e9 'Disable custom allocator' on
rtl_cache_alloc/free again). But it could just as well be argued that the
'rtl_cache' mechanism is effectively gone for long enough now (since end of
November, 2017, with bc6a5d8e79e7d0e7d75ac107aa8e6aa275e434e9 'Disable custom
allocator') without any (apparent) negative consequences, so that it can be
removed for good with this change."
Change-Id: I8c1e45d494fc22555a9e675ab27be9e6e404abde
Reviewed-on: https://gerrit.libreoffice.org/58369
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
ever since commit bc6a5d8e79e7d0e7d75ac107aa8e6aa275e434e9
Date: Wed Nov 15 16:52:44 2017 +0530
Disable custom allocator
which makes FORCE_SYSALLOC redundant
which makes SYS_ALLOC redundant
Change-Id: I42e1d651473e7601e2280d9fb0662c89808c88f6
Reviewed-on: https://gerrit.libreoffice.org/58263
Tested-by: Jenkins
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
|
|
Change-Id: Ib0a8914cc1967f89a2cd3b062e7a0b52de7a972c
Reviewed-on: https://gerrit.libreoffice.org/58281
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I7d3f6af5410d93537b6b7a704615f43860160320
Reviewed-on: https://gerrit.libreoffice.org/58278
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: If75ac1968b8b0b3314ae36c2a7f163cb5428e9c6
Reviewed-on: https://gerrit.libreoffice.org/58277
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
use the other functions in this module so we get the compiler builtins
if available
Change-Id: Idbd9df44e057e573dd3fb243c50c5186e8edd8d8
Reviewed-on: https://gerrit.libreoffice.org/58276
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I88c941832a0d682ea4b6028c28edd48cf5df38f7
Reviewed-on: https://gerrit.libreoffice.org/58093
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
|
|
Change-Id: Ib489ebf55d3a18d2af6f34b3f6128231d6d7758c
Reviewed-on: https://gerrit.libreoffice.org/58090
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
|
|
Change-Id: I3f4e4efa8ea839f48b9700ebc26c7e5ab279ce49
Reviewed-on: https://gerrit.libreoffice.org/57975
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Ie3427dfbbdf6ecf96b4fc36c534022dc881b3957
|
|
Change-Id: I011f4cbb10324c4a7d4e1be3ab1355291f79730b
Reviewed-on: https://gerrit.libreoffice.org/57838
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
|
|
Found with bin/find-unneeded-includes
Only removal proposals are dealt with here.
Change-Id: I7b19938246ca8498fa300f781589bf17b3d486aa
Reviewed-on: https://gerrit.libreoffice.org/56723
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
|
|
Replace osl_waitThread by osl::Thread::wait.
Use std::chrono instead of TimeValue.
Change-Id: I71691d014feeeb0c5d0ba29d048bda8e25e6e7dd
Reviewed-on: https://gerrit.libreoffice.org/57130
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I64b6ffd3e43f14c5884bf6cf1c12ff3b147db6bd
Reviewed-on: https://gerrit.libreoffice.org/56699
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Make it easier to compare timing logs even if you add a SAL_DEBUG()
that happens much earlier than the others, the timestamps of the
others will still be comparable to those from earlier runs.
Change-Id: I13872ef9112d8515e563e561f9b2a50c8510bae8
Reviewed-on: https://gerrit.libreoffice.org/56676
Tested-by: Jenkins
Reviewed-by: Tor Lillqvist <tml@collabora.com>
|
|
Found with bin/find-unneeded-includes
Only removal proposals are dealt with here.
Change-Id: Ib2301526d7aa6982af6c8c79ed7e9a4c34b7bbf7
Reviewed-on: https://gerrit.libreoffice.org/56491
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
|
|
Once an in-process JVM is instantiated, it is vital that the disposition for
SIGSEGV is not changed afterwards, as we do not make use of Java's libjsig.so
(cf. <https://docs.oracle.com/javase/8/docs/technotes/guides/vm/
signal-chaining.html>) in our processes.
I observed sporadic SIGSEGV crashes of CppunitTest_dbaccess_RowSetClones on a
64-core aarch64 machine (see comment at <https://github.com/flathub/
org.libreoffice.LibreOffice/issues/42#issuecomment-395731088> "OpenJDK 10 is now
available"). What apparently happenes is that the cppunittester process first
sets up its signal handlers through vclbootstrapprotector, which doesn't set one
for SIGSEGV because bSetSEGVHandler is false in sal/osl/unx/signal.cxx because
!is_soffice_Impl(). Then later when the in-process JVM is instantiated it sets
its handlers, including a SIGSEGV one. Towards the end of the process,
DeInitVCL calls osl_removeSignalHandler calls onDeInitSignal, which erroneously
resets the SIGSEGV handler because it doesn't honor bSetSEGVHandler. But it
can apparently happen that JVM threads are still running at that time and are
executing JIT'ed code that can cause SIGSEGV that relies on the JVM's handler
being installed, which it no longer is.
(This can probably also happen for soffice.bin itself, where bSetSEGVHandler
will be true. That will need a different, follow-up fix.)
Change-Id: Ib6d99c23e57daa0b7576964908aadff511f2bb21
Reviewed-on: https://gerrit.libreoffice.org/56232
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
LibreOffice uses its low-level API to look up files inside the app
bundle thousands of times, all the time, and especially when starting
something. Both when the process starts, and when a specific aspects
of the application starts (like after typing a first character into a
Writer document in a session). Having all those, too, go through this
alias (bookmark) resolve dance is just insane. There won't be any
aliases (bookmarks) there.
This shaves almost a second from the delay after typing the first
character into a Writer document in a session. There is still a
noticeable delay left, though, likely mostly caused by Python
(Lightproof) initialisation slowness. (It's cross-platform.)
I would say that it is a bit questionable whether the
macxp_resolveAlias() functionality is worth it at all, even.
Change-Id: I2461141c6b58738befd0db4902eb25e63b788b79
|