Kaydet (Commit) 8d16834a authored tarafından Noel Grandin's avatar Noel Grandin

convert Link<> to typed

Change-Id: I80df7c3907fe6ac8a6ee4dddb2caeed28ea1b879
Reviewed-on: https://gerrit.libreoffice.org/18784Reviewed-by: 's avatarNoel Grandin <noelgrandin@gmail.com>
Tested-by: 's avatarNoel Grandin <noelgrandin@gmail.com>
üst 3d9dd244
......@@ -116,13 +116,13 @@ class ScAppCfg : public ScAppOptions
ScLinkConfigItem aMiscItem;
ScLinkConfigItem aCompatItem;
DECL_LINK( LayoutCommitHdl, void* );
DECL_LINK( InputCommitHdl, void* );
DECL_LINK( RevisionCommitHdl, void* );
DECL_LINK( ContentCommitHdl, void* );
DECL_LINK( SortListCommitHdl, void* );
DECL_LINK( MiscCommitHdl, void* );
DECL_LINK( CompatCommitHdl, void* );
DECL_LINK_TYPED( LayoutCommitHdl, ScLinkConfigItem&, void );
DECL_LINK_TYPED( InputCommitHdl, ScLinkConfigItem&, void );
DECL_LINK_TYPED( RevisionCommitHdl, ScLinkConfigItem&, void );
DECL_LINK_TYPED( ContentCommitHdl, ScLinkConfigItem&, void );
DECL_LINK_TYPED( SortListCommitHdl, ScLinkConfigItem&, void );
DECL_LINK_TYPED( MiscCommitHdl, ScLinkConfigItem&, void );
DECL_LINK_TYPED( CompatCommitHdl, ScLinkConfigItem&, void );
static com::sun::star::uno::Sequence<OUString> GetLayoutPropertyNames();
static com::sun::star::uno::Sequence<OUString> GetInputPropertyNames();
......
......@@ -167,8 +167,8 @@ class ScDocCfg : public ScDocOptions
ScLinkConfigItem aCalcItem;
ScLinkConfigItem aLayoutItem;
DECL_LINK( CalcCommitHdl, void* );
DECL_LINK( LayoutCommitHdl, void* );
DECL_LINK_TYPED( CalcCommitHdl, ScLinkConfigItem&, void );
DECL_LINK_TYPED( LayoutCommitHdl, ScLinkConfigItem&, void );
static com::sun::star::uno::Sequence<OUString> GetCalcPropertyNames();
static com::sun::star::uno::Sequence<OUString> GetLayoutPropertyNames();
......
......@@ -37,12 +37,12 @@ public:
class SC_DLLPUBLIC ScLinkConfigItem : public utl::ConfigItem
{
Link<> aCommitLink;
Link<ScLinkConfigItem&,void> aCommitLink;
public:
ScLinkConfigItem( const OUString& rSubTree );
ScLinkConfigItem( const OUString& rSubTree, ConfigItemMode nMode );
void SetCommitLink( const Link<>& rLink );
void SetCommitLink( const Link<ScLinkConfigItem&,void>& rLink );
virtual void Notify( const com::sun::star::uno::Sequence<OUString>& aPropertyNames ) SAL_OVERRIDE;
virtual void ImplCommit() SAL_OVERRIDE;
......
......@@ -137,9 +137,9 @@ class ScViewCfg : public ScViewOptions
ScLinkConfigItem aDisplayItem;
ScLinkConfigItem aGridItem;
DECL_LINK( LayoutCommitHdl, void* );
DECL_LINK( DisplayCommitHdl, void* );
DECL_LINK( GridCommitHdl, void* );
DECL_LINK_TYPED( LayoutCommitHdl, ScLinkConfigItem&, void );
DECL_LINK_TYPED( DisplayCommitHdl, ScLinkConfigItem&, void );
DECL_LINK_TYPED( GridCommitHdl, ScLinkConfigItem&, void );
static com::sun::star::uno::Sequence<OUString> GetLayoutPropertyNames();
static com::sun::star::uno::Sequence<OUString> GetDisplayPropertyNames();
......
......@@ -575,7 +575,7 @@ ScAppCfg::ScAppCfg() :
}
aCompatItem.SetCommitLink( LINK(this, ScAppCfg, CompatCommitHdl) );
}
IMPL_LINK_NOARG(ScAppCfg, LayoutCommitHdl)
IMPL_LINK_NOARG_TYPED(ScAppCfg, LayoutCommitHdl, ScLinkConfigItem&, void)
{
Sequence<OUString> aNames = GetLayoutPropertyNames();
Sequence<Any> aValues(aNames.getLength());
......@@ -603,11 +603,9 @@ ScAppCfg::ScAppCfg() :
}
}
aLayoutItem.PutProperties(aNames, aValues);
return 0;
}
IMPL_LINK_NOARG(ScAppCfg, InputCommitHdl)
IMPL_LINK_NOARG_TYPED(ScAppCfg, InputCommitHdl, ScLinkConfigItem&, void)
{
Sequence<OUString> aNames = GetInputPropertyNames();
Sequence<Any> aValues(aNames.getLength());
......@@ -629,11 +627,9 @@ IMPL_LINK_NOARG(ScAppCfg, InputCommitHdl)
}
}
aInputItem.PutProperties(aNames, aValues);
return 0;
}
IMPL_LINK_NOARG(ScAppCfg, RevisionCommitHdl)
IMPL_LINK_NOARG_TYPED(ScAppCfg, RevisionCommitHdl, ScLinkConfigItem&, void)
{
Sequence<OUString> aNames = GetRevisionPropertyNames();
Sequence<Any> aValues(aNames.getLength());
......@@ -658,11 +654,9 @@ IMPL_LINK_NOARG(ScAppCfg, RevisionCommitHdl)
}
}
aRevisionItem.PutProperties(aNames, aValues);
return 0;
}
IMPL_LINK_NOARG(ScAppCfg, ContentCommitHdl)
IMPL_LINK_NOARG_TYPED(ScAppCfg, ContentCommitHdl, ScLinkConfigItem&, void)
{
Sequence<OUString> aNames = GetContentPropertyNames();
Sequence<Any> aValues(aNames.getLength());
......@@ -678,11 +672,9 @@ IMPL_LINK_NOARG(ScAppCfg, ContentCommitHdl)
}
}
aContentItem.PutProperties(aNames, aValues);
return 0;
}
IMPL_LINK_NOARG(ScAppCfg, SortListCommitHdl)
IMPL_LINK_NOARG_TYPED(ScAppCfg, SortListCommitHdl, ScLinkConfigItem&, void)
{
Sequence<OUString> aNames = GetSortListPropertyNames();
Sequence<Any> aValues(aNames.getLength());
......@@ -698,11 +690,9 @@ IMPL_LINK_NOARG(ScAppCfg, SortListCommitHdl)
}
}
aSortListItem.PutProperties(aNames, aValues);
return 0;
}
IMPL_LINK_NOARG(ScAppCfg, MiscCommitHdl)
IMPL_LINK_NOARG_TYPED(ScAppCfg, MiscCommitHdl, ScLinkConfigItem&, void)
{
Sequence<OUString> aNames = GetMiscPropertyNames();
Sequence<Any> aValues(aNames.getLength());
......@@ -724,11 +714,9 @@ IMPL_LINK_NOARG(ScAppCfg, MiscCommitHdl)
}
}
aMiscItem.PutProperties(aNames, aValues);
return 0;
}
IMPL_LINK_NOARG(ScAppCfg, CompatCommitHdl)
IMPL_LINK_NOARG_TYPED(ScAppCfg, CompatCommitHdl, ScLinkConfigItem&, void)
{
Sequence<OUString> aNames = GetCompatPropertyNames();
Sequence<Any> aValues(aNames.getLength());
......@@ -744,7 +732,6 @@ IMPL_LINK_NOARG(ScAppCfg, CompatCommitHdl)
}
}
aCompatItem.PutProperties(aNames, aValues);
return 0;
}
void ScAppCfg::SetOptions( const ScAppOptions& rNew )
......
......@@ -295,7 +295,7 @@ ScDocCfg::ScDocCfg() :
aLayoutItem.SetCommitLink( LINK( this, ScDocCfg, LayoutCommitHdl ) );
}
IMPL_LINK_NOARG(ScDocCfg, CalcCommitHdl)
IMPL_LINK_NOARG_TYPED(ScDocCfg, CalcCommitHdl, ScLinkConfigItem&, void)
{
Sequence<OUString> aNames = GetCalcPropertyNames();
Sequence<Any> aValues(aNames.getLength());
......@@ -347,11 +347,9 @@ IMPL_LINK_NOARG(ScDocCfg, CalcCommitHdl)
}
}
aCalcItem.PutProperties(aNames, aValues);
return 0;
}
IMPL_LINK_NOARG(ScDocCfg, LayoutCommitHdl)
IMPL_LINK_NOARG_TYPED(ScDocCfg, LayoutCommitHdl, ScLinkConfigItem&, void)
{
Sequence<OUString> aNames = GetLayoutPropertyNames();
Sequence<Any> aValues(aNames.getLength());
......@@ -370,8 +368,6 @@ IMPL_LINK_NOARG(ScDocCfg, LayoutCommitHdl)
}
}
aLayoutItem.PutProperties(aNames, aValues);
return 0;
}
void ScDocCfg::SetOptions( const ScDocOptions& rNew )
......
......@@ -42,7 +42,7 @@ ScLinkConfigItem::ScLinkConfigItem( const OUString& rSubTree, ConfigItemMode nMo
{
}
void ScLinkConfigItem::SetCommitLink( const Link<>& rLink )
void ScLinkConfigItem::SetCommitLink( const Link<ScLinkConfigItem&,void>& rLink )
{
aCommitLink = rLink;
}
......@@ -54,7 +54,7 @@ void ScLinkConfigItem::Notify( const com::sun::star::uno::Sequence<OUString>& /*
void ScLinkConfigItem::ImplCommit()
{
aCommitLink.Call( this );
aCommitLink.Call( *this );
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -520,7 +520,7 @@ ScViewCfg::ScViewCfg() :
aGridItem.SetCommitLink( LINK( this, ScViewCfg, GridCommitHdl ) );
}
IMPL_LINK_NOARG(ScViewCfg, LayoutCommitHdl)
IMPL_LINK_NOARG_TYPED(ScViewCfg, LayoutCommitHdl, ScLinkConfigItem&, void)
{
Sequence<OUString> aNames = GetLayoutPropertyNames();
Sequence<Any> aValues(aNames.getLength());
......@@ -563,11 +563,9 @@ IMPL_LINK_NOARG(ScViewCfg, LayoutCommitHdl)
}
}
aLayoutItem.PutProperties(aNames, aValues);
return 0;
}
IMPL_LINK_NOARG(ScViewCfg, DisplayCommitHdl)
IMPL_LINK_NOARG_TYPED(ScViewCfg, DisplayCommitHdl, ScLinkConfigItem&, void)
{
Sequence<OUString> aNames = GetDisplayPropertyNames();
Sequence<Any> aValues(aNames.getLength());
......@@ -607,11 +605,9 @@ IMPL_LINK_NOARG(ScViewCfg, DisplayCommitHdl)
}
}
aDisplayItem.PutProperties(aNames, aValues);
return 0;
}
IMPL_LINK_NOARG(ScViewCfg, GridCommitHdl)
IMPL_LINK_NOARG_TYPED(ScViewCfg, GridCommitHdl, ScLinkConfigItem&, void)
{
const ScGridOptions& rGrid = GetGridOptions();
......@@ -656,8 +652,6 @@ IMPL_LINK_NOARG(ScViewCfg, GridCommitHdl)
}
}
aGridItem.PutProperties(aNames, aValues);
return 0;
}
void ScViewCfg::SetOptions( const ScViewOptions& rNew )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment