diff options
Diffstat (limited to 'sw/source/ui/docvw/edtwin.cxx')
-rw-r--r-- | sw/source/ui/docvw/edtwin.cxx | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sw/source/ui/docvw/edtwin.cxx b/sw/source/ui/docvw/edtwin.cxx index c78cedad805c..818aec6e04a3 100644 --- a/sw/source/ui/docvw/edtwin.cxx +++ b/sw/source/ui/docvw/edtwin.cxx @@ -2195,9 +2195,8 @@ KEYINPUT_CHECKTABLE_INSDEL: case KS_InsChar: if (rSh.GetChar(sal_False)==CH_TXT_ATR_FORMELEMENT) { - ::sw::mark::ICheckboxFieldmark* pFieldmark = NULL; - if ( rSh.GetCurrentFieldmark() && rSh.GetCurrentFieldmark()->GetFieldname().equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ODF_FORMCHECKBOX ) ) ) - pFieldmark = reinterpret_cast< ::sw::mark::ICheckboxFieldmark* > + ::sw::mark::ICheckboxFieldmark* pFieldmark = + dynamic_cast< ::sw::mark::ICheckboxFieldmark* > (rSh.GetCurrentFieldmark()); OSL_ENSURE(pFieldmark, "Where is my FieldMark??"); @@ -4119,7 +4118,7 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt) IFieldmark *fieldBM = const_cast< IFieldmark* > ( aCntntAtPos.aFnd.pFldmark ); if (fieldBM->GetFieldname( ).equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ODF_FORMCHECKBOX ) ) ) { - ICheckboxFieldmark* pCheckboxFm = reinterpret_cast<ICheckboxFieldmark*>(fieldBM); + ICheckboxFieldmark* pCheckboxFm = dynamic_cast<ICheckboxFieldmark*>(fieldBM); pCheckboxFm->SetChecked(!pCheckboxFm->IsChecked()); pCheckboxFm->Invalidate(); rSh.InvalidateWindows( rView.GetVisArea() ); |