Found with bin/find-unneeded-includes
Only removal proposals are dealt with here.
Change-Id: I98f49765c6b74808dcbd692e0f375dd2848fcfd4
Reviewed-on: https://gerrit.libreoffice.org/65614
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Found with bin/find-unneeded-includes
Only removal proposals are dealt with here.
Change-Id: Ie87d27dd2c385a63349e0b322fd067ba03d2d152
Reviewed-on: https://gerrit.libreoffice.org/64479
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
And do not attempt to format an odd date in case of failure.
Change-Id: I82e93f9e473f42735b6a7e7b634b14ee7f09941d
Reviewed-on: https://gerrit.libreoffice.org/63331
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Jenkins
Both LO and MS Basic restrict the amount of replacement text ("If the Length
parameter in the <emph>Mid statement</emph> is less than the length of the text
that you want to replace, the text is reduced to the specified length." in
helpcontent2/source/text/sbasic/shared/03120306.xhp, resp. "The number of
characters replaced is always less than or equal to the number of characters in
Target." at <https://docs.microsoft.com/en-us/dotnet/visual-basic/
language-reference/statements/mid-statement>).
But cc20344010e94eda22fee662aab966d395a0796a "tdf#111313: Honor bWriteNoLenParam
in !bCompatibility, too" had introduced a regression (in the non--compatibility-
mode case), restricting the amount of replaced text to be no more than the
amount of replacement text, even if the given length argument was larger.
(Which had already regressed in the past, see
<https://bugs.documentfoundation.org/show_bug.cgi?id=62090> "Mid statement
doesn't work as expected".)
Added test cases now.
Change-Id: I21d4409f49a2437eb0e1a1e200561d803c42a24c
Reviewed-on: https://gerrit.libreoffice.org/63328
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
...on which it asserts since 6d4f2dcc7cbba771e9d9b00de50368db4a88ef1b "Resolves:
tdf#100452 class Date full (BCE,CE) proleptic Gregorian calendar".
The assert fired when executing the Basic code from attachment 146529 to
<https://bugs.documentfoundation.org/show_bug.cgi?id=121337>
"FileDateTime("\\nonexistent\smb\path") returns bogus result rather than
throwing error":
> #4 0x00007ffff1d1c830 in (anonymous namespace)::ImpYearToDays(short) (nYear=0) at tools/source/datetime/tdate.cxx:55
> #5 0x00007ffff1d1c449 in Date::DateToDays(unsigned short, unsigned short, short) (nDay=0, nMonth=0, nYear=0) at tools/source/datetime/tdate.cxx:149
> #6 0x00007ffff1d1c3e5 in Date::GetAsNormalizedDays() const (this=0x7fffffff7268) at tools/source/datetime/tdate.cxx:142
> #7 0x00007ffff1d1dae5 in operator-(Date const&, Date const&) (rDate1=1900-1-1, rDate2=0-0-0) at tools/source/datetime/tdate.cxx:581
> #8 0x00007ffff5f87347 in GetDayDiff(Date const&) (rDate=0-0-0) at basic/source/runtime/methods.cxx:4653
> #9 0x00007ffff5f8aebb in SbRtl_FileDateTime(StarBASIC*, SbxArray&, bool) (rPar=...) at basic/source/runtime/methods.cxx:3054
Change-Id: I6468eeafc3daf325d3da3dfeacd08c7df1d1a8f4
Reviewed-on: https://gerrit.libreoffice.org/63318
Tested-by: Jenkins
Reviewed-by: Eike Rathke <erack@redhat.com>
V724 Converting type 'int' to type 'sal_Bool' can lead to a loss of
high-order bits. Non-zero value can become 'FALSE'.
Change-Id: I26540aa9fa9390e1990e95d81665567cd0a248b5
Reviewed-on: https://gerrit.libreoffice.org/62426
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
V668 There is no sense in testing the 'pProc' pointer against null, as the
memory was allocated using the 'new' operator. The exception will be
generated in the case of memory allocation error.
Change-Id: Iec65fd44fa947a2402da33510c29730a46c2e1a4
Reviewed-on: https://gerrit.libreoffice.org/62424
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Found with bin/find-unneeded-includes
Only removal proposals are dealt with here.
Change-Id: I444c43b9d549977039f25bec2b5bf666c3e15e0e
Reviewed-on: https://gerrit.libreoffice.org/62041
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
look for any kind of types, not just POD types, helps to find
smart pointer fields that are only assigned nullptr
Change-Id: I2d887e98db012f03b646e1023985bcc196285abc
Reviewed-on: https://gerrit.libreoffice.org/62382
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: Iacc5b98b947a26ca920cb9c49e579bc61d69b0c9
Reviewed-on: https://gerrit.libreoffice.org/62119
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
V668 There is no sense in testing the 'm_pScriptSubPackageIterator' pointer
against null, as the memory was allocated using the 'new' operator. The
exception will be generated in the case of memory allocation error.
Change-Id: I15e635a6c9420ff444c5998dc0dbbf6f74ca6644
Reviewed-on: https://gerrit.libreoffice.org/62126
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
V668 There is no sense in testing the 'pChan' pointer against null, as the
memory was allocated using the 'new' operator. The exception will be
generated in the case of memory allocation error.
Change-Id: I1cb78c27da753525f05de2d3a0b74c894b07528e
Reviewed-on: https://gerrit.libreoffice.org/62124
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
it's not enough to compare != end(), you also need to compare the key
against the iterator result
Change-Id: Ide5f151ba2297a35e5546f47fbc3c53cbe5ab533
Reviewed-on: https://gerrit.libreoffice.org/62014
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
message is "calling a base constructor other than the copy constructor"
these constructors are not in use, so just remove them
Change-Id: Ic8cede1eb153a6ae97fd1ca9c96ca8c1f43e3399
Reviewed-on: https://gerrit.libreoffice.org/61784
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
and simplify callsites to use it instead of the current
"seek to end, find pos, seek back to original pos"
pattern
Change-Id: Ib5828868f73c341891efc759af8bd4695ae2f33c
Reviewed-on: https://gerrit.libreoffice.org/61738
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
...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>