68 Commits
Author SHA1 Message Date
Stephan Bergmann 811769f009 Consistently use __EMSCRIPTEN__ instead of EMSCRIPTEN macro
...as emsdk 5.0.3 deprecated the predefined EMSCRIPTEN macro (see
<https://github.com/emscripten-core/emscripten/commit/506052bd8b4e23ded7f2351c62ca3b24d40c8cf3>
"Warn about usage of deprecated EMSCRIPTEN macro. NFC (#26381)"), causing
failures like

> In file included from static/source/unoembindhelpers/PrimaryBindings.cxx:29:
> In file included from include/sfx2/viewsh.hxx:35:
> In file included from include/editeng/outliner.hxx:32:
> In file included from include/tools/color.hxx:26:
> include/osl/endian.h:66:15: error: macro 'EMSCRIPTEN' has been marked as deprecated: use __EMSCRIPTEN__ instead [-Werror,-Wdeprecated-pragma]
>    66 | #elif defined EMSCRIPTEN
>       |               ^
> /home/sberg/emsdk/5.0.4/emsdk/emscripten/main/cache/sysroot/include/emscripten/emscripten.h:35:66: note: macro marked 'deprecated' here
>    35 | #pragma clang deprecated(EMSCRIPTEN, "use __EMSCRIPTEN__ instead")
>       |                                                                  ^

To avoid confusion, also suppress the -D$(OS) in
solenv/gbuild/platform/unxgcc.mk that would unnecessarily keep defining
EMSCRIPTEN.

Change-Id: Ic1f187cf1c6417cd95d4092e9cea01a665bd1b2f
Reviewed-on: https://gerrit.collaboraoffice.com/c/core/+/34
Reviewed-by: Michael Stahl <michael.stahl@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit 50291c2ed83bdb49bb827a4a12905d94b8c42035)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205167
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-05-14 10:11:38 +02:00
Xisco Fauli 8a9e4e8631 curl: upgrade to 8.19.0
--with-secure-transport was dropped in curl 8.15,
so replace it with --with-openssl --with-apple-sectrust,
which was added in curl 8.17

Remove all patches fixed upstream

Downloaded from https://curl.se/download/curl-8.19.0.tar.xz

Change-Id: Ic93d8e3ef637d2adf84454c4e0375d1bf4620870
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/201850
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
Reviewed-by: Patrick Luby <guibomacdev@gmail.com>
2026-03-24 22:20:55 +01:00
Stephan Bergmann 394cd5db81 Use some more ""_ustr literals
(in places that were otherwise hit by a libstdc++ 16 trunk issue involving
std::source_location that is discussed at
<https://gcc.gnu.org/pipermail/libstdc++/2026-February/065220.html> "Re: [PATCH
6/9 v4] libstdc++, contracts: Add base P2900R14 contracts support.")

Change-Id: Iaedf3e44a5f2290e194286fa035ceed8fd40da45
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198627
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
Tested-by: Jenkins
2026-02-04 08:22:35 +01:00
Mike Kaganski 6a992f99fe Drop typedef IDataObjectPtr
It doesn't make much sense.

Change-Id: If44de0379e14bf65f4fd4fb40917c7b391768636
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198048
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2026-01-24 19:43:52 +01:00
Mike Kaganski 3a54d9870f Simplify use of COMReference a bit
1. Avoid explicitly specifying COM_QUERY in calls to QueryInterface
   (it is implied from the name).
2. Drop redundant ctor and set() that duplicate QueryInterface.
3. Allow ThrowIfFailed without a message.

Change-Id: I75b545e534efb7e57da131dfd40a2a49d204efac
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198033
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
2026-01-24 13:36:50 +01:00
Mike Kaganski 38014fe3ef Change COMReference::QueryInterface a bit
Use IID_PPV_ARGS, to avoid dependence on specific implementations
of MS COM interfaces.

Before this, it relied on QueryInterface taking one argument, which
is a specific inline method implemented in <Unknwnbase.h>.

Change-Id: I1386fb75893cf8f9a1063a3a802d50c9623a1416
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198031
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
2026-01-24 09:46:36 +01:00
Michael Stahl c649a09c73 ucb: webdav-curl: print SAL_WARN if no CA certificates are found
Apparently nothing prints the exception message, so make sure this
config issue is visible in logs.

Change-Id: Idfb18e2fe42aa7bdcc1c8029833657bb8269b980
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196860
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
(cherry picked from commit 4b007c890995d143cb8916db8b23773d6935e3fc)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196907
Reviewed-by: Michael Stahl <michael.stahl@collabora.com>
Tested-by: Jenkins
2026-01-12 12:13:31 +01:00
Mike Kaganski 6b6f8ca3dd Factor out and simplify COM-safe wait
Before commit 1e2e51607a (Try to use
CoWaitForMultipleHandles magic to handle COM message loop, 2025-01-10)
osl_waitCondition didn't adjust the timeout value in the COM message
processing loop. The abovementioned commit started to use a function
that pumps the message loop itself, but the code for manual pumping
wasn't removed (it has (likely) became dead).

This drops the dead code, and deduplicates the rest.

Change-Id: I0f7bbf8220792fbe42178c2689a065b5f38645d6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180069
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2025-01-10 14:12:52 +01:00
Mike Kaganski 158e43c438 Fix naming of the argument
Change-Id: Ice5ab90ddfee0e1273e0607cb1c3251b1435b6dd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179924
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
2025-01-08 07:31:40 +01:00
Mike Kaganski b083e27de5 GetCurrentPackageFullName is available in the baseline Windows 10
Change-Id: Ie5d46f6a53af9a9a68ae98d4de28021fa1ee7eaf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178088
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-12-08 16:56:00 +01:00
Caolán McNamara 31d2e0e7b4 map LO_CERTIFICATE_AUTHORITY_PATH to CURLOPT_CAPATH
curl has both CURLOPT_CAINFO for the single-file collection
of certificates case and CURLOPT_CAPATH for the multi-file
exploder view of certificates, this adds support to
use CURLOPT_CAPATH as well as CURLOPT_CAINFO

Change-Id: I28163bbe81fa389eea70ef1289ed04a50a029c5f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168825
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172327
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-08-23 21:52:02 +02:00
Mike Kaganski 02c0e5f970 Simplify BSTR construction from OUString a bit
Use the known string length into account (and I definitely like to
not rely on the undocumented implementation detail that OUString is
null-terminated).

Change-Id: I0e7478d25e802f8f8e31f02cf8d77613c1325bc9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172170
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-08-21 12:15:36 +02:00
Stephan Bergmann e180d2a8fd Emscripten: Enable the WebDAV UCP
*  Which also requires external/curl.  But implicitly use --without-gssapi,
checking for it in configure.ac would fail with

> configure: error: could not find function 'gss_init_sec_context' required for GSSAPI

And building ExternalProject_curl needs to see the -pthread from
gb_EMSCRIPTEN_CPPFLAGS, otherwise linking Executable_soffice_bin would fail with

> wasm-ld: error: --shared-memory is disallowed by libcurl_la-easy.o because it was not compiled with 'atomics' or 'bulk-memory' features.

*  By default, GetCABundleFile in include/systools/opensslinit.hxx will fail
now.  (But to make https work, applications could bring along their own such
file in the Emscripten FS, in one of the places where GetCABundleFile checks for
it.)  So, for Emscripten only, make failure of GetCABundleFile non-fatal in
InitCurl_easy.

*  Some code in sw was erroneously hidden behind !ENABLE_WASM_STRIP_EXTRA (off
by default for Emscripten), but is needed with HAVE_FEATURE_CURL.

*  See <https://emscripten.org/docs/porting/networking.html> for how to actually
use networking in an Emscripten application.

Change-Id: I2bbe9f3fd0e20143e18eb1e8104568b1c7a304de
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172167
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2024-08-21 11:20:54 +02:00
Andrea Gelmini 15f015b17a Fix typo
Change-Id: I362a6a0802c27d273228725c9023092b7909cdec
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170642
Reviewed-by: Andrea Gelmini <andrea.gelmini@gelma.net>
Tested-by: Jenkins
2024-07-18 19:18:30 +02:00
Mike Kaganski 69586e8381 UI tests: use a dedicated desktop on Windows
Similar to commit 1f24d35033 (cppunittester:
use a dedicated desktop on Windows, 2023-07-09), this change allows to run
UI tests on Windows without them interferring with what you are doing.

The code testing LIBO_TEST_DEFAULT_DESKTOP environment variable to avoid
the separate desktop, and creating it, is extracted to a new function in
systools.

Change-Id: I6df3cb4ae581ae289e49b47d3135d01f632fbd95
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170615
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-07-17 18:13:19 +02:00
Mike Kaganski 6144341c8e Add source location to ComError
And use in CSysShExec::execute to improve location reporting

Change-Id: I624df0418b99a79207f5aeefa38d2bfe5ea7ffe1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169880
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
2024-07-02 20:18:04 +02:00
Mike Kaganski 2467e7c874 Simplify a bit
Change-Id: I97277866d1a81854b45ddb8403f2efaa67215f76
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169868
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-07-02 20:17:44 +02:00
Andrea Gelmini 102cbf4626 Fix "lets" -> "let's"
Change-Id: I01968fc18b093dbbc27213f01c3da38ae151c62c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169748
Reviewed-by: Andrea Gelmini <andrea.gelmini@gelma.net>
Tested-by: Jenkins
2024-06-29 17:22:12 +02:00
Noel Grandin d573e2ae17 loplugin:ostr in various
Change-Id: I9f399b3752da9df930e0647536ffcd4e82beb1ac
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167856
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-05-20 22:09:56 +02:00
Caolán McNamara 25a5b9b136 Related: tdf#157480 use SSL_CERT_FILE on macOS too
for SSL use by pyuno emailmerge

another alternative mechanism that could work is to generate one
with something like: "security find-certificate -a -p > cert.pem"
ref: https: //hynek.me/articles/apple-openssl-verification-surprises/

Change-Id: I8bff2ca5bbbb4f2c2333a67e0281dd4fa0b06405
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165599
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-04-02 12:49:25 +02:00
Mike Kaganski 8f6b412581 Define a name for the extended path buffer size, instead of a literal
Change-Id: If6d40c818e021b3241d6b6b33aceca07c6393511
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163926
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-02-26 05:59:10 +01:00
Eike Rathke 7b2166c821 Fix build --with-system-openssl but --without-system-curl
Change-Id: I60e2e995a159ebbbdc0991204d765b5654d5a4fc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160510
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Jenkins
2023-12-09 12:50:32 +01:00
Caolán McNamara bb8ed67114 fix build with older curl
Change-Id: I167a92c116fba8c92347d09e3078b70f4f4aef4d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159360
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Tested-by: Jenkins
2023-11-13 15:28:51 +01:00
Mike Kaganski f5926c8cfb Move user agent initialization to InitCurl_easy
Places that didn't initialize it previously, would benefit automatically

Change-Id: I2f1ff25fc58d9378462072bc92d7b37be2370fc8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159299
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-11-11 08:42:57 +01:00
Mike Kaganski 8843e4c441 Simplify a bit
Change-Id: I4be66ff1ea2a15d3345134f4131bd0fabb5de9ec
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152028
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-05-21 12:12:24 +02:00
Mike Kaganski 8de1bf3674 Introduce sal::systools::CoTaskMemAllocated to use RAII for CoTaskMemFree
Change-Id: I5553138bfc8dd989e68b8bcc2be981746e8c1e84
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150783
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-04-22 17:45:40 +02:00
Mike Kaganski bc9e978a5d Hide Quickstarter from General options in Windows store apps
In that environment, the shell:Startup shortcut created by us points to the
quickstart.exe under Program Files\WindowsApps\<StoreSpecificAppDir>\program.
The resulting shortcut can't launch, because of an inaccessible part in the
path (the protected WindowsApps directory). So the feature does not work in
the dialog.

Windows store apps should advertise the Windows startup task in the manifest.
Let's just hide the dialog entry in this case. A possible TODO would be to
provide a button instead, which would open the Startup Apps system applet,
similar to what we do for Default apps for file associations.

Change-Id: Ieafdf6d23ced96506b01c6b3cf9fb12904696df1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147735
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-02-26 11:19:46 +00:00
Mike Kaganski 3fc2c054c5 Fix build in a specific VS2022 environment
Building Executable_odbcconfig using VS2022 failed for me reproducibly
for some time, with

  mt.exe : general error c101008d: Failed to write the updated manifest to the resource of file "C:/lo/src/build/instdir/program/odbcconfig.exe". The file or directory is corrupted and unreadable.
  make[1]: *** [C:/lo/src/core/dbaccess/Executable_odbcconfig.mk:10: C:/lo/src/build/instdir/program/odbcconfig.exe] Error 139

It is caused by linking odbccp32, and legacy_stdio_definitions required
by the latter with current versions of UCRT.

It seems to work OK for others; but being unable to find what's different
on my system, I have this workaround, using run-time loading instead.

Change-Id: Iab1fe7747ca6e677d89a120778ca805465a05611
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147627
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-02-24 17:05:49 +00:00
Mike Kaganski 1786ddbde4 Fix build in a specific VS2022 environment
Building CppunitTest_basic_macros using VS2022 failed for me reproducibly
for some time, with

  make[1]: *** [C:/lo/src/core/solenv/gbuild/LinkTarget.mk:841: C:/lo/src/build/workdir/LinkTarget/CppunitTest/test_basic_macros.dll] Error 139

It is caused by linking odbccp32, and legacy_stdio_definitions required
by the latter with current versions of UCRT.

It seems to work OK for others; but being unable to find what's different
on my system, I have this workaround, using run-time loading instead.

Change-Id: Ic4094398f7510bc281dfa96f980f29f12f09d7ba
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147626
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-02-24 17:05:43 +00:00
Mike Kaganski a2c3ef6d81 Move BSTR wrapper to systools, and fix some wrong BSTR uses
BSTR is documented [1] to be prefixed by a 32-bit integer specifying
its length *in bytes* (not characters), so passing wchar_t* as BSTR
is wrong, and the length member of rtl_uString can't substitute the
proper BSTR length, since rtl_uString::length specifies length in
characters. Any code taking BSTR and using SysStringLen to get its
length would only get half of the passed OUString data.

In dbaccess/source/ui/dlg/adodatalinks.cxx, the abovementioned
error was implemented. OTOH, OLEVariant::getByteSequence() in
connectivity/source/drivers/ado/Aolevariant.cxx passed BSTR from
tagVARIANT to ctor of OLEString, which resulted in the BSTR being
freed in both dtors of OLEString and OLEVariant (the latter calls
VariantClear, which itself clears string when vtfield is VT_BSTR).

[1] https://docs.microsoft.com/en-us/previous-versions/windows/desktop/automat/bstr

Change-Id: Iedbd62b20133644258af3660616add7b63cac258
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131950
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-03-22 22:23:56 +01:00
Mike Kaganski 561cb62a5a Simplify CoCreateInstance / CoGetClassObject with COMReference
Change-Id: Ieb1035410c3c6c4b40ea779e829a940460d19b5a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131922
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-03-22 09:01:58 +01:00
Mike Kaganski 28de720bc0 Use IID_PPV_ARGS to have less explicit casting
Change-Id: Id8839a68320d7d0e2453b3d584dc5708c653cdf2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131863
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-03-21 22:54:37 +01:00
Mike Kaganski 809d1e206f Simplify COMReference a bit
Use ThrowIfFailed and small refactor

Change-Id: I0bcd57c26cd169380364cdaaaa76e764b9662d07
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128362
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-01-13 08:06:04 +01:00
Mike Kaganski c35f81148f Use sal::systools::CoInitializeGuard and sal::systools::ThrowIfFailed
Change-Id: Ifb40e7672671df03b5ffc89905ad1e7b68451b68
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127232
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-12-21 17:03:30 +01:00
Mike Kaganski 996610352f Use sal::systools::COMReference in getAdoDatalink
Change-Id: If0c474209da5390c0c6e28c11ca26a1c915ab51f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127218
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-12-21 13:45:55 +01:00
Mike Kaganski cb2d87c97b Use sal::systools::COMReference in connectivity/ado
Change-Id: Ic3c59f70cf0e1ed0020bf4f11d7dee14c69f2119
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127189
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-12-21 09:22:44 +01:00
Mike Kaganski 44406d90e6 Introduce move ctor/assignment for sal::systools::COMReference
Change-Id: I063a1d4a42eb28e2b81956b9b2baefaad3208234
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127190
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-12-21 08:00:55 +01:00
Mike Kaganski 64e46c7cb0 Introduce sal::systools::COMReference::TryCoCreateInstance
Helps fixing uncaught exceptions introduced in commit
00eb9b8954.

TryCoCreateInstance returns HRESULT, because it allows to pass the info
to the caller, which must check the result (either HRESULT, or validity
of the reference) anyway.

In case of failure, the previous contents of com_ptr_ is kept, which
would be consistent with existing code in connectivity/ado replaced in
a follow-up patch.

Change-Id: I4c94695de96861ec312247acaa0c8fd35a23010a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127192
Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-12-21 07:31:55 +01:00
Mike Kaganski a8a07cea28 Use sal::systools::COMReference and drop ComSmart
Change-Id: Ic6e0c87f607264629cdec1fdcd0c3144d8fbf8e6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123695
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-10-16 17:24:08 +02:00
Luboš Luňák d5ec688e4b use prewin.h/postwin.h around a win32 header
Change-Id: I45051b003defa7e48358abeff3944accf16849a2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120995
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2021-08-25 11:36:36 +02:00
Stephan Bergmann f416acdc3a systools is no longer part of the URE interface
...since de030cd7a2 "gbuild: Remove MSVC 2013
legacy code", so no longer treat it as such in compilerplugins.  (Which caused a
few loplugin:includeform and loplugin:nullptr warnings.)

Change-Id: I99b42e76992e31aff56b417c05738d4d29e3faf9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112575
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-03-16 14:53:44 +01:00
Stephan Bergmann 674bbddf72 Missing "template" (clang-cl)
> In file included from C:/lo-clang/core/vcl/win/dtrans/FmtFilter.cxx:37:
> C:/lo-clang/core/include\systools/win32/comtools.hxx(72,30): error: use 'template' keyword to treat 'QueryInterface' as a dependent template name [-Werror]
>             : COMReference(p.QueryInterface<T>(t))
>                              ^
>                              template

Not sure why this only started to show up now with my clang-cl build on Windows.
(The Clang warning itself is available ever since <https://github.com/llvm/
llvm-project/commit/4e7a2c09b22bb04819702ac6b8ea8b59ca396fa5> "Improve recovery
(error + fix-it) when parsing type dependent template name without the
'template' keyword" from 2011; its "Also the error is downgraded to an ExtWarn
in Microsoft mode." implies that not requiring the "template" here is a non-
standard MSVC extension.)

Change-Id: I4f8e9d6fa80871fdd212417c1b935d76ffde34c0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112192
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-03-09 13:17:02 +01:00
Mike Kaganski eef43192d4 Improve unit test accuracy
I didn't take clock resolution into account when created the test,
and it failed for me occasionally because the value was slightly
less than expected.

The typical system tick resolution is documented at
https://docs.microsoft.com/en-us/windows-hardware/drivers/kernel/high-resolution-timers

Change-Id: Ie48b10d15b14f9ac7d292a2cc9916bcbfff44b6f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111946
Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-03-04 09:50:48 +01:00
Mike Kaganskiandjasonkres cf1c835e80 tdf#116983 tdf#136175: retry if failed
Debugging the test case from the latter bug report shows that indeed
the call to OleGetClipboard may fail first time, as jasonkres had
suspected in the former bug. So follow the suggestion in tdf#116983,
and retry the failing calls several times in case of failure.

Many thanks to Telesto for preparing a clear bug report with reliable
test case.

Co-authored-by: jasonkres

Change-Id: Ib3c497da830bc5faac586bcfe1eededa54bfa117
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111825
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-03-03 11:29:45 +01:00
Mike Kaganski ed40d477b2 Drop ComPtr and use sal::systools::COMReference
Change-Id: I9eb6d99d883b44943ad69c2c28d4e55716dc34f9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111673
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-02-27 11:05:00 +01:00
Mike Kaganski f3fab0832b Drop the include
unused since commit e1e261fef3,
which dropped checks for macros from the include

Change-Id: I746f7f93efbcc950fe84f9419e6931471be0ff8a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111693
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-02-27 10:58:59 +01:00
Mike Kaganski 881174442b Slightly simplify COMReference
Change-Id: I6447dbdc3e2549d0e55feeee80249bdf75924ca8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111466
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-02-26 07:55:25 +01:00
Philipp Hofer 01baeab998 tdf#123936 Formatting files in module include with clang-format
Change-Id: I0507dd797cd5a35e0ae14f4b69ee4e172d08a71a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105681
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Tested-by: Jenkins
2020-11-21 13:19:17 +01:00
Mike Kaganski ee4a456d91 sal: MSVC: pragma warning: make more specific, remove obsolete
Change-Id: Ib7ad23257a966447d627b4f73698d9298790f759
Reviewed-on: https://gerrit.libreoffice.org/49042
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-02-02 06:02:48 +01:00
Stephan Bergmann 6092fd425f loplugin:includeform: systools (Windows)
Change-Id: If0eee76e3f2844718718906da403e3c09a4688f8
2017-10-27 19:28:50 +02:00