Commit graph

473216 commits

Author SHA1 Message Date
Luboš Luňák
a85b647f7b compress calls to AdjustRowHeight() to just one call (tdf#94677)
This function imports only text, so I think doing one big call
at the end should be fine.

Change-Id: I267f5857ac11cfb95245434333f2ca5fa7e662cc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130789
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-03-01 18:02:11 +01:00
Luboš Luňák
ffe7850a14 fix o3tl::equalsIgnoreAsciiCase()
As the OUString equivalent shows, it needs to check == 0. Commit
33ecd0d5c4 for some reason also
dropped the cheap checks (even from OUString) that OString has,
so add them.

Change-Id: I88e68b5ae10fd76c3c08b9b36d5abed0fad17bbf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130753
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Tested-by: Jenkins
2022-03-01 18:00:17 +01:00
Caolán McNamara
ee2a192923 protect frame from triggering deleting itself
LIBREOFFICE-N4LA0OHZ

Change-Id: I0d24277665a317f047b286fe0f0878b3814ded65
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130766
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-03-01 17:56:56 +01:00
Noel Grandin
35f1e9c7f9 fix data races in cclass_Unicode
WARNING: ThreadSanitizer: data race (pid=1220516)
  Write of size 4 at 0x7b1c00035510 by thread T19 (mutexes: write M0):
i18npool::Transliteration_casemapping::setMappingType(MappingType,
com::sun::lang::Locale const&) :? (libi18npoollo.so+0xe5685)
i18npool::cclass_Unicode::toUpper(rtl::OUString const&, int, int,
com::sun::lang::Locale const&) :? (libi18npoollo.so+0x792fa)
i18npool::CharacterClassificationImpl::toUpper(rtl::OUString const&,
int, int, com::sun::lang::Locale const&) :?
(libi18npoollo.so+0x83855)
(libutllo.so+0xc6f42)
(libsvllo.so+0xc5823)
const&) ??:? (libsclo.so+0x4978f3)
const&, std::shared_ptr<oox::xls::RichString> const&) :?
(libscfiltlo.so+0x46b354)
const&, int) :? (libscfiltlo.so+0x46b44a)
(libscfiltlo.so+0x4764a0)
:? (libscfiltlo.so+0x4764e9)
oox::core::ContextHandler2::endFastElement(int) ??:?
(libooxlo.so+0x1a10eb)
(libexpwraplo.so+0x2fbdf)
(libexpwraplo.so+0x2fb21)
char const*, unsigned char const*, unsigned char const*)
fastparser.cxx:? (libexpwraplo.so+0x2c255)
/build/libxml2-vTtzwD/libxml2-2.9.12+dfsg/builddir/main/../../parser.c:9736
(libxml2.so.2+0x5751a) (BuildId:
baaa02c136f3351b1c499bbbbe94450b9b9c0d4e)
/build/libxml2-vTtzwD/libxml2-2.9.12+dfsg/builddir/main/../../parser.c:9691
(libxml2.so.2+0x5751a)
sax_fastparser::FastSaxParserImpl::parseStream(com::sun::xml::sax::InputSource
const&) :? (libexpwraplo.so+0x2972d)
sax_fastparser::FastSaxParser::parseStream(com::sun::xml::sax::InputSource
const&) ??:? (libexpwraplo.so+0x30e88)
oox::core::FastParser::parseStream(com::sun::xml::sax::InputSource
const&, bool) ??:? (libooxlo.so+0x1a3220)
oox::core::FastParser::parseStream(com::sun::uno::Reference<com::sun::io::XInputStream>
const&, rtl::OUString const&) ??:? (libooxlo.so+0x1a3467)
oox::core::XmlFilterBase::importFragment(rtl::Reference<oox::core::FragmentHandler>
const&, oox::core::FastParser&) ??:? (libooxlo.so+0x1c46c1)
oox::xls::WorkbookHelper::importOoxFragment(rtl::Reference<oox::core::FragmentHandler>
const&, oox::core::FastParser&) :? (libscfiltlo.so+0x4be642)
workbookfragment.cxx:? (libscfiltlo.so+0x4b618d)
(libcomphelper.so+0x15e63b)
(libuno_salhelpergcc3.so.3+0x5257)
    #25 threadFunc :? (libuno_salhelpergcc3.so.3+0x550e)
(libuno_sal.so.3+0x67e25)

Previous write of size 4 at 0x7b1c00035510 by thread T18 (mutexes:
write M1):
i18npool::Transliteration_casemapping::setMappingType(MappingType,
com::sun::lang::Locale const&) :? (libi18npoollo.so+0xe5685)
i18npool::cclass_Unicode::toUpper(rtl::OUString const&, int, int,
com::sun::lang::Locale const&) :? (libi18npoollo.so+0x792fa)
i18npool::CharacterClassificationImpl::toUpper(rtl::OUString const&,
int, int, com::sun::lang::Locale const&) :?
(libi18npoollo.so+0x83855)
(libutllo.so+0xc6f42)
(libsvllo.so+0xc5823)
const&) ??:? (libsclo.so+0x4978f3)
const&, std::shared_ptr<oox::xls::RichString> const&) :?
(libscfiltlo.so+0x46b354)
const&, int) :? (libscfiltlo.so+0x46b44a)
(libscfiltlo.so+0x4764a0)
:? (libscfiltlo.so+0x4764e9)
oox::core::ContextHandler2::endFastElement(int) ??:?
(libooxlo.so+0x1a10eb)
(libexpwraplo.so+0x2fbdf)
(libexpwraplo.so+0x2fb21)
char const*, unsigned char const*, unsigned char const*)
fastparser.cxx:? (libexpwraplo.so+0x2c255)
/build/libxml2-vTtzwD/libxml2-2.9.12+dfsg/builddir/main/../../parser.c:9736
(libxml2.so.2+0x5751a) (BuildId:
baaa02c136f3351b1c499bbbbe94450b9b9c0d4e)
/build/libxml2-vTtzwD/libxml2-2.9.12+dfsg/builddir/main/../../parser.c:9691
(libxml2.so.2+0x5751a)
sax_fastparser::FastSaxParserImpl::parseStream(com::sun::xml::sax::InputSource
const&) :? (libexpwraplo.so+0x2972d)
sax_fastparser::FastSaxParser::parseStream(com::sun::xml::sax::InputSource
const&) ??:? (libexpwraplo.so+0x30e88)
oox::core::FastParser::parseStream(com::sun::xml::sax::InputSource
const&, bool) ??:? (libooxlo.so+0x1a3220)
oox::core::FastParser::parseStream(com::sun::uno::Reference<com::sun::io::XInputStream>
const&, rtl::OUString const&) ??:? (libooxlo.so+0x1a3467)
oox::core::XmlFilterBase::importFragment(rtl::Reference<oox::core::FragmentHandler>
const&, oox::core::FastParser&) ??:? (libooxlo.so+0x1c46c1)
oox::xls::WorkbookHelper::importOoxFragment(rtl::Reference<oox::core::FragmentHandler>
const&, oox::core::FastParser&) :? (libscfiltlo.so+0x4be642)
workbookfragment.cxx:? (libscfiltlo.so+0x4b618d)
(libcomphelper.so+0x15e63b)
(libuno_salhelpergcc3.so.3+0x5257)
    #25 threadFunc :? (libuno_salhelpergcc3.so.3+0x550e)
(libuno_sal.so.3+0x67e25)

Change-Id: Idf8d9c307c09bc1af8541178331af23d146da927
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130787
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-03-01 17:55:52 +01:00
Noel Grandin
44a403d5a6 fix data race in ImportFinished
touching these fields here leads to a race with the access in ::Import.
Rather just leave them to be cleared when the object is destructed.

Change-Id: I0016917455d4e252e360cc49e3d1ca56f4eabb30
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130749
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-03-01 17:55:25 +01:00
Noel Grandin
6df8567537 fix assert when changing fill on impress shape
reverts part of
    commit 31e7845339
    Author: Noel Grandin <noel.grandin@collabora.co.uk>
    Date:   Thu Feb 17 12:19:49 2022 +0200
    use more SfxItemSet::CloneAsValue

Change-Id: I5f385525adcdb73199a6eb4b057e275341fb85b8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130765
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-03-01 17:53:43 +01:00
Attila Bakos (NISZ)
0d29394598 tdf#147126 sw: fix missing as_char anchoring of group textboxes
which resulted lost (invisible) text content before
implementing its support now.

Cleanup to SwTextBoxHelper by removing its unneeded functions.

testFDO78590 was commented out temporarily because it has a
pure VML groupshape inside and it's converted to WPG during
the test run resulting crash on reopening, because lack of
its support in DocumentContentOperationsManager, trying to
convert the content to a text frame inside a text frame.

Regression from commit 2951cbdf3a
"tdf#143574 OOXML export/import of textboxes in group shapes".

Change-Id: Ic6ce3549d390ae763044f54e991f390677704396
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129627
Tested-by: László Németh <nemeth@numbertext.org>
Reviewed-by: László Németh <nemeth@numbertext.org>
2022-03-01 17:53:01 +01:00
Andrea Gelmini
16665c48fe Fix typos
Change-Id: I13e7f1dc5d93f352e79139acb64b46dee298c9fb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130186
Tested-by: Julien Nabet <serval2412@yahoo.fr>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-03-01 17:48:39 +01:00
Jens Carl
26cbb045a0 tdf#45904 Move XComponent Java test to C++
Move XComponent Jave tests to C++ for ScCellFieldObj_Cell and
ScCellFieldObj_Header (formerly ScCellFieldObj).

Change-Id: Ibf293a72801720fee49acdda5a3a463e9202bb58
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130742
Tested-by: Jenkins
Reviewed-by: Jens Carl <j.carl43@gmx.de>
2022-03-01 17:40:52 +01:00
Mike Kaganski
66614d9d1c No need to memset the allocated buffer in new_WithLength
Other places that allocate, specifically newFromStr_WithLength and
ensureCapacity, don't initialize the memory.

Change-Id: Iad5301313312aac24948afefb27925d52fe3c673
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130762
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-03-01 17:39:16 +01:00
Tor Lillqvist
6c17a51c0f Quick build fix: Add missing #include
Change-Id: Ib36aa807c3fbe0678adaaea0d202163d2ac70022
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130791
Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-03-01 16:34:52 +01:00
Samuel Mehrbrodt
f9268924f1 Try to fix .bau files being ignored
In some circumstances it might happen that one .bau file gets replaced with
another one, but the "new" one has an older timestamp than the "old" one.

In this case, the .bau file will not be recognized as changed.
So instead of checking for a newer timestamp, check for a different timestamp.

Change-Id: I4248fb283d4399a8501a979cae7e6bcc6d8e8a2d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130243
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
2022-03-01 15:55:47 +01:00
Michael Weghorn
a427a46db0 wina11y: Use range-based for
Change-Id: Ie03126205d45ad2fcae14af53ab7a499f3c445f9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130759
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2022-03-01 15:52:18 +01:00
Michael Weghorn
45ae2fb7a7 wina11y: Use more range-based for
And use const reference to css::style::TabStop instead of
creating a copy.

Change-Id: I4092cbefcfbdaa6a6697974b7f40242e26cc6aad
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130758
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2022-03-01 15:52:04 +01:00
Michael Weghorn
774364243b wina11y: Use 'std::vector::empty()' instead of 'std::vector::size() == 0'
Change-Id: Icc365bad285d99abc2a1c9f26997e28701823262
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130757
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2022-03-01 15:51:43 +01:00
Michael Weghorn
df80ed9416 wina11y: Use range-based for
Change-Id: Icf2a4cb3a4baf0c7aaeb627d05ba355f238b4d04
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130756
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2022-03-01 15:51:27 +01:00
Mike Kaganski
9888bb3dbb Fix the test failing when invalid certificate is in cert store
testSigningMultipleTimes_ODT was failing for me locally because of
an expired certificate present in my store.

Change-Id: Ie3dfb9ee1a110259ba747a03fc28c205df2eea91
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130743
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-03-01 15:17:55 +01:00
Caolán McNamara
c8ce8980b3 ofz: glyph data must be at least 10 bytes long to be useful
Change-Id: I312c33c598013feced15c6f2dbcc66e493b703e6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130752
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-03-01 15:09:13 +01:00
Caolán McNamara
8b95df7d8d ofz: don't register style if hbox load failed
Change-Id: I4d9d5d76f0c2385871003720e933ed1926f66c70
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130755
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-03-01 15:08:47 +01:00
Noel Grandin
eb968c4f6b more tsan suppressions
Change-Id: I58a5f1e23980720615180640529af31205417cd4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130748
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-03-01 14:46:30 +01:00
Tibor Nagy
744e6c0b75 tdf#147459 PPTX: add "glue points" to some basic shapes
(ellipse, triangle, right triangle, trapezoid,
parallelogram, diamond, pentagon, hexagon, heptagon,
octagon).

These glue points allow to add and use connectors
on basic shapes, e.g. by specifying 8 glue points on
outline of ellipses (and not 4 glue points only on
their bounding boxes).

Usage: insert a basic shape from the list above,
select it, and click on the icon Connectors to
show and use the new glue points on the outline of
the shape.

Note: PPTX import doesn't import connectors
connected to the glue points – only ODP export keeps
them for the planned editing, i.e. moving the connected
shapes without losing the connecting lines and arrows.

Change-Id: Iaef21ce8dc3f6677fa2fd6a484adf6d546e72ad1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130281
Tested-by: László Németh <nemeth@numbertext.org>
Reviewed-by: László Németh <nemeth@numbertext.org>
2022-03-01 13:45:48 +01:00
Caolán McNamara
5911b25000 ofz: measure legal range from glyph offset, not table start
Change-Id: I04c1036e004be678b70a7df197141970aa3c8b16
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130750
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-03-01 13:25:36 +01:00
homeboy445
1c2dc4bc28 tdf#145486: Catch the error instead of re-checking readOnly state
Change-Id: I555ccad0fae604133effbcf46bf2cb0ad30ac609
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124585
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
2022-03-01 13:20:41 +01:00
Deep17
f63a6f2e39 tdf#145538 - Use range based for loops
Change-Id: I489a13330501ddfa1556a523f8334460505c0e61
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130658
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
2022-03-01 13:03:05 +01:00
Caolán McNamara
2ca987b1a9 ofz: measure maximum possible contours
Change-Id: Ie039abd835fef06514edde12b99e17360f5481a5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130731
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-03-01 12:44:38 +01:00
Noel Grandin
2195e03808 tsan more suppression
Change-Id: I42f9cb0bc326c7e6e2f26cd0501427b4d4865e83
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130747
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-03-01 11:41:09 +01:00
Hossein
acc008c660 Add asserts to make sure the calculation is correct
On Linux/gcc (Ubuntu 10.3.0-1ubuntu1~20.04), I was getting this
warning:

sc/source/core/data/bcaslot.cxx:647:25: warning: comparison of
unsigned expression in ‘>= 0’ is always true [-Wtype-limits]
  647 |             assert(slot >= 0 && slot < mnBcaSlots);
      |                    ~~~~~^~~~

slot variable is of type SCSIZE, which is defined as size_t in
sc/inc/address.hxx.

This is fixed in 405a7a0955. To make
sure the calculation of slot is OK, I have added these 2 asserts:

    assert(nRow >= rSD.nStartRow);
    assert(nCol >= rSD.nStartCol);

Change-Id: I731c1b6e913febde51fc16042d32c35950e707db
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129805
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
2022-03-01 11:40:15 +01:00
Noel Grandin
fc8e5f91fc use SfxItemSet::GetItemIfSet in sc/source/ui/view/
Change-Id: I6c1c3ee4fbb6b105ad67c051ce1fa2dae258df85
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130746
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-03-01 11:26:17 +01:00
Noel Grandin
1e157252a2 use SfxItemSet::GetItemIfSet in sc/source/filter
Change-Id: I8ba941cea8f3b8ed0f37d2dc6b2520ae89652afe
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130744
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-03-01 11:03:59 +01:00
Luboš Luňák
0156eba766 make Calc jumbo sheets an explicit build feature
On 32bit platforms tools::Long is 32bit, which is not enough
for pixel coordinates with 1m+ Calc rows+. So do not allow jumbo
sheets for such platforms.

Change-Id: I2ebd56a051470d33fca967918af3e7d2b0172dc7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130713
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-03-01 10:48:13 +01:00
Mike Kaganski
da77aec27e Fix flaky test on Win64
Obviously the left values are unstable; they were excluded on macOS,
and they fail exactly on the same lines for me locally on Win64 build.
So just test that the values are restored after delete and undo.

Change-Id: I63dc50d223edb052a0ada200189cef94c2e0f8e5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130738
Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-03-01 10:47:07 +01:00
Stephan Bergmann
4c68c4b93c misaligned-pointer-use
...during CppunitTest_sw_filters_test,

~/gcc/trunk/inst/lib/gcc/x86_64-pc-linux-gnu/12.0.1/../../../../include/c++/12.0.1/bits/stl_algobase.h:385:20: runtime error: load of misaligned address 0x61d001aedef7 for type 'const char16_t', which requires 2 byte alignment
0x61d001aedef7: note: pointer points here
 01 00 00 00 ff  00 00 00 00 00 00 00 00  be be be be be be be be  be be be be be be be be  be be be
             ^
 #0 in char16_t* std::__copy_move<false, false, std::random_access_iterator_tag>::__copy_m<char16_t const*, char16_t*>(char16_t const*, char16_t const*, char16_t*) at ~/gcc/trunk/inst/lib/gcc/x86_64-pc-linux-gnu/12.0.1/../../../../include/c++/12.0.1/bits/stl_algobase.h:385:20
 #1 in char16_t* std::__copy_move_a2<false, char16_t const*, char16_t*>(char16_t const*, char16_t const*, char16_t*) at ~/gcc/trunk/inst/lib/gcc/x86_64-pc-linux-gnu/12.0.1/../../../../include/c++/12.0.1/bits/stl_algobase.h:491:9
 #2 in char16_t* std::__copy_move_a1<false, char16_t const*, char16_t*>(char16_t const*, char16_t const*, char16_t*) at ~/gcc/trunk/inst/lib/gcc/x86_64-pc-linux-gnu/12.0.1/../../../../include/c++/12.0.1/bits/stl_algobase.h:522:14
 #3 in char16_t* std::__copy_move_a<false, char16_t const*, char16_t*>(char16_t const*, char16_t const*, char16_t*) at ~/gcc/trunk/inst/lib/gcc/x86_64-pc-linux-gnu/12.0.1/../../../../include/c++/12.0.1/bits/stl_algobase.h:530:3
 #4 in char16_t* std::copy<char16_t const*, char16_t*>(char16_t const*, char16_t const*, char16_t*) at ~/gcc/trunk/inst/lib/gcc/x86_64-pc-linux-gnu/12.0.1/../../../../include/c++/12.0.1/bits/stl_algobase.h:619:14
 #5 in void rtl::str::Copy<char16_t>(char16_t*, char16_t const*, int) at sal/rtl/strtmpl.hxx:50:5
 #6 in void rtl::str::newFromStr_WithLength<_rtl_uString, char16_t>(_rtl_uString**, char16_t const*, int, int) at sal/rtl/strtmpl.hxx:1054:9
 #7 in rtl_uString_newFromStr_WithLength at sal/rtl/ustring.cxx:1246:5
 #8 in rtl::OUString::OUString(char16_t const*, int) at include/rtl/ustring.hxx:332:9
 #9 in ww8::WW8Struct::getUString(unsigned int, unsigned int) at sw/source/filter/ww8/WW8Sttbf.cxx:87:23

presumably since 22de5757a2 "Deduplicate string
buffer code" changed the Copy function template in sal/rtl/strtmpl.hxx from
using memcpy to using std::copy.

(And this revealed that the !OSL_LITENDIAN code had apparently started to rot
and lacked #include <rtl/ustrbuf.hxx>.)

Change-Id: I3e2c5578c6ca18c8880c6d6b6afd191a91da268d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130739
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-03-01 10:30:09 +01:00
Noel Grandin
a5a1863e16 use SfxItemSet::GetItemIfSet in sc/source/core/data
Change-Id: I60552d79f484848eef5b0c43de377a1eed5e76b1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130737
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-03-01 10:05:14 +01:00
Noel Grandin
535359269e use SfxItemSet::GetItemIfSet in svx
Change-Id: I7a56c9452102cf7f6524296219209aef05383d81
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130736
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-03-01 09:54:18 +01:00
Caolán McNamara
ca3e12d5b5 ofz: verify table offsets
Change-Id: I49fa886508b3bf553d4f638bfe53c37fa3e2f338
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130730
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-03-01 09:43:20 +01:00
Noel Grandin
f1bf33a26b use SfxItemSet::GetItemIfSet in starmath
Change-Id: Iaef2a2c507acfdabc6280e6cc8179319ea9d8a94
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130735
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-03-01 09:12:45 +01:00
Stephan Bergmann
f8238187ba Always join thread before destroying it
m_aDestThread had been added with 7d6c646ec2
"INTEGRATION: CWS vcl24", apparently for "#i28763# workaround possibly hanging
CUPS calls" to address <https://bz.apache.org/ooo/show_bug.cgi?id=28763>
"Loading document hangs if CUPS printer doesn't deliver PPD" and its duplicate
<https://bz.apache.org/ooo/show_bug.cgi?id=30513> "OO.o hangs if cupsd hangs".

However, PythonTest_sc_python now occasionally failed for me with a SIGSEGV in
thread #1 of python.bin at

> Thread 2 (Thread 0x7fc8df392fc0 (LWP 2268774)):
> #0  0x00007fc8df42ee28 in _int_free () at /lib64/libc.so.6
> #1  0x00007fc8df431c05 in free () at /lib64/libc.so.6
> #2  0x00007fc8df7e4fe9 in _PyMem_RawFree (ctx=0x0, ptr=0xff64c0) at workdir/UnpackedTarball/python3/Objects/obmalloc.c:127
> #3  0x00007fc8df7e5af7 in _PyMem_DebugRawFree (ctx=0x7fc8dfb36d88 <_PyMem_Debug>, p=0xff64d0) at workdir/UnpackedTarball/python3/Objects/obmalloc.c:2187
> #4  0x00007fc8df7e5ff0 in PyMem_RawFree (ptr=0xff64d0) at workdir/UnpackedTarball/python3/Objects/obmalloc.c:595
> #5  0x00007fc8df7e5301 in _PyObject_Free (ctx=0x0, p=0xff64d0) at workdir/UnpackedTarball/python3/Objects/obmalloc.c:1898
> #6  0x00007fc8df7e5af7 in _PyMem_DebugRawFree (ctx=0x7fc8dfb36de8 <_PyMem_Debug+96>, p=0xff64e0) at workdir/UnpackedTarball/python3/Objects/obmalloc.c:2187
> #7  0x00007fc8df7e5bb2 in _PyMem_DebugFree (ctx=0x7fc8dfb36de8 <_PyMem_Debug+96>, ptr=0xff64e0) at workdir/UnpackedTarball/python3/Objects/obmalloc.c:2318
> #8  0x00007fc8df7e64c0 in PyObject_Free (ptr=0xff64e0) at workdir/UnpackedTarball/python3/Objects/obmalloc.c:709
> #9  0x00007fc8df853d8d in unicode_dealloc (unicode=<unknown at remote 0xff64e0>) at workdir/UnpackedTarball/python3/Objects/unicodeobject.c:1879
> #10 0x00007fc8df7e47b6 in _Py_Dealloc (op=<unknown at remote 0xff64e0>) at workdir/UnpackedTarball/python3/Objects/object.c:2215
> #11 0x00007fc8df81aeff in _Py_DECREF (filename=0x7fc8dfa46c76 "Objects/unicodeobject.c", lineno=15296, op=<unknown at remote 0xff64e0>) at workdir/UnpackedTarball/python3/Include/object.h:478
> #12 0x00007fc8df81adc6 in PyUnicode_InternInPlace (p=0x7ffdf1d0b048) at workdir/UnpackedTarball/python3/Objects/unicodeobject.c:15296
> #13 0x00007fc8df7c7791 in PyDict_SetItemString (v={'__name__': 'sys', '__doc__': "This module provides access to some objects used or maintained by the\ninterpreter and to functions that interact strongly with the interpreter.\n\nDynamic objects:\n\nargv -- command line arguments; argv[0] is the script pathname if known\npath -- module search path; path[0] is the script directory, else ''\nmodules -- dictionary of loaded modules\n\ndisplayhook -- called to show results in an interactive session\nexcepthook -- called to handle any uncaught exception other than SystemExit\n  To customize printing in an interactive session or to install a custom\n  top-level exception handler, assign other functions to replace these.\n\nstdin -- standard input file object; used by input()\nstdout -- standard output file object; used by print()\nstderr -- standard error object; used for error messages\n  By assigning other file objects (or objects that behave like files)\n  to these, it is possible to redirect all of the interpreter's I/O.\n\nlast_type -- type of last uncaught e...(truncated), key=0x7fc8dfa71535 "stdin", item=<_io.TextIOWrapper at remote 0x1079630>) at workdir/UnpackedTarball/python3/Objects/dictobject.c:3416
> #14 0x00007fc8df92af89 in PyImport_Cleanup () at workdir/UnpackedTarball/python3/Python/import.c:447
> #15 0x00007fc8df94af6d in Py_FinalizeEx () at workdir/UnpackedTarball/python3/Python/pylifecycle.c:1229
> #16 0x00007fc8df981f2d in Py_RunMain () at workdir/UnpackedTarball/python3/Modules/main.c:691
> #17 0x00007fc8df9822fd in pymain_main (args=0x7ffdf1d0b1f0) at workdir/UnpackedTarball/python3/Modules/main.c:719
> #18 0x00007fc8df982347 in Py_BytesMain (argc=4, argv=0x7ffdf1d0b378) at workdir/UnpackedTarball/python3/Modules/main.c:743
> #19 0x0000000000401152 in main (argc=4, argv=0x7ffdf1d0b378) at workdir/UnpackedTarball/python3/Programs/python.c:16
> #20 0x00007fc8df3c1560 in __libc_start_call_main () at /lib64/libc.so.6
> #21 0x00007fc8df3c160c in __libc_start_main_impl () at /lib64/libc.so.6
> #22 0x0000000000401065 in _start ()
>
> Thread 1 (Thread 0x7fc8be2dc640 (LWP 2269049)):
> #0  0x00007fc8df424e24 in pthread_mutex_lock@@GLIBC_2.2.5 () at /lib64/libc.so.6
> #1  0x00007fc8d19a8e57 in osl_acquireMutex(oslMutex) (pMutex=0xcdcdcdcdcdcdcdcd) at sal/osl/unx/mutex.cxx:100
> #2  0x00007fc8ce0870b8 in osl::Mutex::acquire() (this=0x2b9f120) at include/osl/mutex.hxx:61
> #3  0x00007fc8ce18a2a3 in osl::Guard<osl::Mutex>::Guard(osl::Mutex&) (this=0x7fc8be2dbd88, t=...) at include/osl/mutex.hxx:142
> #4  0x00007fc8cec6dbb6 in psp::CUPSManager::runDests() (this=0x2b9ef40) at vcl/unx/generic/printer/cupsmgr.cxx:246
> #5  0x00007fc8cec6d965 in psp::CUPSManager::runDestThread(void*) (pThis=0x2b9ef40) at vcl/unx/generic/printer/cupsmgr.cxx:223
> #6  0x00007fc8cec6d7f1 in run_dest_thread_stub(void*) (pThis=0x2b9ef40) at vcl/unx/generic/printer/cupsmgr.cxx:193
> #7  0x00007fc8d19c9f2d in osl_thread_start_Impl(void*) (pData=0x30a9aa0) at sal/osl/unx/thread.cxx:264
> #8  0x00007fc8df421b1a in start_thread () at /lib64/libc.so.6
> #9  0x00007fc8df4a6650 in clone3 () at /lib64/libc.so.6

Hoping that any blocking (if that is even still an issue today) is not
indefinite, turn this one osl_terminateThread into osl_joinWithThread as already
used in all the other places (CUPSManager::initialize,
CUPSManager::checkPrintersChanged).  (Also note that osl_terminateThread was
effectively a no-op here, as the relevant thread never calls
osl_scheduleThread.)

Change-Id: Ic9c6d6dba1c42f802e09e95feaa7e4d093b5b2cd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130732
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-03-01 09:12:04 +01:00
Rizal Muttaqin
fcfa854db5 Sukapura: tdf#147664 Revise Increase Font & Decrease Font, Default Style,
Small Caps icons

Change-Id: I1348cc7fbde63d335ba3676a4c424d76f8cf2349
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130733
Tested-by: Jenkins
Reviewed-by: Rizal Muttaqin <rizmut@libreoffice.org>
2022-03-01 08:39:06 +01:00
Gabor Kelemen
144057a54a Recheck modules s[f-t]* with IWYU
See tdf#42949 for motivation

Change-Id: I1f520aad1b1c942ad5616d96851016fc366ac58f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130203
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2022-03-01 08:21:00 +01:00
Miklos Vajna
5787a610df svx: fix URL and class name in README
It's a bit concerning that this URL was working in 2014, i.e. after
Apache OpenOffice was established and still got broken, but luckily the
archive has it.

Change-Id: If79ae0bc861ed855650156d87c7fc052773fb33a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130726
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2022-03-01 08:19:01 +01:00
Noel Grandin
e85b482df3 use SfxItemSet::GetItemIfSet in cui
Change-Id: I0a6dbf50d29adf9da9512a9136709bf563e478f0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130689
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-03-01 07:49:28 +01:00
Noel Grandin
51b995b986 use SfxItemSet::GetItemIfSet in sfx2
Change-Id: I241b038953f61228b6667014a4096bfe8dcc9c2d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130709
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-03-01 07:46:47 +01:00
Noel Grandin
e13a8c7df2 use SfxItemSet::GetItemIfSet in desktop..reportdesign
Change-Id: Iaa0ddf4e97866d537a478e668e3c651a9eabc465
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130708
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-03-01 07:46:32 +01:00
Justin Luth
5a64b618d8 followup tdf#122098 xlsx export: avoid corrupt format if not bool value
Although I can't find any documents that cause a "b"
when the value is not 1 or 0, if such should ever happen,
then Excel complains about an invalid format and fails to load.

(The formatting looks a bit weird, but that is what clang-format
produces. How nice.)

Change-Id: I090a27829596260cdd6379b6a6daa75ce250b7e0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130734
Tested-by: Jenkins
Reviewed-by: Justin Luth <jluth@mail.com>
2022-03-01 07:19:51 +01:00
Luboš Luňák
2c6f5ebfe6 remove obsolete TODO.performance
None of the issues listed is valid anymore.

Change-Id: I3e28753b111b9a8fd0f280684555dff214c158f3
2022-02-28 23:01:43 +01:00
Stephan Bergmann
8597748c42 Brown paper bag fix
...of 87369ad7b8 "Use std::unreachable if
available".  (Unfortunately, Clang didn't warn about the thus meaningless uses
of O3TL_UNREACHABLE, presumably due to
<978cca9f49>
"Suppress all -Wunused-value warnings from macro body expansions.")

(While at it, and as the expansion of O3TL_UNREACHABLE is now a nice full
expression, wrap it in parentheses, as is common best practice for such macro
definitions.)

Change-Id: I555e6716ebb66172add686521446d90db6054845
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130729
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-02-28 22:54:38 +01:00
Xisco Fauli
30c302cf48 uitest: fix sporadic UITest_impress_demo failures
Revert 9158d2d2f1
< blind fix for UITest_impress_demo failed >
and 99d2ee15ad
< blind fix for UITest_impress_demo failures >
Instead of asserting the shapes' properties directly,
Use the Position and Size dialog

Change-Id: Ie9aec0dbd1f1fc2ccab0993b428c8ac17938b3b5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130724
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-02-28 22:42:10 +01:00
Xisco Fauli
907a3c0248 uitest: simplify tests even more
- No need to open the dialog to click the cancel button
- Avoid repeated calls to document.DrawPage.getByIndex(0).
Similar to 26298f29e9
this might fix the different failures these tests sometimes
have

Change-Id: I4e175b6c5d48c4651e5877ec2a72c4858b590321
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130727
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-02-28 22:28:05 +01:00
Luboš Luňák
424de44cd0 make named ranges in tests work with 16k columns
References like 'day1' are valid cell addresses with 16k columns,
since they go up to XFD1. Since addresses currently take precedence
over names, rename ranges to not conflict.

Change-Id: Iab63947565ed176c98bc541de6189d7ee9e8d255
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130728
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-02-28 22:27:33 +01:00
pragat-pandya
73ef2f6f61 tdf#139734 removing redundant asserts after MacrosTest::loadFromDesktop
Change-Id: I89ffa387464ce7cc43c1884b031d6fade5b85078
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129581
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-02-28 22:21:28 +01:00