summaryrefslogtreecommitdiffstats
path: root/sax/source
Commit message (Collapse)AuthorAgeFilesLines
* loplugin:stringconstant: OUStringBuffer: appendAscii -> appendStephan Bergmann2015-08-311-7/+7
| | | | Change-Id: I752d7e9ddc11139e454135b88476341277f7f01d
* sax: tdf#88206 replace cppu::WeakImplHelper*Takeshi Abe2015-08-275-9/+10
| | | | | | | | | 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>
* tdf#39440 reduce scope of local variablesMichael Weghorn2015-08-221-1/+2
| | | | | | | | | This addresses some cppcheck warnings. Change-Id: Ie492fb9c106b37c3fe7b0105236ad6315f4f159e Reviewed-on: https://gerrit.libreoffice.org/17921 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
* loplugin: defaultparamsNoel Grandin2015-08-112-2/+2
| | | | Change-Id: I5afe7f9f5caa1f5e55c6218bdb3771571ff0dafa
* sax: convert MergeMarksEnum to enum classMichael Stahl2015-07-183-14/+14
| | | | | | This should detect if a MergeMarks value is erroneously passed as tag. Change-Id: I7b855a661f182136824cf25f2174a9bcce8ff3d1
* sax, sw: try to make that maMarkStack easier to understandMichael Stahl2015-07-183-17/+29
| | | | | | | | | In DocxAttributeOutput it's not at all obvious which mark() is supposed to be ended by which mergeTopMarks(), so add an extra parameter to the FastSaxSerializer functions and verify with an assertion that a LIFO order is maintained. Change-Id: I5a421e2fb11f15343147417fe0b9b23642c70721
* Make content of OSL_ASSERT, DBG_ASSERT, etc. visiblie in non-debug buildsStephan Bergmann2015-07-131-4/+1
| | | | | | | ...to avoid lots of loplugin:staticmethods warnings. Also enables DBG_ASSERT etc. also for --enable-debug builds in addition to --enable-dbgutil builds. Change-Id: Ib89ecd9ab8ce7abb2c64790ace248b31f9d2b64d
* WaE do not us #if for DB_UTIL but #ifdefNorbert Thiebaud2015-07-041-3/+3
| | | | Change-Id: I8b0a6c3323a4ffbe6a1ba09e5cff9ddd92ed49f1
* sax: FastSaxSerializer well-formed element test in presence of ...Michael Stahl2015-07-042-4/+160
| | | | | | | | | | | | | | | ... the maMarkStack, which causes the order of calls to startFastElement()/endFastElement() to differ from the order of the tags that are written into the output. This is an attempt to improve the assertions, but if an assertion fails it's generally not obvious where the problem actually is since the unpredictable order may cause the problem to be detected and reported much later than its root cause. Let's see if this finds any new problems in export testing. Change-Id: I97699cc8ef9b18ea9f4f221d5210134feecf0336
* tdf#91378: sax, oox: avoid sending empty strings to character callbacksMichael Stahl2015-07-041-2/+4
| | | | | | | | | | | | | | | | | | | 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
* tdf#91378-Empty Custom Properties are lost while saving in .pptx formatHeena Gupta2015-06-251-4/+2
| | | | | | | | | Conflicts: sd/qa/unit/export-tests.cxx Reviewed on: https://gerrit.libreoffice.org/15966 Change-Id: Ibc24ab9633b51fe41ad483121646cc391319fe6f
* Replace boost::scoped_array<T> with std::unique_ptr<T[]>Takeshi Abe2015-06-172-5/+5
| | | | | | | | | | | | | | | | | | | | | | This may reduce some degree of dependency on boost. Done by running a script like: git grep -l '#include *.boost/scoped_array.hpp.' \ | xargs sed -i -e 's@#include *.boost/scoped_array.hpp.@#include <memory>@' git grep -l '\(boost::\)\?scoped_array<\([^<>]*\)>' \ | xargs sed -i -e 's/\(boost::\)\?scoped_array<\([^<>]*\)>/std::unique_ptr<\2[]>/' ... and then killing duplicate or unnecessary includes, while changing manually m_xOutlineStylesCandidates in xmloff/source/text/txtimp.cxx, extensions/source/ole/unoconversionutilities.hxx, and extensions/source/ole/oleobjw.cxx. Change-Id: I3955ed3ad99b94499a7bd0e6e3a09078771f9bfd Reviewed-on: https://gerrit.libreoffice.org/16289 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
* remove unnecessary check for null when calling deleteNoel Grandin2015-06-151-4/+2
| | | | | | | | Idea originally from caolan. Found using the following command: find . -name *.cxx | xargs /opt/local/bin/grep -zlP '(?m)if\s*\(\s*\w+\s*\)\s*delete\s+\w+\;' Change-Id: I3338f4e22193a6dfd6219c8c75835224a3392763
* cppcheck:redundantAssignmentNoel Grandin2015-06-151-2/+1
| | | | Change-Id: I1167d0ce6b6f6e48309d0551c1d2a283d79546a7
* loplugin:cstylecast: deal with remaining pointer castsStephan Bergmann2015-06-081-1/+1
| | | | Change-Id: I8c84f0f6aeb38147432ce5393b0286c379c6e135
* cppcheck: noExplicitConstructorCaolán McNamara2015-05-102-9/+9
| | | | Change-Id: Ic334d7b0110319e0c581eecd111b73d1cce3134d
* cppcheck: throwInNoexceptFunctionCaolán McNamara2015-04-291-1/+1
| | | | Change-Id: I72572e716e41e739f8d382baa0405af4579a93d2
* Various #include <sal/log.hxx> fixupsStephan Bergmann2015-04-224-0/+4
| | | | | | | | | | | | | | 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
* remove unnecessary use of void in function declarationsNoel Grandin2015-04-155-27/+27
| | | | | | | | | | | | | | | | 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
* Show duplicate attributeJulien Nabet2015-04-111-0/+1
| | | | Change-Id: I6e1e66012817178c167e7cb531811686cb2fec19
* Replace remaining getCppuType et al with cppu::UnoTypeStephan Bergmann2015-04-012-2/+2
| | | | Change-Id: I66548ca8a8eaadea64f58653e97389c6208caa41
* Reduce to static_cast any reinterpret_cast from void pointersStephan Bergmann2015-03-311-3/+3
| | | | Change-Id: I9b87886c7af22514f9cadfab625f06987ace6529
* Clean up C-style casts from pointers to voidStephan Bergmann2015-03-282-13/+13
| | | | Change-Id: Iacd5275ba41e49eebd3977f57d0b8b68acafa2c4
* make parsing more cautious with exceptionsLionel Elie Mamane2015-03-021-0/+5
| | | | | | also handle UNO exceptions that are not RuntimeException Change-Id: I7050de6ee4b2e4f2af2e0a0be42ba65e0bc028db
* fdo#75757: Remove inheritance from std::vectorMatthew Pottage2015-02-061-3/+3
| | | | | | | | | | | | | | | | | | | Deprecated comphelper/sequenceasvector.hxx. Rewritten code using it. Using instead the functions containerToSequence and sequenceToContainer, found in include/comphelper/sequence.hxx. One class that inherits from it (in framework/inc/stdtypes.h), and the code using that has been left. Signed-off-by: Michael Stahl <mstahl@redhat.com> Conflicts: writerfilter/source/dmapper/DomainMapper.cxx writerfilter/source/dmapper/TblStylePrHandler.hxx writerfilter/source/dmapper/WrapPolygonHandler.hxx Change-Id: Ice61c94ffb052e389281aebb7cdf185134221061
* destructors are not allowed to throwLionel Elie Mamane2015-02-051-0/+1
| | | | | | | | so move potentially throwing call to a manually called finish() additionally don't make it leak something that is not a RuntimeException, the caller does not expect it. Change-Id: I8b19585ae197f5ac8625dc85d4c4860a1c11b262
* add assert that first element is 0Caolán McNamara2015-01-271-1/+2
| | | | Change-Id: I75602b6941f291703c85c841837b432da455a7ef
* sax: minor optimizationMichael Meeks2015-01-271-3/+3
| | | | Change-Id: I4812a567e37789c71af0cc6ba8f5a5caf0e3ec93
* WaE: warning C4101: ´e´ : unreferenced local variableCaolán McNamara2015-01-221-3/+3
| | | | Change-Id: Ifa143e5a8f0e8254fbd324032951517d3a30c4c8
* sax: fastparser: use cppu::getCaughtException() to avoid sliced exceptionsMichael Stahl2015-01-221-9/+11
| | | | Change-Id: I1cd932ae520ba20eff8ef447614e91e1cc2032f8
* sax: there is no OUStringBuffer(char) ctorMichael Stahl2015-01-221-1/+1
| | | | Change-Id: I1811dead8f104a445bfee9282a60ecedeca872ed
* Some more loplugin:cstylecast: saxStephan Bergmann2015-01-205-27/+27
| | | | Change-Id: I3ded4f19f73a094dabd2d2da54917290ffe468f5
* boost::unordered_map->std::unordered_mapCaolán McNamara2015-01-041-2/+2
| | | | Change-Id: I82f668ef72e916d2ff11df5cda2a02653999f66f
* fdo#39440 sax, sc: reduce scope of local variablesMichael Weghorn2014-12-201-1/+1
| | | | | | | | | This addresses some cppcheck warnings. Change-Id: I589e13ee086cffee481954215a97960db656e633 Reviewed-on: https://gerrit.libreoffice.org/13548 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
* sax: Use appropriate OUString functions on string constantsStephan Bergmann2014-12-181-2/+2
| | | | Change-Id: I44cf4360c323e9f424a559db6d0f271fae7a7f28
* sax: Use appropriate OUString functions on string constantsStephan Bergmann2014-12-121-1/+1
| | | | Change-Id: Ic0750322439f15e6c9b99dac9dbb3b8c060ad8e0
* fastparser: Redundant check after assertMatúš Kukan2014-12-081-7/+4
| | | | Change-Id: Ibc56102831d4d36392bea4e4e088e207cef99429
* Prevent hang during loading of xlsm doc.Kohei Yoshida2014-12-031-10/+12
| | | | | | | | | | | | | * 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
* fix crash-190212-093017-986Caolán McNamara2014-12-021-2/+8
| | | | Change-Id: I3d2d57850dcb1fde1c004b4455591071a1fe03fa
* We need to tell libxml2 parser to decode entities.Kohei Yoshida2014-12-011-0/+3
| | | | | | Else we would get raw entity values such as '&#38;' in lieu of '&'. Change-Id: Ib700705fd9b68980306883aa9652579e1686040d
* Add message to exceptionMatúš Kukan2014-12-011-2/+4
| | | | Change-Id: I0e7cf850b51343e4afc1ea0a0409ad2c4e596435
* proper error reporting from libxml2Luboš Luňák2014-11-201-33/+7
| | | | Change-Id: Ia173f7f4c88c90b6d54c9a47d6ae18b933502678
* make FastSaxParser provide the whole content in one characters() callLuboš Luňák2014-11-201-1/+18
| | | | | | | | | | | 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
* sal: clean up public headers with include-what-you-useMichael Stahl2014-11-172-0/+2
| | | | | | | | | Sadly cannot forward declare "struct {...} TimeValue;". rtl/(u)?string.hxx still include sal/log.hxx but removing osl/diagnose.h was painful enough for now... Change-Id: Id41e17f3870c4f24c53ce7b11f2c40a3d14d1f05
* windows blind fixMarkus Mohrhard2014-11-151-1/+1
|
* switch saxparser from expat to libxml2Luboš Luňák2014-11-141-179/+136
| | | | | | | | | | 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
* make FastAttributeList's unknown attribute value be passed as OStringLuboš Luňák2014-11-121-8/+8
| | | | | | | Since that's how it's internally stored anyway, and I have a use case where it's useful to limit the length by passing it to OString ctor. Change-Id: I5903ea4f1b2cdb48c1bbceac6b8e21eb5882d377
* allow inserting attributes that have zero lengthLuboš Luňák2014-11-121-2/+5
| | | | | | | Otherwise the strlen() might give an incorrect length if the attribute value is just a part of a longer string. Change-Id: I67eb7baecfa928fdee26c5ea9003bd7fc9b96d59
* remove pointless const_castLuboš Luňák2014-11-101-2/+2
| | | | Change-Id: I6026ab64f0cfe1d509c8f94ce3b9c6f700c823cf
* Revert "use the new OUString::fromUtf8 method"Stephan Bergmann2014-11-061-2/+2
| | | | | | | | This reverts commit 05050cdb23de586870bf479a9df5ced06828d498, not all places that use e.g. OStringToOUString to convert potential UTF-8 are guaranteed to fulfil the prerequisites necessary to use fromUtf8 (and some places like e.g. in codemaker are happy with the best-effort effect of OStringToOUString's OSTRING_TO_OUSTRING_CVTFLAGS).