[Libreoffice-commits] core.git: 2 commits - chart2/source cui/source
Noel Grandin
noelgrandin at gmail.com
Tue Jul 7 23:59:43 PDT 2015
chart2/source/controller/dialogs/DataBrowser.cxx | 17 +++++------
chart2/source/controller/dialogs/DataBrowser.hxx | 14 ++++-----
chart2/source/controller/dialogs/dlg_DataEditor.cxx | 8 +----
chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx | 6 +--
chart2/source/controller/dialogs/tp_3D_SceneIllumination.hxx | 2 -
chart2/source/controller/inc/dlg_DataEditor.hxx | 2 -
chart2/source/inc/ModifyListenerCallBack.hxx | 2 -
chart2/source/tools/ModifyListenerCallBack.cxx | 8 ++---
cui/source/customize/cfg.cxx | 3 -
cui/source/inc/cfg.hxx | 15 ---------
10 files changed, 27 insertions(+), 50 deletions(-)
New commits:
commit 4deb5e7168935b71e9eb036c0b47c400934d9e18
Author: Noel Grandin <noelgrandin at gmail.com>
Date: Sun Jun 28 18:43:54 2015 +0200
cui: typed Link<>
Change-Id: I39541a18f3d28ff1b428d5a77e36c3bf4c43d6b5
diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx
index c013d6a..2481d48 100644
--- a/cui/source/customize/cfg.cxx
+++ b/cui/source/customize/cfg.cxx
@@ -4771,9 +4771,6 @@ IMPL_LINK(SvxNewToolbarDialog, ModifyHdl, Edit*, pEdit)
{
(void)pEdit;
- if(aCheckNameHdl.IsSet())
- m_pBtnOK->Enable(aCheckNameHdl.Call(this) > 0);
-
return 0;
}
diff --git a/cui/source/inc/cfg.hxx b/cui/source/inc/cfg.hxx
index 4cb324e..6a0a9ca 100644
--- a/cui/source/inc/cfg.hxx
+++ b/cui/source/inc/cfg.hxx
@@ -531,7 +531,6 @@ public:
class SvxToolbarEntriesListBox : public SvxMenuEntriesListBox
{
Size m_aCheckBoxImageSizePixel;
- Link<> m_aChangedListener;
SvLBoxButtonData* m_pButtonData;
VclPtr<SvxConfigPage> pPage;
@@ -551,11 +550,6 @@ public:
virtual ~SvxToolbarEntriesListBox();
virtual void dispose() SAL_OVERRIDE;
- void SetChangedListener( const Link<>& aChangedListener )
- { m_aChangedListener = aChangedListener; }
-
- const Link<>& GetChangedListener() const { return m_aChangedListener; }
-
Size GetCheckBoxPixelSize() const
{ return m_aCheckBoxImageSizePixel; }
@@ -672,8 +666,6 @@ private:
VclPtr<Edit> m_pEdtName;
VclPtr<OKButton> m_pBtnOK;
- Link<> aCheckNameHdl;
-
DECL_LINK(ModifyHdl, Edit*);
public:
@@ -688,13 +680,6 @@ public:
return m_pEdtName->GetText();
}
- void SetCheckNameHdl( const Link<>& rLink, bool bCheckImmediately = false )
- {
- aCheckNameHdl = rLink;
- if ( bCheckImmediately )
- m_pBtnOK->Enable( rLink.Call( this ) > 0 );
- }
-
void SetEditHelpId( const OString& aHelpId)
{
m_pEdtName->SetHelpId(aHelpId);
commit 2b5ebcc45b598f7e778abd76184342b86300c3b0
Author: Noel Grandin <noelgrandin at gmail.com>
Date: Sun Jun 28 18:15:45 2015 +0200
chart2: typed Link<>
Change-Id: I98c882d64cb4d6430390ac705f3f2208dd523598
diff --git a/chart2/source/controller/dialogs/DataBrowser.cxx b/chart2/source/controller/dialogs/DataBrowser.cxx
index cf01349..af07f63 100644
--- a/chart2/source/controller/dialogs/DataBrowser.cxx
+++ b/chart2/source/controller/dialogs/DataBrowser.cxx
@@ -174,7 +174,7 @@ public:
void SetGetFocusHdl( const Link<>& rLink );
- void SetEditChangedHdl( const Link<> & rLink );
+ void SetEditChangedHdl( const Link<SeriesHeaderEdit*,void> & rLink );
bool HasFocus() const;
@@ -183,7 +183,7 @@ private:
VclPtr< SeriesHeaderEdit > m_spSeriesName;
VclPtr< FixedText > m_spColorBar;
VclPtr< OutputDevice> m_pDevice;
- Link<> m_aChangeLink;
+ Link<SeriesHeaderEdit*,void> m_aChangeLink;
void notifyChanges();
DECL_LINK( SeriesNameChanged, void * );
@@ -324,7 +324,7 @@ void SeriesHeader::Hide()
m_spColorBar->Hide();
}
-void SeriesHeader::SetEditChangedHdl( const Link<> & rLink )
+void SeriesHeader::SetEditChangedHdl( const Link<SeriesHeaderEdit*,void> & rLink )
{
m_aChangeLink = rLink;
}
@@ -593,7 +593,7 @@ void DataBrowser::RenewTable()
clearHeaders();
const DataBrowserModel::tDataHeaderVector& aHeaders( m_apDataBrowserModel->getDataHeaders());
Link<> aFocusLink( LINK( this, DataBrowser, SeriesHeaderGotFocus ));
- Link<> aSeriesHeaderChangedLink( LINK( this, DataBrowser, SeriesHeaderChanged ));
+ Link<impl::SeriesHeaderEdit*,void> aSeriesHeaderChangedLink( LINK( this, DataBrowser, SeriesHeaderChanged ));
for( DataBrowserModel::tDataHeaderVector::const_iterator aIt( aHeaders.begin());
aIt != aHeaders.end(); ++aIt )
@@ -752,7 +752,7 @@ void DataBrowser::CursorMoved()
m_aCursorMovedHdlLink.Call( this );
}
-void DataBrowser::SetCellModifiedHdl( const Link<>& rLink )
+void DataBrowser::SetCellModifiedHdl( const Link<DataBrowser*,void>& rLink )
{
m_aCellModifiedLink = rLink;
}
@@ -972,7 +972,7 @@ void DataBrowser::SwapRow()
}
}
-void DataBrowser::SetCursorMovedHdl( const Link<>& rLink )
+void DataBrowser::SetCursorMovedHdl( const Link<DataBrowser*,void>& rLink )
{
m_aCursorMovedHdlLink = rLink;
}
@@ -1231,7 +1231,7 @@ void DataBrowser::RenewSeriesHeaders()
clearHeaders();
DataBrowserModel::tDataHeaderVector aHeaders( m_apDataBrowserModel->getDataHeaders());
Link<> aFocusLink( LINK( this, DataBrowser, SeriesHeaderGotFocus ));
- Link<> aSeriesHeaderChangedLink( LINK( this, DataBrowser, SeriesHeaderChanged ));
+ Link<impl::SeriesHeaderEdit*,void> aSeriesHeaderChangedLink( LINK( this, DataBrowser, SeriesHeaderChanged ));
for( DataBrowserModel::tDataHeaderVector::const_iterator aIt( aHeaders.begin());
aIt != aHeaders.end(); ++aIt )
@@ -1328,7 +1328,7 @@ IMPL_LINK( DataBrowser, SeriesHeaderGotFocus, impl::SeriesHeaderEdit*, pEdit )
return 0;
}
-IMPL_LINK( DataBrowser, SeriesHeaderChanged, impl::SeriesHeaderEdit*, pEdit )
+IMPL_LINK_TYPED( DataBrowser, SeriesHeaderChanged, impl::SeriesHeaderEdit*, pEdit, void )
{
if( pEdit )
{
@@ -1353,7 +1353,6 @@ IMPL_LINK( DataBrowser, SeriesHeaderChanged, impl::SeriesHeaderEdit*, pEdit )
}
}
}
- return 0;
}
} // namespace chart
diff --git a/chart2/source/controller/dialogs/DataBrowser.hxx b/chart2/source/controller/dialogs/DataBrowser.hxx
index 948fa30..c038181 100644
--- a/chart2/source/controller/dialogs/DataBrowser.hxx
+++ b/chart2/source/controller/dialogs/DataBrowser.hxx
@@ -127,9 +127,9 @@ public:
void SwapRow();
void SwapColumn();
- void SetCursorMovedHdl( const Link<>& rLink );
+ void SetCursorMovedHdl( const Link<DataBrowser*,void>& rLink );
- void SetCellModifiedHdl( const Link<>& rLink );
+ void SetCellModifiedHdl( const Link<DataBrowser*,void>& rLink );
/// confirms all pending changes to be ready to be closed
bool EndEditing();
@@ -169,12 +169,12 @@ private:
VclPtr<Edit> m_aTextEditField;
/// note: m_aNumberEditField must precede this member!
- ::svt::CellControllerRef m_rNumberEditController;
+ ::svt::CellControllerRef m_rNumberEditController;
/// note: m_aTextEditField must precede this member!
- ::svt::CellControllerRef m_rTextEditController;
+ ::svt::CellControllerRef m_rTextEditController;
- Link<> m_aCursorMovedHdlLink;
- Link<> m_aCellModifiedLink;
+ Link<DataBrowser*,void> m_aCursorMovedHdlLink;
+ Link<DataBrowser*,void> m_aCellModifiedLink;
void clearHeaders();
void RenewTable();
@@ -184,7 +184,7 @@ private:
static OUString GetRowString( sal_Int32 nRow );
DECL_LINK( SeriesHeaderGotFocus, impl::SeriesHeaderEdit* );
- DECL_LINK( SeriesHeaderChanged, impl::SeriesHeaderEdit* );
+ DECL_LINK_TYPED( SeriesHeaderChanged, impl::SeriesHeaderEdit*, void );
DataBrowser( const DataBrowser & ) SAL_DELETED_FUNCTION;
};
diff --git a/chart2/source/controller/dialogs/dlg_DataEditor.cxx b/chart2/source/controller/dialogs/dlg_DataEditor.cxx
index ceb101b..13d416f 100644
--- a/chart2/source/controller/dialogs/dlg_DataEditor.cxx
+++ b/chart2/source/controller/dialogs/dlg_DataEditor.cxx
@@ -69,7 +69,7 @@ DataEditor::DataEditor(vcl::Window* pParent,
m_pTbxData->SetSelectHdl( LINK( this, DataEditor, ToolboxHdl ));
- m_xBrwData->SetCursorMovedHdl( LINK( this, DataEditor, BrowserCursorMovedHdl ));
+ m_xBrwData->SetCursorMovedHdl( LINK( this, DataEditor, BrowserCursorMovedHdl ));
UpdateData();
GrabFocus();
@@ -132,10 +132,10 @@ IMPL_LINK_NOARG_TYPED(DataEditor, ToolboxHdl, ToolBox *, void)
}
// refresh toolbar icons according to currently selected cell in browse box
-IMPL_LINK_NOARG(DataEditor, BrowserCursorMovedHdl)
+IMPL_LINK_NOARG_TYPED(DataEditor, BrowserCursorMovedHdl, DataBrowser*, void)
{
if( m_bReadOnly )
- return 0;
+ return;
bool bIsDataValid = m_xBrwData->IsEnableItem();
@@ -147,8 +147,6 @@ IMPL_LINK_NOARG(DataEditor, BrowserCursorMovedHdl)
m_pTbxData->EnableItem( TBI_DATA_SWAP_COL, bIsDataValid && m_xBrwData->MaySwapColumns() );
m_pTbxData->EnableItem( TBI_DATA_SWAP_ROW, bIsDataValid && m_xBrwData->MaySwapRows() );
-
- return 0;
}
// disable all modifying controls
diff --git a/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx b/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx
index a8de059..04c7254 100644
--- a/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx
+++ b/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx
@@ -315,10 +315,10 @@ void ThreeD_SceneIllumination_TabPage::dispose()
TabPage::dispose();
}
-IMPL_LINK_NOARG(ThreeD_SceneIllumination_TabPage, fillControlsFromModel)
+IMPL_LINK_NOARG_TYPED(ThreeD_SceneIllumination_TabPage, fillControlsFromModel, void*, void)
{
if( m_bInCommitToModel )//don't read own changes
- return 0;
+ return;
sal_Int32 nL=0;
for( nL=0; nL<8; nL++)
@@ -329,8 +329,6 @@ IMPL_LINK_NOARG(ThreeD_SceneIllumination_TabPage, fillControlsFromModel)
lcl_selectColor( *m_pLB_AmbientLight, lcl_getAmbientColor( m_xSceneProperties ));
this->updatePreview();
-
- return 0;
}
void ThreeD_SceneIllumination_TabPage::applyLightSourceToModel( sal_uInt32 nLightNumber )
diff --git a/chart2/source/controller/dialogs/tp_3D_SceneIllumination.hxx b/chart2/source/controller/dialogs/tp_3D_SceneIllumination.hxx
index bb96e85..a94f1dc 100644
--- a/chart2/source/controller/dialogs/tp_3D_SceneIllumination.hxx
+++ b/chart2/source/controller/dialogs/tp_3D_SceneIllumination.hxx
@@ -69,7 +69,7 @@ private:
void updatePreview();
private:
- DECL_LINK(fillControlsFromModel, void *);
+ DECL_LINK_TYPED(fillControlsFromModel, void *, void);
void applyLightSourceToModel( sal_uInt32 nLightNumber );
void applyLightSourcesToModel();
diff --git a/chart2/source/controller/inc/dlg_DataEditor.hxx b/chart2/source/controller/inc/dlg_DataEditor.hxx
index 72606ab..a4041ea 100644
--- a/chart2/source/controller/inc/dlg_DataEditor.hxx
+++ b/chart2/source/controller/inc/dlg_DataEditor.hxx
@@ -76,7 +76,7 @@ private:
/// handles actions of the toolbox
DECL_LINK_TYPED( ToolboxHdl, ToolBox*, void );
/// is called, if the cursor of the table has moved
- DECL_LINK( BrowserCursorMovedHdl, void*);
+ DECL_LINK_TYPED( BrowserCursorMovedHdl, DataBrowser*, void);
/// this is called if MiscOptions change, esp. High-Contrast mode
DECL_LINK( MiscHdl, void* );
/// is called when the width of any column in the edit browsebox has changed
diff --git a/chart2/source/inc/ModifyListenerCallBack.hxx b/chart2/source/inc/ModifyListenerCallBack.hxx
index 8f5b6c5..60fff63 100644
--- a/chart2/source/inc/ModifyListenerCallBack.hxx
+++ b/chart2/source/inc/ModifyListenerCallBack.hxx
@@ -36,7 +36,7 @@ class ModifyListenerCallBack_impl;
class OOO_DLLPUBLIC_CHARTTOOLS ModifyListenerCallBack
{
public:
- explicit ModifyListenerCallBack( const Link<>& rCallBack );
+ explicit ModifyListenerCallBack( const Link<void*,void>& rCallBack );
virtual ~ModifyListenerCallBack();
diff --git a/chart2/source/tools/ModifyListenerCallBack.cxx b/chart2/source/tools/ModifyListenerCallBack.cxx
index 6be8bce..dd2f281 100644
--- a/chart2/source/tools/ModifyListenerCallBack.cxx
+++ b/chart2/source/tools/ModifyListenerCallBack.cxx
@@ -35,7 +35,7 @@ class ModifyListenerCallBack_impl
, public ModifyListenerCallBack_Base
{
public:
- explicit ModifyListenerCallBack_impl( const Link<>& rCallBack );
+ explicit ModifyListenerCallBack_impl( const Link<void*,void>& rCallBack );
virtual ~ModifyListenerCallBack_impl();
void stopListening();
@@ -49,11 +49,11 @@ public:
using ::cppu::WeakComponentImplHelperBase::disposing;
private:
- Link<> m_aLink;//will be called on modify
+ Link<void*,void> m_aLink;//will be called on modify
Reference< util::XModifyBroadcaster > m_xBroadcaster;//broadcaster to listen at
};
-ModifyListenerCallBack_impl::ModifyListenerCallBack_impl( const Link<>& rCallBack )
+ModifyListenerCallBack_impl::ModifyListenerCallBack_impl( const Link<void*,void>& rCallBack )
: ModifyListenerCallBack_Base( m_aMutex )
, m_aLink( rCallBack )
, m_xBroadcaster(0)
@@ -85,7 +85,7 @@ void ModifyListenerCallBack_impl::stopListening()
}
}
-ModifyListenerCallBack::ModifyListenerCallBack( const Link<>& rCallBack )
+ModifyListenerCallBack::ModifyListenerCallBack( const Link<void*,void>& rCallBack )
: pModifyListener_impl( new ModifyListenerCallBack_impl(rCallBack) )
, m_xModifyListener( pModifyListener_impl )
{
More information about the Libreoffice-commits
mailing list