include/sfx2/viewfrm.hxx     |    1 -
 sfx2/source/view/viewfrm.cxx |    7 +------
 2 files changed, 1 insertion(+), 7 deletions(-)

New commits:
commit 6584735bba4b96fbde5c7be55dc6c98878ad059a
Author: Samuel Mehrbrodt <samuel.mehrbr...@cib.de>
Date:   Fri Apr 7 09:53:35 2017 +0200

    Remove button handler and let the button dispatch the uno cmd
    
    Change-Id: Iac4d0e1bf96505b02102ae94ca703c00d5348466
    Reviewed-on: https://gerrit.libreoffice.org/36252
    Reviewed-by: Samuel Mehrbrodt <samuel.mehrbr...@cib.de>
    Tested-by: Samuel Mehrbrodt <samuel.mehrbr...@cib.de>

diff --git a/include/sfx2/viewfrm.hxx b/include/sfx2/viewfrm.hxx
index 81084f0040b7..157bfcb2c207 100644
--- a/include/sfx2/viewfrm.hxx
+++ b/include/sfx2/viewfrm.hxx
@@ -79,7 +79,6 @@ 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 289bae55fb27..12eb84e539b2 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -1156,7 +1156,7 @@ void SfxViewFrame::Notify( SfxBroadcaster& /*rBC*/, const 
SfxHint& rHint )
                             VclPtrInstance<PushButton> 
xSignButton(&GetWindow());
                             xSignButton->SetText(SfxResId(STR_READONLY_SIGN));
                             
xSignButton->SetSizePixel(xSignButton->GetOptimalSize());
-                            xSignButton->SetClickHdl(LINK(this, SfxViewFrame, 
SignDocumentHandler));
+                            xSignButton->SetCommandHandler(".uno:Signature", 
false);
                             pInfoBar->addButton(xSignButton);
                         }
 
@@ -1259,11 +1259,6 @@ 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;
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to