[Libreoffice-commits] core.git: 5 commits - dbaccess/source extensions/source filter/source framework/inc framework/source include/sfx2 include/vcl sd/source sfx2/source

Stephan Bergmann sbergman at redhat.com
Mon May 4 08:55:17 PDT 2015


 dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx       |    3 +--
 dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx       |    7 +++----
 dbaccess/source/ui/dlg/TextConnectionHelper.hxx         |    4 ++--
 dbaccess/source/ui/dlg/adminpages.hxx                   |    6 +++---
 dbaccess/source/ui/dlg/dbwizsetup.cxx                   |    9 +++------
 dbaccess/source/ui/dlg/generalpage.hxx                  |    4 ++--
 dbaccess/source/ui/inc/dbwizsetup.hxx                   |    6 +++---
 extensions/source/propctrlr/propertyeditor.cxx          |    6 +++---
 extensions/source/propctrlr/propertyeditor.hxx          |    2 +-
 filter/source/xsltdialog/xmlfiltertabdialog.cxx         |    4 ++--
 filter/source/xsltdialog/xmlfiltertabdialog.hxx         |    2 +-
 framework/inc/classes/fwktabwindow.hxx                  |    2 +-
 framework/inc/tabwin/tabwindow.hxx                      |    2 +-
 framework/source/classes/fwktabwindow.cxx               |    4 ++--
 framework/source/tabwin/tabwindow.cxx                   |    4 ++--
 include/sfx2/tabdlg.hxx                                 |    2 +-
 include/vcl/tabctrl.hxx                                 |    5 ++---
 sd/source/ui/animations/CustomAnimationCreateDialog.cxx |    4 ++--
 sd/source/ui/animations/CustomAnimationCreateDialog.hxx |    2 +-
 sd/source/ui/dlg/headerfooterdlg.cxx                    |    4 ++--
 sd/source/ui/inc/headerfooterdlg.hxx                    |    2 +-
 sfx2/source/dialog/tabdlg.cxx                           |    8 ++++----
 22 files changed, 43 insertions(+), 49 deletions(-)

New commits:
commit b95427196e87e7bc1143674ef7cb9b1eeacb7f72
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Sun May 3 20:57:42 2015 +0200

    Use typed TabControl::SetDeactivatePageHdl Link
    
    Change-Id: I487aad5217cb685ece971717445a68b4fb3d2b3a

diff --git a/extensions/source/propctrlr/propertyeditor.cxx b/extensions/source/propctrlr/propertyeditor.cxx
index daa9e8c..73d8389 100644
--- a/extensions/source/propctrlr/propertyeditor.cxx
+++ b/extensions/source/propctrlr/propertyeditor.cxx
@@ -516,19 +516,19 @@ namespace pcr
     }
 
 
-    IMPL_LINK_NOARG(OPropertyEditor, OnPageDeactivate)
+    IMPL_LINK_NOARG_TYPED(OPropertyEditor, OnPageDeactivate, TabControl *, bool)
     {
         // commit the data on the current (to-be-decativated) tab page
         // (79404)
         sal_Int32 nCurrentId = m_aTabControl->GetCurPageId();
         OBrowserPage* pCurrentPage = static_cast<OBrowserPage*>(m_aTabControl->GetTabPage((sal_uInt16)nCurrentId));
         if ( !pCurrentPage )
-            return 1L;
+            return true;
 
         if ( pCurrentPage->getListBox().IsModified() )
             pCurrentPage->getListBox().CommitModified();
 
-        return 1L;
+        return true;
     }
 
 
diff --git a/extensions/source/propctrlr/propertyeditor.hxx b/extensions/source/propctrlr/propertyeditor.hxx
index cd519b8..6fe279b 100644
--- a/extensions/source/propctrlr/propertyeditor.hxx
+++ b/extensions/source/propctrlr/propertyeditor.hxx
@@ -139,7 +139,7 @@ namespace pcr
         void    setHelpLineLimits( OBrowserPage& _rPage, const void* );
 
     protected:
-        DECL_LINK(OnPageDeactivate, void *);
+        DECL_LINK_TYPED(OnPageDeactivate, TabControl *, bool);
         DECL_LINK(OnPageActivate, void *);
     };
 
diff --git a/filter/source/xsltdialog/xmlfiltertabdialog.cxx b/filter/source/xsltdialog/xmlfiltertabdialog.cxx
index ff725cc..5a63bbf 100644
--- a/filter/source/xsltdialog/xmlfiltertabdialog.cxx
+++ b/filter/source/xsltdialog/xmlfiltertabdialog.cxx
@@ -305,9 +305,9 @@ IMPL_LINK( XMLFilterTabDialog, ActivatePageHdl, TabControl *, pTabCtrl )
 
 
 
-IMPL_LINK( XMLFilterTabDialog, DeactivatePageHdl, TabControl *, /* pTabCtrl */ )
+IMPL_LINK_NOARG_TYPED( XMLFilterTabDialog, DeactivatePageHdl, TabControl *, bool )
 {
-    return sal_True;
+    return true;
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/filter/source/xsltdialog/xmlfiltertabdialog.hxx b/filter/source/xsltdialog/xmlfiltertabdialog.hxx
index 221b704..3b858a8 100644
--- a/filter/source/xsltdialog/xmlfiltertabdialog.hxx
+++ b/filter/source/xsltdialog/xmlfiltertabdialog.hxx
@@ -46,7 +46,7 @@ private:
     com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > mxContext;
 
     DECL_LINK( ActivatePageHdl, TabControl * );
-    DECL_LINK( DeactivatePageHdl, TabControl * );
+    DECL_LINK_TYPED( DeactivatePageHdl, TabControl *, bool );
     DECL_LINK(OkHdl, void *);
 
     ResMgr& mrResMgr;
diff --git a/framework/inc/classes/fwktabwindow.hxx b/framework/inc/classes/fwktabwindow.hxx
index 3e39087..133782c 100644
--- a/framework/inc/classes/fwktabwindow.hxx
+++ b/framework/inc/classes/fwktabwindow.hxx
@@ -105,7 +105,7 @@ private:
     bool            RemoveEntry( sal_Int32 nIndex );
 
     DECL_DLLPRIVATE_LINK(ActivatePageHdl, void *);
-    DECL_DLLPRIVATE_LINK(DeactivatePageHdl, void *);
+    DECL_DLLPRIVATE_LINK_TYPED(DeactivatePageHdl, TabControl *, bool);
 
 public:
     FwkTabWindow( vcl::Window* pParent );
diff --git a/framework/inc/tabwin/tabwindow.hxx b/framework/inc/tabwin/tabwindow.hxx
index 9edf554..e693ae2 100644
--- a/framework/inc/tabwin/tabwindow.hxx
+++ b/framework/inc/tabwin/tabwindow.hxx
@@ -110,7 +110,7 @@ class TabWindow :  public ::com::sun::star::lang::XTypeProvider             ,
 
     protected:
         DECL_LINK( Activate, TabControl* );
-        DECL_LINK( Deactivate, TabControl* );
+        DECL_LINK_TYPED( Deactivate, TabControl*, bool );
 
     private:
 
diff --git a/framework/source/classes/fwktabwindow.cxx b/framework/source/classes/fwktabwindow.cxx
index 605b7b1..9e16a6f 100644
--- a/framework/source/classes/fwktabwindow.cxx
+++ b/framework/source/classes/fwktabwindow.cxx
@@ -278,10 +278,10 @@ IMPL_LINK_NOARG(FwkTabWindow, ActivatePageHdl)
     return 1;
 }
 
-IMPL_LINK_NOARG(FwkTabWindow, DeactivatePageHdl)
+IMPL_LINK_NOARG_TYPED(FwkTabWindow, DeactivatePageHdl, TabControl *, bool)
 {
     m_aTabCtrl->BroadcastEvent( VCLEVENT_TABPAGE_DEACTIVATE );
-    return 1;
+    return true;
 }
 
 void FwkTabWindow::AddEventListener( const Link<>& rEventListener )
diff --git a/framework/source/tabwin/tabwindow.cxx b/framework/source/tabwin/tabwindow.cxx
index 97263ec..44c87bb 100644
--- a/framework/source/tabwin/tabwindow.cxx
+++ b/framework/source/tabwin/tabwindow.cxx
@@ -243,7 +243,7 @@ IMPL_LINK( TabWindow, Activate, TabControl*, pTabControl )
     return 1;
 }
 
-IMPL_LINK( TabWindow, Deactivate, TabControl*, pTabControl )
+IMPL_LINK_TYPED( TabWindow, Deactivate, TabControl*, pTabControl, bool )
 {
     /* SAFE AREA ----------------------------------------------------------------------------------------------- */
     SolarMutexClearableGuard aLock;
@@ -253,7 +253,7 @@ IMPL_LINK( TabWindow, Deactivate, TabControl*, pTabControl )
 
     implts_SendNotification( NOTIFY_DEACTIVATED, nPageId );
 
-    return 1;
+    return true;
 }
 
 // XInitilization
diff --git a/include/sfx2/tabdlg.hxx b/include/sfx2/tabdlg.hxx
index 6a4f184..a8f5526 100644
--- a/include/sfx2/tabdlg.hxx
+++ b/include/sfx2/tabdlg.hxx
@@ -90,7 +90,7 @@ friend class SfxTabDialogController;
     bool                bStandardPushed;
 
     DECL_DLLPRIVATE_LINK( ActivatePageHdl, TabControl * );
-    DECL_DLLPRIVATE_LINK( DeactivatePageHdl, TabControl * );
+    DECL_DLLPRIVATE_LINK_TYPED( DeactivatePageHdl, TabControl *, bool );
     DECL_DLLPRIVATE_LINK(OkHdl, void *);
     DECL_DLLPRIVATE_LINK(ResetHdl, void *);
     DECL_DLLPRIVATE_LINK(BaseFmtHdl, void *);
diff --git a/include/vcl/tabctrl.hxx b/include/vcl/tabctrl.hxx
index df8e6ff..82c3e96 100644
--- a/include/vcl/tabctrl.hxx
+++ b/include/vcl/tabctrl.hxx
@@ -50,7 +50,7 @@ private:
     bool                mbSmallInvalidate;
     bool                mbLayoutDirty;
     Link<>              maActivateHdl;
-    Link<>              maDeactivateHdl;
+    Link<TabControl *, bool> maDeactivateHdl;
 
     using Control::ImplInitSettings;
     SAL_DLLPRIVATE void         ImplInitSettings( bool bFont, bool bForeground, bool bBackground );
@@ -162,8 +162,7 @@ public:
 
     void                SetActivatePageHdl( const Link<>& rLink ) { maActivateHdl = rLink; }
     const Link<>&       GetActivatePageHdl() const { return maActivateHdl; }
-    void                SetDeactivatePageHdl( const Link<>& rLink ) { maDeactivateHdl = rLink; }
-    const Link<>&       GetDeactivatePageHdl() const { return maDeactivateHdl; }
+    void                SetDeactivatePageHdl( const Link<TabControl *, bool>& rLink ) { maDeactivateHdl = rLink; }
 
     // returns (control relative) bounding rectangle for the
     // character at index nIndex relative to the text of page nPageId
diff --git a/sd/source/ui/animations/CustomAnimationCreateDialog.cxx b/sd/source/ui/animations/CustomAnimationCreateDialog.cxx
index 6ab163c..d390643 100644
--- a/sd/source/ui/animations/CustomAnimationCreateDialog.cxx
+++ b/sd/source/ui/animations/CustomAnimationCreateDialog.cxx
@@ -599,11 +599,11 @@ IMPL_LINK_NOARG(CustomAnimationCreateDialog, implActivatePagekHdl)
     return 1;
 }
 
-IMPL_LINK_NOARG(CustomAnimationCreateDialog, implDeactivatePagekHdl)
+IMPL_LINK_NOARG_TYPED(CustomAnimationCreateDialog, implDeactivatePagekHdl, TabControl *, bool)
 {
     mfDuration = getCurrentPage()->getDuration();
     mbIsPreview = getCurrentPage()->getIsPreview();
-    return 1;
+    return true;
 }
 
 void CustomAnimationCreateDialog::preview( const CustomAnimationPresetPtr& pPreset ) const
diff --git a/sd/source/ui/animations/CustomAnimationCreateDialog.hxx b/sd/source/ui/animations/CustomAnimationCreateDialog.hxx
index 68a5c81..9b8ec85 100644
--- a/sd/source/ui/animations/CustomAnimationCreateDialog.hxx
+++ b/sd/source/ui/animations/CustomAnimationCreateDialog.hxx
@@ -54,7 +54,7 @@ private:
     void storePosition();
 
     DECL_LINK(implActivatePagekHdl, void *);
-    DECL_LINK(implDeactivatePagekHdl, void *);
+    DECL_LINK_TYPED(implDeactivatePagekHdl, TabControl *, bool);
 
 private:
     VclPtr<CustomAnimationPane> mpPane;
diff --git a/sd/source/ui/dlg/headerfooterdlg.cxx b/sd/source/ui/dlg/headerfooterdlg.cxx
index 1714443..a21e27e 100644
--- a/sd/source/ui/dlg/headerfooterdlg.cxx
+++ b/sd/source/ui/dlg/headerfooterdlg.cxx
@@ -266,9 +266,9 @@ IMPL_LINK( HeaderFooterDialog, ActivatePageHdl, TabControl *, pTabCtrl )
     return 0;
 }
 
-IMPL_LINK_NOARG(HeaderFooterDialog, DeactivatePageHdl)
+IMPL_LINK_NOARG_TYPED(HeaderFooterDialog, DeactivatePageHdl, TabControl *, bool)
 {
-    return sal_True;
+    return true;
 }
 
 IMPL_LINK_NOARG(HeaderFooterDialog, ClickApplyToAllHdl)
diff --git a/sd/source/ui/inc/headerfooterdlg.hxx b/sd/source/ui/inc/headerfooterdlg.hxx
index 4206cd4..3926379 100644
--- a/sd/source/ui/inc/headerfooterdlg.hxx
+++ b/sd/source/ui/inc/headerfooterdlg.hxx
@@ -38,7 +38,7 @@ class HeaderFooterDialog : public TabDialog
 {
 private:
     DECL_LINK( ActivatePageHdl, TabControl * );
-    DECL_LINK( DeactivatePageHdl, void * );
+    DECL_LINK_TYPED( DeactivatePageHdl, TabControl *, bool );
 
     DECL_LINK( ClickApplyToAllHdl, void * );
     DECL_LINK( ClickApplyHdl, void * );
diff --git a/sfx2/source/dialog/tabdlg.cxx b/sfx2/source/dialog/tabdlg.cxx
index 390afe6..8684d55 100644
--- a/sfx2/source/dialog/tabdlg.cxx
+++ b/sfx2/source/dialog/tabdlg.cxx
@@ -1193,7 +1193,7 @@ IMPL_LINK( SfxTabDialog, ActivatePageHdl, TabControl *, pTabCtrl )
 
 
 
-IMPL_LINK( SfxTabDialog, DeactivatePageHdl, TabControl *, pTabCtrl )
+IMPL_LINK_TYPED( SfxTabDialog, DeactivatePageHdl, TabControl *, pTabCtrl, bool )
 
 /*  [Description]
 
@@ -1210,7 +1210,7 @@ IMPL_LINK( SfxTabDialog, DeactivatePageHdl, TabControl *, pTabCtrl )
     SfxTabPage *pPage = dynamic_cast<SfxTabPage*> (pTabCtrl->GetTabPage( nId ));
     DBG_ASSERT( pPage, "no active Page" );
     if (!pPage)
-        return sal_False;
+        return false;
 #ifdef DBG_UTIL
     Data_Impl* pDataObject = Find( pImpl->aData, pTabCtrl->GetCurPageId() );
     DBG_ASSERT( pDataObject, "no Data structure for current page" );
@@ -1272,9 +1272,9 @@ IMPL_LINK( SfxTabDialog, DeactivatePageHdl, TabControl *, pTabCtrl )
         }
     }
     if ( nRet & SfxTabPage::LEAVE_PAGE )
-        return sal_True;
+        return true;
     else
-        return sal_False;
+        return false;
 }
 
 
commit 468e60717ff3de76051b2e6568ef101a16ca8721
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Thu Apr 30 23:33:32 2015 +0200

    Use typed OGeneralPageWizard::SetCreationModeHandler Link
    
    Change-Id: I3ec59f2a736d230eeb9f6e5db49af16f3e570afd

diff --git a/dbaccess/source/ui/dlg/dbwizsetup.cxx b/dbaccess/source/ui/dlg/dbwizsetup.cxx
index e0c296c..3484678 100644
--- a/dbaccess/source/ui/dlg/dbwizsetup.cxx
+++ b/dbaccess/source/ui/dlg/dbwizsetup.cxx
@@ -604,10 +604,9 @@ IMPL_LINK_TYPED(ODbTypeWizDialogSetup, ImplClickHdl, OMySQLIntroPageSetup*, _pMy
     activatePath( static_cast<PathId>(m_pCollection->getIndexOf(sURLPrefix) + 1), true);
 }
 
-IMPL_LINK(ODbTypeWizDialogSetup, OnChangeCreationMode, OGeneralPageWizard*, /*_pGeneralPage*/)
+IMPL_LINK_NOARG_TYPED(ODbTypeWizDialogSetup, OnChangeCreationMode, OGeneralPageWizard*, void)
 {
     activateDatabasePath();
-    return sal_True;
 }
 
 IMPL_LINK(ODbTypeWizDialogSetup, OnRecentDocumentSelected, OGeneralPageWizard*, /*_pGeneralPage*/)
diff --git a/dbaccess/source/ui/dlg/generalpage.hxx b/dbaccess/source/ui/dlg/generalpage.hxx
index 1750b41..b30c592 100644
--- a/dbaccess/source/ui/dlg/generalpage.hxx
+++ b/dbaccess/source/ui/dlg/generalpage.hxx
@@ -151,7 +151,7 @@ namespace dbaui
         DocumentDescriptor      m_aBrowsedDocument;
         CreationMode            m_eOriginalCreationMode;
 
-        Link<>                  m_aCreationModeHandler;         /// to be called if a new type is selected
+        Link<OGeneralPageWizard *, void> m_aCreationModeHandler; /// to be called if a new type is selected
         Link<>                  m_aDocumentSelectionHandler;    /// to be called when a document in the RecentDoc list is selected
         Link<>                  m_aChooseDocumentHandler;       /// to be called when a recent document has been definitely chosen
 
@@ -162,7 +162,7 @@ namespace dbaui
         void                    insertEmbeddedDBTypeEntryData( const OUString& _sType, const OUString& sDisplayName );
 
     public:
-        void                    SetCreationModeHandler( const Link<>& _rHandler ) { m_aCreationModeHandler = _rHandler; }
+        void                    SetCreationModeHandler( const Link<OGeneralPageWizard *, void>& _rHandler ) { m_aCreationModeHandler = _rHandler; }
         CreationMode            GetDatabaseCreationMode() const;
 
         void                    SetDocumentSelectionHandler( const Link<>& _rHandler) { m_aDocumentSelectionHandler = _rHandler; }
diff --git a/dbaccess/source/ui/inc/dbwizsetup.hxx b/dbaccess/source/ui/inc/dbwizsetup.hxx
index 5b863e2..74db493 100644
--- a/dbaccess/source/ui/inc/dbwizsetup.hxx
+++ b/dbaccess/source/ui/inc/dbwizsetup.hxx
@@ -176,7 +176,7 @@ private:
     bool callSaveAsDialog();
     bool IsConnectionUrlRequired();
     DECL_LINK(OnTypeSelected, OGeneralPage*);
-    DECL_LINK(OnChangeCreationMode, OGeneralPageWizard*);
+    DECL_LINK_TYPED(OnChangeCreationMode, OGeneralPageWizard*, void);
     DECL_LINK(OnRecentDocumentSelected, OGeneralPageWizard*);
     DECL_LINK(OnSingleDocumentChosen, OGeneralPageWizard*);
     DECL_LINK_TYPED(ImplClickHdl, OMySQLIntroPageSetup*, void);
commit 0223dd75317b372ab43d58f8e3f7e1ef1b5f826b
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Thu Apr 30 23:29:57 2015 +0200

    Use typed OMySQLIntroPageSetup::SetClickHdl Link
    
    Change-Id: I99c6677bcb1a491ede67322b21f6ca051a2e924d

diff --git a/dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx b/dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx
index 58395ff..4cb177c 100644
--- a/dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx
+++ b/dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx
@@ -217,9 +217,7 @@ namespace dbaui
 
         static VclPtr<OMySQLIntroPageSetup> CreateMySQLIntroTabPage( vcl::Window* _pParent, const SfxItemSet& _rAttrSet );
         ConnectionType      getMySQLMode();
-        Link<>              maClickHdl;
-        void                SetClickHdl( const Link<>& rLink ) { maClickHdl = rLink; }
-        const Link<>&       GetClickHdl() const { return maClickHdl; }
+        void                SetClickHdl( const Link<OMySQLIntroPageSetup *, void>& rLink ) { maClickHdl = rLink; }
         DECL_LINK(ImplClickHdl, OMySQLIntroPageSetup*);
 
     protected:
@@ -232,6 +230,7 @@ namespace dbaui
         VclPtr<RadioButton>         m_pODBCDatabase;
         VclPtr<RadioButton>         m_pJDBCDatabase;
         VclPtr<RadioButton>         m_pNATIVEDatabase;
+        Link<OMySQLIntroPageSetup *, void> maClickHdl;
 
         DECL_LINK(OnSetupModeSelected, RadioButton*);
 
diff --git a/dbaccess/source/ui/dlg/dbwizsetup.cxx b/dbaccess/source/ui/dlg/dbwizsetup.cxx
index 2c04c08..e0c296c 100644
--- a/dbaccess/source/ui/dlg/dbwizsetup.cxx
+++ b/dbaccess/source/ui/dlg/dbwizsetup.cxx
@@ -586,7 +586,7 @@ IMPL_LINK_TYPED(ODbTypeWizDialogSetup, ImplModifiedHdl, OGenericAdministrationPa
     enableButtons( WizardButtonFlags::NEXT, m_bIsConnectable  && (getCurrentState() != PAGE_DBSETUPWIZARD_FINAL));
 }
 
-IMPL_LINK(ODbTypeWizDialogSetup, ImplClickHdl, OMySQLIntroPageSetup*, _pMySQLIntroPageSetup)
+IMPL_LINK_TYPED(ODbTypeWizDialogSetup, ImplClickHdl, OMySQLIntroPageSetup*, _pMySQLIntroPageSetup, void)
 {
     OUString sURLPrefix;
     switch( _pMySQLIntroPageSetup->getMySQLMode() )
@@ -602,7 +602,6 @@ IMPL_LINK(ODbTypeWizDialogSetup, ImplClickHdl, OMySQLIntroPageSetup*, _pMySQLInt
             break;
     }
     activatePath( static_cast<PathId>(m_pCollection->getIndexOf(sURLPrefix) + 1), true);
-    return sal_True;
 }
 
 IMPL_LINK(ODbTypeWizDialogSetup, OnChangeCreationMode, OGeneralPageWizard*, /*_pGeneralPage*/)
diff --git a/dbaccess/source/ui/inc/dbwizsetup.hxx b/dbaccess/source/ui/inc/dbwizsetup.hxx
index 310a711..5b863e2 100644
--- a/dbaccess/source/ui/inc/dbwizsetup.hxx
+++ b/dbaccess/source/ui/inc/dbwizsetup.hxx
@@ -179,7 +179,7 @@ private:
     DECL_LINK(OnChangeCreationMode, OGeneralPageWizard*);
     DECL_LINK(OnRecentDocumentSelected, OGeneralPageWizard*);
     DECL_LINK(OnSingleDocumentChosen, OGeneralPageWizard*);
-    DECL_LINK(ImplClickHdl, OMySQLIntroPageSetup*);
+    DECL_LINK_TYPED(ImplClickHdl, OMySQLIntroPageSetup*, void);
     DECL_LINK_TYPED(ImplModifiedHdl, OGenericAdministrationPage const *, void);
 };
 
commit 1c806abb33bc63c9356b09077c3f87750bcc1343
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Thu Apr 30 22:59:43 2015 +0200

    Use typed OGenericAdministrationPage::SetModifiedHandler Link
    
    Change-Id: Ia605aeb2a9936f3c60db179420805a3e986fd64b

diff --git a/dbaccess/source/ui/dlg/adminpages.hxx b/dbaccess/source/ui/dlg/adminpages.hxx
index 74cc29c..a7d2843 100644
--- a/dbaccess/source/ui/dlg/adminpages.hxx
+++ b/dbaccess/source/ui/dlg/adminpages.hxx
@@ -93,7 +93,7 @@ namespace dbaui
                                         ,public ::svt::IWizardPageController
     {
     private:
-        Link<>          m_aModifiedHandler;     /// to be called if something on the page has been modified
+        Link<OGenericAdministrationPage const *, void> m_aModifiedHandler; /// to be called if something on the page has been modified
         bool        m_abEnableRoadmap;
     protected:
         IDatabaseSettingsDialog*   m_pAdminDialog;
@@ -104,7 +104,7 @@ namespace dbaui
     public:
         OGenericAdministrationPage(vcl::Window* _pParent, const OString& _rId, const OUString& _rUIXMLDescription, const SfxItemSet& _rAttrSet);
         /// set a handler which gets called every time something on the page has been modified
-        void SetModifiedHandler(const Link<>& _rHandler) { m_aModifiedHandler = _rHandler; }
+        void SetModifiedHandler(const Link<OGenericAdministrationPage const *, void>& _rHandler) { m_aModifiedHandler = _rHandler; }
 
         /** Sets the ParentDialog
             @param  _pAdminDialog
@@ -160,7 +160,7 @@ namespace dbaui
         virtual void    ActivatePage() SAL_OVERRIDE;
 
     protected:
-        void callModifiedHdl() const { if (m_aModifiedHandler.IsSet()) m_aModifiedHandler.Call((void*)this); }
+        void callModifiedHdl() const { if (m_aModifiedHandler.IsSet()) m_aModifiedHandler.Call(this); }
 
         /// called from within DeactivatePage. The page is allowed to be deactivated if this method returns sal_True
         virtual bool prepareLeave() { return true; }
diff --git a/dbaccess/source/ui/dlg/dbwizsetup.cxx b/dbaccess/source/ui/dlg/dbwizsetup.cxx
index f7fe59f..2c04c08 100644
--- a/dbaccess/source/ui/dlg/dbwizsetup.cxx
+++ b/dbaccess/source/ui/dlg/dbwizsetup.cxx
@@ -574,7 +574,7 @@ VclPtr<TabPage> ODbTypeWizDialogSetup::createPage(WizardState _nState)
     return pPage;
 }
 
-IMPL_LINK(ODbTypeWizDialogSetup, ImplModifiedHdl, OGenericAdministrationPage*, _pConnectionPageSetup)
+IMPL_LINK_TYPED(ODbTypeWizDialogSetup, ImplModifiedHdl, OGenericAdministrationPage const *, _pConnectionPageSetup, void)
 {
     m_bIsConnectable = _pConnectionPageSetup->GetRoadmapStateValue( );
     enableState(PAGE_DBSETUPWIZARD_FINAL, m_bIsConnectable);
@@ -584,7 +584,6 @@ IMPL_LINK(ODbTypeWizDialogSetup, ImplModifiedHdl, OGenericAdministrationPage*, _
     else
         enableButtons( WizardButtonFlags::FINISH, m_bIsConnectable);
     enableButtons( WizardButtonFlags::NEXT, m_bIsConnectable  && (getCurrentState() != PAGE_DBSETUPWIZARD_FINAL));
-    return sal_True;
 }
 
 IMPL_LINK(ODbTypeWizDialogSetup, ImplClickHdl, OMySQLIntroPageSetup*, _pMySQLIntroPageSetup)
diff --git a/dbaccess/source/ui/inc/dbwizsetup.hxx b/dbaccess/source/ui/inc/dbwizsetup.hxx
index 7992666..310a711 100644
--- a/dbaccess/source/ui/inc/dbwizsetup.hxx
+++ b/dbaccess/source/ui/inc/dbwizsetup.hxx
@@ -180,7 +180,7 @@ private:
     DECL_LINK(OnRecentDocumentSelected, OGeneralPageWizard*);
     DECL_LINK(OnSingleDocumentChosen, OGeneralPageWizard*);
     DECL_LINK(ImplClickHdl, OMySQLIntroPageSetup*);
-    DECL_LINK(ImplModifiedHdl, OGenericAdministrationPage*);
+    DECL_LINK_TYPED(ImplModifiedHdl, OGenericAdministrationPage const *, void);
 };
 
 }   // namespace dbaui
commit 87fabc0f83f0e67a2f5ba9b0588f1d4523e0a9ed
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Thu Apr 30 22:35:21 2015 +0200

    Use typed OTextConnectionHelper::SetClickHandler Link
    
    Change-Id: I4d60400f4cc3f34529d632e52b676007f87ff646

diff --git a/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx b/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx
index b01a1bb..405963e 100644
--- a/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx
+++ b/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx
@@ -85,11 +85,10 @@ using namespace ::com::sun::star;
         OConnectionTabPageSetup::dispose();
     }
 
-    IMPL_LINK(OTextConnectionPageSetup, ImplGetExtensionHdl, OTextConnectionHelper*, /*_pTextConnectionHelper*/)
+    IMPL_LINK_NOARG_TYPED(OTextConnectionPageSetup, ImplGetExtensionHdl, OTextConnectionHelper*, void)
     {
         SetRoadmapStateValue(!m_pTextConnectionHelper->GetExtension().isEmpty() && OConnectionTabPageSetup::checkTestConnection());
         callModifiedHdl();
-        return sal_True;
     }
 
     bool OTextConnectionPageSetup::checkTestConnection()
diff --git a/dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx b/dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx
index 0f2c026..58395ff 100644
--- a/dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx
+++ b/dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx
@@ -74,7 +74,7 @@ namespace dbaui
         bool    checkTestConnection() SAL_OVERRIDE;
 
     private:
-        DECL_LINK(ImplGetExtensionHdl, OTextConnectionHelper*);
+        DECL_LINK_TYPED(ImplGetExtensionHdl, OTextConnectionHelper*, void);
     };
 
     // OLDAPConnectionPageSetup
diff --git a/dbaccess/source/ui/dlg/TextConnectionHelper.hxx b/dbaccess/source/ui/dlg/TextConnectionHelper.hxx
index c847fe4..2d78a73 100644
--- a/dbaccess/source/ui/dlg/TextConnectionHelper.hxx
+++ b/dbaccess/source/ui/dlg/TextConnectionHelper.hxx
@@ -75,7 +75,7 @@ namespace dbaui
         OUString    m_aTextSeparatorList;
         OUString    m_aTextNone;
         OUString    m_aOldExtension;
-        Link<>      m_aGetExtensionHandler; /// to be called if a new type is selected
+        Link<OTextConnectionHelper*, void> m_aGetExtensionHandler; /// to be called if a new type is selected
 
         short       m_nAvailableSections;
 
@@ -95,7 +95,7 @@ namespace dbaui
         void        implInitControls(const SfxItemSet& _rSet, bool _bValid);
         void        fillControls(::std::vector< ISaveValueWrapper* >& _rControlList);
         void        fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList);
-        void        SetClickHandler(const Link<>& _rHandler) { m_aGetExtensionHandler = _rHandler; }
+        void        SetClickHandler(const Link<OTextConnectionHelper*, void>& _rHandler) { m_aGetExtensionHandler = _rHandler; }
         OUString    GetExtension();
         bool        FillItemSet( SfxItemSet& rSet, const bool bChangedSomething );
         bool        prepareLeave();


More information about the Libreoffice-commits mailing list