summaryrefslogtreecommitdiff
path: root/sax
AgeCommit message (Collapse)AuthorFilesLines
2019-03-07log nice exception messages whereever possibleNoel Grandin2-2/+3
Change-Id: Idd125c18bee1a39b9ea8cc4f8c55cddfd37c33e1 Reviewed-on: https://gerrit.libreoffice.org/68579 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-05re-land "new loplugin typedefparam""Noel Grandin2-4/+4
This reverts commit c9bb48386bad7d2a40e6958883328145ae439cad, and adds a bunch more fixes. Change-Id: Ib584d302a73125528eba85fa1e722cb6fc41538a Reviewed-on: https://gerrit.libreoffice.org/68680 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-23loplugin:unusedfields in l10ntools..saxNoel Grandin2-24/+6
Change-Id: I6e4ff4853c3995072b020af54549dc81303a4fde Reviewed-on: https://gerrit.libreoffice.org/68225 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-12Simplify containers iterations in reportdesign, sal, saxArkadiy Illarionov5-51/+31
Use range-based loop or replace with STL functions Change-Id: If6b734dab12a7298fce16003d3d175305fbe798d Reviewed-on: https://gerrit.libreoffice.org/67701 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-09loplugin:indentation in registry..saxNoel Grandin1-1/+1
Change-Id: I4b877751818febaec8e64018335dca691a476a43 Reviewed-on: https://gerrit.libreoffice.org/67561 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-01-28o3tl::make_unique -> std::make_unique in sax...svtools (except sc)Gabor Kelemen2-5/+3
Since it is now possible to use C++14, it's time to replace the temporary solution with the standard one Change-Id: I6eea0877eaa1886b64c0cce06a43b8088cbccd8e Reviewed-on: https://gerrit.libreoffice.org/66751 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-01-11Replace OUStringBuffer::appendCopy with append(std::u16string_view)Stephan Bergmann1-1/+2
...which is more general Change-Id: I94f28f8eda887120cf5f143b4549e0339b60e6a7 Reviewed-on: https://gerrit.libreoffice.org/66155 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-12-08Remove obsolete SAL_FALLTHROUGH completelyStephan Bergmann2-3/+3
...after 7ffdd830d5fb52f2ca25aa80277d22ea6d89970b "HAVE_CPP_ATTRIBUTE_FALLTHROUGH is always true now" Change-Id: I54e5ff4e036a6bb3e5774d1c0524158aae18e937 Reviewed-on: https://gerrit.libreoffice.org/64800 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-11-29loplugin:stringconstant look for unnecessary OString constructor useNoel Grandin1-2/+2
and tweak the methods in check.hxx to make them more flexible when called with dc.Class(xxx ? "foo" : "bar") Change-Id: I881fe628f22121ced4d8849715d6b1c92b092da1 Reviewed-on: https://gerrit.libreoffice.org/64207 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-27tdf#42949 Fix IWYU warnings in include/vcl/[f-h]*Gabor Kelemen2-0/+2
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: Ice2eb8c5994bf2ccb88972332ca4a1d3ed41752a Reviewed-on: https://gerrit.libreoffice.org/63826 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2018-11-23convert CallbackType to scoped enumNoel Grandin1-13/+13
and drop unused INVALID constant Change-Id: Ifbfaeb209ed75af99f8e531105b9f23541034648 Reviewed-on: https://gerrit.libreoffice.org/63890 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-10clang-tidy: (WIP) bugprone-too-small-loop-variable findings 2Tamás Zolnai1-3/+3
Change-Id: I1ddf3fe0e5fad265ae14712a23469b684253079d Reviewed-on: https://gerrit.libreoffice.org/63241 Tested-by: Jenkins Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2018-10-30tdf#42949 Fix IWYU warnings in include/sax/*Gabor Kelemen1-0/+1
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I8061ef6a7a8c04baf350844fae1f97836ac03554 Reviewed-on: https://gerrit.libreoffice.org/62399 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-10-29loplugin:oncevarNoel Grandin1-2/+0
Change-Id: Iba892694acb378887a1d15ab59104c55f591f0bd Reviewed-on: https://gerrit.libreoffice.org/62498 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-24remove more rtl::OUString and OString prefixesNoel Grandin2-2/+2
which seem to have snuck back in since the great rounds of removals. Change-Id: I85f7f5f4801c0b48dae8b50f51f83595b286d6a1 Reviewed-on: https://gerrit.libreoffice.org/62229 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-21tdf#120703 (PVS): handle failed reallocMike Kaganski1-2/+8
V701 realloc() possible leak: when realloc() fails in allocating memory, original pointer 'mpChunk' is lost. Consider assigning realloc() to a temporary pointer. Change-Id: If85475cf22ea10e4db35532724d947e4e9005e91 Reviewed-on: https://gerrit.libreoffice.org/62091 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-10-17ofz: thread shenanigansCaolán McNamara1-1/+1
Change-Id: I638b4e670f88aee78b6bd9ec638014795e103971 Reviewed-on: https://gerrit.libreoffice.org/61851 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-10-17clang-tidy readability-redundant-smartptr-getNoel Grandin1-2/+2
redundant get() call on smart pointer Change-Id: Icb5a03bbc15e79a30d3d135a507d22914d15c2bd Reviewed-on: https://gerrit.libreoffice.org/61837 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-12loplugin:constfields in reportdesign,sal,saxNoel Grandin4-26/+9
and improve the rewriter so I spend less time fixing formatting Change-Id: Ic2a6e5e31a5a202d2d02a47d77c484a57a5ec514 Reviewed-on: https://gerrit.libreoffice.org/61676 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-12clang-tidy misc-throw-by-value-catch-by-referenceNoel Grandin1-1/+1
Change-Id: I04750771b63551fd3df522753a4ed21b8d5c42f3 Reviewed-on: https://gerrit.libreoffice.org/61680 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-09Extend loplugin:redundantinline to catch inline functions w/o external linkageStephan Bergmann1-36/+36
...where "inline" (in its meaning of "this function can be defined in multiple translation units") thus doesn't make much sense. (As discussed in compilerplugins/clang/redundantinline.cxx, exempt such "static inline" functions in include files for now.) All the rewriting has been done automatically by the plugin, except for one instance in sw/source/ui/frmdlg/column.cxx that used to involve an #if), plus some subsequent solenv/clang-format/reformat-formatted-files. Change-Id: Ib8b996b651aeafc03bbdc8890faa05ed50517224 Reviewed-on: https://gerrit.libreoffice.org/61573 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-10-03no need to call empty() before clear()Noel Grandin1-2/+1
found with git grep -A2 -nP '!.*\.empty()' | grep -B1 -w clear Change-Id: I87013eab9c6988048b891d20577e1f7efbce1b6c Reviewed-on: https://gerrit.libreoffice.org/61295 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-09-17New loplugin:externalStephan Bergmann2-3/+3
...warning about (for now only) functions and variables with external linkage that likely don't need it. The problems with moving entities into unnamed namespacs and breaking ADL (as alluded to in comments in compilerplugins/clang/external.cxx) are illustrated by the fact that while struct S1 { int f() { return 0; } }; int f(S1 s) { return s.f(); } namespace N { struct S2: S1 { int f() { return 1; } }; int f(S2 s) { return s.f(); } } int main() { return f(N::S2()); } returns 1, both moving just the struct S2 into an nunnamed namespace, struct S1 { int f() { return 0; } }; int f(S1 s) { return s.f(); } namespace N { namespace { struct S2: S1 { int f() { return 1; } }; } int f(S2 s) { return s.f(); } } int main() { return f(N::S2()); } as well as moving just the function f overload into an unnamed namespace, struct S1 { int f() { return 0; } }; int f(S1 s) { return s.f(); } namespace N { struct S2: S1 { int f() { return 1; } }; namespace { int f(S2 s) { return s.f(); } } } int main() { return f(N::S2()); } would each change the program to return 0 instead. Change-Id: I4d09f7ac5e8f9bcd6e6bde4712608444b642265c Reviewed-on: https://gerrit.libreoffice.org/60539 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-09-14Join the thread only if launch succeeded.Michael Meeks1-1/+1
Change-Id: Idee779cea587e11f6d0f7902182c9394e73d46eb Reviewed-on: https://gerrit.libreoffice.org/60488 Tested-by: Jenkins Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2018-09-12Ensure fastparser thread is joined in case of exceptions.Michael Meeks1-1/+17
Change-Id: Ie0fb21776514a9a67e9fdff2ae856392cd711adb Reviewed-on: https://gerrit.libreoffice.org/60361 Tested-by: Jenkins Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2018-09-10loplugin:simplifyconstruct in reportdesign..saxNoel Grandin2-3/+1
Change-Id: I7d2a754cdc5576b5a5b35db2fbffd19ea17c16ff Reviewed-on: https://gerrit.libreoffice.org/60224 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-31tdf#42949 Fix IWYU warnings: boost/optional in include/Gabor Kelemen1-0/+1
Found with bin/find-unneeded-includes a few low hanging boost/optional headers. This gets us about 75M includebloat reduction; still much to go Change-Id: I5c737631767970f9145609aad298a5d11e3fed65 Reviewed-on: https://gerrit.libreoffice.org/59840 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-08-14create appendCopy method in OUStringBufferNoel Grandin1-1/+1
so we can avoid temporary copies when appending a substring of an OUString to the buffer. I would have preferred to call the method just "append" but that results in ambiguous method errors when the callsite is something like sal_Int32 n; OUStringBuffer s; s.append(n, 10); I'm not sure why Change-Id: I6b5b6641fcb5b26ce2269f89ef06e03c0b6aa76f Reviewed-on: https://gerrit.libreoffice.org/58666 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-13ofz#9591 Indirect-leakCaolán McNamara1-2/+6
==18428== 12,809 (176 direct, 12,633 indirect) bytes in 1 blocks are definitely lost in loss record 2,664 of 2,683 ==18428== at 0x4C2EBAB: malloc (vg_replace_malloc.c:299) ==18428== by 0x8D1CBC8: xmlNewDoc (tree.c:1171) ==18428== by 0x8D0C43D: xmlParseEntityDecl (parser.c:5521) ==18428== by 0x8D0F017: xmlParseMarkupDecl (parser.c:6802) ==18428== by 0x8D11588: xmlParseInternalSubset (parser.c:8305) ==18428== by 0x8D1733A: xmlParseTryOrFinish (parser.c:11977) ==18428== by 0x8D17DDA: xmlParseChunk (parser.c:12263) ==18428== by 0x3060C380: sax_fastparser::FastSaxParserImpl::parse() (fastparser.cxx:1041) ==18428== by 0x3060B6DC: sax_fastparser::FastSaxParserImpl::parseStream(com::sun::star::xml::sax::InputSource const&) (fastparser.cxx:850) ==18428== by 0x3060E675: sax_fastparser::FastSaxParser::parseStream(com::sun::star::xml::sax::InputSource const&) (fastparser.cxx:1357) ==18428== by 0x2F4B2ABE: SvXMLImport::parseStream(com::sun::star::xml::sax::InputSource const&) (xmlimp.cxx:485) ==18428== by 0x34E2C12C: filter::odfflatxml::OdfFlatXml::importer(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&, com::sun::star::uno::Reference<com::sun::star::xml::sax::XDocumentHandler> const&, com::sun::star::uno::Sequence<rtl::OUString> const&) (OdfFlatXml.cxx:150) Change-Id: I63885b837e7311330255457da3a368bd3f4f8921 Reviewed-on: https://gerrit.libreoffice.org/58933 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-08-04Use more basegfx deg<->rad functions, instead of direct formulasMike Kaganski1-1/+1
Also make the functions constexpr. Due to slight changes in floating-point arithmetics (90.0 instead of 180.0, M_PI2 instead of M_PI resp.), results might differ in last digits (usually 17th decimal digit). This has lead to need to tweak char2dump's PieChartTest unit test. Change-Id: I20323dd7dab27e4deb408ea4181e390cc05e7cd3 Reviewed-on: https://gerrit.libreoffice.org/58583 Tested-by: Jenkins Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-08-04Fix typosAndrea Gelmini1-1/+1
Change-Id: I7f90b7672665be0d8d5e47c6456433b06f88d5e0 Reviewed-on: https://gerrit.libreoffice.org/58553 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins
2018-07-27loplugin:stringloop in basic, framework, sax, svtoolsNoel Grandin1-3/+3
Change-Id: I2bad74a8f103e9dc68c8e0d0e6315697068d2f6d Reviewed-on: https://gerrit.libreoffice.org/58135 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-20tdf#79878 perf loading docx file, pendingCharsNoel Grandin1-27/+36
Use std::vector<char> for pendingCharacters in SAXParser to avoid calling the OUString utf8 conversion routine more than one per character block. We seem to hit multiple characters() callbacks per chunk of text fairly often in loading writer docs. This is only good for about 0.5% performance Change-Id: I354bb4efe9d883c4bebf49bc96dd44be4f2b1610 Reviewed-on: https://gerrit.libreoffice.org/57731 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-17tdf#79878 perf loading docx file, disable SAX threading for writerNoel Grandin1-5/+12
since it seems to cost us 20% performance Change-Id: Ic4796ee3756c8c722feb4851dc48a99e882ba0fe Reviewed-on: https://gerrit.libreoffice.org/57545 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-11tdf#79878 perf loading docx file, improve threading heuristicNoel Grandin1-2/+8
this gives another 2% perf Change-Id: Ia2983339f3f11daef37c48044904c8037a7a0bf6 Reviewed-on: https://gerrit.libreoffice.org/57265 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-11tdf#79878 perf loading docx file, more saxNoel Grandin1-8/+8
(*) in GetTokenWithPrefix, use rtl_str_reverseCompare_WithLength faster than strncmp (*) No need for NamespaceDefine to be stored via std::shared_tr Change-Id: Ibd262a3f4f5a0f518ec6abe1fb19e7803f78fe8b Reviewed-on: https://gerrit.libreoffice.org/57261 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-10pass SvStream around by std::unique_ptrNoel Grandin1-2/+2
and give utl::OStreamWrapper a new constructor so that it knows it is taking ownership of the SvStream, which appears to fix several leaks Change-Id: Idcbcca9b81a4f0345fd8b8c8a2f4e84213686a6b Reviewed-on: https://gerrit.libreoffice.org/57187 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-08tdf#79878 perf loading docx file, sax improvementsNoel Grandin2-7/+24
these are the smaller improvements, they make about 5% worth of difference - use std::vector instead of std::deque - use std::move on pendingCharacters instead of copying - in FastAttributeList::add, when reallocate the buffer, allocate twice the existing size, instead of increasing to only what we need - in FastAttributeList, create getAttributeIndex and friends, so we can avoid iterating the attribute list more often than necessary Change-Id: I3e3380ea50b77c6845b66e83404e245778ec06eb Reviewed-on: https://gerrit.libreoffice.org/57021 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-06-30sax: fix overflow in sax::Converter::convertMeasure()Michael Stahl2-3/+4
The problem is that -2^31 is negative after negation in 2's complement. This causes ODF validation error now in CppunitTest_sd_export_tests testFdo84043: Error: attribute "svg:x" has a bad value: ... svg:x="--2147483.-6-4-7cm" The validation error only happens in 32-bit builds; 64-bit builds show a different value svg:x="2139324.72cm", so there must be another problem somewhere else that isn't fixed here. Change-Id: If2040cb6ae914c69b7cc651d3ab2d5d232fc71fb Reviewed-on: https://gerrit.libreoffice.org/56718 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2018-06-26Avoid potential double-delete in ~XMLFile2UTFConverterStephan Bergmann3-27/+23
...as the implicitly defined copy operations would just copy the m_p* member pointers. Needed some modification of the ParserCleanup class so that Entity (which has a XMLFile2UTFConverter member) can be std::move'd into SaxExpatParser_Impl::pushEntity. Found by new -Wdeprecated-copy of GCC trunk towards GCC 9. Change-Id: I0cb5b5dbcd55249b475ed74b4ac6bcb12f20f2c6 Reviewed-on: https://gerrit.libreoffice.org/56453 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-06-05tdf#42949 remove unused compheler includes ..Jochen Nitschke1-1/+0
and fix the fallout Change-Id: I15bc5d626f4d157cbc69a87392078b41e621d14e Reviewed-on: https://gerrit.libreoffice.org/54882 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-06-01loplugin: look for CPPUNIT_ASSERT_EQUALS with params swappedNoel Grandin1-3/+3
idea originally from either tml or moggi, can't remember which Change-Id: Id78d75035036d3aa1666e33469c6eeb38f9e624d Reviewed-on: https://gerrit.libreoffice.org/55126 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-05-25Improve re-throwing of UNO exceptionsNoel Grandin1-8/+7
(*) if we are already throwing a Wrapped*Exception, get the exception using cppu::getCaughtexception. (*) when catching and then immediately throwing UNO exceptions, use cppu::getCaughtException to prevent exception slicing (*) if we are going to catch an exception and then immediately throw a RuntimeException, rather throw a WrappedTargetRuntimeException and preserve the original exception information. Change-Id: Ia7a501a50ae0e6f4d05186333c8517fdcb17d558 Reviewed-on: https://gerrit.libreoffice.org/54692 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-25ofz#7110 ensure join is called on std::exceptions as well as uno::ExceptionCaolán McNamara1-6/+6
Change-Id: I1d17301e4d7f951b7176d5a91c0dca0ef051b2a2 Reviewed-on: https://gerrit.libreoffice.org/51830 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-03-16crashtesting: asserts on legal xml names on exportCaolán McNamara1-4/+18
e.g. ooo82358-1.odt which has Chinese characters used in tags inside a parent xforms:instance tag Change-Id: If2edf9cc13e5a4cc969f5a46618a6534c52f2877 Reviewed-on: https://gerrit.libreoffice.org/51352 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com> Tested-by: Jenkins <ci@libreoffice.org>
2018-03-06add some color conversion methods to sax::ConverterNoel Grandin1-0/+1
to make the call-sites less verbose Change-Id: Ifddcbb03a454a241bef93f31a8025801b84a66fc Reviewed-on: https://gerrit.libreoffice.org/50578 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-05drop sax::tools::*base64 methodsNoel Grandin2-60/+0
and use the underlying comphelper methods rather. This is so that I can break the dependency that tools has on sax, and can add methods that make sax depend on tools. Change-Id: I8a2d6ce2ffc3529a0020710ade6a1748ee5af7d5 Reviewed-on: https://gerrit.libreoffice.org/50767 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-02tdf#115429 sax,xmloff: assert on empty attribute names & namespacesMichael Stahl1-0/+1
Surely that's indication of a bug somewhere. Change-Id: Ic6219d8eb7f22301d8c4da98b2132ae3ef0467b5 Reviewed-on: https://gerrit.libreoffice.org/50579 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2018-03-01tdf#115429 sax: assert if exporting an invalid XML attribute/elementMichael Stahl2-4/+41
Add a cheap check for this in both SaxWriter and FastSaxSerializer so we can find such bugs earlier, e.g. with the weekly crashtesting. Don't do a correct check but a cheap & fast one, let's ignore non-ASCII characters for now as the only filter with such is UOF and that is implemented with XSLT, not this sax code. Change-Id: I4db8f70ffb23684d4cb4211468519edd6c7c465f Reviewed-on: https://gerrit.libreoffice.org/50507 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2018-02-28sax: don't crash during loggingVasily Melenchuk1-1/+1
SaxParser was crashing during load of some MS documents if logging is enabled. Change-Id: I08a57b9a948bb4a35afcb82a29614c2f6a443446 Reviewed-on: https://gerrit.libreoffice.org/50110 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>