Kaydet (Commit) 318b4177 authored tarafından Rüdiger Timm's avatar Rüdiger Timm

INTEGRATION: CWS swqbf89 (1.24.50); FILE MERGED

2006/11/07 09:49:34 od 1.24.50.1: #130889# methods <SwDrawView::AddCustomHdl()> and <SwDrawView::CheckPossibilities()>
	 - introduce robust code on accessing frame format of drawing object
üst 5cb604d7
...@@ -4,9 +4,9 @@ ...@@ -4,9 +4,9 @@
* *
* $RCSfile: dview.cxx,v $ * $RCSfile: dview.cxx,v $
* *
* $Revision: 1.25 $ * $Revision: 1.26 $
* *
* last change: $Author: ihi $ $Date: 2006-11-14 15:09:09 $ * last change: $Author: rt $ $Date: 2006-12-01 14:24:15 $
* *
* The Contents of this file are made available subject to * The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1. * the terms of GNU Lesser General Public License Version 2.1.
...@@ -183,7 +183,16 @@ void SwDrawView::AddCustomHdl() ...@@ -183,7 +183,16 @@ void SwDrawView::AddCustomHdl()
return; return;
SdrObject *pObj = rMrkList.GetMark(0)->GetMarkedSdrObj(); SdrObject *pObj = rMrkList.GetMark(0)->GetMarkedSdrObj();
const SwFmtAnchor &rAnchor = ::FindFrmFmt(pObj)->GetAnchor(); // --> OD 2006-11-06 #130889# - make code robust
// const SwFmtAnchor &rAnchor = ::FindFrmFmt(pObj)->GetAnchor();
SwFrmFmt* pFrmFmt( ::FindFrmFmt( pObj ) );
if ( !pFrmFmt )
{
ASSERT( false, "<SwDrawView::AddCustomHdl()> - missing frame format!" );
return;
}
const SwFmtAnchor &rAnchor = pFrmFmt->GetAnchor();
// <--
if(FLY_IN_CNTNT == rAnchor.GetAnchorId()) if(FLY_IN_CNTNT == rAnchor.GetAnchorId())
return; return;
...@@ -934,9 +943,25 @@ void SwDrawView::CheckPossibilities() ...@@ -934,9 +943,25 @@ void SwDrawView::CheckPossibilities()
} }
if ( pFrm ) if ( pFrm )
bProtect = pFrm->IsProtected(); //Rahmen, Bereiche usw. bProtect = pFrm->IsProtected(); //Rahmen, Bereiche usw.
if ( FLY_IN_CNTNT == ::FindFrmFmt( (SdrObject*)pObj )->GetAnchor().GetAnchorId() && // --> OD 2006-11-06 #130889# - make code robust
rMrkList.GetMarkCount() > 1 ) // if ( FLY_IN_CNTNT == ::FindFrmFmt( (SdrObject*)pObj )->GetAnchor().GetAnchorId() &&
bProtect = TRUE; // rMrkList.GetMarkCount() > 1 )
// bProtect = TRUE;
{
SwFrmFmt* pFrmFmt( ::FindFrmFmt( const_cast<SdrObject*>(pObj) ) );
if ( !pFrmFmt )
{
ASSERT( false,
"<SwDrawView::CheckPossibilities()> - missing frame format" );
bProtect = TRUE;
}
else if ( FLY_IN_CNTNT == pFrmFmt->GetAnchor().GetAnchorId() &&
rMrkList.GetMarkCount() > 1 )
{
bProtect = TRUE;
}
}
// <--
} }
bMoveProtect |= bProtect; bMoveProtect |= bProtect;
bResizeProtect |= bProtect | bSzProtect; bResizeProtect |= bProtect | bSzProtect;
......
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