diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-05-05 22:43:11 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-05-06 08:20:55 +0200 |
commit | b515d1f36fdf8c242079da60eb4ecd5fd456583c (patch) | |
tree | f26dd6feb936ddec4799bed60d4966d46acff938 /sc | |
parent | f593be5bcde09965bb3478e00bcdedbc6bd5bc57 (diff) |
Use various typed ToolBox::Set*Hdl Links
Change-Id: Iddfd36ae0de86fdd2d4febb2c05d1fe0c02801f0
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/ui/inc/navipi.hxx | 2 | ||||
-rw-r--r-- | sc/source/ui/navipi/navipi.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx | 11 | ||||
-rw-r--r-- | sc/source/ui/sidebar/CellAppearancePropertyPanel.hxx | 4 | ||||
-rw-r--r-- | sc/source/ui/sidebar/CellBorderStyleControl.cxx | 18 | ||||
-rw-r--r-- | sc/source/ui/sidebar/CellBorderStyleControl.hxx | 6 | ||||
-rw-r--r-- | sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx | 6 | ||||
-rw-r--r-- | sc/source/ui/sidebar/NumberFormatPropertyPanel.hxx | 2 |
8 files changed, 20 insertions, 33 deletions
diff --git a/sc/source/ui/inc/navipi.hxx b/sc/source/ui/inc/navipi.hxx index e7296250b1b9..c355813b300e 100644 --- a/sc/source/ui/inc/navipi.hxx +++ b/sc/source/ui/inc/navipi.hxx @@ -195,7 +195,7 @@ public: virtual void DataChanged( const DataChangedEvent& rDCEvt ) SAL_OVERRIDE; - DECL_LINK( ToolBoxDropdownClickHdl, void* ); + DECL_LINK_TYPED( ToolBoxDropdownClickHdl, ToolBox*, void ); protected: virtual void Select() SAL_OVERRIDE; diff --git a/sc/source/ui/navipi/navipi.cxx b/sc/source/ui/navipi/navipi.cxx index ab073e168d2f..b96b505bef27 100644 --- a/sc/source/ui/navipi/navipi.cxx +++ b/sc/source/ui/navipi/navipi.cxx @@ -383,7 +383,7 @@ void CommandToolBox::Click() { } -IMPL_LINK_NOARG(CommandToolBox, ToolBoxDropdownClickHdl) +IMPL_LINK_NOARG_TYPED(CommandToolBox, ToolBoxDropdownClickHdl, ToolBox *, void) { // the popup menue of the drop modus has to be called in the // click (button down) and not in the select (button up) @@ -405,8 +405,6 @@ IMPL_LINK_NOARG(CommandToolBox, ToolBoxDropdownClickHdl) MouseEvent aLeave( aPoint, 0, MouseEventModifiers::LEAVEWINDOW | MouseEventModifiers::SYNTHETIC ); MouseMove( aLeave ); } - - return 1; } void CommandToolBox::UpdateButtons() diff --git a/sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx b/sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx index 7ee1f5bb5f49..a805a28b6f9b 100644 --- a/sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx +++ b/sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx @@ -167,7 +167,7 @@ void CellAppearancePropertyPanel::Initialize() const sal_uInt16 nIdBorderType = mpTBCellBorder->GetItemId( UNO_SETBORDERSTYLE ); mpTBCellBorder->SetItemImage( nIdBorderType, maIMGCellBorder ); mpTBCellBorder->SetItemBits( nIdBorderType, mpTBCellBorder->GetItemBits( nIdBorderType ) | ToolBoxItemBits::DROPDOWNONLY ); - Link<> aLink = LINK(this, CellAppearancePropertyPanel, TbxCellBorderSelectHdl); + Link<ToolBox *, void> aLink = LINK(this, CellAppearancePropertyPanel, TbxCellBorderSelectHdl); mpTBCellBorder->SetDropdownClickHdl ( aLink ); mpTBCellBorder->SetSelectHdl ( aLink ); @@ -181,14 +181,13 @@ void CellAppearancePropertyPanel::Initialize() mpTBLineColor->Disable(); - aLink = LINK(this, CellAppearancePropertyPanel, CBOXGridShowClkHdl); - mpCBXShowGrid->SetClickHdl ( aLink ); + mpCBXShowGrid->SetClickHdl ( LINK(this, CellAppearancePropertyPanel, CBOXGridShowClkHdl) ); mpTBLineColor->SetAccessibleRelationLabeledBy(mpTBLineColor); mpTBLineStyle->SetAccessibleRelationLabeledBy(mpTBLineStyle); } -IMPL_LINK(CellAppearancePropertyPanel, TbxCellBorderSelectHdl, ToolBox*, pToolBox) +IMPL_LINK_TYPED(CellAppearancePropertyPanel, TbxCellBorderSelectHdl, ToolBox*, pToolBox, void) { const OUString aCommand(pToolBox->GetItemCommand(pToolBox->GetCurItemId())); @@ -208,10 +207,9 @@ IMPL_LINK(CellAppearancePropertyPanel, TbxCellBorderSelectHdl, ToolBox*, pToolBo mpCellBorderStylePopup->Show(*pToolBox); } } - return 0; } -IMPL_LINK(CellAppearancePropertyPanel, TbxLineStyleSelectHdl, ToolBox*, pToolBox) +IMPL_LINK_TYPED(CellAppearancePropertyPanel, TbxLineStyleSelectHdl, ToolBox*, pToolBox, void) { const OUString aCommand(pToolBox->GetItemCommand(pToolBox->GetCurItemId())); @@ -232,7 +230,6 @@ IMPL_LINK(CellAppearancePropertyPanel, TbxLineStyleSelectHdl, ToolBox*, pToolBox mpCellLineStylePopup->Show(*pToolBox); } } - return 0; } IMPL_LINK(CellAppearancePropertyPanel, CBOXGridShowClkHdl, void*, EMPTYARG) diff --git a/sc/source/ui/sidebar/CellAppearancePropertyPanel.hxx b/sc/source/ui/sidebar/CellAppearancePropertyPanel.hxx index fc0395687e2a..bddce6488cac 100644 --- a/sc/source/ui/sidebar/CellAppearancePropertyPanel.hxx +++ b/sc/source/ui/sidebar/CellAppearancePropertyPanel.hxx @@ -141,8 +141,8 @@ private: ::sfx2::sidebar::EnumContext maContext; SfxBindings* mpBindings; - DECL_LINK(TbxCellBorderSelectHdl, ToolBox*); - DECL_LINK(TbxLineStyleSelectHdl, ToolBox*); + DECL_LINK_TYPED(TbxCellBorderSelectHdl, ToolBox*, void); + DECL_LINK_TYPED(TbxLineStyleSelectHdl, ToolBox*, void); DECL_LINK(CBOXGridShowClkHdl, void*); // for CellLineStyle popup diff --git a/sc/source/ui/sidebar/CellBorderStyleControl.cxx b/sc/source/ui/sidebar/CellBorderStyleControl.cxx index 0c62047365af..548be75168b7 100644 --- a/sc/source/ui/sidebar/CellBorderStyleControl.cxx +++ b/sc/source/ui/sidebar/CellBorderStyleControl.cxx @@ -100,8 +100,7 @@ void CellBorderStyleControl::Initialize() maTBBorder1->SetPaintTransparent(true); Size aTbxSize( maTBBorder1->CalcWindowSizePixel() ); maTBBorder1->SetOutputSizePixel( aTbxSize ); - Link<> aLink = LINK(this, CellBorderStyleControl, TB1SelectHdl); - maTBBorder1->SetSelectHdl ( aLink ); + maTBBorder1->SetSelectHdl ( LINK(this, CellBorderStyleControl, TB1SelectHdl) ); maTBBorder2->SetLineCount(2); maTBBorder2->InsertItem(TBI_BORDER2_LEFT, mpImageList[4]); @@ -133,8 +132,7 @@ void CellBorderStyleControl::Initialize() maTBBorder2->SetItemText(TBI_BORDER2_TLBR, ScResId(STR_BORDER_6)); maTBBorder2->SetItemText(TBI_BORDER2_TOPBOT, ScResId(STR_BORDER_7)); maTBBorder2->SetItemText(TBI_BORDER2_LEFTRIGHT, ScResId(STR_BORDER_8)); - aLink = LINK(this, CellBorderStyleControl, TB2SelectHdl); - maTBBorder2->SetSelectHdl ( aLink ); + maTBBorder2->SetSelectHdl ( LINK(this, CellBorderStyleControl, TB2SelectHdl) ); maTBBorder3->SetItemImage(TBI_BORDER3_S1, mpImageList[12]); maTBBorder3->SetItemImage(TBI_BORDER3_S2, mpImageList[13]); @@ -144,11 +142,10 @@ void CellBorderStyleControl::Initialize() maTBBorder3->SetPaintTransparent(true); aTbxSize = maTBBorder3->CalcWindowSizePixel() ; maTBBorder3->SetOutputSizePixel( aTbxSize ); - aLink = LINK(this, CellBorderStyleControl, TB3SelectHdl); - maTBBorder3->SetSelectHdl ( aLink ); + maTBBorder3->SetSelectHdl ( LINK(this, CellBorderStyleControl, TB3SelectHdl) ); } -IMPL_LINK(CellBorderStyleControl, TB1SelectHdl, ToolBox*, pToolBox) +IMPL_LINK_TYPED(CellBorderStyleControl, TB1SelectHdl, ToolBox*, pToolBox, void) { sal_uInt16 nId = pToolBox->GetCurItemId(); SvxBoxItem aBorderOuter( SID_ATTR_BORDER_OUTER ); @@ -202,10 +199,9 @@ IMPL_LINK(CellBorderStyleControl, TB1SelectHdl, ToolBox*, pToolBox) mrCellAppearancePropertyPanel.GetBindings()->GetDispatcher()->Execute(SID_ATTR_BORDER, SfxCallMode::RECORD, &aBorderOuter, &aBorderInner, 0L); mrCellAppearancePropertyPanel.EndCellBorderStylePopupMode(); - return 0; } -IMPL_LINK(CellBorderStyleControl, TB2SelectHdl, ToolBox *, pToolBox) +IMPL_LINK_TYPED(CellBorderStyleControl, TB2SelectHdl, ToolBox *, pToolBox, void) { sal_uInt16 nId = pToolBox->GetCurItemId(); @@ -287,10 +283,9 @@ IMPL_LINK(CellBorderStyleControl, TB2SelectHdl, ToolBox *, pToolBox) } mrCellAppearancePropertyPanel.EndCellBorderStylePopupMode(); - return 0; } -IMPL_LINK(CellBorderStyleControl, TB3SelectHdl, ToolBox *, pToolBox) +IMPL_LINK_TYPED(CellBorderStyleControl, TB3SelectHdl, ToolBox *, pToolBox, void) { sal_uInt16 nId = pToolBox->GetCurItemId(); @@ -347,7 +342,6 @@ IMPL_LINK(CellBorderStyleControl, TB3SelectHdl, ToolBox *, pToolBox) pBottom.reset(); mrCellAppearancePropertyPanel.EndCellBorderStylePopupMode(); - return 0; } } } // end of namespace svx::sidebar diff --git a/sc/source/ui/sidebar/CellBorderStyleControl.hxx b/sc/source/ui/sidebar/CellBorderStyleControl.hxx index 706d10e7b11c..8772dccb5da0 100644 --- a/sc/source/ui/sidebar/CellBorderStyleControl.hxx +++ b/sc/source/ui/sidebar/CellBorderStyleControl.hxx @@ -41,9 +41,9 @@ private: void Initialize(); - DECL_LINK(TB1SelectHdl, ToolBox *); - DECL_LINK(TB2SelectHdl, ToolBox *); - DECL_LINK(TB3SelectHdl, ToolBox *); + DECL_LINK_TYPED(TB1SelectHdl, ToolBox *, void); + DECL_LINK_TYPED(TB2SelectHdl, ToolBox *, void); + DECL_LINK_TYPED(TB3SelectHdl, ToolBox *, void); public: CellBorderStyleControl(vcl::Window* pParent, CellAppearancePropertyPanel& rPanel); diff --git a/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx b/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx index c005b8c1096c..953c318d115e 100644 --- a/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx +++ b/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx @@ -96,8 +96,7 @@ void NumberFormatPropertyPanel::Initialize() mpLbCategory->SetAccessibleName(OUString( "Category")); mpLbCategory->SetDropDownLineCount(mpLbCategory->GetEntryCount()); - aLink = LINK(this, NumberFormatPropertyPanel, NumFormatHdl); - mpTBCategory->SetSelectHdl ( aLink ); + mpTBCategory->SetSelectHdl ( LINK(this, NumberFormatPropertyPanel, NumFormatHdl) ); aLink = LINK(this, NumberFormatPropertyPanel, NumFormatValueHdl); @@ -112,7 +111,7 @@ void NumberFormatPropertyPanel::Initialize() mpTBCategory->SetAccessibleRelationLabeledBy(mpTBCategory); } -IMPL_LINK( NumberFormatPropertyPanel, NumFormatHdl, ToolBox*, pBox ) +IMPL_LINK_TYPED( NumberFormatPropertyPanel, NumFormatHdl, ToolBox*, pBox, void ) { const OUString aCommand(pBox->GetItemCommand(pBox->GetCurItemId())); sal_uInt16 nId = 0; @@ -133,7 +132,6 @@ IMPL_LINK( NumberFormatPropertyPanel, NumFormatHdl, ToolBox*, pBox ) SfxUInt16Item aItem( SID_NUMBER_TYPE_FORMAT, nId ); GetBindings()->GetDispatcher()->Execute(SID_NUMBER_TYPE_FORMAT, SfxCallMode::RECORD, &aItem, 0L); } - return 0L; } IMPL_LINK( NumberFormatPropertyPanel, NumFormatSelectHdl, ListBox*, pBox ) diff --git a/sc/source/ui/sidebar/NumberFormatPropertyPanel.hxx b/sc/source/ui/sidebar/NumberFormatPropertyPanel.hxx index 9a162beaf1b5..64e1a8d14ede 100644 --- a/sc/source/ui/sidebar/NumberFormatPropertyPanel.hxx +++ b/sc/source/ui/sidebar/NumberFormatPropertyPanel.hxx @@ -81,7 +81,7 @@ private: ::sfx2::sidebar::EnumContext maContext; SfxBindings* mpBindings; - DECL_LINK(NumFormatHdl, ToolBox*); + DECL_LINK_TYPED(NumFormatHdl, ToolBox*, void); DECL_LINK(NumFormatSelectHdl, ListBox*); DECL_LINK(NumFormatValueHdl, void*); |