- Convert include guards to #pragma once in salhelper, starmath, tools, ucb, and o3tl.
- Kept changes minimal to a small cross-module batch as requested by the easyHack guidance.
- Verified with: container=1 make -j4 o3tl.build salhelper.build starmath.build tools.build ucb.build
Change-Id: Ic047061433985e12be41bdb6463ac4c8e8969ddd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204555
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Jenkins
Try to insert a https:// image URL into Writer when the URL's host is
meant to be not verified, 'curl -k' works with the URL but insertion in
Writer still fails.
Turns out this is an expired self-signed certificate (in a local test
env). Mechanism for not verifying SSL certs in the curl session was
added in commit 2a5c998d4c (allow an
exemption to be made for a specific host, 2024-08-23), but that results
in an image insertion failure.
Fix the problem by adapting the ucb/ code to do what
<https://github.com/curl/curl/blob/470e26ff6eb55e8d18d6fa44104834e9d1f71274/src/config2setopts.c#L375>
does for 'curl -k', also clear the CURLOPT_SSL_VERIFYPEER option.
With this, inserting https:// images from my local test server works
again in Writer.
Change-Id: I0c52f6c0c0dfd6ebf0b4081a8088b623935a96f7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197093
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
After checking all modules with
bin/find-unneeded-includes --finderrors --headers --recursive
these subdirectories seemed to need custom assumes for an
error free run of IWYU
Change-Id: I8e0553355809e49e3ec3d06aa4404e6cd7b72aff
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196631
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen <gabor.kelemen@collabora.com>
The problem was:
When adding a service for Google Drive, clicking OK in the File
Services dialog would initiate the OAuth2 authentication procedure;
after successful confirmation, immediately another authentication
procedure started.
The reason was, that the first procedure was initiated by the code
in RepoContent::getRepositories, which created a session, but did
not register it, nor saved its token. Then, in Content::getSession,
another session had to be created, which had to authenticate again.
Before this change, the registration for an OAuth2-authenticated
session used a key including the repo. Therefore, RepoContent did
not know which repo it had to use for registration.
This change unifies the previously duplicated code used to create
a session. For OAuth2-based sessions, the key for registration is
now only the service's binding URL, which allows to use the same
key both in RepoContent::getRepositories and Content::getSession.
Now the successfully created session in getRepositories is not
deleted, allowing it to be registered and reused.
Also, after the OAuth2 authentication failed (which means that it
was cancelled by the user), the password dialog is not shown.
Change-Id: Ic84a8e034eb0900aca3b4cac0d73dd7443d6380d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193002
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
types
In sortresult.cxx, the data type of loop counter i in Remove & SetChanged
methods seems incorrect. Change to sal_Int32 which aligns with nCount.
Change-Id: Iba61b8fda5ce9d11edd59e4f192723712fd42b4c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192676
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
Tested-by: Jenkins
restore the lock at the end of SerfLockStore::stopTicker
SerfLockStore::removeLockImpl calls this, and that is called
by SerfLockStore::refreshLocks in a loop, so if it was unlocked
at the end of the first loop, then its still unlocked on a 2nd
loop.
Probably doesn't matter as there's only a 2nd unlock attempt
if m_aLockInfoMap.empty() which presumably can only happen once.
Change-Id: Iede91b1b4ef9368bcf4e62cb85bf5a0c745e0ba7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189058
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
and
cid#1659706 Variable copied when it could be moved
cid#1659716 Variable copied when it could be moved
cid#1659727 Variable copied when it could be moved
cid#1659735 Variable copied when it could be moved
cid#1659739 Variable copied when it could be moved
cid#1659740 Variable copied when it could be moved
cid#1659746 Variable copied when it could be moved
Change-Id: I981c42ebad50670d7704d5377b97917c966ee7da
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189262
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
and
cid#1660225 Variable copied when it could be moved
cid#1660211 Variable copied when it could be moved
cid#1660185 Variable copied when it could be moved
cid#1660173 Variable copied when it could be moved
cid#1660168 Variable copied when it could be moved
cid#1660166 Variable copied when it could be moved
cid#1660165 Variable copied when it could be moved
cid#1660163 Variable copied when it could be moved
cid#1660152 Variable copied when it could be moved
cid#1660149 Variable copied when it could be moved
cid#1660147 Variable copied when it could be moved
cid#1660145 Variable copied when it could be moved
cid#1660142 Variable copied when it could be moved
cid#1660140 Variable copied when it could be moved
cid#1660137 Variable copied when it could be moved
cid#1660136 Variable copied when it could be moved
cid#1660135 Variable copied when it could be moved
cid#1660128 Variable copied when it could be moved
cid#1660124 Variable copied when it could be moved
cid#1660122 Variable copied when it could be moved
cid#1660117 Variable copied when it could be moved
cid#1660114 Variable copied when it could be moved
cid#1660110 Variable copied when it could be moved
cid#1660109 Variable copied when it could be moved
cid#1660105 Variable copied when it could be moved
cid#1660104 Variable copied when it could be moved
cid#1660102 Variable copied when it could be moved
cid#1660100 Variable copied when it could be moved
cid#1660098 Variable copied when it could be moved
cid#1660080 Variable copied when it could be moved
cid#1660079 Variable copied when it could be moved
cid#1660078 Variable copied when it could be moved
cid#1660075 Variable copied when it could be moved
cid#1660071 Variable copied when it could be moved
cid#1660070 Variable copied when it could be moved
cid#1660064 Variable copied when it could be moved
cid#1660063 Variable copied when it could be moved
cid#1660060 Variable copied when it could be moved
cid#1660058 Variable copied when it could be moved
cid#1660053 Variable copied when it could be moved
cid#1660050 Variable copied when it could be moved
cid#1660049 Variable copied when it could be moved
cid#1660046 Variable copied when it could be moved
cid#1660042 Variable copied when it could be moved
cid#1660028 Variable copied when it could be moved
cid#1660023 Variable copied when it could be moved
cid#1660022 Variable copied when it could be moved
cid#1660021 Variable copied when it could be moved
cid#1660020 Variable copied when it could be moved
cid#1660017 Variable copied when it could be moved
cid#1660013 Variable copied when it could be moved
cid#1660005 Variable copied when it could be moved
cid#1660003 Variable copied when it could be moved
cid#1659999 Variable copied when it could be moved
cid#1659998 Variable copied when it could be moved
cid#1659995 Variable copied when it could be moved
cid#1659993 Variable copied when it could be moved
cid#1659989 Variable copied when it could be moved
cid#1659988 Variable copied when it could be moved
Change-Id: I2a30c8a2ac8785050d49b98635b0b406535b185a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189056
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
and
cid#1660483 Variable copied when it could be moved
cid#1660480 Variable copied when it could be moved
cid#1660473 Variable copied when it could be moved
cid#1660472 Variable copied when it could be moved
cid#1660471 Variable copied when it could be moved
cid#1660468 Variable copied when it could be moved
cid#1660464 Variable copied when it could be moved
cid#1660463 Variable copied when it could be moved
cid#1660462 Variable copied when it could be moved
Change-Id: I6380e6a6c2a63a5d6f2052264c54f250703e77fb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188825
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
We fix/improve 3 things here
(1) Holding a pointer to something that might be on the stack seems dodgy.
I traced the calls back a few levels and ended up with lots of lots of
call sites, with no guarantee this pointer is safe to hold for any
length of time.
(2) we already have a unique_ptr in this structure, but we are not
properly constructing it.
(3) once we fix (1) and (2) by calling the constructor/destructor
explicitly, we can simply the password/username field handling.
This code has been here since:
commit 065b374d69
Author: Vladimir Glazounov <vg@openoffice.org>
Date: Wed May 14 13:49:20 2008 +0000
INTEGRATION: CWS ucpgio1 (1.1.2); FILE ADDED
2008/04/30 16:35:19 cmc 1.1.2.1: #i88090# add gio content provider
Change-Id: I3ffcf30fbf66c855cedc4a3a99985bc6ee42faa9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182483
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
found by a little plugin I created.
Plugin parked into store/ folder because it needs hand-holding
when run.
Change-Id: I2b4da7378f0becbc5f020ac9e78cd765aa0119b4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181768
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
and
cid#1608607 Check of thread-shared field evades lock acquisition
futile to lock m_nState
#1 0x00007f3bdc4a9cc1 in pthread_mutex_lock@@GLIBC_2.2.5 () at /lib64/libc.so.6
#2 0x00007f3bc48b0683 in __gthread_mutex_lock (__mutex=0x29ae4698) at /usr/bin/../lib/gcc/x86_64-redhat-linux/14/../../../../include/c++/14/x86_64-redhat-linux/bits/gthr-default.h:762
#3 0x00007f3bc48b9505 in std::mutex::lock (this=0x29ae4698) at /usr/bin/../lib/gcc/x86_64-redhat-linux/14/../../../../include/c++/14/bits/std_mutex.h:113
#4 0x00007f3bc48b8bec in std::unique_lock<std::mutex>::lock (this=0x7fffa21aa7e8) at /usr/bin/../lib/gcc/x86_64-redhat-linux/14/../../../../include/c++/14/bits/unique_lock.h:147
#5 0x00007f3bc48b0b58 in std::unique_lock<std::mutex>::unique_lock (this=0x7fffa21aa7e8, __m=...) at /usr/bin/../lib/gcc/x86_64-redhat-linux/14/../../../../include/c++/14/bits/unique_lock.h:73
#6 0x00007f3bc48af7cc in fileaccess::BaseContent::cDEL (this=0x29ae4600) at core/ucb/source/ucp/file/bc.cxx:1126
#7 0x00007f3bc48af9d4 in non-virtual thunk to fileaccess::BaseContent::cDEL() () at core/instdir/program/../program/libucpfile1.so
#8 0x00007f3bc492d43f in fileaccess::TaskManager::getContentDeletedEventListeners (this=0x29ab47e0, aName="file://core/instdir/program/../share/config/cdefghij.klm")
at core/ucb/source/ucp/file/filtask.cxx:2581
#9 0x00007f3bc492caaa in fileaccess::TaskManager::remove
(this=0x29ab47e0, CommandId=5, aUnqPath="file://core/instdir/program/../share/config/cdefghij.klm", IsWhat=fileaccess::TaskManager::FileUrlType::File, MustExist=true)
at core/ucb/source/ucp/file/filtask.cxx:1572
#10 0x00007f3bc48ab8c2 in fileaccess::BaseContent::deleteContent (this=0x29ae4600, nMyCommandIdentifier=5) at core/ucb/source/ucp/file/bc.cxx:934
#11 0x00007f3bc48a9891 in fileaccess::BaseContent::execute (this=0x29ae4600, aCommand=..., CommandId=5, Environment=empty uno::Reference) at core/ucb/source/ucp/file/bc.cxx:300
#12 0x00007f3bc48ad00a in non-virtual thunk to fileaccess::BaseContent::execute(com::sun::star::ucb::Command const&, int, com::sun::star::uno::Reference<com::sun::star::ucb::XCommandEnvironment> const&) ()
at core/instdir/program/../program/libucpfile1.so
#13 0x00007f3bdc8f5537 in ucbhelper::Content_Impl::executeCommand (this=0x29adfb80, rCommand=...) at core/ucbhelper/source/client/content.cxx:1260
#14 0x00007f3bdc8f673c in ucbhelper::Content::executeCommand (this=0x7fffa21ab0a0, rCommandName="delete", rCommandArgument=uno::Any("boolean": 1 '\001'))
at core/ucbhelper/source/client/content.cxx:562
#15 0x00007f3bdf7fd2c1 in KillFile (rURL=...) at core/svx/source/gallery2/galmisc.cxx:291
Change-Id: Iff9114adb4d5fe2ccf0d5a10fdd91295393a7820
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177519
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins