Kaydet (Commit) 005cd2d4 authored tarafından Armin Le Grand's avatar Armin Le Grand

i121917 secure SdrTextObj casts in cui

üst 7986627c
...@@ -1932,7 +1932,9 @@ void SvxSwPosSizeTabPage::SetView( const SdrView* pSdrView ) ...@@ -1932,7 +1932,9 @@ void SvxSwPosSizeTabPage::SetView( const SdrView* pSdrView )
SdrObjKind eKind = (SdrObjKind) pObj->GetObjIdentifier(); SdrObjKind eKind = (SdrObjKind) pObj->GetObjIdentifier();
if( ( pObj->GetObjInventor() == SdrInventor ) && if( ( pObj->GetObjInventor() == SdrInventor ) &&
( eKind==OBJ_TEXT || eKind==OBJ_TITLETEXT || eKind==OBJ_OUTLINETEXT) && ( eKind==OBJ_TEXT || eKind==OBJ_TITLETEXT || eKind==OBJ_OUTLINETEXT) &&
( (SdrTextObj*) pObj )->HasText() ) // #121917# The original ((SdrTextObj*)pObj)->HasText() will fail badly with SdrVirtObjs from Writer
0 != dynamic_cast< const SdrTextObj* >(pObj) &&
static_cast< const SdrTextObj* >(pObj)->HasText() )
{ {
DBG_ERROR("AutoWidth/AutoHeight should be enabled"); DBG_ERROR("AutoWidth/AutoHeight should be enabled");
} }
......
...@@ -547,7 +547,9 @@ void SvxTextAttrPage::Construct() ...@@ -547,7 +547,9 @@ void SvxTextAttrPage::Construct()
case OBJ_OUTLINETEXT : case OBJ_OUTLINETEXT :
case OBJ_CAPTION : case OBJ_CAPTION :
{ {
if ( ((SdrTextObj*)pObj)->HasText() ) if( // #121917# The original ((SdrTextObj*)pObj)->HasText() will fail badly with SdrVirtObjs from Writer
0 != dynamic_cast< const SdrTextObj* >(pObj) &&
static_cast< const SdrTextObj* >(pObj)->HasText() )
{ {
// Konturfluss ist NICHT bei reinen Textobjekten m�glich // Konturfluss ist NICHT bei reinen Textobjekten m�glich
bContourEnabled = sal_False; bContourEnabled = sal_False;
......
...@@ -840,7 +840,11 @@ void SvxPositionSizeTabPage::Construct() ...@@ -840,7 +840,11 @@ void SvxPositionSizeTabPage::Construct()
const SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj(); const SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
const SdrObjKind eKind((SdrObjKind)pObj->GetObjIdentifier()); const SdrObjKind eKind((SdrObjKind)pObj->GetObjIdentifier());
if((pObj->GetObjInventor() == SdrInventor) && (OBJ_TEXT == eKind || OBJ_TITLETEXT == eKind || OBJ_OUTLINETEXT == eKind) && ((SdrTextObj*)pObj)->HasText()) if((pObj->GetObjInventor() == SdrInventor) &&
(OBJ_TEXT == eKind || OBJ_TITLETEXT == eKind || OBJ_OUTLINETEXT == eKind) &&
// #121917# The original ((SdrTextObj*)pObj)->HasText() will fail badly with SdrVirtObjs from Writer
0 != dynamic_cast< const SdrTextObj* >(pObj) &&
static_cast< const SdrTextObj* >(pObj)->HasText())
{ {
mbAdjustDisabled = false; mbAdjustDisabled = false;
maFlAdjust.Enable(); maFlAdjust.Enable();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment