[Libreoffice-commits] core.git: 3 commits - cui/source include/svtools svtools/source svx/source

Noel Grandin noel at peralex.com
Mon Aug 17 01:58:54 PDT 2015


 cui/source/dialogs/cuigaldlg.cxx             |    4 +---
 cui/source/inc/cuigaldlg.hxx                 |    2 +-
 cui/source/inc/optpath.hxx                   |    2 +-
 cui/source/options/optjava.cxx               |    3 +--
 cui/source/options/optjava.hxx               |    2 +-
 cui/source/options/optpath.cxx               |    3 +--
 include/svtools/PlaceEditDialog.hxx          |    3 ++-
 include/svtools/ServerDetailsControls.hxx    |    4 ++--
 include/svtools/dialogclosedlistener.hxx     |    7 ++-----
 include/svtools/editbrowsebox.hxx            |    9 +++++----
 svtools/source/dialogs/PlaceEditDialog.cxx   |    9 +++++++--
 svtools/source/misc/dialogclosedlistener.cxx |    4 ++--
 svx/source/fmcomp/gridcell.cxx               |    7 +++----
 svx/source/inc/gridcell.hxx                  |    2 +-
 14 files changed, 30 insertions(+), 31 deletions(-)

New commits:
commit 9bb2c28a1725e15988307fd0ac3b398596b70615
Author: Noel Grandin <noel at peralex.com>
Date:   Mon Aug 17 10:34:55 2015 +0200

    make Link<> typed
    
    Change-Id: I50e2b05131604a6073a9234d4319f12b3906ea6d

diff --git a/include/svtools/editbrowsebox.hxx b/include/svtools/editbrowsebox.hxx
index 2eb3632..262d9c1 100644
--- a/include/svtools/editbrowsebox.hxx
+++ b/include/svtools/editbrowsebox.hxx
@@ -277,9 +277,10 @@ namespace svt
 
     class SVT_DLLPUBLIC CheckBoxControl : public Control
     {
-        VclPtr<CheckBox>   pBox;
-        Rectangle   aFocusRect;
-        Link<>      m_aClickLink,m_aModifyLink;
+        VclPtr<CheckBox>             pBox;
+        Rectangle                    aFocusRect;
+        Link<VclPtr<CheckBox>,void>  m_aClickLink;
+        Link<>                       m_aModifyLink;
 
     public:
         CheckBoxControl(vcl::Window* pParent, WinBits nWinStyle = 0);
@@ -294,7 +295,7 @@ namespace svt
         virtual void DataChanged( const DataChangedEvent& _rEvent ) SAL_OVERRIDE;
         virtual void Resize() SAL_OVERRIDE;
 
-        void SetClickHdl(const Link<>& rHdl) {m_aClickLink = rHdl;}
+        void SetClickHdl(const Link<VclPtr<CheckBox>,void>& rHdl) {m_aClickLink = rHdl;}
 
         void SetModifyHdl(const Link<>& rHdl) {m_aModifyLink = rHdl;}
 
diff --git a/svx/source/fmcomp/gridcell.cxx b/svx/source/fmcomp/gridcell.cxx
index a5596d1..6863c95 100644
--- a/svx/source/fmcomp/gridcell.cxx
+++ b/svx/source/fmcomp/gridcell.cxx
@@ -2692,7 +2692,7 @@ DbFilterField::DbFilterField(const Reference< XComponentContext >& rxContext,DbG
 DbFilterField::~DbFilterField()
 {
     if (m_nControlClass == ::com::sun::star::form::FormComponentType::CHECKBOX)
-        static_cast<CheckBoxControl*>(m_pWindow.get())->SetClickHdl( Link<>() );
+        static_cast<CheckBoxControl*>(m_pWindow.get())->SetClickHdl( Link<VclPtr<CheckBox>,void>() );
 
 }
 
@@ -3114,7 +3114,7 @@ void DbFilterField::UpdateFromField(const Reference< XColumn >& /*_rxField*/, co
 }
 
 
-IMPL_LINK_NOARG(DbFilterField, OnClick)
+IMPL_LINK_NOARG_TYPED(DbFilterField, OnClick, VclPtr<CheckBox>, void)
 {
     TriState eState = static_cast<CheckBoxControl*>(m_pWindow.get())->GetBox().GetState();
     OUString aText;
@@ -3136,7 +3136,6 @@ IMPL_LINK_NOARG(DbFilterField, OnClick)
         m_aText = aText;
         m_aCommitLink.Call(this);
     }
-    return 1;
 }
 
 TYPEINIT0(FmXGridCell);
@@ -3857,7 +3856,7 @@ void FmXCheckBoxCell::disposing()
     m_aItemListeners.disposeAndClear(aEvt);
     m_aActionListeners.disposeAndClear(aEvt);
 
-    static_cast< CheckBoxControl& >( m_pCellControl->GetWindow() ).SetClickHdl(Link<>());
+    static_cast< CheckBoxControl& >( m_pCellControl->GetWindow() ).SetClickHdl(Link<VclPtr<CheckBox>,void>());
     m_pBox = NULL;
 
     FmXDataCell::disposing();
diff --git a/svx/source/inc/gridcell.hxx b/svx/source/inc/gridcell.hxx
index e413fa1..1ce7f14 100644
--- a/svx/source/inc/gridcell.hxx
+++ b/svx/source/inc/gridcell.hxx
@@ -711,7 +711,7 @@ protected:
 protected:
     void SetList(const ::com::sun::star::uno::Any& rItems, bool bComboBox);
     void CreateControl(vcl::Window* pParent, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& xModel);
-    DECL_LINK( OnClick, void* );
+    DECL_LINK_TYPED( OnClick, VclPtr<CheckBox>, void );
 };
 
 
commit 23fbcf7da54fa7f0098a534c1a9add8efcb02f87
Author: Noel Grandin <noel at peralex.com>
Date:   Mon Aug 17 10:28:46 2015 +0200

    make Link<> typed
    
    Change-Id: Ie18b1dda4039b22370a53d0ad8092a4a8b3899d7

diff --git a/cui/source/dialogs/cuigaldlg.cxx b/cui/source/dialogs/cuigaldlg.cxx
index 1a588e2..387ee3c 100644
--- a/cui/source/dialogs/cuigaldlg.cxx
+++ b/cui/source/dialogs/cuigaldlg.cxx
@@ -1274,14 +1274,12 @@ IMPL_LINK_NOARG(TPGalleryThemeProperties, EndSearchProgressHdl)
 
 
 
-IMPL_LINK( TPGalleryThemeProperties, DialogClosedHdl, css::ui::dialogs::DialogClosedEvent*, pEvt )
+IMPL_LINK_TYPED( TPGalleryThemeProperties, DialogClosedHdl, css::ui::dialogs::DialogClosedEvent*, pEvt, void )
 {
     DBG_ASSERT( xFolderPicker.is(), "TPGalleryThemeProperties::DialogClosedHdl(): no folder picker" );
 
     OUString sURL = xFolderPicker->getDirectory();
     StartSearchFiles( sURL, pEvt->DialogResult );
-
-    return 0L;
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/inc/cuigaldlg.hxx b/cui/source/inc/cuigaldlg.hxx
index f7a2e3f..a7d987e 100644
--- a/cui/source/inc/cuigaldlg.hxx
+++ b/cui/source/inc/cuigaldlg.hxx
@@ -287,7 +287,7 @@ class TPGalleryThemeProperties : public SfxTabPage
                         DECL_LINK( DClickFoundHdl, void* );
                         DECL_LINK_TYPED( PreviewTimerHdl, Timer*, void );
                         DECL_LINK(EndSearchProgressHdl, void *);
-                        DECL_LINK( DialogClosedHdl, css::ui::dialogs::DialogClosedEvent* );
+                        DECL_LINK_TYPED( DialogClosedHdl, css::ui::dialogs::DialogClosedEvent*, void );
 
 public:
                         TPGalleryThemeProperties( vcl::Window* pWindow, const SfxItemSet& rSet );
diff --git a/cui/source/inc/optpath.hxx b/cui/source/inc/optpath.hxx
index 1282693..2b443b4 100644
--- a/cui/source/inc/optpath.hxx
+++ b/cui/source/inc/optpath.hxx
@@ -60,7 +60,7 @@ private:
     DECL_LINK(  HeaderSelect_Impl, HeaderBar * );
     DECL_LINK(  HeaderEndDrag_Impl, HeaderBar * );
 
-    DECL_LINK( DialogClosedHdl, css::ui::dialogs::DialogClosedEvent* );
+    DECL_LINK_TYPED( DialogClosedHdl, css::ui::dialogs::DialogClosedEvent*, void );
 
     void        GetPathList( sal_uInt16 _nPathHandle, OUString& _rInternalPath,
                              OUString& _rUserPath, OUString& _rWritablePath, bool& _rReadOnly );
diff --git a/cui/source/options/optjava.cxx b/cui/source/options/optjava.cxx
index 6001535..6da4508 100644
--- a/cui/source/options/optjava.cxx
+++ b/cui/source/options/optjava.cxx
@@ -421,7 +421,7 @@ IMPL_LINK_NOARG(SvxJavaOptionsPage, StartFolderPickerHdl)
 
 
 
-IMPL_LINK( SvxJavaOptionsPage, DialogClosedHdl, DialogClosedEvent*, pEvt )
+IMPL_LINK_TYPED( SvxJavaOptionsPage, DialogClosedHdl, DialogClosedEvent*, pEvt, void )
 {
     if ( RET_OK == pEvt->DialogResult )
     {
@@ -429,7 +429,6 @@ IMPL_LINK( SvxJavaOptionsPage, DialogClosedHdl, DialogClosedEvent*, pEvt )
 
         AddFolder( xFolderPicker->getDirectory() );
     }
-    return 0L;
 }
 
 
diff --git a/cui/source/options/optjava.hxx b/cui/source/options/optjava.hxx
index 178b0c0..06bd595 100644
--- a/cui/source/options/optjava.hxx
+++ b/cui/source/options/optjava.hxx
@@ -93,7 +93,7 @@ private:
     DECL_LINK_TYPED(ResetHdl_Impl, Idle *, void);
 
     DECL_LINK(              StartFolderPickerHdl, void * );
-    DECL_LINK(              DialogClosedHdl, css::ui::dialogs::DialogClosedEvent* );
+    DECL_LINK_TYPED(        DialogClosedHdl, css::ui::dialogs::DialogClosedEvent*, void );
 
     DECL_LINK(ExpertConfigHdl_Impl, void *);
 
diff --git a/cui/source/options/optpath.cxx b/cui/source/options/optpath.cxx
index 852c4c0..7468c75 100644
--- a/cui/source/options/optpath.cxx
+++ b/cui/source/options/optpath.cxx
@@ -693,7 +693,7 @@ IMPL_LINK( SvxPathTabPage, HeaderEndDrag_Impl, HeaderBar*, pBar )
 
 
 
-IMPL_LINK( SvxPathTabPage, DialogClosedHdl, DialogClosedEvent*, pEvt )
+IMPL_LINK_TYPED( SvxPathTabPage, DialogClosedHdl, DialogClosedEvent*, pEvt, void )
 {
     if ( RET_OK == pEvt->DialogResult )
     {
@@ -702,7 +702,6 @@ IMPL_LINK( SvxPathTabPage, DialogClosedHdl, DialogClosedEvent*, pEvt )
         OUString sURL = xFolderPicker->getDirectory();
         ChangeCurrentEntry( sURL );
     }
-    return 0L;
 }
 
 
diff --git a/include/svtools/dialogclosedlistener.hxx b/include/svtools/dialogclosedlistener.hxx
index 8155ffa..0330451 100644
--- a/include/svtools/dialogclosedlistener.hxx
+++ b/include/svtools/dialogclosedlistener.hxx
@@ -42,16 +42,13 @@ namespace svt
     private:
         /**
             This link will be called when the dialog was closed.
-
-            The link must have the type:
-            DECL_LINK( DialogClosedHdl, ::com::sun::star::ui::dialogs::DialogClosedEvent* );
         */
-        Link<>  m_aDialogClosedLink;
+        Link<css::ui::dialogs::DialogClosedEvent*, void>  m_aDialogClosedLink;
 
     public:
         DialogClosedListener();
 
-        inline void SetDialogClosedLink( const Link<>& rLink ) { m_aDialogClosedLink = rLink; }
+        inline void SetDialogClosedLink( const Link<css::ui::dialogs::DialogClosedEvent*,void>& rLink ) { m_aDialogClosedLink = rLink; }
 
         // XDialogClosedListener methods
         virtual void SAL_CALL   dialogClosed( const ::com::sun::star::ui::dialogs::DialogClosedEvent& aEvent ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
diff --git a/svtools/source/misc/dialogclosedlistener.cxx b/svtools/source/misc/dialogclosedlistener.cxx
index b34f2ab..704839f 100644
--- a/svtools/source/misc/dialogclosedlistener.cxx
+++ b/svtools/source/misc/dialogclosedlistener.cxx
@@ -41,7 +41,7 @@ namespace svt
     {
         if ( m_aDialogClosedLink.IsSet() )
         {
-            ::com::sun::star::ui::dialogs::DialogClosedEvent aEvt( aEvent );
+            css::ui::dialogs::DialogClosedEvent aEvt( aEvent );
             m_aDialogClosedLink.Call( &aEvt );
         }
     }
@@ -49,7 +49,7 @@ namespace svt
     // XEventListener methods
     void SAL_CALL DialogClosedListener::disposing( const EventObject& ) throw(RuntimeException, std::exception)
     {
-        m_aDialogClosedLink = Link<>();
+        m_aDialogClosedLink = Link<css::ui::dialogs::DialogClosedEvent*,void>();
     }
 
 
commit 83d9a900fd61d558cdae940ea1c6300bbeb7fab6
Author: Noel Grandin <noel at peralex.com>
Date:   Mon Aug 17 10:16:50 2015 +0200

    make Link<> typed
    
    Change-Id: If802b3ac113217251a9dc38ce1e72ca0fdf61038

diff --git a/include/svtools/PlaceEditDialog.hxx b/include/svtools/PlaceEditDialog.hxx
index c15735e..6ab6c52 100644
--- a/include/svtools/PlaceEditDialog.hxx
+++ b/include/svtools/PlaceEditDialog.hxx
@@ -83,7 +83,8 @@ private:
 
     DECL_LINK ( OKHdl, Button * );
     DECL_LINK ( DelHdl, Button * );
-    DECL_LINK ( EditHdl, void * );
+    DECL_LINK_TYPED ( EditHdl, DetailsContainer*, void );
+    DECL_LINK ( ModifyHdl, void* );
     DECL_LINK ( SelectTypeHdl, void * );
     DECL_LINK ( EditLabelHdl, void * );
     DECL_LINK ( EditUsernameHdl, void * );
diff --git a/include/svtools/ServerDetailsControls.hxx b/include/svtools/ServerDetailsControls.hxx
index 691f528..f3f02fa 100644
--- a/include/svtools/ServerDetailsControls.hxx
+++ b/include/svtools/ServerDetailsControls.hxx
@@ -25,7 +25,7 @@
 class DetailsContainer
 {
     protected:
-        Link<>                 m_aChangeHdl;
+        Link<DetailsContainer*,void> m_aChangeHdl;
         VclPtr<VclGrid>        m_pDetailsGrid;
         VclPtr<VclHBox>        m_pHostBox;
         VclPtr<Edit>           m_pEDHost;
@@ -40,7 +40,7 @@ class DetailsContainer
         DetailsContainer( VclBuilderContainer* pBuilder );
         virtual ~DetailsContainer( );
 
-        void setChangeHdl( const Link<>& rLink ) { m_aChangeHdl = rLink; }
+        void setChangeHdl( const Link<DetailsContainer*,void>& rLink ) { m_aChangeHdl = rLink; }
 
         virtual void show( bool bShow = true );
         virtual INetURLObject getUrl( );
diff --git a/svtools/source/dialogs/PlaceEditDialog.cxx b/svtools/source/dialogs/PlaceEditDialog.cxx
index 77526de..5b8bba5 100644
--- a/svtools/source/dialogs/PlaceEditDialog.cxx
+++ b/svtools/source/dialogs/PlaceEditDialog.cxx
@@ -81,7 +81,7 @@ PlaceEditDialog::PlaceEditDialog(vcl::Window* pParent, const std::shared_ptr<Pla
     m_pBTOk->SetClickHdl( LINK( this, PlaceEditDialog, OKHdl) );
     m_pBTDelete->SetClickHdl ( LINK( this, PlaceEditDialog, DelHdl) );
 
-    m_pEDServerName->SetModifyHdl( LINK( this, PlaceEditDialog, EditHdl) );
+    m_pEDServerName->SetModifyHdl( LINK( this, PlaceEditDialog, ModifyHdl) );
     m_pLBServerType->SetSelectHdl( LINK( this, PlaceEditDialog, SelectTypeHdl ) );
 
     InitDetails( );
@@ -296,13 +296,18 @@ IMPL_LINK ( PlaceEditDialog, DelHdl, Button *, )
     return 1;
 }
 
-IMPL_LINK_NOARG( PlaceEditDialog, EditHdl )
+IMPL_LINK_NOARG_TYPED( PlaceEditDialog, EditHdl, DetailsContainer*, void )
 {
     UpdateLabel( );
 
     OUString sUrl = GetServerUrl( );
     OUString sName = OUString( m_pEDServerName->GetText() ).trim( );
     m_pBTOk->Enable( !sName.isEmpty( ) && !sUrl.isEmpty( ) );
+}
+
+IMPL_LINK_NOARG( PlaceEditDialog, ModifyHdl )
+{
+    EditHdl(nullptr);
     return 1;
 }
 


More information about the Libreoffice-commits mailing list