2010-10-14 08:30:41 +02:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2000-09-18 23:08:29 +00:00
|
|
|
/*************************************************************************
|
|
|
|
*
|
2008-04-10 13:55:11 +00:00
|
|
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
2000-09-18 23:08:29 +00:00
|
|
|
*
|
2010-02-12 15:01:35 +01:00
|
|
|
* Copyright 2000, 2010 Oracle and/or its affiliates.
|
2000-09-18 23:08:29 +00:00
|
|
|
*
|
2008-04-10 13:55:11 +00:00
|
|
|
* OpenOffice.org - a multi-platform office productivity suite
|
2000-09-18 23:08:29 +00:00
|
|
|
*
|
2008-04-10 13:55:11 +00:00
|
|
|
* This file is part of OpenOffice.org.
|
2000-09-18 23:08:29 +00:00
|
|
|
*
|
2008-04-10 13:55:11 +00:00
|
|
|
* OpenOffice.org is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU Lesser General Public License version 3
|
|
|
|
* only, as published by the Free Software Foundation.
|
2000-09-18 23:08:29 +00:00
|
|
|
*
|
2008-04-10 13:55:11 +00:00
|
|
|
* OpenOffice.org is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU Lesser General Public License version 3 for more details
|
|
|
|
* (a copy is included in the LICENSE file that accompanied this code).
|
2000-09-18 23:08:29 +00:00
|
|
|
*
|
2008-04-10 13:55:11 +00:00
|
|
|
* You should have received a copy of the GNU Lesser General Public License
|
|
|
|
* version 3 along with OpenOffice.org. If not, see
|
|
|
|
* <http://www.openoffice.org/license.html>
|
|
|
|
* for a copy of the LGPLv3 License.
|
2000-09-18 23:08:29 +00:00
|
|
|
*
|
|
|
|
************************************************************************/
|
|
|
|
|
2006-09-16 20:24:12 +00:00
|
|
|
// MARKER(update_precomp.py): autogen include statement, do not remove
|
|
|
|
#include "precompiled_sw.hxx"
|
|
|
|
|
2000-09-18 23:08:29 +00:00
|
|
|
|
2001-10-15 12:30:56 +00:00
|
|
|
#include <pagefrm.hxx>
|
|
|
|
#include <rootfrm.hxx>
|
|
|
|
#include <cntfrm.hxx>
|
|
|
|
#include <doc.hxx>
|
|
|
|
#include <node.hxx>
|
|
|
|
#include <dview.hxx>
|
|
|
|
#include <dcontact.hxx>
|
|
|
|
#include <dflyobj.hxx>
|
|
|
|
#include <flyfrm.hxx>
|
|
|
|
#include <txtfrm.hxx> // ClearPara()
|
2004-04-21 08:56:32 +00:00
|
|
|
#include <cellfrm.hxx>
|
|
|
|
#include <swtable.hxx>
|
|
|
|
#include <fmtfsize.hxx>
|
2001-11-06 14:49:45 +00:00
|
|
|
#include <ftnidx.hxx>
|
|
|
|
#include <txtftn.hxx>
|
|
|
|
#include <ndtxt.hxx>
|
|
|
|
#include <ndindex.hxx>
|
2001-10-15 12:30:56 +00:00
|
|
|
#include <frmtool.hxx>
|
|
|
|
#include <pagedesc.hxx>
|
2010-01-08 18:32:51 +01:00
|
|
|
#include <editeng/boxitem.hxx>
|
|
|
|
#include <editeng/shaditem.hxx>
|
2001-09-13 07:20:02 +00:00
|
|
|
#include <fmtclds.hxx>
|
2002-02-20 17:14:14 +00:00
|
|
|
#include <viewsh.hxx>
|
|
|
|
#include <viewimp.hxx>
|
2006-08-14 15:29:37 +00:00
|
|
|
|
2004-08-02 13:13:14 +00:00
|
|
|
// OD 2004-05-24 #i28701#
|
|
|
|
#include <sortedobjs.hxx>
|
2008-03-05 16:03:28 +00:00
|
|
|
#include <hints.hxx>
|
2000-09-18 23:08:29 +00:00
|
|
|
|
2001-09-11 07:13:09 +00:00
|
|
|
// No inline cause we need the function pointers
|
|
|
|
long SwFrm::GetTopMargin() const
|
|
|
|
{ return Prt().Top(); }
|
|
|
|
long SwFrm::GetBottomMargin() const
|
|
|
|
{ return Frm().Height() -Prt().Height() -Prt().Top(); }
|
|
|
|
long SwFrm::GetLeftMargin() const
|
|
|
|
{ return Prt().Left(); }
|
|
|
|
long SwFrm::GetRightMargin() const
|
|
|
|
{ return Frm().Width() - Prt().Width() - Prt().Left(); }
|
2001-09-13 07:20:02 +00:00
|
|
|
long SwFrm::GetPrtLeft() const
|
|
|
|
{ return Frm().Left() + Prt().Left(); }
|
|
|
|
long SwFrm::GetPrtBottom() const
|
|
|
|
{ return Frm().Top() + Prt().Height() + Prt().Top(); }
|
2001-10-05 11:36:10 +00:00
|
|
|
long SwFrm::GetPrtRight() const
|
|
|
|
{ return Frm().Left() + Prt().Width() + Prt().Left(); }
|
|
|
|
long SwFrm::GetPrtTop() const
|
|
|
|
{ return Frm().Top() + Prt().Top(); }
|
2001-09-13 07:20:02 +00:00
|
|
|
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_Bool SwFrm::SetMinLeft( long nDeadline )
|
2001-09-13 07:20:02 +00:00
|
|
|
{
|
|
|
|
SwTwips nDiff = nDeadline - Frm().Left();
|
|
|
|
if( nDiff > 0 )
|
|
|
|
{
|
|
|
|
Frm().Left( nDeadline );
|
|
|
|
Prt().Width( Prt().Width() - nDiff );
|
2011-01-17 15:06:54 +01:00
|
|
|
return sal_True;
|
2001-09-13 07:20:02 +00:00
|
|
|
}
|
2011-01-17 15:06:54 +01:00
|
|
|
return sal_False;
|
2001-09-13 07:20:02 +00:00
|
|
|
}
|
|
|
|
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_Bool SwFrm::SetMaxBottom( long nDeadline )
|
2001-09-13 07:20:02 +00:00
|
|
|
{
|
|
|
|
SwTwips nDiff = Frm().Top() + Frm().Height() - nDeadline;
|
|
|
|
if( nDiff > 0 )
|
|
|
|
{
|
|
|
|
Frm().Height( Frm().Height() - nDiff );
|
|
|
|
Prt().Height( Prt().Height() - nDiff );
|
2011-01-17 15:06:54 +01:00
|
|
|
return sal_True;
|
2001-09-13 07:20:02 +00:00
|
|
|
}
|
2011-01-17 15:06:54 +01:00
|
|
|
return sal_False;
|
2001-09-13 07:20:02 +00:00
|
|
|
}
|
|
|
|
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_Bool SwFrm::SetMinTop( long nDeadline )
|
2001-10-05 11:36:10 +00:00
|
|
|
{
|
|
|
|
SwTwips nDiff = nDeadline - Frm().Top();
|
|
|
|
if( nDiff > 0 )
|
|
|
|
{
|
|
|
|
Frm().Top( nDeadline );
|
|
|
|
Prt().Height( Prt().Height() - nDiff );
|
2011-01-17 15:06:54 +01:00
|
|
|
return sal_True;
|
2001-10-05 11:36:10 +00:00
|
|
|
}
|
2011-01-17 15:06:54 +01:00
|
|
|
return sal_False;
|
2001-10-05 11:36:10 +00:00
|
|
|
}
|
|
|
|
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_Bool SwFrm::SetMaxRight( long nDeadline )
|
2001-10-05 11:36:10 +00:00
|
|
|
{
|
|
|
|
SwTwips nDiff = Frm().Left() + Frm().Width() - nDeadline;
|
|
|
|
if( nDiff > 0 )
|
|
|
|
{
|
|
|
|
Frm().Width( Frm().Width() - nDiff );
|
|
|
|
Prt().Width( Prt().Width() - nDiff );
|
2011-01-17 15:06:54 +01:00
|
|
|
return sal_True;
|
2001-10-05 11:36:10 +00:00
|
|
|
}
|
2011-01-17 15:06:54 +01:00
|
|
|
return sal_False;
|
2001-10-05 11:36:10 +00:00
|
|
|
}
|
|
|
|
|
2011-01-17 15:06:54 +01:00
|
|
|
void SwFrm::MakeBelowPos( const SwFrm* pUp, const SwFrm* pPrv, sal_Bool bNotify )
|
2001-11-09 12:32:26 +00:00
|
|
|
{
|
|
|
|
if( pPrv )
|
|
|
|
{
|
|
|
|
aFrm.Pos( pPrv->Frm().Pos() );
|
|
|
|
aFrm.Pos().Y() += pPrv->Frm().Height();
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
aFrm.Pos( pUp->Frm().Pos() );
|
|
|
|
aFrm.Pos() += pUp->Prt().Pos();
|
|
|
|
}
|
|
|
|
if( bNotify )
|
|
|
|
aFrm.Pos().Y() += 1;
|
|
|
|
}
|
|
|
|
|
2011-01-17 15:06:54 +01:00
|
|
|
void SwFrm::MakeUpperPos( const SwFrm* pUp, const SwFrm* pPrv, sal_Bool bNotify )
|
2001-11-09 12:32:26 +00:00
|
|
|
{
|
|
|
|
if( pPrv )
|
|
|
|
{
|
|
|
|
aFrm.Pos( pPrv->Frm().Pos() );
|
|
|
|
aFrm.Pos().Y() -= Frm().Height();
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
aFrm.Pos( pUp->Frm().Pos() );
|
|
|
|
aFrm.Pos() += pUp->Prt().Pos();
|
2001-11-13 14:21:55 +00:00
|
|
|
aFrm.Pos().Y() += pUp->Prt().Height() - aFrm.Height();
|
2001-11-09 12:32:26 +00:00
|
|
|
}
|
|
|
|
if( bNotify )
|
|
|
|
aFrm.Pos().Y() -= 1;
|
|
|
|
}
|
|
|
|
|
2011-01-17 15:06:54 +01:00
|
|
|
void SwFrm::MakeLeftPos( const SwFrm* pUp, const SwFrm* pPrv, sal_Bool bNotify )
|
2001-11-09 12:32:26 +00:00
|
|
|
{
|
|
|
|
if( pPrv )
|
|
|
|
{
|
|
|
|
aFrm.Pos( pPrv->Frm().Pos() );
|
|
|
|
aFrm.Pos().X() -= Frm().Width();
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
aFrm.Pos( pUp->Frm().Pos() );
|
|
|
|
aFrm.Pos() += pUp->Prt().Pos();
|
2001-11-13 14:21:55 +00:00
|
|
|
aFrm.Pos().X() += pUp->Prt().Width() - aFrm.Width();
|
2001-11-09 12:32:26 +00:00
|
|
|
}
|
|
|
|
if( bNotify )
|
|
|
|
aFrm.Pos().X() -= 1;
|
|
|
|
}
|
|
|
|
|
2011-01-17 15:06:54 +01:00
|
|
|
void SwFrm::MakeRightPos( const SwFrm* pUp, const SwFrm* pPrv, sal_Bool bNotify )
|
2001-11-09 12:32:26 +00:00
|
|
|
{
|
|
|
|
if( pPrv )
|
|
|
|
{
|
|
|
|
aFrm.Pos( pPrv->Frm().Pos() );
|
|
|
|
aFrm.Pos().X() += pPrv->Frm().Width();
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
aFrm.Pos( pUp->Frm().Pos() );
|
|
|
|
aFrm.Pos() += pUp->Prt().Pos();
|
|
|
|
}
|
|
|
|
if( bNotify )
|
|
|
|
aFrm.Pos().X() += 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
void SwFrm::SetTopBottomMargins( long nTop, long nBot )
|
|
|
|
{
|
|
|
|
Prt().Top( nTop );
|
|
|
|
Prt().Height( Frm().Height() - nTop - nBot );
|
|
|
|
}
|
|
|
|
|
|
|
|
void SwFrm::SetBottomTopMargins( long nBot, long nTop )
|
|
|
|
{
|
|
|
|
Prt().Top( nTop );
|
|
|
|
Prt().Height( Frm().Height() - nTop - nBot );
|
|
|
|
}
|
|
|
|
|
|
|
|
void SwFrm::SetLeftRightMargins( long nLeft, long nRight)
|
|
|
|
{
|
|
|
|
Prt().Left( nLeft );
|
|
|
|
Prt().Width( Frm().Width() - nLeft - nRight );
|
|
|
|
}
|
|
|
|
|
|
|
|
void SwFrm::SetRightLeftMargins( long nRight, long nLeft)
|
|
|
|
{
|
|
|
|
Prt().Left( nLeft );
|
|
|
|
Prt().Width( Frm().Width() - nLeft - nRight );
|
|
|
|
}
|
|
|
|
|
2011-01-17 15:06:54 +01:00
|
|
|
const sal_uInt16 nMinVertCellHeight = 1135;
|
2004-04-21 08:56:32 +00:00
|
|
|
|
2011-01-18 16:40:38 +01:00
|
|
|
/*--------------------------------------------------
|
2001-09-19 07:45:10 +00:00
|
|
|
* SwFrm::CheckDirChange(..)
|
|
|
|
* checks the layout direction and
|
2001-09-13 07:20:02 +00:00
|
|
|
* invalidates the lower frames rekursivly, if necessary.
|
|
|
|
* --------------------------------------------------*/
|
|
|
|
|
2001-09-19 07:45:10 +00:00
|
|
|
void SwFrm::CheckDirChange()
|
2001-09-13 07:20:02 +00:00
|
|
|
{
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_Bool bOldVert = GetVerticalFlag();
|
|
|
|
sal_Bool bOldRev = IsReverse();
|
|
|
|
sal_Bool bOldR2L = GetRightToLeftFlag();
|
|
|
|
SetInvalidVert( sal_True );
|
|
|
|
SetInvalidR2L( sal_True );
|
|
|
|
sal_Bool bChg = bOldR2L != IsRightToLeft();
|
2009-03-04 16:19:59 +00:00
|
|
|
//Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
|
2011-02-15 18:08:15 +01:00
|
|
|
sal_Bool bOldVertL2R = IsVertLR();
|
2009-03-04 16:19:59 +00:00
|
|
|
if( ( IsVertical() != bOldVert ) || bChg || IsReverse() != bOldRev || bOldVertL2R != IsVertLR() )
|
2001-09-13 07:20:02 +00:00
|
|
|
{
|
|
|
|
InvalidateAll();
|
2002-01-24 15:21:17 +00:00
|
|
|
if( IsLayoutFrm() )
|
2001-09-13 07:20:02 +00:00
|
|
|
{
|
2004-04-21 08:56:32 +00:00
|
|
|
// set minimum row height for vertical cells in horizontal table:
|
|
|
|
if ( IsCellFrm() && GetUpper() )
|
|
|
|
{
|
2008-05-20 13:42:24 +00:00
|
|
|
if ( IsVertical() != GetUpper()->IsVertical() &&
|
|
|
|
((SwCellFrm*)this)->GetTabBox()->getRowSpan() == 1 )
|
2004-04-21 08:56:32 +00:00
|
|
|
{
|
|
|
|
SwTableLine* pLine = (SwTableLine*)((SwCellFrm*)this)->GetTabBox()->GetUpper();
|
|
|
|
SwFrmFmt* pFrmFmt = pLine->GetFrmFmt();
|
|
|
|
SwFmtFrmSize aNew( pFrmFmt->GetFrmSize() );
|
2004-05-26 08:02:59 +00:00
|
|
|
if ( ATT_FIX_SIZE != aNew.GetHeightSizeType() )
|
|
|
|
aNew.SetHeightSizeType( ATT_MIN_SIZE );
|
2004-04-21 08:56:32 +00:00
|
|
|
if ( aNew.GetHeight() < nMinVertCellHeight )
|
|
|
|
aNew.SetHeight( nMinVertCellHeight );
|
|
|
|
SwDoc* pDoc = pFrmFmt->GetDoc();
|
|
|
|
pDoc->SetAttr( aNew, *pLine->ClaimFrmFmt() );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2002-01-24 15:21:17 +00:00
|
|
|
SwFrm* pFrm = ((SwLayoutFrm*)this)->Lower();
|
|
|
|
const SwFmtCol* pCol = NULL;
|
2007-09-27 08:06:38 +00:00
|
|
|
SwLayoutFrm* pBody = 0;
|
2002-07-11 15:06:38 +00:00
|
|
|
if( pFrm )
|
2002-01-24 15:21:17 +00:00
|
|
|
{
|
2002-07-11 15:06:38 +00:00
|
|
|
if( IsPageFrm() )
|
2002-01-24 15:21:17 +00:00
|
|
|
{
|
2002-07-11 15:06:38 +00:00
|
|
|
// If we're a page frame and we change our layout direction,
|
|
|
|
// we have to look for columns and rearrange them.
|
|
|
|
pBody = ((SwPageFrm*)this)->FindBodyCont();
|
|
|
|
if(pBody && pBody->Lower() && pBody->Lower()->IsColumnFrm())
|
|
|
|
pCol = &((SwPageFrm*)this)->GetFmt()->GetCol();
|
2002-01-24 15:21:17 +00:00
|
|
|
}
|
2002-07-11 15:06:38 +00:00
|
|
|
else if( pFrm->IsColumnFrm() )
|
|
|
|
{
|
|
|
|
pBody = ((SwLayoutFrm*)this);
|
|
|
|
const SwFrmFmt *pFmt = pBody->GetFmt();
|
|
|
|
if( pFmt )
|
|
|
|
pCol = &pFmt->GetCol();
|
|
|
|
}
|
2002-01-24 15:21:17 +00:00
|
|
|
}
|
|
|
|
while( pFrm )
|
|
|
|
{
|
|
|
|
pFrm->CheckDirChange();
|
|
|
|
pFrm = pFrm->GetNext();
|
|
|
|
}
|
|
|
|
if( pCol )
|
2011-01-17 15:06:54 +01:00
|
|
|
pBody->AdjustColumns( pCol, sal_True );
|
2001-09-13 07:20:02 +00:00
|
|
|
}
|
2002-06-24 09:42:05 +00:00
|
|
|
else if( IsTxtFrm() )
|
|
|
|
((SwTxtFrm*)this)->Prepare( PREP_CLEAR );
|
|
|
|
|
2004-08-23 07:02:37 +00:00
|
|
|
// --> OD 2004-07-27 #i31698# - notify anchored objects also for page frames.
|
|
|
|
// Remove code above for special handling of page frames
|
|
|
|
if ( GetDrawObjs() )
|
2001-09-13 07:20:02 +00:00
|
|
|
{
|
2004-08-02 13:13:14 +00:00
|
|
|
const SwSortedObjs *pObjs = GetDrawObjs();
|
|
|
|
sal_uInt32 nCnt = pObjs->Count();
|
|
|
|
for ( sal_uInt32 i = 0; i < nCnt; ++i )
|
2002-01-24 15:21:17 +00:00
|
|
|
{
|
2004-08-02 13:13:14 +00:00
|
|
|
SwAnchoredObject* pAnchoredObj = (*pObjs)[i];
|
|
|
|
if( pAnchoredObj->ISA(SwFlyFrm) )
|
|
|
|
static_cast<SwFlyFrm*>(pAnchoredObj)->CheckDirChange();
|
2002-09-16 07:47:13 +00:00
|
|
|
else
|
|
|
|
{
|
2004-06-28 12:41:17 +00:00
|
|
|
// OD 2004-04-06 #i26791# - direct object
|
|
|
|
// positioning no longer needed. Instead
|
|
|
|
// invalidate
|
2004-08-02 13:13:14 +00:00
|
|
|
pAnchoredObj->InvalidateObjPos();
|
2002-09-16 07:47:13 +00:00
|
|
|
}
|
2004-08-23 07:02:37 +00:00
|
|
|
// --> OD 2004-07-27 #i31698# - update layout direction of
|
|
|
|
// anchored object
|
|
|
|
{
|
2008-12-16 13:30:53 +00:00
|
|
|
::setContextWritingMode( pAnchoredObj->DrawObj(), pAnchoredObj->GetAnchorFrmContainingAnchPos() );
|
2004-08-23 07:02:37 +00:00
|
|
|
pAnchoredObj->UpdateLayoutDir();
|
|
|
|
}
|
|
|
|
// <--
|
2002-01-24 15:21:17 +00:00
|
|
|
}
|
2001-09-13 07:20:02 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2001-09-11 07:13:09 +00:00
|
|
|
|
2011-01-18 16:40:38 +01:00
|
|
|
/*--------------------------------------------------
|
2004-06-28 12:41:17 +00:00
|
|
|
* SwFrm::GetFrmAnchorPos(..)
|
2002-09-16 07:47:13 +00:00
|
|
|
* returns the position for anchors based on frame direction
|
|
|
|
* --------------------------------------------------*/
|
2004-03-31 14:09:09 +00:00
|
|
|
// OD 2004-03-10 #i11860# - consider lower space and line spacing of
|
|
|
|
// previous frame according to new option 'Use former object positioning'
|
2003-05-22 08:48:17 +00:00
|
|
|
Point SwFrm::GetFrmAnchorPos( sal_Bool bIgnoreFlysAnchoredAtThisFrame ) const
|
2002-09-16 07:47:13 +00:00
|
|
|
{
|
|
|
|
Point aAnchor = Frm().Pos();
|
2009-03-04 16:19:59 +00:00
|
|
|
//Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
|
|
|
|
if ( ( IsVertical() && !IsVertLR() ) || IsRightToLeft() )
|
2002-09-16 07:47:13 +00:00
|
|
|
aAnchor.X() += Frm().Width();
|
2003-05-22 08:48:17 +00:00
|
|
|
|
|
|
|
if ( IsTxtFrm() )
|
|
|
|
{
|
|
|
|
SwTwips nBaseOfstForFly =
|
|
|
|
((SwTxtFrm*)this)->GetBaseOfstForFly( bIgnoreFlysAnchoredAtThisFrame );
|
|
|
|
if ( IsVertical() )
|
|
|
|
aAnchor.Y() += nBaseOfstForFly;
|
|
|
|
else
|
|
|
|
aAnchor.X() += nBaseOfstForFly;
|
2004-03-31 14:09:09 +00:00
|
|
|
|
|
|
|
// OD 2004-03-10 #i11860# - if option 'Use former object positioning'
|
|
|
|
// is OFF, consider the lower space and the line spacing of the
|
|
|
|
// previous frame and the spacing considered for the page grid
|
|
|
|
const SwTxtFrm* pThisTxtFrm = static_cast<const SwTxtFrm*>(this);
|
|
|
|
const SwTwips nUpperSpaceAmountConsideredForPrevFrmAndPageGrid =
|
|
|
|
pThisTxtFrm->GetUpperSpaceAmountConsideredForPrevFrmAndPageGrid();
|
|
|
|
if ( IsVertical() )
|
|
|
|
{
|
|
|
|
aAnchor.X() -= nUpperSpaceAmountConsideredForPrevFrmAndPageGrid;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
aAnchor.Y() += nUpperSpaceAmountConsideredForPrevFrmAndPageGrid;
|
|
|
|
}
|
2003-05-22 08:48:17 +00:00
|
|
|
}
|
|
|
|
|
2002-09-16 07:47:13 +00:00
|
|
|
return aAnchor;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2000-09-18 23:08:29 +00:00
|
|
|
/*************************************************************************
|
|
|
|
|*
|
|
|
|
|* SwFrm::~SwFrm()
|
|
|
|
|*
|
|
|
|
|*************************************************************************/
|
|
|
|
|
|
|
|
|
2011-01-18 11:33:38 +00:00
|
|
|
SwFrm::~SwFrm()
|
|
|
|
{
|
|
|
|
// accessible objects for fly and cell frames have been already disposed
|
|
|
|
// by the destructors of the derived classes.
|
|
|
|
if( IsAccessibleFrm() && !(IsFlyFrm() || IsCellFrm()) && GetDep() )
|
|
|
|
{
|
|
|
|
SwRootFrm *pRootFrm = FindRootFrm();
|
|
|
|
if( pRootFrm && pRootFrm->IsAnyShellAccessible() )
|
|
|
|
{
|
|
|
|
ViewShell *pVSh = pRootFrm->GetCurrShell();
|
|
|
|
if( pVSh && pVSh->Imp() )
|
|
|
|
{
|
|
|
|
OSL_ENSURE( !GetLower(), "Lowers should be dispose already!" );
|
|
|
|
pVSh->Imp()->DisposeAccessibleFrm( this );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if( pDrawObjs )
|
|
|
|
{
|
|
|
|
for ( sal_uInt32 i = pDrawObjs->Count(); i; )
|
|
|
|
{
|
|
|
|
SwAnchoredObject* pAnchoredObj = (*pDrawObjs)[--i];
|
|
|
|
if ( pAnchoredObj->ISA(SwFlyFrm) )
|
|
|
|
delete pAnchoredObj;
|
|
|
|
else
|
|
|
|
{
|
|
|
|
SdrObject* pSdrObj = pAnchoredObj->DrawObj();
|
|
|
|
SwDrawContact* pContact =
|
|
|
|
static_cast<SwDrawContact*>(pSdrObj->GetUserCall());
|
|
|
|
OSL_ENSURE( pContact,
|
|
|
|
"<SwFrm::~SwFrm> - missing contact for drawing object" );
|
|
|
|
if ( pContact )
|
|
|
|
{
|
|
|
|
pContact->DisconnectObjFromLayout( pSdrObj );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if ( pDrawObjs )
|
|
|
|
delete pDrawObjs;
|
|
|
|
}
|
|
|
|
|
|
|
|
#if OSL_DEBUG_LEVEL > 1
|
|
|
|
// JP 15.10.2001: for detection of access to deleted frames
|
|
|
|
pDrawObjs = (SwSortedObjs*)0x33333333;
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
2010-11-03 15:50:00 +01:00
|
|
|
/*************************************************************************/
|
|
|
|
|
|
|
|
const SwFrmFmt * SwLayoutFrm::GetFmt() const
|
|
|
|
{
|
|
|
|
return static_cast< const SwFlyFrmFmt * >( GetDep() );
|
|
|
|
}
|
|
|
|
|
|
|
|
SwFrmFmt * SwLayoutFrm::GetFmt()
|
|
|
|
{
|
|
|
|
return static_cast< SwFlyFrmFmt * >( GetDep() );
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2011-01-18 11:33:38 +00:00
|
|
|
/*************************************************************************
|
|
|
|
|*
|
|
|
|
|* SwLayoutFrm::SetFrmFmt()
|
|
|
|
|*
|
|
|
|
|*************************************************************************/
|
|
|
|
|
|
|
|
|
2000-09-18 23:08:29 +00:00
|
|
|
void SwLayoutFrm::SetFrmFmt( SwFrmFmt *pNew )
|
|
|
|
{
|
|
|
|
if ( pNew != GetFmt() )
|
|
|
|
{
|
|
|
|
SwFmtChg aOldFmt( GetFmt() );
|
|
|
|
pNew->Add( this );
|
|
|
|
SwFmtChg aNewFmt( pNew );
|
|
|
|
Modify( &aOldFmt, &aNewFmt );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
2006-01-10 12:39:53 +00:00
|
|
|
|* SwCntntFrm::SwCntntFrm()
|
2000-09-18 23:08:29 +00:00
|
|
|
|*************************************************************************/
|
|
|
|
SwCntntFrm::SwCntntFrm( SwCntntNode * const pCntnt ) :
|
|
|
|
SwFrm( pCntnt ),
|
|
|
|
SwFlowFrm( (SwFrm&)*this )
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2006-01-10 12:39:53 +00:00
|
|
|
/*************************************************************************
|
|
|
|
|* SwCntntFrm::~SwCntntFrm()
|
|
|
|
|*************************************************************************/
|
2000-09-18 23:08:29 +00:00
|
|
|
SwCntntFrm::~SwCntntFrm()
|
|
|
|
{
|
|
|
|
SwCntntNode* pCNd;
|
|
|
|
if( 0 != ( pCNd = PTR_CAST( SwCntntNode, pRegisteredIn )) &&
|
|
|
|
!pCNd->GetDoc()->IsInDtor() )
|
|
|
|
{
|
|
|
|
//Bei der Root abmelden wenn ich dort noch im Turbo stehe.
|
|
|
|
SwRootFrm *pRoot = FindRootFrm();
|
|
|
|
if( pRoot && pRoot->GetTurbo() == this )
|
|
|
|
{
|
|
|
|
pRoot->DisallowTurbo();
|
|
|
|
pRoot->ResetTurbo();
|
|
|
|
}
|
2001-11-06 14:49:45 +00:00
|
|
|
if( IsTxtFrm() && ((SwTxtFrm*)this)->HasFtn() )
|
|
|
|
{
|
|
|
|
SwTxtNode *pTxtNd = ((SwTxtFrm*)this)->GetTxtNode();
|
|
|
|
const SwFtnIdxs &rFtnIdxs = pCNd->GetDoc()->GetFtnIdxs();
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_uInt16 nPos;
|
|
|
|
sal_uLong nIndex = pCNd->GetIndex();
|
2001-11-06 14:49:45 +00:00
|
|
|
rFtnIdxs.SeekEntry( *pTxtNd, &nPos );
|
|
|
|
SwTxtFtn* pTxtFtn;
|
|
|
|
if( nPos < rFtnIdxs.Count() )
|
|
|
|
{
|
|
|
|
while( nPos && pTxtNd == &(rFtnIdxs[ nPos ]->GetTxtNode()) )
|
|
|
|
--nPos;
|
|
|
|
if( nPos || pTxtNd != &(rFtnIdxs[ nPos ]->GetTxtNode()) )
|
|
|
|
++nPos;
|
|
|
|
}
|
|
|
|
while( nPos < rFtnIdxs.Count() )
|
|
|
|
{
|
|
|
|
pTxtFtn = rFtnIdxs[ nPos ];
|
|
|
|
if( pTxtFtn->GetTxtNode().GetIndex() > nIndex )
|
|
|
|
break;
|
|
|
|
pTxtFtn->DelFrms();
|
|
|
|
++nPos;
|
|
|
|
}
|
|
|
|
}
|
2000-09-18 23:08:29 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
|*
|
|
|
|
|* SwLayoutFrm::~SwLayoutFrm
|
|
|
|
|*
|
|
|
|
|*************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
SwLayoutFrm::~SwLayoutFrm()
|
|
|
|
{
|
|
|
|
SwFrm *pFrm = pLower;
|
|
|
|
|
|
|
|
if( GetFmt() && !GetFmt()->GetDoc()->IsInDtor() )
|
|
|
|
{
|
|
|
|
while ( pFrm )
|
|
|
|
{
|
|
|
|
//Erst die Objs des Frm vernichten, denn diese koennen sich sonst nach
|
|
|
|
//dem Remove nicht mehr bei der Seite abmelden.
|
|
|
|
//Falls sich einer nicht abmeldet wollen wir nicht gleich
|
|
|
|
//endlos schleifen.
|
2003-07-04 12:22:57 +00:00
|
|
|
|
2004-08-02 13:13:14 +00:00
|
|
|
sal_uInt32 nCnt;
|
2000-09-18 23:08:29 +00:00
|
|
|
while ( pFrm->GetDrawObjs() && pFrm->GetDrawObjs()->Count() )
|
|
|
|
{
|
|
|
|
nCnt = pFrm->GetDrawObjs()->Count();
|
2004-08-02 13:13:14 +00:00
|
|
|
// --> OD 2004-06-30 #i28701#
|
|
|
|
SwAnchoredObject* pAnchoredObj = (*pFrm->GetDrawObjs())[0];
|
|
|
|
if ( pAnchoredObj->ISA(SwFlyFrm) )
|
|
|
|
delete pAnchoredObj;
|
|
|
|
else
|
2003-07-04 12:22:57 +00:00
|
|
|
{
|
2004-08-02 13:13:14 +00:00
|
|
|
SdrObject* pSdrObj = pAnchoredObj->DrawObj();
|
|
|
|
SwDrawContact* pContact =
|
|
|
|
static_cast<SwDrawContact*>(pSdrObj->GetUserCall());
|
2010-11-25 17:08:45 +01:00
|
|
|
OSL_ENSURE( pContact,
|
2004-08-02 13:13:14 +00:00
|
|
|
"<SwFrm::~SwFrm> - missing contact for drawing object" );
|
|
|
|
if ( pContact )
|
|
|
|
{
|
|
|
|
pContact->DisconnectObjFromLayout( pSdrObj );
|
|
|
|
}
|
2003-07-04 12:22:57 +00:00
|
|
|
}
|
2000-09-18 23:08:29 +00:00
|
|
|
if ( pFrm->GetDrawObjs() &&
|
|
|
|
nCnt == pFrm->GetDrawObjs()->Count() )
|
2003-07-04 12:22:57 +00:00
|
|
|
{
|
2004-08-02 13:13:14 +00:00
|
|
|
pFrm->GetDrawObjs()->Remove( *pAnchoredObj );
|
2003-07-04 12:22:57 +00:00
|
|
|
}
|
2004-08-02 13:13:14 +00:00
|
|
|
// <--
|
2000-09-18 23:08:29 +00:00
|
|
|
}
|
|
|
|
pFrm->Remove();
|
|
|
|
delete pFrm;
|
|
|
|
pFrm = pLower;
|
|
|
|
}
|
|
|
|
//Fly's vernichten. Der letzte loescht gleich das Array.
|
2004-08-02 13:13:14 +00:00
|
|
|
sal_uInt32 nCnt;
|
2000-09-18 23:08:29 +00:00
|
|
|
while ( GetDrawObjs() && GetDrawObjs()->Count() )
|
|
|
|
{
|
|
|
|
nCnt = GetDrawObjs()->Count();
|
2004-08-02 13:13:14 +00:00
|
|
|
|
|
|
|
// --> OD 2004-06-30 #i28701#
|
|
|
|
SwAnchoredObject* pAnchoredObj = (*GetDrawObjs())[0];
|
|
|
|
if ( pAnchoredObj->ISA(SwFlyFrm) )
|
|
|
|
delete pAnchoredObj;
|
|
|
|
else
|
2003-07-04 12:22:57 +00:00
|
|
|
{
|
2004-08-02 13:13:14 +00:00
|
|
|
SdrObject* pSdrObj = pAnchoredObj->DrawObj();
|
|
|
|
SwDrawContact* pContact =
|
|
|
|
static_cast<SwDrawContact*>(pSdrObj->GetUserCall());
|
2010-11-25 17:08:45 +01:00
|
|
|
OSL_ENSURE( pContact,
|
2004-08-02 13:13:14 +00:00
|
|
|
"<SwFrm::~SwFrm> - missing contact for drawing object" );
|
|
|
|
if ( pContact )
|
|
|
|
{
|
|
|
|
pContact->DisconnectObjFromLayout( pSdrObj );
|
|
|
|
}
|
2003-07-04 12:22:57 +00:00
|
|
|
}
|
2000-09-18 23:08:29 +00:00
|
|
|
if ( GetDrawObjs() && nCnt == GetDrawObjs()->Count() )
|
2004-08-02 13:13:14 +00:00
|
|
|
{
|
|
|
|
GetDrawObjs()->Remove( *pAnchoredObj );
|
|
|
|
}
|
|
|
|
// <--
|
2000-09-18 23:08:29 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
while( pFrm )
|
|
|
|
{
|
|
|
|
SwFrm *pNxt = pFrm->GetNext();
|
|
|
|
delete pFrm;
|
|
|
|
pFrm = pNxt;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
|*
|
|
|
|
|* SwFrm::PaintArea()
|
|
|
|
|*
|
|
|
|
|* The paintarea is the area, in which the content of a frame is allowed
|
|
|
|
|* to be displayed. This region could be larger than the printarea (Prt())
|
|
|
|
|* of the upper, it includes e.g. often the margin of the page.
|
|
|
|
|*
|
|
|
|
|*************************************************************************/
|
|
|
|
|
|
|
|
const SwRect SwFrm::PaintArea() const
|
|
|
|
{
|
2007-02-28 14:49:10 +00:00
|
|
|
// NEW TABLES
|
|
|
|
// Cell frames may not leave their upper:
|
|
|
|
SwRect aRect = IsRowFrm() ? GetUpper()->Frm() : Frm();
|
2011-01-17 15:06:54 +01:00
|
|
|
const sal_Bool bVert = IsVertical();
|
2009-03-04 16:19:59 +00:00
|
|
|
//Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
|
|
|
|
SwRectFn fnRect = bVert ? ( IsVertLR() ? fnRectVertL2R : fnRectVert ) : fnRectHori;
|
2001-09-17 10:20:34 +00:00
|
|
|
long nRight = (aRect.*fnRect->fnGetRight)();
|
|
|
|
long nLeft = (aRect.*fnRect->fnGetLeft)();
|
2000-09-18 23:08:29 +00:00
|
|
|
const SwFrm* pTmp = this;
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_Bool bLeft = sal_True;
|
|
|
|
sal_Bool bRight = sal_True;
|
2008-05-20 13:42:24 +00:00
|
|
|
long nRowSpan = 0;
|
2000-09-18 23:08:29 +00:00
|
|
|
while( pTmp )
|
|
|
|
{
|
2008-05-20 13:42:24 +00:00
|
|
|
if( pTmp->IsCellFrm() && pTmp->GetUpper() &&
|
|
|
|
pTmp->GetUpper()->IsVertical() != pTmp->IsVertical() )
|
|
|
|
nRowSpan = ((SwCellFrm*)pTmp)->GetTabBox()->getRowSpan();
|
2001-09-17 10:20:34 +00:00
|
|
|
long nTmpRight = (pTmp->Frm().*fnRect->fnGetRight)();
|
|
|
|
long nTmpLeft = (pTmp->Frm().*fnRect->fnGetLeft)();
|
2008-05-20 13:42:24 +00:00
|
|
|
if( pTmp->IsRowFrm() && nRowSpan > 1 )
|
|
|
|
{
|
|
|
|
const SwFrm* pNxt = pTmp;
|
|
|
|
while( --nRowSpan > 0 && pNxt->GetNext() )
|
|
|
|
pNxt = pNxt->GetNext();
|
|
|
|
if( pTmp->IsVertical() )
|
|
|
|
nTmpLeft = (pNxt->Frm().*fnRect->fnGetLeft)();
|
|
|
|
else
|
|
|
|
nTmpRight = (pNxt->Frm().*fnRect->fnGetRight)();
|
|
|
|
}
|
2010-11-25 17:08:45 +01:00
|
|
|
OSL_ENSURE( pTmp, "PaintArea lost in time and space" );
|
2000-09-18 23:08:29 +00:00
|
|
|
if( pTmp->IsPageFrm() || pTmp->IsFlyFrm() ||
|
|
|
|
pTmp->IsCellFrm() || pTmp->IsRowFrm() || //nobody leaves a table!
|
|
|
|
pTmp->IsRootFrm() )
|
|
|
|
{
|
2001-09-17 10:20:34 +00:00
|
|
|
if( bLeft || nLeft < nTmpLeft )
|
|
|
|
nLeft = nTmpLeft;
|
2000-09-18 23:08:29 +00:00
|
|
|
if( bRight || nTmpRight < nRight )
|
|
|
|
nRight = nTmpRight;
|
|
|
|
if( pTmp->IsPageFrm() || pTmp->IsFlyFrm() || pTmp->IsRootFrm() )
|
|
|
|
break;
|
2011-01-17 15:06:54 +01:00
|
|
|
bLeft = sal_False;
|
|
|
|
bRight = sal_False;
|
2000-09-18 23:08:29 +00:00
|
|
|
}
|
|
|
|
else if( pTmp->IsColumnFrm() ) // nobody enters neightbour columns
|
|
|
|
{
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_Bool bR2L = pTmp->IsRightToLeft();
|
2001-09-19 07:45:10 +00:00
|
|
|
// the first column has _no_ influence to the left range
|
|
|
|
if( bR2L ? pTmp->GetNext() : pTmp->GetPrev() )
|
|
|
|
{
|
2001-09-17 10:20:34 +00:00
|
|
|
if( bLeft || nLeft < nTmpLeft )
|
|
|
|
nLeft = nTmpLeft;
|
2011-01-17 15:06:54 +01:00
|
|
|
bLeft = sal_False;
|
2001-09-19 07:45:10 +00:00
|
|
|
}
|
|
|
|
// the last column has _no_ influence to the right range
|
|
|
|
if( bR2L ? pTmp->GetPrev() : pTmp->GetNext() )
|
|
|
|
{
|
|
|
|
if( bRight || nTmpRight < nRight )
|
|
|
|
nRight = nTmpRight;
|
2011-01-17 15:06:54 +01:00
|
|
|
bRight = sal_False;
|
2001-09-19 07:45:10 +00:00
|
|
|
}
|
2001-09-17 10:20:34 +00:00
|
|
|
}
|
|
|
|
else if( bVert && pTmp->IsBodyFrm() )
|
|
|
|
{
|
|
|
|
// Header and footer frames have always horizontal direction and
|
|
|
|
// limit the body frame.
|
|
|
|
// A previous frame of a body frame must be a header,
|
|
|
|
// the next frame of a body frame may be a footnotecontainer or
|
|
|
|
// a footer. The footnotecontainer has the same direction like
|
|
|
|
// the body frame.
|
|
|
|
if( pTmp->GetPrev() && ( bLeft || nLeft < nTmpLeft ) )
|
|
|
|
{
|
|
|
|
nLeft = nTmpLeft;
|
2011-01-17 15:06:54 +01:00
|
|
|
bLeft = sal_False;
|
2001-09-17 10:20:34 +00:00
|
|
|
}
|
|
|
|
if( pTmp->GetNext() &&
|
|
|
|
( pTmp->GetNext()->IsFooterFrm() || pTmp->GetNext()->GetNext() )
|
|
|
|
&& ( bRight || nTmpRight < nRight ) )
|
|
|
|
{
|
2000-09-18 23:08:29 +00:00
|
|
|
nRight = nTmpRight;
|
2011-01-17 15:06:54 +01:00
|
|
|
bRight = sal_False;
|
2000-09-18 23:08:29 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
pTmp = pTmp->GetUpper();
|
|
|
|
}
|
2001-09-17 10:20:34 +00:00
|
|
|
(aRect.*fnRect->fnSetLeft)( nLeft );
|
|
|
|
(aRect.*fnRect->fnSetRight)( nRight );
|
2000-09-18 23:08:29 +00:00
|
|
|
return aRect;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
|*
|
|
|
|
|* SwFrm::UnionFrm()
|
|
|
|
|*
|
|
|
|
|* The unionframe is the framearea (Frm()) of a frame expanded by the
|
|
|
|
|* printarea, if there's a negative margin at the left or right side.
|
|
|
|
|*
|
|
|
|
|*************************************************************************/
|
|
|
|
|
2011-01-17 15:06:54 +01:00
|
|
|
const SwRect SwFrm::UnionFrm( sal_Bool bBorder ) const
|
2000-09-18 23:08:29 +00:00
|
|
|
{
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_Bool bVert = IsVertical();
|
2009-03-04 16:19:59 +00:00
|
|
|
//Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
|
|
|
|
SwRectFn fnRect = bVert ? ( IsVertLR() ? fnRectVertL2R : fnRectVert ) : fnRectHori;
|
2001-09-17 10:20:34 +00:00
|
|
|
long nLeft = (Frm().*fnRect->fnGetLeft)();
|
|
|
|
long nWidth = (Frm().*fnRect->fnGetWidth)();
|
|
|
|
long nPrtLeft = (Prt().*fnRect->fnGetLeft)();
|
|
|
|
long nPrtWidth = (Prt().*fnRect->fnGetWidth)();
|
|
|
|
if( nPrtLeft + nPrtWidth > nWidth )
|
|
|
|
nWidth = nPrtLeft + nPrtWidth;
|
|
|
|
if( nPrtLeft < 0 )
|
|
|
|
{
|
|
|
|
nLeft += nPrtLeft;
|
|
|
|
nWidth -= nPrtLeft;
|
|
|
|
}
|
|
|
|
SwTwips nRight = nLeft + nWidth;
|
|
|
|
long nAdd = 0;
|
|
|
|
if( bBorder )
|
|
|
|
{
|
|
|
|
SwBorderAttrAccess aAccess( SwFrm::GetCache(), this );
|
|
|
|
const SwBorderAttrs &rAttrs = *aAccess.Get();
|
|
|
|
const SvxBoxItem &rBox = rAttrs.GetBox();
|
|
|
|
if ( rBox.GetLeft() )
|
|
|
|
nLeft -= rBox.CalcLineSpace( BOX_LINE_LEFT );
|
|
|
|
else if ( rAttrs.IsBorderDist() )
|
|
|
|
nLeft -= rBox.GetDistance( BOX_LINE_LEFT ) + 1;
|
|
|
|
if ( rBox.GetRight() )
|
|
|
|
nAdd += rBox.CalcLineSpace( BOX_LINE_RIGHT );
|
|
|
|
else if ( rAttrs.IsBorderDist() )
|
|
|
|
nAdd += rBox.GetDistance( BOX_LINE_RIGHT ) + 1;
|
|
|
|
if( rAttrs.GetShadow().GetLocation() != SVX_SHADOW_NONE )
|
|
|
|
{
|
|
|
|
const SvxShadowItem &rShadow = rAttrs.GetShadow();
|
|
|
|
nLeft -= rShadow.CalcShadowSpace( SHADOW_LEFT );
|
|
|
|
nAdd += rShadow.CalcShadowSpace( SHADOW_RIGHT );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if( IsTxtFrm() && ((SwTxtFrm*)this)->HasPara() )
|
|
|
|
{
|
|
|
|
long nTmp = ((SwTxtFrm*)this)->HangingMargin();
|
|
|
|
if( nTmp > nAdd )
|
|
|
|
nAdd = nTmp;
|
|
|
|
}
|
|
|
|
nWidth = nRight + nAdd - nLeft;
|
2000-09-18 23:08:29 +00:00
|
|
|
SwRect aRet( Frm() );
|
2001-09-17 10:20:34 +00:00
|
|
|
(aRet.*fnRect->fnSetPosX)( nLeft );
|
|
|
|
(aRet.*fnRect->fnSetWidth)( nWidth );
|
2000-09-18 23:08:29 +00:00
|
|
|
return aRet;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-10-14 08:30:41 +02:00
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|