Kaydet (Commit) 954f721a authored tarafından Tor Lillqvist's avatar Tor Lillqvist

Bin the XSecController::m_pErrorMessage field as it was never used

It was only assigned to. Some follow-up simplification.

Change-Id: I3b522064e946667d3a4c8fb82ee40bd0d44dd569
üst f144d319
......@@ -63,7 +63,6 @@ XSecController::XSecController( const cssu::Reference<cssu::XComponentContext>&
, m_bIsBlocking(false)
, m_eStatusOfSecurityComponents(InitializationState::UNINITIALIZED)
, m_bIsSAXEventKeeperSticky(false)
, m_pErrorMessage(nullptr)
, m_nReservedSignatureId(0)
, m_bVerifyCurrentSignature(false)
{
......@@ -457,7 +456,6 @@ void XSecController::startMission(
m_eStatusOfSecurityComponents = InitializationState::UNINITIALIZED;
m_xSecurityContext = xSecurityContext;
m_pErrorMessage = nullptr;
m_vInternalSignatureInformations.clear();
......
......@@ -47,14 +47,6 @@
#include <vector>
/*
* all error information
*/
#define ERROR_CANNOTCREATEXMLSECURITYCOMPONENT "Can't create XML security components."
#define ERROR_SAXEXCEPTIONDURINGCREATION "A SAX exception is throwed during signature creation."
#define ERROR_IOEXCEPTIONDURINGCREATION "An IO exception is throwed during signature creation."
#define ERROR_EXCEPTIONDURINGCREATION "An exception is throwed during signature creation."
#define NS_XMLDSIG "http://www.w3.org/2000/09/xmldsig#"
#define NS_DC "http://purl.org/dc/elements/1.1/"
#define NS_XD "http://uri.etsi.org/01903/v1.3.2#"
......@@ -247,11 +239,6 @@ private:
*/
bool m_bIsSAXEventKeeperSticky;
/*
* error message pointer
*/
const char *m_pErrorMessage;
/*
* the XSecParser which is used to parse the signature stream
*/
......
......@@ -350,26 +350,13 @@ bool XSecController::WriteSignature(
rc = true;
}
catch( cssxs::SAXException& )
{
m_pErrorMessage = ERROR_SAXEXCEPTIONDURINGCREATION;
}
catch( css::io::IOException& )
{
m_pErrorMessage = ERROR_IOEXCEPTIONDURINGCREATION;
}
catch( cssu::Exception& )
{
m_pErrorMessage = ERROR_EXCEPTIONDURINGCREATION;
}
m_xSAXEventKeeper->setNextHandler( nullptr );
m_bIsSAXEventKeeperSticky = false;
}
else
{
m_pErrorMessage = ERROR_CANNOTCREATEXMLSECURITYCOMPONENT;
}
return rc;
}
......@@ -406,24 +393,13 @@ bool XSecController::WriteOOXMLSignature(const uno::Reference<embed::XStorage>&
bRet = true;
}
catch (const xml::sax::SAXException&)
{
m_pErrorMessage = ERROR_SAXEXCEPTIONDURINGCREATION;
}
catch(const io::IOException&)
{
m_pErrorMessage = ERROR_IOEXCEPTIONDURINGCREATION;
}
catch(const uno::Exception&)
{
m_pErrorMessage = ERROR_EXCEPTIONDURINGCREATION;
}
m_xSAXEventKeeper->setNextHandler(nullptr);
m_bIsSAXEventKeeperSticky = false;
}
else
m_pErrorMessage = ERROR_CANNOTCREATEXMLSECURITYCOMPONENT;
return bRet;
}
......
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