Files
libreoffice/sw/source/core/layout/ssfrm.cxx

813 lines
27 KiB
C++
Raw Normal View History

/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
re-base on ALv2 code. Includes: Patches contributed by Oliver-Rainer Wittmann sw34bf06: #i117783# - Writer's implementation of XPagePrintable - apply print settings to new printing routines http://svn.apache.org/viewvc?view=revision&revision=1172115 sw34bf06: #o12311627# use <rtl_random> methods to create unique ids for list styles and list ids http://svn.apache.org/viewvc?view=revision&revision=1172112 sw34bf06 #i114725#,#i115828# - method <SwDoc::ClearDoc()> - clear list structures completely http://svn.apache.org/viewvc?view=revision&revision=1172122 i#118572 - remove ui string and help content regarding usage of Java Mail in Writer's Mail Merge as Java Mail is not used. http://svn.apache.org/viewvc?view=revision&revision=1197035 Patches contributed by Mathias Bauer cws mba34issues01: #i117718#: provide filter name in case storage of medium does not allow to detect one http://svn.apache.org/viewvc?view=revision&revision=1172350 cws mba34issues01: #i117721#: directly provide parameters retrieved from SfxMedium http://svn.apache.org/viewvc?view=revision&revision=1172353 gnumake4 work variously http://svn.apache.org/viewvc?view=revision&revision=1394707 http://svn.apache.org/viewvc?view=revision&revision=1394326 http://svn.apache.org/viewvc?view=revision&revision=1396797 http://svn.apache.org/viewvc?view=revision&revision=1397315 cws mba34issues01: #i117723#: convert assertion into trace http://svn.apache.org/viewvc?view=revision&revision=1172355 cws mba34issues01: #i117699#: keep layout alive until swdoc dies http://svn.apache.org/viewvc?view=revision&revision=1172362 cws mba34issues01: #i117943#: missing color attributes in RTF clipboard http://svn.apache.org/viewvc?view=revision&revision=1172363 Patch contributed by Henning Brinkmann imported patch i#103878 http://svn.apache.org/viewvc?view=revision&revision=1172109 Patches contributed by Michael Stahl sw34bf06: #i117955#: WW8 export: disable storing of section breaks in endnotes http://svn.apache.org/viewvc?view=revision&revision=1172119 Patch contributed by imacat Fixed the Asian language work count. http://svn.apache.org/viewvc?view=revision&revision=1241345 Patch contributed by Pedro Giffuni i#20878 - Add comment with BZ issue for reference. http://svn.apache.org/viewvc?view=revision&revision=1244517 Patch contributed by Andre Fischer Do not add targets for junit tests when junit is disabled. http://svn.apache.org/viewvc?view=revision&revision=1241508 add writerperfect dependency.
2011-03-31 10:05:04 +02:00
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
2000-09-18 23:08:29 +00:00
#include <ftnfrm.hxx>
#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()
#include <cellfrm.hxx>
#include <swtable.hxx>
#include <fmtfsize.hxx>
#include <ftnidx.hxx>
#include <txtftn.hxx>
#include <ndtxt.hxx>
#include <ndindex.hxx>
#include <frmtool.hxx>
#include <pagedesc.hxx>
#include <editeng/boxitem.hxx>
#include <editeng/shaditem.hxx>
#include <fmtclds.hxx>
#include <viewsh.hxx>
#include <viewimp.hxx>
#include <sortedobjs.hxx>
#include <hints.hxx>
#include <switerator.hxx>
2000-09-18 23:08:29 +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(); }
long SwFrm::GetPrtLeft() const
{ return Frm().Left() + Prt().Left(); }
long SwFrm::GetPrtBottom() const
{ return Frm().Top() + Prt().Height() + Prt().Top(); }
long SwFrm::GetPrtRight() const
{ return Frm().Left() + Prt().Width() + Prt().Left(); }
long SwFrm::GetPrtTop() const
{ return Frm().Top() + Prt().Top(); }
sal_Bool SwFrm::SetMinLeft( long nDeadline )
{
SwTwips nDiff = nDeadline - Frm().Left();
if( nDiff > 0 )
{
Frm().Left( nDeadline );
Prt().Width( Prt().Width() - nDiff );
return sal_True;
}
return sal_False;
}
sal_Bool SwFrm::SetMaxBottom( long nDeadline )
{
SwTwips nDiff = Frm().Top() + Frm().Height() - nDeadline;
if( nDiff > 0 )
{
Frm().Height( Frm().Height() - nDiff );
Prt().Height( Prt().Height() - nDiff );
return sal_True;
}
return sal_False;
}
sal_Bool SwFrm::SetMinTop( long nDeadline )
{
SwTwips nDiff = nDeadline - Frm().Top();
if( nDiff > 0 )
{
Frm().Top( nDeadline );
Prt().Height( Prt().Height() - nDiff );
return sal_True;
}
return sal_False;
}
sal_Bool SwFrm::SetMaxRight( long nDeadline )
{
SwTwips nDiff = Frm().Left() + Frm().Width() - nDeadline;
if( nDiff > 0 )
{
Frm().Width( Frm().Width() - nDiff );
Prt().Width( Prt().Width() - nDiff );
return sal_True;
}
return sal_False;
}
void SwFrm::MakeBelowPos( const SwFrm* pUp, const SwFrm* pPrv, sal_Bool bNotify )
2001-11-09 12:32:26 +00:00
{
if( pPrv )
{
maFrm.Pos( pPrv->Frm().Pos() );
maFrm.Pos().Y() += pPrv->Frm().Height();
2001-11-09 12:32:26 +00:00
}
else
{
maFrm.Pos( pUp->Frm().Pos() );
maFrm.Pos() += pUp->Prt().Pos();
2001-11-09 12:32:26 +00:00
}
if( bNotify )
maFrm.Pos().Y() += 1;
2001-11-09 12:32:26 +00:00
}
void SwFrm::MakeUpperPos( const SwFrm* pUp, const SwFrm* pPrv, sal_Bool bNotify )
2001-11-09 12:32:26 +00:00
{
if( pPrv )
{
maFrm.Pos( pPrv->Frm().Pos() );
maFrm.Pos().Y() -= Frm().Height();
2001-11-09 12:32:26 +00:00
}
else
{
maFrm.Pos( pUp->Frm().Pos() );
maFrm.Pos() += pUp->Prt().Pos();
maFrm.Pos().Y() += pUp->Prt().Height() - maFrm.Height();
2001-11-09 12:32:26 +00:00
}
if( bNotify )
maFrm.Pos().Y() -= 1;
2001-11-09 12:32:26 +00:00
}
void SwFrm::MakeLeftPos( const SwFrm* pUp, const SwFrm* pPrv, sal_Bool bNotify )
2001-11-09 12:32:26 +00:00
{
if( pPrv )
{
maFrm.Pos( pPrv->Frm().Pos() );
maFrm.Pos().X() -= Frm().Width();
2001-11-09 12:32:26 +00:00
}
else
{
maFrm.Pos( pUp->Frm().Pos() );
maFrm.Pos() += pUp->Prt().Pos();
maFrm.Pos().X() += pUp->Prt().Width() - maFrm.Width();
2001-11-09 12:32:26 +00:00
}
if( bNotify )
maFrm.Pos().X() -= 1;
2001-11-09 12:32:26 +00:00
}
void SwFrm::MakeRightPos( const SwFrm* pUp, const SwFrm* pPrv, sal_Bool bNotify )
2001-11-09 12:32:26 +00:00
{
if( pPrv )
{
maFrm.Pos( pPrv->Frm().Pos() );
maFrm.Pos().X() += pPrv->Frm().Width();
2001-11-09 12:32:26 +00:00
}
else
{
maFrm.Pos( pUp->Frm().Pos() );
maFrm.Pos() += pUp->Prt().Pos();
2001-11-09 12:32:26 +00:00
}
if( bNotify )
maFrm.Pos().X() += 1;
2001-11-09 12:32:26 +00:00
}
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 );
}
const sal_uInt16 nMinVertCellHeight = 1135;
/*--------------------------------------------------
* SwFrm::CheckDirChange(..)
* checks the layout direction and
* invalidates the lower frames rekursivly, if necessary.
* --------------------------------------------------*/
void SwFrm::CheckDirChange()
{
sal_Bool bOldVert = GetVerticalFlag();
sal_Bool bOldRev = IsReverse();
sal_Bool bOldR2L = GetRightToLeftFlag();
SetInvalidVert( sal_True );
SetInvalidR2L( sal_True );
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() )
{
InvalidateAll();
2002-01-24 15:21:17 +00:00
if( IsLayoutFrm() )
{
// set minimum row height for vertical cells in horizontal table:
if ( IsCellFrm() && GetUpper() )
{
if ( IsVertical() != GetUpper()->IsVertical() &&
((SwCellFrm*)this)->GetTabBox()->getRowSpan() == 1 )
{
SwTableLine* pLine = (SwTableLine*)((SwCellFrm*)this)->GetTabBox()->GetUpper();
SwFrmFmt* pFrmFmt = pLine->GetFrmFmt();
SwFmtFrmSize aNew( pFrmFmt->GetFrmSize() );
if ( ATT_FIX_SIZE != aNew.GetHeightSizeType() )
aNew.SetHeightSizeType( ATT_MIN_SIZE );
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;
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 )
pBody->AdjustColumns( pCol, sal_True );
}
2002-06-24 09:42:05 +00:00
else if( IsTxtFrm() )
((SwTxtFrm*)this)->Prepare( PREP_CLEAR );
// #i31698# - notify anchored objects also for page frames.
// Remove code above for special handling of page frames
if ( GetDrawObjs() )
{
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
{
SwAnchoredObject* pAnchoredObj = (*pObjs)[i];
if( pAnchoredObj->ISA(SwFlyFrm) )
static_cast<SwFlyFrm*>(pAnchoredObj)->CheckDirChange();
else
{
// OD 2004-04-06 #i26791# - direct object
// positioning no longer needed. Instead
// invalidate
pAnchoredObj->InvalidateObjPos();
}
// #i31698# - update layout direction of
// anchored object
{
CWS-TOOLING: integrate CWS rtlcontrols 2008-12-11 21:08:49 +0100 fs r265367 : CONTEXT_WRITING_MODE is transient 2008-12-11 21:08:00 +0100 fs r265365 : REGISTER_PROP_3 2008-12-11 20:53:44 +0100 fs r265362 : ContextWritingMode is not MAYBEVOID 2008-12-11 15:29:08 +0100 fs r265315 : prevent a deadlock during complex.dbaccess.DatabaseDocument test 2008-12-11 15:01:13 +0100 fs r265304 : manual RESYNC to m37 2008-12-10 20:04:38 +0100 pl r265230 : #i30631# fix a snafu in mirroring 2008-12-10 19:14:45 +0100 pl r265229 : #i30631# rework PaintToDevice for RTL controls 2008-12-05 10:19:13 +0100 fs r264893 : #i10000# ImplInitSettings => ImplInitWindow (ImplInitSettings clashed with base classes ImplInitSettings on unxsols4) 2008-12-03 12:55:24 +0100 fs r264768 : #i100000# 2008-12-03 07:11:48 +0100 fs r264741 : #i10000# 2008-12-02 10:37:51 +0100 fs r264670 : CWS-TOOLING: rebase CWS rtlcontrols to trunk@264325 (milestone: DEV300:m36) 2008-12-02 09:27:50 +0100 fs r264660 : merge from trunk 2008-11-25 10:28:36 +0100 ama r264277 : Fix #i94572# 2008-11-24 11:46:48 +0100 fs r264218 : #i30631# proper context writing mode 2008-11-24 09:38:04 +0100 fs r264204 : #i30631# (approved by PL) 2008-11-24 09:35:47 +0100 fs r264203 : #i30631# Context/WritingMode 2008-11-24 09:33:36 +0100 fs r264202 : #i30631# Context/WritingMode 2008-11-24 09:31:53 +0100 fs r264200 : #i30631# RTL 2008-11-19 08:51:48 +0100 fs r263963 : #i10000# 2008-11-18 20:58:11 +0100 fs r263878 : #i10000# 2008-11-18 15:30:44 +0100 fs r263778 : migrate the CWS from CVS to SVN the CVS changes contained in this change set are the ones between the following two CVS tags: CWS_DEV300_RTLCONTROLS_ANCHOR CWS_DEV300_RTLCONTROLS_PRE_MIGRATION 2008-11-18 12:29:04 +0100 ama r263762 : Fix #i94572#: Context direction for drawing objects 2008-11-18 12:25:50 +0100 ama r263761 : Fix #i94572#: Context direction for drawing objects 2008-11-18 12:02:30 +0100 ama r263759 : Fix #i94572#: Context direction for drawing objects
2008-12-16 13:30:53 +00:00
::setContextWritingMode( pAnchoredObj->DrawObj(), pAnchoredObj->GetAnchorFrmContainingAnchPos() );
pAnchoredObj->UpdateLayoutDir();
}
2002-01-24 15:21:17 +00:00
}
}
}
}
/*--------------------------------------------------
* SwFrm::GetFrmAnchorPos(..)
* returns the position for anchors based on frame direction
* --------------------------------------------------*/
// OD 2004-03-10 #i11860# - consider lower space and line spacing of
// previous frame according to new option 'Use former object positioning'
Point SwFrm::GetFrmAnchorPos( sal_Bool bIgnoreFlysAnchoredAtThisFrame ) const
{
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() )
aAnchor.X() += Frm().Width();
if ( IsTxtFrm() )
{
SwTwips nBaseOfstForFly =
((SwTxtFrm*)this)->GetBaseOfstForFly( bIgnoreFlysAnchoredAtThisFrame );
if ( IsVertical() )
aAnchor.Y() += nBaseOfstForFly;
else
aAnchor.X() += nBaseOfstForFly;
// 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;
}
}
return aAnchor;
}
2000-09-18 23:08:29 +00:00
/*************************************************************************
|*
|* SwFrm::~SwFrm()
|*
|*************************************************************************/
void SwFrm::Destroy()
2011-01-18 11:33:38 +00:00
{
// 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 = getRootFrm();
2011-01-18 11:33:38 +00:00
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( mpDrawObjs )
2011-01-18 11:33:38 +00:00
{
for ( sal_uInt32 i = mpDrawObjs->Count(); i; )
2011-01-18 11:33:38 +00:00
{
SwAnchoredObject* pAnchoredObj = (*mpDrawObjs)[--i];
2011-01-18 11:33:38 +00:00
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 );
}
}
}
delete mpDrawObjs;
mpDrawObjs = 0;
}
}
SwFrm::~SwFrm()
{
if (!IsRootFrm()) // ~SwRootFrm already calls Destroy!
{
Destroy();
2011-01-18 11:33:38 +00:00
}
#if OSL_DEBUG_LEVEL > 0
2011-01-18 11:33:38 +00:00
// JP 15.10.2001: for detection of access to deleted frames
mpDrawObjs = (SwSortedObjs*)0x33333333;
2011-01-18 11:33:38 +00:00
#endif
}
/*************************************************************************/
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 );
ModifyNotification( &aOldFmt, &aNewFmt );
2000-09-18 23:08:29 +00:00
}
}
/*************************************************************************
|* SwCntntFrm::SwCntntFrm()
2000-09-18 23:08:29 +00:00
|*************************************************************************/
SwCntntFrm::SwCntntFrm( SwCntntNode * const pCntnt, SwFrm* pSib ) :
SwFrm( pCntnt, pSib ),
2000-09-18 23:08:29 +00:00
SwFlowFrm( (SwFrm&)*this )
{
}
/*************************************************************************
|* SwCntntFrm::~SwCntntFrm()
|*************************************************************************/
2000-09-18 23:08:29 +00:00
SwCntntFrm::~SwCntntFrm()
{
SwCntntNode* pCNd;
if( 0 != ( pCNd = PTR_CAST( SwCntntNode, GetRegisteredIn() )) &&
2000-09-18 23:08:29 +00:00
!pCNd->GetDoc()->IsInDtor() )
{
2012-02-13 11:37:48 +01:00
//Unregister from root if I'm still in turbo there.
SwRootFrm *pRoot = getRootFrm();
2000-09-18 23:08:29 +00:00
if( pRoot && pRoot->GetTurbo() == this )
{
pRoot->DisallowTurbo();
pRoot->ResetTurbo();
}
if( IsTxtFrm() && ((SwTxtFrm*)this)->HasFtn() )
{
SwTxtNode *pTxtNd = ((SwTxtFrm*)this)->GetTxtNode();
const SwFtnIdxs &rFtnIdxs = pCNd->GetDoc()->GetFtnIdxs();
sal_uInt16 nPos;
sal_uLong nIndex = pCNd->GetIndex();
rFtnIdxs.SeekEntry( *pTxtNd, &nPos );
SwTxtFtn* pTxtFtn;
if( nPos < rFtnIdxs.size() )
{
while( nPos && pTxtNd == &(rFtnIdxs[ nPos ]->GetTxtNode()) )
--nPos;
if( nPos || pTxtNd != &(rFtnIdxs[ nPos ]->GetTxtNode()) )
++nPos;
}
while( nPos < rFtnIdxs.size() )
{
pTxtFtn = rFtnIdxs[ nPos ];
if( pTxtFtn->GetTxtNode().GetIndex() > nIndex )
break;
pTxtFtn->DelFrms( this );
++nPos;
}
}
2000-09-18 23:08:29 +00:00
}
}
void SwCntntFrm::RegisterToNode( SwCntntNode& rNode )
{
rNode.Add( this );
}
void SwCntntFrm::DelFrms( const SwCntntNode& rNode )
{
SwIterator<SwCntntFrm,SwCntntNode> aIter( rNode );
for( SwCntntFrm* pFrm = aIter.First(); pFrm; pFrm = aIter.Next() )
{
// #i27138#
// notify accessibility paragraphs objects about changed
// CONTENT_FLOWS_FROM/_TO relation.
// Relation CONTENT_FLOWS_FROM for current next paragraph will change
// and relation CONTENT_FLOWS_TO for current previous paragraph will change.
if ( pFrm->IsTxtFrm() )
{
ViewShell* pViewShell( pFrm->getRootFrm()->GetCurrShell() );
if ( pViewShell && pViewShell->GetLayout() &&
pViewShell->GetLayout()->IsAnyShellAccessible() )
{
pViewShell->InvalidateAccessibleParaFlowRelation(
dynamic_cast<SwTxtFrm*>(pFrm->FindNextCnt( true )),
dynamic_cast<SwTxtFrm*>(pFrm->FindPrevCnt( true )) );
}
}
if( pFrm->IsFollow() )
{
SwCntntFrm* pMaster = (SwTxtFrm*)pFrm->FindMaster();
pMaster->SetFollow( pFrm->GetFollow() );
}
2012-02-13 11:37:48 +01:00
pFrm->SetFollow( 0 );//So it doesn't get funny ideas.
//Otherwise it could be possible that a follow
//gets destroyed before its master. Following
//the now invalid pointer will then lead to an
//illegal memory access. The chain can be
//crushed here because we'll destroy all of it
//anyway.
if( pFrm->GetUpper() && pFrm->IsInFtn() && !pFrm->GetIndNext() &&
!pFrm->GetIndPrev() )
{
SwFtnFrm *pFtn = pFrm->FindFtnFrm();
Merge commit 'ooo/DEV300_m103' Conflicts: sw/inc/calbck.hxx sw/inc/crsrsh.hxx sw/inc/dcontact.hxx sw/inc/doc.hxx sw/inc/docufld.hxx sw/inc/editsh.hxx sw/inc/expfld.hxx sw/inc/fchrfmt.hxx sw/inc/fmtcol.hxx sw/inc/fmthdft.hxx sw/inc/fmtpdsc.hxx sw/inc/format.hxx sw/inc/frmfmt.hxx sw/inc/ndhints.hxx sw/inc/ndtxt.hxx sw/inc/node.hxx sw/inc/numrule.hxx sw/inc/paratr.hxx sw/inc/swtable.hxx sw/inc/unocrsr.hxx sw/inc/unofield.hxx sw/inc/unoframe.hxx sw/inc/unoport.hxx sw/inc/unostyle.hxx sw/inc/usrfld.hxx sw/inc/viewopt.hxx sw/inc/viewsh.hxx sw/source/core/access/accframebase.cxx sw/source/core/access/accmap.cxx sw/source/core/access/accnotextframe.cxx sw/source/core/access/accpara.cxx sw/source/core/access/accpara.hxx sw/source/core/attr/calbck.cxx sw/source/core/crsr/callnk.cxx sw/source/core/crsr/crsrsh.cxx sw/source/core/doc/acmplwrd.cxx sw/source/core/doc/doc.cxx sw/source/core/doc/docdesc.cxx sw/source/core/doc/docdraw.cxx sw/source/core/doc/docfly.cxx sw/source/core/doc/docfmt.cxx sw/source/core/doc/doclay.cxx sw/source/core/doc/docnew.cxx sw/source/core/doc/docnum.cxx sw/source/core/doc/doctxm.cxx sw/source/core/doc/fmtcol.cxx sw/source/core/doc/htmltbl.cxx sw/source/core/doc/number.cxx sw/source/core/docnode/ndsect.cxx sw/source/core/docnode/ndtbl.cxx sw/source/core/docnode/node.cxx sw/source/core/docnode/node2lay.cxx sw/source/core/docnode/section.cxx sw/source/core/docnode/swbaslnk.cxx sw/source/core/draw/dcontact.cxx sw/source/core/draw/dview.cxx sw/source/core/edit/autofmt.cxx sw/source/core/edit/editsh.cxx sw/source/core/edit/edlingu.cxx sw/source/core/fields/authfld.cxx sw/source/core/fields/dbfld.cxx sw/source/core/fields/docufld.cxx sw/source/core/fields/expfld.cxx sw/source/core/fields/reffld.cxx sw/source/core/fields/tblcalc.cxx sw/source/core/frmedt/fefly1.cxx sw/source/core/frmedt/feshview.cxx sw/source/core/frmedt/tblsel.cxx sw/source/core/inc/flyfrm.hxx sw/source/core/inc/prevwpage.hxx sw/source/core/inc/rolbck.hxx sw/source/core/inc/txtfrm.hxx sw/source/core/layout/atrfrm.cxx sw/source/core/layout/findfrm.cxx sw/source/core/layout/flowfrm.cxx sw/source/core/layout/fly.cxx sw/source/core/layout/flycnt.cxx sw/source/core/layout/flylay.cxx sw/source/core/layout/frmtool.cxx sw/source/core/layout/hffrm.cxx sw/source/core/layout/pagechg.cxx sw/source/core/layout/pagedesc.cxx sw/source/core/layout/paintfrm.cxx sw/source/core/layout/sectfrm.cxx sw/source/core/layout/ssfrm.cxx sw/source/core/layout/tabfrm.cxx sw/source/core/layout/wsfrm.cxx sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx sw/source/core/table/swtable.cxx sw/source/core/text/EnhancedPDFExportHelper.cxx sw/source/core/text/inftxt.cxx sw/source/core/text/porfld.cxx sw/source/core/text/txtdrop.cxx sw/source/core/text/txtfly.cxx sw/source/core/text/txtfrm.cxx sw/source/core/text/txtio.cxx sw/source/core/text/txttab.cxx sw/source/core/tox/tox.cxx sw/source/core/txtnode/atrflyin.cxx sw/source/core/txtnode/fmtatr2.cxx sw/source/core/txtnode/ndtxt.cxx sw/source/core/undo/SwUndoPageDesc.cxx sw/source/core/undo/undraw.cxx sw/source/core/unocore/unochart.cxx sw/source/core/unocore/unocoll.cxx sw/source/core/unocore/unodraw.cxx sw/source/core/unocore/unofield.cxx sw/source/core/unocore/unoframe.cxx sw/source/core/unocore/unoftn.cxx sw/source/core/unocore/unoidx.cxx sw/source/core/unocore/unoobj2.cxx sw/source/core/unocore/unoparagraph.cxx sw/source/core/unocore/unoport.cxx sw/source/core/unocore/unoportenum.cxx sw/source/core/unocore/unoredline.cxx sw/source/core/unocore/unoredlines.cxx sw/source/core/unocore/unorefmk.cxx sw/source/core/unocore/unosect.cxx sw/source/core/unocore/unosett.cxx sw/source/core/unocore/unostyle.cxx sw/source/core/unocore/unotbl.cxx sw/source/core/unocore/unotext.cxx sw/source/core/view/viewimp.cxx sw/source/core/view/viewpg.cxx sw/source/core/view/viewsh.cxx sw/source/core/view/vnew.cxx sw/source/core/view/vprint.cxx sw/source/filter/ww8/rtfexport.cxx sw/source/filter/ww8/rtfexport.hxx sw/source/filter/ww8/wrtw8nds.cxx sw/source/filter/ww8/wrtww8gr.cxx sw/source/filter/xml/XMLRedlineImportHelper.cxx sw/source/ui/app/apphdl.cxx sw/source/ui/app/docsh.cxx sw/source/ui/app/docsh2.cxx sw/source/ui/app/swmodul1.cxx sw/source/ui/config/viewopt.cxx sw/source/ui/fldui/fldpage.cxx sw/source/ui/uiview/srcview.cxx sw/source/ui/uiview/view.cxx sw/source/ui/uno/unotxdoc.cxx sw/source/ui/vba/wordvbahelper.cxx sw/source/ui/wrtsh/wrtsh1.cxx
2011-03-23 17:00:12 +01:00
OSL_ENSURE( pFtn, "You promised a FtnFrm?" );
SwCntntFrm* pCFrm;
if( !pFtn->GetFollow() && !pFtn->GetMaster() &&
0 != ( pCFrm = pFtn->GetRefFromAttr()) && pCFrm->IsFollow() )
{
Merge commit 'ooo/DEV300_m103' Conflicts: sw/inc/calbck.hxx sw/inc/crsrsh.hxx sw/inc/dcontact.hxx sw/inc/doc.hxx sw/inc/docufld.hxx sw/inc/editsh.hxx sw/inc/expfld.hxx sw/inc/fchrfmt.hxx sw/inc/fmtcol.hxx sw/inc/fmthdft.hxx sw/inc/fmtpdsc.hxx sw/inc/format.hxx sw/inc/frmfmt.hxx sw/inc/ndhints.hxx sw/inc/ndtxt.hxx sw/inc/node.hxx sw/inc/numrule.hxx sw/inc/paratr.hxx sw/inc/swtable.hxx sw/inc/unocrsr.hxx sw/inc/unofield.hxx sw/inc/unoframe.hxx sw/inc/unoport.hxx sw/inc/unostyle.hxx sw/inc/usrfld.hxx sw/inc/viewopt.hxx sw/inc/viewsh.hxx sw/source/core/access/accframebase.cxx sw/source/core/access/accmap.cxx sw/source/core/access/accnotextframe.cxx sw/source/core/access/accpara.cxx sw/source/core/access/accpara.hxx sw/source/core/attr/calbck.cxx sw/source/core/crsr/callnk.cxx sw/source/core/crsr/crsrsh.cxx sw/source/core/doc/acmplwrd.cxx sw/source/core/doc/doc.cxx sw/source/core/doc/docdesc.cxx sw/source/core/doc/docdraw.cxx sw/source/core/doc/docfly.cxx sw/source/core/doc/docfmt.cxx sw/source/core/doc/doclay.cxx sw/source/core/doc/docnew.cxx sw/source/core/doc/docnum.cxx sw/source/core/doc/doctxm.cxx sw/source/core/doc/fmtcol.cxx sw/source/core/doc/htmltbl.cxx sw/source/core/doc/number.cxx sw/source/core/docnode/ndsect.cxx sw/source/core/docnode/ndtbl.cxx sw/source/core/docnode/node.cxx sw/source/core/docnode/node2lay.cxx sw/source/core/docnode/section.cxx sw/source/core/docnode/swbaslnk.cxx sw/source/core/draw/dcontact.cxx sw/source/core/draw/dview.cxx sw/source/core/edit/autofmt.cxx sw/source/core/edit/editsh.cxx sw/source/core/edit/edlingu.cxx sw/source/core/fields/authfld.cxx sw/source/core/fields/dbfld.cxx sw/source/core/fields/docufld.cxx sw/source/core/fields/expfld.cxx sw/source/core/fields/reffld.cxx sw/source/core/fields/tblcalc.cxx sw/source/core/frmedt/fefly1.cxx sw/source/core/frmedt/feshview.cxx sw/source/core/frmedt/tblsel.cxx sw/source/core/inc/flyfrm.hxx sw/source/core/inc/prevwpage.hxx sw/source/core/inc/rolbck.hxx sw/source/core/inc/txtfrm.hxx sw/source/core/layout/atrfrm.cxx sw/source/core/layout/findfrm.cxx sw/source/core/layout/flowfrm.cxx sw/source/core/layout/fly.cxx sw/source/core/layout/flycnt.cxx sw/source/core/layout/flylay.cxx sw/source/core/layout/frmtool.cxx sw/source/core/layout/hffrm.cxx sw/source/core/layout/pagechg.cxx sw/source/core/layout/pagedesc.cxx sw/source/core/layout/paintfrm.cxx sw/source/core/layout/sectfrm.cxx sw/source/core/layout/ssfrm.cxx sw/source/core/layout/tabfrm.cxx sw/source/core/layout/wsfrm.cxx sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx sw/source/core/table/swtable.cxx sw/source/core/text/EnhancedPDFExportHelper.cxx sw/source/core/text/inftxt.cxx sw/source/core/text/porfld.cxx sw/source/core/text/txtdrop.cxx sw/source/core/text/txtfly.cxx sw/source/core/text/txtfrm.cxx sw/source/core/text/txtio.cxx sw/source/core/text/txttab.cxx sw/source/core/tox/tox.cxx sw/source/core/txtnode/atrflyin.cxx sw/source/core/txtnode/fmtatr2.cxx sw/source/core/txtnode/ndtxt.cxx sw/source/core/undo/SwUndoPageDesc.cxx sw/source/core/undo/undraw.cxx sw/source/core/unocore/unochart.cxx sw/source/core/unocore/unocoll.cxx sw/source/core/unocore/unodraw.cxx sw/source/core/unocore/unofield.cxx sw/source/core/unocore/unoframe.cxx sw/source/core/unocore/unoftn.cxx sw/source/core/unocore/unoidx.cxx sw/source/core/unocore/unoobj2.cxx sw/source/core/unocore/unoparagraph.cxx sw/source/core/unocore/unoport.cxx sw/source/core/unocore/unoportenum.cxx sw/source/core/unocore/unoredline.cxx sw/source/core/unocore/unoredlines.cxx sw/source/core/unocore/unorefmk.cxx sw/source/core/unocore/unosect.cxx sw/source/core/unocore/unosett.cxx sw/source/core/unocore/unostyle.cxx sw/source/core/unocore/unotbl.cxx sw/source/core/unocore/unotext.cxx sw/source/core/view/viewimp.cxx sw/source/core/view/viewpg.cxx sw/source/core/view/viewsh.cxx sw/source/core/view/vnew.cxx sw/source/core/view/vprint.cxx sw/source/filter/ww8/rtfexport.cxx sw/source/filter/ww8/rtfexport.hxx sw/source/filter/ww8/wrtw8nds.cxx sw/source/filter/ww8/wrtww8gr.cxx sw/source/filter/xml/XMLRedlineImportHelper.cxx sw/source/ui/app/apphdl.cxx sw/source/ui/app/docsh.cxx sw/source/ui/app/docsh2.cxx sw/source/ui/app/swmodul1.cxx sw/source/ui/config/viewopt.cxx sw/source/ui/fldui/fldpage.cxx sw/source/ui/uiview/srcview.cxx sw/source/ui/uiview/view.cxx sw/source/ui/uno/unotxdoc.cxx sw/source/ui/vba/wordvbahelper.cxx sw/source/ui/wrtsh/wrtsh1.cxx
2011-03-23 17:00:12 +01:00
OSL_ENSURE( pCFrm->IsTxtFrm(), "NoTxtFrm has Footnote?" );
((SwTxtFrm*)pCFrm->FindMaster())->Prepare( PREP_FTN_GONE );
}
}
pFrm->Cut();
delete pFrm;
}
}
2000-09-18 23:08:29 +00:00
/*************************************************************************
|*
|* SwLayoutFrm::~SwLayoutFrm
|*
|*************************************************************************/
void SwLayoutFrm::Destroy()
2000-09-18 23:08:29 +00:00
{
SwFrm *pFrm = pLower;
if( GetFmt() && !GetFmt()->GetDoc()->IsInDtor() )
{
while ( pFrm )
{
2012-02-13 11:37:48 +01:00
//First delete the Objs of the Frm because they can't unregister
//from the page after remove.
//We don't want to create an endless loop only because one couldn't
//unregister.
sal_uInt32 nCnt;
2000-09-18 23:08:29 +00:00
while ( pFrm->GetDrawObjs() && pFrm->GetDrawObjs()->Count() )
{
nCnt = pFrm->GetDrawObjs()->Count();
// #i28701#
SwAnchoredObject* pAnchoredObj = (*pFrm->GetDrawObjs())[0];
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 );
}
}
2000-09-18 23:08:29 +00:00
if ( pFrm->GetDrawObjs() &&
nCnt == pFrm->GetDrawObjs()->Count() )
{
pFrm->GetDrawObjs()->Remove( *pAnchoredObj );
}
2000-09-18 23:08:29 +00:00
}
pFrm->Remove();
delete pFrm;
pFrm = pLower;
}
2012-02-13 11:37:48 +01:00
//Delete the Flys, the last one also deletes the array.
sal_uInt32 nCnt;
2000-09-18 23:08:29 +00:00
while ( GetDrawObjs() && GetDrawObjs()->Count() )
{
nCnt = GetDrawObjs()->Count();
// #i28701#
SwAnchoredObject* pAnchoredObj = (*GetDrawObjs())[0];
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 );
}
}
2000-09-18 23:08:29 +00:00
if ( GetDrawObjs() && nCnt == GetDrawObjs()->Count() )
{
GetDrawObjs()->Remove( *pAnchoredObj );
}
2000-09-18 23:08:29 +00:00
}
}
else
{
while( pFrm )
{
SwFrm *pNxt = pFrm->GetNext();
delete pFrm;
pFrm = pNxt;
}
}
}
SwLayoutFrm::~SwLayoutFrm()
{
if (!IsRootFrm()) // ~SwRootFrm already calls Destroy!
{
Destroy();
}
}
2000-09-18 23:08:29 +00:00
/*************************************************************************
|*
|* 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
{
// NEW TABLES
// Cell frames may not leave their upper:
SwRect aRect = IsRowFrm() ? GetUpper()->Frm() : Frm();
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;
bool bLeft = true;
bool bRight = true;
long nRowSpan = 0;
2000-09-18 23:08:29 +00:00
while( pTmp )
{
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)();
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)();
}
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;
bLeft = false;
bRight = false;
2000-09-18 23:08:29 +00:00
}
else if( pTmp->IsColumnFrm() ) // nobody enters neightbour columns
{
sal_Bool bR2L = pTmp->IsRightToLeft();
// 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;
bLeft = false;
}
// the last column has _no_ influence to the right range
if( bR2L ? pTmp->GetPrev() : pTmp->GetNext() )
{
if( bRight || nTmpRight < nRight )
nRight = nTmpRight;
bRight = false;
}
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;
bLeft = 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;
bRight = 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.
|*
|*************************************************************************/
const SwRect SwFrm::UnionFrm( sal_Bool bBorder ) const
2000-09-18 23:08:29 +00: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;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */