summaryrefslogtreecommitdiff
path: root/xmlsecurity
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-09-28 14:22:40 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-09-28 17:57:07 +0200
commit4ea413542ebb142dcdec81f43b1b5e565dbe7316 (patch)
tree3656434a77fbe4b77c5052d9e5cf1b44a5a7b4a3 /xmlsecurity
parent664f8632b1f4720475e6cb7176a08d3d204affd5 (diff)
loplugin:constmethod in xmlsecurity
Change-Id: I7892b4819fd7491882e6ca995bf2ce5c65230609 Reviewed-on: https://gerrit.libreoffice.org/79791 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'xmlsecurity')
-rw-r--r--xmlsecurity/inc/certificatechooser.hxx4
-rw-r--r--xmlsecurity/inc/certificateviewer.hxx2
-rw-r--r--xmlsecurity/inc/digitalsignaturesdialog.hxx2
-rw-r--r--xmlsecurity/inc/documentsignaturemanager.hxx8
-rw-r--r--xmlsecurity/source/dialogs/certificatechooser.cxx4
-rw-r--r--xmlsecurity/source/dialogs/certificateviewer.cxx2
-rw-r--r--xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx4
-rw-r--r--xmlsecurity/source/helper/documentsignaturemanager.cxx4
8 files changed, 15 insertions, 15 deletions
diff --git a/xmlsecurity/inc/certificatechooser.hxx b/xmlsecurity/inc/certificatechooser.hxx
index 328fdc24f2b3..d84af0fcc92f 100644
--- a/xmlsecurity/inc/certificatechooser.hxx
+++ b/xmlsecurity/inc/certificatechooser.hxx
@@ -85,9 +85,9 @@ public:
short run() override;
css::uno::Sequence<css::uno::Reference< css::security::XCertificate > > GetSelectedCertificates();
- css::uno::Reference< css::xml::crypto::XXMLSecurityContext > GetSelectedSecurityContext();
+ css::uno::Reference< css::xml::crypto::XXMLSecurityContext > GetSelectedSecurityContext() const;
/// Gets the description string provided when selecting the certificate.
- OUString GetDescription();
+ OUString GetDescription() const;
/// Returns the usage string of the selected certificate, if any.
OUString GetUsageText();
diff --git a/xmlsecurity/inc/certificateviewer.hxx b/xmlsecurity/inc/certificateviewer.hxx
index b787ad4b08b2..d531dd1fc205 100644
--- a/xmlsecurity/inc/certificateviewer.hxx
+++ b/xmlsecurity/inc/certificateviewer.hxx
@@ -148,7 +148,7 @@ private:
DECL_LINK(ViewCertHdl, weld::Button&, void);
DECL_LINK(CertSelectHdl, weld::TreeView&, void);
- void InsertCert(weld::TreeIter* pParent, const OUString& _rName,
+ void InsertCert(const weld::TreeIter* pParent, const OUString& _rName,
const css::uno::Reference< css::security::XCertificate >& rxCert,
bool bValid);
diff --git a/xmlsecurity/inc/digitalsignaturesdialog.hxx b/xmlsecurity/inc/digitalsignaturesdialog.hxx
index 459beafcc956..363dfdeb2d41 100644
--- a/xmlsecurity/inc/digitalsignaturesdialog.hxx
+++ b/xmlsecurity/inc/digitalsignaturesdialog.hxx
@@ -106,7 +106,7 @@ private:
bool canAddRemove();
public:
- DigitalSignaturesDialog(weld::Window* pParent, css::uno::Reference<
+ DigitalSignaturesDialog(weld::Window* pParent, const css::uno::Reference<
css::uno::XComponentContext >& rxCtx, DocumentSignatureMode eMode,
bool bReadOnly, const OUString& sODFVersion, bool bHasDocumentSignature);
virtual ~DigitalSignaturesDialog() override;
diff --git a/xmlsecurity/inc/documentsignaturemanager.hxx b/xmlsecurity/inc/documentsignaturemanager.hxx
index 1bf98ba5b8cf..5bdc679c4726 100644
--- a/xmlsecurity/inc/documentsignaturemanager.hxx
+++ b/xmlsecurity/inc/documentsignaturemanager.hxx
@@ -116,16 +116,16 @@ public:
/// Get the security environment.
css::uno::Reference<css::xml::crypto::XSecurityEnvironment> getSecurityEnvironment();
css::uno::Reference<css::xml::crypto::XSecurityEnvironment> getGpgSecurityEnvironment();
- css::uno::Reference<css::xml::crypto::XXMLSecurityContext> const& getSecurityContext();
- css::uno::Reference<css::xml::crypto::XXMLSecurityContext> const& getGpgSecurityContext();
+ css::uno::Reference<css::xml::crypto::XXMLSecurityContext> const& getSecurityContext() const;
+ css::uno::Reference<css::xml::crypto::XXMLSecurityContext> const& getGpgSecurityContext() const;
void setStore(const css::uno::Reference<css::embed::XStorage>& xStore) { mxStore = xStore; }
XMLSignatureHelper& getSignatureHelper() { return maSignatureHelper; }
- bool hasPDFSignatureHelper() { return mpPDFSignatureHelper.get(); }
+ bool hasPDFSignatureHelper() const { return mpPDFSignatureHelper.get(); }
void setSignatureStream(const css::uno::Reference<css::io::XStream>& xSignatureStream)
{
mxSignatureStream = xSignatureStream;
}
- const css::uno::Reference<css::embed::XStorage>& getStore() { return mxStore; }
+ const css::uno::Reference<css::embed::XStorage>& getStore() const { return mxStore; }
DocumentSignatureMode getSignatureMode() const { return meSignatureMode; }
SignatureInformations& getCurrentSignatureInformations()
{
diff --git a/xmlsecurity/source/dialogs/certificatechooser.cxx b/xmlsecurity/source/dialogs/certificatechooser.cxx
index 795e9bf3ae07..75467a6a2e6f 100644
--- a/xmlsecurity/source/dialogs/certificatechooser.cxx
+++ b/xmlsecurity/source/dialogs/certificatechooser.cxx
@@ -271,7 +271,7 @@ uno::Sequence<uno::Reference< css::security::XCertificate > > CertificateChooser
return comphelper::containerToSequence(aRet);
}
-uno::Reference<xml::crypto::XXMLSecurityContext> CertificateChooser::GetSelectedSecurityContext()
+uno::Reference<xml::crypto::XXMLSecurityContext> CertificateChooser::GetSelectedSecurityContext() const
{
int nSel = m_xCertLB->get_selected_index();
if (nSel == -1)
@@ -282,7 +282,7 @@ uno::Reference<xml::crypto::XXMLSecurityContext> CertificateChooser::GetSelected
return xCert;
}
-OUString CertificateChooser::GetDescription()
+OUString CertificateChooser::GetDescription() const
{
return m_xDescriptionED->get_text();
}
diff --git a/xmlsecurity/source/dialogs/certificateviewer.cxx b/xmlsecurity/source/dialogs/certificateviewer.cxx
index e916fffceb17..55743c62facb 100644
--- a/xmlsecurity/source/dialogs/certificateviewer.cxx
+++ b/xmlsecurity/source/dialogs/certificateviewer.cxx
@@ -353,7 +353,7 @@ IMPL_LINK_NOARG(CertificateViewerCertPathTP, CertSelectHdl, weld::TreeView&, voi
mxViewCertPB->set_sensitive(bSensitive);
}
-void CertificateViewerCertPathTP::InsertCert(weld::TreeIter* pParent, const OUString& rName,
+void CertificateViewerCertPathTP::InsertCert(const weld::TreeIter* pParent, const OUString& rName,
const css::uno::Reference< css::security::XCertificate >& rxCert,
bool bValid)
{
diff --git a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
index 6f0407433f2f..ae7712f79fb3 100644
--- a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
+++ b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
@@ -83,7 +83,7 @@ namespace
virtual void Notify( const css::uno::Sequence< OUString >& aPropertyNames ) override;
SaveODFItem();
//See group ODF in Common.xcs
- bool isLessODF1_2()
+ bool isLessODF1_2() const
{
return m_nODF < 3;
}
@@ -113,7 +113,7 @@ namespace
DigitalSignaturesDialog::DigitalSignaturesDialog(
weld::Window* pParent,
- uno::Reference< uno::XComponentContext >& rxCtx, DocumentSignatureMode eMode,
+ const uno::Reference< uno::XComponentContext >& rxCtx, DocumentSignatureMode eMode,
bool bReadOnly, const OUString& sODFVersion, bool bHasDocumentSignature)
: GenericDialogController(pParent, "xmlsec/ui/digitalsignaturesdialog.ui", "DigitalSignaturesDialog")
, maSignatureManager(rxCtx, eMode)
diff --git a/xmlsecurity/source/helper/documentsignaturemanager.cxx b/xmlsecurity/source/helper/documentsignaturemanager.cxx
index 67885007cd7d..a0e674c3bd1b 100644
--- a/xmlsecurity/source/helper/documentsignaturemanager.cxx
+++ b/xmlsecurity/source/helper/documentsignaturemanager.cxx
@@ -672,13 +672,13 @@ DocumentSignatureManager::getGpgSecurityEnvironment()
}
uno::Reference<xml::crypto::XXMLSecurityContext> const&
-DocumentSignatureManager::getSecurityContext()
+DocumentSignatureManager::getSecurityContext() const
{
return mxSecurityContext;
}
uno::Reference<xml::crypto::XXMLSecurityContext> const&
-DocumentSignatureManager::getGpgSecurityContext()
+DocumentSignatureManager::getGpgSecurityContext() const
{
return mxGpgSecurityContext;
}