summaryrefslogtreecommitdiff
path: root/sax
AgeCommit message (Collapse)AuthorFilesLines
2016-04-12cleanup: remove unused com/sun/star/uno includesJochen Nitschke1-1/+0
Sequence.h(xx), Any.h(xx) and Type.h(xx) and remove unused using-declarations from these files. Add a few missing includes provided by them. Change-Id: I6b91b6d1fdf9d0496dd546c0aab9bdcc6831a5d4 Reviewed-on: https://gerrit.libreoffice.org/23805 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-11clang-tidy performance-unnecessary-value-param in saxNoel Grandin1-2/+2
Change-Id: I46aad7b0a96210e5f3f278c3f6f3a945825b7cae
2016-04-04tdf#97499 Fixed containers parameters clearing #4tymyjan1-1/+1
Change-Id: I7c96181399f4d7e62d4aceca404b22d68f903513 Reviewed-on: https://gerrit.libreoffice.org/23754 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-01tdf#97966 Drop 'static' keywordsWastack2-9/+9
Including no keywords from extern "C" blocks Change-Id: I87f2ed75888b51ec9e0cb75566bf7c2351b479b4 Reviewed-on: https://gerrit.libreoffice.org/23675 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-03-08tdf#97703 Removed empty setUp/tearDown methodsChirag Manwani1-10/+0
Change-Id: Ia62de30ae94bdae87cd5109c44eab40af4d020e5 Reviewed-on: https://gerrit.libreoffice.org/22985 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-03-04tdf#96505 Remove long integer literal specifier when not neededAleksas Pantechovskis1-2/+2
Remove L from integer literals if it does not produce warnings and does not change semantics Change-Id: I9573a47d3e3401993a1f0fbcf7df4be20f9e6eba Reviewed-on: https://gerrit.libreoffice.org/22867 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-02-15Rename rtl::isValidCodePoint -> rtl::isUnicodeCodePointStephan Bergmann1-2/+3
...and fix its documentation, and use it throughout the code base. Change-Id: I349bc2009b1b0aa7115ea90bc6ecd0a812f63698
2016-02-09Remove excess newlinesChris Sherlock6-37/+0
A ridiculously fast way of doing this is: for i in $(pcregrep -l -M -r --include='.*[hc]xx$' \ --exclude-dir=workdir --exclude-dir=instdir '^ {3,}' .) do perl -0777 -i -pe 's/^ {3,}/ /gm' $i done Change-Id: Iebb93eccbee9e4fc5c4380474ba595858a27ac2c Reviewed-on: https://gerrit.libreoffice.org/22224 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2016-02-06sax: Use comphelper's AttributeListMatúš Kukan4-244/+6
Change-Id: I6eb0115dba8797025a513cf1e6cfbfbe0b6f7e50
2016-02-03fix gcc build errorCaolán McNamara1-2/+2
error: invalid operands of types '__gnu_cxx::__enable_if<true, double>::__type {aka double}' and 'int' to binary 'operator%' apparently there's a template returning double for abs for the non-int/long/float/double argument case. So promote earlier to int so the abs<int> is called Change-Id: I882a27c5ec349f894c1c9f4857687360a46b55ae
2016-01-20loplugin:unusedmethodsNoel Grandin1-29/+0
Change-Id: Ib2dc804f55d1a96ae01f2cf31b7d55956040a72e Reviewed-on: https://gerrit.libreoffice.org/21603 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-01-17crashtesting: plain-text import allows liberal with the UTF-8 inputCaolán McNamara1-1/+1
see ImplConvertUtf8ToUnicode which allows surrogates, so we need a non-liberal utf-input there if we want to enfore non-liberal utf-output here. Change-Id: I713818d7b6d79922d9b08f2b137a803384eccb65
2016-01-17sax: use CPPUNIT_ASSERT_THROWMatúš Kukan2-20/+2
Change-Id: I34b0b559a91e77cc497e14d8ffad7e2c80e43d79 Reviewed-on: https://gerrit.libreoffice.org/21531 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Matúš Kukan <matus@libreoffice.org>
2016-01-12Fix FastSaxSerializer::write() for non-BMP unicode characters.Mark Hung1-23/+2
Change-Id: I6ee9d028813c970b9ac5b9f0574af932e73111bd Reviewed-on: https://gerrit.libreoffice.org/21293 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-01-10Fix typosAndrea Gelmini2-2/+2
Change-Id: I9a5940027423ff0791fa7da0b79b617412ce6b86 Reviewed-on: https://gerrit.libreoffice.org/21209 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2015-12-24loplugin:unusedfieldsNoel Grandin1-1/+0
Change-Id: I979592adb978c3757a1e54615021ee424a2e02bf Reviewed-on: https://gerrit.libreoffice.org/20892 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-18remove unused typedefs and inline use-once typedefsNoel Grandin1-3/+2
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 Grandin3-6/+5
Change-Id: I0bef03451437cbdc5b0fed6b67690ac1d547291d
2015-11-16use initialiser list for Sequence<OUString>Noel Grandin2-8/+2
Change-Id: Ia5e47261d1fc6fac2d046656c05a1c5eedb07e02 Reviewed-on: https://gerrit.libreoffice.org/19978 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-15use initialiser for Sequence<OUString>Noel Grandin3-6/+3
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 Bergmann10-50/+50
Change-Id: I54bf272b404d2302cafbde73ec5061ea2cd966ab
2015-11-06loplugin:stringconstant: elide explicit ctor usage (automatic rewrite)Stephan Bergmann1-1/+1
Change-Id: Id1a67eb7ed5b76a7ad8902a80840a891e2ef8442
2015-11-04use uno::Reference::set method instead of assignmentNoel Grandin3-4/+4
Change-Id: I1c7240fe2e2b5eb825f028ca7502e5ba8793046b
2015-10-30UNO: no need to use OUString constructor when calling createInstanceNoel Grandin2-6/+3
Change-Id: I37da28539b94706574116d0fff5f008aabfb5526 Reviewed-on: https://gerrit.libreoffice.org/19682 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-10-30cppcheck: noExplicitConstructorCaolán McNamara5-10/+10
Change-Id: Id6d969713d94b558a93d303c6dabcbfdd1c65194
2015-10-28com::sun::star->css in sal,saxNoel Grandin10-86/+86
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-20new loplugin: badvectorinitNoel Grandin1-3/+1
look for places calling the 1-argument vector fill constructor and then immediately called push_back, which is generally a sign that its leaving empty slots. Change-Id: I34e69b8d09cc48c0d409499faaf192b9f86bc517 Reviewed-on: https://gerrit.libreoffice.org/17525 Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com> Tested-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
2015-10-20loplugin:defaultparamsStephan Bergmann1-2/+2
Change-Id: Ie7a5b5defb52fea98baed8183f424dd21990e9b9
2015-10-12Replace "SAL_OVERRIDE" with "override" in LIBO_INTERNAL_ONLY codeStephan Bergmann7-59/+59
Change-Id: I2ea407acd763ef2d7dae2d3b8f32525523ac8274
2015-10-09xmloff: fix ODF import of gradient draw:angle attribute a bitMichael Stahl1-0/+56
ODF 1.2 part 3, 18.3.1 angle, says "An angle, as defined in §4.1 of [SVG]" and "If no unit identifier is specified, the value is assumed to be in degrees." Unfortunately OOo could only read and write 10th of degree here. See also https://issues.oasis-open.org/browse/OFFICE-3774 As the first step towards fixing that, implement the import for draw:angle values with an angle unit identifier, but leave the import as-is if the angle identifier is missing. Change-Id: Ib88d417c03998ebcfc569b01492f0e1f851bbc85
2015-09-29sax: remove obsolete XML_UNICODE codeMichael Stahl1-40/+0
Change-Id: Ib5b9b7dc01b713554cf33f58f8fe2f97cb32c369
2015-09-17boost->stdCaolán McNamara4-24/+22
Change-Id: Ifde84627578283bd057d7393eb7e5578ef5c029a
2015-08-31loplugin:stringconstant: OUStringBuffer: appendAscii -> appendStephan Bergmann1-7/+7
Change-Id: I752d7e9ddc11139e454135b88476341277f7f01d
2015-08-27sax: tdf#88206 replace cppu::WeakImplHelper*Takeshi Abe9-26/+24
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-08-27Clean up emptyStringStephan Bergmann1-4/+3
Change-Id: I5350322e5c957127fe125e633b31b2492410995e
2015-08-22tdf#39440 reduce scope of local variablesMichael Weghorn1-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>
2015-08-11loplugin: defaultparamsNoel Grandin2-2/+2
Change-Id: I5afe7f9f5caa1f5e55c6218bdb3771571ff0dafa
2015-08-03new loplugin: refcountingNoel Grandin2-25/+26
This was a feature requested by mmeeks, as a result of tdf#92611. It validates that things that extend XInterface are not directly heap/stack-allocated, but have their lifecycle managed via css::uno::Reference or rtl::Reference. Change-Id: I28e3b8b236f6a4a56d0a6d6f26ad54e44b36e692 Reviewed-on: https://gerrit.libreoffice.org/16924 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-07-27inline a bunch of use-once macrosNoel Grandin1-8/+0
no point in having a macro unless it's actually going to reduce the number of lines of code Change-Id: Ic8760d6506cf272d7bd088f7b3b4dcbf288099fc
2015-07-18sax: convert MergeMarksEnum to enum classMichael Stahl3-14/+14
This should detect if a MergeMarks value is erroneously passed as tag. Change-Id: I7b855a661f182136824cf25f2174a9bcce8ff3d1
2015-07-18sax, sw: try to make that maMarkStack easier to understandMichael Stahl3-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
2015-07-13Make content of OSL_ASSERT, DBG_ASSERT, etc. visiblie in non-debug buildsStephan Bergmann1-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
2015-07-06loplugin:unusedmethods sax,shell,stoc,basegfxNoel Grandin1-4/+0
Change-Id: I8f3871fd4e82b6850718b6f2a8757f3043d00017
2015-07-04WaE do not us #if for DB_UTIL but #ifdefNorbert Thiebaud1-3/+3
Change-Id: I8b0a6c3323a4ffbe6a1ba09e5cff9ddd92ed49f1
2015-07-04sax: FastSaxSerializer well-formed element test in presence of ...Michael Stahl2-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
2015-07-04tdf#91378: sax, oox: avoid sending empty strings to character callbacksMichael Stahl1-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
2015-07-03Revert "loplugin:unusedmethods sax,shell,stoc,basegfx"Michael Stahl1-0/+4
The basegfx changes appear to break Windows builds. This reverts commit 3b32c5898ff4e744d3f18b00421b433500426d74.
2015-07-03loplugin:unusedmethods sax,shell,stoc,basegfxNoel Grandin1-4/+0
Change-Id: Ia5d63f7153e4b02acc5e206739316264d6d1184e
2015-06-25tdf#91378-Empty Custom Properties are lost while saving in .pptx formatHeena Gupta1-4/+2
Conflicts: sd/qa/unit/export-tests.cxx Reviewed on: https://gerrit.libreoffice.org/15966 Change-Id: Ibc24ab9633b51fe41ad483121646cc391319fe6f
2015-06-17Replace boost::scoped_array<T> with std::unique_ptr<T[]>Takeshi Abe2-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>