554 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
Stephan Bergmann 0e44a3a894 Some bogus warnings still hit with recent GCC trunk
...towards GCC 16

Change-Id: I6d6acf7ba9373f94dfbd7aef6ad2ff44e1932791
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188461
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
2025-07-28 15:32:05 +02:00
Stephan Bergmann 5add8fd404 Silence bogus GCC -Wmaybe-uninitialized
> In file included from idl/source/cmptools/lex.cxx:22:
> In member function ‘SvToken& SvToken::operator=(const SvToken&)’,
>     inlined from ‘void SvTokenStream::FillTokenList()’ at idl/source/cmptools/lex.cxx:92:35:
> idl/inc/lex.hxx:35:7: error: ‘<anonymous>.SvToken::<anonymous>’ may be used uninitialized [-Werror=maybe-uninitialized]
>    35 | class SvToken
>       |       ^~~~~~~
> idl/source/cmptools/lex.cxx: In member function ‘void SvTokenStream::FillTokenList()’:
> idl/source/cmptools/lex.cxx:92:35: note: ‘<anonymous>’ declared here
>    92 |                 *pToken = SvToken();
>       |                                   ^
> In member function ‘SvToken& SvToken::operator=(const SvToken&)’,
>     inlined from ‘void SvTokenStream::FillTokenList()’ at idl/source/cmptools/lex.cxx:101:31:
> idl/inc/lex.hxx:35:7: error: ‘<anonymous>.SvToken::<anonymous>’ may be used uninitialized [-Werror=maybe-uninitialized]
>    35 | class SvToken
>       |       ^~~~~~~
> idl/source/cmptools/lex.cxx: In member function ‘void SvTokenStream::FillTokenList()’:
> idl/source/cmptools/lex.cxx:101:31: note: ‘<anonymous>’ declared here
>   101 |             *pToken = SvToken();
>       |                               ^

seen in optimizing LO builds using at least GCC 12
(<https://ci.libreoffice.org/job/gerrit_linux_gcc_release/192633/>) and GCC 15
(locally, gcc-15.1.1-2.fc42.x86_64) after upcoming
<https://gerrit.libreoffice.org/c/core/+/188236> "Make O[U]String default ctors
constexpr".

(And without adding the additional braces in the second code block, at least GCC
15 would emit an odd

> idl/source/cmptools/lex.cxx: In member function ‘void SvTokenStream::FillTokenList()’:
> idl/source/cmptools/lex.cxx:116:9: error: ‘else’ without a previous ‘if’
>   116 |         else if( pToken->IsEof() )
>       |         ^~~~

)

Change-Id: I171c746ea3f6035bc737b4bcd636dd063dd9186e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188265
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
Tested-by: Jenkins
2025-07-24 17:13:29 +02:00
Stephan Bergmann 445bbffffd SvToken assignment op can be implicitly defined
Change-Id: If689901b1fa813d9fab553224d4865f922794282
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188264
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
Tested-by: Jenkins
2025-07-24 13:24:38 +02:00
Caolán McNamara 4ceb8b2f27 fix build with MSVC >= 1931
It was too optimistic to think this worked on msvc

Change-Id: I66c85619d5ad1c93dbc2e03bdc228cf4d674ea88
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/187778
Tested-by: Jenkins
Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2025-07-12 19:49:42 +02:00
Caolán McNamara 11db9b5fd5 use constexpr for idl "a ... Slots_Impl" objects
after const clean up of the Slot* argument

objdump -t instdir/program/libsclo.so |grep -v data.rel.ro|grep \\\.data|c++filt|grep -v s_cd|wc

before: 96
after: 78

while:

pmap -px PID|grep 'rw.--'|grep -v anon|awk '{ sum+=$4 } END { print sum }'

for a --with-distro=CPLinux-LOKit build and spawned kit calc process from
2352 to 1860 pages

Change-Id: Ic0ea3e7934ac469f7c6225c252506adb5b62a4c2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/187742
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2025-07-12 11:19:47 +02:00
Caolán McNamara bc6ea55b41 use constexpr for idl "a ... Args_Impl" objects
objdump -t instdir/program/libsclo.so |grep -v data.rel.ro|grep \\\.data|c++filt|grep -v s_cd|wc

before: 115
after: 96
Change-Id: I880d1934d7794fb57567f1e542e8a4feff645a83
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/187651
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2025-07-11 18:30:35 +02:00
Mike Kaganski b42fad8a35 Use ReadLine taking OStringBuffer to reduce allocations
Change-Id: Ib180a1c67346eb6ce8cfbb6549b6e31e1b7911a7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/186073
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2025-05-31 16:53:45 +02:00
Mike Kaganski f3e81c95b1 tdf#62845: Introduce ViewerApp flag for slots, to hide in Viewer app mode
Some slots make sense in read-only files, when the application runs in
normal mode; but they make no sense in Viewer app mode. So this new flag
is orthogonal to the existing ReadOnlyDoc flag.

When it is FALSE, the respective command should not be active in the
viewer mode. The default is TRUE.

Change-Id: I5b5c75487fdf5a647aeab80129b6e84b42c00745
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177965
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
2024-12-11 11:42:54 +01:00
Caolán McNamara d7056b1456 cid#1558088 COPY_INSTEAD_OF_MOVE
and

cid#1558080 COPY_INSTEAD_OF_MOVE
cid#1558077 COPY_INSTEAD_OF_MOVE
cid#1558055 COPY_INSTEAD_OF_MOVE
cid#1558043 COPY_INSTEAD_OF_MOVE
cid#1558039 COPY_INSTEAD_OF_MOVE
cid#1558015 COPY_INSTEAD_OF_MOVE
cid#1558014 COPY_INSTEAD_OF_MOVE
cid#1558009 COPY_INSTEAD_OF_MOVE
cid#1558002 COPY_INSTEAD_OF_MOVE
cid#1557998 COPY_INSTEAD_OF_MOVE
cid#1557996 COPY_INSTEAD_OF_MOVE
cid#1557990 COPY_INSTEAD_OF_MOVE
cid#1557986 COPY_INSTEAD_OF_MOVE
cid#1557980 COPY_INSTEAD_OF_MOVE
cid#1557971 COPY_INSTEAD_OF_MOVE
cid#1557968 COPY_INSTEAD_OF_MOVE
cid#1557967 COPY_INSTEAD_OF_MOVE
cid#1557961 COPY_INSTEAD_OF_MOVE
cid#1557959 COPY_INSTEAD_OF_MOVE
cid#1557958 COPY_INSTEAD_OF_MOVE
cid#1557956 COPY_INSTEAD_OF_MOVE
cid#1557953 COPY_INSTEAD_OF_MOVE
cid#1557949 COPY_INSTEAD_OF_MOVE
cid#1557947 COPY_INSTEAD_OF_MOVE
cid#1557940 COPY_INSTEAD_OF_MOVE
cid#1557931 COPY_INSTEAD_OF_MOVE
cid#1557930 COPY_INSTEAD_OF_MOVE
cid#1557915 COPY_INSTEAD_OF_MOVE
cid#1557913 COPY_INSTEAD_OF_MOVE
cid#1557910 COPY_INSTEAD_OF_MOVE
cid#1557886 COPY_INSTEAD_OF_MOVE
cid#1557884 COPY_INSTEAD_OF_MOVE
cid#1557880 COPY_INSTEAD_OF_MOVE
cid#1557875 COPY_INSTEAD_OF_MOVE
cid#1557871 COPY_INSTEAD_OF_MOVE
cid#1557862 COPY_INSTEAD_OF_MOVE
cid#1557847 COPY_INSTEAD_OF_MOVE
cid#1557845 COPY_INSTEAD_OF_MOVE
cid#1557844 COPY_INSTEAD_OF_MOVE
cid#1557843 COPY_INSTEAD_OF_MOVE
cid#1557838 COPY_INSTEAD_OF_MOVE
cid#1557835 COPY_INSTEAD_OF_MOVE
cid#1557834 COPY_INSTEAD_OF_MOVE
cid#1557828 COPY_INSTEAD_OF_MOVE
cid#1557823 COPY_INSTEAD_OF_MOVE
cid#1557817 COPY_INSTEAD_OF_MOVE
cid#1557813 COPY_INSTEAD_OF_MOVE
cid#1557812 COPY_INSTEAD_OF_MOVE

Change-Id: I55d4a920daa2d148683419169eb828325fd3c757
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171732
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-08-11 20:14:54 +02:00
Caolán McNamara 1b61a652c1 cid#1556583 COPY_INSTEAD_OF_MOVE
and

cid#1556585 COPY_INSTEAD_OF_MOVE
cid#1556588 COPY_INSTEAD_OF_MOVE
cid#1556593 COPY_INSTEAD_OF_MOVE
cid#1556597 COPY_INSTEAD_OF_MOVE
cid#1556605 COPY_INSTEAD_OF_MOVE
cid#1556617 COPY_INSTEAD_OF_MOVE
cid#1556635 COPY_INSTEAD_OF_MOVE
cid#1556790 COPY_INSTEAD_OF_MOVE
cid#1556792 COPY_INSTEAD_OF_MOVE
cid#1556796 COPY_INSTEAD_OF_MOVE
cid#1556799 COPY_INSTEAD_OF_MOVE
cid#1556815 COPY_INSTEAD_OF_MOVE
cid#1556836 COPY_INSTEAD_OF_MOVE
cid#1556840 COPY_INSTEAD_OF_MOVE
cid#1556842 COPY_INSTEAD_OF_MOVE
cid#1556859 COPY_INSTEAD_OF_MOVE
cid#1556860 COPY_INSTEAD_OF_MOVE
cid#1556866 COPY_INSTEAD_OF_MOVE
cid#1556869 COPY_INSTEAD_OF_MOVE
cid#1556870 COPY_INSTEAD_OF_MOVE

Change-Id: I3df8698a4aecbb03999c084517e37e12ff46ee97
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171435
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-08-04 15:38:31 +02:00
Gabor Kelemen e1a351ca19 Remove now unneeded osl/diagnose.h
followup to commit 57c228803e

Change-Id: Iebfb23bb65e2bf898bf27f367cc9641f47a14cf3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167998
Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
Tested-by: Jenkins
2024-07-20 10:20:31 +02:00
Noel Grandin d4c0e39d93 make the slot data constinit
because it takes a surprising amount of time to initialise it
at runtime during startup

(*) have to convert the std::function in SfxType to a
function pointer, because the std::function constructor
is not constinit compatible.

(*) the SfxType0..SfxTypeN types need some reinterpret_cast
to work around the lack of zero-sized trailing arrays in c++

(*) Sadly MSVC does not support taking the address of symbols
in constinit structures, so we cannot make the SfxSlot
array constinit.

Change-Id: I300ee770cc115d30bc25c819f2ad34b29633876c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166963
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-05-02 14:37:56 +02:00
Noel Grandin b265b547b9 use more OUString in sfx slots
Change-Id: I900d9f1d35bc1e620822eedd5722a502704d6de0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166959
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-05-01 19:29:37 +02:00
Caolán McNamara ed3ce7bfeb WaE: C6011 Dereferencing NULL pointer warnings
Change-Id: I6eb8e490e878349f2063910e0cbc901aa7a6d524
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166942
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
2024-05-01 09:17:34 +02:00
Noel Grandin 44a819a466 Revert "add sm to --enable-mergelibs=more"
This reverts commit 87d3f768f3.

The unit test at
starmath/CppunitTest_starmath_qa_cppunit.mk
is doing
    $(eval $(call gb_CppunitTest_use_library_objects,starmath_qa_cppunit,\
        sm \
    ))
which it is using to access to all the internal functions of starmath.

Unfortunately that linking trick is just not compatible with the mergelib linking.

Change-Id: Ie3c81a0eeea5bed192de18981463497f251531a6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164730
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-03-12 20:39:20 +01:00
Noel Grandin 87d3f768f3 add sm to --enable-mergelibs=more
Which means

(1) We need to extend the weak linkage magic for the sfx2 SFX_TYPEMAP
stuff. Just make it unconditional, since it makes no difference for the
individual items.

(2) The initialisation of global const Sequence data in starmath stops
working, because it runs too early. Use function-local static to
initialise it on-demand

Change-Id: Idc397515cd1d9621a06d237606c19acee600081a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164532
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-03-07 20:14:37 +01:00
Julien Nabet 708e379994 cid#1545810 Using invalid iterator
and :

cid#1545802 Using invalid iterator
cid#1545745 Using invalid iterator
cid#1545717 Using invalid iterator
cid#1545675 Using invalid iterator
cid#1545668 Using invalid iterator
cid#1545639 Using invalid iterator
cid#1545634 Using invalid iterator
cid#1545629 Using invalid iterator
cid#1545620 Using invalid iterator
cid#1545608 Using invalid iterator
cid#1545607 Using invalid iterator
cid#1545601 Using invalid iterator

Change-Id: I403842175f64a570d7e52fba7c3e03bf21b7d05b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160320
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2023-12-04 20:28:26 +01:00
Stephan Bergmann f8087b516a Extended loplugin:ostr: idl
Change-Id: I22adb7f3750f1e1b9910f37046c5da98ac7ab5be
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159697
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-11-20 07:27:30 +01:00
Stephan Bergmann a93dd64747 Manual extended loplugin:ostr change
Change-Id: Ic0418ba78851183deba2555943cf26934b982378
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159521
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-11-17 08:12:01 +01:00
Yli875 6759434463 tdf#145538 Use range based for loops in idl:object
Change-Id: I7c9935254be5bea050a09859cebbc4112894999b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156858
Tested-by: Jenkins
Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2023-10-03 22:08:54 +02:00
Mike Kaganski 5fe96b6dce Drop SvStream::WriteCharPtr
WriteOString is a better replacement

Change-Id: Ic431b9aeb98d19fe61cff71360eee555105cc2bf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150192
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-04-10 23:13:32 +02:00
Noel Grandin db7f33af14 loplugin:stringadd in various
when applying my upcoming patch to also consider O[U]StringBuffer

Change-Id: I8cf6a47ad357ddc73e2c430d966be72d5efd1485
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149767
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-03-30 20:03:41 +00:00
anfanite396 34f7c8cce9 tdf#145538 Use range based for loops
Change-Id: I546bbcd6de02f9a31db6dcb34b4493bd165c0661
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148527
Tested-by: Jenkins
Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
2023-03-17 14:25:46 +00:00
Adoche Onaji 8429f5ca37 tdf#114441 Convert sal_uLong to a better type
In slot.cxx, GetAttrCount() return a size_t type and same type can
be assigned directly to nSCount. In hash.hxx, sal_uLong was declared
in SvStringHashEntry, the only default parameter it the class takes
is aName (type OString) while nValue was directly initialized as 0
in the constructor. The interface to change nValue is through a method
setValue of same type.Also In idl/inc/hash.hxx SetValue() and GetValue functionsb are used in idl/source/prj/database.cxx with sal_uInt32 parameter and return type and thus, sal_uInt32  is suitable here.The instances of sal_uLong in source/objects/object.cxx are replaced with sal_uInt32. In object.cxx an iterator was declared using std::find
to find nId in rSuperList (originally declared as std::vector<sal_uLong>),
therefore if nId is sal_uInt32, the parent vector, rSuperList
should be sal_uInt32. This change is now applicable to the void method
InsertSlot's parameter rSuperList in object.hxx and also variables n,
nId, iter, rSuperList in InsertSlot definition block in the file
object.cxx. Variable aSuperList in obect.cxx is also changed to
sal_uInt32 because its an argument for rSuperList parameter.
nC1 and nC2 in idl/source/prj/svidl.cxx are chnaged from sal_uLong to size_t as this is suitable here.

Change-Id: Ie075875229a676ea32dbf9e3049881a479773703
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147220
Reviewed-by: Hossein <hossein@libreoffice.org>
Tested-by: Hossein <hossein@libreoffice.org>
2023-02-24 12:29:38 +00:00
Stephan Bergmann d7100211be Fix bogus uses of OUString::createFromAscii
We got a report on IRC of builds failing with

> svidl: /home/dolezvo1/Downloads/libreoffice/sal/rtl/ustring.cxx:278: void rtl_uString_newFromAscii(rtl_uString**, const char*): Assertion `static_cast<unsigned char>(*pCharStr) < 0x80' failed.

when the "l" in "Downloads" was some non-ASCII character (whose exact identity
was apparently obscured by the used pastebin service, though).

Change-Id: Ib460793b0f8aa5e8f8822fa224d67e5a622a234d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146664
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-02-08 16:03:33 +00:00
Noel Grandin 3817965ded add SvStream::ReadLine(OStringBuffer... to reduce OString allocation
and use it where possible

Change-Id: I3efc7a642f73661ce606c917c0323ba9948521c6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134265
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-13 11:11:27 +02:00
Noel Grandin 33bd16b344 loplugin:stringviewparam convert methods using copy()
which converts to std::string_view::substr()

Change-Id: I3f42213b41a97e77ddcc79d84d512f49d68ca559
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132729
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-17 10:27:33 +02:00
Noel Grandin 6fc3dfd3f1 use more string_view
found by tweaking the loplugin:stringview and making it whitelist
getLength

Change-Id: Ic41cd4e3026d93b70a76fe1279c6de3abbe6b4a0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132820
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-11 17:44:46 +02:00
Gabor Kelemen 67478f9d63 Recheck modules [i-l]* with IWYU
See tdf#42949 for motivation

Change-Id: I758bb27e93779e3df21c463714e49354748f446f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128715
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2022-01-27 18:52:16 +01:00
Noel Grandin 8fed86b3eb add some more TypeWhichId annotations
and update the idl compiler to cope with namespaced class names

Change-Id: I7b5242f872e358bc3c5584f543767719172aac83
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129026
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-01-27 14:10:25 +01:00
Arnaud VERSINI 978acbeb8c idl : no need to use rtl::Static
Change-Id: I8b53ab93010f500a61aa4930817c25d09cb2552d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127869
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-01-02 18:24:56 +01:00
Arnaud VERSINI 335ecfee17 idl : use delegating constructor
Change-Id: Ic3a23dfc1278a9f34d0b7a441d604903eadc2a8e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127818
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
2022-01-01 18:48:07 +01:00
Arnaud VERSINI 7a6fb93905 idl : remove useless define and copy the code directly !
Change-Id: I92d53beb110a44624b72f7ec76ab8d1089f9caf0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127438
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>
2021-12-25 08:32:26 +01:00
Jan-Marek Glogowski 03faef951a mergelibs: fix duplicate aSfxInt16Item_Impl
The callgrind / mergelibs build fails with:

/svx/source/form/typemap.o: in function `aSvxColorItem_Impl´: \
   multiple definition of `aSfxInt16Item_Impl´; \
/sfx2/source/appl/appbas.o: first defined here

Regression from commit 60d7796624
("sd theme: allow setting color effects in the sidebar").

Change-Id: Ibe382e2e12d3359caa3e853e264de0ede6a5e601
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127429
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2021-12-24 19:21:29 +01:00
Noel Grandin a3bc9dc511 loplugin:flatten in filter..include
Change-Id: I74c1ea8b9b490eaa9508a885758224063e39051b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127235
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-12-22 07:44:07 +01:00
Emircan Agac c7685f030f tdf#114441:Convert use of sal_uLong to better integer types
Change-Id: I14cfc4113e9aff0fcff3b2d3c2b0444aad8934ae
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120332
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2021-08-13 10:43:58 +02:00
Noel Grandin bfc1600c6a loplugin:indentation improve checks for brace alignment
Change-Id: I333100fda7e181f68f36b03279b3fbb8cb768310
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117615
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-06-28 10:47:34 +02:00
Jan-Marek Glogowski 8a4173987e WASM: add initial support for Emscripten cross build
- configure with:
- --host=wasm64-local-emscripten
- had to make a few externals optional, so adding:
  - --disable-nss
  - --disable-cmis
  - --disable-curl

Change-Id: I48d1c73d2675ad2e2beaf2c341578199efbd24ee
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111130
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2021-05-05 21:14:54 +02:00
Noel Grandin 04aafba860 loplugin:stringadd simplify some *StringBuffer operations
pulled from a larger patch which I created with a more permissive
variant of this plugin

Change-Id: I7abf1f3f09e84703b6e0e52fe9587dff691b2187
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114875
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-04-29 18:25:31 +02:00
Noel Grandin 62f6d6ee8b use more string_view in tools/stream
Change-Id: I2a957cd72d71fea717734488cdb3670e0bcdd6f4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114657
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-04-27 09:27:44 +02:00
Noel Grandin c7428c607c use more string_view in OString API
some parts of the OString seem to have fallen behind
its more popular sibling OUString.

Change-Id: Ie6d64c3005b2df5da49ba79d0c38282dd5057a23
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114252
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-04-19 12:11:43 +02:00
Ahmet Hakan Çelik 0726ecd9e2 tdf#114441: Convert use of sal_uLong to better integer types
Change-Id: I173d57105429e2bdf2288678fa7911b8541a402b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112154
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-03-16 11:45:04 +01:00
Bayram Çiçek a88effc4f5 tdf#114441: Convert use of sal_uLong to better integer types
Change-Id: Ibb432c3db6d99343514c412c4c1b968808b733c8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110886
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-03-11 11:37:49 +01:00
Julien Nabet 863ee228e0 -Werror,-Wformat in idl with Raspberry pi 4b
[CXX] sax/source/expatwrap/sax_expat.cxx
/home/pi/lo/libreoffice/idl/source/prj/database.cxx:437:23: error:
format specifies type 'unsigned long' but the argument has type
'sal_uInt64' (aka 'unsigned long long') [-Werror,-Wformat]
              "error", nRow, nColumn );
                       ^~~~
/home/pi/lo/libreoffice/idl/source/prj/database.cxx:437:29: error:
format specifies type 'unsigned long' but the argument has type
'sal_uInt64' (aka 'unsigned long long') [-Werror,-Wformat]
              "error", nRow, nColumn );
                             ^~~~~~~
2 errors generated.

Following https://cgit.freedesktop.org/libreoffice/core/commit/?id=5419b894a2e791de24d10f0c4433a807e175e7a0

author    siddheshpatil777 <[hidden email]> 2021-01-06
14:14:33 +0400
committer    Michael Stahl <[hidden email]> 2021-01-21
16:36:00 +0100
commit    5419b894a2 (patch)
tree    72cdf2b964
parent    21138573fc (diff)

tdf#114441: Convert use of sal_uLong to better integer types

Change-Id: I0d961e8b1e0a6a9709fabb50b5e209c7ac5e7250
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110844
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
2021-02-14 09:42:44 +01:00
siddheshpatil777 5419b894a2 tdf#114441: Convert use of sal_uLong to better integer types
Change-Id: I14742675541a315e72191df4ee38c35373b39d52
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108842
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-01-21 16:36:00 +01:00
Stephan Bergmann cf7306194f No longer need to worry about ambiguous operator== in loplugin:stringviewparam
...after 46c5de8328 "make *String(string_view)
constructors explicit"

Change-Id: I6e884c762a2fc91f5dd6fbb197a596fd60f17cae
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108043
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-12-20 13:07:02 +01:00
Stephan Bergmann 35e471bb4d Adapt the remaining OUString functions to std string_view
...for LIBO_INTERNAL_ONLY.  These had been missed by
1b43cceaea "Make many OUString functions take
std::u16string_view parameters" because they did not match the multi-overload
pattern that was addressed there, but they nevertheless benefit from being
changed just as well (witness e.g. the various resulting changes from copy() to
subView()).

This showed a conversion from OStringChar to std::string_view to be missing
(while the corresponding conversion form OUStringChar to std::u16string_view was
already present).

The improvement to loplugin:stringadd became necessary to fix

> [CPT] compilerplugins/clang/test/stringadd.cxx
> error: 'error' diagnostics expected but not seen:
>   File ~/lo/core/compilerplugins/clang/test/stringadd.cxx Line 43 (directive at ~/lo/core/compilerplugins/clang/test/stringadd.cxx:42): simplify by merging with the preceding assignment [loplugin:stringadd]
>   File ~/lo/core/compilerplugins/clang/test/stringadd.cxx Line 61 (directive at ~/lo/core/compilerplugins/clang/test/stringadd.cxx:60): simplify by merging with the preceding assignment [loplugin:stringadd]
> 2 errors generated.

Change-Id: Ie40de0616a66e60e289c1af0ca60aed6f9ecc279
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107602
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-12-11 21:25:10 +01:00
Stephan Bergmann 4f0c70fb55 Avoid calling OString ctor with null pointer
...in preparation of potential future changes from using OString to using
std::string_view, where OString has an undocumented feature of allowing
construction from a null pointer.

This is mostly the result of a manual audit of potentially problematic getenv
calls across the code base.  But there can be other problematic places too, like
the xmlGetProp call in tools/source/xml/XmlWalker.cxx.  To identify those,
rtl_{string,uString}_newFromStr aborts now in non-production debug builds when a
null pointer is passed(and all places that hit with a full `make check
screenshot` have been addressed here).  Once we are confident that all
problematic places have been identified, we should drop support for the
undocumented feature (see the TODO in sal/rtl/strtmpl.cxx).

Change-Id: I595cc6d4f1cda74add2a3db171323f817d362b08
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107430
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-12-10 16:27:35 +01:00
Noel 8ef6067596 loplugin:stringviewparam check methods too
not just functions

Change-Id: Icca295dd159002b428b73f2c95d40725434f04d9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105789
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-17 09:57:35 +01:00