diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2012-10-06 00:22:21 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2012-10-06 00:26:42 +0200 |
commit | c6e44b87ef6d47ab24bebd586de3e75e9f08cfbe (patch) | |
tree | 4ece7faf67f853938d3323c4d0b7d0232592c50f | |
parent | fa02cce6800cd6021e0160e4698b9e90496a94c5 (diff) |
fix crash in cond format dialog with new range edit
Change-Id: Ie19038046fa9121cc234546a9891685153be5646
-rw-r--r-- | sc/source/ui/condformat/condformatdlg.cxx | 10 | ||||
-rw-r--r-- | sc/source/ui/inc/condformatdlg.hxx | 2 |
2 files changed, 6 insertions, 6 deletions
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); |