Kaydet (Commit) 73ade0b0 authored tarafından Miklos Vajna's avatar Miklos Vajna

xmlsecurity: remove unused m_xElementStackKeeper

Change-Id: Ibd7d39e288a4121428e83408ce67205eab3340c6
Reviewed-on: https://gerrit.libreoffice.org/43479Reviewed-by: 's avatarMiklos Vajna <vmiklos@collabora.co.uk>
Tested-by: 's avatarJenkins <ci@libreoffice.org>
üst 15869ea2
......@@ -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>
......@@ -163,44 +162,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.
......
......@@ -198,7 +198,7 @@ void XSecController::createXSecComponent( )
}
}
bool XSecController::chainOn( bool bRetrievingLastEvent )
bool XSecController::chainOn( bool /*bRetrievingLastEvent*/ )
/****** XSecController/chainOn ************************************************
*
* NAME
......@@ -280,21 +280,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
*/
......@@ -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()
......
......@@ -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);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment