diff options
author | Arnaud Versini <arnaud.versini@libreoffice.org> | 2021-01-02 11:54:49 +0100 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-01-05 17:44:56 +0100 |
commit | cb234d3103a70c452694d5ea7d061ba1e39cb8e0 (patch) | |
tree | 32d6f9162ba88dd974889e16bf803b3712e03848 /basctl/source | |
parent | 5c97d7f490f82152ff42bf61f5a4b270f0141ba2 (diff) |
BASCTL : remove useless impl pattern
Change-Id: Ib3a3bfe8677a6eec56f6f1d799fd484f65ab6b73
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108568
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'basctl/source')
-rw-r--r-- | basctl/source/basicide/docsignature.cxx | 23 | ||||
-rw-r--r-- | basctl/source/inc/docsignature.hxx | 5 |
2 files changed, 10 insertions, 18 deletions
diff --git a/basctl/source/basicide/docsignature.cxx b/basctl/source/basicide/docsignature.cxx index 9f2dd6f150e6..701c9d478f1a 100644 --- a/basctl/source/basicide/docsignature.cxx +++ b/basctl/source/basicide/docsignature.cxx @@ -31,19 +31,10 @@ namespace basctl using ::com::sun::star::uno::Reference; using ::com::sun::star::frame::XModel; - // DocumentSignature::Impl - - struct DocumentSignature::Impl - { - SfxObjectShell* pShell; - - Impl () : pShell(nullptr) { } - }; - // DocumentSignature DocumentSignature::DocumentSignature (ScriptDocument const& rDocument) : - m_pImpl(new Impl) + m_pShell(nullptr) { if (!rDocument.isDocument()) return; @@ -57,7 +48,7 @@ namespace basctl break; pShell = SfxObjectShell::GetNext( *pShell ); } - m_pImpl->pShell = pShell; + m_pShell = pShell; } DocumentSignature::~DocumentSignature() @@ -66,20 +57,20 @@ namespace basctl bool DocumentSignature::supportsSignatures() const { - return ( m_pImpl->pShell != nullptr ); + return ( m_pShell != nullptr ); } void DocumentSignature::signScriptingContent(weld::Window* pDialogParent) const { OSL_PRECOND( supportsSignatures(), "DocumentSignature::signScriptingContent: signatures not supported by this document!" ); - if ( m_pImpl->pShell ) - m_pImpl->pShell->SignScriptingContent(pDialogParent); + if ( m_pShell ) + m_pShell->SignScriptingContent(pDialogParent); } SignatureState DocumentSignature::getScriptingSignatureState() const { - if ( m_pImpl->pShell ) - return m_pImpl->pShell->GetScriptingSignatureState(); + if ( m_pShell ) + return m_pShell->GetScriptingSignatureState(); return SignatureState::NOSIGNATURES; } diff --git a/basctl/source/inc/docsignature.hxx b/basctl/source/inc/docsignature.hxx index 5b4c454c077b..94e7db2224dd 100644 --- a/basctl/source/inc/docsignature.hxx +++ b/basctl/source/inc/docsignature.hxx @@ -22,6 +22,8 @@ #include <vcl/weld.hxx> #include <memory> +class SfxObjectShell; + namespace basctl { @@ -64,8 +66,7 @@ namespace basctl DocumentSignature() = delete; private: - struct Impl; - std::unique_ptr<Impl> m_pImpl; + SfxObjectShell* m_pShell; }; |