Commit Graph

64 Commits

Author SHA1 Message Date
Stephan Bergmann
ae3a0c8da5 Add .component <implementation constructor="..." feature
...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-19 08:48:56 +01:00
Stephan Bergmann
71f33636da Change from ServiceManager- to ComponentContext-based implementations
Change-Id: Iba701c520ad27925bb5e67697e22132b53160ab2
2013-12-18 11:13:58 +01:00
Matúš Kukan
291e846db9 sax: various clean up. Move _getFactory next to the implementation.
Use more anonymous namespaces, de-duplicate code, bin some comments.
Makes the library smaller.

Change-Id: Id0cefdcaa72a74741303fc27e36038488ef8b059
2013-12-18 07:15:48 +01:00
Marcos Paulo de Souza
eebc1e9a8a fdo#60698: Merge fastsax and sax_shared into expwrap
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-11 20:45:30 +00:00
Michael Stahl
b6785eb595 sax: stop using SAX_DLLIMPLEMENTATION for both sax and fastsax
Change-Id: I243ec20015beec6b98ee0af55eb7c387008f32f1
2013-12-03 13:29:35 +01:00
Markus Mohrhard
223fb84c0b no inheritance so no virtual needed
Change-Id: Ia6c481bbf5353db4c2801a53ae1455534c6978bd
2013-12-03 05:56:24 +01:00
Kohei Yoshida
4afa538b7b Hide the implementation.
Change-Id: Ibfd9bf626a40c3ec4eb18d09944e8943163595c8
2013-12-02 23:04:39 -05:00
Kohei Yoshida
532b2f4818 Add a means to check if a namespace exists.
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-02 19:32:28 -05:00
Kohei Yoshida
2130fd9d61 Move this header out into a public place.
Change-Id: I356b26947d1018276d8a9ff6012fdad3ca2c0fd8
2013-12-02 19:32:28 -05:00
Kohei Yoshida
8ef9d65177 Remove inline methods from the header.
Change-Id: Ie2cff194c1db5eaa992c4bcaaa06ec9a419d85a7
2013-12-02 19:32:28 -05:00
Kohei Yoshida
4ba42fc8df Move this out of the namespace scope.
Change-Id: I4aec1d45edb47ea16adaa8d2ac23340b8f421bae
2013-12-02 19:32:27 -05:00
Michael Meeks
d8db8ea918 fastparser: strncmp needs a length. 2013-11-26 17:39:26 +00:00
Stephan Bergmann
9eaf15563a Presumably wants to use strcmp
Change-Id: I978a692fbf464b476811b445b16c7e1b0eec9e25
2013-11-26 17:31:29 +01:00
Michael Meeks
30a8fbbf1b fastparser: special case xmlns more sensibly. 2013-11-26 17:33:44 +00:00
Michael Meeks
d7280af974 fastparser: Avoid copying all tokens into a sequence. 2013-11-26 17:33:44 +00:00
Michael Meeks
2d681ad020 fastparser: don't waste cycles churning reference counts. 2013-11-26 17:33:44 +00:00
Michael Meeks
b7a8fc5585 fastparser: avoid allocation and conversion of elementnames we don't need.
Change-Id: I4c09aaa12b53181e50662de2721d170c195c7c86
2013-11-23 10:03:05 +00:00
Michael Meeks
fc25afaa04 fastparser: accelerate value tokenisation as well.
Change-Id: I99a39e91c684adb1fc92cdb466477cfa90104961
2013-11-19 20:52:50 +00:00
Noel Grandin
d366c9b20e remove unnecessary sal_Unicode casts in various places
Change-Id: Ibf04062ca86ed866202d748c3b62a210d30ed6ec
2013-11-14 08:17:32 +02:00
Marcos Paulo de Souza
da5449da0c fdo#54938: More uses of cppu::supportsService
Change-Id: Id6bed78d92eba52283a17ab3ca66e751c225e48d
Reviewed-on: https://gerrit.libreoffice.org/6423
Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
2013-10-25 08:07:04 +00:00
Tor Lillqvist
e2d061fe93 WaE: unreferenced local variable
Change-Id: I9783f03e656049b4f3b7f0a26a7ae626db5a13f6
2013-10-21 09:13:43 +03:00
Matúš Kukan
94f99a6bae sax: build fix: don't prefix enum values
Change-Id: I6f4eac6103821227bc72de8c3bb0fb89a7a8bc9d
2013-10-17 22:56:58 +02:00
Matúš Kukan
aeca826f34 fastparser: don't use multithreading for small documents
Determined by XInputStream::available().

Change-Id: I450f4796d9c072b395393582bfc3e1e7768e243b
2013-10-17 21:38:40 +02:00
Matúš Kukan
7aa35dcb43 fastparser: don't create temporary Events; use references to event list
Change-Id: I1e12fbeeb90d6020d0566d05fc0318082e1da5fc
2013-10-17 21:38:39 +02:00
Matúš Kukan
6f1a110a37 fastparser: reuse event lists if possible
Instead of allocating and freeing the memory all the time.

Change-Id: I53800abaca51d42d7d44a98fb271de7df7f90f58
2013-10-17 21:38:38 +02:00
Michael Meeks
902748b6ff fastparser: re-work locking, add high & low watermarks, change sizes etc.
Change-Id: I7fe1435addc6dce5a74a8411f7825cea331a5b3f
2013-10-17 21:38:38 +02:00
Matúš Kukan
9612bdbfa9 fastparser: implementation using two threads
Instead of calling methods directly, generate EventList - vector of
Events, where arguments for the callee are stored.

Change-Id: I227a0ef3038566664ac8f294770152c8b445997b
2013-10-17 21:38:38 +02:00
Michael Meeks
2df047bfd1 fastparser: cache default namespace token for ooxml.
Change-Id: Iee98ec92380d6d0404ab236e062ddbc2378cda43
2013-10-17 21:38:37 +02:00
Matúš Kukan
c293e73e8f FastAttributeList: avoid OStrings in attribute list; just use char buffer
Change-Id: I4879563fae3b85c68bbd1c4b260f9833848f4bda
2013-10-17 21:38:37 +02:00
Matúš Kukan
bc2d6ef106 fastparser: remove duplicated OString version methods
Also remove AttributeData and make the two for-cycles faster.

Change-Id: If0343992173bb333eee39c33bcb86acaa5a3d288
2013-10-17 21:38:36 +02:00
Matúš Kukan
03d76d034e fastparser: isolate calls to XFastContextHandler in Entity's methods
Unfortunately, we have to store maNamespace in two stacks.
One for future parser thread to compute tokens and one for
main thread calling XFastContextHandler.

Now we are prepared to implement multithreading.

Change-Id: I421b55afa2e9ea80142e6068c7a515d31913ba69
2013-10-17 21:38:35 +02:00
Matúš Kukan
bd4c869bbb fastparser: store mnNamespaceCount in another stack
This is preparation work for multithreading.
mnNamespaceCount will be handled in parser thread and the rest in main
thread.

Change-Id: I571026ea499f6876b8dafb4e1bdc56d1add649e5
2013-10-17 21:38:35 +02:00
Matúš Kukan
dffb0782bb sax: add unit test for FastSaxParser
Adapt FastSaxParser so that it does not require XFastDocumentHandler.

Change-Id: I7af49752dfbb4b55b8dde094fe6b762bd179be78
2013-10-17 21:38:33 +02:00
Michael Meeks
f1702566be fastparser: don't allocate uno::Sequences when we don't need to.
Change-Id: Ic2fff8cabbc077b6fc9dabffd2c6fcf555152b11
2013-10-11 14:18:44 +01:00
Luboš Luňák
ba37e4062f OUStringBuffer doesn't have append() overload for const char*
Change-Id: Ibde8e2021d33f01f91486fb6d3e24e7af0a47744
2013-07-15 23:12:35 +02:00
Cédric Bosdonnat
1c23a37710 fastsax: provide the element name instead of prefix for unknown elements
Change-Id: I3effd8a0cfe57875446536bbd0a93a73e630a44f
(cherry picked from commit 4946cc813704703f7d988a6acf75c4d9e9c068a9)
2013-07-03 15:15:17 +02:00
Thomas Arnhold
ba0a57702c remove OUString wrap for string literals
For some functions and all kinds of Exceptions.

CannotConvertException
CloseVetoException
DisposedException
EmptyUndoStackException
ErrorCodeIOException
Exception
GridInvalidDataException
GridInvalidModelException
IOException
IllegalAccessException
IllegalArgumentException
IllegalTypeException
IndexOutOfBoundsException
NoMasterException
NoSuchElementException
NoSupportException
PropertyVetoException
RuntimeException
SAXException
ScannerException
StorageWrappedTargetException
UnsupportedFlavorException
VetoException
WrappedTargetException
ZipIOException
throwGenericSQLException
throwIllegallArgumentException

createInstance
createInstanceWithContext
forName
getByName
getPackageManager
getPropertyValue
getUnpackedValueOrDefault
getValueByName
hasPropertyByName
openKey
setName
setPropertyValue
supportsService

bash command:

for i in `cat list`; do git grep "$i\s*(\s*OUString(\s*\"" -- '*.[hc]xx'
	| cut -d ':' -f1 | sort -u
	| xargs sed -i
		-e "s/\(\<$i\s*(\)\s*OUString(\s*\(\"[^\")\\]*\"\)\s*)\s*/\1\2/g"
		-e "s/\($i.*\)\"+ /\1\" + /g";
done

Change-Id: Iaf8e641b0abf28c082906014f87a183517630535
Reviewed-on: https://gerrit.libreoffice.org/4624
Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org>
Reviewed-by: Thomas Arnhold <thomas@arnhold.org>
Tested-by: Thomas Arnhold <thomas@arnhold.org>
2013-06-29 21:52:54 +00:00
Luboš Luňák
1946794ae0 mass removal of rtl:: prefixes for O(U)String*
Modules sal, salhelper, cppu, cppuhelper, codemaker (selectively) and odk
have kept them, in order not to break external API (the automatic using declaration
is LO-internal).

Change-Id: I588fc9e0c45b914f824f91c0376980621d730f09
2013-04-07 14:23:11 +02:00
Chr. Rossmanith
f32677968a Remove RTL_CONSTASCII_(U)STRINGPARAM in scaddins/sax
Change-Id: Ic4f9bef02cc4bdc74b9a6d81e3317e10b9c79bd4
2013-04-01 22:12:22 +02:00
Thomas Arnhold
f5ca04caca Related to fdo#60724: correct spelling
Using the autocorrect list of LibreOffice
extras/source/autotext/lang/en-US/acor/DocumentList.xml

Change-Id: I8b93969bc0742c2e95b8b7db3c4c37691e8d3657
Script: http://pastebin.ca/2327716
2013-03-03 17:14:16 +01:00
Michael Stahl
4db5b17c78 sax: convert some legacy assertions
Change-Id: I3b4f1caa2c2d7a0fd88ea53bf05d01b2c7cc115a
2013-02-13 16:31:55 +01:00
Michael Stahl
23e2875473 XML_Parse returns enum XML_Status
Change-Id: Ie4dde5aa412dae05d2629ce5675356db70b2529b
2012-07-12 22:08:10 +02:00
Michael Meeks
e18655e475 re-base on ALv2 code. 2012-06-27 19:30:33 +01:00
Thorsten Behrens
017b1c5d0a Targeted string re-work in padmin and sax 2012-06-01 17:07:47 +02:00
Michael Stahl
cad9839949 stop parsing on encountering internal entities in fastparser.cxx 2012-05-25 13:24:50 +02:00
Stephan Bergmann
7c704c78d3 Removed some unused parameters; added SAL_UNUSED_PARAMETER.
SAL_UNUSED_PARAMETER (expanding to __attribute__ ((unused)) for GCC)
is used to annotate legitimately unused parameters, so that static
analysis tools can tell legitimately unused parameters from truly
unnecessary ones.  To that end, some patches for external modules
are also added, that are only applied when compiling with GCC and
add necessary __attribute__ ((unused)) in headers.
2012-01-21 15:21:16 +01:00
Olivier Hallot
fffd541c3e Fix for fdo43460 Part XXIX getLength() to isEmpty()
Part XXIX
Modules
sax, scaddins, sccomp, scripting
2012-01-05 22:05:45 -02:00
Caolán McNamara
5131e0be31 catch by const reference 2011-08-31 10:43:22 +01:00
Muthu Subramanian
8c0b019bae Adding a public getNamespaceURL method to fastparser. 2011-05-03 22:16:03 +05:30
Thomas Arnhold
dedffc5920 Remove some dead code 2011-02-07 23:06:03 +01:00