summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2015-09-22 20:42:43 +0200
committerNoel Grandin <noelgrandin@gmail.com>2015-09-22 19:00:22 +0000
commit8d16834a9820fb8c983753c3e2a05922885060b9 (patch)
tree38233def6a45828596d623ee32a2422533f7645d /sc
parent3d9dd244ce272e2bedc751c5dd250d15b06459e7 (diff)
convert Link<> to typed
Change-Id: I80df7c3907fe6ac8a6ee4dddb2caeed28ea1b879 Reviewed-on: https://gerrit.libreoffice.org/18784 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'sc')
-rw-r--r--sc/inc/appoptio.hxx14
-rw-r--r--sc/inc/docoptio.hxx4
-rw-r--r--sc/inc/optutil.hxx4
-rw-r--r--sc/inc/viewopti.hxx6
-rw-r--r--sc/source/core/tool/appoptio.cxx27
-rw-r--r--sc/source/core/tool/docoptio.cxx8
-rw-r--r--sc/source/core/tool/optutil.cxx4
-rw-r--r--sc/source/core/tool/viewopti.cxx12
8 files changed, 28 insertions, 51 deletions
diff --git a/sc/inc/appoptio.hxx b/sc/inc/appoptio.hxx
index c73af70c2b8c..4620f3c7539a 100644
--- a/sc/inc/appoptio.hxx
+++ b/sc/inc/appoptio.hxx
@@ -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();
diff --git a/sc/inc/docoptio.hxx b/sc/inc/docoptio.hxx
index 6c0136f12f72..904f64112331 100644
--- a/sc/inc/docoptio.hxx
+++ b/sc/inc/docoptio.hxx
@@ -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();
diff --git a/sc/inc/optutil.hxx b/sc/inc/optutil.hxx
index b75fc9f8281f..5e21a772ab54 100644
--- a/sc/inc/optutil.hxx
+++ b/sc/inc/optutil.hxx
@@ -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;
diff --git a/sc/inc/viewopti.hxx b/sc/inc/viewopti.hxx
index 82756e5193b5..cab92c05c5a3 100644
--- a/sc/inc/viewopti.hxx
+++ b/sc/inc/viewopti.hxx
@@ -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();
diff --git a/sc/source/core/tool/appoptio.cxx b/sc/source/core/tool/appoptio.cxx
index 8b8a6f161857..44218981f187 100644
--- a/sc/source/core/tool/appoptio.cxx
+++ b/sc/source/core/tool/appoptio.cxx
@@ -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 )
diff --git a/sc/source/core/tool/docoptio.cxx b/sc/source/core/tool/docoptio.cxx
index b1574a627469..c90bd94f33ca 100644
--- a/sc/source/core/tool/docoptio.cxx
+++ b/sc/source/core/tool/docoptio.cxx
@@ -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 )
diff --git a/sc/source/core/tool/optutil.cxx b/sc/source/core/tool/optutil.cxx
index f951089f4fcf..6bbc0dcede3d 100644
--- a/sc/source/core/tool/optutil.cxx
+++ b/sc/source/core/tool/optutil.cxx
@@ -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: */
diff --git a/sc/source/core/tool/viewopti.cxx b/sc/source/core/tool/viewopti.cxx
index 37ac3ab285d0..017949f2a31b 100644
--- a/sc/source/core/tool/viewopti.cxx
+++ b/sc/source/core/tool/viewopti.cxx
@@ -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 )