diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-12-18 13:41:18 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-12-18 14:12:39 +0100 |
commit | 8d487ceba1995b5831755bb5b37a82afc2125c0f (patch) | |
tree | 1f30ab9fbc09f48b9038ae2d97f2ae80f9666d52 /xmlsecurity/source/helper | |
parent | 05575c31e1f962636125ff8c42c3e2409a9edb6c (diff) |
xmlsecurity: Use appropriate OUString functions on string constants
Change-Id: I18370f6203455cf7568e48e49b7093d114656619
Diffstat (limited to 'xmlsecurity/source/helper')
-rw-r--r-- | xmlsecurity/source/helper/xmlsignaturehelper.cxx | 4 | ||||
-rw-r--r-- | xmlsecurity/source/helper/xsecctl.cxx | 16 | ||||
-rw-r--r-- | xmlsecurity/source/helper/xsecparser.cxx | 2 | ||||
-rw-r--r-- | xmlsecurity/source/helper/xsecsign.cxx | 4 |
4 files changed, 10 insertions, 16 deletions
diff --git a/xmlsecurity/source/helper/xmlsignaturehelper.cxx b/xmlsecurity/source/helper/xmlsignaturehelper.cxx index 931ded8c0265..4ffe2c27d243 100644 --- a/xmlsecurity/source/helper/xmlsignaturehelper.cxx +++ b/xmlsecurity/source/helper/xmlsignaturehelper.cxx @@ -162,9 +162,9 @@ uno::Reference<xml::sax::XWriter> XMLSignatureHelper::CreateDocumentHandlerWithH SvXMLAttributeList *pAttributeList = new SvXMLAttributeList(); OUString sNamespace; if (mbODFPre1_2) - sNamespace = OUString(NS_DOCUMENTSIGNATURES); + sNamespace = NS_DOCUMENTSIGNATURES; else - sNamespace = OUString(NS_DOCUMENTSIGNATURES_ODF_1_2); + sNamespace = NS_DOCUMENTSIGNATURES_ODF_1_2; pAttributeList->AddAttribute( OUString(ATTR_XMLNS), diff --git a/xmlsecurity/source/helper/xsecctl.cxx b/xmlsecurity/source/helper/xsecctl.cxx index 7fdddc37b0b9..9c65d88020a2 100644 --- a/xmlsecurity/source/helper/xsecctl.cxx +++ b/xmlsecurity/source/helper/xsecctl.cxx @@ -792,7 +792,7 @@ void XSecController::exportSignature( { pAttributeList->AddAttribute( OUString(ATTR_URI), - OUString(CHAR_FRAGMENT)+refInfor.ouURI); + CHAR_FRAGMENT+refInfor.ouURI); } xDocumentHandler->startElement( tag_Reference, cssu::Reference< cssxs::XAttributeList > (pAttributeList) ); @@ -910,7 +910,7 @@ void XSecController::exportSignature( signatureInfo.ouPropertyId); pAttributeList->AddAttribute( OUString(ATTR_TARGET), - OUString(CHAR_FRAGMENT)+signatureInfo.ouSignatureId); + CHAR_FRAGMENT+signatureInfo.ouSignatureId); xDocumentHandler->startElement( tag_SignatureProperty, cssu::Reference< cssxs::XAttributeList > (pAttributeList)); @@ -919,15 +919,11 @@ void XSecController::exportSignature( pAttributeList = new SvXMLAttributeList(); pAttributeList->AddAttribute( - OUString(ATTR_XMLNS) - + ":" - + OUString(NSTAG_DC), + ATTR_XMLNS ":" NSTAG_DC, OUString(NS_DC)); xDocumentHandler->startElement( - OUString(NSTAG_DC) - + ":" - + tag_Date, + NSTAG_DC ":" + tag_Date, cssu::Reference< cssxs::XAttributeList > (pAttributeList)); OUStringBuffer buffer; @@ -944,9 +940,7 @@ void XSecController::exportSignature( xDocumentHandler->characters( buffer.makeStringAndClear() ); xDocumentHandler->endElement( - OUString(NSTAG_DC) - + ":" - + tag_Date); + NSTAG_DC ":" + tag_Date); } xDocumentHandler->endElement( tag_SignatureProperty ); } diff --git a/xmlsecurity/source/helper/xsecparser.cxx b/xmlsecurity/source/helper/xsecparser.cxx index ca8edf92c774..750713fc1467 100644 --- a/xmlsecurity/source/helper/xsecparser.cxx +++ b/xmlsecurity/source/helper/xsecparser.cxx @@ -161,7 +161,7 @@ void SAL_CALL XSecParser::startElement( } else if (aName == TAG_DIGESTVALUE) { - m_ouDigestValue = ""; + m_ouDigestValue.clear(); m_bInDigestValue = true; } else if ( aName == TAG_SIGNATUREPROPERTY ) diff --git a/xmlsecurity/source/helper/xsecsign.cxx b/xmlsecurity/source/helper/xsecsign.cxx index b67933f931ec..ad706b04725a 100644 --- a/xmlsecurity/source/helper/xsecsign.cxx +++ b/xmlsecurity/source/helper/xsecsign.cxx @@ -175,10 +175,10 @@ cssu::Reference< cssxc::sax::XReferenceResolvedListener > XSecController::prepar for(i=0; i<size; ++i) { SignatureReferenceInformation& refInfor = vReferenceInfors[i]; - refInfor.ouDigestValue = OUString(CHAR_BLANK); + refInfor.ouDigestValue = CHAR_BLANK; } - internalSignatureInfor.signatureInfor.ouSignatureValue = OUString(CHAR_BLANK); + internalSignatureInfor.signatureInfor.ouSignatureValue = CHAR_BLANK; return xReferenceResolvedListener; } |