summaryrefslogtreecommitdiff
path: root/sax/source/fastparser
AgeCommit message (Collapse)Author
2015-11-18remove unused typedefs and inline use-once typedefsNoel Grandin
and improve the script a little Change-Id: I2792ea4dd5df3a50736fbe209225c3f16fb86b84 Reviewed-on: https://gerrit.libreoffice.org/20033 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-18use unique_ptr for pImpl in sax/Noel Grandin
Change-Id: I0bef03451437cbdc5b0fed6b67690ac1d547291d
2015-11-15use initialiser for Sequence<OUString>Noel Grandin
performed using: git grep -lP 'Sequence.*OUString.*\(1\)' | xargs perl -0777 -pi -e "s/Sequence<OUString> (\w+)\(1\); .*\[0\] = (\S+);/Sequence<OUString> \1 { \2 };/g" Change-Id: I4da56c80fa09bfc1e8f868794001e9921431e09f Reviewed-on: https://gerrit.libreoffice.org/19968 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-10loplugin:nullptr (automatic rewrite)Stephan Bergmann
Change-Id: I54bf272b404d2302cafbde73ec5061ea2cd966ab
2015-11-06loplugin:stringconstant: elide explicit ctor usage (automatic rewrite)Stephan Bergmann
Change-Id: Id1a67eb7ed5b76a7ad8902a80840a891e2ef8442
2015-10-30cppcheck: noExplicitConstructorCaolán McNamara
Change-Id: Id6d969713d94b558a93d303c6dabcbfdd1c65194
2015-10-28com::sun::star->css in sal,saxNoel Grandin
Change-Id: I24e202b1f8071fe918e4e164b5fa1c08a561cb24 Reviewed-on: https://gerrit.libreoffice.org/19626 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-10-12Replace "SAL_OVERRIDE" with "override" in LIBO_INTERNAL_ONLY codeStephan Bergmann
Change-Id: I2ea407acd763ef2d7dae2d3b8f32525523ac8274
2015-09-17boost->stdCaolán McNamara
Change-Id: Ifde84627578283bd057d7393eb7e5578ef5c029a
2015-08-27sax: tdf#88206 replace cppu::WeakImplHelper*Takeshi Abe
with the variadic variants. Change-Id: Id8d0c61b0454652abbbd09be0c72696a057dc2d2 Reviewed-on: https://gerrit.libreoffice.org/18008 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-07-04tdf#91378: sax, oox: avoid sending empty strings to character callbacksMichael Stahl
This reverts the changes in FastSaxParserImpl from commit 16e8ffbd5ec1fe7b81835ea6584547669d55d751 and instead fixes the problem of inserting string properties with empty value locally in OOXMLDocPropHandler. This change was not wrong in any obvious way, but it turns out there is one doc rhbz583386-4.docx that, when imported with this change and exported to DOCX again, results in a non-well-formed document because of some weird SDT stuff. That problem is rather baffling, but unfortunately the DocxAttributeOutput usage of FastSaxSerializer::mark() makes the DOCX export rather un-debuggable, so avoid that problem by reverting the import change for now. Change-Id: I0d874cbfe82d4f15d58b50116dda152341bdf7b0
2015-06-25tdf#91378-Empty Custom Properties are lost while saving in .pptx formatHeena Gupta
Conflicts: sd/qa/unit/export-tests.cxx Reviewed on: https://gerrit.libreoffice.org/15966 Change-Id: Ibc24ab9633b51fe41ad483121646cc391319fe6f
2015-04-22Various #include <sal/log.hxx> fixupsStephan Bergmann
rtl/string.hxx and rtl/ustring.hxx both unnecessarily #include <sal/log.hxx> (and don't make use of it themselves), but many other files happen to depend on it. Cleaned up some, but something like grep -FwL sal/log.hxx $(git grep -Elw \ 'SAL_INFO|SAL_INFO_IF|SAL_WARN|SAL_WARN_IF') -- \*.cxx) shows lots more files that potentially need fixing before the include can be removed from rtl/string.hxx and rtl/ustring.hxx. Change-Id: Ibf033363e83d37851776f392dc0b077381cd8b90
2015-04-15remove unnecessary use of void in function declarationsNoel Grandin
ie. void f(void); becomes void f(); I used the following command to make the changes: git grep -lP '\(\s*void\s*\)' -- *.cxx \ | xargs perl -pi -w -e 's/(\w+)\s*\(\s*void\s*\)/$1\(\)/g;' and ran it for both .cxx and .hxx files. Change-Id: I314a1b56e9c14d10726e32841736b0ad5eef8ddd
2015-04-01Replace remaining getCppuType et al with cppu::UnoTypeStephan Bergmann
Change-Id: I66548ca8a8eaadea64f58653e97389c6208caa41
2015-03-31Reduce to static_cast any reinterpret_cast from void pointersStephan Bergmann
Change-Id: I9b87886c7af22514f9cadfab625f06987ace6529
2015-01-22WaE: warning C4101: ´e´ : unreferenced local variableCaolán McNamara
Change-Id: Ifa143e5a8f0e8254fbd324032951517d3a30c4c8
2015-01-22sax: fastparser: use cppu::getCaughtException() to avoid sliced exceptionsMichael Stahl
Change-Id: I1cd932ae520ba20eff8ef447614e91e1cc2032f8
2015-01-22sax: there is no OUStringBuffer(char) ctorMichael Stahl
Change-Id: I1811dead8f104a445bfee9282a60ecedeca872ed
2015-01-20Some more loplugin:cstylecast: saxStephan Bergmann
Change-Id: I3ded4f19f73a094dabd2d2da54917290ffe468f5
2015-01-04boost::unordered_map->std::unordered_mapCaolán McNamara
Change-Id: I82f668ef72e916d2ff11df5cda2a02653999f66f
2014-12-18sax: Use appropriate OUString functions on string constantsStephan Bergmann
Change-Id: I44cf4360c323e9f424a559db6d0f271fae7a7f28
2014-12-08fastparser: Redundant check after assertMatúš Kukan
Change-Id: Ibc56102831d4d36392bea4e4e088e207cef99429
2014-12-03Prevent hang during loading of xlsm doc.Kohei Yoshida
* We need to call xmlInitParser() before using it in a multi-threaded way (according to the libxml2 doc). * Better to use 'rEntity' which references the one stored in the vector rather than 'entity' whose copy gets stored in the vector. On Windows at least 'rEntity' and 'entity' hold different parser pointer values. * Free the parser before popping the entity. Popping the entity first then freeing the parser using its pointer value stored in the entity looks weird. Change-Id: I6b64a6d8ac9c1d4fea8339d8fb2d38dfffbba47b
2014-12-02fix crash-190212-093017-986Caolán McNamara
Change-Id: I3d2d57850dcb1fde1c004b4455591071a1fe03fa
2014-12-01We need to tell libxml2 parser to decode entities.Kohei Yoshida
Else we would get raw entity values such as '&#38;' in lieu of '&'. Change-Id: Ib700705fd9b68980306883aa9652579e1686040d
2014-12-01Add message to exceptionMatúš Kukan
Change-Id: I0e7cf850b51343e4afc1ea0a0409ad2c4e596435
2014-11-20proper error reporting from libxml2Luboš Luňák
Change-Id: Ia173f7f4c88c90b6d54c9a47d6ae18b933502678
2014-11-20make FastSaxParser provide the whole content in one characters() callLuboš Luňák
SAX interface is not required to provide the whole node content in one characters() call (e.g. if there's an entity that needs decoding). However it's easier to consumers to assume this (e.g. writerfilter's DomainMapper::lcl_utext() handles datecontrol that way), and expat apparently never used this. However this can happen with libxml2, so ensure such consumers still work. Change-Id: Ib564f372fbea8451f84553a6d49a07d091a950e9
2014-11-15windows blind fixMarkus Mohrhard
2014-11-14switch saxparser from expat to libxml2Luboš Luňák
Using SAX2 interface provides element/attribute names split into prefix/name, and provides namespaces/urls, so FastSaxParserImpl::callbackStartElement() does not have to figure out these on its own (and additionally libxml2 spends a noticeable portion in xmlStrdup() when not in SAX2 mode). The switch saves about 5-10% time. Change-Id: Idd424d7cc9b30c248179a5bad8ec79dbfc62e765
2014-11-10remove pointless const_castLuboš Luňák
Change-Id: I6026ab64f0cfe1d509c8f94ce3b9c6f700c823cf
2014-10-23fastparser: avoid allocating un-used FastTokenLookup class.Michael Meeks
This contained an rtl_Sequence complete with horror internal allocator, caught red-handed serializing threaded loading to no good purpose. Change-Id: I837b2c17e4f70fd6a49bed33ad74a7d79f98f35c
2014-09-18Better to throw than crash, if token handler is not set.Matúš Kukan
Change-Id: If6b2d39b487b5f673d5b6b2945a6e7d08777594e
2014-08-30Use plain bool parameter hereMatúš Kukan
Change-Id: Ic948889a0fac32adc48a7a4fb1e7f82ce8b08ba4
2014-08-07Avoid incomplete type in fn sig to keep ubsan's RTTI-based checks happyStephan Bergmann
Change-Id: I2d4e4be562cc752e7545792b148d5ed0cf551f25
2014-07-11fdo#81214 - tolerate exceptions thrown inside XFastParser callbacks.Michael Meeks
Not an ideal solution; ideally we should not throw the exceptions, and stop the parser as soon as something bad like this happens; but hopefully exception throwing is reasonable exceptional. Change-Id: If619592533b2929c671e2b03eb8a83480bd92c54
2014-06-30Use a new fast parser instance for each XML fragment.Kohei Yoshida
Otherwise a crash ensues when the threaded XML parsing kicks in. Change-Id: Ic41e5a29bbb860d7b63b70f2f0d8896264d9d53e
2014-06-30Check for empty() before calling top().Kohei Yoshida
Else it might crash sometimes. Change-Id: I6a24fff83c3d36346debae5c0f2b8c0646a15c01
2014-06-30Don't go further and pop the stack if it's empty.Kohei Yoshida
Change-Id: I27bd30ca65cf0066cd022b4b060757913ea01fed
2014-04-09Remove unused functionsStephan Bergmann
Change-Id: Iddf4e29005aaa510af00c7345487996b75f41c41
2014-03-26First batch of adding SAL_OVERRRIDE to overriding function declarationsStephan Bergmann
...mostly done with a rewriting Clang plugin, with just some manual tweaking necessary to fix poor macro usage. Change-Id: I71fa20213e86be10de332ece0aa273239df7b61a
2014-03-02remove whitespacesMarkus Mohrhard
Change-Id: I624ca41c3e51ba785e359649c429feb61cc9a647
2014-02-26cppuhelper: retrofit std::exception into overriding exception specsStephan Bergmann
Change-Id: I56e32131b7991ee9948ce46765632eb823d463b3
2014-02-26Remove visual noise from saxAlexander Wilms
Change-Id: Ica31580f72b43456c33b2f6abbf2140a79efae1a Reviewed-on: https://gerrit.libreoffice.org/8299 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-02-23Remove unneccessary commentsAlexander Wilms
Change-Id: I939160ae72fecbe3d4a60ce755730bd4c38497fb Reviewed-on: https://gerrit.libreoffice.org/8182 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-02-08coverity#1130446 Uncaught exceptionCaolán McNamara
Change-Id: I9225b4ffd507fa3d666862a55dae349c9a76e91d
2014-01-251158273 Uncaught exceptionCaolán McNamara
Change-Id: I3983da2d585762d81446902a710e9a97c6354669
2014-01-23coverity#1158443 Uninitialized pointer fieldCaolán McNamara
Change-Id: I1602678c24c1aeec60acee05801e7decc914560f
2014-01-23coverity#1158444 Uninitialized scalar fieldCaolán McNamara
Change-Id: I15f6c6288e2a951543702a15e777167f2240899e