xmlsecurity/inc/xsecctl.hxx | 39 ------------------------- xmlsecurity/source/helper/xsecctl.cxx | 48 ------------------------------- xmlsecurity/source/helper/xsecverify.cxx | 4 -- 3 files changed, 1 insertion(+), 90 deletions(-)
New commits: commit 73ade0b02905785b0a29a3230049a4fe637d34f6 Author: Miklos Vajna <vmik...@collabora.co.uk> Date: Wed Oct 18 09:24:49 2017 +0200 xmlsecurity: remove unused m_xElementStackKeeper Change-Id: Ibd7d39e288a4121428e83408ce67205eab3340c6 Reviewed-on: https://gerrit.libreoffice.org/43479 Reviewed-by: Miklos Vajna <vmik...@collabora.co.uk> Tested-by: Jenkins <c...@libreoffice.org> diff --git a/xmlsecurity/inc/xsecctl.hxx b/xmlsecurity/inc/xsecctl.hxx index e2a571a5a238..e05ae2e90541 100644 --- a/xmlsecurity/inc/xsecctl.hxx +++ b/xmlsecurity/inc/xsecctl.hxx @@ -29,7 +29,6 @@ #include <com/sun/star/xml/sax/XAttributeList.hpp> #include <com/sun/star/xml/crypto/XXMLSignature.hpp> #include <com/sun/star/xml/crypto/XSEInitializer.hpp> -#include <com/sun/star/xml/crypto/sax/XElementStackKeeper.hpp> #include <com/sun/star/xml/crypto/sax/XSecuritySAXEventKeeper.hpp> #include <com/sun/star/xml/crypto/sax/XReferenceResolvedListener.hpp> #include <com/sun/star/xml/crypto/sax/XSAXEventKeeperStatusChangeListener.hpp> @@ -164,44 +163,6 @@ private: bool m_bIsPreviousNodeInitializable; /* - * the ElementStackKeeper is used to reserve the key SAX events. - * when the SAXEventKeeper is chained on the SAX chain, it need - * first get all missed key SAX events in order to make sure the - * DOM tree it buffering has the same structure with the original - * document. - * - * For a given section of a SAX event stream, the key SAX events - * are the minimal SAX event subset of that section, which, - * combining with SAX events outside of this section, has the same - * structure with the original document. - * - * For example, sees the following dom fragment: - * <A> - * <B/> - * <C> - * <D> - * <E/> - * </D> - * </C> - * </A> - * - * If we consider the SAX event section from startElement(<A>) to - * startElement(<D>), then the key SAX events are: - * - * startElement(<A>), startElement(<C>), startElement(<D>) - * - * The startElement(<B>) and endElement(<B>) is ignored, because - * they are unimportant for the tree structure in this section. - * - * If we consider the SAX event section from startElement(<D>) to - * endElement(<A>), the key SAX events are: - * - * startElement(<D>), endElement(<D>), endElement(<C>), - * endElement(<A>). - */ - css::uno::Reference< css::xml::crypto::sax::XElementStackKeeper > m_xElementStackKeeper; - - /* * a flag representing whether the SAXEventKeeper is now on the * SAX chain. */ diff --git a/xmlsecurity/source/helper/xsecctl.cxx b/xmlsecurity/source/helper/xsecctl.cxx index 536738933f8c..26b29fba6765 100644 --- a/xmlsecurity/source/helper/xsecctl.cxx +++ b/xmlsecurity/source/helper/xsecctl.cxx @@ -198,7 +198,7 @@ void XSecController::createXSecComponent( ) } } -bool XSecController::chainOn( bool bRetrievingLastEvent ) +bool XSecController::chainOn( bool /*bRetrievingLastEvent*/ ) /****** XSecController/chainOn ************************************************ * * NAME @@ -281,21 +281,6 @@ bool XSecController::chainOn( bool bRetrievingLastEvent ) } /* - * get missed key SAX events - */ - if (m_xElementStackKeeper.is()) - { - m_xElementStackKeeper->retrieve(xSEKHandler, bRetrievingLastEvent); - - /* - * now the ElementStackKeeper can stop its work, because the - * SAXEventKeeper is on the SAX chain, no SAX events will be - * missed. - */ - m_xElementStackKeeper->stop(); - } - - /* * connects the next document handler on the SAX chain */ m_xSAXEventKeeper->setNextHandler(uno::Reference<xml::sax::XDocumentHandler>()); @@ -340,15 +325,6 @@ void XSecController::chainOff() } } - if (m_xElementStackKeeper.is()) - { - /* - * start the ElementStackKeeper to reserve any possible - * missed key SAX events - */ - m_xElementStackKeeper->start(); - } - m_bIsSAXEventKeeperConnected = false; } } @@ -398,14 +374,6 @@ void XSecController::initializeSAXChain() m_bIsCollectingElement = false; m_bIsBlocking = false; - if (m_xElementStackKeeper.is()) - { - /* - * starts the ElementStackKeeper - */ - m_xElementStackKeeper->start(); - } - chainOff(); } @@ -490,7 +458,6 @@ void XSecController::setSAXChainConnector(const cssu::Reference< cssl::XInitiali { m_bIsPreviousNodeInitializable = true; m_xPreviousNodeOnSAXChain = xInitialization; - m_xElementStackKeeper.clear(); initializeSAXChain( ); } @@ -502,22 +469,9 @@ void XSecController::clearSAXChainConnector() * clearSAXChainConnector -- resets the collaborating components. ******************************************************************************/ { - /* - * before resetting, if the ElementStackKeeper has kept something, then - * those kept key SAX events must be transferred to the SAXEventKeeper - * first. This is to promise the next node to the SAXEventKeeper on the - * SAX chain always receives a complete document. - */ - if (m_xElementStackKeeper.is() && m_xSAXEventKeeper.is()) - { - cssu::Reference< cssxs::XDocumentHandler > xSEKHandler(static_cast<cppu::OWeakObject*>(m_xSAXEventKeeper.get()), cssu::UNO_QUERY); - m_xElementStackKeeper->retrieve(xSEKHandler, true); - } - chainOff(); m_xPreviousNodeOnSAXChain = nullptr; - m_xElementStackKeeper = nullptr; } void XSecController::endMission() diff --git a/xmlsecurity/source/helper/xsecverify.cxx b/xmlsecurity/source/helper/xsecverify.cxx index b4f8158b7c6c..6b2031b82607 100644 --- a/xmlsecurity/source/helper/xsecverify.cxx +++ b/xmlsecurity/source/helper/xsecverify.cxx @@ -441,10 +441,6 @@ void XSecController::collectToVerify( const OUString& referenceId ) if ( bJustChainingOn ) { cssu::Reference< cssxs::XDocumentHandler > xSEKHandler(static_cast<cppu::OWeakObject*>(m_xSAXEventKeeper.get()), cssu::UNO_QUERY); - if (m_xElementStackKeeper.is()) - { - m_xElementStackKeeper->retrieve(xSEKHandler, true); - } m_xSAXEventKeeper->setNextHandler(xHandler); } } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits