fix crash in cond format dialog with new range edit
Change-Id: Ie19038046fa9121cc234546a9891685153be5646
This commit is contained in:
parent
fa02cce680
commit
c6e44b87ef
@ -1103,7 +1103,7 @@ ScCondFormatDlg::ScCondFormatDlg(Window* pParent, ScDocument* pDoc, const ScCond
|
|||||||
SetText(aTitle.makeStringAndClear());
|
SetText(aTitle.makeStringAndClear());
|
||||||
maBtnAdd.SetClickHdl( LINK( &maCondFormList, ScCondFormatList, AddBtnHdl ) );
|
maBtnAdd.SetClickHdl( LINK( &maCondFormList, ScCondFormatList, AddBtnHdl ) );
|
||||||
maBtnRemove.SetClickHdl( LINK( &maCondFormList, ScCondFormatList, RemoveBtnHdl ) );
|
maBtnRemove.SetClickHdl( LINK( &maCondFormList, ScCondFormatList, RemoveBtnHdl ) );
|
||||||
maEdRange.SetModifyHdl( LINK( &maEdRange, ScCondFormatDlg, EdRangeModifyHdl ) );
|
maEdRange.SetModifyHdl( LINK( this, ScCondFormatDlg, EdRangeModifyHdl ) );
|
||||||
FreeResource();
|
FreeResource();
|
||||||
|
|
||||||
maEdRange.SetText(aRangeString);
|
maEdRange.SetText(aRangeString);
|
||||||
@ -1166,15 +1166,15 @@ IMPL_LINK_NOARG( ScCondFormatList, ScrollHdl )
|
|||||||
return 0;
|
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;
|
ScRangeList aRange;
|
||||||
sal_uInt16 nFlags = aRange.Parse(aRangeStr, mpDoc, SCA_VALID, mpDoc->GetAddressConvention());
|
sal_uInt16 nFlags = aRange.Parse(aRangeStr, mpDoc, SCA_VALID, mpDoc->GetAddressConvention());
|
||||||
if(nFlags & SCA_VALID)
|
if(nFlags & SCA_VALID)
|
||||||
maEdRange.SetControlBackground(GetSettings().GetStyleSettings().GetWindowColor());
|
pEdit->SetControlBackground(GetSettings().GetStyleSettings().GetWindowColor());
|
||||||
else
|
else
|
||||||
maEdRange.SetControlBackground(COL_LIGHTRED);
|
pEdit->SetControlBackground(COL_LIGHTRED);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -185,7 +185,7 @@ private:
|
|||||||
ScAddress maPos;
|
ScAddress maPos;
|
||||||
ScDocument* mpDoc;
|
ScDocument* mpDoc;
|
||||||
|
|
||||||
DECL_LINK( EdRangeModifyHdl, void* );
|
DECL_LINK( EdRangeModifyHdl, Edit* );
|
||||||
|
|
||||||
public:
|
public:
|
||||||
ScCondFormatDlg(Window* pWindow, ScDocument* pDoc, const ScConditionalFormat* pFormat, const ScRangeList& rRange, const ScAddress& rPos);
|
ScCondFormatDlg(Window* pWindow, ScDocument* pDoc, const ScConditionalFormat* pFormat, const ScRangeList& rRange, const ScAddress& rPos);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user