Age | Commit message (Collapse) | Author |
|
Map that EOPNOTSUPP to osl_File_E_NOSYS (and intercept it in
StillReadWriteInteraction, as used by MediaDescriptor::impl_openStreamWithURL in
unotools/source/misc/mediadescriptor.cxx, which will retry opening it read-only
then), instead of to osl_File_E_invalidError (which lead to the "General
input/output error" box).
Instead of "silently" opening the doc as read-only, this still pops up a box
claiming that the doc is locked by somebody else, asking whether to open it
read-only or to open a copy. That's probably because of the
rDescriptor.erase( utl::MediaDescriptor::PROP_READONLY() );
in TypeDetection::impl_openStream (filter/source/config/cache/typedetection.cxx)
where the comment already hints at the confusion among the different read-only
and locking concepts. Changing that looks like it would easily cause
regressions, so is left for a follow-up commit. (And ultimately LO wouldn't
need to treat the doc as read-only at all; it would just need to not attempt to
open it O_RDWR upfront, and save it via copy+rename, like other apps appear to
commonly do.)
Change-Id: I56e18f1864084ba222acaf0e38a604082edaf4c6
Reviewed-on: https://gerrit.libreoffice.org/66805
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: I57aea80f0489c4176990d7233a4c218e5199a993
Reviewed-on: https://gerrit.libreoffice.org/66467
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
...and make sure that the generated name is actually short enough to be stored
in a sockaddr_un::sun_path. (oslPipeImpl::m_Name is only used to store such a
name, to be used in osl_closePipe, so just make it of the same size to guarantee
that copying between the two with strcpy will always work.)
Change-Id: I6d1d0c5518e6d09eff129d682a1a334d12201e90
Reviewed-on: https://gerrit.libreoffice.org/66469
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: I00a4b6aef307621b1607abbe75b3a64e6f8fb40a
Reviewed-on: https://gerrit.libreoffice.org/66464
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: If1187cbb428d329fa10070662282d7fc3aeaf9de
Reviewed-on: https://gerrit.libreoffice.org/66441
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: I8729db064573ac21dfe6b203c5ae244d79ecc4fe
Reviewed-on: https://gerrit.libreoffice.org/66430
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: I034a0ee66266d33e294271fdcf1ab13341e51b2e
Reviewed-on: https://gerrit.libreoffice.org/66426
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: I9062c953d5fbebf323d01b05902f6cd0d0239d03
Reviewed-on: https://gerrit.libreoffice.org/66425
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: Id3b2c0de16d2b6f7fd12dcdf6fc7354541ee0b61
Reviewed-on: https://gerrit.libreoffice.org/66396
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
...instead of underlying C structs
Change-Id: I25f1de9a902e5d8ed459c9b1bfc8a8c855eefb2d
Reviewed-on: https://gerrit.libreoffice.org/66394
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
...while being careful to keep initializing *ustrName to an empty string when
returning false (whether or not client code relies on that detail)
Change-Id: Idd079a0b5a31b844287048dce57bf0fafcc32d1d
Reviewed-on: https://gerrit.libreoffice.org/66388
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
...after 7ffdd830d5fb52f2ca25aa80277d22ea6d89970b
"HAVE_CPP_ATTRIBUTE_FALLTHROUGH is always true now"
Change-Id: I54e5ff4e036a6bb3e5774d1c0524158aae18e937
Reviewed-on: https://gerrit.libreoffice.org/64800
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: I9fb8366634b31230b732dd38a98f800075529714
Reviewed-on: https://gerrit.libreoffice.org/64510
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I651b7f202fa52ff5f5357a11aa72c43eb7dc7f95
Reviewed-on: https://gerrit.libreoffice.org/64102
Tested-by: Jenkins
Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl>
|
|
Change-Id: I0853cf13162bae44cf8a5c44a4546a73f05772d9
Reviewed-on: https://gerrit.libreoffice.org/63780
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
An iOS app might itself, for testing and debugging purposes, look for
LANG in the environment (potentially passed to it by Xcode; the OS
does not set such an environment variable). It is confusing if that
then gets set during the execution of core code back to a device's
default.
Change-Id: I9dcf44090aed84b55fd4240bda2562026cd8dacb
|
|
Change-Id: I4a21258c2405bd6e5c539ec0206e28a316c6ce13
Reviewed-on: https://gerrit.libreoffice.org/60835
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
|
|
Change-Id: If896ed5b1a8daa3dc057888b858b6b0d5da18f28
|
|
which seem to have snuck back in since the great rounds of removals.
Change-Id: I85f7f5f4801c0b48dae8b50f51f83595b286d6a1
Reviewed-on: https://gerrit.libreoffice.org/62229
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I37b77fbc393b743fd508b7e3330409e90c7097b9
Reviewed-on: https://gerrit.libreoffice.org/62196
Tested-by: Jenkins
Reviewed-by: Tor Lillqvist <tml@collabora.com>
|
|
The UnixErrnoString() function returns the symbolic name of an errno
value, like "ENOENT". For now this is local to sal/osl/unx.
If it can't figure out the symbolic name, it returns it as a number
followed by the cleartext description (as from strerror()) in
parentheses.
Rationale why to use this and not strerror(): This is intended to be
used in SAL_INFO() and SAL_WARN(). Such messages are intended to be
read by developers, not end-users. Developers are (or should be)
familiar with symbolic errno names in code anyway. The symbolic names
of errno values are (or should be) instantly recognizable as such,
they all start with E and are in UPPERCASE.
strerror() can be localised although in LibreOffice it apparently
isn't as there allegedly aren't setlocale() calls. But, anyway, the
error strings might be less familiar to a developer than the symbolc
errno names that one uses when coding.
When encountering an unfamiliar error string the developer might want
to add special handling for that error case in the code. They would
need a reverse mapping from error string to errno value, by manually
searching <errno.h>, looking at the comments there, hoping the match
what strerror() produces, to find the corresponding symbolic errno
value.
Change-Id: Idc11595d528e8432a32bf474e6791f4ea7262a1e
Reviewed-on: https://gerrit.libreoffice.org/61931
Tested-by: Jenkins
Reviewed-by: Tor Lillqvist <tml@collabora.com>
|
|
Change-Id: I8bf3509637cb295847e0dd667c1862269a192bbe
Reviewed-on: https://gerrit.libreoffice.org/61881
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Thanks to Stephan for noticing.
Change-Id: I6b90258bdc6bce7b2aeb44f9a1a136b4b9bd51c9
Reviewed-on: https://gerrit.libreoffice.org/61812
Tested-by: Jenkins
Reviewed-by: Tor Lillqvist <tml@collabora.com>
|
|
Change-Id: I708b0b486a233071f95592ccdb97f27fc35a23c4
Reviewed-on: https://gerrit.libreoffice.org/61783
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
and improve the rewriter so I spend less time fixing formatting
Change-Id: Ic2a6e5e31a5a202d2d02a47d77c484a57a5ec514
Reviewed-on: https://gerrit.libreoffice.org/61676
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I999d641b54a53c5a737e82d67a0a1ffa769afd24
Reviewed-on: https://gerrit.libreoffice.org/61700
Tested-by: Jenkins
Reviewed-by: Tor Lillqvist <tml@collabora.com>
|
|
Now it should be fairly close to the (IMHO) ideal: One
SAL_INFO("sal.file") per file system system call. (Not read() and
write().)
Sure, on Linux one could just use strace, but my interest at the
moment is debugging what goes on on iOS.
Change-Id: I19ec0404c0c15a957de96d98376b4338b48a8cbd
Reviewed-on: https://gerrit.libreoffice.org/61687
Tested-by: Jenkins
Reviewed-by: Tor Lillqvist <tml@collabora.com>
|
|
Keep sal.file for the SAL_INFO logging of file system calls (open,
close, rename, etc), and use sal.fileio for the (very verbose) file
I/O.
Change-Id: I0e166d83e20921696a8a0880f9fcbbdec55053dd
|
|
Change-Id: I4bea64f959a6d6f3010809261804748b4fcd7718
|
|
Change-Id: I66c3fb02f4c44adec5c8f663d8845658adfe803f
|
|
Change-Id: I1fde453d5d37481aedec152a1a4da8a85fc6c99b
|
|
Calling stat() on a non-existent file outside the sandbox fails with
EPERM on iOS, not ENOENT. (Presumably calling stat() even on an
existing file, but one you don't have been granted access to, also
fails, because that is after all a point of sandboxing, you shouldn't
even be allowed to figure out whether arbitrary files exist outside
the sandbox.)
Not sure why this change hasn't been necessary also for a sandboxed
LibreOffice on macOS.
Change-Id: I67c768e9c34fd17fa35f08232284210ff4a71b98
|
|
As we already do SAL_INFO logging for some low-level file operations,
surely we should try to do it for all such operations.
Change-Id: I252bbb2149c1dc7aaeaa9ea15674e1f87547f249
Reviewed-on: https://gerrit.libreoffice.org/61659
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Tested-by: Tor Lillqvist <tml@collabora.com>
|
|
...where "inline" (in its meaning of "this function can be defined in multiple
translation units") thus doesn't make much sense. (As discussed in
compilerplugins/clang/redundantinline.cxx, exempt such "static inline" functions
in include files for now.)
All the rewriting has been done automatically by the plugin, except for one
instance in sw/source/ui/frmdlg/column.cxx that used to involve an #if), plus
some subsequent solenv/clang-format/reformat-formatted-files.
Change-Id: Ib8b996b651aeafc03bbdc8890faa05ed50517224
Reviewed-on: https://gerrit.libreoffice.org/61573
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
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
|
|
...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>
|
|
* 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>
|
|
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>
|
|
...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>
|
|
Change-Id: Iab3302d20fb9b0be4b97331709f83f818a46b2da
Reviewed-on: https://gerrit.libreoffice.org/59100
Tested-by: Jenkins
Reviewed-by: Jens Carl <j.carl43@gmx.de>
|
|
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: 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>
|
|
...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: 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>
|
|
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>
|
|
Change-Id: I64b6ffd3e43f14c5884bf6cf1c12ff3b147db6bd
Reviewed-on: https://gerrit.libreoffice.org/56699
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.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>
|