summaryrefslogtreecommitdiff
path: root/unotools/source
AgeCommit message (Collapse)Author
2021-09-06clang-tidy:readability-redundant-member-initNoel Grandin
Change-Id: I8590d67f064dd74da42c0e3bf543f2aadbd2b893 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121693 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-09-01Simplify utl::removeTreeMike Kaganski
Implement it using comphelper::DirectoryHelper::deleteDirRecursively Change-Id: I89d4e7c71b7556cb23d43fffa9b1e12df5ef8c3a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121452 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-09-01Simplify dtor logicMike Kaganski
Change-Id: I45395f2370474487dc11a0f634c581b30bdc9a61 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121427 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-08-18ofz#36713 Indirect-leakCaolán McNamara
Change-Id: I665d7eb66f04fd78b6345f22d5f5724e5778a211 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120653 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-08-18loplugin:passstuffbyrefNoel Grandin
Change-Id: I4f01eb3842ef198f02af274f54afb2760c820a4b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120655 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-13Help older linkers (Ubuntu 18.04, Fedora 31)Jan-Marek Glogowski
Fixes a regression from commit 429e6e6efbfbc65d36452cbf8b3a25740a1dc8bc ("osl::Mutex->std::mutex in OInputStreamHelper"), which results in failed linking with some older toolchains: /usr/bin/ld.gold: error: workdir/CxxObject/xmlsecurity/source/helper/UriBindingHelper.o: requires dynamic R_X86_64_PC32 reloc against '_ZThn40_N3utl18OInputStreamHelper7acquireEv' which may overflow at runtime; recompile with -fPIC include/com/sun/star/uno/Reference.hxx:240: error: undefined reference to 'non-virtual thunk to utl::OInputStreamHelper::acquire()' collect2: error: ld returned 1 exit status xmlsecurity/Library_xmlsecurity.mk:10: recipe for target 'symbols/instdir/program/libxmlsecurity.so' failed Known problematic setups are my Ubuntu 18.04 build schroot and Caolán's Fedora 31 VM to run Coverity. Change-Id: I40f0734a0cb9131193abf21ba95dc63816b5c1d8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120426 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
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-03Pass 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: I2a24a123a64b762fd0741c45eaca3ad4bdd5580d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119884 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 OInputStreamWrapperNoel Grandin
Change-Id: I59dbb1d5d3aea9b94959d26e544eddfb600e9fa1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119724 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-31osl::Mutex->std::mutex in OInputStreamHelperNoel Grandin
Change-Id: Ia6aa6541474e0e4c190ab805a931d74c8a598baf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119723 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-31osl::Mutex->std::mutex in ItemHolder1Noel Grandin
Change-Id: I778450e986ec93f020ef594fe79bc65673ae78be Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119714 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-31osl::Mutex->std::mutex in CharClassNoel Grandin
Change-Id: I8f8873edbbc3974c38fe51ea1c65f93c22570891 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119713 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-31osl::Mutex->std::mutex in AccessibleStateSetHelperNoel Grandin
Change-Id: I20baf32570eef64e8288bb82804c2530f2c6a96b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119712 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-31osl::Mutex->std::mutex in AccessibleRelationSetHelperNoel Grandin
Change-Id: Ib7f44b7bd4b500960f771210177bcfc9476f36be Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119711 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-29return by const& in LocaleDataWrapperNoel Grandin
Change-Id: Id5075424867ae1017df9fa0cd2df802d529e32d5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119666 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-29rtl::Static -> static localNoel Grandin
in a handful cases, like a map or a vector, we don't need init on demand at all, the default constructor can be laid out at compile time Change-Id: I2d404584b5aa23db7b1f779e160e04e72dd2aa74 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119656 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-29Pass 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. Create a new small index type TranslateId for some type-safety. This change only updates accessibility to use the new API, other modules will follow in stages. Change-Id: I289245ad34fda775812302ca7ac1588710167b34 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119632 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-28simplify SvtOptionsDialogOptionsNoel Grandin
Change-Id: I8977c92897757bc62cdc93de98bfa05a00355f0d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119555 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-27simplify SvtViewOptionsNoel Grandin
Change-Id: Ib1f42d7322d105337554848bc40726be00533843 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119548 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-27use officecfg for SvtHistoryOptionsNoel Grandin
Change-Id: I5cfd3a51bc4026ccb66ee23eb6f49a5dff5fe042 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119525 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-26return SvtCompatibilityEntry from SvtCompatibilityOptions::GetListNoel Grandin
instead of converting back and forth Change-Id: Iec913494ccad65ebff76bf7b6cf5b2440fbade42 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119514 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-26convert these into constantsNoel Grandin
Change-Id: Ie3e3b497cfeb8c9e9456fb86a04f409658116e1b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119513 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-26cid#1485150 silence Uncaught exceptionCaolán McNamara
Change-Id: I123efe9921716dda386d78bdbcf22f9299732b9e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119505 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-07-26use officecfg for security optionsNoel Grandin
Change-Id: I9d91fd5b260b82e05aac6567143386742953ecf6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119486 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-26use officecfg for default optionsNoel Grandin
Change-Id: I5241c21fa097c104f1131db61787191d019a5de4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119485 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-26simplify SvtDynamicMenuOptionsNoel Grandin
Change-Id: I8892b8a51fcecd84ea1fedcd71b6d1a2febabee1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119484 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-25use officecfg to retrieve OdfDefaultVersionNoel Grandin
Change-Id: Id54b98d978965e7ce304b83d5eff7d6c844a41d5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119474 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-25use officecfg to retrieve LoadUserSettingsNoel Grandin
Change-Id: I9680c02207ff2d21785a20061b784066ead07a8b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119473 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-25use officecfg to retrieve UseUserDataNoel Grandin
Change-Id: Ic77555520f2451b12c01423179d3f201daad35b3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119472 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-25use officecfg to retrieve CreateBackupNoel Grandin
Change-Id: I4aeb1224f0d42dadd5a69dd49b8df9ee2f776b04 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119471 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-25use officecfg to retrieve LoadDocumentPrinterNoel Grandin
Change-Id: Ie9c164fb9c95989035ef769d0dd539521400e38e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119463 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-25use officecfg to retrieve WarnAlienFormatNoel Grandin
Change-Id: Id7ca2ffa237cb8fda58af60ee5d296f492c5a47e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119462 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-25use officecfg to retrieve AutoSaveTimeNoel Grandin
Change-Id: I003be64cc46d6e781ab03d83bae0a3114ab6d56e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119460 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-25simplify SvFontSubstNoel Grandin
in the process, needed to expose some functionality in ConfigManager and ConfigItem, to avoid repeating code Change-Id: Ic0256a010070a79cd649dfd11267bec2f77e5221 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119470 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-25use officecfg to retrieve UserAutoSaveNoel Grandin
Change-Id: I11f45c43bed9ea9a380026d84a91f48629dffac7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119461 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-24use officecfg to retrieve AutoSaveNoel Grandin
Change-Id: I613ca68123cfd316cd4e6384f743aa6756d9291d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119459 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-24use officecfg to retrieve AutoSavePromptNoel Grandin
Change-Id: I918e31064064664df7364d7c3093d3cefdb4067a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119458 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-24use officecfg to retrieve DocInfoSaveNoel Grandin
Change-Id: I0a9e8b21b0c5937567273155cd5b5f773fe26b8c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119457 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-24use officecfg to retrieve SaveWorkingSetNoel Grandin
Change-Id: I9f4e4c2caffa828670ddedb1c6fc324e28162b9d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119456 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-24use officecfg to retrieve SaveRelInetNoel Grandin
Change-Id: Ife062fabdfc95253c71388ca9594b1530bc40783 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119455 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-24use officecfg to retrieve SaveRelFSysNoel Grandin
Change-Id: If4e943153080e1c8fea02e712038dd6dee92c5a0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119454 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-24use officecfg to retrieve PrettyPrintingNoel Grandin
Change-Id: Ia815acdb8050316293e23801d3ed5bfbeb3ab386 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119417 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-23use officecfg to retrieve SaveDocViewNoel Grandin
Change-Id: I1a758137000359d2448f8c5877d7b2e75f3869b1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119416 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-19tdf#143409: fix Translation is not applied in some UINoel Grandin
regression from commit 0771ac00acc8730f77db76b901724f1513a32723 Author: Noel Grandin <noel@peralex.com> Date: Tue Jun 15 21:12:25 2021 +0200 use string_view in the Translate API Because I mixed string_view with C-style null-terminated strings. We are using string_view.data() to pass stuff to boost, but of course, doing that loses the fact that the string data has associated length, as it finds the length by looking for a terminating NULL. Change-Id: Ia0eb7be5621506dfe0a40a21f360da1b446f5591 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119120 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-18osl::Mutex->std::mutex in CachedTextSearchNoel Grandin
and drop an rtl::Static Change-Id: I17bd6ad0b81ecb947e4306819ddc7d83f8a51dba Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119112 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-18osl::Mutex->std::mutex in ModeratorsActiveDataStreamerNoel Grandin
Change-Id: I9ea32f7f843a0255ce37de8b95d9fc9d29c43157 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119111 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-17osl::Mutex->std::mutex in ModeratorsActiveDataSinkNoel Grandin
Change-Id: If1e4af0d9acf75bd0f2744f134a42c29e41d56f1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119110 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-16Output proper language tag instead of Language+Country concatenationEike Rathke
Change-Id: I83d7f94cf304a58f2ff68b2a667ba66de262f4f3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119070 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins