[Libreoffice-commits] core.git: xmlsecurity/inc xmlsecurity/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Mon Jul 23 06:42:12 UTC 2018


 xmlsecurity/inc/certificatechooser.hxx                     |    2 +-
 xmlsecurity/inc/certificateviewer.hxx                      |    6 +++---
 xmlsecurity/inc/digitalsignaturesdialog.hxx                |    4 ++--
 xmlsecurity/inc/documentsignaturemanager.hxx               |    2 +-
 xmlsecurity/inc/macrosecurity.hxx                          |    4 ++--
 xmlsecurity/source/dialogs/certificateviewer.cxx           |   10 +++++-----
 xmlsecurity/source/framework/elementcollector.hxx          |    4 ++--
 xmlsecurity/source/framework/elementmark.hxx               |    2 +-
 xmlsecurity/source/xmlsec/nss/digestcontext.hxx            |    4 ++--
 xmlsecurity/source/xmlsec/nss/secerror.cxx                 |    2 +-
 xmlsecurity/source/xmlsec/xmlelementwrapper_xmlsecimpl.hxx |    2 +-
 11 files changed, 21 insertions(+), 21 deletions(-)

New commits:
commit a8a11fbadc4cb6a26981be2b539066f0845a9000
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Fri Jul 20 15:57:13 2018 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Mon Jul 23 08:41:51 2018 +0200

    loplugin:unusedfields,can-be-const in xmlsecurity
    
    Change-Id: I271b1d69d5231ab76cb49fb0101c09d7c0ef6b79
    Reviewed-on: https://gerrit.libreoffice.org/57779
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/xmlsecurity/inc/certificatechooser.hxx b/xmlsecurity/inc/certificatechooser.hxx
index 9e2406c4fd63..d01b95edda24 100644
--- a/xmlsecurity/inc/certificatechooser.hxx
+++ b/xmlsecurity/inc/certificatechooser.hxx
@@ -73,7 +73,7 @@ private:
     VclPtr<Edit>            m_pDescriptionED;
 
     bool                    mbInitialized;
-    UserAction              meAction;
+    UserAction const        meAction;
     OUString                msPreferredKey;
     css::uno::Reference<css::security::XCertificate> mxEncryptToSelf;
 
diff --git a/xmlsecurity/inc/certificateviewer.hxx b/xmlsecurity/inc/certificateviewer.hxx
index cd30915b3f83..1ef9530510fb 100644
--- a/xmlsecurity/inc/certificateviewer.hxx
+++ b/xmlsecurity/inc/certificateviewer.hxx
@@ -50,7 +50,7 @@ private:
     sal_uInt16          mnDetailsId;
     sal_uInt16          mnPathId;
 
-    bool                mbCheckForPrivateKey;
+    bool const          mbCheckForPrivateKey;
 
     css::uno::Reference< css::xml::crypto::XSecurityEnvironment > mxSecurityEnvironment;
     css::uno::Reference< css::security::XCertificate > mxCert;
@@ -100,8 +100,8 @@ private:
     VclPtr<SvSimpleTableContainer> m_pElementsLBContainer;
     VclPtr<SvSimpleTable>          m_pElementsLB;
     VclPtr<VclMultiLineEdit>       m_pValueDetails;
-    vcl::Font               m_aStdFont;
-    vcl::Font               m_aFixedWidthFont;
+    vcl::Font                      m_aStdFont;
+    vcl::Font                      m_aFixedWidthFont;
 
     DECL_LINK(    ElementSelectHdl, SvTreeListBox*, void );
     void                Clear();
diff --git a/xmlsecurity/inc/digitalsignaturesdialog.hxx b/xmlsecurity/inc/digitalsignaturesdialog.hxx
index 417b4c6ea8d4..41cc458a7380 100644
--- a/xmlsecurity/inc/digitalsignaturesdialog.hxx
+++ b/xmlsecurity/inc/digitalsignaturesdialog.hxx
@@ -79,10 +79,10 @@ private:
 
     VclPtr<CloseButton>        m_pCloseBtn;
 
-    OUString m_sODFVersion;
+    OUString const m_sODFVersion;
     //Signals if the document contains already a document signature. This is only
     //important when we are signing macros and if the value is true.
-    bool m_bHasDocumentSignature;
+    bool const m_bHasDocumentSignature;
     bool m_bWarningShowSignMacro;
 
     bool m_bAdESCompliant;
diff --git a/xmlsecurity/inc/documentsignaturemanager.hxx b/xmlsecurity/inc/documentsignaturemanager.hxx
index 1b29e27c9c21..d67e08318123 100644
--- a/xmlsecurity/inc/documentsignaturemanager.hxx
+++ b/xmlsecurity/inc/documentsignaturemanager.hxx
@@ -64,7 +64,7 @@ public:
     XMLSignatureHelper maSignatureHelper;
     std::unique_ptr<PDFSignatureHelper> mpPDFSignatureHelper;
     SignatureInformations maCurrentSignatureInformations;
-    DocumentSignatureMode meSignatureMode;
+    DocumentSignatureMode const meSignatureMode;
     css::uno::Sequence<css::uno::Sequence<css::beans::PropertyValue>> m_manifest;
     css::uno::Reference<css::io::XStream> mxSignatureStream;
     css::uno::Reference<css::io::XStream> mxTempSignatureStream;
diff --git a/xmlsecurity/inc/macrosecurity.hxx b/xmlsecurity/inc/macrosecurity.hxx
index 6a3198284368..66d473341c2c 100644
--- a/xmlsecurity/inc/macrosecurity.hxx
+++ b/xmlsecurity/inc/macrosecurity.hxx
@@ -120,8 +120,8 @@ private:
 
     css::uno::Sequence< SvtSecurityOptions::Certificate > maTrustedAuthors;
 
-    bool                mbAuthorsReadonly;
-    bool                mbURLsReadonly;
+    bool          mbAuthorsReadonly;
+    bool          mbURLsReadonly;
 
     DECL_LINK(    ViewCertPBHdl, Button*, void );
     DECL_LINK(    RemoveCertPBHdl, Button*, void );
diff --git a/xmlsecurity/source/dialogs/certificateviewer.cxx b/xmlsecurity/source/dialogs/certificateviewer.cxx
index 0f2d0a399c60..57c827af3801 100644
--- a/xmlsecurity/source/dialogs/certificateviewer.cxx
+++ b/xmlsecurity/source/dialogs/certificateviewer.cxx
@@ -43,11 +43,11 @@ CertificateViewer::CertificateViewer(
         vcl::Window* _pParent,
         const css::uno::Reference< css::xml::crypto::XSecurityEnvironment >& _rxSecurityEnvironment,
         const css::uno::Reference< css::security::XCertificate >& _rXCert, bool bCheckForPrivateKey )
-    : TabDialog(_pParent, "ViewCertDialog", "xmlsec/ui/viewcertdialog.ui" )
+    : TabDialog(_pParent, "ViewCertDialog", "xmlsec/ui/viewcertdialog.ui" ),
+    mbCheckForPrivateKey(bCheckForPrivateKey)
 {
     get(mpTabCtrl, "tabcontrol");
 
-    mbCheckForPrivateKey = bCheckForPrivateKey;
 
     mxSecurityEnvironment = _rxSecurityEnvironment;
     mxCert = _rXCert;
@@ -193,8 +193,8 @@ void CertificateViewerGeneralTP::ActivatePage()
 
 struct Details_UserDatat
 {
-    OUString        maTxt;
-    bool            mbFixedWidthFont;
+    OUString const  maTxt;
+    bool const      mbFixedWidthFont;
 
     inline          Details_UserDatat( const OUString& _rTxt, bool _bFixedWidthFont );
 };
@@ -361,7 +361,7 @@ IMPL_LINK_NOARG(CertificateViewerDetailsTP, ElementSelectHdl, SvTreeListBox*, vo
 struct CertPath_UserData
 {
     css::uno::Reference< css::security::XCertificate > mxCert;
-    bool mbValid;
+    bool const mbValid;
 
     CertPath_UserData( css::uno::Reference< css::security::XCertificate > const & xCert, bool bValid):
         mxCert(xCert),
diff --git a/xmlsecurity/source/framework/elementcollector.hxx b/xmlsecurity/source/framework/elementcollector.hxx
index fc07fbcb6d43..80e021a09e75 100644
--- a/xmlsecurity/source/framework/elementcollector.hxx
+++ b/xmlsecurity/source/framework/elementcollector.hxx
@@ -44,13 +44,13 @@ private:
      * BEFOREMODIFY - this ElementCollector must notify before any
      *                    internal modification happens.
      */
-    css::xml::crypto::sax::ElementMarkPriority m_nPriority;
+    css::xml::crypto::sax::ElementMarkPriority const m_nPriority;
 
     /*
      * the modify flag, representing whether which elementcollector will
      * modify its data.
      */
-    bool m_bToModify;
+    bool const m_bToModify;
 
     /* the notify enable flag, see notifyListener method */
     bool m_bAbleToNotify;
diff --git a/xmlsecurity/source/framework/elementmark.hxx b/xmlsecurity/source/framework/elementmark.hxx
index 1ecb51ecc817..2e7527d80d3a 100644
--- a/xmlsecurity/source/framework/elementmark.hxx
+++ b/xmlsecurity/source/framework/elementmark.hxx
@@ -44,7 +44,7 @@ protected:
     sal_Int32 m_nSecurityId;
 
     /* the buffer Id */
-    sal_Int32 m_nBufferId;
+    sal_Int32 const m_nBufferId;
 
     /*
      * the type value, is one of following values:
diff --git a/xmlsecurity/source/xmlsec/nss/digestcontext.hxx b/xmlsecurity/source/xmlsec/nss/digestcontext.hxx
index 7e20cd8d99d0..a8aafdefeec3 100644
--- a/xmlsecurity/source/xmlsec/nss/digestcontext.hxx
+++ b/xmlsecurity/source/xmlsec/nss/digestcontext.hxx
@@ -31,8 +31,8 @@ private:
     ::osl::Mutex m_aMutex;
 
     PK11Context* m_pContext;
-    sal_Int32 m_nDigestLength;
-    bool m_b1KData;
+    sal_Int32 const m_nDigestLength;
+    bool const m_b1KData;
     sal_Int32 m_nDigested;
 
     bool m_bDisposed;
diff --git a/xmlsecurity/source/xmlsec/nss/secerror.cxx b/xmlsecurity/source/xmlsec/nss/secerror.cxx
index 638e54c3ca82..717dd32a535a 100644
--- a/xmlsecurity/source/xmlsec/nss/secerror.cxx
+++ b/xmlsecurity/source/xmlsec/nss/secerror.cxx
@@ -29,7 +29,7 @@
 #include <sal/types.h>
 
 struct ErrDesc {
-    PRErrorCode  errNum;
+    PRErrorCode const errNum;
     const char * errString;
 };
 
diff --git a/xmlsecurity/source/xmlsec/xmlelementwrapper_xmlsecimpl.hxx b/xmlsecurity/source/xmlsec/xmlelementwrapper_xmlsecimpl.hxx
index cf550f3e4f33..27940e73c61b 100644
--- a/xmlsecurity/source/xmlsec/xmlelementwrapper_xmlsecimpl.hxx
+++ b/xmlsecurity/source/xmlsec/xmlelementwrapper_xmlsecimpl.hxx
@@ -51,7 +51,7 @@ class XSECXMLSEC_DLLPUBLIC XMLElementWrapper_XmlSecImpl : public cppu::WeakImplH
 {
 private:
     /* the libxml2 node wrapped by this object */
-    xmlNodePtr m_pElement;
+    xmlNodePtr const m_pElement;
 
 public:
     explicit XMLElementWrapper_XmlSecImpl(const xmlNodePtr pNode);


More information about the Libreoffice-commits mailing list