[Libreoffice-commits] .: Branch 'libreoffice-3-5' - sfx2/source vcl/source

Caolán McNamara caolan at kemper.freedesktop.org
Tue Dec 6 07:29:27 PST 2011


 sfx2/source/dialog/tabdlg.cxx |    7 ++++---
 vcl/source/control/button.cxx |    3 ---
 2 files changed, 4 insertions(+), 6 deletions(-)

New commits:
commit afbfec0ee3e58e36437f0b36f2d1df13c60e1968
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Dec 6 15:28:34 2011 +0000

    Revert "Install a Cancel callback, don't rely on vcl searching for a parent to close"
    
    This reverts commit 5d846ebeb55b1e295fb53f473f0fb2b88712e001, fixed
    the offending writer field dialog in master, but don't need this
    infrastucture for 3-5, so take safer option and use tranditional
    behaviour

diff --git a/sfx2/source/dialog/tabdlg.cxx b/sfx2/source/dialog/tabdlg.cxx
index 108e46d..9c21656 100644
--- a/sfx2/source/dialog/tabdlg.cxx
+++ b/sfx2/source/dialog/tabdlg.cxx
@@ -518,7 +518,6 @@ void SfxTabDialog::Init_Impl( sal_Bool bFmtFlag, const String* pUserButtonText )
 
 {
     aOKBtn.SetClickHdl( LINK( this, SfxTabDialog, OkHdl ) );
-    aCancelBtn.SetClickHdl( LINK( this, SfxTabDialog, CancelHdl ) );
     aResetBtn.SetClickHdl( LINK( this, SfxTabDialog, ResetHdl ) );
     aResetBtn.SetText( String( SfxResId( STR_RESET ) ) );
     aTabCtrl.SetActivatePageHdl(
@@ -602,6 +601,7 @@ void SfxTabDialog::StartExecuteModal( const Link& rEndDialogHdl )
 
 void SfxTabDialog::Start( sal_Bool bShow )
 {
+    aCancelBtn.SetClickHdl( LINK( this, SfxTabDialog, CancelHdl ) );
     pImpl->bModal = sal_False;
     Start_Impl();
 
@@ -956,9 +956,10 @@ short SfxTabDialog::Ok()
 
 // -----------------------------------------------------------------------
 
-IMPL_LINK( SfxTabDialog, CancelHdl, Button*, EMPTYARG )
+IMPL_LINK( SfxTabDialog, CancelHdl, Button*, pButton )
 {
-    EndDialog( RET_USER_CANCEL );
+    (void)pButton; //unused
+    Close();
     return 0;
 }
 
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index 25e8de5..ac88195 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -1772,7 +1772,6 @@ OKButton::OKButton( Window* pParent, const ResId& rResId ) :
 
 void OKButton::Click()
 {
-    SAL_WARN_IF(!GetClickHdl(), "vcl", "No handler installed for OKButton");
     // Ist kein Link gesetzt, dann schliesse Parent
     if ( !GetClickHdl() )
     {
@@ -1839,7 +1838,6 @@ CancelButton::CancelButton( Window* pParent, const ResId& rResId ) :
 
 void CancelButton::Click()
 {
-    SAL_WARN_IF(!GetClickHdl(), "vcl", "No handler installed for CancelButton");
     // Ist kein Link gesetzt, dann schliesse Parent
     if ( !GetClickHdl() )
     {
@@ -1906,7 +1904,6 @@ HelpButton::HelpButton( Window* pParent, const ResId& rResId ) :
 
 void HelpButton::Click()
 {
-    SAL_WARN_IF(!GetClickHdl(), "vcl", "No handler installed for HelpButton");
     // Ist kein Link gesetzt, loese Hilfe aus
     if ( !GetClickHdl() )
     {


More information about the Libreoffice-commits mailing list