diff --git a/sc/source/ui/condformat/condformatdlg.cxx b/sc/source/ui/condformat/condformatdlg.cxx index 50be91fcb66f..2e294f2741c3 100644 --- a/sc/source/ui/condformat/condformatdlg.cxx +++ b/sc/source/ui/condformat/condformatdlg.cxx @@ -1103,7 +1103,7 @@ ScCondFormatDlg::ScCondFormatDlg(Window* pParent, ScDocument* pDoc, const ScCond SetText(aTitle.makeStringAndClear()); maBtnAdd.SetClickHdl( LINK( &maCondFormList, ScCondFormatList, AddBtnHdl ) ); maBtnRemove.SetClickHdl( LINK( &maCondFormList, ScCondFormatList, RemoveBtnHdl ) ); - maEdRange.SetModifyHdl( LINK( &maEdRange, ScCondFormatDlg, EdRangeModifyHdl ) ); + maEdRange.SetModifyHdl( LINK( this, ScCondFormatDlg, EdRangeModifyHdl ) ); FreeResource(); maEdRange.SetText(aRangeString); @@ -1166,15 +1166,15 @@ IMPL_LINK_NOARG( ScCondFormatList, ScrollHdl ) return 0; } -IMPL_LINK_NOARG( ScCondFormatDlg, EdRangeModifyHdl ) +IMPL_LINK( ScCondFormatDlg, EdRangeModifyHdl, Edit*, pEdit ) { - rtl::OUString aRangeStr = maEdRange.GetText(); + rtl::OUString aRangeStr = pEdit->GetText(); ScRangeList aRange; sal_uInt16 nFlags = aRange.Parse(aRangeStr, mpDoc, SCA_VALID, mpDoc->GetAddressConvention()); if(nFlags & SCA_VALID) - maEdRange.SetControlBackground(GetSettings().GetStyleSettings().GetWindowColor()); + pEdit->SetControlBackground(GetSettings().GetStyleSettings().GetWindowColor()); else - maEdRange.SetControlBackground(COL_LIGHTRED); + pEdit->SetControlBackground(COL_LIGHTRED); return 0; } diff --git a/sc/source/ui/inc/condformatdlg.hxx b/sc/source/ui/inc/condformatdlg.hxx index 5ddc027bc366..4b3e780d69fc 100644 --- a/sc/source/ui/inc/condformatdlg.hxx +++ b/sc/source/ui/inc/condformatdlg.hxx @@ -185,7 +185,7 @@ private: ScAddress maPos; ScDocument* mpDoc; - DECL_LINK( EdRangeModifyHdl, void* ); + DECL_LINK( EdRangeModifyHdl, Edit* ); public: ScCondFormatDlg(Window* pWindow, ScDocument* pDoc, const ScConditionalFormat* pFormat, const ScRangeList& rRange, const ScAddress& rPos);