[Libreoffice-commits] core.git: sc/inc sc/source
Noel Grandin
noelgrandin at gmail.com
Tue Sep 22 12:00:53 PDT 2015
sc/inc/appoptio.hxx | 14 +++++++-------
sc/inc/docoptio.hxx | 4 ++--
sc/inc/optutil.hxx | 4 ++--
sc/inc/viewopti.hxx | 6 +++---
sc/source/core/tool/appoptio.cxx | 27 +++++++--------------------
sc/source/core/tool/docoptio.cxx | 8 ++------
sc/source/core/tool/optutil.cxx | 4 ++--
sc/source/core/tool/viewopti.cxx | 12 +++---------
8 files changed, 28 insertions(+), 51 deletions(-)
New commits:
commit 8d16834a9820fb8c983753c3e2a05922885060b9
Author: Noel Grandin <noelgrandin at gmail.com>
Date: Tue Sep 22 20:42:43 2015 +0200
convert Link<> to typed
Change-Id: I80df7c3907fe6ac8a6ee4dddb2caeed28ea1b879
Reviewed-on: https://gerrit.libreoffice.org/18784
Reviewed-by: Noel Grandin <noelgrandin at gmail.com>
Tested-by: Noel Grandin <noelgrandin at gmail.com>
diff --git a/sc/inc/appoptio.hxx b/sc/inc/appoptio.hxx
index c73af70..4620f3c 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 6c0136f..904f641 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 b75fc9f..5e21a77 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 82756e5..cab92c0 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 8b8a6f1..4421898 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 b1574a6..c90bd94 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 f951089..6bbc0dc 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 37ac3ab..017949f 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 )
More information about the Libreoffice-commits
mailing list