summaryrefslogtreecommitdiff
path: root/sax/source/tools
AgeCommit message (Collapse)Author
2015-11-10loplugin:nullptr (automatic rewrite)Stephan Bergmann
Change-Id: I54bf272b404d2302cafbde73ec5061ea2cd966ab
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-20loplugin:defaultparamsStephan Bergmann
Change-Id: Ie7a5b5defb52fea98baed8183f424dd21990e9b9
2015-10-12Replace "SAL_OVERRIDE" with "override" in LIBO_INTERNAL_ONLY codeStephan Bergmann
Change-Id: I2ea407acd763ef2d7dae2d3b8f32525523ac8274
2015-10-09xmloff: fix ODF import of gradient draw:angle attribute a bitMichael Stahl
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-17boost->stdCaolán McNamara
Change-Id: Ifde84627578283bd057d7393eb7e5578ef5c029a
2015-08-31loplugin:stringconstant: OUStringBuffer: appendAscii -> appendStephan Bergmann
Change-Id: I752d7e9ddc11139e454135b88476341277f7f01d
2015-08-22tdf#39440 reduce scope of local variablesMichael Weghorn
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 Grandin
Change-Id: I5afe7f9f5caa1f5e55c6218bdb3771571ff0dafa
2015-07-18sax: convert MergeMarksEnum to enum classMichael Stahl
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 Stahl
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 Bergmann
...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-04WaE do not us #if for DB_UTIL but #ifdefNorbert Thiebaud
Change-Id: I8b0a6c3323a4ffbe6a1ba09e5cff9ddd92ed49f1
2015-07-04sax: FastSaxSerializer well-formed element test in presence of ...Michael Stahl
... 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-06-15cppcheck:redundantAssignmentNoel Grandin
Change-Id: I1167d0ce6b6f6e48309d0551c1d2a283d79546a7
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-11Show duplicate attributeJulien Nabet
Change-Id: I6e1e66012817178c167e7cb531811686cb2fec19
2015-03-28Clean up C-style casts from pointers to voidStephan Bergmann
Change-Id: Iacd5275ba41e49eebd3977f57d0b8b68acafa2c4
2015-02-06fdo#75757: Remove inheritance from std::vectorMatthew Pottage
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
2015-01-27add assert that first element is 0Caolán McNamara
Change-Id: I75602b6941f291703c85c841837b432da455a7ef
2015-01-27sax: minor optimizationMichael Meeks
Change-Id: I4812a567e37789c71af0cc6ba8f5a5caf0e3ec93
2015-01-20Some more loplugin:cstylecast: saxStephan Bergmann
Change-Id: I3ded4f19f73a094dabd2d2da54917290ffe468f5
2014-12-20fdo#39440 sax, sc: reduce scope of local variablesMichael Weghorn
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>
2014-11-17sal: clean up public headers with include-what-you-useMichael Stahl
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
2014-11-12make FastAttributeList's unknown attribute value be passed as OStringLuboš Luňák
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
2014-11-12allow inserting attributes that have zero lengthLuboš Luňák
Otherwise the strlen() might give an incorrect length if the attribute value is just a part of a longer string. Change-Id: I67eb7baecfa928fdee26c5ea9003bd7fc9b96d59
2014-11-06Revert "use the new OUString::fromUtf8 method"Stephan Bergmann
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).
2014-11-06use the new OUString::fromUtf8 methodNoel Grandin
Change-Id: I771004b7ccab3344a67e827e45bc34c22ffa5f77
2014-11-05fdo#38835 strip out OUString globalsNoel Grandin
they are largely unnecessary these days, since our OUString infrastructure gained optimised handling for static char constants. Change-Id: I07f73484f82d0582252cb4324d4107c998432c37
2014-10-25coverity#1249458 Explicit null dereferencedCaolán McNamara
Change-Id: I9e56aa8908ae6747d6820d8b90e85ec07e981223
2014-10-25coverity#1249457 writeFastAttributeList never takes NULLCaolán McNamara
and coverity#1249456 Change-Id: If1f6ef550290d3b6bb53ae87389b466c7d7a31f1
2014-10-25coverity#982640 Missing break in switchCaolán McNamara
Change-Id: I3479a7f219d10301108f24efc273d822c77477d2
2014-10-23WaE: implicit conversion of NULL constant to 'nullptr_t'Tor Lillqvist
Change-Id: I23a85ba05a596b566be35ebecc6b1804c0d0cb62
2014-10-23FastSerializer: Also use cache for writing to ForMerge if we are inside mark()Matúš Kukan
To ensure the correct order of calling ForMerge methods, call flush always before touching maMarkStack. This was the missing piece in optimizing write() methods, because of writeBytes() checking each time what to call. E.g. for Calc documents we don't use maMarkStack at all. So, just transfer the output to proper "ForMerge" when inside mark() and allow optimizations. This commit makes write() methods almost 1/3 as fast. Change-Id: I96c13888206c81f87e29b998839f78ea9d5570af
2014-10-23FastSerializer: Simplify OUString write a bit moreMatúš Kukan
Change-Id: Ifa0746d635ec43cdc37867cf94bcc128bb8e2aca
2014-10-23FastSerializer: Avoid some cycles when dealing with doublesMatúš Kukan
Would be easier to use OStringBuffer, but we can't get its pData member. Also its append(double) is suboptimal (or anything that uses rtl_str_valueOfDouble) - should be doing something like this commit. Change-Id: I8f3140081a574a84f0e60dc85cce1bd2de23cd34
2014-10-23FastSerializer: Use fixed sized Sequence directly as cacheMatúš Kukan
Well, at least the allocated space is fixed size. When passing that to XOutputStream, change the size in a hacky way. Change-Id: I24fa134286e3086beda25c9a6915549e7c69119a
2014-10-23FastSerializer: Use -1 for unknown string lengthMatúš Kukan
Change-Id: I3920caf9d95f20992b7961873f1668468d797e8e
2014-10-23Remove few pointless OUString::number() and one methodMatúš Kukan
Change-Id: I3e9a302a7513eebfeff07402f71fc3dde22e4cc2
2014-10-23FastSerializer: Faster write(OUString): add ascii checkMatúš Kukan
Saves about 80m pcycles for 180k calls. Change-Id: I9c9b3bf5a076df56d1b5b87f0a85ac3404abe8a4
2014-10-23FastSerializer: Simplify a bitMatúš Kukan
Change-Id: I7dee908f5441ad34128d688e1008fd6ffad2ab3f
2014-10-23Unused includes / using-declarationsMatúš Kukan
Change-Id: I8b43635ab1f77b61469f060c9a092f1494388955
2014-10-23FastSerializer: Use faster TokenValue struct when possibleMatúš Kukan
Saves another ~100m pcycles for 650k calls in startElementInternal() Change-Id: I190326edc7feffb900e91fa7e5c3530b5b267f59
2014-10-23FastSerializer: Simplify cache to be fixed sized bufferMatúš Kukan
This makes writeBytes(), which is called a lot, simpler and thus faster. E.g. for ~15m calls, this saves ~110m pcycles. Change-Id: I29d01a1a8651f668aff574e0f015cd2f018eb1cd
2014-10-23This was OString already; use it that wayMatúš Kukan
Change-Id: Ia2268ce8a1e2111adb609c515e5bfa824afa66ce
2014-10-23FastSerializer: Have own fast cache buffer implementation for XOutputStreamMatúš Kukan
Previously comphelper::OSequenceOutputStream was used. Change-Id: I4dc38c8c62422e59efa1071312497364cdf5be3c
2014-10-23FastSerializer: avoid some more OStringsMatúš Kukan
Change-Id: I2d5dbe9adccdd231cc16a1f83a90a4adeb965c64
2014-10-23FastSerializer: Use FastAttributeList directly to write faster.Matúš Kukan
Change-Id: I28085d4e060bcf052e6aa97a0822a4d653d7c066
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