summaryrefslogtreecommitdiff
path: root/extensions
AgeCommit message (Collapse)Author
2022-05-24Use o3tl::make_unsigned in some placesStephan Bergmann
...where a signed and an unsigned value are compared, and the signed value has just been proven to be non-negative here Change-Id: I20600d61a5d59d739bc1bee838c0038e4611aec2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134875 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-05-24tdf#149096: don't translate "Get" and "Post" submit methodsJulien Nabet
Change-Id: I4427618dad0c168642225eaaf828a96e37936d8f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134718 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-05-05loplugin:unusedvariableplusNoel Grandin
Change-Id: Id93086be1224b6f6bf0bdaa1d50b4f289099027e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133876 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-05use more o3tl::getTokenNoel Grandin
found by inspecting call sites of OUString::getToken Change-Id: I4269c7476c7aa46fac39528227e350568f0eb34a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132644 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-04Just use Any ctor instead of makeAny in extensionsStephan Bergmann
Change-Id: I0441d30044168563b0d5b8406fcc99b51a9cbc1e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133817 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-05-04Just use Any ctor instead of makeAny (macOS)Stephan Bergmann
Change-Id: I6c185eecf943205f78567393f0ef588580ee4dab Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133821 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-05-03add o3tl::equalsAsciiNoel Grandin
Change-Id: I042b8dcadbf7581de325c161763fe35aecde5ca2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133694 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-01use more string_view in variousNoel Grandin
found by examining uses of OUString::copy() for likely places Change-Id: I6ff20e7b273ad6005410b82719183c1122f8c018 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133617 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-29use more string_view in INetURLObjectNoel Grandin
Change-Id: I4462f7cf4740fa4d1b129d76a0775f4250f41bbd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133555 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-19loplugin:stringviewparamStephan Bergmann
Change-Id: I8f27a2260e7195dd0a7dbb0b5e3dd0064ef06c81 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133164 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-04-13loplugin:stringviewparam whitelist some more functionsNoel Grandin
for which we have o3tl:: equivalents Change-Id: I4670fd8b703ac47214be213f41e88d1c6ede7032 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132913 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-11loplugin:stringview add check for getToken().toInt32Noel Grandin
where we can convert that to o3tl::toInt32(o3tl::getToken( and avoid the heap allocation of a temporary string Change-Id: Ib11c19c6e6cdc0de3e551affd3578d181e292de4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132810 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-10loplugin:stringview check for getToken and trimNoel Grandin
since we now have o3tl versions of those that work on string_view. Also improve those o3tl functions to support both string_view and u16string_view Change-Id: Iacab2996becec62aa78a5597c52d983bb784749a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132755 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-03-31Resolves: tdf#117159 don't crash with chart selected in database report editCaolán McNamara
Change-Id: I770008bf0a775c108019c2005b6ec73ee9702a19 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132337 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-03-28-Werror,-Wunused-but-set-variableStephan Bergmann
...since f1702aa8e46d63b85cc16e550c96b79509057c89 "INTEGRATION: CWS oj14". (Maybe the odd code was there to allow breaking on it with a debugger, and the original author wondered whether TypeClass_CONSTANT can actually happen here, which it probably can not, so it should probably be replaced with O3TL_UNREACHABLE, but that's left for a follow-up.) Change-Id: I97881b1b35f7de3940400c50b58eb08ca9a746a7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132226 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-03-22Move BSTR wrapper to systools, and fix some wrong BSTR usesMike Kaganski
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-22Simplify CoCreateInstance / CoGetClassObject with COMReferenceMike Kaganski
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-11use more SfxItemSet::GetItemIfSetNoel Grandin
Change-Id: I58af59d82d92c89ca1939d35f9fb4121b6815559 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131336 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-03-11loplugin:trivialdestructorStephan Bergmann
Change-Id: Id8a35dbbc1eecd2f568f253ddea5cb7ca3064ecd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131341 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-03-07do not pass XComponentContext to officecfg::...::get() callsLuboš Luňák
It's used only for the ConfigurationWrapper singleton, so it's used only the first time and then ignored. It also causes calls to comphelper::getProcessComponentContext() for every single invocation despite the value not being needed, and the calls may not be cheap (it's ~5% CPU during ODS save because relatively frequent calls to officecfg::Office::Common::Save::ODF::DefaultVersion::get()). Change-Id: I02c17a1a9cb498aeef220ddd5a0bde5523cb0ffb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131056 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-02-06Simplify sequence of PropertyValue in cui/editeng/extensionsJulien Nabet
Change-Id: I0c8f46d2671f3623ff3dd1ee6ec84cde7db41003 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129580 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-02-04use some more add toId/fromIdCaolán McNamara
Change-Id: I3a21e2aa5a2c482c0bac1d4c9bf84f8b56261408 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129492 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-02-04add toId/fromId to tidy up some ugly castingCaolán McNamara
Change-Id: I70f34ac5e9b5d2f2d6c0375e823908eaa2e540b2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129487 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-02-04Resolves: tdf#146997 use sal_Int64 instead of sal_Int32 for spinbutton valuesCaolán McNamara
for these cases where draw wants to massively scale the units the underlying "metric conversion" are already using sal_Int64 anyway Change-Id: I94e120d72644319548f75b2f68cfe60d4829a2e8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129356 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-01-29gtk4: remove unwanted caps-lock-warning from GtkSpinButtonCaolán McNamara
Change-Id: I723b13a5b012a89379cf6984a2b0fdd44ae932f5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129148 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-01-25Related: tdf#146971 remove %PRODUCTNAME from accessible-descriptionCaolán McNamara
Change-Id: I83ff18c8b5e95fa172de950eb351cbfd855c9d5d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128919 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-01-24gtk4: adapt to window_[g|s]et_default_widgetCaolán McNamara
Change-Id: I916e5db05f8ea10ecc8b319cc77a671ca7cbcb93 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128859 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-01-24tdf#46037 remove configurationhelper from WinUserInfoBeDhiraj Holden
Change-Id: I7d23fe4f32c3b67304103ca88a757529ba4faa09 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128508 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-01-20Fix typoAndrea Gelmini
Thanks a lot to Valter Mura: https://listarchives.libreoffice.org/global/l10n/2022/msg00005.html Change-Id: I37467e1b9ba7cba2553be5df0d8324da8fe6c13b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128303 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-01-20WASM --enable-wasm-strip now skips lots of LO codeArmin Le Grand (Allotropia)
... resulting in a stripped-down, Writer-only build to decrease the resulting WASM bytecode size. It removes the following code from the build: * All other major modules: Base, Calc, Chart, Draw, Impress and Math and related writerperfect filters * The premultiply tables * The (auto-)recovery functionality * All accessibility (but not the accessibility document checker) * The LanguageGuess component * EPUB support * The start center / BackingWindow * The TipOfTheDay functionality * The splash screen communication Currently crashs with anything different then soffice --writer. Closing the document also still crashes. FYI: many of these features are now behind ENABLE_WASM_STRIP_* defines, but they normally don't work on their own, globally! That's because we started with stripping the main components. Change-Id: Ib9c0f9452815910c0a2aceaf142ba1ad4a9cb0d7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126182 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2022-01-17Recheck modules [e-f]* with IWYUGabor Kelemen
See tdf#42949 for motivation Change-Id: I49a3ce10dee4b03f99156f5b641f69448e1d5617 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128479 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2022-01-15include memory for std::unique_ptrCaolán McNamara
Change-Id: I63aa82b45f3dfcfd89d5d655eae3b347c1092af4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128470 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-01-12gbuild: build static LO / link static executablesJan-Marek Glogowski
This allows to build a complete static LibreOffice on Linux, except for linked externals. Since LO's static build implies disabled dynamic loading, one must select one VCL backend to be compiled in. See the (large) comment in solenv/gbuild/static.mk trying to explain, why this implementation was chosen (spoiler: seems there is no other way) and what is actually implemented. This will collect all libraries, statics and externals of executables. If the executable uses components, it will get linked to all static components. While it works with any Executable, it just makes sense for soffice.bin, because the static component map sucks every dependency in, bloating most other binaries. In theory on could generate the dependencies based on the list of used components (see gb_CppunitTest_use_components), then generate a specific static constructor map, directly include it in the exe's cxx code and then link the minimal dependencies. The static LO should build on Linux with: --enable-customtarget-components --disable-dynamic-loading Tested VCL plugin config is: --disable-gtk3 --disable-gen --enable-qt5 The partial build support is split into a 2nd patch. Change-Id: Iafc95752fae9e88095f54a21f1e30a4f080815e2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126790 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2022-01-05Use GetModuleHandleExW instead of GetModuleHandleWMike Kaganski
... and find directory cearching for path separator. Also drop obsolete code related to Windows XP and mingw. Change-Id: Ib48cfeea8a2ae01d3f8b37728ce1e8ca4aa73b14 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128017 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-01-04Drop also commented-out obfuscated SAL_DEBUG callsTor Lillqvist
Change-Id: I7bc8ee2e5e989e41fcc0b6f96c5b2b8f151cdd3d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127937 Tested-by: Tor Lillqvist <tml@collabora.com> Reviewed-by: Tor Lillqvist <tml@collabora.com>
2022-01-02Introduce OUString::unacquired(const OUStringBuffer&)Mike Kaganski
... and avoid OUStringBuffer::toString when the temporary is used for checking current buffer content Change-Id: I114178f3e74ca3e4a3e517763f9eaab4797b7deb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127478 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-12-24new comphelper::WeakImplComponentHelperNoel Grandin
to replace the cppu:: equivalent with a lightweight version that uses std::mutex instead of osl::Mutex Change-Id: I1b7873a0c2d9cda21f529e43a4ac2fa7574c91a5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127335 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-12-21loplugin:flatten in editeng..extensionsNoel Grandin
Change-Id: Ica8f0a6e3d30dba3b5a083e3c04522073de8303f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127233 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-12-21Use sal::systools::CoInitializeGuard and sal::systools::ThrowIfFailedMike Kaganski
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-19use more cppu::BaseMutexNoel Grandin
Change-Id: Iddd7438161ead93b27cf8e8058ca5b1eae3d8001 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127075 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-12-18Simplify BSTR RAIIMike Kaganski
Change-Id: I0eaff245a4f5dec9c86ab2c04a329e0d2a7edca5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126984 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-12-18Drop CoIfPtr and use sal::systools::COMReferenceMike Kaganski
Change-Id: Ie6433bb65b4c0a799c98a44c67a708356a5eedef Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126983 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-12-10more ofz#42182 oss-build failureCaolán McNamara
Change-Id: I8960db6c013911df26b35623814c5586ce8c3d00 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126642 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-12-10ofz#42182 oss-build failureCaolán McNamara
possibly since: commit db3a61cd958f4a70417929cf8e1fa9bfd0bfe5a3 Author: Stephan Bergmann <sbergman@redhat.com> Date: Thu Dec 9 10:15:05 2021 +0100 Generally determine Rdb content from gb_*_set_componentfile calls (?) Change-Id: I947b0dff174ef437750889fb6cc84c8dfa54e7f2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126638 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-12-10remove use of non-existing slot:6661Caolán McNamara
seeing as this call does nothing since ~2006 see: commit 01552f1e77c67f70ffd879294288612f9ab64e3b Author: Stephan Bergmann <sbergman@redhat.com> Date: Fri Oct 17 16:58:26 2014 +0200 SID_TOGGLE_MENUBAR (aka slot:6661, .uno:MenuBarVisible) is dead ...since introduction of XLayoutManager's private:resource/menubar/menubar in 3fb2acf5b77bff59909f616c44c7de17048b64d7 "INTEGRATION: CWS layoutmanager (1.52.10); FILE MERGED" etc. and final removal of SID_TOGGLE_MENUBAR bits in f605b16e395e8ccc3d1aba7907b0792039016f69 "INTEGRATION: CWS sfxcleanup (1.119.8); FILE MERGED" etc. What still needs fixing are extensions/source/activex/SOActiveX.cxx odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/CustomizeView.java odk/examples/OLE/activex/SOActiveX.cpp in a similar way as e.g. 0273d3d81d29d5c1f6c387cca633cd99722c100e "INTEGRATION: CWS jl18 (1.6.8); FILE MERGED." these uses remain outstanding: odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/CustomizeView.java odk/examples/OLE/activex/SOActiveX.cpp Change-Id: Iad43b5adc6ae24e6d794ebef10ed7df476b4e5dd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126622 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-12-10Generally determine Rdb content from gb_*_set_componentfile callsStephan Bergmann
...instead of by listing the content somewhat redundantly in the Rdb_*.mk files, to avoid duplication of logic for components that are only built conditionally (and thus should only be included conditionally in the corresponding Rdb). To achieve that, add an "rdb" parameter to gb_ComponentTarget_ComponentTarget (and to the gb_*_set_componentfile macros that internally call gb_ComponentTarget_ComponentTarget), which is used to make the appropriate gb_Rdb_add_component call internally from within gb_ComponentTarget_ComponentTarget. (As a special case, gb_CppunitTest_set_componentfile shall not call gb_Rdb_add_component, as that has already been done by the corresponding gb_Library_set_componentfile call, so allow the gb_ComponentTarget_ComponentTarget "rdb" parameter to be empty to support that special case.) Most Rdb_*.mk files are thus mostly empty now. One exception is i18npool/Rdb_saxparser.mk, which duplicates some of the Rdb_services content as needed during the build in CustomTarget_i18npool/localedata. 1c9a40299d328c78c035ca63ccdf22c5c669a03b "gbuild: create services.rdb from built components" had already tried to do something similar (in addition to other things) under a new --enable-services-rdb-from-build option. However, that approach had four drawbacks that this approach here addresses (and which thus partly reverts 1c9a40299d328c78c035ca63ccdf22c5c669a03b): 1 Rdb_services shall not contain the component files of all libraries that are built. While that commit filtered out the component files that go into Rdb_ure/services (ure/Rdb_ure.mk), it failed to filter out the component files that go into others like Rdb_postgresql-sdbc (connectivity/Rdb_postgresql-sdbc.mk). 2 The code added by that commit to Makefile.gbuild codified the knowledge that there is an Rdb_services, which is brittle. 3 The code added by that commit to solenv/gbuild/Rdb.mk codified the knowledge (for gb_Rdb__URECOMPONENTS) that there is an Rdb_ure/services, which is brittle. 4 Introducing an --enable-services-rdb-from-build option needlessly provided two different ways how the content of Rdb_services is assembled. The changes done here would leave --enable-services-rdb-from-build as a misnomer, as it no longer controls how Rdb_services is assembled. I thus renamed it to --enable-customtarget-components, as that is apparently what it still does now. Change-Id: Ia5e8df4b640146c77421fcec6daa11a9cd260265 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126577 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-12-06cid#1494595,1494597: Silence UNCAUGHT_EXCEPTStephan Bergmann
...after aa5ee0085c7d8b8713f4dbed0009b38b9fabb281 "Stop swallowing exceptions in ~ScopeGuard" had dropped the catch blocks from ~ScopeGuard to make it usable in Library_salhelper in 0c1c300ed7ce168755ae945822eb7a1c610cfa25 "Rather use ScopeGuard to prevent catch and rethrow". But using the original suppress_fun_call_w_exception, which used css::uno::Exception, would have caused the same circular-dependency issue again that aa5ee0085c7d8b8713f4dbed0009b38b9fabb281 had solved, so drop the use of css::uno::Exception (and SAL_WARN, which triggered a number of missing #include <sal/log.hxx>) also from suppress_fun_call_w_exception. After all, that was __COVERITY__-only code that wasn't meant to be actually run, so it shouldn't matter if we just catch everything and silently terminate. Change-Id: If28a214709e4636e1c23a49f2d95d87c91492f14 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126404 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-12-03replace comphelper::OListenerContainer with OInterfaceContainerHelper3Noel Grandin
OInterfaceContainerHelper3 is in wide use and can do the same thing with less ceremony Change-Id: I5252738d6b7bda6245c66da46352944ead79bd52 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126271 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-30Improve an snprintf printing css::util::DateTime membersStephan Bergmann
...to avoid GCC 12 trunk > extensions/source/logging/csvformatter.cxx: In member function ‘virtual rtl::OUString logging::{anonymous}::CsvFormatter::format(const com::sun::star::logging::LogRecord&)’: > extensions/source/logging/csvformatter.cxx:241:70: error: ‘%02i’ directive output may be truncated writing between 2 and 5 bytes into a region of size between 0 and 14 [-Werror=format-truncation=] > 241 | snprintf( buffer, buffer_size, "%04i-%02i-%02iT%02i:%02i:%02i.%09i", > | ^~~~ > extensions/source/logging/csvformatter.cxx:241:44: note: directive argument in the range [0, 65535] > 241 | snprintf( buffer, buffer_size, "%04i-%02i-%02iT%02i:%02i:%02i.%09i", > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > extensions/source/logging/csvformatter.cxx:241:44: note: using the range [-2147483648, 2147483647] for directive argument > extensions/source/logging/csvformatter.cxx:241:21: note: ‘snprintf’ output between 30 and 49 bytes into a destination of size 31 > 241 | snprintf( buffer, buffer_size, "%04i-%02i-%02iT%02i:%02i:%02i.%09i", > | ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > 242 | static_cast<int>(record.LogTime.Year), > | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > 243 | static_cast<int>(record.LogTime.Month), > | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > 244 | static_cast<int>(record.LogTime.Day), > | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > 245 | static_cast<int>(record.LogTime.Hours), > | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > 246 | static_cast<int>(record.LogTime.Minutes), > | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > 247 | static_cast<int>(record.LogTime.Seconds), > | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > 248 | static_cast<int>(record.LogTime.NanoSeconds) ); > | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Change-Id: I426fd6c54b69c7dcc2153167961295c3bc5cf91f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126116 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-11-25remove unused defines and convert some to OUStringLiteralNoel Grandin
Also remove the associated links.txt entries Change-Id: I5028fab2feb828875a0b772418fc29cbdfe4ce72 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125773 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>