summaryrefslogtreecommitdiff
path: root/sax
AgeCommit message (Collapse)AuthorFilesLines
2014-01-251158273 Uncaught exceptionCaolán McNamara1-2/+3
Change-Id: I3983da2d585762d81446902a710e9a97c6354669
2014-01-23coverity#1158443 Uninitialized pointer fieldCaolán McNamara1-3/+6
Change-Id: I1602678c24c1aeec60acee05801e7decc914560f
2014-01-23coverity#1158444 Uninitialized scalar fieldCaolán McNamara1-12/+13
Change-Id: I15f6c6288e2a951543702a15e777167f2240899e
2014-01-23coverity#1158445 Uninitialized pointer fieldCaolán McNamara1-0/+3
Change-Id: I14dc2197543bf98763190b5aea3a366e823312b4
2014-01-23coverity#1158493 Uninitialized scalar fieldCaolán McNamara1-39/+43
Change-Id: I26de8ab1fa4a20bc08e800f04716507469430612
2014-01-22Introduce static inline cppu::acquire(), and make use of that.Jan Holesovsky3-6/+6
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 Holesovsky3-3/+3
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 Holesovsky3-9/+3
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úš Kukan3-15/+11
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úš Kukan4-6/+6
Change-Id: I07fe0671d0633ef9480a4f3431df6a64c7902db8
2014-01-15Use const& arguments parameter for ctor functions.Matúš Kukan3-6/+3
Change-Id: I19ce8bd1a23123ac9a62a7fc95cd54fea5315221
2014-01-14fastparser: avoid boost::optional where it is un-necessary.Michael Meeks1-5/+5
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 Bergmann1-2/+2
Change-Id: Iae455f53f8317eecb8edc38d111c9ef7398a36fb
2014-01-07remove unnecessary sal_Unicode casts in OUStringBuffer::append callsNoel Grandin1-7/+7
Convert code like: buf.append( static_cast<sal_Unicode>('!') ); to: buf.append( '!' ); Change-Id: Iacb03a61de65a895540940953b49620677b3d051
2014-01-03WaE: C4101: 'e' : unreferenced local variableTor Lillqvist1-1/+1
Change-Id: I06c0f9dc742736f632ed9210ae954e0dc19ca19d
2013-12-31don't call top on an empty stackCaolán McNamara1-1/+1
Change-Id: Ibe4b4d3785535816b40d46fd0baa60f01e1f9d33
2013-12-31fastparser: avoid std::stack::top() - cache it's results.Michael Meeks1-13/+9
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 Meeks1-41/+41
Change-Id: I70e1597f917c2a8dedb5b38807dfde7ec05a1a39
2013-12-20fastparser:: move Entity:: code into the anonymous namespace.Michael Meeks1-46/+46
Change-Id: I564e35aa63e4c01cc1a0fb45f674dc1a2a0e89ec
2013-12-20fastparser: fix load regressionMichael Meeks1-68/+77
Remove erroneous assert: maSavedException is indeed empty for XML parser reported exceptions. Clean cut/paste code, and comment. Change-Id: Ia538bcc87a7efcd079d3021e00ac4d2eb62f3e8d
2013-12-19css.xml.sax service ctor clean-upStephan Bergmann1-5/+2
Change-Id: I556904861e93a145cfe65f61218926851e4e8eb0
2013-12-19Add .component <implementation constructor="..." featureStephan Bergmann4-102/+62
...to directly call constructor functions of ComponentContext-based C++ implementations of (non-single-instance) UNO services. The case where these calls would need to be bridged across different environments (e.g., from gcc3 to gcc3:affine) is not yet implemented. bootstrap.component and expwrap.component are adapted accordingly as a proof-of- concept (which had previously been adapted to use the prefix="direct" feature, which may become unnecessary again in the end, depending on how to handle single-instance services/singletons). More to follow. Change-Id: I18682d75bcd29d3d427e31331b4ce8161dbb846d
2013-12-18Change from ServiceManager- to ComponentContext-based implementationsStephan Bergmann3-47/+51
Change-Id: Iba701c520ad27925bb5e67697e22132b53160ab2
2013-12-18sax: various clean up. Move _getFactory next to the implementation.Matúš Kukan6-250/+106
Use more anonymous namespaces, de-duplicate code, bin some comments. Makes the library smaller. Change-Id: Id0cefdcaa72a74741303fc27e36038488ef8b059
2013-12-18Allow UNO component libraries to have each implementation in its own function.Matúš Kukan2-41/+39
Demonstrating on expwrap library. There is hope, this will bring code size savings for mobile platforms, where we don't need every implementation. Change-Id: I3519fb6148fd7a47ed9df092c73779ea6add552f
2013-12-17sax: avoid usage of double for parsing nanoseconds here tooMichael Stahl1-3/+7
Change-Id: Iddf93a116cb333db6465a915dae692c33a60241a
2013-12-17...and nDigits > 9 is harmless in following for loop and need not be cappedStephan Bergmann1-1/+1
Change-Id: I30c4005e5983f5007edfed692b74f07b31899755
2013-12-17readUnsignedNumberMaxDigits can read more than maxDigits charsStephan Bergmann1-2/+2
...so that is what the std::min was good for that the previous commit erroneously removed. Change-Id: I0cb08ab79f85ce4b919232845994c9b8bae35646
2013-12-17Fix namingStephan Bergmann1-5/+5
Change-Id: Ia7c62d57c56a27e097dbe252b6c6cac8fba7ace5
2013-12-17Avoid inaccurate floating-point computationsStephan Bergmann1-3/+7
...otherwise at least my --disable-dbgutil --disable-debug Linux x86_64 build failed the CppunitTest_sax_cpputest with 8999999 vs. 9000000 nanoseconds. Change-Id: I05e0febf413f9f9e01227a0cc4e0f46a5243fe61
2013-12-17Improve CPPUNIT_ASSERTsStephan Bergmann1-9/+8
Change-Id: I971602ce562ae0e11be5ac7b4d1eefbd342b625c
2013-12-17Adapt all (non-extension, SharedLibrary) .components to environment="..."Stephan Bergmann1-2/+2
Change-Id: I56f38bd786f3a026cb2908f28540dc9c4003af83
2013-12-11fdo#60698: Merge fastsax and sax_shared into expwrapMarcos Paulo de Souza9-140/+30
Change-Id: I6f8c6827c00db50184a46f39968f882b944d18d4 Reviewed-on: https://gerrit.libreoffice.org/6967 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org>
2013-12-10sax, xmloff: fix ODF import/export of text:time/text:time-valueMichael Stahl2-55/+292
The value written for an Impress time field is something like text:time-value="0000-00-00T23:28:07" (in LO 3.5+) or text:time-value="0-00-00T23:28:07" (in OOo 3.3) which contains an invalid all-zero date. Such values are actually rejected by the ODF import since commit ae3e2f170045a1525f67e9f3e9b7e03d94f2b56b. Actually there was no real support to read the RelaxNG type timeOrDateTime before. So fix that by: - adding convertTimeOrDateTime/parseTimeOrDateTime functions to sax::Converter - recognizing and ignoring the 2 invalid all-zero values written by LO 3.5 and historic OOo respectively - writing a bare "time" in text:time-value if the DateTime struct contains zero Date members (Older OOo versions and AOO cannot actually read that, but everything they _can_ read is invalid ODF...) Change-Id: I754076caee74a5163ed3f972af0f23796aa14f9f
2013-12-03sax: stop using SAX_DLLIMPLEMENTATION for both sax and fastsaxMichael Stahl2-2/+2
Change-Id: I243ec20015beec6b98ee0af55eb7c387008f32f1
2013-12-03we need to pass the variable to get correct dll linkageMarkus Mohrhard1-0/+4
Change-Id: I447218101e1791375273580a313dd54708303d7a
2013-12-03no inheritance so no virtual neededMarkus Mohrhard1-15/+15
Change-Id: Ia6c481bbf5353db4c2801a53ae1455534c6978bd
2013-12-02Hide the implementation.Kohei Yoshida1-103/+321
Change-Id: Ibfd9bf626a40c3ec4eb18d09944e8943163595c8
2013-12-02Add a means to check if a namespace exists.Kohei Yoshida1-0/+23
Useful when we just need to check if the stream has a certain namespace defined. Calling getNamespaceURL() may throw SAXException in such case. Change-Id: Ib2b7b202492390158270d87bab95d1793c9d8a70
2013-12-02Move this header out into a public place.Kohei Yoshida4-316/+103
Change-Id: I356b26947d1018276d8a9ff6012fdad3ca2c0fd8
2013-12-02Remove inline methods from the header.Kohei Yoshida2-5/+23
Change-Id: Ie2cff194c1db5eaa992c4bcaaa06ec9a419d85a7
2013-12-02Move this out of the namespace scope.Kohei Yoshida2-40/+41
Change-Id: I4aec1d45edb47ea16adaa8d2ac23340b8f421bae
2013-11-27Urgh - add embarassingly missing ~Michael Meeks1-1/+1
Change-Id: I6ffcb1561920eba2cbc3fa019431d84f07386570
2013-11-27fastparser: Outline virtual destructor to please MSVC++.Michael Meeks1-0/+5
Change-Id: I8368698e80e5ebe339b822a9e0e767e8ba867e07
2013-11-26fastparser: strncmp needs a length.Michael Meeks1-1/+1
2013-11-26Presumably wants to use strcmpStephan Bergmann1-1/+1
Change-Id: I978a692fbf464b476811b445b16c7e1b0eec9e25
2013-11-26fastparser: special case xmlns more sensibly.Michael Meeks1-0/+4
2013-11-26fastparser: Avoid copying all tokens into a sequence.Michael Meeks3-23/+22
2013-11-26fastparser: don't waste cycles churning reference counts.Michael Meeks1-11/+13
2013-11-24cppcheck: fix same expression on both sidesJulien Nabet1-1/+1
Change-Id: I3de69e2ae186ea1ae8f792588c04b4e799ce1331