diff options
author | Tor Lillqvist <tml@collabora.com> | 2016-11-09 18:48:14 +0200 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2016-11-09 20:57:08 +0200 |
commit | 6bad5027dadaa3f99a33eb752d8477d7abe92137 (patch) | |
tree | 4c9c8679374758190dce1bc8db6cf679fd88e01e /xmlsecurity | |
parent | comphelper: also bump PDBKDF2 count for password-to-modify (diff) | |
download | core-6bad5027dadaa3f99a33eb752d8477d7abe92137.tar.gz core-6bad5027dadaa3f99a33eb752d8477d7abe92137.zip |
Don't use a class for what namespaces are for
Sure, using a namespace means we have to decorate each function with the
XMLSECURITY_DLLPUBLIC, but who cares.
Change-Id: If9a364d1be9c5f4cd02f3f146e8b01bd608b373e
Diffstat (limited to 'xmlsecurity')
-rw-r--r-- | xmlsecurity/inc/documentsignaturehelper.hxx | 46 |
1 files changed, 19 insertions, 27 deletions
diff --git a/xmlsecurity/inc/documentsignaturehelper.hxx b/xmlsecurity/inc/documentsignaturehelper.hxx index d2eb803b716a..8aa01241db15 100644 --- a/xmlsecurity/inc/documentsignaturehelper.hxx +++ b/xmlsecurity/inc/documentsignaturehelper.hxx @@ -36,17 +36,6 @@ namespace embed { class XStorage; } }}} - -/********************************************************** - DocumentSignatureHelper - - Helper class for signing and verifieng document signatures - - Functions: - 1. help to create a list of content to be signed/verified - - **********************************************************/ - enum class DocumentSignatureMode { Content, @@ -74,32 +63,35 @@ struct SignatureStreamHelper } }; - -class XMLSECURITY_DLLPUBLIC DocumentSignatureHelper +namespace DocumentSignatureHelper { -public: - - static SignatureStreamHelper OpenSignatureStream( + SignatureStreamHelper XMLSECURITY_DLLPUBLIC OpenSignatureStream( const css::uno::Reference < css::embed::XStorage >& rxStore, sal_Int32 nOpenMode, DocumentSignatureMode eDocSigMode ); - static std::vector< OUString > CreateElementList( + + std::vector< OUString > XMLSECURITY_DLLPUBLIC CreateElementList( const css::uno::Reference < css::embed::XStorage >& rxStore, DocumentSignatureMode eMode, const DocumentSignatureAlgorithm mode); - static bool isODFPre_1_2(const OUString & sODFVersion); - static bool isOOo3_2_Signature(const SignatureInformation & sigInfo); - static DocumentSignatureAlgorithm getDocumentAlgorithm( + + bool XMLSECURITY_DLLPUBLIC isODFPre_1_2(const OUString & sODFVersion); + bool XMLSECURITY_DLLPUBLIC isOOo3_2_Signature(const SignatureInformation & sigInfo); + + DocumentSignatureAlgorithm XMLSECURITY_DLLPUBLIC getDocumentAlgorithm( const OUString & sODFVersion, const SignatureInformation & sigInfo); - static bool checkIfAllFilesAreSigned( const ::std::vector< OUString > & sElementList, + + bool XMLSECURITY_DLLPUBLIC checkIfAllFilesAreSigned( const ::std::vector< OUString > & sElementList, const SignatureInformation & sigInfo, const DocumentSignatureAlgorithm alg); - static bool equalsReferenceUriManifestPath( + + bool XMLSECURITY_DLLPUBLIC equalsReferenceUriManifestPath( const OUString & rUri, const OUString & rPath); - static OUString GetDocumentContentSignatureDefaultStreamName(); - static OUString GetScriptingContentSignatureDefaultStreamName(); - static OUString GetPackageSignatureDefaultStreamName(); - /// In case the storage is OOXML, prepend a leading '/' and append content type to the element URIs. - static void AppendContentTypes(const css::uno::Reference<css::embed::XStorage>& xStorage, std::vector<OUString>& rElements); + OUString XMLSECURITY_DLLPUBLIC GetDocumentContentSignatureDefaultStreamName(); + OUString XMLSECURITY_DLLPUBLIC GetScriptingContentSignatureDefaultStreamName(); + OUString XMLSECURITY_DLLPUBLIC GetPackageSignatureDefaultStreamName(); + + /// In case the storage is OOXML, prepend a leading '/' and append content type to the element URIs. + void XMLSECURITY_DLLPUBLIC AppendContentTypes(const css::uno::Reference<css::embed::XStorage>& xStorage, std::vector<OUString>& rElements); }; #endif // INCLUDED_XMLSECURITY_INC_DOCUMENTSIGNATUREHELPER_HXX |