Author: alg Date: Thu Jul 11 09:23:13 2013 New Revision: 1502164 URL: http://svn.apache.org/r1502164 Log: i121917 secure SdrTextObj casts in cui
Modified: openoffice/branches/AOO400/main/cui/ (props changed) openoffice/branches/AOO400/main/cui/source/tabpages/swpossizetabpage.cxx openoffice/branches/AOO400/main/cui/source/tabpages/textattr.cxx openoffice/branches/AOO400/main/cui/source/tabpages/transfrm.cxx Propchange: openoffice/branches/AOO400/main/cui/ ------------------------------------------------------------------------------ --- svn:mergeinfo (added) +++ svn:mergeinfo Thu Jul 11 09:23:13 2013 @@ -0,0 +1,7 @@ +/incubator/ooo/branches/AOO34/main/cui:1346776-1346777,1347535,1348052,1348914,1350569,1352456,1358991,1359004,1359010,1359024,1359546-1359547,1359553,1359555-1359556,1360552,1368968,1369110,1371068 +/incubator/ooo/branches/alg/linecap/main/cui:1226811-1232461 +/incubator/ooo/branches/alg/svgreplacement/main/cui:1205420-1220782 +/incubator/ooo/branches/writer001/main/cui:1356067-1386577 +/openoffice/branches/alg/clibboard/main/cui:1428975-1437368 +/openoffice/branches/sidebar/main/cui:1415095-1466374 +/openoffice/trunk/main/cui:1502162 Modified: openoffice/branches/AOO400/main/cui/source/tabpages/swpossizetabpage.cxx URL: http://svn.apache.org/viewvc/openoffice/branches/AOO400/main/cui/source/tabpages/swpossizetabpage.cxx?rev=1502164&r1=1502163&r2=1502164&view=diff ============================================================================== --- openoffice/branches/AOO400/main/cui/source/tabpages/swpossizetabpage.cxx (original) +++ openoffice/branches/AOO400/main/cui/source/tabpages/swpossizetabpage.cxx Thu Jul 11 09:23:13 2013 @@ -1932,7 +1932,9 @@ void SvxSwPosSizeTabPage::SetView( const SdrObjKind eKind = (SdrObjKind) pObj->GetObjIdentifier(); if( ( pObj->GetObjInventor() == SdrInventor ) && ( 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"); } Modified: openoffice/branches/AOO400/main/cui/source/tabpages/textattr.cxx URL: http://svn.apache.org/viewvc/openoffice/branches/AOO400/main/cui/source/tabpages/textattr.cxx?rev=1502164&r1=1502163&r2=1502164&view=diff ============================================================================== --- openoffice/branches/AOO400/main/cui/source/tabpages/textattr.cxx (original) +++ openoffice/branches/AOO400/main/cui/source/tabpages/textattr.cxx Thu Jul 11 09:23:13 2013 @@ -547,7 +547,9 @@ void SvxTextAttrPage::Construct() case OBJ_OUTLINETEXT : 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 bContourEnabled = sal_False; Modified: openoffice/branches/AOO400/main/cui/source/tabpages/transfrm.cxx URL: http://svn.apache.org/viewvc/openoffice/branches/AOO400/main/cui/source/tabpages/transfrm.cxx?rev=1502164&r1=1502163&r2=1502164&view=diff ============================================================================== --- openoffice/branches/AOO400/main/cui/source/tabpages/transfrm.cxx (original) +++ openoffice/branches/AOO400/main/cui/source/tabpages/transfrm.cxx Thu Jul 11 09:23:13 2013 @@ -840,7 +840,11 @@ void SvxPositionSizeTabPage::Construct() const SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj(); 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; maFlAdjust.Enable();