Commit Graph

471222 Commits

Author SHA1 Message Date
Noel Grandin
dd42f133f6 tdf#146375 Cannot rename user-defined categories in template manager
Regression from
  commit 3624a703361b108d22448bd60a97733f05e37820
  tdf#135316 remove OTempFileService pessimisation

So fix two things here

(1) make it so the tempfile service flushes the SvStream buffer
    and resets the file position, so we can read the data
    after writing it.
(2) Simplify the UCB usage to just write the contents of the tempfile
    via the tempfile InputStream, which is simpler and safer

Change-Id: I15ed3b02c2d6415d10a9579f66374e6268188d5c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128195
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-01-11 07:19:02 +01:00
Jan-Marek Glogowski
46b6ddc000 Fix ISO C++11 -Wwritable-strings
osl/unx/nlsupport.cxx:863:18: warning: ISO C++11 does not allow \
  conversion from string literal to 'char *' [-Wwritable-strings]

Change-Id: I45da986ad8992716df9d1f9a0cc443fdb9cd46ba
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128213
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2022-01-11 05:23:45 +01:00
Andrea Gelmini
f1f2daefbe Fix typo
Change-Id: I04ded03b3dd16627959a6451696a2e3392c17f36
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128215
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-01-10 21:21:54 +01:00
Xisco Fauli
2925063f0b uitest: executeCommand doesn't return anything
Change-Id: Ie59ed6926c42b96471f3b74a9547f7f1f2cd175a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128259
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-01-10 21:10:56 +01:00
Michael Stahl
840cc78838 sw: stop inheriting SwSectionData::m_bProtectFlag from parent section
This is actually no longer inherited by accident since commit
2e32f4ed5a because it replaced the
SwSectionFormat::Modify()->ModifyBroadcast()->CallSwClientNotify()->CallSwClientNotify()
with a call to GetNotifier()->Broadcast(), and apparently SwSection
is a SwClient of SwSectionFormat but not a SvtListener.

But some consider the new behaviour useful, as previously there was no
way to un-protect a section inside an outer protected section at all,
while in this way every section can have its own independent protection
flag. (The m_bEditInReadonlyFlag is not used for this purpose, as it is
only for the case when the document was loaded ReadOnly.)

So make it more explicit by removing the SwSection inheritance code.

A similar change was made for hidden flag in commit
91b0024965

Change-Id: I29d3c84309a84267573950775f2a1c6353623724
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128221
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2022-01-10 19:03:21 +01:00
Noel Grandin
17950f4d20 use less SvStream::Flush()
Flush() turns into a sync() on the device, which is pretty slow.
Most of the time all we actually want to do is to flush the internal
buffers from the SvStream.

So expose the FlushBuffer method and use that where possible.

And also means we don't need the mbDontFlushOnClose flag on SvStream
any more.

Change-Id: Ibe089b88b325f0fdc565200a97ce72cd26b7fcfb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128214
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-01-10 17:59:45 +01:00
Miklos Vajna
952b3b227e sd theme: fix applying new colors after theme change for group shapes
UpdateSdrObject() is called for both group and non-group shapes, so
don't assume that they always have text, otherwise we would crash.

Change-Id: I3672673176f0cb462a8b8d61a68466f541e9ce06
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128248
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
2022-01-10 17:38:56 +01:00
Miklos Vajna
56ded398c9 editeng: avoid writing past the end of of pLine->GetCharPosArray()
Thread 1 "soffice.bin" received signal SIGSEGV, Segmentation fault.
	0x00007ffff6df4951 in ?? () from /usr/lib64/libstdc++.so.6
	(gdb) bt 10
	#0  0x00007ffff6df4951 in  () at /usr/lib64/libstdc++.so.6
	#1  0x00007ffff6df5792 in __gnu_debug::_Error_formatter::_M_error() const () at /usr/lib64/libstdc++.so.6
	#2  0x00007ffff47384bf in std::__debug::vector<int, std::allocator<int> >::operator[](unsigned long) (this=0x6b3dca0, __n=7) at /usr/include/c++/7/debug/vector:417
	#3  0x00007ffff47b5440 in ImpEditEngine::ImpBreakLine(ParaPortion*, EditLine*, TextPortion const*, int, long, bool) (this=
	    0x1ce0040, pParaPortion=0x206a010, pLine=0x6b3dca0, pPortion=0x6b3e480, nPortionStart=0, nRemainingWidth=5093, bCanHyphenate=false)
	    at editeng/source/editeng/impedit3.cxx:2041
	#4  0x00007ffff47b1fb6 in ImpEditEngine::CreateLines(int, unsigned int) (this=0x1ce0040, nPara=0, nStartPosY=0)
	    at editeng/source/editeng/impedit3.cxx:1352
	#5  0x00007ffff47ad0c2 in ImpEditEngine::FormatDoc() (this=0x1ce0040) at editeng/source/editeng/impedit3.cxx:387
	#6  0x00007ffff47bf516 in ImpEditEngine::FormatAndLayout(EditView*, bool) (this=0x1ce0040, pCurView=0x0, bCalledFromUndo=false)
	    at editeng/source/editeng/impedit3.cxx:4190
	#7  0x00007ffff47be333 in ImpEditEngine::SetUpdateLayout(bool, EditView*, bool) (this=0x1ce0040, bUp=true, pCurView=0x0, bForceUpdate=false)
	    at editeng/source/editeng/impedit3.cxx:3927
	#8  0x00007ffff46f059e in EditEngine::SetUpdateLayout(bool, bool) (this=0x1ce2b20, bUpdate=true, bRestoring=false)
	    at editeng/source/editeng/editeng.cxx:1472
	#9  0x00007ffff48ce5e3 in Outliner::SetText(OutlinerParaObject const&) (this=0x1ce0cc0, rPObj=...) at editeng/source/outliner/outliner.cxx:586
	(More stack frames follow...)
	(gdb) frame 3
	#3  0x00007ffff47b5440 in ImpEditEngine::ImpBreakLine (this=0x1ce0040, pParaPortion=0x206a010, pLine=0x6b3dca0, pPortion=0x6b3e480, nPortionStart=0, nRemainingWidth=5093,
	    bCanHyphenate=false) at editeng/source/editeng/impedit3.cxx:2041
	2041            pLine->GetCharPosArray()[ nPosInArray ] = rTP.GetSize().Width();
	(gdb) print pLine->GetCharPosArray()
	[Thread 0x7fffd2010700 (LWP 5008) exited]
	$1 = std::__debug::vector of length 7, capacity 7 = {707, 1414, 2121, 2828, 3535, 4242, 4949}
	(gdb) print nPosInArray
	$2 = 7

Change-Id: I3a8121c0c0a3b0949e91eb53c0468f7e629b146f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128223
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
2022-01-10 15:57:32 +01:00
Jan-Marek Glogowski
1bb08a227c Use one define for the common NLS archs
Just some refactoring.

Change-Id: I9edae9bce381dcd9fdcb98471d461d00220fea57
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128218
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2022-01-10 15:33:37 +01:00
Miklos Vajna
3914ca68e0 sw: prefix members of ConstRectangle, SwBaseShell, ...
... SwJumpToSpecificBox_Impl and SwZoomBox_Impl

See tdf#94879 for motivation.

Change-Id: I5daf3f0a2c0c712a554aa32a6a219acb07d64a32
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128201
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
2022-01-10 14:01:25 +01:00
Tomaž Vajngerl
b15010fdfa sc: fix typo
Change-Id: If9a8f7265c17dafa99b51fe6266d935afedfa394
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128207
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-01-10 13:51:47 +01:00
Tomaž Vajngerl
1126212885 cui: no need to fetch the property from the map twice
Change-Id: I7597c352b2ae166657f1e431e3405fc690520afa
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128206
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-01-10 13:51:26 +01:00
Tomaž Vajngerl
e17f003b5f document GenericCheckDialog, GraphicSizeCheck and related classes
Change-Id: If3f8c33601f7823c87b75d601e0b8620d4bfe197
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128205
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-01-10 13:51:08 +01:00
Christian Lohmaier
13a524392d Update git submodules
* Update translations from branch 'master'
  to f6628660c35c8b21a632418e1363784b906f6ff9
  - update translations for 7.3.0 rc2/master
    
    and force-fix errors using pocheck
    
    Change-Id: I7ba555073adb5a8ddfcb37be8dd61c7df6ad5b40
2022-01-10 13:29:15 +01:00
Hossein
98eea4c8c7 tdf#146084 Test for languages without hyphenation
Add test for languages without hyphenation. The fix can be tested with:

make CPPUNIT_TEST_NAME="testLanguagesWithoutHyphenation" -sr \
			CppunitTest_i18nlangtag_test_languagetag

It is important to know that Kurdish language consists of different
dialects with differences in hyphenation:

1. Central Kurdish (Sorani): Arabic script, no hyphenation
2. Northern Kurdish (Kurmanji): Latin script, uses hyphenation
3. Southern Kurdish (Xwarîn): Arabic script, no hyphenation

Change-Id: I541281af6de296e57a5ab2dc8254f511787ebda0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128188
Tested-by: Jenkins
Reviewed-by: Eike Rathke <erack@redhat.com>
2022-01-10 13:28:54 +01:00
Noel Grandin
059c1aba91 small cleanups to TempFile related code
unnecessary temporary variables

Change-Id: Iefa6c9a6627311495e6cd2f01f5446082ae0589d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128208
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-01-10 13:13:43 +01:00
Caolán McNamara
b4c56c0fd9 ofz: Use-of-unintialized-value
Change-Id: I6c9a1a22240defbc8d9fa262ad087770445ffc4a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128210
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-01-10 11:56:04 +01:00
Mike Kaganski
fd9a47981b Revert "Use clear() instead of remove_if"
This reverts commit 8accfa3034.

Reason for revert: causes asan failure:

=================================================================
==18688==ERROR: AddressSanitizer: heap-use-after-free on address 0x60e00041a3d0 at pc 0x2b01131ad126 bp 0x7fff818edb50 sp 0x7fff818edb48
READ of size 8 at 0x60e00041a3d0 thread T0
    #0 0x2b01131ad125 in SalBitmap::DropScaledCache()::$_0::operator()(std::pair<ScaleCacheKey, BitmapEx> const&) const /vcl/source/app/salvtables.cxx:154:40
    #1 0x2b0113043742 in void o3tl::lru_map<ScaleCacheKey, BitmapEx, std::hash<ScaleCacheKey>, std::equal_to<ScaleCacheKey> >::remove_if<SalBitmap::DropScaledCache()::$_0>(SalBitmap::DropScaledCache()::$_0) /include/o3tl/lru_map.hxx:156:17
    #2 0x2b01130432e5 in SalBitmap::DropScaledCache() /vcl/source/app/salvtables.cxx:153:16
    #3 0x2b0113043d38 in SalBitmap::~SalBitmap() /vcl/source/app/salvtables.cxx:159:27
    #4 0x2b01145628bc in SvpSalBitmap::~SvpSalBitmap() /vcl/headless/svpbmp.cxx:44:1
    #5 0x2b0114593be3 in void __gnu_cxx::new_allocator<SvpSalBitmap>::destroy<SvpSalBitmap>(SvpSalBitmap*) /home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/ext/new_allocator.h:140:28
    #6 0x2b01145939d9 in void std::allocator_traits<std::allocator<SvpSalBitmap> >::destroy<SvpSalBitmap>(std::allocator<SvpSalBitmap>&, SvpSalBitmap*) /home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/alloc_traits.h:487:8
    #7 0x2b0114593184 in std::_Sp_counted_ptr_inplace<SvpSalBitmap, std::allocator<SvpSalBitmap>, (__gnu_cxx::_Lock_policy)2>::_M_dispose() /home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/shared_ptr_base.h:535:2
    #8 0x2b010fb8cba6 in std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release() /home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/shared_ptr_base.h:154:6
    #9 0x2b010fb8c9d7 in std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() /home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/shared_ptr_base.h:684:11
    #10 0x2b01117831dd in std::__shared_ptr<SalBitmap, (__gnu_cxx::_Lock_policy)2>::~__shared_ptr() /home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/shared_ptr_base.h:1123:31
    #11 0x2b0111782267 in std::shared_ptr<SalBitmap>::~shared_ptr() /home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/shared_ptr.h:93:11
    #12 0x2b0112b4f51e in Bitmap::~Bitmap() /vcl/source/bitmap/bitmap.cxx:166:1
    #13 0x2b010faac276 in BitmapEx::~BitmapEx() /include/vcl/bitmapex.hxx:37:37
    #14 0x2b0112dbb6bd in std::pair<ScaleCacheKey, BitmapEx>::~pair() /home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/stl_pair.h:198:12
    #15 0x2b0112de2cfd in void __gnu_cxx::new_allocator<std::__cxx1998::_List_node<std::pair<ScaleCacheKey, BitmapEx> > >::destroy<std::pair<ScaleCacheKey, BitmapEx> >(std::pair<ScaleCacheKey, BitmapEx>*) /home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/ext/new_allocator.h:140:28
    #16 0x2b0112de2ba9 in void std::allocator_traits<std::allocator<std::__cxx1998::_List_node<std::pair<ScaleCacheKey, BitmapEx> > > >::destroy<std::pair<ScaleCacheKey, BitmapEx> >(std::allocator<std::__cxx1998::_List_node<std::pair<ScaleCacheKey, BitmapEx> > >&, std::pair<ScaleCacheKey, BitmapEx>*) /home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/alloc_traits.h:487:8
    #17 0x2b01135146cc in std::__cxx1998::__cxx11::_List_base<std::pair<ScaleCacheKey, BitmapEx>, std::allocator<std::pair<ScaleCacheKey, BitmapEx> > >::_M_clear() /home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/list.tcc:76:4
    #18 0x2b01135471ce in std::__cxx1998::__cxx11::list<std::pair<ScaleCacheKey, BitmapEx>, std::allocator<std::pair<ScaleCacheKey, BitmapEx> > >::clear() /home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/stl_list.h:1406:9
    #19 0x2b01135470f4 in std::__debug::list<std::pair<ScaleCacheKey, BitmapEx>, std::allocator<std::pair<ScaleCacheKey, BitmapEx> > >::clear() /home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/debug/list:539:9
    #20 0x2b0113541f69 in o3tl::lru_map<ScaleCacheKey, BitmapEx, std::hash<ScaleCacheKey>, std::equal_to<ScaleCacheKey> >::clear() /include/o3tl/lru_map.hxx:179:18
    #21 0x2b011353ce61 in DeInitVCL() /vcl/source/app/svmain.cxx:586:37
    #22 0x2b0108fea6c3 in (anonymous namespace)::Protector::~Protector() /test/source/vclbootstrapprotector.cxx:32:13
    #23 0x2b0108fea7b4 in (anonymous namespace)::Protector::~Protector() /test/source/vclbootstrapprotector.cxx:28:35
    #24 0x2b00ed90d6ae in CppUnit::ProtectorChain::pop() /workdir/UnpackedTarball/cppunit/src/cppunit/ProtectorChain.cpp:56:3
    #25 0x2b00ed9ae022 in CppUnit::TestResult::popProtector() /workdir/UnpackedTarball/cppunit/src/cppunit/TestResult.cpp:196:21
    #26 0x4ffaea in (anonymous namespace)::ProtectedFixtureFunctor::run() const /sal/cppunittester/cppunittester.cxx:338:20
    #27 0x4fbbc5 in main2() /sal/cppunittester/cppunittester.cxx:478:16
    #28 0x4fa052 in sal_main() /sal/cppunittester/cppunittester.cxx:614:14
    #29 0x4f9e9e in main /sal/cppunittester/cppunittester.cxx:609:1
    #30 0x2b00ef76f554 in __libc_start_main /usr/src/debug/glibc-2.17-c758a686/csu/../csu/libc-start.c:266
    #31 0x425894 in _start (/workdir/LinkTarget/Executable/cppunittester+0x425894)

0x60e00041a3d0 is located 16 bytes inside of 152-byte region [0x60e00041a3c0,0x60e00041a458)
freed by thread T0 here:
    #0 0x4f7080 in operator delete(void*) /home/tdf/lode/packages/llvm-llvmorg-9.0.1.src/compiler-rt/lib/asan/asan_new_delete.cc:160
    #1 0x2b0112dd4714 in __gnu_cxx::new_allocator<std::__cxx1998::_List_node<std::pair<ScaleCacheKey, BitmapEx> > >::deallocate(std::__cxx1998::_List_node<std::pair<ScaleCacheKey, BitmapEx> >*, unsigned long) /home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/ext/new_allocator.h:125:2
    #2 0x2b0112dd46c1 in std::allocator_traits<std::allocator<std::__cxx1998::_List_node<std::pair<ScaleCacheKey, BitmapEx> > > >::deallocate(std::allocator<std::__cxx1998::_List_node<std::pair<ScaleCacheKey, BitmapEx> > >&, std::__cxx1998::_List_node<std::pair<ScaleCacheKey, BitmapEx> >*, unsigned long) /home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/alloc_traits.h:462:13
    #3 0x2b0112de2c5d in std::__cxx1998::__cxx11::_List_base<std::pair<ScaleCacheKey, BitmapEx>, std::allocator<std::pair<ScaleCacheKey, BitmapEx> > >::_M_put_node(std::__cxx1998::_List_node<std::pair<ScaleCacheKey, BitmapEx> >*) /home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/stl_list.h:387:9
    #4 0x2b01135146de in std::__cxx1998::__cxx11::_List_base<std::pair<ScaleCacheKey, BitmapEx>, std::allocator<std::pair<ScaleCacheKey, BitmapEx> > >::_M_clear() /home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/list.tcc:80:4
    #5 0x2b01135471ce in std::__cxx1998::__cxx11::list<std::pair<ScaleCacheKey, BitmapEx>, std::allocator<std::pair<ScaleCacheKey, BitmapEx> > >::clear() /home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/stl_list.h:1406:9
    #6 0x2b01135470f4 in std::__debug::list<std::pair<ScaleCacheKey, BitmapEx>, std::allocator<std::pair<ScaleCacheKey, BitmapEx> > >::clear() /home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/debug/list:539:9
    #7 0x2b0113541f69 in o3tl::lru_map<ScaleCacheKey, BitmapEx, std::hash<ScaleCacheKey>, std::equal_to<ScaleCacheKey> >::clear() /include/o3tl/lru_map.hxx:179:18
    #8 0x2b011353ce61 in DeInitVCL() /vcl/source/app/svmain.cxx:586:37
    #9 0x2b0108fea6c3 in (anonymous namespace)::Protector::~Protector() /test/source/vclbootstrapprotector.cxx:32:13
    #10 0x2b0108fea7b4 in (anonymous namespace)::Protector::~Protector() /test/source/vclbootstrapprotector.cxx:28:35
    #11 0x2b00ed90d6ae in CppUnit::ProtectorChain::pop() /workdir/UnpackedTarball/cppunit/src/cppunit/ProtectorChain.cpp:56:3
    #12 0x2b00ed9ae022 in CppUnit::TestResult::popProtector() /workdir/UnpackedTarball/cppunit/src/cppunit/TestResult.cpp:196:21
    #13 0x4ffaea in (anonymous namespace)::ProtectedFixtureFunctor::run() const /sal/cppunittester/cppunittester.cxx:338:20
    #14 0x4fbbc5 in main2() /sal/cppunittester/cppunittester.cxx:478:16
    #15 0x4fa052 in sal_main() /sal/cppunittester/cppunittester.cxx:614:14
    #16 0x4f9e9e in main /sal/cppunittester/cppunittester.cxx:609:1
    #17 0x2b00ef76f554 in __libc_start_main /usr/src/debug/glibc-2.17-c758a686/csu/../csu/libc-start.c:266

Change-Id: Ief4b3e60a8846121a828f1c933cc3c7dc3fe0369
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128150
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-01-10 11:31:42 +01:00
Miklos Vajna
bf883027ee Update git submodules
* Update helpcontent2 from branch 'master'
  to 78e8b7920821848f56d081972a2875ed10bba299
  - Add initial help for the cui textcolumnstabpage
    
    Based on the cui textanimtabpage help page.
    
    Change-Id: I744794a13f10145565e78fb45f558db0c5ff3091
    Reviewed-on: https://gerrit.libreoffice.org/c/help/+/128204
    Tested-by: Jenkins
    Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2022-01-10 09:31:45 +01:00
Tomaž Vajngerl
093c98dcb4 sc: make icon size of cond. formatting same as font size
This makes the behavior of the Calc te same as other spreadsheet
programs, where the icon size of the conditional formatting is
the same as the font size and not the actual cell height (as it
is the behaviour now).

Change-Id: I00c96ad83458cd31f67c0b6f566e3d01dd8cd47b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128185
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-01-10 05:09:42 +01:00
Jan-Marek Glogowski
ef5e2d8604 Move HAVE_MORE_FONTS into an extra config header
No need to recompile most of LibreOffice, because the --with-fonts
configure flag changed. This preprocessor define is just used by
unit tests anyway.

Change-Id: Ia2eae7d0c74e59e034fdd8513504a34e51ab428e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128197
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2022-01-10 04:50:46 +01:00
Caolán McNamara
b4a281af53 ofz#43818 delete of uninitialized pointer
Change-Id: I91509915c18c3e9b54cb3047462b9dd9a8c7a46b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128141
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-01-09 22:26:56 +01:00
Caolán McNamara
e28f4b6bcc ofz#43458 avoid OOM
Change-Id: Id0e1e985c446c147a219ba2f5157a41deae656a4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128193
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-01-09 22:26:38 +01:00
Caolán McNamara
27e9de358b ofz#43446 Undefined-shift
Change-Id: Ibe3485983ecf764ca8b8e667b470c6b210b6d2d4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128192
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-01-09 20:04:08 +01:00
Hossein
7ac5ee3546 tdf#146084 No hyphenation warning for Pashto
Pashto language, which is spoken in Afghanistan and Pakistan uses the
Arabic script, and does not use hyphenation.

Change-Id: I87a1235b183055b0961ab27f45281be7aa9965c3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128191
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2022-01-09 18:50:23 +01:00
Stephan Bergmann
6e527140e8 Improve some CPPUNIT_ASSERT checks
(In each case, the name of the file is obvious from the surrounding
code, so there's no loss in not having CPPUNIT_ASSERT_LESS/GREATER_MESSAGE
available here.)

Change-Id: I5e4e1a30f6389f8b2801648a6179b574727f0859
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128116
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-01-09 18:24:49 +01:00
Noel Grandin
a3fa2c3bad Simplify some TempFile service code
Change-Id: Id39be33dcc5aa9378e29c850cb71d3662093ab25
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128189
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-01-09 18:02:08 +01:00
Olivier Hallot
9754b3feb4 tdf#90497 Replace Open Sans -> Noto Sans
See comment #19 of tdf#90497.

Change-Id: Ic102e2155ae97cb191b13f883d7c2fcec6b9a38a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128139
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2022-01-09 17:41:47 +01:00
Jan-Marek Glogowski
032a96621d Try a different approach to fix ofz#39303
... to get rid of all the "unused, assigned variable" compiler
warnings.

Reverts commit 619dcf67c1.

Change-Id: I5a8bf190f00e7698f806b807b2cbfeb8fb63c766
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128182
Tested-by: Jenkins
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-01-09 16:51:41 +01:00
Luboš Luňák
dd6ff1fd7f implement anyToHash() and use it for SdrCustomShapeGeometryItem
Using anyLess() still has quite some cost with bsc#1183308, this
makes the cost almost unnoticeable.

Since some values of Any are not handled, return empty std::optional
for those cases.

Change-Id: Ib45a81441e8bb456c4749f9bc53a981f09bbb1a5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128109
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-01-09 15:43:53 +01:00
Luboš Luňák
9ba45189c7 make SdrCustomShapeGeometryItem sortable and fast (bsc#1183308)
The document contains a complex graphic consisting of many shapes,
and SfxItemPool tries to avoid duplicates by checking for equality.
And SdrCustomShapeGeometryItem contains a UNO sequence as data,
and comparing those is non-trivial. Make the item sortable, which
should make things faster, and use anyLess() for the ordering.
Additionally first check the size of the list of property names
the class keeps for an easy fast return.

Change-Id: I49220e589b6510c6f1f40d584301be83367fb5a4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128047
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-01-09 15:43:39 +01:00
Luboš Luňák
74a37dce32 make SdrCustomShapeGeometryItem internal data consistent
The PutValue() function didn't update the property map properly
the same way the constructor and other functions do.

Change-Id: I107f7095077d888cd9701d87a6e536339b0257b1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128104
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-01-09 15:43:22 +01:00
Luboš Luňák
afda77cd65 use C++ class handling ownership for anyToString()
This matches changes I did for anyLess() in my previous commit.

Change-Id: Id38c49c10223340b7359765e1071d8a9f72ba92e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128046
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-01-09 15:43:07 +01:00
Luboš Luňák
ba252c51f5 make anyLess() work also for compound types such as sequences
The previous implementation used the specific predicates, which
are not recursive. And since that'd require constructing Any
instances, which copies, which would be slow, write new code
based on anyToString() instead.

Change-Id: I439f81d4b1efbd46c10d50d0725a5f6f40968b12
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128045
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-01-09 15:42:50 +01:00
Luboš Luňák
9e7e63b8f8 uno sequences with different sizes are not equal
This should often the case, and should be way faster than the UNO
data comparison.

Change-Id: Ied648d75779ef3aafd293c36906a1bab66bdeade
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128098
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-01-09 15:42:22 +01:00
Mike Kaganski
1bdb4ddfc5 Slightly optimize code handling angles
Change-Id: I8bc10513f6cd704abc7a2bbb17d8d0d8d2628401
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128187
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-01-09 15:11:09 +01:00
Jan-Marek Glogowski
dbf57c78f0 VCL drop unused glyphcache include
Change-Id: I5c7461a9ee5d63024b8376f4173d418c21a07935
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128184
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2022-01-09 14:06:16 +01:00
Jan-Marek Glogowski
7af8def453 Replace single sw.level2 log area user with area sw
Change-Id: I3df5c5f937361a7a0283a05a7b9c6669bb404c1e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128183
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2022-01-09 13:26:42 +01:00
Jan-Marek Glogowski
0c124cb6e1 Qt minimize modal reparenting a bit
Change-Id: Ie7203e9d92e5971de6c2730ff847f351e5641c9f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128178
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2022-01-09 13:25:59 +01:00
Julien Nabet
652a7f1fce Add TODO in include/cppuhelper about compbase.hxx and compbase<N>.hxx
Change-Id: If046e624d6fe5a711aec803652800a4a3830ec74
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128181
Tested-by: Julien Nabet <serval2412@yahoo.fr>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-01-09 12:40:20 +01:00
Jan-Marek Glogowski
f7346dc882 Qt use platform-independent visibility functions
show() isn't just some conveniently renamed setVisible(true), but
presents a window in a platform-dependant way, which - at least
for WASM - means maximized and without a title bar. This is not
really expected and WASM can also use multiple windows.

Change-Id: I3fbaec1dfc2cd32bf3a90a94dcee01ebc88e58c7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128179
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2022-01-09 12:06:45 +01:00
Jan-Marek Glogowski
b6feea0a84 soffice.sh depends on config_host.mk for the sed
Change-Id: Ifd2ab80fcbfa05ad606a88ac83f1f65dd1713490
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128180
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2022-01-09 12:06:14 +01:00
Hossein
7650d164a1 tdf#146084 No hyphenation warning for Vietnamese
The Vietnamese language does not use hyphenation, so LO should not
warn for lack of hyphenation data. This was described in the commit
message of 151c56ed54, but the actual
code for fixing the problem for Vietnamese langauge was missing.
This patch, adds the Vietnamese language to the list of languages
that do not use hyphenation, so the warning for the lack of
hyphenation data will no longer be displayed for this language.

As described in the above commit:

"In Vietnamese all words consist of single syllables, so they are
often very short; hyphenation is not allowed at all."
https://tug.org/TUGboat/tb29-1/tb91thanh-vntex.pdf
Hyphenation is declined in Vietnamese orthography since 1975
https://www.quora.com/When-did-hyphenation-decline-in-Vietnamese-orthography

Change-Id: Id8d3681ad0a93065e61e9da2422af64793fbc111
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128177
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2022-01-09 04:58:11 +01:00
Jim Raykowski
35d8a3f152 SwNavigator: Fix outline select when table is the only content
Prior to this patch for outline content having only a table(s), right-
click on an outline entry without the cursor and choosing 'Select' from
the context menu only selects the outline paragraph when the current
cursor position in the document is after the outline to be selected.
The solution given here is to move the document cursor to the outline
being selected before the outline selection is made.

Change-Id: Ie25bfc81306dfb10a8ced8369e0ee7de0f3eacff
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127884
Tested-by: Jenkins
Reviewed-by: Jim Raykowski <raykowj@gmail.com>
2022-01-09 04:50:29 +01:00
Jan-Marek Glogowski
3a683edd9c Catch exception if failing to set the drag source
... or the drop target.

This is the "don't trust the comment or lose a day debugging WASM
AKA don't switch of your brain" commit.

The comment was "createInstance can throw any exception", so - no
more createInstance, no more exception! Nope, you're WRONG! While
the uno::Reference<...>::set(..., UNO_QUERY) might itself not
throw an exception, something else from the CreateDragSource or
CreateDropTarget call could.

The symptom was a caught exception when loading the initial Writer
document in SynchronousDispatch::dispatch.

While at it, also apply the clean-ups suggested by Mike Kaganski
in a comment to the original patch after the merge.

Regression from commit 031576105c
("VCL move platform code from mouse.cxx into plugins").

Change-Id: If80a90a9a6c070d912584f85b9fd10382b98e29c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128175
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2022-01-09 00:46:03 +01:00
Stanislav Horacek
9f55945b12 Update git submodules
* Update helpcontent2 from branch 'master'
  to e181836ae842bdafb6c54bfca86e054540f53510
  - fix names of TableControl properties showing headers
    
    Change-Id: I2ac8de7ea17ed7a24244a59cdb10b14803e76769
    Reviewed-on: https://gerrit.libreoffice.org/c/help/+/128144
    Tested-by: Jenkins
    Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2022-01-09 00:06:06 +01:00
Noel Grandin
4c4ce3dc21 tdf#146556 feature 'drag-mirror' is broken
regression from
    commit 11e52fe297
    introduce Degree100 strong_int type

where I tried to introduce a more efficient NormAngle36000
calculation, but it produces the wrong answer.

Change-Id: Iefeb0849984bc59d3ce9191eaf6f064beba94c59
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128143
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-01-08 20:45:19 +01:00
Noel Grandin
31872a3823 fix Options->LibreOffice->View->Visibility->Menu on Windows,
impossible to set to Hide, regression from
    commit 131759a3db
    Date:   Sun Jul 25 16:21:39 2021 +0200
    use officecfg for menu options

Change-Id: I5312be2963d15ab85c267ece073e52984b1a34de
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128137
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-01-08 20:44:57 +01:00
Mike Kaganski
e44b54a847 Fix build
Commit 326351e2b3 crossed with
commit b37f9fbf05.

Change-Id: I1a10641aa0324e6af25698bb52d82157898c45d1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128142
Tested-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-01-08 18:52:16 +01:00
Ramreiso Kashung
4e5bbcdc3d Optimise a range-based for loop
This patch is an extension of https://gerrit.libreoffice.org/c/core/+/127734 related to comment made by Mike Kaganski

Change-Id: Ia7a6480dba2a0752a52ae4f9655c345af9f3ba64
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128134
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
2022-01-08 16:28:36 +01:00