summaryrefslogtreecommitdiff
path: root/svl
AgeCommit message (Collapse)Author
2021-08-24osl::Mutex->std::mutex in OFSInputStreamContainerNoel Grandin
Change-Id: Icd6ec9e6cd47fd0396cb70d6c63c435d7370b6fe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120903 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-23loplugin:referencecasting look through more clang TypesNoel Grandin
Note that because of where the fix resides, loplugin:redundantcast also notices a few more things. Change-Id: I0b66047fadfff2c5ceafcbd3eab085de00d861a6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120865 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-20New loplugin:unusedcapturedefaultStephan Bergmann
In sc/qa/unit/ucalc_formula.cxx, dropping the capture-default from the lExpectedinF lambda revealed that MSVC in C++17 mode (i.e., when building without --with-latest-c++) requires ROW_RANGE (a local const int variable from the enclosing TestFormula::testTdf97369) to be captured, even though all uses of that variable within the lambda body are constant expressions. That is still true at least for the latest Visual Studio 2019 version 16.11.1. (This is not an issue for the lExpectedinH and lExpectedinI lambdas a few lines further down, as they, in addition to using that ROW_RANGE, also use the local const double variables SHIFT1 and SHIFT2, whose uses are not constant expressions, so they are implicitly captured and loplugin:unusedcapturedefault does not suggest dropping those lambdas' capture-defaults in the first place.) Change-Id: Iee7efb485187cbe8eba6a2d470afca4993eb1816 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120693 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-08-20msan: MemorySanitizer: use-of-uninitialized-valueCaolán McNamara
nCheckPos is always set to something, but for nCheckPos != 0 nType might be left uninitialized, so test nCheckPos == 0 before nType seen in ooo76602-1.slk and ooo10703-1.html with distro-configs/LibreOfficeOssFuzz.conf ==623515==WARNING: MemorySanitizer: use-of-uninitialized-value #0 0x59600b4 in SvNumberFormatter::PutandConvertEntry(rtl::OUString&, int&, SvNumFormatType&, unsigned int&, o3tl::strong_int<unsigned short, LanguageTypeTag>, o3tl::strong_int<unsigned short, LanguageTypeTag>, bool, bool) svl/source/numbers/zforlist.cxx:658:72 #1 0x8c7f72 in ScImportExport::Sylk2Doc(SvStream&) sc/source/ui/docshell/impex.cxx:2130:48 #2 0x8bcb26 in ScImportExport::ImportStream(SvStream&, rtl::OUString const&, SotClipboardFormatId) sc/source/ui/docshell/impex.cxx:392:13 #3 0x650f4b in TestImportSLK sc/source/ui/docshell/docsh.cxx:3360:19 #4 0x6055a7 in LLVMFuzzerTestOneInput vcl/workben/slkfuzzer.cxx:87:11 #5 0x555b53 in fuzzer::Fuzzer::ExecuteCallback(unsigned char const*, unsigned long) (/out/slkfuzzer+0x555b53) #6 0x541622 in fuzzer::RunOneTest(fuzzer::Fuzzer*, char const*, unsigned long) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerDriver.cpp:323:6 #7 0x54722e in fuzzer::FuzzerDriver(int*, char***, int (*)(unsigned char const*, unsigned long)) (/out/slkfuzzer+0x54722e) #8 0x56fa82 in main /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerMain.cpp:20:10 #9 0x7fbd8b65ebf6 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21bf6) #10 0x51cc49 in _start (/out/slkfuzzer+0x51cc49) Uninitialized value was created by an allocation of 'nType' in the stack frame of function '_ZN14ScImportExport8Sylk2DocER8SvStream' #0 0x8c27c0 in ScImportExport::Sylk2Doc(SvStream&) sc/source/ui/docshell/impex.cxx:1837 Change-Id: I0422ca34827319d1e35d453606a7afe6a9de3840 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120762 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-08-16Rename setX/setY to SetPosX/SetPosY, to align with SetPosMike Kaganski
Change-Id: I856194f26fefad993f416d7b92b57a9417a3c0a3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120546 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-08-16Drop tools::Rectangle::getX/getY, which are just duplicates of Left/TopMike Kaganski
The change allowed to simplify many places where previously this API was used, to avoid inefficient calculations (e.g., moving rectangle keeping its size, and then immediately changing the size). Change-Id: Ica2dc594d91cae83e2c2740c1f4fb23f44998916 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120461 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-08-13split SvNumberFormatter into it's own headerNoel Grandin
so I can make changes without running into cyclic dependencies between header files Change-Id: I98a91c7cc66002ba745cdb8239e5cc267922a45c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120412 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-11Drop convertMm100ToTwip in favor of the new o3tl::toTwipsMike Kaganski
Step by step, duplicates from <tools/UnitConversion.hxx> may go Change-Id: Id4c03ff8adc120ae06dbfdbdfb4f5ff0bb51f489 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120315 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-08-09tdf#143664: svl_qa_cppunit: Add unittestXisco Fauli
Change-Id: If62da781bffc2480fd81dd6aaf28db69b46a0e31 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120198 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-08-08Year without leading 0 if era code is also usedEike Rathke
YYYY GG or GG YYYY shall display 1 BC not 0001 BC, or AD 1 not AD 0001 Change-Id: I1955f55d37a4af5075c9cfc20c3ea200ba340765 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120174 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2021-08-05Pass context and resource string down to boost::locale separatelyNoel Grandin
because this is often on a hot path, and we can avoid the splitting and joining of strings like this. Change-Id: Ia36047209368ca53431178c2e8723a18cfe8260a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119220 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-03Consolidate on C++17 std::scoped_lock instead of std::lock_guardNoel Grandin
as in commit 9376f65a26240441bf9dd6ae1f69886dc9fa60fa Change-Id: I3ad9afd4d113582a214a4a4bc7eea55e38cd6ff9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119927 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-03Resolves: tdf#143664 {de-*} accept "Mär" and "Mrz" for MarchEike Rathke
Change-Id: I82c094687137995a634450cb4f617909859d1688 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119916 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2021-08-02flatten SfxUndoManager_Data a littleNoel Grandin
no need to allocate the SfxUndoArray separately Change-Id: I5866ee1382d0be22b71a7322fe4379d3e159f488 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119894 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-02convert #defines to OUStringLiteralNoel Grandin
mostly by doing $ git grep -l '#define.*\"' -- *.cxx | xargs perl -pi -e 's/^#define\s+(\w+)\s+(\".*\")/constexpr OUStringLiteral \1 = u\2;/g' Change-Id: Idface893449b0ef2a3c5254865a300585d752fbb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119669 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-31osl::Mutex->std::mutex in ItemHolder2Noel Grandin
Change-Id: I6e21d6b8b582d4793f64b04183edcfcb3b178f1a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119722 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-29loplugin:unnecessarymethodsNoel Grandin
Change-Id: I1d7a9c2ca91816c9e550cd673e04599f5efcf5ac Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119668 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-29rtl::Static -> static localNoel Grandin
Change-Id: Ib8d9a24659a37e6b94237d98f030cd2be00bcb39 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119665 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-28use officecfg for SvtCJKOptionsNoel Grandin
and remove some unused options Change-Id: I487a233de4f7414012e5405f2c2e1f9c8b8fb4f2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119554 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-27drop SvtLanguageOptions classNoel Grandin
since it is just a wrapper over SvtCJKOptions and SvtCTLOptions. Later I will replace those two with the equivalent officecfg calls Change-Id: I61c5667a05f75d42643175f2c28c29d7a590b15c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119516 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-26use officecfg for SvtSystemLanguageOptionsNoel Grandin
Change-Id: Icf5cf974e4235d9a961e08bfc5689ec58930236e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119515 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-23expand out contractions in PasswordContainerNoel Grandin
Change-Id: I884356fe9f0081b13dfd47c1ecbd581adf25ebd5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119387 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-23no need to allocate the StorageItem separatelyNoel Grandin
Change-Id: I941404fcc2ded3568afe4818c4851a1bd72e30b1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119386 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-23osl::Mutex->std::mutex in SvtLanguageOptionsNoel Grandin
Change-Id: I5b24c729f63f2f51b2a2bebc8539e8c61cf77bee Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119388 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-21remove obsolete commentsNoel Grandin
Change-Id: Ie2ceb7abb9bef5e84e740fba32f30697144f1c3c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119303 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-20flatten the vector in NfCurrencyTableNoel Grandin
Change-Id: I4a024e2d8c9743374e58836f95aa1fcbdc406b5b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119288 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-20Simplify SfxItemSet ctors and TotalCount using delegationMike Kaganski
Change-Id: I6f40cf80bcd6c8a53f5d25f99688526d4b946bdf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119238 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-07-19Move svl::Items to include/svl/whichranges.hxx, and unify its usageMike Kaganski
... in WhichRangesContainer and SfxItemSet ctors. Now it's not needed to explicitly use 'value' in WhichRangesContainer's ctor, or create an instance for use in SfxItemSet ctor (svl::Items is already defined as a template value of corresponding type). Instead of WhichRangesContainer Foo(svl::Items<1, 2>::value); SfxItemSet Bar(rItemPool, svl::Items<1, 2>{}); now use: WhichRangesContainer Foo(svl::Items<1, 2>); SfxItemSet Bar(rItemPool, svl::Items<1, 2>); Change-Id: I4681d952b6442732025e5a26768098878907a238 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119157 Tested-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-07-17drop sal_uInt16* constructor in SfxItemSetNoel Grandin
Change-Id: Ifb283a49b01c9c6421e385f697e749439db6a53f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119008 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-17osl::Mutex->std::mutex in SharedStringPoolNoel Grandin
std::mutex is slightly faster Change-Id: I0741cd1ed0a011d5e8d6099c189c85f50060a326 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119087 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-16-Werror=class-memaccessNoel Grandin
gcc doesn't like memcpy here error: ‘void* memcpy(void*, const void*, size_t)’ writing to an object of type ‘struct std::pair<short unsigned int, short unsigned int>’ with no trivial copy-assignment; use copy-assignment or copy-initialization instead [-Werror=class-memaccess] 1459 | memcpy(p, other.m_pairs, m_size * sizeof(WhichPair)); Change-Id: I44055d0d4dec589af7f98d62f106b701f1f5a4cd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119063 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-16Drop unused ctorMike Kaganski
Change-Id: I5144d23d4e6f8e01035ef88a222f609184043c6a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119005 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-07-16Move validity check to svl::Items, to avoid invalid WhichRangesContainerMike Kaganski
This uncovered lots of pre-existing invalid ranges, e.g. introduced in commit 6dbfbebad37fd84208e4c336f0864d26019db153, or in much older commit 46952138c938730afcc3607e1a524bb590b0e30e. Also this makes the static in svl::Items to be array of WhichPair, to avoid questionable reinterpret_cast in WhichRangesContainer ctor. Change-Id: I86030b2a2ac0a6d98870f8f7f5cc83e071c6597c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119003 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-07-15drop the Pair constructor from SfxItemSetNoel Grandin
just so we have one fewer odd constructors here Change-Id: I81278e9436747a4eb46a33da9bfec7a8b30079b9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118982 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-15WhichRangesContainer, reduce malloc in SfxItemSetNoel Grandin
SfxItemSet shows up in perf profiles frequently, and the hottest part is the malloc of the two arrays we need. But most of the time, one of those arrays is a compile-time constant. So this change introduces (*) WhichRangesContainer, which manages whether the SfxItemSet owns the array it points at or not. (*) a static const member in svl::Items (idea from mkaganski) to store the data. Change-Id: Icb8cdbc4d54fd76739565c575e16a744515e5355 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118703 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-09Make loplugin:stringadd slightly more aggressiveStephan Bergmann
...by assuming that all const member functions are side-effect free. (This presumably means that some of the special cases in StringAdd::isSideEffectFree are obsoleted by this more general case, but any such removal is postponed to later clean-up.) (Came across this when idly wondering why 8b7f948d9d79393bc6c1b11d239706666fd5d7de "sc, VmlFormControlExporter: avoid OStringBuffer style" had not been found by the plugin before.) Change-Id: I6bca10df53885b14a590543aabd61f23b3748572 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118675 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-07-08Resolves: tdf#122191 BOOLEAN is a keyword, treat it as suchEike Rathke
... to not end up with "BOOL"E"AN" instead, which is a date type with an era year and literal strings. This never worked but only was uncovered by commit ce4fc2fc08be8ea2773194e303ed42d2579e93a0 CommitDate: Fri Mar 2 20:27:45 2018 +0100 Resolves: tdf#115351 convert boolean equivalent format codes to proper Boolean if the format also had to be converted between locales. Also preserve boolean equivalent formats during Excel export and try hard to convert back as much as possible if a literal boolean string format is a Boolean equivalent of the target locale. Change-Id: I54f65c276cbf7bb99e960b6d7053c5fa95fbccb6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118591 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2021-07-06Related: tdf#125035 Introduce LongDateOrder and handle YDM in DateFormatterEike Rathke
This fixes also unotools/source/i18n/localedatawrapper.cxx:1473: LocaleDataWrapper::scanDateOrder: no magic applicable lv-LV requested lv-LV loaded that is the only locale with a YDM long date order. Change-Id: I776b8706bf5bd3ec11cc46d38fd3613c8df7519f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118482 Tested-by: Jenkins Reviewed-by: Eike Rathke <erack@redhat.com>
2021-07-05Removed duplicated includesAndrea Gelmini
Change-Id: I26af0a81f41a322239717346a47b225e2236fdbd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118453 Tested-by: Jenkins Reviewed-by: Andrea Gelmini <andrea.gelmini@gelma.net>
2021-07-05store the SfxItemSet inside SfxSetItem by valueNoel Grandin
rather than on the heap, avoiding an allocation Change-Id: I3f1504f9a2d4178a9ba59e98de182a0ab98cdce0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118356 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-05tdf#143165: svl_qa_cppunit: Add unittestXisco Fauli
Change-Id: I34e97340f9f7607107b98f8316fb092fa805d2c3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118440 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-07-05Resolves: tdf#143165 Date input must match separator, D,M,Y not part ofEike Rathke
Change-Id: Iae464fd0fc6c480b9a16ccb2f8eb635812c6eeff Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118408 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2021-07-04move SfxSetItem to own header fileNoel Grandin
Change-Id: I77ba873ed236091443627e26e6127e89cd8e15bd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118360 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-03Related: tdf#125035 en_US formatindex="19" DATE_SYSTEM_LONG with D not DDEike Rathke
Otherwise CppunitTest_sw_odfimport testDateFormFormats fails with - Expected: Wednesday, March 4, 2020 - Actual : Wednesday, March 04, 2020 if DateFormatter uses number formatter. This is also what https://www.localeplanet.com/icu/en-US/index.html lists for Date.0 and formatindex="30" has as well. This makes adapting CppunitTest_svl_qa_cppunit testNumberFormat necessary. Change-Id: I1c8cfd954f34f742b0397b8f922d22eb11ae19f0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118361 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2021-07-02no need to allocate return val on heap for GetItemSetForPreviewNoel Grandin
Change-Id: I261182ec2348df045171c5e1beb33579e2c0c766 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118284 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-01can allocate these SfxItemSet on the stackNoel Grandin
Change-Id: Ib2b89613ad3e8f2bcdd51bee10bab3559a64fce4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118208 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-06-28loplugin:indentation improve checks for brace alignmentNoel Grandin
Change-Id: I333100fda7e181f68f36b03279b3fbb8cb768310 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117615 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-06-25tdf#143032: Check if the literal is emptyMike Kaganski
Change-Id: I19a3b1abbe9cda32e012be23fc98baa20108f532 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117723 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-06-17use string_view in the Translate APINoel Grandin
Change-Id: I0bb0ea9d39ed623928060ffd3f2e2bc36ba33209 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117272 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-06-13Assert on valid order of which ids in ranges on SfxItemSet creationMike Kaganski
This allows to make sure we actually use sorted which ranges, and then it's safe to call SfxItemSet::MergeRange when needed. Also this change relaxes the previous requirement that ranges must be separated by at least one; this allows to have adjacent ranges, like in RES_FRMATR_BEGIN, RES_FRMATR_END-1, RES_GRFATR_BEGIN, RES_GRFATR_END-1, where RES_FRMATR_END is equal to RES_GRFATR_BEGIN. Allowing this makes possible to (1) self-document the ranges, so it's clear which ranges are included; and (2) be safe in case when these constants would change, so that the one merged range would not unexpectedly contain everything inserted between RES_FRMATR_END and RES_GRFATR_BEGIN. Change-Id: Iaad0f099b85059b3aa318a347aa7fbd3f6d455c7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116909 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>