summaryrefslogtreecommitdiff
path: root/sax/source/fastparser
AgeCommit message (Collapse)Author
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 '&' 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
2014-01-22Introduce static inline cppu::acquire(), and make use of that.Jan Holesovsky
This is much better approach compared to the callback function, as it allows passing arguments to the c++ constructor directly, while still allowing some additional initialization after having acquired the instance. Change-Id: I5a0f981915dd58f1522ee6054e53a3550b29d624
2014-01-21Change _get_implementation()'s not to do initialization directly.Jan Holesovsky
Many of the initalizations (in eg. framework) have to be done on an acquire()'d object, so instead of doing the initialization directly, return the initialization member function back to the createInstance() / createInstanceWithContext() / ... and perform the initialization there. As a sideeffect, I belive the calling initialize() from servicemanager is not that much a hack any more - whoever converts the implementation to be constructor-base has the choice to provide the callback, or still initialize through XInitialization, where the callback is preferred by servicemanager when it exists. Change-Id: I8a87b75c54c1441ca0f184967d31ff4902fc4081
2014-01-20Minimize the constructor functions to a bare minimum.Jan Holesovsky
Most of the constructors are supposed to be only a call of new TheInstance(arguments) or an equivalent; so let's just change the constructor caller accordingly, to accept unacquired new instance. If there are exceptions that need to do more heavy lifting, they do not have to use the constructor feature, or there can be a wrapper for the real implementation, doing the additional work in their (C++) constructor. Change-Id: I035c378778aeda60d15af4e56ca3761c586d5ded
2014-01-18Unify ctor functions for component implementations.Matúš Kukan
There is no need to use different styles for writing the same thing. It also makes it easier in future to use search & replace. But of course, there are also some more complicated functions. Change-Id: I773da20378af0e0d5a27689d3903df7063fb8ac0
2014-01-15Unify ctor functions to have _get_implementation suffix.Matúš Kukan
Change-Id: I07fe0671d0633ef9480a4f3431df6a64c7902db8
2014-01-15Use const& arguments parameter for ctor functions.Matúš Kukan
Change-Id: I19ce8bd1a23123ac9a62a7fc95cd54fea5315221
2014-01-14fastparser: avoid boost::optional where it is un-necessary.Michael Meeks
boost::optional appears to show up rather heavily on many profiles. We already use mnElementToken == DONTKNOW to flag / use these guys. Change-Id: Ibf2b0167f259cc601da2fb9703e880b78e60886e
2014-01-10Use boolStephan Bergmann
Change-Id: Iae455f53f8317eecb8edc38d111c9ef7398a36fb
2014-01-03WaE: C4101: 'e' : unreferenced local variableTor Lillqvist
Change-Id: I06c0f9dc742736f632ed9210ae954e0dc19ca19d
2013-12-31don't call top on an empty stackCaolán McNamara
Change-Id: Ibe4b4d3785535816b40d46fd0baa60f01e1f9d33
2013-12-31fastparser: avoid std::stack::top() - cache it's results.Michael Meeks
amazingly std::stack::top() takes 146 pseudo-cycles to do not much, so instead cache the result in a single pointer in lieu of burning that code. Change-Id: Ie326be47da6cbad0850e5f1026a1632bb840b6b8
2013-12-20fastparser: move lclGetErrorMessage into the anonymous namespace.Michael Meeks
Change-Id: I70e1597f917c2a8dedb5b38807dfde7ec05a1a39
2013-12-20fastparser:: move Entity:: code into the anonymous namespace.Michael Meeks
Change-Id: I564e35aa63e4c01cc1a0fb45f674dc1a2a0e89ec