[Libreoffice-commits] core.git: xmlsecurity/inc
Tor Lillqvist
tml at collabora.com
Wed Nov 9 19:05:13 UTC 2016
xmlsecurity/inc/documentsignaturehelper.hxx | 46 +++++++++++-----------------
1 file changed, 19 insertions(+), 27 deletions(-)
New commits:
commit 6bad5027dadaa3f99a33eb752d8477d7abe92137
Author: Tor Lillqvist <tml at collabora.com>
Date: Wed Nov 9 18:48:14 2016 +0200
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
diff --git a/xmlsecurity/inc/documentsignaturehelper.hxx b/xmlsecurity/inc/documentsignaturehelper.hxx
index d2eb803..8aa0124 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
More information about the Libreoffice-commits
mailing list