summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/svx/tbcontrl.hxx3
-rw-r--r--svx/source/tbxctrls/tbcontrl.cxx12
2 files changed, 7 insertions, 8 deletions
diff --git a/include/svx/tbcontrl.hxx b/include/svx/tbcontrl.hxx
index eb4fe0addd49..9caf01c122f0 100644
--- a/include/svx/tbcontrl.hxx
+++ b/include/svx/tbcontrl.hxx
@@ -146,6 +146,7 @@ class SvxFontItem;
class SfxStyleControllerItem_Impl;
class SfxStyleSheetBasePool;
class SfxTemplateItem;
+class SvxStyleBox_Impl;
namespace svx
{
@@ -168,7 +169,7 @@ public:
virtual void StateChanged(sal_uInt16 nSID, SfxItemState eState,
const SfxPoolItem* pState) SAL_OVERRIDE;
- DECL_LINK( VisibilityNotification, void* );
+ DECL_LINK_TYPED( VisibilityNotification, SvxStyleBox_Impl&, void );
protected:
// XInitialization
virtual void SAL_CALL initialize(const css::uno::Sequence<css::uno::Any>& aArguments)
diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx
index eb9a3c88d758..fda39c5684c1 100644
--- a/svx/source/tbxctrls/tbcontrl.cxx
+++ b/svx/source/tbxctrls/tbcontrl.cxx
@@ -133,7 +133,7 @@ public:
virtual void UserDraw( const UserDrawEvent& rUDEvt ) SAL_OVERRIDE;
- void SetVisibilityListener( const Link<>& aVisListener ) { aVisibilityListener = aVisListener; }
+ void SetVisibilityListener( const Link<SvxStyleBox_Impl&,void>& aVisListener ) { aVisibilityListener = aVisListener; }
void SetDefaultStyle( const OUString& rDefault ) { sDefaultStyle = rDefault; }
@@ -147,7 +147,7 @@ private:
sal_Int32 nCurSel;
bool bRelease;
Size aLogicalSize;
- Link<> aVisibilityListener;
+ Link<SvxStyleBox_Impl&,void> aVisibilityListener;
bool bVisible;
Reference< XDispatchProvider > m_xDispatchProvider;
Reference< XFrame > m_xFrame;
@@ -557,13 +557,13 @@ void SvxStyleBox_Impl::StateChanged( StateChangedType nStateChange )
{
bVisible = IsReallyVisible();
if ( aVisibilityListener.IsSet() )
- aVisibilityListener.Call( this );
+ aVisibilityListener.Call( *this );
}
else if ( nStateChange == StateChangedType::InitShow )
{
bVisible = true;
if ( aVisibilityListener.IsSet() )
- aVisibilityListener.Call( this );
+ aVisibilityListener.Call( *this );
}
}
@@ -2397,7 +2397,7 @@ void SvxStyleToolBoxControl::SetFamilyState( sal_uInt16 nIdx,
Update();
}
-IMPL_LINK_NOARG(SvxStyleToolBoxControl, VisibilityNotification)
+IMPL_LINK_NOARG_TYPED(SvxStyleToolBoxControl, VisibilityNotification, SvxStyleBox_Impl&, void)
{
// Call ReBind() && UnBind() according to visibility
SvxStyleBox_Impl* pBox = static_cast<SvxStyleBox_Impl*>( GetToolBox().GetItemWindow( GetId() ));
@@ -2415,8 +2415,6 @@ IMPL_LINK_NOARG(SvxStyleToolBoxControl, VisibilityNotification)
pBoundItems[i]->UnBind();
unbindListener();
}
-
- return 0;
}
void SvxStyleToolBoxControl::StateChanged(