summaryrefslogtreecommitdiff
path: root/sax
AgeCommit message (Collapse)AuthorFilesLines
2014-11-15windows blind fixMarkus Mohrhard1-1/+1
2014-11-14switch saxparser from expat to libxml2Luboš Luňák2-179/+137
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-12make FastAttributeList's unknown attribute value be passed as OStringLuboš Luňák1-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
2014-11-12allow inserting attributes that have zero lengthLuboš Luňák1-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
2014-11-10remove pointless const_castLuboš Luňák1-2/+2
Change-Id: I6026ab64f0cfe1d509c8f94ce3b9c6f700c823cf
2014-11-06Revert "use the new OUString::fromUtf8 method"Stephan Bergmann1-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).
2014-11-06use the new OUString::fromUtf8 methodNoel Grandin1-2/+2
Change-Id: I771004b7ccab3344a67e827e45bc34c22ffa5f77
2014-11-05fdo#38835 strip out OUString globalsNoel Grandin1-6/+4
they are largely unnecessary these days, since our OUString infrastructure gained optimised handling for static char constants. Change-Id: I07f73484f82d0582252cb4324d4107c998432c37
2014-10-30Fixed typos. No automatic tools (sed, and so on).Andrea Gelmini3-3/+3
Change-Id: Ia43976d84eede6f699381bc4f3daf89b95e4cb4f Reviewed-on: https://gerrit.libreoffice.org/12150 Reviewed-by: Bryan Quigley <gquigs@gmail.com> Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2014-10-29remove unnecessary 'using namespace rtl' declarationsNoel Grandin5-5/+0
It turns out that almost none of them were necessary. Change-Id: I1311ed28409c682b57ea8d149bcbaf2c49133e83 Reviewed-on: https://gerrit.libreoffice.org/12133 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-10-25coverity#1249458 Explicit null dereferencedCaolán McNamara1-1/+1
Change-Id: I9e56aa8908ae6747d6820d8b90e85ec07e981223
2014-10-25coverity#1249457 writeFastAttributeList never takes NULLCaolán McNamara3-7/+6
and coverity#1249456 Change-Id: If1f6ef550290d3b6bb53ae87389b466c7d7a31f1
2014-10-25coverity#982640 Missing break in switchCaolán McNamara1-0/+1
Change-Id: I3479a7f219d10301108f24efc273d822c77477d2
2014-10-23WaE: implicit conversion of NULL constant to 'nullptr_t'Tor Lillqvist1-1/+1
Change-Id: I23a85ba05a596b566be35ebecc6b1804c0d0cb62
2014-10-23FastSerializer: Also use cache for writing to ForMerge if we are inside mark()Matúš Kukan3-27/+75
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úš Kukan1-20/+11
Change-Id: Ifa0746d635ec43cdc37867cf94bcc128bb8e2aca
2014-10-23FastSerializer: Avoid some cycles when dealing with doublesMatúš Kukan3-3/+28
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úš Kukan1-4/+10
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úš Kukan2-5/+6
Change-Id: I3920caf9d95f20992b7961873f1668468d797e8e
2014-10-23Remove few pointless OUString::number() and one methodMatúš Kukan1-9/+6
Change-Id: I3e9a302a7513eebfeff07402f71fc3dde22e4cc2
2014-10-23FastSerializer: Faster write(OUString): add ascii checkMatúš Kukan1-1/+32
Saves about 80m pcycles for 180k calls. Change-Id: I9c9b3bf5a076df56d1b5b87f0a85ac3404abe8a4
2014-10-23FastSerializer: Simplify a bitMatúš Kukan3-23/+9
Change-Id: I7dee908f5441ad34128d688e1008fd6ffad2ab3f
2014-10-23Unused includes / using-declarationsMatúš Kukan1-9/+0
Change-Id: I8b43635ab1f77b61469f060c9a092f1494388955
2014-10-23FastSerializer: Use faster TokenValue struct when possibleMatúš Kukan3-13/+58
Saves another ~100m pcycles for 650k calls in startElementInternal() Change-Id: I190326edc7feffb900e91fa7e5c3530b5b267f59
2014-10-23FastSerializer: Simplify cache to be fixed sized bufferMatúš Kukan1-33/+13
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úš Kukan1-5/+4
Change-Id: Ia2268ce8a1e2111adb609c515e5bfa824afa66ce
2014-10-23FastSerializer: Have own fast cache buffer implementation for XOutputStreamMatúš Kukan3-22/+115
Previously comphelper::OSequenceOutputStream was used. Change-Id: I4dc38c8c62422e59efa1071312497364cdf5be3c
2014-10-23FastSerializer: avoid some more OStringsMatúš Kukan4-12/+14
Change-Id: I2d5dbe9adccdd231cc16a1f83a90a4adeb965c64
2014-10-23FastSerializer: Use FastAttributeList directly to write faster.Matúš Kukan4-63/+42
Change-Id: I28085d4e060bcf052e6aa97a0822a4d653d7c066
2014-10-23fastparser: avoid allocating un-used FastTokenLookup class.Michael Meeks2-20/+12
This contained an rtl_Sequence complete with horror internal allocator, caught red-handed serializing threaded loading to no good purpose. Change-Id: I837b2c17e4f70fd6a49bed33ad74a7d79f98f35c
2014-10-23FastSerializer: Remove throw specs; this is not UNO implementationMatúš Kukan2-43/+27
Change-Id: I462f8ed89de48174ed7aa6e008709963bec50649
2014-10-23FastSerializer: Avoid sequences where possibleMatúš Kukan2-42/+44
Change-Id: I359ca9d3b766b71904e4199ebfbdbd5b203775cc
2014-10-23FastSerializer: Remove escapeXml() creating OUString(Buffer)Matúš Kukan3-35/+40
Instead directly write the content. Change-Id: I7b6db925348b879a013acbd2a76a80d590f721c0
2014-10-23FastSerializer: Have OString version of write() too.Matúš Kukan3-18/+20
And remove characters() member function. Change-Id: Ifcedbb6d969b7b057ff378d2fbce09c2dde5ac18
2014-10-23FastSerializer: check for valid output stream in one place is enoughMatúš Kukan2-19/+1
Change-Id: Id89fb1f0444331c2858a9795ae81dcdb875d3d2b
2014-10-23FastSerializer: Do not keep whole sequence in memory; write in chunksMatúš Kukan2-4/+17
Change-Id: Ibca65a2b8397358ac4013c8e5b53389ac6949e4d
2014-10-23FastSerializer: We already know the attribute valueMatúš Kukan1-1/+1
Change-Id: I6996e15f99b94b50c1903092d7424a96339ccfaf
2014-10-23FastSerializer: Buffer output and write it only at the endMatúš Kukan2-3/+14
Use OSequenceOutputStream class to concatenate strings in a Sequence<sal_Int8> buffer. And write data to file only at the end. The design is a bit fragile, since all FSHelpers need to be destroyed before calling FilterBase::commitStorage(). Otherwise data is not written. Change-Id: I26b02335ef36011bfcda17484b560811d18c7657
2014-10-15More -Werror,-Wunused-private-fieldStephan Bergmann1-3/+1
...detected with a modified trunk Clang with > Index: lib/Sema/SemaDeclCXX.cpp > =================================================================== > --- lib/Sema/SemaDeclCXX.cpp (revision 219190) > +++ lib/Sema/SemaDeclCXX.cpp (working copy) > @@ -1917,9 +1917,10 @@ > const Type *T = FD.getType()->getBaseElementTypeUnsafe(); > // FIXME: Destruction of ObjC lifetime types has side-effects. > if (const CXXRecordDecl *RD = T->getAsCXXRecordDecl()) > - return !RD->isCompleteDefinition() || > - !RD->hasTrivialDefaultConstructor() || > - !RD->hasTrivialDestructor(); > + return !RD->hasAttr<WarnUnusedAttr>() && > + (!RD->isCompleteDefinition() || > + !RD->hasTrivialDefaultConstructor() || > + !RD->hasTrivialDestructor()); > return false; > } > > @@ -3517,9 +3518,11 @@ > bool addFieldInitializer(CXXCtorInitializer *Init) { > AllToInit.push_back(Init); > > +#if 0 > // Check whether this initializer makes the field "used". > if (Init->getInit()->HasSideEffects(S.Context)) > S.UnusedPrivateFields.remove(Init->getAnyMember()); > +#endif > > return false; > } to warn about members of SAL_WARN_UNUSED-annotated class types, and warn about initializations with side effects (cf. <http://lists.cs.uiuc.edu/pipermail/cfe-dev/2014-October/039602.html> "-Wunused-private-field distracted by side effects"). Change-Id: I3f3181c4eb8180ca28e1fa3dffc9dbe1002c6628
2014-10-10Revert "This was OString already; use it that way"Stephan Bergmann1-4/+5
This reverts commit 9a25d12534f91c13400a63e265fb5aa14c6aca66, there's another use of DebugAttributes.find(rAttrName) in that function where rAttrName is of type OUString.
2014-10-10This was OString already; use it that wayMatúš Kukan1-5/+4
Change-Id: Ia2268ce8a1e2111adb609c515e5bfa824afa66ce
2014-10-02coverity#1158274 Uncaught exceptionCaolán McNamara1-10/+21
Change-Id: Icfbe30efa3ebd63620a900e345e4b4a74070b021
2014-10-02fix indentCaolán McNamara1-17/+17
Change-Id: Ife7b28fcb67051c41831ef9eb566c3a2c148033d
2014-10-02consistent capitalization in both exceptionsCaolán McNamara1-1/+1
Change-Id: I495a92c24847de265f04abb3670532270b5d6034
2014-10-02coverity#1242946 Unused valueCaolán McNamara1-1/+0
Change-Id: I5a5f0e96f8dc7443901ea7de568a21924137e139
2014-09-24Unused FastSaxSerializer::maSavedMarkStack memberMatúš Kukan1-1/+0
Change-Id: Ib665b3870f3d4b00c70d3f928452639464adca69
2014-09-22sax: Tabify makefiles to be more consistentMatúš Kukan4-29/+29
Change-Id: I4db1feea9db351917dd082bd22b9fc1cd5a6a9c0
2014-09-19Remove unused XFastTokenHandler functionsMatúš Kukan1-12/+0
Change-Id: I0d8072f1194aa837932dcffd6dc6a3761bbdc74e
2014-09-19Use FastSaxParser directlyMatúš Kukan2-8/+7
Change-Id: I2f21438a0ccc6bc096f3257c48e088c4114d9f45
2014-09-18fastparser: Use dummy token handler in unit test instead of an oox one.Matúš Kukan2-4/+37
Change-Id: I4562156858982857a17e8837106c4c946f175be7