[Libreoffice-commits] core.git: basctl/source
Arnaud Versini (via logerrit)
logerrit at kemper.freedesktop.org
Tue Jan 5 16:45:35 UTC 2021
basctl/source/basicide/docsignature.cxx | 23 +++++++----------------
basctl/source/inc/docsignature.hxx | 5 +++--
2 files changed, 10 insertions(+), 18 deletions(-)
New commits:
commit cb234d3103a70c452694d5ea7d061ba1e39cb8e0
Author: Arnaud Versini <arnaud.versini at libreoffice.org>
AuthorDate: Sat Jan 2 11:54:49 2021 +0100
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Tue Jan 5 17:44:56 2021 +0100
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 at collabora.co.uk>
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;
};
More information about the Libreoffice-commits
mailing list