summaryrefslogtreecommitdiff
path: root/sax
AgeCommit message (Collapse)Author
2022-01-20WASM make test file loading workArmin Le Grand (Allotropia)
Change-Id: Ic34104534c3e0e73791cf867bfb2e1246dc79cf8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128653 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2022-01-04osl::Mutex->std::mutex in FastSaxParserImplNoel Grandin
Change-Id: I3bb067a0aafe8d7ca1171ab7119acbf94323725c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127915 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-01-04osl::Mutex->std::mutex in FastSaxParserImplNoel Grandin
Change-Id: I5f93c3d1373f8d5a95d8069b1f8381c45e11a875 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127916 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-12-24Use rtl functions instead of own surrogate checking/combiningMike Kaganski
Change-Id: I3eb05d8f5b0761bc3b672d4c855eb469f8cc1a29 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127375 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-12-10Generally determine Rdb content from gb_*_set_componentfile callsStephan Bergmann
...instead of by listing the content somewhat redundantly in the Rdb_*.mk files, to avoid duplication of logic for components that are only built conditionally (and thus should only be included conditionally in the corresponding Rdb). To achieve that, add an "rdb" parameter to gb_ComponentTarget_ComponentTarget (and to the gb_*_set_componentfile macros that internally call gb_ComponentTarget_ComponentTarget), which is used to make the appropriate gb_Rdb_add_component call internally from within gb_ComponentTarget_ComponentTarget. (As a special case, gb_CppunitTest_set_componentfile shall not call gb_Rdb_add_component, as that has already been done by the corresponding gb_Library_set_componentfile call, so allow the gb_ComponentTarget_ComponentTarget "rdb" parameter to be empty to support that special case.) Most Rdb_*.mk files are thus mostly empty now. One exception is i18npool/Rdb_saxparser.mk, which duplicates some of the Rdb_services content as needed during the build in CustomTarget_i18npool/localedata. 1c9a40299d328c78c035ca63ccdf22c5c669a03b "gbuild: create services.rdb from built components" had already tried to do something similar (in addition to other things) under a new --enable-services-rdb-from-build option. However, that approach had four drawbacks that this approach here addresses (and which thus partly reverts 1c9a40299d328c78c035ca63ccdf22c5c669a03b): 1 Rdb_services shall not contain the component files of all libraries that are built. While that commit filtered out the component files that go into Rdb_ure/services (ure/Rdb_ure.mk), it failed to filter out the component files that go into others like Rdb_postgresql-sdbc (connectivity/Rdb_postgresql-sdbc.mk). 2 The code added by that commit to Makefile.gbuild codified the knowledge that there is an Rdb_services, which is brittle. 3 The code added by that commit to solenv/gbuild/Rdb.mk codified the knowledge (for gb_Rdb__URECOMPONENTS) that there is an Rdb_ure/services, which is brittle. 4 Introducing an --enable-services-rdb-from-build option needlessly provided two different ways how the content of Rdb_services is assembled. The changes done here would leave --enable-services-rdb-from-build as a misnomer, as it no longer controls how Rdb_services is assembled. I thus renamed it to --enable-customtarget-components, as that is apparently what it still does now. Change-Id: Ia5e8df4b640146c77421fcec6daa11a9cd260265 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126577 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-11-19Use more basegfx::deg2rad<N> and basegfx::rad2deg<N>Mike Kaganski
Change-Id: I9dc57628b98f67994d546f6887e96389be1efe62 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125568 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-10-30Prepare for removal of non-const operator[] from Sequence in saxMike Kaganski
Change-Id: I9df7229f55347bd4477626595cab459065cc4bb8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124381 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-10-04drop 'using namespace std' in sax/sc/scaddins/sfx2/shellJulien Nabet
Change-Id: I422a6d5b0151115203fd2d7c0fc5597903d3ec8b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123064 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-09-01clang-tidy:readability-redundant-member-initNoel Grandin
Change-Id: Ic5abfe2d047750d8dfd3ae8cc733fa15d34ea505 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121432 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-12include optional header for std::optionalCaolán McNamara
Change-Id: I5e2c42498691d1fccf5122720e56bf44462ce21d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120382 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-08-12flatten FastSaxParserImpl a littleNoel Grandin
The EventList instances are movable (and are really just pointers to buffers of data), so no need to use unique_ptr Change-Id: Ic3e13e949f5a61ee9cc5fcf8da9e22094e8ab9da Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120342 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-07-31osl::Mutex->std::mutex in EntityNoel Grandin
Change-Id: Ia9201dc4998a592ef4adaa39666f67a0935e8161 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119745 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-21Use existing rtl_math_stringToDoubleStephan Bergmann
...like it is also already done in LineParser::readDouble in sdext/source/pdfimport/wrapper/wrapper.cxx (esp. since the code should be changed to use C++17 std::from_chars once that is available in all our baselines), reverting again the introduction of rtl_str_toDouble_WithLength in b1df9c67349cf4cc5be4128d797aefb87f50e38f "[API CHANGE] reduce cost of numeric conversion" Change-Id: If7e3a15649f80093d3407157412fd3deb3a38b12 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119318 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Jenkins
2021-07-21Use existing rtl_str_toInt64_WithLengthStephan Bergmann
...like it is also already done in LineParser::readInt32 in sdext/source/pdfimport/wrapper/wrapper.cxx (esp. since the code should be changed to use C++17 std::from_chars once that is available in all our baselines), reverting again the introduction of rtl_str_toInt32_WithLength in b1df9c67349cf4cc5be4128d797aefb87f50e38f "[API CHANGE] reduce cost of numeric conversion" Change-Id: I2789f8ec55c8d89150d1c68e6b353a1d2e1d1703 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119301 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Jenkins
2021-07-17[API CHANGE] reduce cost of numeric conversionNoel Grandin
on a hot path, since we already know the length of these strings. Which requires adding some new variants of our string conversion functions Change-Id: I1877f8f3c72934c07f14eec7e73bbe8d7b0f1808 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119065 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-05-14Improve loplugin:stringviewStephan Bergmann
Issue the "instead of O[U]String, pass [u16]string_view" diagnostic also for operator call arguments. (The "rather than copy, pass subView()" diagnostic is already part of handleSubExprThatCouldBeView, so no need to repeat it explicitly for operator call arguments.) (And many call sites don't even require an explicit [u16]string_view, esp. with the recent ad48b2b02f83eed41fb1eb8d16de7e804156fcf1 "Optimized OString operator += overloads". Just some test code in sal/qa/ that explicitly tests the O[U]String functionality had to be excluded.) Change-Id: I8d55ba5a7fa16a563f5ffe43d245125c88c793bc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115589 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-05-03loplugin:stringadd improvement for appending numbersNoel Grandin
I was wrong, the Concat framework already optimised appending numbers by stack-allocating small buffers, so include them in the plugin Change-Id: I922edbdde273c89abfe21d51c5d25dc01c97db25 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115037 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-05-02throw() -> noexcept, part 2/3: Automatic loplugin:noexcept rewriteStephan Bergmann
Change-Id: I076f16d0536b534abf0ced4d76051eadb4c0e033 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114949 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-04-22no need makeStringAndClear() when appending to bufferNoel Grandin
it just creates an unnecessary temporary Change-Id: Ide3cd99b2ac4f2a621e5d55ce4bdc95d05430709 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114467 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-04-18reduce log noiseNoel Grandin
Change-Id: I1172470ededff6cacc0d35f069e7afb9c97a425e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114245 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-04-16tdf#122222: add DOCX export of resolved comments as "done"Mike Kaganski
Since implementation of tdf#119228, Writer comments may have "Resolved" state, which is the equivalent of Word's internal "done" flag. This relies on [MS-DOCX] extensions available since Word 2013. DOCX import will be implemented in a follow-up commit. [MS-DOCX]: https://docs.microsoft.com/en-us/openspecs/office_standards/ms-docx Change-Id: I3be1e8a096bdec41c8268974fe81328480eb0704 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114023 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-04-13tdf#79591: No need to use getStr hereMike Kaganski
7ea1bbe712cef48a97faffdf03b45f2812a93e62 had abused the C-style strings, and relied on the names containing zero byte to be truncated on the byte. However, that would only work for names with zero bytes, not with other control characters. Additionally, that prevented the initial names from correct round-trip. This reverts the older fix, and makes sure to handle the attributes with zeroes correctly (using memcpy instead of strncpy). It also removes several similar unneeded uses of getStr. Change-Id: I6c52874d99fe9eb9ccbe0c9a9b57e3b51c45a19f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114040 Tested-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-04-07Updated README.md files to represent current code / use Markdown formatHossein
Previously, all of the README files have been renamed to README.md and now, the contents of these files were changed to use Markdown format. Other than format inconsistency, some README.md files lacked information about modules, or were out of date. By using LibreOffice / OpenOffice wiki and other documentation websites, these files were updated. Now every README.md file has a title, and some description. The top-level README.md file is changed to add links to the modules. The result of processing the Markdown format README.md files can be seen at: https://docs.libreoffice.org/ Change-Id: Ic3b0c3c064a2498d6a435253b041df010cd7797a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113424 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2021-03-24Revert "Fix typo"Andrea Gelmini
This reverts commit 4550b35781c6d9407da29f64f9b02b9201bf953b. Change-Id: I279bb86bb876179d470a736f638446ffeaac9508 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112959 Tested-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com> Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2021-03-24Using .md extension/Markdown syntax for modules READMEHossein
Renaming all README files for all top level modules to README.md, applying no content change at this stage to be able to track history of the files. These files should be edited to use correct Markdown syntax later. Change-Id: I542fa3f3d32072156f16eaad2211a397cc212665 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112977 Tested-by: Jenkins Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2021-03-19Fix typoAndrea Gelmini
Change-Id: Icc75dc0f0d7434233b83fb72aadb4832ea47493e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112694 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins
2021-03-03Remove workaround now its fixed in AFL++ and oss-fuzz updatedStephan Bergmann
remove workaround for problem fixed by: https://github.com/AFLplusplus/AFLplusplus/commit/333509bb0a56be9bd2e236f0e2f37d4af2dd7d59> +# "better unicode support" for now: oss-fuzz updated: https://github.com/google/oss-fuzz/pull/5273 Change-Id: Id3f1790ef452ed7732032801fc4ec028e57443eb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111806 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-02-24ofz#30767 Build-FailureCaolán McNamara
afl++ build crashes for some obscure reason with attached bt. Tweaking the code like so gets it to squeak by and continue the build. clang-12: /usr/local/include/llvm/IR/Constants.h:661: llvm::StringRef llvm::ConstantDataSequential::getAsString() const: Assertion `isString() && "Not a string"' failed. Stack dump: 0. Program arguments: /usr/local/bin/clang-12 -cc1 -triple x86_64-unknown-linux-gnu -emit-obj --mrelax-relocations -disable-free -disable-llvm-verifier -discard-value-names -main-file-name converter.cxx -mrelocation-model pic -pic-level 2 -fhalf-no-semantic-interposition -mframe-pointer=all -fmath-errno -fno-rounding-math -mconstructor-aliases -munwind-tables -target-cpu x86-64 -tune-cpu generic -fno-split-dwarf-inlining -debug-info-kind=limited -dwarf-version=4 -debugger-tuning=gdb -ffunction-sections -fdata-sections -D BOOST_ERROR_CODE_HEADER_ONLY -D BOOST_SYSTEM_NO_DEPRECATED -D CPPU_ENV=gcc3 -D DISABLE_DYNLOADING -D LINUX -D NDEBUG -D OSL_DEBUG_LEVEL=0 -D UNIX -D UNX -D X86_64 -D _PTHREADS -D _REENTRANT -D SAX_DLLIMPLEMENTATION -D FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -D EXCEPTIONS_ON -D LIBO_INTERNAL_ONLY -D __AFL_HAVE_MANUAL_CONTROL=1 -D __AFL_COMPILER=1 -D FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION=1 -D "__AFL_FUZZ_INIT()=int __afl_sharedmem_fuzzing = 1;extern unsigned int *__afl_fuzz_len;extern unsigned char *__afl_fuzz_ptr;unsigned char __afl_fuzz_alt[1048576];unsigned char *__afl_fuzz_alt_ptr = __afl_fuzz_alt;" -D "__AFL_COVERAGE()=int __afl_selective_coverage = 1;extern \"C\" void __afl_coverage_discard();extern \"C\" void __afl_coverage_skip();extern \"C\" void __afl_coverage_on();extern \"C\" void __afl_coverage_off();" -D "__AFL_COVERAGE_START_OFF()=int __afl_selective_coverage_start_off = 1;" -D __AFL_COVERAGE_ON()=__afl_coverage_on() -D __AFL_COVERAGE_OFF()=__afl_coverage_off() -D __AFL_COVERAGE_DISCARD()=__afl_coverage_discard() -D __AFL_COVERAGE_SKIP()=__afl_coverage_skip() -D "__AFL_FUZZ_TESTCASE_BUF=(__afl_fuzz_ptr ? __afl_fuzz_ptr : __afl_fuzz_alt_ptr)" -D "__AFL_FUZZ_TESTCASE_LEN=(__afl_fuzz_ptr ? *__afl_fuzz_len : (*__afl_fuzz_len = read(0, __afl_fuzz_alt_ptr, 1048576)) == 0xffffffff ? 0 : *__afl_fuzz_len)" -D "__AFL_LOOP(_A)=({ static volatile char *_B __attribute__((used)); _B = (char*)\"##SIG_AFL_PERSISTENT##\"; __attribute__((visibility(\"default\"))) int _L(unsigned int) __asm__(\"__afl_persistent_loop\"); _L(_A); })" -D "__AFL_INIT()=do { static volatile char *_A __attribute__((used)); _A = (char*)\"##SIG_AFL_DEFER_FORKSRV##\"; __attribute__((visibility(\"default\"))) void _I(void) __asm__(\"__afl_manual_init\"); _I(); } while (0)" -O1 -Wno-unused-command-line-argument -Wall -Wno-missing-braces -Wnon-virtual-dtor -Wendif-labels -Wextra -Wundef -Wunreachable-code -Wunused-macros -Wembedded-directive -Wdeprecated-copy-dtor -Wimplicit-fallthrough -Wunused-exception-parameter -Wrange-loop-analysis -Wshadow -Woverloaded-virtual -Wno-unused-command-line-argument -std=c++17 -fdeprecated-macro -ferror-limit 19 -fvisibility hidden -fvisibility-inlines-hidden -fsanitize=address -fsanitize-blacklist=/src/libreoffice/bin/sanitize-excludelist.txt -fsanitize-system-blacklist=/usr/local/lib/clang/12.0.0/share/asan_blacklist.txt -fsanitize-address-use-after-scope -fno-assume-sane-operator-new -funroll-loops -pthread -stack-protector 2 -fgnuc-version=4.2.1 -fno-inline -fcxx-exceptions -fexceptions -fcolor-diagnostics -load /src/aflplusplus/afl-llvm-dict2file.so -load /src/aflplusplus/cmplog-routines-pass.so -load /src/aflplusplus/cmplog-instructions-pass.so -load /src/aflplusplus/split-switches-pass.so -load /src/aflplusplus/SanitizerCoveragePCGUARD.so -faddrsig -x c++ converter-773998.cpp 1. <eof> parser at end of file 2. Per-module optimization passes 3. Running pass 'afl++ dict2file instrumentation pass' on module 'converter-773998.cpp'. #0 0x0000000001719ae3 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/usr/local/bin/clang-12+0x1719ae3) #1 0x0000000001717a4e llvm::sys::RunSignalHandlers() (/usr/local/bin/clang-12+0x1717a4e) #2 0x0000000001719f8f SignalHandler(int) (/usr/local/bin/clang-12+0x1719f8f) #3 0x00007f3e317b2980 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x12980) #4 0x00007f3e306abfb7 raise (/lib/x86_64-linux-gnu/libc.so.6+0x3efb7) #5 0x00007f3e306ad921 abort (/lib/x86_64-linux-gnu/libc.so.6+0x40921) #6 0x00007f3e3069d48a (/lib/x86_64-linux-gnu/libc.so.6+0x3048a) #7 0x00007f3e3069d502 (/lib/x86_64-linux-gnu/libc.so.6+0x30502) #8 0x00007f3e30464810 (anonymous namespace)::AFLdict2filePass::runOnModule(llvm::Module&) /src/aflplusplus/instrumentation/afl-llvm-dict2file.so.cc:150:5 #9 0x00000000011d139f llvm::legacy::PassManagerImpl::run(llvm::Module&) (/usr/local/bin/clang-12+0x11d139f) #10 0x00000000018ef775 clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions const&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::DataLayout const&, llvm::Module*, clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream> >) (/usr/local/bin/clang-12+0x18ef775) #11 0x00000000023c074f clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) (/usr/local/bin/clang-12+0x23c074f) #12 0x0000000002cbe554 clang::ParseAST(clang::Sema&, bool, bool) (/usr/local/bin/clang-12+0x2cbe554) #13 0x0000000001e3ccc7 clang::FrontendAction::Execute() (/usr/local/bin/clang-12+0x1e3ccc7) #14 0x0000000001dc7311 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/usr/local/bin/clang-12+0x1dc7311) #15 0x0000000001ed2dfc clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/usr/local/bin/clang-12+0x1ed2dfc) #16 0x000000000092166e cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/usr/local/bin/clang-12+0x92166e) #17 0x000000000091ff77 ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&) (/usr/local/bin/clang-12+0x91ff77) #18 0x000000000091fdbb main (/usr/local/bin/clang-12+0x91fdbb) #19 0x00007f3e3068ebf7 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21bf7) #20 0x000000000091cd49 _start (/usr/local/bin/clang-12+0x91cd49) Change-Id: I4eab488ff09f9213489212e56ed636596be6ae89 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111477 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-02-22sax: document SAX_DISABLE_THREADSMiklos Vajna
Change-Id: I39c05bb3dac09b67b93693dd8f2a297f6eb28f52 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111344 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2021-02-21loplugin:refcounting in package..saxNoel
Change-Id: I83618f54a4117cd81d8626307716129a761e14c5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111274 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-02-18loplugin:referencecasting in saxNoel
Change-Id: Ie7371b2c6ed340ce8417af03aa4f7b60890392ec Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111081 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-02-17tdf#39593: reduce copy/paste in Converter::convertDurationBayram Çiçek
Change-Id: I520e10ef96c677be9f80bba510fe9c89295d416c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111008 Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> Tested-by: Jenkins
2021-02-14Move unit conversion code to o3tl, and unify on that in more placesMike Kaganski
This also allows to easily add more units, both of length and for other unit categories. The conversion for "Line" unit (312 twip) is questionable. Corresponding entries in aImplFactor in vcl/source/control/field.cxx were inconsistent (45/11 in; 10/13 pc; 156/10 pt). They were added without explanation in commit c85db626029fd8a5e0dfcb312937279df32339a0. I haven't found a spec of the unit (https://en.wikipedia.org/wiki/Line_(unit) is not specific). I used the definition based on "by pt", "by mm/100", "by char" (they all were consistent); "by pc" seems inverted; "by twip" was half as much. This accepted conversion makes unit test for tdf#79236 pass. Change-Id: Iae5a21d915fa8e934a1f47f8ba9f6df03b79a9fd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110839 Tested-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-02-10pass FastAttributeList around by rtl::ReferenceNoel
Change-Id: I958a22f60975c74dfaeb8469b4c0cd3759d40130 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110653 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-02-08oox: prefix VML shapetype ids with _x0000_tMichael Stahl
Word 2013 refuses to even load a file that has a <v:shapetype id="shapetype_75"> on some form control shape, reporting a misleading error in a location far later when the top-level w:tbl that contains the shape ends. Using id="_x0000_t75" appears to work, so let's do that then. Couldn't find any documentation on why this is so. Change-Id: Ie22bb04244e24b00a1880544872ae8e281422405 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110493 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-01-29loplugin:stringviewparam extend to new..Noel
O[U]StringBuffer methods Change-Id: I0ffbc33d54ae7c98b5652434f3370ee4f819f6f4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110090 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-01-28simplify code, use more subView()Noel
Change-Id: I569c7f34acbdf8451cd5c9acf1abd334637072d1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110051 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-01-27Improve loplugin:stringliteralvarStephan Bergmann
...to also consider O[U]String ctors taking pointer and length Change-Id: Iea5041634bfbf5054a1317701e30b56f72e940fb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110025 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-01-20Fix typoAndrea Gelmini
Change-Id: I9edd52387417f8bb40646800beda7a3dca0b9abf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109657 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-01-19Simplify getFirstLineBreakdante
Change-Id: I0fcacd3f3deb5867ed91a7037b74fa364ebc4c80 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109302 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-01-19Use customized xml entities on xmleport.dante
This will be mainly used on matml export for unicode characters. It will be used mostly for mathml. Change-Id: I59b96d44facbd01fa517317a0ae54d64d29b0a19 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108562 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-12-30Clang-format saxwriterdante
Change-Id: I4793d81e2ba3405b9ed07a2c5547572ed7e0bee6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108425 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-12-29loplugin:stringviewparam: operator +Stephan Bergmann
Change-Id: I044dd21b63d7eb03224675584fa143009c6b6008 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108418 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-12-28ofz#28733 Direct-leakCaolán McNamara
free xmlEntityPtr the way desret_xmlEntityPtr does in libxml's testapi.c Change-Id: Ia809413c3d4e7b13e799e6c1a57e8abe61bf218d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108415 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-12-27Preparations for customized xml entities on exportdante
Change-Id: I8ad4af7e27ae5f8908f4c932242cb96abbf3de90 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108354 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-12-26Improve handle of custom XML entitiesdante
Since 7.1 hasn't been released yet there's still time to change it before having to be scared about backguards compatibility. This way: - It is more efficient than passing two arguments - On definition it is simpler since both are declarated on same point. So it is simpler to not loose sync between lists. - Code is less long. - Thanks to an idea proposed by Stephan Bergmann on other commit. Change-Id: I16305a304c98eb8d4e11507c7938002da546778b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108028 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-12-22use string_view in ProcessAttributeNoel
Change-Id: I81feb01bf6823d1d8fb5a7da08490959484ef533 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108095 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-12-22reduce duplication in sax converterNoel
Change-Id: I05bfb50e81a84b5f3bb7749e85058f967cb4b4ea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108094 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>