[Libreoffice-commits] core.git: sax/qa sax/source
Mohammed Abdul Azeem
azeemmysore at gmail.com
Sat Jul 16 16:00:30 UTC 2016
sax/qa/cppunit/xmlimport.cxx | 6 ++++--
sax/qa/data/testthreading.xml | 5 +++++
sax/source/fastparser/fastparser.cxx | 25 ++++++++++++++++++++++---
3 files changed, 31 insertions(+), 5 deletions(-)
New commits:
commit 38b596d11f913477836cd29489017cf4a5e1debd
Author: Mohammed Abdul Azeem <azeemmysore at gmail.com>
Date: Thu Jul 14 20:22:07 2016 +0530
GSoC - Sync namespace handler calls with elements:
This syncs the namespace declaration calls with element's events. A
test case is also added which enables threads of fastparser.
Change-Id: Ic40a380c8523688ee6b2ec76bb3d36a0452923bd
Reviewed-on: https://gerrit.libreoffice.org/27222
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Michael Meeks <michael.meeks at collabora.com>
Tested-by: Michael Meeks <michael.meeks at collabora.com>
diff --git a/sax/qa/cppunit/xmlimport.cxx b/sax/qa/cppunit/xmlimport.cxx
index 747a3d5..7694223 100644
--- a/sax/qa/cppunit/xmlimport.cxx
+++ b/sax/qa/cppunit/xmlimport.cxx
@@ -82,7 +82,7 @@ private:
public:
TestDocumentHandler() {}
- const OUString& getString() { return m_aStr; }
+ const OUString getString() { return m_aStr; }
// XDocumentHandler
virtual void SAL_CALL startDocument() throw (SAXException, RuntimeException, exception) override;
@@ -140,7 +140,9 @@ void SAL_CALL TestDocumentHandler::startDocument()
throw(SAXException, RuntimeException, exception)
{
m_aStr.clear();
+ m_aNamespaceStack.clear();
m_aNamespaceStack.emplace_back( make_pair( OUString( "default" ), OUString() ) );
+ m_aCountStack = stack<sal_uInt16>();
m_aCountStack.emplace(0);
}
@@ -306,7 +308,7 @@ void XMLImportTest::parse()
{
OUString fileNames[] = {"simple.xml", "defaultns.xml", "inlinens.xml",
"multiplens.xml", "multiplepfx.xml",
- "nstoattributes.xml", "nestedns.xml"};
+ "nstoattributes.xml", "nestedns.xml", "testthreading.xml"};
for (sal_uInt16 i = 0; i < sizeof( fileNames ) / sizeof( OUString ); i++)
{
diff --git a/sax/qa/data/testthreading.xml b/sax/qa/data/testthreading.xml
new file mode 100644
index 0000000..0d05fd9
--- /dev/null
+++ b/sax/qa/data/testthreading.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?><Signature xmlns="http://www.w3.org/2000/09/xmldsig#" Id="idPackageSignature"><SignedInfo><CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"/><SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"/><Reference Type="http://www.w3.org/2000/09/xmldsig#Object" URI="#idPackageObject"><DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/><DigestValue>NOjlH6v6g2ojDvQoi4M5B8Bght0y3ES4fjxlRk2xtVE=</DigestValue></Reference><Reference Type="http://www.w3.org/2000/09/xmldsig#Object" URI="#idOfficeObject"><DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/><DigestValue>mq1H1GLrTZSuUUTqX5HpjytFwl8nJFggNsXJUgQZT0U=</DigestValue></Reference><Reference Type="http://uri.etsi.org/01903#SignedProperties" URI="#idSignedProperties"><Transforms><Transform Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"/></Transforms><DigestMethod Algorithm="http://www.w3.org/2001/04/xml
enc#sha256"/><DigestValue>6jeT5n6jeqOspz6K6BIgitwfLZf4s1/uS9dPdOQRF8s=</DigestValue></Reference></SignedInfo><SignatureValue>UZwOWZbOm9ysRa+eYwoksUW8d+jBFPOkqOtfTvT8waHWDe3siDc4N79W6jPCYMIHMtPQjCb4qMDe
+dhCYvg6TTWFWCvU/br+A1Qo0xovWHD3DwB29qk7NDBfbnEIPxbOe2D70cZa86Zl2MgW5YqQlgRFH
+g6+XxwBUp+ZYx4knFWEg8zgbe3JnV7zeI/RG/1iq9TYH1GUBloF10df4qaulrp2AUkdSvnnUcxRP
+ZfbS+14YxU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l+MA4GA1UdDwEB/wQEAwIF4DAdBgNVHSUEFjAUBggrBgEFBQcDAgYIKwYBBQUHAwQwDQYJKoZIhvcNAQELBQADggIBAFs0DeCDjttHQ0UHsYcnhfBCWRdOFdIr3F/IEbN2BL/grScGXoXRaYMIQJv/s5dKgZIuH7xMCVKazoftPVqU4bOEduAv0IJ6hQF/wEMBueA0UjvQQVYZgsOALi7TD3gYpFqYcH2Wfx5/5Ln6dllL8UsHoP+6gSLaYwjJd7FQ+IlNTzR65dRMLoJhoKqqyuM6cf/PM8sbK2NH2r8toypjfPixvD/w3wP7xn4oo/IGXcRK4DTHBF/rSMqeR6ePwXm5tVHrQBfnxN3dsGsXkQgqzBvvbPY0raraO4CPR7mZp4GVFHOsUNh5TI1SlfxWZ49HU3F5jWeiI9jPuw1RmuAyZdFEt403Wi67v6revXe1By6UqIZjq3b2pJGBKZH+60P1cJScawzrN8pi1qQFV8JiiJM6/MSciqplTT5F7SG0XZx1CjnBz5rMdYNhI9NNtF3oy9Xy9RvgYehFaC43ZlBBUMDmZFj5a78hOOkkq1UnrHUdeXyWhiEFzv5d8My2i0kWGq8r0HuC25BmOa17lHVxQ2o7Rdu9jDFP9oNizC7kQfA5QVRTfBFcWH7jml69RmVgfM+X+wdQgen9hJAILhBzmDfeteJ5ZEaoEYtw3isOGkpSyg7odjgYq7I+bOiN1toDg07vzfIkvF9KxlkDeRLXbmcFIvQsqFeF6cUwlZQYLOHA</X509Certificate></X509Data></KeyInfo><Object Id="idPackageObject"><Manifest><Reference URI="/_rels/.rels?ContentType=application/vnd.openxmlformats-package.relationships+xml"><Transforms><Transform Algorithm="ht
tp://schemas.openxmlformats.org/package/2006/RelationshipTransform"><mdssi:RelationshipReference xmlns:mdssi="http://schemas.openxmlformats.org/package/2006/digital-signature" SourceId="rId1"/></Transform><Transform Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"/></Transforms><DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/><DigestValue>Mq3mDDWudLiaQFa1psBgLG+/en7p7r8re0MtlxnuiUI=</DigestValue></Reference><Reference URI="/word/_rels/document.xml.rels?ContentType=application/vnd.openxmlformats-package.relationships+xml"><Transforms><Transform Algorithm="http://schemas.openxmlformats.org/package/2006/RelationshipTransform"><mdssi:RelationshipReference xmlns:mdssi="http://schemas.openxmlformats.org/package/2006/digital-signature" SourceId="rId2"/><mdssi:RelationshipReference xmlns:mdssi="http://schemas.openxmlformats.org/package/2006/digital-signature" SourceId="rId1"/><mdssi:RelationshipReference xmlns:mdssi="http://schemas.openxmlformats.org/package/200
6/digital-signature" SourceId="rId5"/><mdssi:RelationshipReference xmlns:mdssi="http://schemas.openxmlformats.org/package/2006/digital-signature" SourceId="rId4"/><mdssi:RelationshipReference xmlns:mdssi="http://schemas.openxmlformats.org/package/2006/digital-signature" SourceId="rId3"/></Transform><Transform Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"/></Transforms><DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/><DigestValue>fLpr0+BDSSPPgsv2eBghgw8hu/vi7IslCQuCSKGf2X4=</DigestValue></Reference><Reference URI="/word/document.xml?ContentType=application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml"><DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/><DigestValue>7Hrf+Oz9oMcqn7nOKgy1P39L313r8SO/pT3wQpVwq5k=</DigestValue></Reference><Reference URI="/word/fontTable.xml?ContentType=application/vnd.openxmlformats-officedocument.wordprocessingml.fontTable+xml"><DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc
#sha256"/><DigestValue>VZENondrzBVuF5GsYtsdSYgGNQS11L4XQ7vYiTn5PBE=</DigestValue></Reference><Reference URI="/word/settings.xml?ContentType=application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml"><DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/><DigestValue>nYb+Wnf/ttBtq0PSR33tt+yKzvx6RdYmtEhD3XnBwaI=</DigestValue></Reference><Reference URI="/word/styles.xml?ContentType=application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml"><DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/><DigestValue>4W+Exf0d9q8aHyBJ94YvTqRgdlhjR2r7F+eO3udy01s=</DigestValue></Reference><Reference URI="/word/theme/theme1.xml?ContentType=application/vnd.openxmlformats-officedocument.theme+xml"><DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/><DigestValue>L8HrIbYZUORASW6Jbsljhmie2tLKO9ld8ME0syr+ZDE=</DigestValue></Reference><Reference URI="/word/webSettings.xml?ContentType=application/vnd.openxmlformats-officedocument.wordpr
ocessingml.webSettings+xml"><DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/><DigestValue>8JastnM5t30OLdmv2PyPNOe1YxAXc/Qz0O1UCFnWyxM=</DigestValue></Reference></Manifest><SignatureProperties><SignatureProperty Id="idSignatureTime" Target="#idPackageSignature"><mdssi:SignatureTime xmlns:mdssi="http://schemas.openxmlformats.org/package/2006/digital-signature"><mdssi:Format>YYYY-MM-DDThh:mm:ssTZD</mdssi:Format><mdssi:Value>2016-01-11T15:32:02Z</mdssi:Value></mdssi:SignatureTime></SignatureProperty></SignatureProperties></Object><Object Id="idOfficeObject"><SignatureProperties><SignatureProperty Id="idOfficeV1Details" Target="#idPackageSignature"><SignatureInfoV1 xmlns="http://schemas.microsoft.com/office/2006/digsig"><SetupID></SetupID><SignatureText></SignatureText><SignatureImage/><SignatureComments>purpose</SignatureComments><WindowsVersion>6.1</WindowsVersion><OfficeVersion>16.0</OfficeVersion><ApplicationVersion>16.0</ApplicationVersion><Monitors>1</Monitors><Ho
rizontalResolution>1280</HorizontalResolution><VerticalResolution>800</VerticalResolution><ColorDepth>32</ColorDepth><SignatureProviderId>{00000000-0000-0000-0000-000000000000}</SignatureProviderId><SignatureProviderUrl></SignatureProviderUrl><SignatureProviderDetails>9</SignatureProviderDetails><SignatureType>1</SignatureType></SignatureInfoV1></SignatureProperty></SignatureProperties></Object><Object><xd:QualifyingProperties xmlns:xd="http://uri.etsi.org/01903/v1.3.2#" Target="#idPackageSignature"><xd:SignedProperties Id="idSignedProperties"><xd:SignedSignatureProperties><xd:SigningTime>2016-01-11T15:32:02Z</xd:SigningTime><xd:SigningCertificate><xd:Cert><xd:CertDigest><DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/><DigestValue>VRk3WQgpNIAnRxA9txzm7L2v1Iuwu2WrHpwa5WNTKV0=</DigestValue></xd:CertDigest><xd:IssuerSerial><X509IssuerName>CN=TSCP Intermediate Root CA, O=TSCP Test, S=England, C=UK</X509IssuerName><X509SerialNumber>4096</X509SerialNumber></xd:IssuerSer
ial></xd:Cert></xd:SigningCertificate><xd:SignaturePolicyIdentifier><xd:SignaturePolicyImplied/></xd:SignaturePolicyIdentifier></xd:SignedSignatureProperties></xd:SignedProperties><xd:UnsignedProperties><xd:UnsignedSignatureProperties><xd:CertificateValues><xd:EncapsulatedX509Certificate>MIIFiDCCA3CgAwIBAgICEAAwDQYJKoZIhvcNAQELBQAwTzELMAkGA1UEBhMCVUsxEDAOBgNVBAgMB0VuZ2xhbmQxEjAQBgNVBAoMCVRTQ1AgVGVzdDEaMBgGA1UEAwwRVFNDUCBUZXN0IFJvb3QgQ0EwHhcNMTUxMjE4MDc1ODE5WhcNMjUxMjE1MDc1ODE5WjBXMQswCQYDVQQGEwJVSzEQMA4GA1UECAwHRW5nbGFuZDESMBAGA1UECgwJVFNDUCBUZXN0MSIwIAYDVQQDDBlUU0NQIEludGVybWVkaWF0ZSBSb290IENBMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAz7cet97WutWedG8L4cU7vjXkkzc8PkXnuvoF6ltIbDbnt2jt+0JH8xjGpfMVF+si0RPMwNQDmrTSj6SCpBcFV11hgyLXeovO17cSfbUYhl53ghyY0w/J3We19JJNeXtXlgZKrzre1gaXPxUG6Q4/TGo/gh9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W3nqenN0ldXIzf7OjnVcbv2iKUzqYFzJHYtAuWHbew/kj2TvWeFFzdigLYjfnfZvHQ5sPxwrx6YpDeNf8inj48oEj6Raos0ClF0nmVg2eLMe9f</xd:EncapsulatedX509Certificate></xd:CertificateValues></xd:UnsignedSignatureProperties></xd:UnsignedProperties></xd:QualifyingProperties></Object></Signature>
\ No newline at end of file
diff --git a/sax/source/fastparser/fastparser.cxx b/sax/source/fastparser/fastparser.cxx
index 32d6624..0b4137b 100644
--- a/sax/source/fastparser/fastparser.cxx
+++ b/sax/source/fastparser/fastparser.cxx
@@ -81,6 +81,7 @@ struct Event
OUString msNamespace;
OUString msElementName;
rtl::Reference< FastAttributeList > mxAttributes;
+ rtl::Reference< FastAttributeList > mxDeclAttributes;
OUString msChars;
};
@@ -435,6 +436,16 @@ void Entity::startElement( Event *pEvent )
else if( mxDocumentHandler.is() )
xContext = mxDocumentHandler->createUnknownChildContext( aNamespace, aElementName, xAttr );
+ if ( mxNamespaceHandler.is() )
+ {
+ Sequence< xml::Attribute > NSDeclAttribs = pEvent->mxDeclAttributes->getUnknownAttributes();
+ sal_uInt16 len = NSDeclAttribs.getLength();
+ for (sal_uInt16 i = 0; i < len; i++)
+ {
+ mxNamespaceHandler->registerNamespace( NSDeclAttribs[i].Name, NSDeclAttribs[i].Value );
+ }
+ }
+
if( xContext.is() )
{
xContext->startUnknownElement( aNamespace, aElementName, xAttr );
@@ -1039,6 +1050,15 @@ void FastSaxParserImpl::callbackStartElement(const xmlChar *localName , const xm
rEvent.mxAttributes.set(
new FastAttributeList( rEntity.mxTokenHandler,
rEntity.mpTokenHandler ) );
+ if( rEntity.mxNamespaceHandler.is() )
+ {
+ if (rEvent.mxDeclAttributes.is())
+ rEvent.mxDeclAttributes->clear();
+ else
+ rEvent.mxDeclAttributes.set(
+ new FastAttributeList( rEntity.mxTokenHandler,
+ rEntity.mpTokenHandler ) );
+ }
OUString sNamespace;
sal_Int32 nNamespaceToken = FastToken::DONTKNOW;
@@ -1063,8 +1083,7 @@ void FastSaxParserImpl::callbackStartElement(const xmlChar *localName , const xm
DefineNamespace( OString( XML_CAST( namespaces[ i ] )),
OUString( XML_CAST( namespaces[ i + 1 ] ), strlen( XML_CAST( namespaces[ i + 1 ] )), RTL_TEXTENCODING_UTF8 ));
if( rEntity.mxNamespaceHandler.is() )
- rEntity.mxNamespaceHandler->registerNamespace( OUString( XML_CAST( namespaces[ i ] ),strlen( XML_CAST( namespaces[ i ] )), RTL_TEXTENCODING_UTF8 ),
- OUString( XML_CAST( namespaces[ i + 1 ] ), strlen( XML_CAST( namespaces[ i + 1 ] )), RTL_TEXTENCODING_UTF8 ));
+ rEvent.mxDeclAttributes->addUnknown( OString( XML_CAST( namespaces[ i ] ) ), OString( XML_CAST( namespaces[ i + 1 ] ) ) );
}
else
{
@@ -1072,7 +1091,7 @@ void FastSaxParserImpl::callbackStartElement(const xmlChar *localName , const xm
sNamespace = OUString( XML_CAST( namespaces[ i + 1 ] ), strlen( XML_CAST( namespaces[ i + 1 ] )), RTL_TEXTENCODING_UTF8 );
nNamespaceToken = GetNamespaceToken( sNamespace );
if( rEntity.mxNamespaceHandler.is() )
- rEntity.mxNamespaceHandler->registerNamespace("", OUString( XML_CAST( namespaces[ i + 1 ] ), strlen( XML_CAST( namespaces[ i + 1 ] )), RTL_TEXTENCODING_UTF8 ) );
+ rEvent.mxDeclAttributes->addUnknown( OString( "" ), OString( XML_CAST( namespaces[ i + 1 ] ) ) );
}
}
More information about the Libreoffice-commits
mailing list