summaryrefslogtreecommitdiff
path: root/xmlsecurity/source/helper
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@suse.cz>2013-04-07 12:06:47 +0200
committerLuboš Luňák <l.lunak@suse.cz>2013-04-07 14:23:11 +0200
commit1946794ae09ba732022fe6a74ea45e304ab70b84 (patch)
treee32bd7ba61fa021ecc7f8c85959df8ca837d6e81 /xmlsecurity/source/helper
parent5b08c6e7a21dda94d5b755eea0b1ed1e9c199bec (diff)
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
Diffstat (limited to 'xmlsecurity/source/helper')
-rw-r--r--xmlsecurity/source/helper/documentsignaturehelper.cxx91
-rw-r--r--xmlsecurity/source/helper/xmlsignaturehelper.cxx24
-rw-r--r--xmlsecurity/source/helper/xmlsignaturehelper2.cxx28
-rw-r--r--xmlsecurity/source/helper/xmlsignaturehelper2.hxx16
-rw-r--r--xmlsecurity/source/helper/xsecctl.cxx114
-rw-r--r--xmlsecurity/source/helper/xsecctl.hxx48
-rw-r--r--xmlsecurity/source/helper/xsecparser.cxx90
-rw-r--r--xmlsecurity/source/helper/xsecparser.hxx28
-rw-r--r--xmlsecurity/source/helper/xsecsign.cxx28
-rw-r--r--xmlsecurity/source/helper/xsecverify.cxx28
10 files changed, 247 insertions, 248 deletions
diff --git a/xmlsecurity/source/helper/documentsignaturehelper.cxx b/xmlsecurity/source/helper/documentsignaturehelper.cxx
index 2d7a921cc893..7d1fdd56027e 100644
--- a/xmlsecurity/source/helper/documentsignaturehelper.cxx
+++ b/xmlsecurity/source/helper/documentsignaturehelper.cxx
@@ -32,11 +32,10 @@
#include "rtl/uri.hxx"
using namespace ::com::sun::star::uno;
-using rtl::OUString;
namespace
{
-::rtl::OUString getElement(::rtl::OUString const & version, ::sal_Int32 * index)
+OUString getElement(OUString const & version, ::sal_Int32 * index)
{
while (*index < version.getLength() && version[*index] == '0') {
++*index;
@@ -49,11 +48,11 @@ namespace
// Return 1 if version1 is greater then version 2, 0 if they are equal
//and -1 if version1 is less version 2
int compareVersions(
- ::rtl::OUString const & version1, ::rtl::OUString const & version2)
+ OUString const & version1, OUString const & version2)
{
for (::sal_Int32 i1 = 0, i2 = 0; i1 >= 0 || i2 >= 0;) {
- ::rtl::OUString e1(getElement(version1, &i1));
- ::rtl::OUString e2(getElement(version2, &i2));
+ OUString e1(getElement(version1, &i1));
+ OUString e2(getElement(version2, &i2));
if (e1.getLength() < e2.getLength()) {
return -1;
} else if (e1.getLength() > e2.getLength()) {
@@ -76,18 +75,18 @@ int compareVersions(
//If 'bSigning' is false, then we validate. If the user enabled validating according to OOo 3.0
//then mimetype and all content of META-INF must be excluded.
void ImplFillElementList(
- std::vector< rtl::OUString >& rList, const Reference < css::embed::XStorage >& rxStore,
- const ::rtl::OUString rRootStorageName, const bool bRecursive,
+ std::vector< OUString >& rList, const Reference < css::embed::XStorage >& rxStore,
+ const OUString rRootStorageName, const bool bRecursive,
const DocumentSignatureAlgorithm mode)
{
- ::rtl::OUString aMetaInfName( "META-INF" );
- ::rtl::OUString sMimeTypeName ("mimetype");
- ::rtl::OUString aSep( "/" );
+ OUString aMetaInfName( "META-INF" );
+ OUString sMimeTypeName ("mimetype");
+ OUString aSep( "/" );
Reference < css::container::XNameAccess > xElements( rxStore, UNO_QUERY );
- Sequence< ::rtl::OUString > aElements = xElements->getElementNames();
+ Sequence< OUString > aElements = xElements->getElementNames();
sal_Int32 nElements = aElements.getLength();
- const ::rtl::OUString* pNames = aElements.getConstArray();
+ const OUString* pNames = aElements.getConstArray();
for ( sal_Int32 n = 0; n < nElements; n++ )
{
@@ -99,11 +98,11 @@ void ImplFillElementList(
}
else
{
- ::rtl::OUString sEncName = ::rtl::Uri::encode(
+ OUString sEncName = ::rtl::Uri::encode(
pNames[n], rtl_UriCharClassRelSegment,
rtl_UriEncodeStrict, RTL_TEXTENCODING_UTF8);
if (sEncName.isEmpty() && !pNames[n].isEmpty())
- throw css::uno::Exception(::rtl::OUString(
+ throw css::uno::Exception(OUString(
"Failed to encode element name of XStorage"), 0);
if ( rxStore->isStreamElement( pNames[n] ) )
@@ -112,13 +111,13 @@ void ImplFillElementList(
if (pNames[n].equals(
DocumentSignatureHelper::GetDocumentContentSignatureDefaultStreamName()))
continue;
- ::rtl::OUString aFullName( rRootStorageName + sEncName );
+ OUString aFullName( rRootStorageName + sEncName );
rList.push_back(aFullName);
}
else if ( bRecursive && rxStore->isStorageElement( pNames[n] ) )
{
Reference < css::embed::XStorage > xSubStore = rxStore->openStorageElement( pNames[n], css::embed::ElementModes::READ );
- rtl::OUString aFullRootName( rRootStorageName + sEncName + aSep );
+ OUString aFullRootName( rRootStorageName + sEncName + aSep );
ImplFillElementList(rList, xSubStore, aFullRootName, bRecursive, mode);
}
}
@@ -126,7 +125,7 @@ void ImplFillElementList(
}
-bool DocumentSignatureHelper::isODFPre_1_2(const ::rtl::OUString & sVersion)
+bool DocumentSignatureHelper::isODFPre_1_2(const OUString & sVersion)
{
//The property version exists only if the document is at least version 1.2
//That is, if the document has version 1.1 and sVersion is empty.
@@ -138,7 +137,7 @@ bool DocumentSignatureHelper::isODFPre_1_2(const ::rtl::OUString & sVersion)
bool DocumentSignatureHelper::isOOo3_2_Signature(const SignatureInformation & sigInfo)
{
- ::rtl::OUString sManifestURI("META-INF/manifest.xml");
+ OUString sManifestURI("META-INF/manifest.xml");
bool bOOo3_2 = false;
typedef ::std::vector< SignatureReferenceInformation >::const_iterator CIT;
for (CIT i = sigInfo.vSignatureReferenceInfors.begin();
@@ -155,7 +154,7 @@ bool DocumentSignatureHelper::isOOo3_2_Signature(const SignatureInformation & si
DocumentSignatureAlgorithm
DocumentSignatureHelper::getDocumentAlgorithm(
- const ::rtl::OUString & sODFVersion, const SignatureInformation & sigInfo)
+ const OUString & sODFVersion, const SignatureInformation & sigInfo)
{
OSL_ASSERT(!sODFVersion.isEmpty());
DocumentSignatureAlgorithm mode = OOo3_2Document;
@@ -184,14 +183,14 @@ DocumentSignatureHelper::getDocumentAlgorithm(
//
//When a signature is created then we always use the latest algorithm. That is, we use
//that of OOo 3.2
-std::vector< rtl::OUString >
+std::vector< OUString >
DocumentSignatureHelper::CreateElementList(
const Reference < css::embed::XStorage >& rxStore,
- const ::rtl::OUString /*rRootStorageName*/, DocumentSignatureMode eMode,
+ const OUString /*rRootStorageName*/, DocumentSignatureMode eMode,
const DocumentSignatureAlgorithm mode)
{
- std::vector< rtl::OUString > aElements;
- ::rtl::OUString aSep( "/" );
+ std::vector< OUString > aElements;
+ OUString aSep( "/" );
switch ( eMode )
{
@@ -200,10 +199,10 @@ DocumentSignatureHelper::CreateElementList(
if (mode == OOo2Document) //that is, ODF 1.0, 1.1
{
// 1) Main content
- ImplFillElementList(aElements, rxStore, ::rtl::OUString(), false, mode);
+ ImplFillElementList(aElements, rxStore, OUString(), false, mode);
// 2) Pictures...
- rtl::OUString aSubStorageName( "Pictures" );
+ OUString aSubStorageName( "Pictures" );
try
{
Reference < css::embed::XStorage > xSubStore = rxStore->openStorageElement( aSubStorageName, css::embed::ElementModes::READ );
@@ -214,7 +213,7 @@ DocumentSignatureHelper::CreateElementList(
; // Doesn't have to exist...
}
// 3) OLE....
- aSubStorageName = rtl::OUString("ObjectReplacements");
+ aSubStorageName = OUString("ObjectReplacements");
try
{
Reference < css::embed::XStorage > xSubStore = rxStore->openStorageElement( aSubStorageName, css::embed::ElementModes::READ );
@@ -222,11 +221,11 @@ DocumentSignatureHelper::CreateElementList(
xSubStore.clear();
// Object folders...
- rtl::OUString aMatchStr( "Object " );
+ OUString aMatchStr( "Object " );
Reference < css::container::XNameAccess > xElements( rxStore, UNO_QUERY );
- Sequence< ::rtl::OUString > aElementNames = xElements->getElementNames();
+ Sequence< OUString > aElementNames = xElements->getElementNames();
sal_Int32 nElements = aElementNames.getLength();
- const ::rtl::OUString* pNames = aElementNames.getConstArray();
+ const OUString* pNames = aElementNames.getConstArray();
for ( sal_Int32 n = 0; n < nElements; n++ )
{
if ( ( pNames[n].match( aMatchStr ) ) && rxStore->isStorageElement( pNames[n] ) )
@@ -244,14 +243,14 @@ DocumentSignatureHelper::CreateElementList(
else
{
// Everything except META-INF
- ImplFillElementList(aElements, rxStore, ::rtl::OUString(), true, mode);
+ ImplFillElementList(aElements, rxStore, OUString(), true, mode);
}
}
break;
case SignatureModeMacros:
{
// 1) Macros
- rtl::OUString aSubStorageName( "Basic" );
+ OUString aSubStorageName( "Basic" );
try
{
Reference < css::embed::XStorage > xSubStore = rxStore->openStorageElement( aSubStorageName, css::embed::ElementModes::READ );
@@ -263,7 +262,7 @@ DocumentSignatureHelper::CreateElementList(
}
// 2) Dialogs
- aSubStorageName = rtl::OUString("Dialogs") ;
+ aSubStorageName = OUString("Dialogs") ;
try
{
Reference < css::embed::XStorage > xSubStore = rxStore->openStorageElement( aSubStorageName, css::embed::ElementModes::READ );
@@ -274,7 +273,7 @@ DocumentSignatureHelper::CreateElementList(
; // Doesn't have to exist...
}
// 3) Scripts
- aSubStorageName = rtl::OUString("Scripts") ;
+ aSubStorageName = OUString("Scripts") ;
try
{
Reference < css::embed::XStorage > xSubStore = rxStore->openStorageElement( aSubStorageName, css::embed::ElementModes::READ );
@@ -289,7 +288,7 @@ DocumentSignatureHelper::CreateElementList(
case SignatureModePackage:
{
// Everything except META-INF
- ImplFillElementList(aElements, rxStore, ::rtl::OUString(), true, mode);
+ ImplFillElementList(aElements, rxStore, OUString(), true, mode);
}
break;
}
@@ -308,11 +307,11 @@ SignatureStreamHelper DocumentSignatureHelper::OpenSignatureStream(
try
{
- ::rtl::OUString aSIGStoreName( "META-INF" );
+ OUString aSIGStoreName( "META-INF" );
aHelper.xSignatureStorage = rxStore->openStorageElement( aSIGStoreName, nSubStorageOpenMode );
if ( aHelper.xSignatureStorage.is() )
{
- ::rtl::OUString aSIGStreamName;
+ OUString aSIGStreamName;
if ( eDocSigMode == SignatureModeDocumentContent )
aSIGStreamName = DocumentSignatureHelper::GetDocumentContentSignatureDefaultStreamName();
else if ( eDocSigMode == SignatureModeMacros )
@@ -338,7 +337,7 @@ SignatureStreamHelper DocumentSignatureHelper::OpenSignatureStream(
//the uri s in the Reference elements in the signature, were not properly encoded.
// For example: <Reference URI="ObjectReplacements/Object 1">
bool DocumentSignatureHelper::checkIfAllFilesAreSigned(
- const ::std::vector< ::rtl::OUString > & sElementList,
+ const ::std::vector< OUString > & sElementList,
const SignatureInformation & sigInfo,
const DocumentSignatureAlgorithm alg)
{
@@ -350,7 +349,7 @@ bool DocumentSignatureHelper::checkIfAllFilesAreSigned(
// There is also an extra entry of type TYPE_SAMEDOCUMENT_REFERENCE because of signature date.
if ( ( rInf.nType == TYPE_BINARYSTREAM_REFERENCE ) || ( rInf.nType == TYPE_XMLSTREAM_REFERENCE ) )
{
- ::rtl::OUString sReferenceURI = rInf.ouURI;
+ OUString sReferenceURI = rInf.ouURI;
if (alg == OOo2Document)
{
//Comparing URIs is a difficult. Therefore we kind of normalize
@@ -362,10 +361,10 @@ bool DocumentSignatureHelper::checkIfAllFilesAreSigned(
}
//find the file in the element list
- typedef ::std::vector< ::rtl::OUString >::const_iterator CIT;
+ typedef ::std::vector< OUString >::const_iterator CIT;
for (CIT aIter = sElementList.begin(); aIter != sElementList.end(); ++aIter)
{
- ::rtl::OUString sElementListURI = *aIter;
+ OUString sElementListURI = *aIter;
if (alg == OOo2Document)
{
sElementListURI =
@@ -433,19 +432,19 @@ bool DocumentSignatureHelper::equalsReferenceUriManifestPath(
return retVal;
}
-::rtl::OUString DocumentSignatureHelper::GetDocumentContentSignatureDefaultStreamName()
+OUString DocumentSignatureHelper::GetDocumentContentSignatureDefaultStreamName()
{
- return ::rtl::OUString( "documentsignatures.xml" );
+ return OUString( "documentsignatures.xml" );
}
-::rtl::OUString DocumentSignatureHelper::GetScriptingContentSignatureDefaultStreamName()
+OUString DocumentSignatureHelper::GetScriptingContentSignatureDefaultStreamName()
{
- return ::rtl::OUString( "macrosignatures.xml" );
+ return OUString( "macrosignatures.xml" );
}
-::rtl::OUString DocumentSignatureHelper::GetPackageSignatureDefaultStreamName()
+OUString DocumentSignatureHelper::GetPackageSignatureDefaultStreamName()
{
- return ::rtl::OUString( "packagesignatures.xml" );
+ return OUString( "packagesignatures.xml" );
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/source/helper/xmlsignaturehelper.cxx b/xmlsecurity/source/helper/xmlsignaturehelper.cxx
index 51d8111b787d..6aeb9965ec79 100644
--- a/xmlsecurity/source/helper/xmlsignaturehelper.cxx
+++ b/xmlsecurity/source/helper/xmlsignaturehelper.cxx
@@ -68,14 +68,14 @@ bool XMLSignatureHelper::Init()
mxSEInitializer = com::sun::star::xml::crypto::SEInitializer::create( mxCtx );
if ( mxSEInitializer.is() )
- mxSecurityContext = mxSEInitializer->createSecurityContext( ::rtl::OUString() );
+ mxSecurityContext = mxSEInitializer->createSecurityContext( OUString() );
return mxSecurityContext.is();
}
void XMLSignatureHelper::SetStorage(
const Reference < css::embed::XStorage >& rxStorage,
- ::rtl::OUString sODFVersion)
+ OUString sODFVersion)
{
DBG_ASSERT( !mxUriBinding.is(), "SetStorage - UriBinding already set!" );
mxUriBinding = new UriBindingHelper( rxStorage );
@@ -110,9 +110,9 @@ sal_Int32 XMLSignatureHelper::GetNewSecurityId()
void XMLSignatureHelper::SetX509Certificate(
sal_Int32 nSecurityId,
- const rtl::OUString& ouX509IssuerName,
- const rtl::OUString& ouX509SerialNumber,
- const rtl::OUString& ouX509Cert)
+ const OUString& ouX509IssuerName,
+ const OUString& ouX509SerialNumber,
+ const OUString& ouX509Cert)
{
mpXSecController->setX509Certificate(
nSecurityId,
@@ -134,7 +134,7 @@ void XMLSignatureHelper::SetDateTime( sal_Int32 nSecurityId, const Date& rDate,
mpXSecController->setDate( nSecurityId, stDateTime );
}
-void XMLSignatureHelper::AddForSigning( sal_Int32 nSecurityId, const rtl::OUString& uri, const rtl::OUString& objectURL, sal_Bool bBinary )
+void XMLSignatureHelper::AddForSigning( sal_Int32 nSecurityId, const OUString& uri, const OUString& objectURL, sal_Bool bBinary )
{
mpXSecController->signAStream( nSecurityId, uri, objectURL, bBinary );
}
@@ -157,17 +157,17 @@ uno::Reference<xml::sax::XWriter> XMLSignatureHelper::CreateDocumentHandlerWithH
/*
* write the xml context for signatures
*/
- rtl::OUString tag_AllSignatures(TAG_DOCUMENTSIGNATURES);
+ OUString tag_AllSignatures(TAG_DOCUMENTSIGNATURES);
SvXMLAttributeList *pAttributeList = new SvXMLAttributeList();
- rtl::OUString sNamespace;
+ OUString sNamespace;
if (mbODFPre1_2)
- sNamespace = rtl::OUString(NS_DOCUMENTSIGNATURES);
+ sNamespace = OUString(NS_DOCUMENTSIGNATURES);
else
- sNamespace = rtl::OUString(NS_DOCUMENTSIGNATURES_ODF_1_2);
+ sNamespace = OUString(NS_DOCUMENTSIGNATURES_ODF_1_2);
pAttributeList->AddAttribute(
- rtl::OUString(ATTR_XMLNS),
+ OUString(ATTR_XMLNS),
sNamespace);
xSaxWriter->startDocument();
@@ -180,7 +180,7 @@ uno::Reference<xml::sax::XWriter> XMLSignatureHelper::CreateDocumentHandlerWithH
void XMLSignatureHelper::CloseDocumentHandler( const uno::Reference<xml::sax::XDocumentHandler>& xDocumentHandler )
{
- rtl::OUString tag_AllSignatures(TAG_DOCUMENTSIGNATURES);
+ OUString tag_AllSignatures(TAG_DOCUMENTSIGNATURES);
xDocumentHandler->endElement( tag_AllSignatures );
xDocumentHandler->endDocument();
}
diff --git a/xmlsecurity/source/helper/xmlsignaturehelper2.cxx b/xmlsecurity/source/helper/xmlsignaturehelper2.cxx
index edc6ee371301..d8b35863a73f 100644
--- a/xmlsecurity/source/helper/xmlsignaturehelper2.cxx
+++ b/xmlsecurity/source/helper/xmlsignaturehelper2.cxx
@@ -84,10 +84,10 @@ void SAL_CALL ImplXMLSignatureListener::endDocument( )
}
}
-void SAL_CALL ImplXMLSignatureListener::startElement( const rtl::OUString& aName, const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList >& xAttribs )
+void SAL_CALL ImplXMLSignatureListener::startElement( const OUString& aName, const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList >& xAttribs )
throw (com::sun::star::xml::sax::SAXException, com::sun::star::uno::RuntimeException)
{
- if ( aName == rtl::OUString("Signature") )
+ if ( aName == OUString("Signature") )
{
maStartVerifySignatureElementListener.Call( (void*)&xAttribs );
}
@@ -98,7 +98,7 @@ void SAL_CALL ImplXMLSignatureListener::startElement( const rtl::OUString& aName
}
}
-void SAL_CALL ImplXMLSignatureListener::endElement( const rtl::OUString& aName )
+void SAL_CALL ImplXMLSignatureListener::endElement( const OUString& aName )
throw (com::sun::star::xml::sax::SAXException, com::sun::star::uno::RuntimeException)
{
if (m_xNextHandler.is())
@@ -107,7 +107,7 @@ void SAL_CALL ImplXMLSignatureListener::endElement( const rtl::OUString& aName )
}
}
-void SAL_CALL ImplXMLSignatureListener::characters( const rtl::OUString& aChars )
+void SAL_CALL ImplXMLSignatureListener::characters( const OUString& aChars )
throw (com::sun::star::xml::sax::SAXException, com::sun::star::uno::RuntimeException)
{
if (m_xNextHandler.is())
@@ -116,7 +116,7 @@ void SAL_CALL ImplXMLSignatureListener::characters( const rtl::OUString& aChars
}
}
-void SAL_CALL ImplXMLSignatureListener::ignorableWhitespace( const rtl::OUString& aWhitespaces )
+void SAL_CALL ImplXMLSignatureListener::ignorableWhitespace( const OUString& aWhitespaces )
throw (com::sun::star::xml::sax::SAXException, com::sun::star::uno::RuntimeException)
{
if (m_xNextHandler.is())
@@ -125,7 +125,7 @@ void SAL_CALL ImplXMLSignatureListener::ignorableWhitespace( const rtl::OUString
}
}
-void SAL_CALL ImplXMLSignatureListener::processingInstruction( const rtl::OUString& aTarget, const rtl::OUString& aData )
+void SAL_CALL ImplXMLSignatureListener::processingInstruction( const OUString& aTarget, const OUString& aData )
throw (com::sun::star::xml::sax::SAXException, com::sun::star::uno::RuntimeException)
{
if (m_xNextHandler.is())
@@ -157,12 +157,12 @@ UriBindingHelper::UriBindingHelper( const com::sun::star::uno::Reference < com::
}
-void SAL_CALL UriBindingHelper::setUriBinding( const rtl::OUString& /*uri*/, const uno::Reference< io::XInputStream >&)
+void SAL_CALL UriBindingHelper::setUriBinding( const OUString& /*uri*/, const uno::Reference< io::XInputStream >&)
throw (uno::Exception, uno::RuntimeException)
{
}
-uno::Reference< io::XInputStream > SAL_CALL UriBindingHelper::getUriBinding( const rtl::OUString& uri )
+uno::Reference< io::XInputStream > SAL_CALL UriBindingHelper::getUriBinding( const OUString& uri )
throw (uno::Exception, uno::RuntimeException)
{
uno::Reference< io::XInputStream > xInputStream;
@@ -182,7 +182,7 @@ uno::Reference< io::XInputStream > SAL_CALL UriBindingHelper::getUriBinding( con
return xInputStream;
}
-uno::Reference < io::XInputStream > UriBindingHelper::OpenInputStream( const uno::Reference < embed::XStorage >& rxStore, const rtl::OUString& rURI )
+uno::Reference < io::XInputStream > UriBindingHelper::OpenInputStream( const uno::Reference < embed::XStorage >& rxStore, const OUString& rURI )
{
OSL_ASSERT(!rURI.isEmpty());
uno::Reference < io::XInputStream > xInStream;
@@ -192,10 +192,10 @@ uno::Reference < io::XInputStream > UriBindingHelper::OpenInputStream( const uno
{
// Cloning because of I can't keep all storage references open
// MBA with think about a better API...
- const ::rtl::OUString sName = ::rtl::Uri::decode(
+ const OUString sName = ::rtl::Uri::decode(
rURI, rtl_UriDecodeStrict, rtl_UriCharClassRelSegment);
if (sName.isEmpty() && !rURI.isEmpty())
- throw uno::Exception(::rtl::OUString(
+ throw uno::Exception(OUString(
"Could not decode URI for stream element."), 0);
uno::Reference< io::XStream > xStream;
@@ -206,14 +206,14 @@ uno::Reference < io::XInputStream > UriBindingHelper::OpenInputStream( const uno
}
else
{
- const rtl::OUString aStoreName = ::rtl::Uri::decode(
+ const OUString aStoreName = ::rtl::Uri::decode(
rURI.copy( 0, nSepPos ), rtl_UriDecodeStrict, rtl_UriCharClassRelSegment);
if (aStoreName.isEmpty() && !rURI.isEmpty())
throw uno::Exception(
- ::rtl::OUString(
+ OUString(
"Could not decode URI for stream element."), 0);
- rtl::OUString aElement = rURI.copy( nSepPos+1 );
+ OUString aElement = rURI.copy( nSepPos+1 );
uno::Reference < embed::XStorage > xSubStore = rxStore->openStorageElement( aStoreName, embed::ElementModes::READ );
xInStream = OpenInputStream( xSubStore, aElement );
}
diff --git a/xmlsecurity/source/helper/xmlsignaturehelper2.hxx b/xmlsecurity/source/helper/xmlsignaturehelper2.hxx
index 5cb27a116212..53a216a1dd16 100644
--- a/xmlsecurity/source/helper/xmlsignaturehelper2.hxx
+++ b/xmlsecurity/source/helper/xmlsignaturehelper2.hxx
@@ -70,7 +70,7 @@ public:
throw (com::sun::star::uno::RuntimeException);
// com::sun::star::xml::sax::XDocumentHandler
- virtual void SAL_CALL startElement( const rtl::OUString& aName, const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList >& xAttribs )
+ virtual void SAL_CALL startElement( const OUString& aName, const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList >& xAttribs )
throw (com::sun::star::xml::sax::SAXException, com::sun::star::uno::RuntimeException);
virtual void SAL_CALL startDocument( )
@@ -79,16 +79,16 @@ public:
virtual void SAL_CALL endDocument( )
throw (com::sun::star::xml::sax::SAXException, com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL endElement( const rtl::OUString& aName )
+ virtual void SAL_CALL endElement( const OUString& aName )
throw (com::sun::star::xml::sax::SAXException, com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL characters( const rtl::OUString& aChars )
+ virtual void SAL_CALL characters( const OUString& aChars )
throw (com::sun::star::xml::sax::SAXException, com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL ignorableWhitespace( const rtl::OUString& aWhitespaces )
+ virtual void SAL_CALL ignorableWhitespace( const OUString& aWhitespaces )
throw (com::sun::star::xml::sax::SAXException, com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL processingInstruction( const rtl::OUString& aTarget, const rtl::OUString& aData )
+ virtual void SAL_CALL processingInstruction( const OUString& aTarget, const OUString& aData )
throw (com::sun::star::xml::sax::SAXException, com::sun::star::uno::RuntimeException);
virtual void SAL_CALL setDocumentLocator( const com::sun::star::uno::Reference< com::sun::star::xml::sax::XLocator >& xLocator )
@@ -113,13 +113,13 @@ public:
UriBindingHelper();
UriBindingHelper( const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >& rxStorage );
- void SAL_CALL setUriBinding( const rtl::OUString& uri, const com::sun::star::uno::Reference< com::sun::star::io::XInputStream >& aInputStream )
+ void SAL_CALL setUriBinding( const OUString& uri, const com::sun::star::uno::Reference< com::sun::star::io::XInputStream >& aInputStream )
throw (com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException);
- com::sun::star::uno::Reference< com::sun::star::io::XInputStream > SAL_CALL getUriBinding( const rtl::OUString& uri )
+ com::sun::star::uno::Reference< com::sun::star::io::XInputStream > SAL_CALL getUriBinding( const OUString& uri )
throw (com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException);
- static com::sun::star::uno::Reference < com::sun::star::io::XInputStream > OpenInputStream( const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >& rxStore, const rtl::OUString& rURI );
+ static com::sun::star::uno::Reference < com::sun::star::io::XInputStream > OpenInputStream( const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >& rxStore, const OUString& rURI );
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/source/helper/xsecctl.cxx b/xmlsecurity/source/helper/xsecctl.cxx
index 340f7bda7f7d..733022c43678 100644
--- a/xmlsecurity/source/helper/xsecctl.cxx
+++ b/xmlsecurity/source/helper/xsecctl.cxx
@@ -68,7 +68,7 @@ XSecController::~XSecController()
*/
/** convert string to number with optional min and max values */
sal_Bool XSecController::convertNumber( sal_Int32& rValue,
- const rtl::OUString& rString,
+ const OUString& rString,
sal_Int32 /*nMin*/, sal_Int32 /*nMax*/ )
{
sal_Bool bNeg = sal_False;
@@ -105,7 +105,7 @@ sal_Bool XSecController::convertNumber( sal_Int32& rValue,
}
/** convert util::DateTime to ISO Date String */
-void XSecController::convertDateTime( ::rtl::OUStringBuffer& rBuffer,
+void XSecController::convertDateTime( OUStringBuffer& rBuffer,
const com::sun::star::util::DateTime& rDateTime )
{
rBuffer.append((sal_Int32) rDateTime.Year);
@@ -146,11 +146,11 @@ void XSecController::convertDateTime( ::rtl::OUStringBuffer& rBuffer,
/** convert ISO Date String to util::DateTime */
sal_Bool XSecController::convertDateTime( com::sun::star::util::DateTime& rDateTime,
- const ::rtl::OUString& rString )
+ const OUString& rString )
{
sal_Bool bSuccess = sal_True;
- rtl::OUString aDateStr, aTimeStr, sHundredth;
+ OUString aDateStr, aTimeStr, sHundredth;
sal_Int32 nPos = rString.indexOf( (sal_Unicode) 'T' );
sal_Int32 nPos2 = rString.indexOf( (sal_Unicode) ',' );
if ( nPos >= 0 )
@@ -176,14 +176,14 @@ sal_Bool XSecController::convertDateTime( com::sun::star::util::DateTime& rDateT
sHundredth = rString.copy(nPos2 + 1);
sal_Int32 len = sHundredth.getLength();
if (len == 1)
- sHundredth += rtl::OUString("0");
+ sHundredth += OUString("0");
if (len > 2)
sHundredth = sHundredth.copy(0, 2);
}
else
{
aTimeStr = rString.copy(nPos + 1);
- sHundredth = rtl::OUString("0");
+ sHundredth = OUString("0");
}
}
else
@@ -324,9 +324,9 @@ void XSecController::createXSecComponent( )
* Email: michael.mi@sun.com
******************************************************************************/
{
- rtl::OUString sSAXEventKeeper( SAXEVENTKEEPER_COMPONENT );
- rtl::OUString sXMLSignature( XMLSIGNATURE_COMPONENT );
- rtl::OUString sXMLDocument( XMLDOCUMENTWRAPPER_COMPONENT );
+ OUString sSAXEventKeeper( SAXEVENTKEEPER_COMPONENT );
+ OUString sXMLSignature( XMLSIGNATURE_COMPONENT );
+ OUString sXMLDocument( XMLDOCUMENTWRAPPER_COMPONENT );
/*
* marks all security components are not available.
@@ -644,7 +644,7 @@ void XSecController::initializeSAXChain()
}
cssu::Reference< com::sun::star::io::XInputStream >
- XSecController::getObjectInputStream( const rtl::OUString& objectURL )
+ XSecController::getObjectInputStream( const OUString& objectURL )
/****** XSecController/getObjectInputStream ************************************
*
* NAME
@@ -895,26 +895,26 @@ void XSecController::exportSignature(
/*
* defines all element tags in Signature element.
*/
- rtl::OUString tag_Signature(TAG_SIGNATURE);
- rtl::OUString tag_SignedInfo(TAG_SIGNEDINFO);
- rtl::OUString tag_CanonicalizationMethod(TAG_CANONICALIZATIONMETHOD);
- rtl::OUString tag_SignatureMethod(TAG_SIGNATUREMETHOD);
- rtl::OUString tag_Reference(TAG_REFERENCE);
- rtl::OUString tag_Transforms(TAG_TRANSFORMS);
- rtl::OUString tag_Transform(TAG_TRANSFORM);
- rtl::OUString tag_DigestMethod(TAG_DIGESTMETHOD);
- rtl::OUString tag_DigestValue(TAG_DIGESTVALUE);
- rtl::OUString tag_SignatureValue(TAG_SIGNATUREVALUE);
- rtl::OUString tag_KeyInfo(TAG_KEYINFO);
- rtl::OUString tag_X509Data(TAG_X509DATA);
- rtl::OUString tag_X509IssuerSerial(TAG_X509ISSUERSERIAL);
- rtl::OUString tag_X509IssuerName(TAG_X509ISSUERNAME);
- rtl::OUString tag_X509SerialNumber(TAG_X509SERIALNUMBER);
- rtl::OUString tag_X509Certificate(TAG_X509CERTIFICATE);
- rtl::OUString tag_Object(TAG_OBJECT);
- rtl::OUString tag_SignatureProperties(TAG_SIGNATUREPROPERTIES);
- rtl::OUString tag_SignatureProperty(TAG_SIGNATUREPROPERTY);
- rtl::OUString tag_Date(TAG_DATE);
+ OUString tag_Signature(TAG_SIGNATURE);
+ OUString tag_SignedInfo(TAG_SIGNEDINFO);
+ OUString tag_CanonicalizationMethod(TAG_CANONICALIZATIONMETHOD);
+ OUString tag_SignatureMethod(TAG_SIGNATUREMETHOD);
+ OUString tag_Reference(TAG_REFERENCE);
+ OUString tag_Transforms(TAG_TRANSFORMS);
+ OUString tag_Transform(TAG_TRANSFORM);
+ OUString tag_DigestMethod(TAG_DIGESTMETHOD);
+ OUString tag_DigestValue(TAG_DIGESTVALUE);
+ OUString tag_SignatureValue(TAG_SIGNATUREVALUE);
+ OUString tag_KeyInfo(TAG_KEYINFO);
+ OUString tag_X509Data(TAG_X509DATA);
+ OUString tag_X509IssuerSerial(TAG_X509ISSUERSERIAL);
+ OUString tag_X509IssuerName(TAG_X509ISSUERNAME);
+ OUString tag_X509SerialNumber(TAG_X509SERIALNUMBER);
+ OUString tag_X509Certificate(TAG_X509CERTIFICATE);
+ OUString tag_Object(TAG_OBJECT);
+ OUString tag_SignatureProperties(TAG_SIGNATUREPROPERTIES);
+ OUString tag_SignatureProperty(TAG_SIGNATUREPROPERTY);
+ OUString tag_Date(TAG_DATE);
const SignatureReferenceInformations& vReferenceInfors = signatureInfo.vSignatureReferenceInfors;
SvXMLAttributeList *pAttributeList;
@@ -924,14 +924,14 @@ void XSecController::exportSignature(
*/
pAttributeList = new SvXMLAttributeList();
pAttributeList->AddAttribute(
- rtl::OUString(ATTR_XMLNS),
- rtl::OUString(NS_XMLDSIG));
+ OUString(ATTR_XMLNS),
+ OUString(NS_XMLDSIG));
if (!signatureInfo.ouSignatureId.isEmpty())
{
pAttributeList->AddAttribute(
- rtl::OUString(ATTR_ID),
- rtl::OUString(signatureInfo.ouSignatureId));
+ OUString(ATTR_ID),
+ OUString(signatureInfo.ouSignatureId));
}
xDocumentHandler->startElement( tag_Signature, cssu::Reference< cssxs::XAttributeList > (pAttributeList));
@@ -944,16 +944,16 @@ void XSecController::exportSignature(
/* Write CanonicalizationMethod element */
pAttributeList = new SvXMLAttributeList();
pAttributeList->AddAttribute(
- rtl::OUString(ATTR_ALGORITHM),
- rtl::OUString(ALGO_C14N));
+ OUString(ATTR_ALGORITHM),
+ OUString(ALGO_C14N));
xDocumentHandler->startElement( tag_CanonicalizationMethod, cssu::Reference< cssxs::XAttributeList > (pAttributeList) );
xDocumentHandler->endElement( tag_CanonicalizationMethod );
/* Write SignatureMethod element */
pAttributeList = new SvXMLAttributeList();
pAttributeList->AddAttribute(
- rtl::OUString(ATTR_ALGORITHM),
- rtl::OUString(ALGO_RSASHA1));
+ OUString(ATTR_ALGORITHM),
+ OUString(ALGO_RSASHA1));
xDocumentHandler->startElement( tag_SignatureMethod, cssu::Reference< cssxs::XAttributeList > (pAttributeList) );
xDocumentHandler->endElement( tag_SignatureMethod );
@@ -972,7 +972,7 @@ void XSecController::exportSignature(
*/
{
pAttributeList->AddAttribute(
- rtl::OUString(ATTR_URI),
+ OUString(ATTR_URI),
refInfor.ouURI);
}
else
@@ -981,8 +981,8 @@ void XSecController::exportSignature(
*/
{
pAttributeList->AddAttribute(
- rtl::OUString(ATTR_URI),
- rtl::OUString(CHAR_FRAGMENT)+refInfor.ouURI);
+ OUString(ATTR_URI),
+ OUString(CHAR_FRAGMENT)+refInfor.ouURI);
}
xDocumentHandler->startElement( tag_Reference, cssu::Reference< cssxs::XAttributeList > (pAttributeList) );
@@ -999,8 +999,8 @@ void XSecController::exportSignature(
{
pAttributeList = new SvXMLAttributeList();
pAttributeList->AddAttribute(
- rtl::OUString(ATTR_ALGORITHM),
- rtl::OUString(ALGO_C14N));
+ OUString(ATTR_ALGORITHM),
+ OUString(ALGO_C14N));
xDocumentHandler->startElement(
tag_Transform,
cssu::Reference< cssxs::XAttributeList > (pAttributeList) );
@@ -1012,8 +1012,8 @@ void XSecController::exportSignature(
/* Write DigestMethod element */
pAttributeList = new SvXMLAttributeList();
pAttributeList->AddAttribute(
- rtl::OUString(ATTR_ALGORITHM),
- rtl::OUString(ALGO_XMLDSIGSHA1));
+ OUString(ATTR_ALGORITHM),
+ OUString(ALGO_XMLDSIGSHA1));
xDocumentHandler->startElement(
tag_DigestMethod,
cssu::Reference< cssxs::XAttributeList > (pAttributeList) );
@@ -1096,11 +1096,11 @@ void XSecController::exportSignature(
/* Write SignatureProperty element */
pAttributeList = new SvXMLAttributeList();
pAttributeList->AddAttribute(
- rtl::OUString(ATTR_ID),
+ OUString(ATTR_ID),
signatureInfo.ouPropertyId);
pAttributeList->AddAttribute(
- rtl::OUString(ATTR_TARGET),
- rtl::OUString(CHAR_FRAGMENT)+signatureInfo.ouSignatureId);
+ OUString(ATTR_TARGET),
+ OUString(CHAR_FRAGMENT)+signatureInfo.ouSignatureId);
xDocumentHandler->startElement(
tag_SignatureProperty,
cssu::Reference< cssxs::XAttributeList > (pAttributeList));
@@ -1109,18 +1109,18 @@ void XSecController::exportSignature(
pAttributeList = new SvXMLAttributeList();
pAttributeList->AddAttribute(
- rtl::OUString(ATTR_XMLNS)
- +rtl::OUString(":")
- +rtl::OUString(NSTAG_DC),
- rtl::OUString(NS_DC));
+ OUString(ATTR_XMLNS)
+ +OUString(":")
+ +OUString(NSTAG_DC),
+ OUString(NS_DC));
xDocumentHandler->startElement(
- rtl::OUString(NSTAG_DC)
- +rtl::OUString(":")
+ OUString(NSTAG_DC)
+ +OUString(":")
+tag_Date,
cssu::Reference< cssxs::XAttributeList > (pAttributeList));
- ::rtl::OUStringBuffer buffer;
+ OUStringBuffer buffer;
//If the xml signature was already contained in the document,
//then we use the original date and time string, rather then the
//converted one. When the original string is converted to the DateTime
@@ -1136,8 +1136,8 @@ void XSecController::exportSignature(
xDocumentHandler->characters( buffer.makeStringAndClear() );
xDocumentHandler->endElement(
- rtl::OUString(NSTAG_DC)
- +rtl::OUString(":")
+ OUString(NSTAG_DC)
+ +OUString(":")
+tag_Date);
}
xDocumentHandler->endElement( tag_SignatureProperty );
diff --git a/xmlsecurity/source/helper/xsecctl.hxx b/xmlsecurity/source/helper/xsecctl.hxx
index 207c36d2bda4..6014807de6bc 100644
--- a/xmlsecurity/source/helper/xsecctl.hxx
+++ b/xmlsecurity/source/helper/xsecctl.hxx
@@ -133,7 +133,7 @@ public:
xReferenceResolvedListener = xListener;
}
- void addReference( sal_Int32 type, rtl::OUString uri, sal_Int32 keeperId )
+ void addReference( sal_Int32 type, OUString uri, sal_Int32 keeperId )
{
signatureInfor.vSignatureReferenceInfors.push_back(
SignatureReferenceInformation(type, uri));
@@ -345,9 +345,9 @@ private:
/*
* Common methods
*/
- sal_Bool convertNumber( sal_Int32& rValue, const rtl::OUString& rString, sal_Int32 nMin, sal_Int32 nMax );
- void convertDateTime( ::rtl::OUStringBuffer& rBuffer, const com::sun::star::util::DateTime& rDateTime );
- sal_Bool convertDateTime( com::sun::star::util::DateTime& rDateTime, const ::rtl::OUString& rString );
+ sal_Bool convertNumber( sal_Int32& rValue, const OUString& rString, sal_Int32 nMin, sal_Int32 nMax );
+ void convertDateTime( OUStringBuffer& rBuffer, const com::sun::star::util::DateTime& rDateTime );
+ sal_Bool convertDateTime( com::sun::star::util::DateTime& rDateTime, const OUString& rString );
void createXSecComponent( );
int findSignatureInfor( sal_Int32 nSecurityId ) const;
@@ -357,14 +357,14 @@ private:
void initializeSAXChain();
com::sun::star::uno::Reference<
- com::sun::star::io::XInputStream > getObjectInputStream( const rtl::OUString& objectURL );
+ com::sun::star::io::XInputStream > getObjectInputStream( const OUString& objectURL );
//sal_Int32 getFastPropertyIndex(sal_Int32 nHandle) const;
/*
* For signature generation
*/
- rtl::OUString createId();
+ OUString createId();
com::sun::star::uno::Reference<
com::sun::star::xml::crypto::sax::XReferenceResolvedListener > prepareSignatureToWrite(
InternalSignatureInformation& signatureInfo );
@@ -373,22 +373,22 @@ private:
* For signature verification
*/
void addSignature();
- void addReference( const rtl::OUString& ouUri);
+ void addReference( const OUString& ouUri);
void addStreamReference(
- const rtl::OUString& ouUri,
+ const OUString& ouUri,
bool isBinary );
void setReferenceCount() const;
- void setX509IssuerName( rtl::OUString& ouX509IssuerName );
- void setX509SerialNumber( rtl::OUString& ouX509SerialNumber );
- void setX509Certificate( rtl::OUString& ouX509Certificate );
- void setSignatureValue( rtl::OUString& ouSignatureValue );
- void setDigestValue( rtl::OUString& ouDigestValue );
+ void setX509IssuerName( OUString& ouX509IssuerName );
+ void setX509SerialNumber( OUString& ouX509SerialNumber );
+ void setX509Certificate( OUString& ouX509Certificate );
+ void setSignatureValue( OUString& ouSignatureValue );
+ void setDigestValue( OUString& ouDigestValue );
- void setDate( rtl::OUString& ouDate );
+ void setDate( OUString& ouDate );
- void setId( rtl::OUString& ouId );
- void setPropertyId( rtl::OUString& ouPropertyId );
+ void setId( OUString& ouId );
+ void setPropertyId( OUString& ouPropertyId );
com::sun::star::uno::Reference<
com::sun::star::xml::crypto::sax::XReferenceResolvedListener > prepareSignatureToRead(
@@ -428,7 +428,7 @@ public:
/*
* For signature generation
*/
- void signAStream( sal_Int32 securityId, const rtl::OUString& uri, const rtl::OUString& objectURL, sal_Bool isBinary);
+ void signAStream( sal_Int32 securityId, const OUString& uri, const OUString& objectURL, sal_Bool isBinary);
/** sets data that describes the certificate.
@@ -451,16 +451,16 @@ public:
*/
void setX509Certificate(
sal_Int32 nSecurityId,
- const rtl::OUString& ouX509IssuerName,
- const rtl::OUString& ouX509SerialNumber,
- const rtl::OUString& ouX509Cert);
+ const OUString& ouX509IssuerName,
+ const OUString& ouX509SerialNumber,
+ const OUString& ouX509Cert);
// see the other setX509Certifcate function
void setX509Certificate(
sal_Int32 nSecurityId,
const sal_Int32 nSecurityEnvironmentIndex,
- const rtl::OUString& ouX509IssuerName,
- const rtl::OUString& ouX509SerialNumber,
- const rtl::OUString& ouX509Cert);
+ const OUString& ouX509IssuerName,
+ const OUString& ouX509SerialNumber,
+ const OUString& ouX509Cert);
void setDate(
sal_Int32 nSecurityId,
@@ -474,7 +474,7 @@ public:
/*
* For signature verification
*/
- void collectToVerify( const rtl::OUString& referenceId );
+ void collectToVerify( const OUString& referenceId );
void addSignature( sal_Int32 nSignatureId );
com::sun::star::uno::Reference< com::sun::star::xml::sax::XDocumentHandler > createSignatureReader();
void releaseSignatureReader();
diff --git a/xmlsecurity/source/helper/xsecparser.cxx b/xmlsecurity/source/helper/xsecparser.cxx
index 547ec823580a..85557a149831 100644
--- a/xmlsecurity/source/helper/xsecparser.cxx
+++ b/xmlsecurity/source/helper/xsecparser.cxx
@@ -38,15 +38,15 @@ XSecParser::XSecParser(
{
}
-rtl::OUString XSecParser::getIdAttr(const cssu::Reference< cssxs::XAttributeList >& xAttribs )
+OUString XSecParser::getIdAttr(const cssu::Reference< cssxs::XAttributeList >& xAttribs )
{
- rtl::OUString ouIdAttr = xAttribs->getValueByName(
- rtl::OUString(RTL_ASCII_USTRINGPARAM("id")));
+ OUString ouIdAttr = xAttribs->getValueByName(
+ OUString(RTL_ASCII_USTRINGPARAM("id")));
if (ouIdAttr == NULL)
{
ouIdAttr = xAttribs->getValueByName(
- rtl::OUString(RTL_ASCII_USTRINGPARAM("Id")));
+ OUString(RTL_ASCII_USTRINGPARAM("Id")));
}
return ouIdAttr;
@@ -81,19 +81,19 @@ void SAL_CALL XSecParser::endDocument( )
}
void SAL_CALL XSecParser::startElement(
- const rtl::OUString& aName,
+ const OUString& aName,
const cssu::Reference< cssxs::XAttributeList >& xAttribs )
throw (cssxs::SAXException, cssu::RuntimeException)
{
try
{
- rtl::OUString ouIdAttr = getIdAttr(xAttribs);
+ OUString ouIdAttr = getIdAttr(xAttribs);
if (ouIdAttr != NULL)
{
m_pXSecController->collectToVerify( ouIdAttr );
}
- if ( aName == rtl::OUString(RTL_ASCII_USTRINGPARAM(TAG_SIGNATURE)) )
+ if ( aName == OUString(RTL_ASCII_USTRINGPARAM(TAG_SIGNATURE)) )
{
m_pXSecController->addSignature();
if (ouIdAttr != NULL)
@@ -101,9 +101,9 @@ void SAL_CALL XSecParser::startElement(
m_pXSecController->setId( ouIdAttr );
}
}
- else if ( aName == rtl::OUString(RTL_ASCII_USTRINGPARAM(TAG_REFERENCE)) )
+ else if ( aName == OUString(RTL_ASCII_USTRINGPARAM(TAG_REFERENCE)) )
{
- rtl::OUString ouUri = xAttribs->getValueByName(rtl::OUString(RTL_ASCII_USTRINGPARAM(ATTR_URI)));
+ OUString ouUri = xAttribs->getValueByName(OUString(RTL_ASCII_USTRINGPARAM(ATTR_URI)));
DBG_ASSERT( ouUri != NULL, "URI == NULL" );
if (ouUri.startsWith(CHAR_FRAGMENT))
@@ -122,13 +122,13 @@ void SAL_CALL XSecParser::startElement(
m_bReferenceUnresolved = true;
}
}
- else if (aName == rtl::OUString(RTL_ASCII_USTRINGPARAM(TAG_TRANSFORM)))
+ else if (aName == OUString(RTL_ASCII_USTRINGPARAM(TAG_TRANSFORM)))
{
if ( m_bReferenceUnresolved )
{
- rtl::OUString ouAlgorithm = xAttribs->getValueByName(rtl::OUString(RTL_ASCII_USTRINGPARAM(ATTR_ALGORITHM)));
+ OUString ouAlgorithm = xAttribs->getValueByName(OUString(RTL_ASCII_USTRINGPARAM(ATTR_ALGORITHM)));
- if (ouAlgorithm != NULL && ouAlgorithm == rtl::OUString(RTL_ASCII_USTRINGPARAM(ALGO_C14N)))
+ if (ouAlgorithm != NULL && ouAlgorithm == OUString(RTL_ASCII_USTRINGPARAM(ALGO_C14N)))
/*
* a xml stream
*/
@@ -138,43 +138,43 @@ void SAL_CALL XSecParser::startElement(
}
}
}
- else if (aName == rtl::OUString(RTL_ASCII_USTRINGPARAM(TAG_X509ISSUERNAME)))
+ else if (aName == OUString(RTL_ASCII_USTRINGPARAM(TAG_X509ISSUERNAME)))
{
- m_ouX509IssuerName = rtl::OUString();
+ m_ouX509IssuerName = OUString();
m_bInX509IssuerName = true;
}
- else if (aName == rtl::OUString(RTL_ASCII_USTRINGPARAM(TAG_X509SERIALNUMBER)))
+ else if (aName == OUString(RTL_ASCII_USTRINGPARAM(TAG_X509SERIALNUMBER)))
{
- m_ouX509SerialNumber = rtl::OUString();
+ m_ouX509SerialNumber = OUString();
m_bInX509SerialNumber = true;
}
- else if (aName == rtl::OUString(RTL_ASCII_USTRINGPARAM(TAG_X509CERTIFICATE)))
+ else if (aName == OUString(RTL_ASCII_USTRINGPARAM(TAG_X509CERTIFICATE)))
{
- m_ouX509Certificate = rtl::OUString();
+ m_ouX509Certificate = OUString();
m_bInX509Certificate = true;
}
- else if (aName == rtl::OUString(RTL_ASCII_USTRINGPARAM(TAG_SIGNATUREVALUE)))
+ else if (aName == OUString(RTL_ASCII_USTRINGPARAM(TAG_SIGNATUREVALUE)))
{
- m_ouSignatureValue = rtl::OUString();
+ m_ouSignatureValue = OUString();
m_bInSignatureValue = true;
}
- else if (aName == rtl::OUString(RTL_ASCII_USTRINGPARAM(TAG_DIGESTVALUE)))
+ else if (aName == OUString(RTL_ASCII_USTRINGPARAM(TAG_DIGESTVALUE)))
{
- m_ouDigestValue = rtl::OUString();
+ m_ouDigestValue = OUString();
m_bInDigestValue = true;
}
- else if ( aName == rtl::OUString(RTL_ASCII_USTRINGPARAM(TAG_SIGNATUREPROPERTY)) )
+ else if ( aName == OUString(RTL_ASCII_USTRINGPARAM(TAG_SIGNATUREPROPERTY)) )
{
if (ouIdAttr != NULL)
{
m_pXSecController->setPropertyId( ouIdAttr );
}
}
- else if (aName == rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(NSTAG_DC))
- +rtl::OUString(":")
- +rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(TAG_DATE)))
+ else if (aName == OUString(RTL_CONSTASCII_USTRINGPARAM(NSTAG_DC))
+ +OUString(":")
+ +OUString(RTL_CONSTASCII_USTRINGPARAM(TAG_DATE)))
{
- m_ouDate = rtl::OUString();
+ m_ouDate = OUString();
m_bInDate = true;
}
@@ -187,28 +187,28 @@ void SAL_CALL XSecParser::startElement(
{//getCaughtException MUST be the first line in the catch block
cssu::Any exc = cppu::getCaughtException();
throw cssxs::SAXException(
- rtl::OUString(
+ OUString(
"xmlsecurity: Exception in XSecParser::startElement"),
0, exc);
}
catch (...)
{
throw cssxs::SAXException(
- rtl::OUString("xmlsecurity: unexpected exception in XSecParser::startElement"), 0,
+ OUString("xmlsecurity: unexpected exception in XSecParser::startElement"), 0,
cssu::Any());
}
}
-void SAL_CALL XSecParser::endElement( const rtl::OUString& aName )
+void SAL_CALL XSecParser::endElement( const OUString& aName )
throw (cssxs::SAXException, cssu::RuntimeException)
{
try
{
- if (aName == rtl::OUString(RTL_ASCII_USTRINGPARAM(TAG_DIGESTVALUE)))
+ if (aName == OUString(RTL_ASCII_USTRINGPARAM(TAG_DIGESTVALUE)))
{
m_bInDigestValue = false;
}
- else if ( aName == rtl::OUString(RTL_ASCII_USTRINGPARAM(TAG_REFERENCE)) )
+ else if ( aName == OUString(RTL_ASCII_USTRINGPARAM(TAG_REFERENCE)) )
{
if ( m_bReferenceUnresolved )
/*
@@ -221,33 +221,33 @@ void SAL_CALL XSecParser::endElement( const rtl::OUString& aName )
m_pXSecController->setDigestValue( m_ouDigestValue );
}
- else if ( aName == rtl::OUString(RTL_ASCII_USTRINGPARAM(TAG_SIGNEDINFO)) )
+ else if ( aName == OUString(RTL_ASCII_USTRINGPARAM(TAG_SIGNEDINFO)) )
{
m_pXSecController->setReferenceCount();
}
- else if ( aName == rtl::OUString(RTL_ASCII_USTRINGPARAM(TAG_SIGNATUREVALUE)) )
+ else if ( aName == OUString(RTL_ASCII_USTRINGPARAM(TAG_SIGNATUREVALUE)) )
{
m_pXSecController->setSignatureValue( m_ouSignatureValue );
m_bInSignatureValue = false;
}
- else if (aName == rtl::OUString(RTL_ASCII_USTRINGPARAM(TAG_X509ISSUERNAME)))
+ else if (aName == OUString(RTL_ASCII_USTRINGPARAM(TAG_X509ISSUERNAME)))
{
m_pXSecController->setX509IssuerName( m_ouX509IssuerName );
m_bInX509IssuerName = false;
}
- else if (aName == rtl::OUString(RTL_ASCII_USTRINGPARAM(TAG_X509SERIALNUMBER)))
+ else if (aName == OUString(RTL_ASCII_USTRINGPARAM(TAG_X509SERIALNUMBER)))
{
m_pXSecController->setX509SerialNumber( m_ouX509SerialNumber );
m_bInX509SerialNumber = false;
}
- else if (aName == rtl::OUString(RTL_ASCII_USTRINGPARAM(TAG_X509CERTIFICATE)))
+ else if (aName == OUString(RTL_ASCII_USTRINGPARAM(TAG_X509CERTIFICATE)))
{
m_pXSecController->setX509Certificate( m_ouX509Certificate );
m_bInX509Certificate = false;
}
- else if (aName == rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(NSTAG_DC))
- +rtl::OUString(":")
- +rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(TAG_DATE)))
+ else if (aName == OUString(RTL_CONSTASCII_USTRINGPARAM(NSTAG_DC))
+ +OUString(":")
+ +OUString(RTL_CONSTASCII_USTRINGPARAM(TAG_DATE)))
{
m_pXSecController->setDate( m_ouDate );
m_bInDate = false;
@@ -262,19 +262,19 @@ void SAL_CALL XSecParser::endElement( const rtl::OUString& aName )
{//getCaughtException MUST be the first line in the catch block
cssu::Any exc = cppu::getCaughtException();
throw cssxs::SAXException(
- rtl::OUString(
+ OUString(
"xmlsecurity: Exception in XSecParser::endElement"),
0, exc);
}
catch (...)
{
throw cssxs::SAXException(
- rtl::OUString("xmlsecurity: unexpected exception in XSecParser::endElement"), 0,
+ OUString("xmlsecurity: unexpected exception in XSecParser::endElement"), 0,
cssu::Any());
}
}
-void SAL_CALL XSecParser::characters( const rtl::OUString& aChars )
+void SAL_CALL XSecParser::characters( const OUString& aChars )
throw (cssxs::SAXException, cssu::RuntimeException)
{
if (m_bInX509IssuerName)
@@ -308,7 +308,7 @@ void SAL_CALL XSecParser::characters( const rtl::OUString& aChars )
}
}
-void SAL_CALL XSecParser::ignorableWhitespace( const rtl::OUString& aWhitespaces )
+void SAL_CALL XSecParser::ignorableWhitespace( const OUString& aWhitespaces )
throw (cssxs::SAXException, cssu::RuntimeException)
{
if (m_xNextHandler.is())
@@ -317,7 +317,7 @@ void SAL_CALL XSecParser::ignorableWhitespace( const rtl::OUString& aWhitespaces
}
}
-void SAL_CALL XSecParser::processingInstruction( const rtl::OUString& aTarget, const rtl::OUString& aData )
+void SAL_CALL XSecParser::processingInstruction( const OUString& aTarget, const OUString& aData )
throw (cssxs::SAXException, cssu::RuntimeException)
{
if (m_xNextHandler.is())
diff --git a/xmlsecurity/source/helper/xsecparser.hxx b/xmlsecurity/source/helper/xsecparser.hxx
index f5d3fae39f8a..f37df23a8a60 100644
--- a/xmlsecurity/source/helper/xsecparser.hxx
+++ b/xmlsecurity/source/helper/xsecparser.hxx
@@ -58,12 +58,12 @@ private:
* the following members are used to reserve the signature information,
* including X509IssuerName, X509SerialNumber, and X509Certificate,etc.
*/
- rtl::OUString m_ouX509IssuerName;
- rtl::OUString m_ouX509SerialNumber;
- rtl::OUString m_ouX509Certificate;
- rtl::OUString m_ouDigestValue;
- rtl::OUString m_ouSignatureValue;
- rtl::OUString m_ouDate;
+ OUString m_ouX509IssuerName;
+ OUString m_ouX509SerialNumber;
+ OUString m_ouX509Certificate;
+ OUString m_ouDigestValue;
+ OUString m_ouSignatureValue;
+ OUString m_ouDate;
/*
* whether inside a particular element
@@ -93,11 +93,11 @@ private:
* only after the Transforms element is read in, so we have to reserve the reference's
* URI when the startElement event is met.
*/
- rtl::OUString m_currentReferenceURI;
+ OUString m_currentReferenceURI;
bool m_bReferenceUnresolved;
private:
- rtl::OUString getIdAttr(const com::sun::star::uno::Reference<
+ OUString getIdAttr(const com::sun::star::uno::Reference<
com::sun::star::xml::sax::XAttributeList >& xAttribs );
public:
@@ -116,23 +116,23 @@ public:
throw (com::sun::star::xml::sax::SAXException, com::sun::star::uno::RuntimeException);
virtual void SAL_CALL startElement(
- const rtl::OUString& aName,
+ const OUString& aName,
const com::sun::star::uno::Reference<
com::sun::star::xml::sax::XAttributeList >& xAttribs )
throw (com::sun::star::xml::sax::SAXException, com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL endElement( const rtl::OUString& aName )
+ virtual void SAL_CALL endElement( const OUString& aName )
throw (com::sun::star::xml::sax::SAXException, com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL characters( const rtl::OUString& aChars )
+ virtual void SAL_CALL characters( const OUString& aChars )
throw (com::sun::star::xml::sax::SAXException, com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL ignorableWhitespace( const rtl::OUString& aWhitespaces )
+ virtual void SAL_CALL ignorableWhitespace( const OUString& aWhitespaces )
throw (com::sun::star::xml::sax::SAXException, com::sun::star::uno::RuntimeException);
virtual void SAL_CALL processingInstruction(
- const rtl::OUString& aTarget,
- const rtl::OUString& aData )
+ const OUString& aTarget,
+ const OUString& aData )
throw (com::sun::star::xml::sax::SAXException, com::sun::star::uno::RuntimeException);
virtual void SAL_CALL setDocumentLocator(
diff --git a/xmlsecurity/source/helper/xsecsign.cxx b/xmlsecurity/source/helper/xsecsign.cxx
index 431c26153891..4fbfb40b2864 100644
--- a/xmlsecurity/source/helper/xsecsign.cxx
+++ b/xmlsecurity/source/helper/xsecsign.cxx
@@ -41,7 +41,7 @@ namespace cssxs = com::sun::star::xml::sax;
#define SIGNATURECREATOR_COMPONENT "com.sun.star.xml.crypto.sax.SignatureCreator"
/* protected: for signature generation */
-rtl::OUString XSecController::createId()
+OUString XSecController::createId()
{
cssu::Sequence< sal_Int8 > aSeq( 16 );
rtl_createUuid ((sal_uInt8 *)aSeq.getArray(), 0, sal_True);
@@ -53,7 +53,7 @@ rtl::OUString XSecController::createId()
length += sprintf(str+length, "%04x", (unsigned char)aSeq[i]);
}
- return rtl::OUString::createFromAscii(str);
+ return OUString::createFromAscii(str);
}
cssu::Reference< cssxc::sax::XReferenceResolvedListener > XSecController::prepareSignatureToWrite(
@@ -76,15 +76,15 @@ cssu::Reference< cssxc::sax::XReferenceResolvedListener > XSecController::prepar
cssu::Reference< cssl::XMultiComponentFactory > xMCF( mxCtx->getServiceManager() );
xReferenceResolvedListener = cssu::Reference< cssxc::sax::XReferenceResolvedListener >(
xMCF->createInstanceWithContext(
- rtl::OUString(SIGNATURECREATOR_COMPONENT), mxCtx),
+ OUString(SIGNATURECREATOR_COMPONENT), mxCtx),
cssu::UNO_QUERY);
cssu::Reference<cssl::XInitialization> xInitialization(xReferenceResolvedListener, cssu::UNO_QUERY);
cssu::Sequence<cssu::Any> args(5);
- args[0] = cssu::makeAny(rtl::OUString::valueOf(nSecurityId));
+ args[0] = cssu::makeAny(OUString::valueOf(nSecurityId));
args[1] = cssu::makeAny(m_xSAXEventKeeper);
- args[2] = cssu::makeAny(rtl::OUString::valueOf(nIdOfSignatureElementCollector));
+ args[2] = cssu::makeAny(OUString::valueOf(nIdOfSignatureElementCollector));
//i39448 : for nss, the internal module is used for signing, which needs to be improved later
sal_Int32 nEnvIndex = internalSignatureInfor.signatureInfor.nSecurityEnvironmentIndex;
@@ -175,15 +175,15 @@ cssu::Reference< cssxc::sax::XReferenceResolvedListener > XSecController::prepar
for(i=0; i<size; ++i)
{
SignatureReferenceInformation& refInfor = vReferenceInfors[i];
- refInfor.ouDigestValue = rtl::OUString(CHAR_BLANK);
+ refInfor.ouDigestValue = OUString(CHAR_BLANK);
}
- internalSignatureInfor.signatureInfor.ouSignatureValue = rtl::OUString(CHAR_BLANK);
+ internalSignatureInfor.signatureInfor.ouSignatureValue = OUString(CHAR_BLANK);
return xReferenceResolvedListener;
}
-void XSecController::signAStream( sal_Int32 securityId, const rtl::OUString& uri, const rtl::OUString& /*objectURL*/, sal_Bool isBinary)
+void XSecController::signAStream( sal_Int32 securityId, const OUString& uri, const OUString& /*objectURL*/, sal_Bool isBinary)
{
sal_Int32 type = ((isBinary==sal_True)?TYPE_BINARYSTREAM_REFERENCE:TYPE_XMLSTREAM_REFERENCE);
@@ -203,9 +203,9 @@ void XSecController::signAStream( sal_Int32 securityId, const rtl::OUString& uri
void XSecController::setX509Certificate(
sal_Int32 nSecurityId,
- const rtl::OUString& ouX509IssuerName,
- const rtl::OUString& ouX509SerialNumber,
- const rtl::OUString& ouX509Cert)
+ const OUString& ouX509IssuerName,
+ const OUString& ouX509SerialNumber,
+ const OUString& ouX509Cert)
{
setX509Certificate(nSecurityId, -1, ouX509IssuerName, ouX509SerialNumber, ouX509Cert);
}
@@ -213,9 +213,9 @@ void XSecController::setX509Certificate(
void XSecController::setX509Certificate(
sal_Int32 nSecurityId,
const sal_Int32 nSecurityEnvironmentIndex,
- const rtl::OUString& ouX509IssuerName,
- const rtl::OUString& ouX509SerialNumber,
- const rtl::OUString& ouX509Cert)
+ const OUString& ouX509IssuerName,
+ const OUString& ouX509SerialNumber,
+ const OUString& ouX509Cert)
{
int index = findSignatureInfor( nSecurityId );
diff --git a/xmlsecurity/source/helper/xsecverify.cxx b/xmlsecurity/source/helper/xsecverify.cxx
index 1b06ec843083..3b559ebe0022 100644
--- a/xmlsecurity/source/helper/xsecverify.cxx
+++ b/xmlsecurity/source/helper/xsecverify.cxx
@@ -61,15 +61,15 @@ cssu::Reference< cssxc::sax::XReferenceResolvedListener > XSecController::prepar
cssu::Reference< cssl::XMultiComponentFactory > xMCF( mxCtx->getServiceManager() );
xReferenceResolvedListener = cssu::Reference< cssxc::sax::XReferenceResolvedListener >(
xMCF->createInstanceWithContext(
- rtl::OUString( SIGNATUREVERIFIER_COMPONENT ), mxCtx),
+ OUString( SIGNATUREVERIFIER_COMPONENT ), mxCtx),
cssu::UNO_QUERY);
cssu::Reference<cssl::XInitialization> xInitialization(xReferenceResolvedListener, cssu::UNO_QUERY);
cssu::Sequence<cssu::Any> args(5);
- args[0] = cssu::makeAny(rtl::OUString::valueOf(nSecurityId));
+ args[0] = cssu::makeAny(OUString::valueOf(nSecurityId));
args[1] = cssu::makeAny(m_xSAXEventKeeper);
- args[2] = cssu::makeAny(rtl::OUString::valueOf(nIdOfSignatureElementCollector));
+ args[2] = cssu::makeAny(OUString::valueOf(nIdOfSignatureElementCollector));
args[3] = cssu::makeAny(m_xSecurityContext);
args[4] = cssu::makeAny(m_xXMLSignature);
xInitialization->initialize(args);
@@ -111,7 +111,7 @@ void XSecController::addSignature()
m_vInternalSignatureInformations.push_back( isi );
}
-void XSecController::addReference( const rtl::OUString& ouUri)
+void XSecController::addReference( const OUString& ouUri)
{
if (m_vInternalSignatureInformations.empty())
{
@@ -123,7 +123,7 @@ void XSecController::addReference( const rtl::OUString& ouUri)
}
void XSecController::addStreamReference(
- const rtl::OUString& ouUri,
+ const OUString& ouUri,
bool isBinary )
{
sal_Int32 type = (isBinary?TYPE_BINARYSTREAM_REFERENCE:TYPE_XMLSTREAM_REFERENCE);
@@ -188,7 +188,7 @@ void XSecController::setReferenceCount() const
}
}
-void XSecController::setX509IssuerName( rtl::OUString& ouX509IssuerName )
+void XSecController::setX509IssuerName( OUString& ouX509IssuerName )
{
if (m_vInternalSignatureInformations.empty())
{
@@ -199,7 +199,7 @@ void XSecController::setX509IssuerName( rtl::OUString& ouX509IssuerName )
isi.signatureInfor.ouX509IssuerName = ouX509IssuerName;
}
-void XSecController::setX509SerialNumber( rtl::OUString& ouX509SerialNumber )
+void XSecController::setX509SerialNumber( OUString& ouX509SerialNumber )
{
if (m_vInternalSignatureInformations.empty())
{
@@ -210,7 +210,7 @@ void XSecController::setX509SerialNumber( rtl::OUString& ouX509SerialNumber )
isi.signatureInfor.ouX509SerialNumber = ouX509SerialNumber;
}
-void XSecController::setX509Certificate( rtl::OUString& ouX509Certificate )
+void XSecController::setX509Certificate( OUString& ouX509Certificate )
{
if (m_vInternalSignatureInformations.empty())
{
@@ -221,7 +221,7 @@ void XSecController::setX509Certificate( rtl::OUString& ouX509Certificate )
isi.signatureInfor.ouX509Certificate = ouX509Certificate;
}
-void XSecController::setSignatureValue( rtl::OUString& ouSignatureValue )
+void XSecController::setSignatureValue( OUString& ouSignatureValue )
{
if (m_vInternalSignatureInformations.empty())
{
@@ -232,7 +232,7 @@ void XSecController::setSignatureValue( rtl::OUString& ouSignatureValue )
isi.signatureInfor.ouSignatureValue = ouSignatureValue;
}
-void XSecController::setDigestValue( rtl::OUString& ouDigestValue )
+void XSecController::setDigestValue( OUString& ouDigestValue )
{
if (m_vInternalSignatureInformations.empty())
{
@@ -250,7 +250,7 @@ void XSecController::setDigestValue( rtl::OUString& ouDigestValue )
reference.ouDigestValue = ouDigestValue;
}
-void XSecController::setDate( rtl::OUString& ouDate )
+void XSecController::setDate( OUString& ouDate )
{
if (m_vInternalSignatureInformations.empty())
{
@@ -262,7 +262,7 @@ void XSecController::setDate( rtl::OUString& ouDate )
isi.signatureInfor.ouDateTime = ouDate;
}
-void XSecController::setId( rtl::OUString& ouId )
+void XSecController::setId( OUString& ouId )
{
if (m_vInternalSignatureInformations.empty())
{
@@ -273,7 +273,7 @@ void XSecController::setId( rtl::OUString& ouId )
isi.signatureInfor.ouSignatureId = ouId;
}
-void XSecController::setPropertyId( rtl::OUString& ouPropertyId )
+void XSecController::setPropertyId( OUString& ouPropertyId )
{
if (m_vInternalSignatureInformations.empty())
{
@@ -285,7 +285,7 @@ void XSecController::setPropertyId( rtl::OUString& ouPropertyId )
}
/* public: for signature verify */
-void XSecController::collectToVerify( const rtl::OUString& referenceId )
+void XSecController::collectToVerify( const OUString& referenceId )
{
/* DBG_ASSERT( m_xSAXEventKeeper.is(), "the SAXEventKeeper is NULL" ); */