Resolves: fdo#87760 if we can't anchor at hidden text then...
anchor to the page instead Change-Id: Ib7931fdd1c70e809ec442aeac125879980e20ec9
This commit is contained in:
@@ -1585,12 +1585,20 @@ bool SwFEShell::ImpEndCreate()
|
|||||||
GetLayout()->GetCrsrOfst( &aPos, aPoint, &aState );
|
GetLayout()->GetCrsrOfst( &aPos, aPoint, &aState );
|
||||||
|
|
||||||
// do not set in ReadnOnly-content
|
// do not set in ReadnOnly-content
|
||||||
if( aPos.nNode.GetNode().IsProtect() )
|
if (aPos.nNode.GetNode().IsProtect())
|
||||||
|
{
|
||||||
// then only page bound. Or should we
|
// then only page bound. Or should we
|
||||||
// search the next not-readonly position?
|
// search the next not-readonly position?
|
||||||
bAtPage = true;
|
bAtPage = true;
|
||||||
|
}
|
||||||
|
|
||||||
pAnch = aPos.nNode.GetNode().GetCntntNode()->getLayoutFrm( GetLayout(), &aPoint, 0, false );
|
SwCntntNode* pCNode = aPos.nNode.GetNode().GetCntntNode();
|
||||||
|
pAnch = pCNode ? pCNode->getLayoutFrm( GetLayout(), &aPoint, 0, false ) : NULL;
|
||||||
|
if (!pAnch)
|
||||||
|
{
|
||||||
|
// Hidden content. Anchor to the page instead
|
||||||
|
bAtPage = true;
|
||||||
|
}
|
||||||
|
|
||||||
if( !bAtPage )
|
if( !bAtPage )
|
||||||
{
|
{
|
||||||
@@ -1636,7 +1644,7 @@ bool SwFEShell::ImpEndCreate()
|
|||||||
|
|
||||||
if( bAtPage )
|
if( bAtPage )
|
||||||
{
|
{
|
||||||
pPage = pAnch->FindPageFrm();
|
pPage = pAnch ? pAnch->FindPageFrm() : GetLayout()->GetPageAtPos(aPoint);
|
||||||
|
|
||||||
aAnch.SetType( FLY_AT_PAGE );
|
aAnch.SetType( FLY_AT_PAGE );
|
||||||
aAnch.SetPageNum( pPage->GetPhyPageNum() );
|
aAnch.SetPageNum( pPage->GetPhyPageNum() );
|
||||||
|
Reference in New Issue
Block a user