diff options
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/dialogs/cuifmsearch.cxx | 46 | ||||
-rw-r--r-- | cui/source/dialogs/cuigrfflt.cxx | 14 | ||||
-rw-r--r-- | cui/source/inc/autocdlg.hxx | 4 | ||||
-rw-r--r-- | cui/source/inc/cuifmsearch.hxx | 2 | ||||
-rw-r--r-- | cui/source/inc/cuigrfflt.hxx | 5 | ||||
-rw-r--r-- | cui/source/inc/cuitabarea.hxx | 4 | ||||
-rw-r--r-- | cui/source/options/optgdlg.cxx | 6 | ||||
-rw-r--r-- | cui/source/options/optgdlg.hxx | 2 | ||||
-rw-r--r-- | cui/source/tabpages/autocdlg.cxx | 19 | ||||
-rw-r--r-- | cui/source/tabpages/tparea.cxx | 8 | ||||
-rw-r--r-- | cui/source/tabpages/tpcolor.cxx | 3 |
11 files changed, 57 insertions, 56 deletions
diff --git a/cui/source/dialogs/cuifmsearch.cxx b/cui/source/dialogs/cuifmsearch.cxx index 8120707e6650..8929c98c12d0 100644 --- a/cui/source/dialogs/cuifmsearch.cxx +++ b/cui/source/dialogs/cuifmsearch.cxx @@ -387,9 +387,9 @@ IMPL_LINK_TYPED(FmSearchDialog, OnClickedSpecialSettings, Button*, pButton, void m_pSearchEngine->SetTransliterationFlags(nFlags); m_pcbCase->Check(m_pSearchEngine->GetCaseSensitive()); - OnCheckBoxToggled( m_pcbCase ); + OnCheckBoxToggled( *m_pcbCase ); m_pHalfFullFormsCJK->Check( !m_pSearchEngine->GetIgnoreWidthCJK() ); - OnCheckBoxToggled( m_pHalfFullFormsCJK ); + OnCheckBoxToggled( *m_pHalfFullFormsCJK ); } } } @@ -434,28 +434,28 @@ IMPL_LINK(FmSearchDialog, OnFieldSelected, ListBox*, pBox) return 0; } -IMPL_LINK(FmSearchDialog, OnCheckBoxToggled, CheckBox*, pBox) +IMPL_LINK_TYPED(FmSearchDialog, OnCheckBoxToggled, CheckBox&, rBox, void) { - bool bChecked = pBox->IsChecked(); + bool bChecked = rBox.IsChecked(); // formatter or case -> pass on to the engine - if (pBox == m_pcbUseFormat) + if (&rBox == m_pcbUseFormat) m_pSearchEngine->SetFormatterUsing(bChecked); - else if (pBox == m_pcbCase) + else if (&rBox == m_pcbCase) m_pSearchEngine->SetCaseSensitive(bChecked); // direction -> pass on and reset the checkbox-text for StartOver - else if (pBox == m_pcbBackwards) + else if (&rBox == m_pcbBackwards) { m_pcbStartOver->SetText( OUString( CUI_RES( bChecked ? RID_STR_FROM_BOTTOM : RID_STR_FROM_TOP ) ) ); m_pSearchEngine->SetDirection(!bChecked); } // similarity-search or regular expression - else if ((pBox == m_pcbApprox) || (pBox == m_pcbRegular) || (pBox == m_pcbWildCard)) + else if ((&rBox == m_pcbApprox) || (&rBox == m_pcbRegular) || (&rBox == m_pcbWildCard)) { CheckBox* pBoxes[] = { m_pcbWildCard, m_pcbRegular, m_pcbApprox }; for (sal_uInt32 i=0; i< SAL_N_ELEMENTS(pBoxes); ++i) { - if (pBoxes[i] != pBox) + if (pBoxes[i] != &rBox) { if (bChecked) pBoxes[i]->Disable(); @@ -471,7 +471,7 @@ IMPL_LINK(FmSearchDialog, OnCheckBoxToggled, CheckBox*, pBox) // (disabled boxes have to be passed to the engine as sal_False) // adjust the Position-Listbox (which is not allowed during Wildcard-search) - if (pBox == m_pcbWildCard) + if (&rBox == m_pcbWildCard) { if (bChecked) { @@ -486,7 +486,7 @@ IMPL_LINK(FmSearchDialog, OnCheckBoxToggled, CheckBox*, pBox) } // and the button for similarity-search - if (pBox == m_pcbApprox) + if (&rBox == m_pcbApprox) { if (bChecked) m_ppbApproxSettings->Enable(); @@ -494,12 +494,12 @@ IMPL_LINK(FmSearchDialog, OnCheckBoxToggled, CheckBox*, pBox) m_ppbApproxSettings->Disable(); } } - else if (pBox == m_pHalfFullFormsCJK) + else if (&rBox == m_pHalfFullFormsCJK) { // forward to the search engine m_pSearchEngine->SetIgnoreWidthCJK( !bChecked ); } - else if (pBox == m_pSoundsLikeCJK) + else if (&rBox == m_pSoundsLikeCJK) { m_pSoundsLikeCJKSettings->Enable(bChecked); @@ -514,8 +514,6 @@ IMPL_LINK(FmSearchDialog, OnCheckBoxToggled, CheckBox*, pBox) // forward to the search engine m_pSearchEngine->SetTransliteration( bChecked ); } - - return 0; } void FmSearchDialog::InitContext(sal_Int16 nContext) @@ -803,21 +801,21 @@ void FmSearchDialog::LoadParams() m_pcbUseFormat->Check(aParams.bUseFormatter); m_pcbCase->Check( aParams.isCaseSensitive() ); m_pcbBackwards->Check(aParams.bBackwards); - LINK(this, FmSearchDialog, OnCheckBoxToggled).Call(m_pcbUseFormat); - LINK(this, FmSearchDialog, OnCheckBoxToggled).Call(m_pcbCase); - LINK(this, FmSearchDialog, OnCheckBoxToggled).Call(m_pcbBackwards); + LINK(this, FmSearchDialog, OnCheckBoxToggled).Call(*m_pcbUseFormat); + LINK(this, FmSearchDialog, OnCheckBoxToggled).Call(*m_pcbCase); + LINK(this, FmSearchDialog, OnCheckBoxToggled).Call(*m_pcbBackwards); m_pHalfFullFormsCJK->Check( !aParams.isIgnoreWidthCJK( ) ); // BEWARE: this checkbox has a inverse semantics! m_pSoundsLikeCJK->Check( aParams.bSoundsLikeCJK ); - LINK(this, FmSearchDialog, OnCheckBoxToggled).Call(m_pHalfFullFormsCJK); - LINK(this, FmSearchDialog, OnCheckBoxToggled).Call(m_pSoundsLikeCJK); + LINK(this, FmSearchDialog, OnCheckBoxToggled).Call(*m_pHalfFullFormsCJK); + LINK(this, FmSearchDialog, OnCheckBoxToggled).Call(*m_pSoundsLikeCJK); m_pcbWildCard->Check(false); m_pcbRegular->Check(false); m_pcbApprox->Check(false); - LINK(this, FmSearchDialog, OnCheckBoxToggled).Call(m_pcbWildCard); - LINK(this, FmSearchDialog, OnCheckBoxToggled).Call(m_pcbRegular); - LINK(this, FmSearchDialog, OnCheckBoxToggled).Call(m_pcbApprox); + LINK(this, FmSearchDialog, OnCheckBoxToggled).Call(*m_pcbWildCard); + LINK(this, FmSearchDialog, OnCheckBoxToggled).Call(*m_pcbRegular); + LINK(this, FmSearchDialog, OnCheckBoxToggled).Call(*m_pcbApprox); CheckBox* pToCheck = NULL; if (aParams.bWildcard) @@ -831,7 +829,7 @@ void FmSearchDialog::LoadParams() if (pToCheck) { pToCheck->Check(); - LINK(this, FmSearchDialog, OnCheckBoxToggled).Call(pToCheck); + LINK(this, FmSearchDialog, OnCheckBoxToggled).Call(*pToCheck); } // set Levenshtein-parameters directly at the SearchEngine diff --git a/cui/source/dialogs/cuigrfflt.cxx b/cui/source/dialogs/cuigrfflt.cxx index 89794f778709..73bb4c3d6a70 100644 --- a/cui/source/dialogs/cuigrfflt.cxx +++ b/cui/source/dialogs/cuigrfflt.cxx @@ -203,11 +203,16 @@ GraphicFilterMosaic::GraphicFilterMosaic( vcl::Window* pParent, const Graphic& r mpMtrHeight->SetModifyHdl( GetModifyHdl() ); mpCbxEdges->Check( bEnhanceEdges ); - mpCbxEdges->SetToggleHdl( GetModifyHdl() ); + mpCbxEdges->SetToggleHdl( LINK(this, GraphicFilterMosaic, CheckBoxModifyHdl) ); mpMtrWidth->GrabFocus(); } +IMPL_LINK_TYPED(GraphicFilterMosaic, CheckBoxModifyHdl, CheckBox&, rCheckBox, void) +{ + GetModifyHdl().Call(&rCheckBox); +} + GraphicFilterMosaic::~GraphicFilterMosaic() { disposeOnce(); @@ -327,7 +332,12 @@ GraphicFilterSolarize::GraphicFilterSolarize( vcl::Window* pParent, const Graphi mpMtrThreshold->SetModifyHdl( GetModifyHdl() ); mpCbxInvert->Check( bInvert ); - mpCbxInvert->SetToggleHdl( GetModifyHdl() ); + mpCbxInvert->SetToggleHdl( LINK(this, GraphicFilterSolarize, CheckBoxModifyHdl) ); +} + +IMPL_LINK_TYPED(GraphicFilterSolarize, CheckBoxModifyHdl, CheckBox&, rCheckBox, void) +{ + GetModifyHdl().Call(&rCheckBox); } GraphicFilterSolarize::~GraphicFilterSolarize() diff --git a/cui/source/inc/autocdlg.hxx b/cui/source/inc/autocdlg.hxx index 472e9abce1ea..3c034fee1c04 100644 --- a/cui/source/inc/autocdlg.hxx +++ b/cui/source/inc/autocdlg.hxx @@ -441,7 +441,7 @@ private: editeng::SortedAutoCompleteStrings* m_pAutoCompleteList; sal_uInt16 m_nAutoCmpltListCnt; - DECL_LINK( CheckHdl, CheckBox* ); + DECL_LINK_TYPED( CheckHdl, CheckBox&, void ); OfaAutoCompleteTabPage( vcl::Window* pParent, const SfxItemSet& rSet ); @@ -492,7 +492,7 @@ private: Enables/disables all controls in the tab page (except from the check box. */ - DECL_LINK(CheckHdl, void *); + DECL_LINK_TYPED(CheckHdl, CheckBox&, void); /** Handler for the push button diff --git a/cui/source/inc/cuifmsearch.hxx b/cui/source/inc/cuifmsearch.hxx index 7cca0823b96f..fb1d9b27b936 100644 --- a/cui/source/inc/cuifmsearch.hxx +++ b/cui/source/inc/cuifmsearch.hxx @@ -167,7 +167,7 @@ private: DECL_LINK( OnFieldSelected, ListBox* ); DECL_LINK( OnFocusGrabbed, ComboBox* ); - DECL_LINK( OnCheckBoxToggled, CheckBox* ); + DECL_LINK_TYPED( OnCheckBoxToggled, CheckBox&, void ); DECL_LINK( OnContextSelection, ListBox* ); diff --git a/cui/source/inc/cuigrfflt.hxx b/cui/source/inc/cuigrfflt.hxx index 93efc3b9d126..1a9e1b66a84f 100644 --- a/cui/source/inc/cuigrfflt.hxx +++ b/cui/source/inc/cuigrfflt.hxx @@ -112,7 +112,7 @@ private: VclPtr<MetricField> mpMtrWidth; VclPtr<MetricField> mpMtrHeight; VclPtr<CheckBox> mpCbxEdges; - + DECL_LINK_TYPED(CheckBoxModifyHdl, CheckBox&, void); public: GraphicFilterMosaic(vcl::Window* pParent, const Graphic& rGraphic, @@ -123,7 +123,7 @@ public: virtual Graphic GetFilteredGraphic( const Graphic& rGraphic, double fScaleX, double fScaleY ) SAL_OVERRIDE; long GetTileWidth() const { return static_cast<long>(mpMtrWidth->GetValue()); } long GetTileHeight() const { return static_cast<long>(mpMtrHeight->GetValue()); } - bool IsEnhanceEdges() const { return mpCbxEdges->IsChecked(); } + bool IsEnhanceEdges() const { return mpCbxEdges->IsChecked(); } }; class GraphicFilterSolarize : public GraphicFilterDialog @@ -131,6 +131,7 @@ class GraphicFilterSolarize : public GraphicFilterDialog private: VclPtr<MetricField> mpMtrThreshold; VclPtr<CheckBox> mpCbxInvert; + DECL_LINK_TYPED(CheckBoxModifyHdl, CheckBox&, void); public: diff --git a/cui/source/inc/cuitabarea.hxx b/cui/source/inc/cuitabarea.hxx index 29dbd031b830..4514c2903ab9 100644 --- a/cui/source/inc/cuitabarea.hxx +++ b/cui/source/inc/cuitabarea.hxx @@ -268,7 +268,7 @@ private: DECL_LINK( ModifyHatchBckgrdColorHdl_Impl, void * ); DECL_LINK( ModifyGradientHdl_Impl, void * ); DECL_LINK( ModifyHatchingHdl_Impl, void * ); - DECL_LINK( ToggleHatchBckgrdColorHdl_Impl, void * ); + DECL_LINK_TYPED( ToggleHatchBckgrdColorHdl_Impl, CheckBox&, void ); DECL_LINK( ModifyBitmapHdl_Impl, void * ); DECL_LINK( ModifyStepCountHdl_Impl, void* ); DECL_LINK_TYPED( ModifyStepCountClickHdl_Impl, Button*, void ); @@ -651,7 +651,7 @@ private: VclPtr<PushButton> m_pBtnSave; VclPtr<FixedText> m_pTableName; - DECL_LINK( EmbedToggleHdl_Impl, void * ); + DECL_LINK_TYPED( EmbedToggleHdl_Impl, CheckBox&, void ); DECL_LINK_TYPED( ClickLoadHdl_Impl, Button*, void ); DECL_LINK_TYPED( ClickSaveHdl_Impl, Button*, void ); diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx index 7f84f2c0bb3f..2feda57c3cbb 100644 --- a/cui/source/options/optgdlg.cxx +++ b/cui/source/options/optgdlg.cxx @@ -711,14 +711,12 @@ void OfaViewTabPage::dispose() } #if defined( UNX ) -IMPL_LINK_NOARG( OfaViewTabPage, OnAntialiasingToggled ) +IMPL_LINK_NOARG_TYPED( OfaViewTabPage, OnAntialiasingToggled, CheckBox&, void ) { bool bAAEnabled = m_pFontAntiAliasing->IsChecked(); m_pAAPointLimitLabel->Enable( bAAEnabled ); m_pAAPointLimit->Enable( bAAEnabled ); - - return 0L; } #endif @@ -972,7 +970,7 @@ void OfaViewTabPage::Reset( const SfxItemSet* ) m_pFontShowCB->SaveValue(); #if defined( UNX ) - LINK( this, OfaViewTabPage, OnAntialiasingToggled ).Call( NULL ); + LINK( this, OfaViewTabPage, OnAntialiasingToggled ).Call( *m_pFontAntiAliasing ); #endif } diff --git a/cui/source/options/optgdlg.hxx b/cui/source/options/optgdlg.hxx index b66a628793a7..24558d54d589 100644 --- a/cui/source/options/optgdlg.hxx +++ b/cui/source/options/optgdlg.hxx @@ -115,7 +115,7 @@ private: std::vector<vcl::IconThemeInfo> mInstalledIconThemes; #if defined( UNX ) - DECL_LINK( OnAntialiasingToggled, void* ); + DECL_LINK_TYPED( OnAntialiasingToggled, CheckBox&, void ); #endif public: diff --git a/cui/source/tabpages/autocdlg.cxx b/cui/source/tabpages/autocdlg.cxx index d51c47b1482b..f1e5f23dd22b 100644 --- a/cui/source/tabpages/autocdlg.cxx +++ b/cui/source/tabpages/autocdlg.cxx @@ -2356,8 +2356,8 @@ void OfaAutoCompleteTabPage::Reset( const SfxItemSet* ) m_pPBEntries->Disable(); } - CheckHdl(m_pCBActiv); - CheckHdl(m_pCBCollect); + CheckHdl(*m_pCBActiv); + CheckHdl(*m_pCBCollect); } void OfaAutoCompleteTabPage::ActivatePage( const SfxItemSet& ) @@ -2379,19 +2379,18 @@ IMPL_LINK_NOARG_TYPED(OfaAutoCompleteTabPage, DeleteHdl, Button*, void) } } -IMPL_LINK( OfaAutoCompleteTabPage, CheckHdl, CheckBox*, pBox ) +IMPL_LINK_TYPED( OfaAutoCompleteTabPage, CheckHdl, CheckBox&, rBox, void ) { - bool bEnable = pBox->IsChecked(); - if (pBox == m_pCBActiv) + bool bEnable = rBox.IsChecked(); + if (&rBox == m_pCBActiv) { m_pCBAppendSpace->Enable( bEnable ); m_pCBAppendSpace->Enable( bEnable ); m_pCBAsTip->Enable( bEnable ); m_pDCBExpandKey->Enable( bEnable ); } - else if (m_pCBCollect == pBox) + else if (m_pCBCollect == &rBox) m_pCBRemoveList->Enable( bEnable ); - return 0; } void OfaAutoCompleteTabPage::CopyToClipboard() const @@ -2601,7 +2600,7 @@ IMPL_LINK_NOARG_TYPED(OfaSmartTagOptionsTabPage, ClickHdl, Button*, void) /** Handler for the check box */ -IMPL_LINK_NOARG(OfaSmartTagOptionsTabPage, CheckHdl) +IMPL_LINK_NOARG_TYPED(OfaSmartTagOptionsTabPage, CheckHdl, CheckBox&, void) { const bool bEnable = m_pMainCB->IsChecked(); m_pSmartTagTypesLB->Enable( bEnable ); @@ -2614,8 +2613,6 @@ IMPL_LINK_NOARG(OfaSmartTagOptionsTabPage, CheckHdl) // We do this by calling SelectHdl: if ( bEnable ) SelectHdl(m_pSmartTagTypesLB); - - return 0; } /** Handler for the list box @@ -2696,7 +2693,7 @@ void OfaSmartTagOptionsTabPage::Reset( const SfxItemSet* ) FillListBox( *pSmartTagMgr ); m_pSmartTagTypesLB->SelectEntryPos( 0 ); m_pMainCB->Check( pSmartTagMgr->IsLabelTextWithSmartTags() ); - CheckHdl(m_pMainCB); + CheckHdl(*m_pMainCB); } void OfaSmartTagOptionsTabPage::ActivatePage( const SfxItemSet& ) diff --git a/cui/source/tabpages/tparea.cxx b/cui/source/tabpages/tparea.cxx index 288fc2f2a7d7..e03c98781499 100644 --- a/cui/source/tabpages/tparea.cxx +++ b/cui/source/tabpages/tparea.cxx @@ -1583,7 +1583,7 @@ void SvxAreaTabPage::Reset( const SfxItemSet* rAttrs ) case drawing::FillStyle_HATCH: ClickHatchingHdl_Impl(); - ToggleHatchBckgrdColorHdl_Impl( this ); + ToggleHatchBckgrdColorHdl_Impl( *m_pCbxHatchBckgrd ); break; case drawing::FillStyle_BITMAP: @@ -2020,7 +2020,7 @@ void SvxAreaTabPage::ClickHatchingHdl_Impl() ModifyHatchingHdl_Impl( this ); ModifyHatchBckgrdColorHdl_Impl( this ); - ToggleHatchBckgrdColorHdl_Impl( this ); + ToggleHatchBckgrdColorHdl_Impl( *m_pCbxHatchBckgrd ); } @@ -2078,7 +2078,7 @@ IMPL_LINK_NOARG(SvxAreaTabPage, ModifyHatchBckgrdColorHdl_Impl) -IMPL_LINK_NOARG(SvxAreaTabPage, ToggleHatchBckgrdColorHdl_Impl) +IMPL_LINK_NOARG_TYPED(SvxAreaTabPage, ToggleHatchBckgrdColorHdl_Impl, CheckBox&, void) { // switch on/off backgroundcolor for hatches m_pLbHatchBckgrdColor->Enable( m_pCbxHatchBckgrd->IsChecked() ); @@ -2097,8 +2097,6 @@ IMPL_LINK_NOARG(SvxAreaTabPage, ToggleHatchBckgrdColorHdl_Impl) m_pLbHatchBckgrdColor->SelectEntry( aColorItem.GetColorValue() ); } } - - return 0L; } diff --git a/cui/source/tabpages/tpcolor.cxx b/cui/source/tabpages/tpcolor.cxx index a1c4174764cf..2f16de25b91c 100644 --- a/cui/source/tabpages/tpcolor.cxx +++ b/cui/source/tabpages/tpcolor.cxx @@ -89,10 +89,9 @@ bool SvxColorTabPage::GetEmbed() return pList.is() && pList->IsEmbedInDocument(); } -IMPL_LINK_NOARG(SvxColorTabPage, EmbedToggleHdl_Impl) +IMPL_LINK_NOARG_TYPED(SvxColorTabPage, EmbedToggleHdl_Impl, CheckBox&, void) { SetEmbed( m_pBoxEmbed->IsChecked() ); - return 0; } void SvxColorTabPage::UpdateTableName() |