[Libreoffice-commits] core.git: include/sfx2 sfx2/source
Michael Stahl
mstahl at redhat.com
Fri Apr 7 12:24:58 UTC 2017
include/sfx2/viewfrm.hxx | 1 +
sfx2/source/view/viewfrm.cxx | 7 ++++++-
2 files changed, 7 insertions(+), 1 deletion(-)
New commits:
commit 289158d59ecc739951ed4341175877a8544c2bd0
Author: Michael Stahl <mstahl at redhat.com>
Date: Fri Apr 7 14:20:18 2017 +0200
Revert "Remove button handler and let the button dispatch the uno cmd"
This reverts commit 6584735bba4b96fbde5c7be55dc6c98878ad059a.
Ooops, that doesn't build any more without the previous reverted one.
diff --git a/include/sfx2/viewfrm.hxx b/include/sfx2/viewfrm.hxx
index 157bfcb2c207..81084f0040b7 100644
--- a/include/sfx2/viewfrm.hxx
+++ b/include/sfx2/viewfrm.hxx
@@ -79,6 +79,7 @@ protected:
virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) override;
DECL_LINK( SwitchReadOnlyHandler, Button*, void );
+ DECL_LINK(SignDocumentHandler, Button*, void);
SAL_DLLPRIVATE void KillDispatcher_Impl();
virtual ~SfxViewFrame() override;
diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index adc24f98dc98..6127ce8ab611 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -1192,7 +1192,7 @@ void SfxViewFrame::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint )
VclPtrInstance<PushButton> xSignButton(&GetWindow());
xSignButton->SetText(SfxResId(STR_READONLY_SIGN));
xSignButton->SetSizePixel(xSignButton->GetOptimalSize());
- xSignButton->SetCommandHandler(".uno:Signature", false);
+ xSignButton->SetClickHdl(LINK(this, SfxViewFrame, SignDocumentHandler));
pInfoBar->addButton(xSignButton);
}
@@ -1295,6 +1295,11 @@ IMPL_LINK_NOARG(SfxViewFrame, SwitchReadOnlyHandler, Button*, void)
GetDispatcher()->Execute(SID_EDITDOC);
}
+IMPL_LINK_NOARG(SfxViewFrame, SignDocumentHandler, Button*, void)
+{
+ GetDispatcher()->Execute(SID_SIGNATURE);
+}
+
void SfxViewFrame::Construct_Impl( SfxObjectShell *pObjSh )
{
m_pImpl->bResizeInToOut = true;
More information about the Libreoffice-commits
mailing list