summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-02-09use more concrete types in chart2, AxisNoel Grandin
Change-Id: Ia47fd6deedd0a1cf6bedc882cb9817206dfa88b9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129690 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-02-09use more concrete types in chart2, AxisNoel Grandin
Change-Id: Iab742573a18384adbd1a397326ca6f4998b45ef3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129689 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-02-09use more concrete types in chart2, AxisNoel Grandin
Change-Id: Ia45eac5e63d4937310a52a88c142623274fd4e1b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129688 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-02-09use more concrete types in chart2, DataSourceNoel Grandin
Change-Id: I513491e8d39ee79edf8521d279bd32031cf22a93 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129687 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-02-09sw a11y: Drop custom implementations of std::lessMichael Weghorn
SwFrameFunc's operator() just applied the less-than operator which is the same as 'std::less<const SwFrame*>' does. The latter is the default for the 'Compare' template argument of a 'std::map' with key type 'const SwFrame*>' anyway, so there's no need to specify any explicitly. The same applies for 'SwShapeFunc' accordingly. Change-Id: I2472b38d04dd6d280bfb825d750a6d67c2d9797c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129682 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2022-02-09tdf#146937 Remove "refresh" command from Template ManagerJeff Huang
Change-Id: I12b43c10cca455a6885101909327b81940dafb07 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129584 Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org> Tested-by: Jenkins
2022-02-09Simplify SvGlobalNameMike Kaganski
Its data only takes 16 bytes, the same as std::string_view on 64-bit platforms, which is considered trivial. No need to use cow_wrapper that would itself take 8 bytes, and have the performance penalty. Also reuse the conversion to sequence from comphelper. Change-Id: I3e3177ea759bf22d099aaa5402559196c5934ee0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129679 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-02-09docx import: right margin was not respected for para with listVasily Melenchuk
If paragpraph has list defined somewhere in styles and right margin defined in current style this margin was overriden with older value from parent styles. Change-Id: Ic0a2e9a1ce5f77b9ef38c549a62f1494c050982c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129595 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2022-02-08Remove COMPILER_PLUGINS_CXX from distro-configs/Jenkins/linux_clang_dbgutil_64Stephan Bergmann
It had originally been added with e754d0931ca75403647cc16100edd98e7e5ceadb "Remove CXXFLAGS_CXX11 from Clang plugin compilation", so "if COMPILER_PLUGINS_CXX is not set, simply default it to g++ instead of trying to construct an acceptable CLANGCXX value from CXX (which would be Clang). (The problem with using Clang without CXXFLAGS_CXX11 is that Clang, unlike GCC, typically defaults to C++03, but building compilerplugins requires C++11 at least. That would cause e.g. the Gerrit/Jenkins linux_clang_dbgutil_64 builds to fail---but which also needs COMPILER_PLUGINS_CXX to be explicitly set to 'g++ -std=c++11' as GCC on those machines is still 4.8.5 defaulting to C++03." But that should no longer be an issue with contemporary Clang, which defaults to >= C++11 for quite a while now. On the other hand, when trying to update the Clang used by <https://ci.libreoffice.org/job/gerrit_linux_clang_dbgutil/> from 5.0.2 to 12.0.1, and adding > export COMPILER_PLUGINS_CXX="ccache $LODE_HOME"/opt_private/gcc-7.3.0/bin/g++ to <https://git.libreoffice.org/lode/+/refs/heads/master/bin/linux_clang_dbgutil_64.env> (where this setting arguably belongs, rather than in distro-configs/Jenkins/linux_clang_dbgutil_64, anyway), which is needed because that version of Clang (and thus loplugin built against it) cannot be built with the baseline CentOS 7 GCC 4.8.5, that setting of COMPILER_PLUGINS_CXX got overriden by the one in distro-configs/Jenkins/linux_clang_dbgutil_64, and configure failed due to > configure:21069: checking clang/Basic/SourceLocation.h usability > configure:21069: ccache g++ -std=c++11 -c -I/home/tdf/sberg/lode/opt_private/clang-llvmorg-12.0.1/include -std=c++14 -fno-exceptions -fno-rtti -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/\ > tdf/sberg/lode/packages/llvm-llvmorg-12.0.1.src/clang/include -I/home/tdf/sberg/lode/opt_private/clang-llvmorg-12.0.1/include -std=c++14 -fno-exceptions -fno-rtti -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_L\ > IMIT_MACROS -I/home/tdf/sberg/lode/packages/llvm-llvmorg-12.0.1.src/clang/include conftest.cpp >&5 > g++: error: unrecognized command line option '-std=c++14' > g++: error: unrecognized command line option '-std=c++14' > configure:21069: $? = 1 Change-Id: Ic33b116090f648ef645febb4fbb28ceb6a2a7cae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129692 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-02-08tdf#147251 can't generally shrink popovers if they don't fit under/overCaolán McNamara
so instead forget about forcing under/over if it doesn't fit on either side and just position so its visible Change-Id: I529bf0d2bb1a3108a8702792ef067372441c2002 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129662 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-02-08lok: introduce Application::LOKHandleMouseEventHenry Castro
Entry point to call the ImplLOKHandleMouseEvent function mainly to process mouse events. Change-Id: I17513643733bf5990d41ab8cf47cdc322ed526ea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118846 Tested-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117711 Tested-by: Jenkins Reviewed-by: Henry Castro <hcastro@collabora.com>
2022-02-08Drop some methods returning just a string and only used onceJulien Nabet
Change-Id: Idccc6edea7dabc79135d49ffe69c1a13f2990b76 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129684 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins
2022-02-08simplify complex conditionalNoel Grandin
Change-Id: I56b9aaf752c3ae809a99b2e6897a929f7f4bbe8b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129683 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-02-08speed up SfxItemPool searches with items that can't use IsSortable()Luboš Luňák
As pointed out by 585e0ac43b9bd8a2f714903034e435c84ae3fc96, some item types cannot be used as IsSortable(), because they are modified after having been inserted in the pool, which breaks the sorted order. But it's possible to at least somewhat improve performance of these items by explicitly providing a hash code and using that first for comparisons when looking up items, which may be cheaper than calling operator==. With ScPatternAttr such comparisons seem to take only 60% of the original time, reducing loading time of some documents by 25%. Change-Id: I41f4dda472fb6db066742976672f2c08b9aeef63 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129667 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Luboš Luňák <l.lunak@collabora.com> Tested-by: Jenkins
2022-02-08CppunitTest_sc_uicalc: give more info when asserting the positionXisco Fauli
Change-Id: Ia1848f1c985b346742f3858e504b18b5807eb688 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129680 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-02-08tdf#130094: sw_uiwriter3: Add unittestXisco Fauli
Change-Id: Ic04c4241e78541dd4479186a9bf00b23883c1550 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129663 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-02-08no need to take copies of the shared_ptr hereNoel Grandin
and copying shared_ptr is fairly slow Change-Id: I0bf06056f867494319c087e113b3f77b5a5632c7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129656 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-02-08tdf#126319: sd_png_export_tests: Add unittestXisco Fauli
Change-Id: I36cdd81fcb70d5383519c22b92a3d6366b719b8f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129380 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-02-08make the large-sheet maxrow value pow2-based and not pow10-basedLuboš Luňák
All the other limits are powers of 2, I see no good reason why this one should be 16000000 and not 16777216. Also at least ScBroadcastAreaSlotMachine actually requires the values to be powers of 2, otherwise the logarithmic algorithm in its ctor will miss some rows at the end. Change-Id: Iee30a271e9e67d092c34d2e4175cb672e6f737a4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129588 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-02-08ucb: webdav-curl: fix deadlock in SerfLockStore::refreshLocks()Michael Stahl
... and removeLock() (regression from commit 03c7cd9bbe3d46bb13a5cf1ad72ba0eaf702747e) Change-Id: I4029a7079c7331a7a00c11e2bec5639086bcc928 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129666 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> Tested-by: Jenkins
2022-02-08[pt-PT] Added 43 words to autocorrectMarco Pinto
Change-Id: Ie70e27786aedf7e8ec71b08a14b15f07dada060e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128149 Tested-by: Jenkins Tested-by: Aron Budea <aron.budea@collabora.com> Reviewed-by: Aron Budea <aron.budea@collabora.com>
2022-02-08loplugin:nullptrStephan Bergmann
Change-Id: I134ca6b0e69124739b734dfb49763da4284f7412 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129652 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-02-08tdf#116685: sw: Add UItestXisco Fauli
Change-Id: I94d9adb86662e67e0334e9777721b4117b3b9c51 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129664 Tested-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-02-08uitest: no need to have a document with a table, just create itXisco Fauli
Change-Id: I06b9d5cb18379ef6fb144817db857bd36902812e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129665 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-02-08sw: fix size of inserted PDF imageMiklos Vajna
We used to multiply the pixel size with the DPI, which resulted in some large enough mm100 width that the inserted image was as wide as the body frame allowed it. Change-Id: I97b81f23166889006363b9241a572f6afde99ee3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129640 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2022-02-08drop checksum assert that is platform dependentCaolán McNamara
Change-Id: I3459d753a8f655ca34ecf6c25fdfd9655687c6d1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129660 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-02-08cid#1497933 suppress Macro compares unsigned to 0Caolán McNamara
Change-Id: I7f06f889f2bd687028c00d79bdcf9e2edacc5c82 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129601 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-02-08optimize ScViewData::GetScrPos() for many hidden rows/columnsLuboš Luňák
With huge sheets checking width of each column may be expensive, and hidden columns have width 0, so if the rest of the columns in a row are hidden, this would check them all. Skip hidden ones at once. Change-Id: I16308e53ce579837fc7e2384919f6cfe04e26c7b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129647 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-02-08optimize ScTabView::SkipCursorVertical() for many hidden rowsLuboš Luňák
The code skips all hidden rows, and it does so one by one, until it encounters the last row, and then it reverses and goes back. With a huge sheet it may spend a noticeable time doing this. Since the RowHidden() function gives a range, use that to skip hidden rows faster. Change-Id: I14a990d288d28e9cab69d7dcc7f0dc9210434859 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129643 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-02-08MAXCOL/MAXROW -> ScSheetLimits in fillinfo.cxxLuboš Luňák
Change-Id: I71b3f8984737e87e8413c21b016425beb6a7d21a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129637 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-02-08if these are row/column numbers, then no need to use sal_uLongLuboš Luňák
Change-Id: I7c9dd795961f8756fe932df910a3fe6272b3211f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129631 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-02-08avoid overflows in ScFlatUInt16RowSegmentsLuboš Luňák
Loading a document with >1024 columns caused overflow warnings. Change-Id: I723185eadf0ed1e806c9fd693ed35dc47d8c2135 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129632 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-02-08ucb: webdav: fix "__lll_lock_wait () "Henry Castro
0 0x00007ffff74bc29c in __lll_lock_wait () at ../sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:103 1 0x00007ffff74b5714 in __GI___pthread_mutex_lock (mutex=0x7fffbfad04c0 <(anonymous namespace)::g_Init>) at ../nptl/pthread_mutex_lock.c:80 2 0x00007fffbf996ed2 in __gthread_mutex_lock(__gthread_mutex_t*) (__mutex=0x7fffbfad04c0 <(anonymous namespace)::g_Init>) at /usr/include/x86_64-linux-gnu/c++/8/bits/gthr-default.h:748 3 0x00007fffbf9b0b56 in std::mutex::lock() (this=0x7fffbfad04c0 <(anonymous namespace)::g_Init>) at /usr/include/c++/8/bits/std_mutex.h:103 4 0x00007fffbf9b69dd in std::unique_lock<std::mutex>::lock() (this=0x7fffffff97e0) at /usr/include/c++/8/bits/std_mutex.h:267 5 0x00007fffbf9e0878 in std::unique_lock<std::mutex>::unique_lock(std::mutex&) (this=0x7fffffff97e0, __m=...) at /usr/include/c++/8/bits/std_mutex.h:197 6 0x00007fffbf9f01e7 in http_dav_ucp::SerfLockStore::startTicker() (this=0x7fffbfad04c0 <(anonymous namespace)::g_Init>) at /home/hcastro/projects/online/lib/core/sid/ucb/source/ucp/webdav-curl/SerfLockStore.cxx:107 7 0x00007fffbf9f0728 in http_dav_ucp::SerfLockStore::addLock(rtl::OUString const&, com::sun::star::ucb::Lock const&, rtl::OUString const&, rtl::Reference<http_dav_ucp::CurlSession> const&, int) Change-Id: I01d3c1f67281ceab38e0452ba9cc714d4aacdbcb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129447 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2022-02-08loplugin:external (clang-cl)Stephan Bergmann
> vcl/source/app/salplug.cxx(440,6): error: externally available entity 'HasAtHook' is not previously declared in an included file (if it is only used in this translation unit, make it static; otherwise, provide a declaration of it in an included file) [loplugin:external] > bool HasAtHook() > ~~~~~^~~~~~~~~~~ Change-Id: I8e293fa53ad0324d2cac4195145dad536e699c47 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129653 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-02-08external/libwebp: Support clang-clStephan Bergmann
...fixing > Makefile.vc(18) : fatal error U1050: Unable to auto-detect toolchain architecture! If cl.exe is in your PATH rerun nmake with ARCH=<arch>. because workdir/UnpackedTarball/libwebp/Makefile.vc naively relies on cl.exe- specific output details in > !IFNDEF ARCH > !IF ! [ $(CC) 2>&1 | grep -q "x86" > NUL ] > ARCH = x86 > !ELSE IF ! [ $(CC) 2>&1 | grep -q "x64" > NUL ] > ARCH = x64 > !ELSE IF ! [ $(CC) 2>&1 | grep -q "ARM" > NUL ] > ARCH = ARM > !ELSE > !ERROR Unable to auto-detect toolchain architecture! \ > If cl.exe is in your PATH rerun nmake with ARCH=<arch>. > !ENDIF > !ENDIF Change-Id: I376295fc75d6ab19773e53dbb607d3b156fbe948 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129655 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-02-08Avoid -Werror,-Wunused-variable also with clang-clStephan Bergmann
Change-Id: Iebf3a95bb104eeff641fbeaa14c620f84b1047f7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129654 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-02-08Extend loplugin:stringview to O[U]StringBuffer::toStringStephan Bergmann
Change-Id: I7ad212dfff8b34d05e3b45107a1ef033a4efc454 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129651 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-02-08use more concrete types in chart2, DataSeriesNoel Grandin
Change-Id: I80bc8961832a20c29b31f7618b9d2609f15ab3c2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129642 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-02-08tdf#146462: sw: Add UItestXisco Fauli
Change-Id: Ifae155b3d6c727403d395c28842b3aea36b92b49 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129633 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-02-08uitest: simplify sample fileXisco Fauli
Submitted by mistake in 9d02b1edafd44b75a8996a97c329fdd4967e8f54 < tdf#96499: sc: Add UItest > Change-Id: Idae2b5d7b51022439289ab6c870b47860feaa388 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129645 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-02-08add template versions of SwContentNode::GetAttrNoel Grandin
Change-Id: I62c0d54c9e1dc89c5684210075219c1eeee9f942 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129602 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-02-08RTF paste: fix cursor creation on shapesMiklos Vajna
This went wrong in commit 232ad2f2588beff50cb5c1f3b689c581ba317583 (API CHANGE: add a "position" parameter to XParagraph/TextPortionAppend methods, 2012-11-28), the problem is that the text range is part of the shape text's node range, so we have to call createTextCursorByRange() on the shape's XText, not on the body text. Change-Id: Ifa97213659130b8c279022a6a03f920dca6061bb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129603 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2022-02-08 Simplify sequence of PropertyValue in linguisting/reportdesign/sc/sfx2Julien Nabet
Change-Id: Icd19a46f59e7b4e9ef4062354c5d066382ea8ade Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129644 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-02-08SwNavigator: factor out m_nMemberCount in FillMemberListJim Raykowski
Change-Id: I91464080aa035c841d1c6bfc0bcf4aee1789037d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129392 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com>
2022-02-08lok: sc: introduce ImplLOKHandleMouseEventHenry Castro
In tiled rendering case, each user has a View/Controller object to interact with a unique document (Model) for collaborating purposes. However, in the desktop case a unique user has many View/Controller objects to handle a unique document, so the user has only one global active focus, capture and tracking window object. In order to handle independent drag & drop for each user, it is created ImplLOKHandleMouseEvent. Change-Id: I735fae9b9858a75f9fedb603798220ab302d65f6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118843 Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Tested-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117708 Tested-by: Jenkins Reviewed-by: Henry Castro <hcastro@collabora.com>
2022-02-07float-cast-overflowStephan Bergmann
...after ea771e85b2302829394df545bb82c02bff2750c2 "Resolves: tdf#146997 use sal_Int64 instead of sal_Int32 for spinbutton values" changed the default values of pcr::ONumericControl::setMin/MaxValue (extensions/source/propctrlr/standardcontrol.cxx) from int to sal_Int64 limits. With SAL_USE_VCLPLUGIN=gtk3, in Writer creating a "Form - Label" and selecting "Control Properties" in its context menu caused > include/tools/helpers.hxx:75:93: runtime error: 9.22337e+18 is outside the range of representable values of type 'long' > #0 in FRound(double) at include/tools/helpers.hxx:75:93 > #1 in (anonymous namespace)::GtkInstanceSpinButton::fromGtk(double) const at vcl/unx/gtk3/gtkinst.cxx:16443:16 > #2 in (anonymous namespace)::GtkInstanceSpinButton::get_range(long&, long&) const at vcl/unx/gtk3/gtkinst.cxx:16521:15 > #3 in weld::MetricSpinButton::update_width_chars() at vcl/source/window/builder.cxx:258:24 > #4 in weld::MetricSpinButton::set_range(long, long, FieldUnit) at include/vcl/weld.hxx:1991:9 > #5 in weld::MetricSpinButton::set_min(long, FieldUnit) at include/vcl/weld.hxx:2005:9 > #6 in pcr::ONumericControl::setMinValue(com::sun::star::beans::Optional<double> const&) at extensions/source/propctrlr/standardcontrol.cxx:401:38 and similarly for pcr::ONumericControl::setMaxValue: For one, for fVal = -9223372036854775808 (i.e., -2^63), -fVal + 0.5 (i.e., 9223372036854775808.5) was outside the range of 64-bit tools::Long, so rewrite the non-positive branch in a simpler way (and I have no idea why it was written in the more complex way in the first place). For another, for fVal = 9223372036854775807 (i.e., 2^63 - 1), fVal + 0.5 (i.e., 9223372036854775807.5) cannot be represented as IEEE 754 double exactly and is represented as 9223372036854775808, which was similarly outside the range of 64-bit tools::Long, so treat that limit value specially on the positive branch. Change-Id: Ic2a553e9ce6319eac591058b1218b29dffaeab2b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129638 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-02-07float-cast-overflowStephan Bergmann
...after ea771e85b2302829394df545bb82c02bff2750c2 "Resolves: tdf#146997 use sal_Int64 instead of sal_Int32 for spinbutton values" changed the default value of pcr::ONumericControl::setMaxValue (extensions/source/propctrlr/standardcontrol.cxx) from int to sal_Int64 max. For example, UITest_calc_tests9 failed with > vcl/source/app/salvtables.cxx:5507:12: runtime error: 9.22337e+18 is outside the range of representable values of type 'long' > #0 in SalInstanceSpinButton::fromField(double) const at vcl/source/app/salvtables.cxx:5507:12 > #1 in SalInstanceSpinButton::get_range(long&, long&) const at vcl/source/app/salvtables.cxx:5541:11 > #2 in weld::MetricSpinButton::update_width_chars() at vcl/source/window/builder.cxx:258:24 > #3 in weld::MetricSpinButton::set_range(long, long, FieldUnit) at include/vcl/weld.hxx:1991:9 > #4 in weld::MetricSpinButton::set_max(long, FieldUnit) at include/vcl/weld.hxx:2012:9 > #5 in pcr::ONumericControl::setMaxValue(com::sun::star::beans::Optional<double> const&) at extensions/source/propctrlr/standardcontrol.cxx:422:38 because std::round(fValue * Power10(get_digits())) = 9223372036854775807 (i.e., 2^63 - 1) cannot be represented as IEEE 754 double exactly and is represented as 9223372036854775808, which was outside the range of sal_Int64, so treat that max limit value specially. (The corresponding min limit value -9223372036854775808 doesn't have that issue.) Change-Id: I9ff7a281278a0c66b0b0d49deb0846bcdb91a8fe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129639 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-02-07tdf#126287: docx import: use defered linebreakVasily Melenchuk
In some cases when we have combo linebreak, endparagraph and end section at very bottom of page, MS Word does ignores linebreak to avoid empty page with same section and lonely end paragraph mark. With defered linebreak we could simulate and ignore such linebreaks during import. Change-Id: Ie6ee4c0990ee1c2e853691a76953c83191664e43 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119709 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2022-02-07fix big-endian hsql to firebird migrationCaolán McNamara
Change-Id: I047d2366ad80eca701924cb0f66b6b1bcfdcac5b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129597 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-02-07ofz#44471 crash in isMoved if re-insert of invalid range failedCaolán McNamara
Change-Id: I21a3a3e544c016205d65d7e81889ebfddc7e322d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129600 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>