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

3566 lines
129 KiB
C++
Raw Normal View History

/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2000-09-18 23:08:29 +00:00
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2000-09-18 23:08:29 +00:00
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
2000-09-18 23:08:29 +00:00
*
* OpenOffice.org - a multi-platform office productivity suite
2000-09-18 23:08:29 +00:00
*
* This file is part of OpenOffice.org.
2000-09-18 23:08:29 +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
*
* 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
*
* 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
*
************************************************************************/
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
2000-09-18 23:08:29 +00:00
#include <hintids.hxx>
#include <tools/bigint.hxx>
#include <svx/svdmodel.hxx>
#include <svx/svdpage.hxx>
#include <editeng/brshitem.hxx>
#include <editeng/keepitem.hxx>
#include <editeng/shaditem.hxx>
#include <editeng/ulspitem.hxx>
#include <editeng/lrspitem.hxx>
#include <editeng/boxitem.hxx>
2000-09-18 23:08:29 +00:00
#include <sfx2/printer.hxx>
#include <editeng/lspcitem.hxx>
2000-09-18 23:08:29 +00:00
#include <fmtornt.hxx>
#include <fmtanchr.hxx>
#include <fmthdft.hxx>
#include <fmtcntnt.hxx>
#include <fmtfsize.hxx>
#include <fmtsrnd.hxx>
2000-09-18 23:08:29 +00:00
#include <docary.hxx>
#include <lineinfo.hxx>
#include <swmodule.hxx>
#include "pagefrm.hxx"
#include "colfrm.hxx"
#include "doc.hxx"
#include "fesh.hxx"
#include "viewimp.hxx"
#include "viewopt.hxx"
2000-09-18 23:08:29 +00:00
#include "pam.hxx"
#include "dflyobj.hxx"
#include "dcontact.hxx"
#include "frmtool.hxx"
#include "docsh.hxx"
#include "tabfrm.hxx"
#include "rowfrm.hxx"
#include "ftnfrm.hxx"
#include "txtfrm.hxx"
#include "notxtfrm.hxx"
#include "flyfrms.hxx"
#include "layact.hxx"
#include "pagedesc.hxx"
#include "section.hxx"
#include "sectfrm.hxx"
#include "node2lay.hxx"
#include "ndole.hxx"
#include "ndtxt.hxx"
#include "swtable.hxx"
#include "hints.hxx"
#include <layhelp.hxx>
#include <laycache.hxx>
#include <rootfrm.hxx>
2000-09-18 23:08:29 +00:00
#include "mdiexp.hxx"
#include "statstr.hrc"
#include <paratr.hxx>
#include <sortedobjs.hxx>
#include <objectformatter.hxx>
#include <switerator.hxx>
2000-09-18 23:08:29 +00:00
// ftnfrm.cxx:
void lcl_RemoveFtns( SwFtnBossFrm* pBoss, sal_Bool bPageOnly, sal_Bool bEndNotes );
2000-09-18 23:08:29 +00:00
using namespace ::com::sun::star;
sal_Bool bObjsDirect = sal_True;
sal_Bool bDontCreateObjects = sal_False;
sal_Bool bSetCompletePaintOnInvalidate = sal_False;
2000-09-18 23:08:29 +00:00
sal_uInt8 StackHack::nCnt = 0;
sal_Bool StackHack::bLocked = sal_False;
2000-09-18 23:08:29 +00:00
/*************************************************************************/
2000-09-18 23:08:29 +00:00
SwFrmNotify::SwFrmNotify( SwFrm *pF ) :
pFrm( pF ),
aFrm( pF->Frm() ),
aPrt( pF->Prt() ),
bInvaKeep( sal_False ),
bValidSize( pF->GetValidSizeFlag() ),
mbFrmDeleted( false ) // #i49383#
2000-09-18 23:08:29 +00:00
{
if ( pF->IsTxtFrm() )
{
mnFlyAnchorOfst = ((SwTxtFrm*)pF)->GetBaseOfstForFly( sal_True );
mnFlyAnchorOfstNoWrap = ((SwTxtFrm*)pF)->GetBaseOfstForFly( sal_False );
}
else
{
mnFlyAnchorOfst = 0;
mnFlyAnchorOfstNoWrap = 0;
}
2000-09-18 23:08:29 +00:00
bHadFollow = pF->IsCntntFrm() ?
(((SwCntntFrm*)pF)->GetFollow() ? sal_True : sal_False) :
sal_False;
2000-09-18 23:08:29 +00:00
}
/*************************************************************************/
2000-09-18 23:08:29 +00:00
SwFrmNotify::~SwFrmNotify()
{
// #i49383#
if ( mbFrmDeleted )
{
return;
}
SWRECTFN( pFrm )
const sal_Bool bAbsP = POS_DIFF( aFrm, pFrm->Frm() );
const sal_Bool bChgWidth =
(aFrm.*fnRect->fnGetWidth)() != (pFrm->Frm().*fnRect->fnGetWidth)();
const sal_Bool bChgHeight =
(aFrm.*fnRect->fnGetHeight)()!=(pFrm->Frm().*fnRect->fnGetHeight)();
const sal_Bool bChgFlyBasePos = pFrm->IsTxtFrm() &&
( ( mnFlyAnchorOfst != ((SwTxtFrm*)pFrm)->GetBaseOfstForFly( sal_True ) ) ||
( mnFlyAnchorOfstNoWrap != ((SwTxtFrm*)pFrm)->GetBaseOfstForFly( sal_False ) ) );
2000-09-18 23:08:29 +00:00
if ( pFrm->IsFlowFrm() && !pFrm->IsInFtn() )
{
SwFlowFrm *pFlow = SwFlowFrm::CastFlowFrm( pFrm );
if ( !pFlow->IsFollow() )
{
if ( !pFrm->GetIndPrev() )
{
if ( bInvaKeep )
{
SwFrm *pPre = pFrm->FindPrev();
if ( pPre && pPre->IsFlowFrm() )
{
// 1. pPre wants to keep with me:
bool bInvalidPrePos = SwFlowFrm::CastFlowFrm( pPre )->IsKeep( *pPre->GetAttrSet() ) && pPre->GetIndPrev();
// 2. pPre is a table and the last row wants to keep with me:
if ( !bInvalidPrePos && pPre->IsTabFrm() )
{
SwTabFrm* pPreTab = static_cast<SwTabFrm*>(pPre);
if ( pPreTab->GetFmt()->GetDoc()->get(IDocumentSettingAccess::TABLE_ROW_KEEP) )
{
SwRowFrm* pLastRow = static_cast<SwRowFrm*>(pPreTab->GetLastLower());
if ( pLastRow && pLastRow->ShouldRowKeepWithNext() )
bInvalidPrePos = true;
}
}
if ( bInvalidPrePos )
pPre->InvalidatePos();
}
2000-09-18 23:08:29 +00:00
}
}
else if ( !pFlow->HasFollow() )
{
long nOldHeight = (aFrm.*fnRect->fnGetHeight)();
long nNewHeight = (pFrm->Frm().*fnRect->fnGetHeight)();
if( (nOldHeight > nNewHeight) || (!nOldHeight && nNewHeight) )
pFlow->CheckKeep();
}
2000-09-18 23:08:29 +00:00
}
}
if ( bAbsP )
{
pFrm->SetCompletePaint();
SwFrm* pNxt = pFrm->GetIndNext();
// #121888# - skip empty section frames
while ( pNxt &&
pNxt->IsSctFrm() && !static_cast<SwSectionFrm*>(pNxt)->GetSection() )
{
pNxt = pNxt->GetIndNext();
}
2000-09-18 23:08:29 +00:00
if ( pNxt )
pNxt->InvalidatePos();
else
{
// #104100# - correct condition for setting retouche
// flag for vertical layout.
if( pFrm->IsRetoucheFrm() &&
(aFrm.*fnRect->fnTopDist)( (pFrm->Frm().*fnRect->fnGetTop)() ) > 0 )
{
2000-09-18 23:08:29 +00:00
pFrm->SetRetouche();
}
2000-09-18 23:08:29 +00:00
// A fresh follow frame does not have to be invalidated, because
// it is already formatted:
if ( bHadFollow || !pFrm->IsCntntFrm() || !((SwCntntFrm*)pFrm)->GetFollow() )
{
if ( !pFrm->IsTabFrm() || !((SwTabFrm*)pFrm)->GetFollow() )
pFrm->InvalidateNextPos();
}
2000-09-18 23:08:29 +00:00
}
}
//Fuer Hintergrundgrafiken muss bei Groessenaenderungen ein Repaint her.
const sal_Bool bPrtWidth =
(aPrt.*fnRect->fnGetWidth)() != (pFrm->Prt().*fnRect->fnGetWidth)();
const sal_Bool bPrtHeight =
(aPrt.*fnRect->fnGetHeight)()!=(pFrm->Prt().*fnRect->fnGetHeight)();
if ( bPrtWidth || bPrtHeight )
2000-09-18 23:08:29 +00:00
{
const SvxGraphicPosition ePos = pFrm->GetAttrSet()->GetBackground().GetGraphicPos();
if ( GPOS_NONE != ePos && GPOS_TILED != ePos )
pFrm->SetCompletePaint();
}
else
{
// #97597# - consider case that *only* margins between
// frame and printing area has changed. Then, frame has to be repainted,
// in order to force paint of the margin areas.
if ( !bAbsP && (bChgWidth || bChgHeight) )
{
pFrm->SetCompletePaint();
}
}
2000-09-18 23:08:29 +00:00
const sal_Bool bPrtP = POS_DIFF( aPrt, pFrm->Prt() );
2002-02-14 09:54:11 +00:00
if ( bAbsP || bPrtP || bChgWidth || bChgHeight ||
bPrtWidth || bPrtHeight || bChgFlyBasePos )
2002-02-14 09:54:11 +00:00
{
2002-02-27 08:43:11 +00:00
if( pFrm->IsAccessibleFrm() )
{
SwRootFrm *pRootFrm = pFrm->getRootFrm();
if( pRootFrm && pRootFrm->IsAnyShellAccessible() &&
pRootFrm->GetCurrShell() )
{
pRootFrm->GetCurrShell()->Imp()->MoveAccessibleFrm( pFrm, aFrm );
}
}
2002-02-14 09:54:11 +00:00
// Notification of anchored objects
if ( pFrm->GetDrawObjs() )
2000-09-18 23:08:29 +00:00
{
const SwSortedObjs &rObjs = *pFrm->GetDrawObjs();
SwPageFrm* pPageFrm = 0;
for ( sal_uInt32 i = 0; i < rObjs.Count(); ++i )
2000-09-18 23:08:29 +00:00
{
// OD 2004-03-31 #i26791# - no general distinction between
// Writer fly frames and drawing objects
bool bNotify = false;
bool bNotifySize = false;
SwAnchoredObject* pObj = rObjs[i];
SwContact* pContact = ::GetUserCall( pObj->GetDrawObj() );
2011-04-18 12:37:38 -03:00
// #115759#
const bool bAnchoredAsChar = pContact->ObjAnchoredAsChar();
if ( !bAnchoredAsChar )
2000-09-18 23:08:29 +00:00
{
// Notify object, which aren't anchored as-character:
// always notify objects, if frame position has changed
// or if the object is to-page|to-fly anchored.
if ( bAbsP ||
pContact->ObjAnchoredAtPage() ||
pContact->ObjAnchoredAtFly() )
2000-09-18 23:08:29 +00:00
{
bNotify = true;
// assure that to-fly anchored Writer fly frames are
// registered at the correct page frame, if frame
// position has changed.
if ( bAbsP && pContact->ObjAnchoredAtFly() &&
pObj->ISA(SwFlyFrm) )
2000-09-18 23:08:29 +00:00
{
// determine to-fly anchored Writer fly frame
SwFlyFrm* pFlyFrm = static_cast<SwFlyFrm*>(pObj);
// determine page frame of to-fly anchored
// Writer fly frame
SwPageFrm* pFlyPageFrm = pFlyFrm->FindPageFrm();
// determine page frame, if needed.
if ( !pPageFrm )
2000-09-18 23:08:29 +00:00
{
pPageFrm = pFrm->FindPageFrm();
2000-09-18 23:08:29 +00:00
}
if ( pPageFrm != pFlyPageFrm )
2000-09-18 23:08:29 +00:00
{
OSL_ENSURE( pFlyPageFrm, "~SwFrmNotify: Fly from Nowhere" );
if( pFlyPageFrm )
pFlyPageFrm->MoveFly( pFlyFrm, pPageFrm );
else
pPageFrm->AppendFlyToPage( pFlyFrm );
2000-09-18 23:08:29 +00:00
}
}
}
// otherwise the objects are notified in dependence to
// its positioning and alignment
else
{
const SwFmtVertOrient& rVert =
pContact->GetFmt()->GetVertOrient();
if ( ( rVert.GetVertOrient() == text::VertOrientation::CENTER ||
rVert.GetVertOrient() == text::VertOrientation::BOTTOM ||
rVert.GetRelationOrient() == text::RelOrientation::PRINT_AREA ) &&
( bChgHeight || bPrtHeight ) )
{
bNotify = true;
}
if ( !bNotify )
{
const SwFmtHoriOrient& rHori =
pContact->GetFmt()->GetHoriOrient();
if ( ( rHori.GetHoriOrient() != text::HoriOrientation::NONE ||
rHori.GetRelationOrient()== text::RelOrientation::PRINT_AREA ||
rHori.GetRelationOrient()== text::RelOrientation::FRAME ) &&
( bChgWidth || bPrtWidth || bChgFlyBasePos ) )
2000-09-18 23:08:29 +00:00
{
bNotify = true;
2000-09-18 23:08:29 +00:00
}
}
}
}
else if ( bPrtWidth )
{
// Notify as-character anchored objects, if printing area
// width has changed.
bNotify = true;
bNotifySize = true;
}
// perform notification via the corresponding invalidations
if ( bNotify )
{
if ( pObj->ISA(SwFlyFrm) )
2000-09-18 23:08:29 +00:00
{
SwFlyFrm* pFlyFrm = static_cast<SwFlyFrm*>(pObj);
if ( bNotifySize )
pFlyFrm->_InvalidateSize();
2011-04-18 12:37:38 -03:00
// #115759# - no invalidation of
// position for as-character anchored objects.
if ( !bAnchoredAsChar )
{
pFlyFrm->_InvalidatePos();
}
pFlyFrm->_Invalidate();
2000-09-18 23:08:29 +00:00
}
else if ( pObj->ISA(SwAnchoredDrawObject) )
2000-09-18 23:08:29 +00:00
{
2011-04-18 12:37:38 -03:00
// #115759# - no invalidation of
// position for as-character anchored objects.
if ( !bAnchoredAsChar )
{
pObj->InvalidateObjPos();
}
2000-09-18 23:08:29 +00:00
}
else
2000-09-18 23:08:29 +00:00
{
OSL_FAIL( "<SwCntntNotify::~SwCntntNotify()> - unknown anchored object type. Please inform OD." );
2000-09-18 23:08:29 +00:00
}
}
}
}
}
2002-03-08 12:23:38 +00:00
else if( pFrm->IsTxtFrm() && bValidSize != pFrm->GetValidSizeFlag() )
{
SwRootFrm *pRootFrm = pFrm->getRootFrm();
if( pRootFrm && pRootFrm->IsAnyShellAccessible() &&
pRootFrm->GetCurrShell() )
{
pRootFrm->GetCurrShell()->Imp()->InvalidateAccessibleFrmContent( pFrm );
}
2002-03-08 12:23:38 +00:00
}
// #i9046# Automatic frame width
SwFlyFrm* pFly = 0;
// #i35879# Do not trust the inf flags. pFrm does not
// necessarily have to have an upper!
if ( !pFrm->IsFlyFrm() && 0 != ( pFly = pFrm->ImplFindFlyFrm() ) )
{
// #i61999#
// no invalidation of columned Writer fly frames, because automatic
// width doesn't make sense for such Writer fly frames.
if ( pFly->Lower() && !pFly->Lower()->IsColumnFrm() )
{
const SwFmtFrmSize &rFrmSz = pFly->GetFmt()->GetFrmSize();
// This could be optimized. Basically the fly frame only has to
// be invalidated, if the first line of pFrm (if pFrm is a content
// frame, for other frame types its the print area) has changed its
// size and pFrm was responsible for the current width of pFly. On
// the other hand, this is only rarely used and re-calculation of
// the fly frame does not cause too much trouble. So we keep it this
// way:
if ( ATT_FIX_SIZE != rFrmSz.GetWidthSizeType() )
{
// #i50668#, #i50998# - invalidation of position
// of as-character anchored fly frames not needed and can cause
// layout loops
if ( !pFly->ISA(SwFlyInCntFrm) )
{
pFly->InvalidatePos();
}
pFly->InvalidateSize();
}
}
}
2000-09-18 23:08:29 +00:00
}
/*************************************************************************/
2000-09-18 23:08:29 +00:00
SwLayNotify::SwLayNotify( SwLayoutFrm *pLayFrm ) :
SwFrmNotify( pLayFrm ),
bLowersComplete( sal_False )
2000-09-18 23:08:29 +00:00
{
}
/*************************************************************************/
2000-09-18 23:08:29 +00:00
// OD 2004-05-11 #i28701# - local method to invalidate the position of all
// frames inclusive its floating screen objects, which are lowers of the given
// layout frame
void lcl_InvalidatePosOfLowers( SwLayoutFrm& _rLayoutFrm )
2000-09-18 23:08:29 +00:00
{
if( _rLayoutFrm.IsFlyFrm() && _rLayoutFrm.GetDrawObjs() )
{
_rLayoutFrm.InvalidateObjs( true, false );
}
SwFrm* pLowerFrm = _rLayoutFrm.Lower();
while ( pLowerFrm )
2000-09-18 23:08:29 +00:00
{
pLowerFrm->InvalidatePos();
if ( pLowerFrm->IsTxtFrm() )
2000-09-18 23:08:29 +00:00
{
static_cast<SwTxtFrm*>(pLowerFrm)->Prepare( PREP_POS_CHGD );
2000-09-18 23:08:29 +00:00
}
else if ( pLowerFrm->IsTabFrm() )
2000-09-18 23:08:29 +00:00
{
pLowerFrm->InvalidatePrt();
2000-09-18 23:08:29 +00:00
}
pLowerFrm->InvalidateObjs( true, false );
2000-09-18 23:08:29 +00:00
pLowerFrm = pLowerFrm->GetNext();
};
2000-09-18 23:08:29 +00:00
}
SwLayNotify::~SwLayNotify()
{
// #i49383#
if ( mbFrmDeleted )
{
return;
}
2000-09-18 23:08:29 +00:00
SwLayoutFrm *pLay = GetLay();
SWRECTFN( pLay )
sal_Bool bNotify = sal_False;
2000-09-18 23:08:29 +00:00
if ( pLay->Prt().SSize() != aPrt.SSize() )
{
if ( !IsLowersComplete() )
{
sal_Bool bInvaPercent;
2000-09-18 23:08:29 +00:00
if ( pLay->IsRowFrm() )
{
bInvaPercent = sal_True;
long nNew = (pLay->Prt().*fnRect->fnGetHeight)();
if( nNew != (aPrt.*fnRect->fnGetHeight)() )
((SwRowFrm*)pLay)->AdjustCells( nNew, sal_True);
if( (pLay->Prt().*fnRect->fnGetWidth)()
!= (aPrt.*fnRect->fnGetWidth)() )
((SwRowFrm*)pLay)->AdjustCells( 0, sal_False );
2000-09-18 23:08:29 +00:00
}
else
{
//Proportionale Anpassung der innenliegenden.
//1. Wenn der Formatierte kein Fly ist
//2. Wenn er keine Spalten enthaelt
//3. Wenn der Fly eine feste Hoehe hat und die Spalten in der
// Hoehe danebenliegen.
//4. niemals bei SectionFrms.
sal_Bool bLow;
2000-09-18 23:08:29 +00:00
if( pLay->IsFlyFrm() )
{
if ( pLay->Lower() )
{
bLow = !pLay->Lower()->IsColumnFrm() ||
(pLay->Lower()->Frm().*fnRect->fnGetHeight)()
!= (pLay->Prt().*fnRect->fnGetHeight)();
2000-09-18 23:08:29 +00:00
}
else
bLow = sal_False;
2000-09-18 23:08:29 +00:00
}
else if( pLay->IsSctFrm() )
{
if ( pLay->Lower() )
{
if( pLay->Lower()->IsColumnFrm() && pLay->Lower()->GetNext() )
bLow = pLay->Lower()->Frm().Height() != pLay->Prt().Height();
else
bLow = pLay->Prt().Width() != aPrt.Width();
}
else
bLow = sal_False;
2000-09-18 23:08:29 +00:00
}
else if( pLay->IsFooterFrm() && !pLay->HasFixSize() )
bLow = pLay->Prt().Width() != aPrt.Width();
2000-09-18 23:08:29 +00:00
else
bLow = sal_True;
2000-09-18 23:08:29 +00:00
bInvaPercent = bLow;
if ( bLow )
{
pLay->ChgLowersProp( aPrt.SSize() );
2000-09-18 23:08:29 +00:00
}
//Wenn die PrtArea gewachsen ist, so ist es moeglich, dass die
//Kette der Untergeordneten einen weiteren Frm aufnehmen kann,
//mithin muss also der 'moeglicherweise passende' Invalidiert werden.
//Das invalidieren lohnt nur, wenn es sich beim mir bzw. meinen
//Uppers um eine Moveable-Section handelt.
//Die PrtArea ist gewachsen, wenn die Breite oder die Hoehe groesser
//geworden ist.
if ( (pLay->Prt().Height() > aPrt.Height() ||
pLay->Prt().Width() > aPrt.Width()) &&
(pLay->IsMoveable() || pLay->IsFlyFrm()) )
{
SwFrm *pTmpFrm = pLay->Lower();
if ( pTmpFrm && pTmpFrm->IsFlowFrm() )
2000-09-18 23:08:29 +00:00
{
while ( pTmpFrm->GetNext() )
pTmpFrm = pTmpFrm->GetNext();
pTmpFrm->InvalidateNextPos();
2000-09-18 23:08:29 +00:00
}
}
}
bNotify = sal_True;
2000-09-18 23:08:29 +00:00
//TEUER!! aber wie macht man es geschickter?
if( bInvaPercent )
pLay->InvaPercentLowers( pLay->Prt().Height() - aPrt.Height() );
2000-09-18 23:08:29 +00:00
}
if ( pLay->IsTabFrm() )
//Damit _nur_ der Shatten bei Groessenaenderungen gemalt wird.
((SwTabFrm*)pLay)->SetComplete();
else
{
const ViewShell *pSh = pLay->getRootFrm()->GetCurrShell();
if( !( pSh && pSh->GetViewOptions()->getBrowseMode() ) ||
2000-09-18 23:08:29 +00:00
!(pLay->GetType() & (FRM_BODY | FRM_PAGE)) )
//Damit die untergeordneten sauber retouchiert werden.
//Problembsp: Flys an den Henkeln packen und verkleinern.
//Nicht fuer Body und Page, sonst flackerts beim HTML-Laden.
pLay->SetCompletePaint();
}
2000-09-18 23:08:29 +00:00
}
//Lower benachrichtigen wenn sich die Position veraendert hat.
const sal_Bool bPrtPos = POS_DIFF( aPrt, pLay->Prt() );
const sal_Bool bPos = bPrtPos || POS_DIFF( aFrm, pLay->Frm() );
const sal_Bool bSize = pLay->Frm().SSize() != aFrm.SSize();
2000-09-18 23:08:29 +00:00
if ( bPos && pLay->Lower() && !IsLowersComplete() )
pLay->Lower()->InvalidatePos();
if ( bPrtPos )
pLay->SetCompletePaint();
//Nachfolger benachrichtigen wenn sich die SSize geaendert hat.
2001-04-19 12:15:09 +00:00
if ( bSize )
2000-09-18 23:08:29 +00:00
{
if( pLay->GetNext() )
{
if ( pLay->GetNext()->IsLayoutFrm() )
pLay->GetNext()->_InvalidatePos();
else
pLay->GetNext()->InvalidatePos();
}
else if( pLay->IsSctFrm() )
pLay->InvalidateNextPos();
2000-09-18 23:08:29 +00:00
}
if ( !IsLowersComplete() &&
CWS-TOOLING: integrate CWS sw31bf02 2009-01-26 08:39:59 +0100 fme r266900 : #i93190# placeholder field should be checked in IsEqualsFlags as well 2009-01-21 17:32:32 +0100 ama r266695 : CWS-TOOLING: rebase CWS sw31bf02 to trunk@266428 (milestone: DEV300:m39) 2009-01-19 09:26:02 +0100 ama r266475 : Fix #i96109#: Bracket mismatch 2009-01-19 09:08:47 +0100 ama r266473 : Fix #i96391#: Wrong default parameter 2009-01-19 09:07:13 +0100 ama r266472 : Fix #i96112#: Bracket mismatch 2009-01-19 08:51:42 +0100 ama r266471 : Fix #i96113#: Bracket mismatch 2009-01-16 15:07:01 +0100 ama r266421 : Fix #i93105#: export 0x14 2009-01-16 09:07:02 +0100 ama r266400 : Fix #i96111#: Wrong condition 2009-01-16 08:49:47 +0100 ama r266399 : Fix #i99110#: Wrong condition 2009-01-12 15:54:46 +0100 ama r266164 : Fix #i17949#: Ctrl+A if document starts with a section 2009-01-09 15:39:44 +0100 ama r266091 : Fix #i93144#: Crash during update of TOC 2009-01-09 14:40:20 +0100 ama r266086 : Fix #i90072#: Shorten undo strings 2008-12-10 16:34:57 +0100 fme r265203 : #i73332# Crash with section endnotes 2008-12-10 15:04:29 +0100 fme r265194 : #i93190# Omit painting of placeholder fields during pdf export 2008-12-09 16:46:54 +0100 fme r265115 : #i96167# haggi - reset view options before disposing view 2008-12-09 16:17:13 +0100 fme r265114 : #i96167# Added missing word coun invalidation on splitting node in second half 2008-12-09 15:49:19 +0100 fme r265108 : #i91740# Write actual text only for hyphen portions 2008-12-09 14:52:13 +0100 fme r265090 : #91483# Disable some Insert menu entries in case cursor is located in hidden text
2009-02-13 11:19:56 +00:00
!(pLay->GetType()&(FRM_FLY|FRM_SECTION) &&
2000-09-18 23:08:29 +00:00
pLay->Lower() && pLay->Lower()->IsColumnFrm()) &&
(bPos || bNotify) && !(pLay->GetType() & 0x1823) ) //Tab, Row, FtnCont, Root, Page
{
// #i44016# - force unlock of position of lower objects.
// #i43913# - no unlock of position of objects,
// if <pLay> is a cell frame, and its table frame resp. its parent table
// frame is locked.
// #i47458# - force unlock of position of lower objects,
// only if position of layout frame has changed.
bool bUnlockPosOfObjs( bPos );
if ( bUnlockPosOfObjs && pLay->IsCellFrm() )
{
SwTabFrm* pTabFrm( pLay->FindTabFrm() );
if ( pTabFrm &&
( pTabFrm->IsJoinLocked() ||
( pTabFrm->IsFollow() &&
pTabFrm->FindMaster()->IsJoinLocked() ) ) )
{
bUnlockPosOfObjs = false;
}
}
// #i49383# - check for footnote frame, if unlock
// of position of lower objects is allowed.
else if ( bUnlockPosOfObjs && pLay->IsFtnFrm() )
{
bUnlockPosOfObjs = static_cast<SwFtnFrm*>(pLay)->IsUnlockPosOfLowerObjs();
}
// #i51303# - no unlock of object positions for sections
else if ( bUnlockPosOfObjs && pLay->IsSctFrm() )
{
bUnlockPosOfObjs = false;
}
pLay->NotifyLowerObjs( bUnlockPosOfObjs );
2000-09-18 23:08:29 +00:00
}
if ( bPos && pLay->IsFtnFrm() && pLay->Lower() )
{
// OD 2004-05-11 #i28701#
::lcl_InvalidatePosOfLowers( *pLay );
2000-09-18 23:08:29 +00:00
}
if( ( bPos || bSize ) && pLay->IsFlyFrm() && ((SwFlyFrm*)pLay)->GetAnchorFrm()
&& ((SwFlyFrm*)pLay)->GetAnchorFrm()->IsFlyFrm() )
((SwFlyFrm*)pLay)->AnchorFrm()->InvalidateSize();
2000-09-18 23:08:29 +00:00
}
/*************************************************************************/
2000-09-18 23:08:29 +00:00
SwFlyNotify::SwFlyNotify( SwFlyFrm *pFlyFrm ) :
SwLayNotify( pFlyFrm ),
2011-04-18 12:37:38 -03:00
// #115759# - keep correct page frame - the page frame
// the Writer fly frame is currently registered at.
pOldPage( pFlyFrm->GetPageFrm() ),
aFrmAndSpace( pFlyFrm->GetObjRectWithSpaces() )
2000-09-18 23:08:29 +00:00
{
}
/*************************************************************************/
2000-09-18 23:08:29 +00:00
SwFlyNotify::~SwFlyNotify()
{
// #i49383#
if ( mbFrmDeleted )
{
return;
}
2000-09-18 23:08:29 +00:00
SwFlyFrm *pFly = GetFly();
if ( pFly->IsNotifyBack() )
{
ViewShell *pSh = pFly->getRootFrm()->GetCurrShell();
2000-09-18 23:08:29 +00:00
SwViewImp *pImp = pSh ? pSh->Imp() : 0;
if ( !pImp || !pImp->IsAction() || !pImp->GetLayAction().IsAgain() )
{
//Wenn in der LayAction das IsAgain gesetzt ist kann es sein,
//dass die alte Seite inzwischen vernichtet wurde!
::Notify( pFly, pOldPage, aFrmAndSpace, &aPrt );
// #i35640# - additional notify anchor text frame,
// if Writer fly frame has changed its page
if ( pFly->GetAnchorFrm()->IsTxtFrm() &&
pFly->GetPageFrm() != pOldPage )
{
pFly->AnchorFrm()->Prepare( PREP_FLY_LEAVE );
}
2000-09-18 23:08:29 +00:00
}
pFly->ResetNotifyBack();
}
//Haben sich Groesse oder Position geaendert, so sollte die View
//das wissen.
SWRECTFN( pFly )
const bool bPosChgd = POS_DIFF( aFrm, pFly->Frm() );
const bool bFrmChgd = pFly->Frm().SSize() != aFrm.SSize();
const bool bPrtChgd = aPrt != pFly->Prt();
if ( bPosChgd || bFrmChgd || bPrtChgd )
2000-09-18 23:08:29 +00:00
{
pFly->NotifyDrawObj();
}
if ( bPosChgd && aFrm.Pos().X() != WEIT_WECH )
{
// OD 2004-05-10 #i28701# - no direct move of lower Writer fly frames.
// reason: New positioning and alignment (e.g. to-paragraph anchored,
// but aligned at page) are introduced.
// <SwLayNotify::~SwLayNotify()> takes care of invalidation of lower
// floating screen objects by calling method <SwLayoutFrm::NotifyLowerObjs()>.
2000-09-18 23:08:29 +00:00
if ( pFly->IsFlyAtCntFrm() )
{
SwFrm *pNxt = pFly->AnchorFrm()->FindNext();
2000-09-18 23:08:29 +00:00
if ( pNxt )
{
2000-09-18 23:08:29 +00:00
pNxt->InvalidatePos();
}
}
// #i26945# - notify anchor.
// Needed for negative positioned Writer fly frames
if ( pFly->GetAnchorFrm()->IsTxtFrm() )
{
pFly->AnchorFrm()->Prepare( PREP_FLY_LEAVE );
}
}
// OD 2004-05-13 #i28701#
// #i45180# - no adjustment of layout process flags and
// further notifications/invalidations, if format is called by grow/shrink
if ( pFly->ConsiderObjWrapInfluenceOnObjPos() &&
( !pFly->ISA(SwFlyFreeFrm) ||
!static_cast<SwFlyFreeFrm*>(pFly)->IsNoMoveOnCheckClip() ) )
{
// #i54138# - suppress restart of the layout process
// on changed frame height.
// Note: It doesn't seem to be necessary and can cause layout loops.
if ( bPosChgd )
{
// indicate a restart of the layout process
pFly->SetRestartLayoutProcess( true );
}
else
{
// lock position
pFly->LockPosition();
if ( !pFly->ConsiderForTextWrap() )
{
// indicate that object has to be considered for text wrap
pFly->SetConsiderForTextWrap( true );
// invalidate 'background' in order to allow its 'background'
// to wrap around it.
pFly->NotifyBackground( pFly->GetPageFrm(),
pFly->GetObjRectWithSpaces(),
PREP_FLY_ARRIVE );
// invalidate position of anchor frame in order to force
// a re-format of the anchor frame, which also causes a
// re-format of the invalid previous frames of the anchor frame.
pFly->AnchorFrm()->InvalidatePos();
}
2000-09-18 23:08:29 +00:00
}
}
}
/*************************************************************************/
2000-09-18 23:08:29 +00:00
SwCntntNotify::SwCntntNotify( SwCntntFrm *pCntntFrm ) :
SwFrmNotify( pCntntFrm ),
// OD 08.01.2004 #i11859#
mbChkHeightOfLastLine( false ),
2004-03-11 12:22:15 +00:00
mnHeightOfLastLine( 0L ),
// OD 2004-02-26 #i25029#
mbInvalidatePrevPrtArea( false ),
mbBordersJoinedWithPrev( false )
2000-09-18 23:08:29 +00:00
{
// OD 08.01.2004 #i11859#
if ( pCntntFrm->IsTxtFrm() )
{
SwTxtFrm* pTxtFrm = static_cast<SwTxtFrm*>(pCntntFrm);
if ( !pTxtFrm->GetTxtNode()->getIDocumentSettingAccess()->get(IDocumentSettingAccess::OLD_LINE_SPACING) )
{
const SwAttrSet* pSet = pTxtFrm->GetAttrSet();
const SvxLineSpacingItem &rSpace = pSet->GetLineSpacing();
if ( rSpace.GetInterLineSpaceRule() == SVX_INTER_LINE_SPACE_PROP )
{
mbChkHeightOfLastLine = true;
mnHeightOfLastLine = pTxtFrm->GetHeightOfLastLine();
}
}
}
2000-09-18 23:08:29 +00:00
}
/*************************************************************************/
2000-09-18 23:08:29 +00:00
SwCntntNotify::~SwCntntNotify()
{
// #i49383#
if ( mbFrmDeleted )
{
return;
}
2000-09-18 23:08:29 +00:00
SwCntntFrm *pCnt = GetCnt();
if ( bSetCompletePaintOnInvalidate )
pCnt->SetCompletePaint();
SWRECTFN( pCnt )
if ( pCnt->IsInTab() && ( POS_DIFF( pCnt->Frm(), aFrm ) ||
2000-09-18 23:08:29 +00:00
pCnt->Frm().SSize() != aFrm.SSize()))
{
SwLayoutFrm* pCell = pCnt->GetUpper();
while( !pCell->IsCellFrm() && pCell->GetUpper() )
pCell = pCell->GetUpper();
OSL_ENSURE( pCell->IsCellFrm(), "Where's my cell?" );
if ( text::VertOrientation::NONE != pCell->GetFmt()->GetVertOrient().GetVertOrient() )
2000-09-18 23:08:29 +00:00
pCell->InvalidatePrt(); //fuer vertikale Ausrichtung.
}
// OD 2004-02-26 #i25029#
if ( mbInvalidatePrevPrtArea && mbBordersJoinedWithPrev &&
pCnt->IsTxtFrm() &&
!pCnt->IsFollow() && !pCnt->GetIndPrev() )
{
// determine previous frame
SwFrm* pPrevFrm = pCnt->FindPrev();
// skip empty section frames and hidden text frames
{
while ( pPrevFrm &&
( ( pPrevFrm->IsSctFrm() &&
!static_cast<SwSectionFrm*>(pPrevFrm)->GetSection() ) ||
( pPrevFrm->IsTxtFrm() &&
static_cast<SwTxtFrm*>(pPrevFrm)->IsHiddenNow() ) ) )
{
pPrevFrm = pPrevFrm->FindPrev();
}
}
// Invalidate printing area of found previous frame
if ( pPrevFrm )
{
if ( pPrevFrm->IsSctFrm() )
{
if ( pCnt->IsInSct() )
{
// Note: found previous frame is a section frame and
// <pCnt> is also inside a section.
// Thus due to <mbBordersJoinedWithPrev>,
// <pCnt> had joined its borders/shadow with the
// last content of the found section.
// Invalidate printing area of last content in found section.
SwFrm* pLstCntntOfSctFrm =
static_cast<SwSectionFrm*>(pPrevFrm)->FindLastCntnt();
if ( pLstCntntOfSctFrm )
{
pLstCntntOfSctFrm->InvalidatePrt();
}
}
}
else
{
pPrevFrm->InvalidatePrt();
}
}
}
sal_Bool bFirst = (aFrm.*fnRect->fnGetWidth)() == 0;
2000-09-18 23:08:29 +00:00
if ( pCnt->IsNoTxtFrm() )
{
//Aktive PlugIn's oder OLE-Objekte sollten etwas von der Veraenderung
//mitbekommen, damit sie Ihr Window entsprechend verschieben.
ViewShell *pSh = pCnt->getRootFrm()->GetCurrShell();
2000-09-18 23:08:29 +00:00
if ( pSh )
{
SwOLENode *pNd;
if ( 0 != (pNd = pCnt->GetNode()->GetOLENode()) &&
(pNd->GetOLEObj().IsOleRef() ||
pNd->IsOLESizeInvalid()) )
{
const bool bNoTxtFrmPrtAreaChanged =
( aPrt.SSize().Width() != 0 &&
aPrt.SSize().Height() != 0 ) &&
aPrt.SSize() != pCnt->Prt().SSize();
OSL_ENSURE( pCnt->IsInFly(), "OLE not in FlyFrm" );
2000-09-18 23:08:29 +00:00
SwFlyFrm *pFly = pCnt->FindFlyFrm();
svt::EmbeddedObjectRef& xObj = pNd->GetOLEObj().GetObject();
2000-09-18 23:08:29 +00:00
SwFEShell *pFESh = 0;
ViewShell *pTmp = pSh;
do
{ if ( pTmp->ISA( SwCrsrShell ) )
{
pFESh = (SwFEShell*)pTmp;
// #108369#: Here used to be the condition if (!bFirst).
// I think this should mean "do not call CalcAndSetScale"
// if the frame is formatted for the first time.
// Unfortunately this is not valid anymore since the
// SwNoTxtFrm already gets a width during CalcLowerPreps.
// Nevertheless, the indention of !bFirst seemed to be
// to assure that the OLE objects have already been notified
// if necessary before calling CalcAndSetScale.
// So I replaced !bFirst by !IsOLESizeInvalid. There is
// one additional problem specific to the word import:
// The layout is calculated _before_ calling PrtOLENotify,
// and the OLE objects are not invalidated during import.
// Therefore I added the condition !IsUpdateExpFld,
2010-12-04 14:11:36 +09:00
// have a look at the occurrence of CalcLayout in
// uiview/view.cxx.
if ( !pNd->IsOLESizeInvalid() &&
!pSh->GetDoc()->IsUpdateExpFld() )
pFESh->CalcAndSetScale( xObj,
&pFly->Prt(), &pFly->Frm(),
bNoTxtFrmPrtAreaChanged );
2000-09-18 23:08:29 +00:00
}
pTmp = (ViewShell*)pTmp->GetNext();
} while ( pTmp != pSh );
if ( pFESh && pNd->IsOLESizeInvalid() )
{
pNd->SetOLESizeInvalid( sal_False );
//TODO/LATER: needs OnDocumentPrinterChanged
//xObj->OnDocumentPrinterChanged( pNd->GetDoc()->getPrinter( false ) );
2000-09-18 23:08:29 +00:00
pFESh->CalcAndSetScale( xObj );//Client erzeugen lassen.
}
}
//dito Animierte Grafiken
if ( Frm().HasArea() && ((SwNoTxtFrm*)pCnt)->HasAnimation() )
{
((SwNoTxtFrm*)pCnt)->StopAnimation();
pSh->InvalidateWindows( Frm() );
}
}
}
if ( bFirst )
{
pCnt->SetRetouche(); //fix(13870)
SwDoc *pDoc = pCnt->GetNode()->GetDoc();
if ( pDoc->GetSpzFrmFmts()->Count() &&
!pDoc->IsLoaded() && !pDoc->IsNewDoc() )
{
//Der Frm wurde wahrscheinlich zum ersten mal formatiert.
//Wenn ein Filter Flys oder Zeichenobjekte einliest und diese
//Seitengebunden sind, hat er ein Problem, weil er i.d.R. die
//Seitennummer nicht kennt. Er weiss lediglich welches der Inhalt
//(CntntNode) an dieser Stelle ist.
//Die Filter stellen dazu das Ankerattribut der Objekte so ein, dass
//sie vom Typ zwar Seitengebunden sind, aber der Index des Ankers
//auf diesen CntntNode zeigt.
//Hier werden diese vorlauefigen Verbindungen aufgeloest.
const SwPageFrm *pPage = 0;
SwNodeIndex *pIdx = 0;
SwSpzFrmFmts *pTbl = pDoc->GetSpzFrmFmts();
for ( sal_uInt16 i = 0; i < pTbl->Count(); ++i )
2000-09-18 23:08:29 +00:00
{
if ( !pPage )
pPage = pCnt->FindPageFrm();
SwFrmFmt *pFmt = (*pTbl)[i];
const SwFmtAnchor &rAnch = pFmt->GetAnchor();
if ((FLY_AT_PAGE != rAnch.GetAnchorId()) &&
(FLY_AT_PARA != rAnch.GetAnchorId()))
{
2000-09-18 23:08:29 +00:00
continue; //#60878# nicht etwa zeichengebundene.
}
2000-09-18 23:08:29 +00:00
if ( rAnch.GetCntntAnchor() )
{
if ( !pIdx )
{
pIdx = new SwNodeIndex( *pCnt->GetNode() );
}
if ( rAnch.GetCntntAnchor()->nNode == *pIdx )
{
if (FLY_AT_PAGE == rAnch.GetAnchorId())
2000-09-18 23:08:29 +00:00
{
OSL_FAIL( "<SwCntntNotify::~SwCntntNotify()> - to page anchored object with content position. Please inform OD." );
2000-09-18 23:08:29 +00:00
SwFmtAnchor aAnch( rAnch );
aAnch.SetAnchor( 0 );
aAnch.SetPageNum( pPage->GetPhyPageNum() );
pFmt->SetFmtAttr( aAnch );
2000-09-18 23:08:29 +00:00
if ( RES_DRAWFRMFMT != pFmt->Which() )
pFmt->MakeFrms();
}
}
}
}
delete pIdx;
}
}
// OD 12.01.2004 #i11859# - invalidate printing area of following frame,
// if height of last line has changed.
if ( pCnt->IsTxtFrm() && mbChkHeightOfLastLine )
{
if ( mnHeightOfLastLine != static_cast<SwTxtFrm*>(pCnt)->GetHeightOfLastLine() )
{
pCnt->InvalidateNextPrtArea();
}
}
// #i44049#
if ( pCnt->IsTxtFrm() && POS_DIFF( aFrm, pCnt->Frm() ) )
{
pCnt->InvalidateObjs( true );
}
// #i43255# - move code to invalidate at-character
// anchored objects due to a change of its anchor character from
// method <SwTxtFrm::Format(..)>.
if ( pCnt->IsTxtFrm() )
{
SwTxtFrm* pMasterFrm = pCnt->IsFollow()
? static_cast<SwTxtFrm*>(pCnt)->FindMaster()
: static_cast<SwTxtFrm*>(pCnt);
if ( pMasterFrm && !pMasterFrm->IsFlyLock() &&
pMasterFrm->GetDrawObjs() )
{
SwSortedObjs* pObjs = pMasterFrm->GetDrawObjs();
for ( sal_uInt32 i = 0; i < pObjs->Count(); ++i )
{
SwAnchoredObject* pAnchoredObj = (*pObjs)[i];
if ( pAnchoredObj->GetFrmFmt().GetAnchor().GetAnchorId()
== FLY_AT_CHAR )
{
pAnchoredObj->CheckCharRectAndTopOfLine( !pMasterFrm->IsEmpty() );
}
}
}
}
2000-09-18 23:08:29 +00:00
}
/*************************************************************************/
2000-09-18 23:08:29 +00:00
void AppendObjs( const SwSpzFrmFmts *pTbl, sal_uLong nIndex,
2000-09-18 23:08:29 +00:00
SwFrm *pFrm, SwPageFrm *pPage )
{
for ( sal_uInt16 i = 0; i < pTbl->Count(); ++i )
2000-09-18 23:08:29 +00:00
{
SwFrmFmt *pFmt = (SwFrmFmt*)(*pTbl)[i];
const SwFmtAnchor &rAnch = pFmt->GetAnchor();
if ( rAnch.GetCntntAnchor() &&
(rAnch.GetCntntAnchor()->nNode.GetIndex() == nIndex) )
{
const bool bFlyAtFly = rAnch.GetAnchorId() == FLY_AT_FLY; // LAYER_IMPL
//Wird ein Rahmen oder ein SdrObject beschrieben?
const bool bSdrObj = RES_DRAWFRMFMT == pFmt->Which();
// OD 23.06.2003 #108784# - append also drawing objects anchored
// as character.
const bool bDrawObjInCntnt = bSdrObj &&
(rAnch.GetAnchorId() == FLY_AS_CHAR);
if( bFlyAtFly ||
(rAnch.GetAnchorId() == FLY_AT_PARA) ||
(rAnch.GetAnchorId() == FLY_AT_CHAR) ||
bDrawObjInCntnt )
2000-09-18 23:08:29 +00:00
{
SdrObject* pSdrObj = 0;
if ( bSdrObj && 0 == (pSdrObj = pFmt->FindSdrObject()) )
2000-09-18 23:08:29 +00:00
{
OSL_ENSURE( !bSdrObj, "DrawObject not found." );
2000-09-18 23:08:29 +00:00
pFmt->GetDoc()->DelFrmFmt( pFmt );
--i;
continue;
}
if ( pSdrObj )
{
if ( !pSdrObj->GetPage() )
{
pFmt->getIDocumentDrawModelAccess()->GetDrawModel()->GetPage(0)->
2000-09-18 23:08:29 +00:00
InsertObject(pSdrObj, pSdrObj->GetOrdNumDirect());
}
SwDrawContact* pNew =
static_cast<SwDrawContact*>(GetUserCall( pSdrObj ));
if ( !pNew->GetAnchorFrm() )
{
pFrm->AppendDrawObj( *(pNew->GetAnchoredObj( 0L )) );
}
// OD 19.06.2003 #108784# - add 'virtual' drawing object,
// if necessary. But control objects have to be excluded.
else if ( !::CheckControlLayer( pSdrObj ) &&
pNew->GetAnchorFrm() != pFrm &&
!pNew->GetDrawObjectByAnchorFrm( *pFrm ) )
{
SwDrawVirtObj* pDrawVirtObj = pNew->AddVirtObj();
pFrm->AppendDrawObj( *(pNew->GetAnchoredObj( pDrawVirtObj )) );
// for repaint, use new ActionChanged()
// pDrawVirtObj->SendRepaintBroadcast();
pDrawVirtObj->ActionChanged();
}
2000-09-18 23:08:29 +00:00
}
else
{
SwFlyFrm *pFly;
if( bFlyAtFly )
pFly = new SwFlyLayFrm( (SwFlyFrmFmt*)pFmt, pFrm, pFrm );
2000-09-18 23:08:29 +00:00
else
pFly = new SwFlyAtCntFrm( (SwFlyFrmFmt*)pFmt, pFrm, pFrm );
2000-09-18 23:08:29 +00:00
pFly->Lock();
pFrm->AppendFly( pFly );
pFly->Unlock();
if ( pPage )
::RegistFlys( pPage, pFly );
}
}
}
}
}
bool lcl_ObjConnected( SwFrmFmt *pFmt, const SwFrm* pSib )
2000-09-18 23:08:29 +00:00
{
SwIterator<SwFlyFrm,SwFmt> aIter( *pFmt );
2000-09-18 23:08:29 +00:00
if ( RES_FLYFRMFMT == pFmt->Which() )
{
const SwRootFrm* pRoot = pSib ? pSib->getRootFrm() : 0;
const SwFlyFrm* pTmpFrm;
for( pTmpFrm = aIter.First(); pTmpFrm; pTmpFrm = aIter.Next() )
{
if(! pRoot || pRoot == pTmpFrm->getRootFrm() )
return true;
}
}
2000-09-18 23:08:29 +00:00
else
{
SwDrawContact *pContact = SwIterator<SwDrawContact,SwFmt>::FirstElement(*pFmt);
if ( pContact )
return pContact->GetAnchorFrm() != 0;
2000-09-18 23:08:29 +00:00
}
return false;
2000-09-18 23:08:29 +00:00
}
/** helper method to determine, if a <SwFrmFmt>, which has an object connected,
is located in header or footer.
OD 23.06.2003 #108784#
@author OD
*/
bool lcl_InHeaderOrFooter( SwFrmFmt& _rFmt )
{
bool bRetVal = false;
const SwFmtAnchor& rAnch = _rFmt.GetAnchor();
if (rAnch.GetAnchorId() != FLY_AT_PAGE)
{
bRetVal = _rFmt.GetDoc()->IsInHeaderFooter( rAnch.GetCntntAnchor()->nNode );
}
return bRetVal;
}
void AppendAllObjs( const SwSpzFrmFmts *pTbl, const SwFrm* pSib )
2000-09-18 23:08:29 +00:00
{
//Verbinden aller Objekte, die in der SpzTbl beschrieben sind mit dem
//Layout.
//Wenn sich nix mehr tut hoeren wir auf. Dann koennen noch Formate
//uebrigbleiben, weil wir weder zeichengebunde Rahmen verbinden noch
//Objecte die in zeichengebundenen verankert sind.
SwSpzFrmFmts aCpy( 255, 255 );
aCpy.Insert( pTbl, 0 );
sal_uInt16 nOldCnt = USHRT_MAX;
2000-09-18 23:08:29 +00:00
while ( aCpy.Count() && aCpy.Count() != nOldCnt )
{
nOldCnt = aCpy.Count();
for ( int i = 0; i < int(aCpy.Count()); ++i )
{
SwFrmFmt *pFmt = (SwFrmFmt*)aCpy[ sal_uInt16(i) ];
2000-09-18 23:08:29 +00:00
const SwFmtAnchor &rAnch = pFmt->GetAnchor();
sal_Bool bRemove = sal_False;
if ((rAnch.GetAnchorId() == FLY_AT_PAGE) ||
(rAnch.GetAnchorId() == FLY_AS_CHAR))
{
2000-09-18 23:08:29 +00:00
//Seitengebunde sind bereits verankert, zeichengebundene
//will ich hier nicht.
bRemove = sal_True;
}
else if ( sal_False == (bRemove = ::lcl_ObjConnected( pFmt, pSib )) ||
::lcl_InHeaderOrFooter( *pFmt ) )
2000-09-18 23:08:29 +00:00
{
// OD 23.06.2003 #108784# - correction: for objects in header
// or footer create frames, in spite of the fact that an connected
// objects already exists.
2000-09-18 23:08:29 +00:00
//Fuer Flys und DrawObjs nur dann ein MakeFrms rufen wenn noch
//keine abhaengigen Existieren, andernfalls, oder wenn das
//MakeFrms keine abhaengigen erzeugt, entfernen.
pFmt->MakeFrms();
bRemove = ::lcl_ObjConnected( pFmt, pSib );
2000-09-18 23:08:29 +00:00
}
if ( bRemove )
{
aCpy.Remove( sal_uInt16(i) );
2000-09-18 23:08:29 +00:00
--i;
}
}
}
aCpy.Remove( 0, aCpy.Count() );
}
/** local method to set 'working' position for newly inserted frames
OD 12.08.2003 #i17969#
@author OD
*/
void lcl_SetPos( SwFrm& _rNewFrm,
const SwLayoutFrm& _rLayFrm )
{
SWRECTFN( (&_rLayFrm) )
(_rNewFrm.Frm().*fnRect->fnSetPos)( (_rLayFrm.Frm().*fnRect->fnGetPos)() );
// move position by one SwTwip in text flow direction in order to get
// notifications for a new calculated position after its formatting.
if ( bVert )
_rNewFrm.Frm().Pos().X() -= 1;
else
_rNewFrm.Frm().Pos().Y() += 1;
}
2000-09-18 23:08:29 +00:00
void MA_FASTCALL _InsertCnt( SwLayoutFrm *pLay, SwDoc *pDoc,
sal_uLong nIndex, sal_Bool bPages, sal_uLong nEndIndex,
2000-09-18 23:08:29 +00:00
SwFrm *pPrv )
{
pDoc->BlockIdling();
SwRootFrm* pLayout = pLay->getRootFrm();
const sal_Bool bOldCallbackActionEnabled = pLayout ? pLayout->IsCallbackActionEnabled() : sal_False;
if( bOldCallbackActionEnabled )
pLayout->SetCallbackActionEnabled( sal_False );
2000-09-18 23:08:29 +00:00
//Bei der Erzeugung des Layouts wird bPages mit sal_True uebergeben. Dann
2000-09-18 23:08:29 +00:00
//werden schon mal alle x Absaetze neue Seiten angelegt. Bei umbruechen
//und/oder Pagedescriptorwechseln werden gleich die entsprechenden Seiten
//angelegt.
//Vorteil ist, das einerseits schon eine annaehernd realistische Zahl von
//Seiten angelegt wird, vor allem aber gibt es nicht mehr eine schier
//lange Kette von Absaetzen teuer verschoben werden muss, bis sie sich auf
//ertraegliches mass reduziert hat.
//Wir gehen mal davon aus, da? 20 Absaetze auf eine Seite passen
2000-09-18 23:08:29 +00:00
//Damit es in extremen Faellen nicht gar so heftig rechenen wir je nach
//Node noch etwas drauf.
//Wenn in der DocStatistik eine brauchebare Seitenzahl angegeben ist
//(wird beim Schreiben gepflegt), so wird von dieser Seitenanzahl
//ausgegengen.
const sal_Bool bStartPercent = bPages && !nEndIndex;
SwPageFrm *pPage = pLay->FindPageFrm();
const SwSpzFrmFmts *pTbl = pDoc->GetSpzFrmFmts();
SwFrm *pFrm = 0;
sal_Bool bBreakAfter = sal_False;
SwActualSection *pActualSection = 0;
SwLayHelper *pPageMaker;
2000-09-18 23:08:29 +00:00
//Wenn das Layout erzeugt wird (bPages == sal_True) steuern wir den Progress
2000-09-18 23:08:29 +00:00
//an. Flys und DrawObjekte werden dann nicht gleich verbunden, dies
//passiert erst am Ende der Funktion.
if ( bPages )
2000-09-18 23:08:29 +00:00
{
// Attention: the SwLayHelper class uses references to the content-,
// page-, layout-frame etc. and may change them!
pPageMaker = new SwLayHelper( pDoc, pFrm, pPrv, pPage, pLay,
pActualSection, bBreakAfter, nIndex, 0 == nEndIndex );
if( bStartPercent )
{
const sal_uLong nPageCount = pPageMaker->CalcPageCount();
if( nPageCount )
bObjsDirect = sal_False;
}
2000-09-18 23:08:29 +00:00
}
else
pPageMaker = NULL;
2000-09-18 23:08:29 +00:00
if( pLay->IsInSct() &&
2000-09-18 23:08:29 +00:00
( pLay->IsSctFrm() || pLay->GetUpper() ) ) // Hierdurch werden Frischlinge
// abgefangen, deren Flags noch nicht ermittelt werden koennen,
// so z.B. beim Einfuegen einer Tabelle
{
SwSectionFrm* pSct = pLay->FindSctFrm();
// Wenn Inhalt in eine Fussnote eingefuegt wird, die in einem spaltigen
// Bereich liegt, so darf der spaltige Bereich nicht aufgebrochen werden.
// Nur wenn im Innern der Fussnote ein Bereich liegt, ist dies ein
// Kandidat fuer pActualSection.
// Gleiches gilt fuer Bereiche in Tabellen, wenn innerhalb einer Tabelle
// eingefuegt wird, duerfen nur Bereiche, die ebenfalls im Innern liegen,
// aufgebrochen werden.
if( ( !pLay->IsInFtn() || pSct->IsInFtn() ) &&
( !pLay->IsInTab() || pSct->IsInTab() ) )
{
pActualSection = new SwActualSection( 0, pSct, 0 );
OSL_ENSURE( !pLay->Lower() || !pLay->Lower()->IsColumnFrm(),
2000-09-18 23:08:29 +00:00
"_InsertCnt: Wrong Call" );
}
}
//If a section is "open", the pActualSection points to an SwActualSection.
//If the page breaks, for "open" sections a follow will created.
//For nested sections (which have, however, not a nested layout),
//the SwActualSection class has a member, which points to an upper(section).
//When the "inner" section finishs, the upper will used instead.
while( sal_True )
2000-09-18 23:08:29 +00:00
{
SwNode *pNd = pDoc->GetNodes()[nIndex];
if ( pNd->IsCntntNode() )
{
SwCntntNode* pNode = (SwCntntNode*)pNd;
pFrm = pNode->IsTxtNode() ? new SwTxtFrm( (SwTxtNode*)pNode, pLay ) :
pNode->MakeFrm( pLay );
if( pPageMaker )
pPageMaker->CheckInsert( nIndex );
2000-09-18 23:08:29 +00:00
pFrm->InsertBehind( pLay, pPrv );
// #i27138#
// notify accessibility paragraphs objects about changed
// CONTENT_FLOWS_FROM/_TO relation.
// Relation CONTENT_FLOWS_FROM for next paragraph will change
// and relation CONTENT_FLOWS_TO for previous paragraph will change.
if ( pFrm->IsTxtFrm() )
{
ViewShell* pViewShell( pFrm->getRootFrm()->GetCurrShell() );
// no notification, if <ViewShell> is in construction
if ( pViewShell && !pViewShell->IsInConstructor() &&
pViewShell->GetLayout() &&
pViewShell->GetLayout()->IsAnyShellAccessible() )
{
pViewShell->InvalidateAccessibleParaFlowRelation(
dynamic_cast<SwTxtFrm*>(pFrm->FindNextCnt( true )),
dynamic_cast<SwTxtFrm*>(pFrm->FindPrevCnt( true )) );
// #i68958#
// The information flags of the text frame are validated
// in methods <FindNextCnt(..)> and <FindPrevCnt(..)>.
// The information flags have to be invalidated, because
// it is possible, that the one of its upper frames
// isn't inserted into the layout.
pFrm->InvalidateInfFlags();
}
}
// OD 12.08.2003 #i17969# - consider horizontal/vertical layout
// for setting position at newly inserted frame
lcl_SetPos( *pFrm, *pLay );
2000-09-18 23:08:29 +00:00
pPrv = pFrm;
if ( pTbl->Count() && bObjsDirect && !bDontCreateObjects )
AppendObjs( pTbl, nIndex, pFrm, pPage );
}
else if ( pNd->IsTableNode() )
{ //Sollten wir auf eine Tabelle gestossen sein?
SwTableNode *pTblNode = (SwTableNode*)pNd;
// #108116# loading may produce table structures that GCLines
// needs to clean up. To keep table formulas correct, change
// all table formulas to internal (BOXPTR) representation.
SwTableFmlUpdate aMsgHnt( &pTblNode->GetTable() );
aMsgHnt.eFlags = TBL_BOXPTR;
pDoc->UpdateTblFlds( &aMsgHnt );
pTblNode->GetTable().GCLines();
pFrm = pTblNode->MakeFrm( pLay );
2000-09-18 23:08:29 +00:00
if( pPageMaker )
pPageMaker->CheckInsert( nIndex );
2000-09-18 23:08:29 +00:00
pFrm->InsertBehind( pLay, pPrv );
// #i27138#
// notify accessibility paragraphs objects about changed
// CONTENT_FLOWS_FROM/_TO relation.
// Relation CONTENT_FLOWS_FROM for next paragraph will change
// and relation CONTENT_FLOWS_TO for previous paragraph will change.
{
ViewShell* pViewShell( pFrm->getRootFrm()->GetCurrShell() );
// no notification, if <ViewShell> is in construction
if ( pViewShell && !pViewShell->IsInConstructor() &&
pViewShell->GetLayout() &&
pViewShell->GetLayout()->IsAnyShellAccessible() )
{
pViewShell->InvalidateAccessibleParaFlowRelation(
dynamic_cast<SwTxtFrm*>(pFrm->FindNextCnt( true )),
dynamic_cast<SwTxtFrm*>(pFrm->FindPrevCnt( true )) );
}
}
2000-09-18 23:08:29 +00:00
if ( bObjsDirect && pTbl->Count() )
((SwTabFrm*)pFrm)->RegistFlys();
// OD 12.08.2003 #i17969# - consider horizontal/vertical layout
// for setting position at newly inserted frame
lcl_SetPos( *pFrm, *pLay );
2000-09-18 23:08:29 +00:00
pPrv = pFrm;
//Index auf den Endnode der Tabellensection setzen.
nIndex = pTblNode->EndOfSectionIndex();
2002-09-19 12:25:35 +00:00
SwTabFrm* pTmpFrm = (SwTabFrm*)pFrm;
while ( pTmpFrm )
{
pTmpFrm->CheckDirChange();
pTmpFrm = pTmpFrm->IsFollow() ? pTmpFrm->FindMaster() : NULL;
}
2000-09-18 23:08:29 +00:00
}
else if ( pNd->IsSectionNode() )
{
SwSectionNode *pNode = (SwSectionNode*)pNd;
if( pNode->GetSection().CalcHiddenFlag() )
// ist versteckt, ueberspringe den Bereich
nIndex = pNode->EndOfSectionIndex();
else
{
pFrm = pNode->MakeFrm( pLay );
2000-09-18 23:08:29 +00:00
pActualSection = new SwActualSection( pActualSection,
(SwSectionFrm*)pFrm, pNode );
if ( pActualSection->GetUpper() )
{
//Hinter den Upper einsetzen, beim EndNode wird der "Follow"
//des Uppers erzeugt.
SwSectionFrm *pTmp = pActualSection->GetUpper()->GetSectionFrm();
pFrm->InsertBehind( pTmp->GetUpper(), pTmp );
// OD 25.03.2003 #108339# - direct initialization of section
// after insertion in the layout
static_cast<SwSectionFrm*>(pFrm)->Init();
2000-09-18 23:08:29 +00:00
}
else
{
pFrm->InsertBehind( pLay, pPrv );
// OD 25.03.2003 #108339# - direct initialization of section
// after insertion in the layout
static_cast<SwSectionFrm*>(pFrm)->Init();
// #i33963#
// Do not trust the IsInFtn flag. If we are currently
// building up a table, the upper of pPrv may be a cell
// frame, but the cell frame does not have an upper yet.
if( pPrv && 0 != pPrv->ImplFindFtnFrm() )
2000-09-18 23:08:29 +00:00
{
if( pPrv->IsSctFrm() )
pPrv = ((SwSectionFrm*)pPrv)->ContainsCntnt();
if( pPrv && pPrv->IsTxtFrm() )
((SwTxtFrm*)pPrv)->Prepare( PREP_QUOVADIS, 0, sal_False );
2000-09-18 23:08:29 +00:00
}
}
// #i27138#
// notify accessibility paragraphs objects about changed
// CONTENT_FLOWS_FROM/_TO relation.
// Relation CONTENT_FLOWS_FROM for next paragraph will change
// and relation CONTENT_FLOWS_TO for previous paragraph will change.
{
ViewShell* pViewShell( pFrm->getRootFrm()->GetCurrShell() );
// no notification, if <ViewShell> is in construction
if ( pViewShell && !pViewShell->IsInConstructor() &&
pViewShell->GetLayout() &&
pViewShell->GetLayout()->IsAnyShellAccessible() )
{
pViewShell->InvalidateAccessibleParaFlowRelation(
dynamic_cast<SwTxtFrm*>(pFrm->FindNextCnt( true )),
dynamic_cast<SwTxtFrm*>(pFrm->FindPrevCnt( true )) );
}
}
pFrm->CheckDirChange();
// OD 12.08.2003 #i17969# - consider horizontal/vertical layout
// for setting position at newly inserted frame
lcl_SetPos( *pFrm, *pLay );
// OD 20.11.2002 #105405# - no page, no invalidate.
if ( pPage )
{
// OD 18.09.2002 #100522#
// invalidate page in order to force format and paint of
// inserted section frame
pFrm->InvalidatePage( pPage );
// FME 10.11.2003 #112243#
// Invalidate fly content flag:
if ( pFrm->IsInFly() )
pPage->InvalidateFlyCntnt();
// OD 14.11.2002 #104684# - invalidate page content in order to
// force format and paint of section content.
pPage->InvalidateCntnt();
}
2000-09-18 23:08:29 +00:00
pLay = (SwLayoutFrm*)pFrm;
if ( pLay->Lower() && pLay->Lower()->IsLayoutFrm() )
pLay = pLay->GetNextLayoutLeaf();
pPrv = 0;
}
}
else if ( pNd->IsEndNode() && pNd->StartOfSectionNode()->IsSectionNode() )
2000-09-18 23:08:29 +00:00
{
OSL_ENSURE( pActualSection, "Sectionende ohne Anfang?" );
OSL_ENSURE( pActualSection->GetSectionNode() == pNd->StartOfSectionNode(),
2000-09-18 23:08:29 +00:00
"Sectionende mit falschen Start Node?" );
//Section schliessen, ggf. die umgebende Section wieder
//aktivieren.
SwActualSection *pTmp = pActualSection->GetUpper();
delete pActualSection;
pLay = pLay->FindSctFrm();
if ( 0 != (pActualSection = pTmp) )
{
//Koennte noch sein, das der letzte SectionFrm leer geblieben
//ist. Dann ist es jetzt an der Zeit ihn zu entfernen.
if ( !pLay->ContainsCntnt() )
{
SwFrm *pTmpFrm = pLay;
pLay = pTmpFrm->GetUpper();
pPrv = pTmpFrm->GetPrev();
pTmpFrm->Remove();
delete pTmpFrm;
2000-09-18 23:08:29 +00:00
}
else
{
pPrv = pLay;
pLay = pLay->GetUpper();
}
// new section frame
pFrm = pActualSection->GetSectionNode()->MakeFrm( pLay );
pFrm->InsertBehind( pLay, pPrv );
static_cast<SwSectionFrm*>(pFrm)->Init();
// OD 12.08.2003 #i17969# - consider horizontal/vertical layout
// for setting position at newly inserted frame
lcl_SetPos( *pFrm, *pLay );
SwSectionFrm* pOuterSectionFrm = pActualSection->GetSectionFrm();
// a follow has to be appended to the new section frame
SwSectionFrm* pFollow = pOuterSectionFrm->GetFollow();
if ( pFollow )
{
pOuterSectionFrm->SetFollow( NULL );
pOuterSectionFrm->InvalidateSize();
((SwSectionFrm*)pFrm)->SetFollow( pFollow );
2000-09-18 23:08:29 +00:00
}
2000-09-18 23:08:29 +00:00
// Wir wollen keine leeren Teile zuruecklassen
if( ! pOuterSectionFrm->IsColLocked() &&
! pOuterSectionFrm->ContainsCntnt() )
2000-09-18 23:08:29 +00:00
{
pOuterSectionFrm->DelEmpty( sal_True );
delete pOuterSectionFrm;
2000-09-18 23:08:29 +00:00
}
pActualSection->SetSectionFrm( (SwSectionFrm*)pFrm );
pLay = (SwLayoutFrm*)pFrm;
if ( pLay->Lower() && pLay->Lower()->IsLayoutFrm() )
pLay = pLay->GetNextLayoutLeaf();
pPrv = 0;
}
else
{
//Nix mehr mit Sections, es geht direkt hinter dem SectionFrame
//weiter.
pPrv = pLay;
pLay = pLay->GetUpper();
}
}
else if( pNd->IsStartNode() &&
SwFlyStartNode == ((SwStartNode*)pNd)->GetStartNodeType() )
{
if ( pTbl->Count() && bObjsDirect && !bDontCreateObjects )
{
SwFlyFrm* pFly = pLay->FindFlyFrm();
if( pFly )
AppendObjs( pTbl, nIndex, pFly, pPage );
}
}
else
// Weder Cntnt noch Tabelle noch Section,
// also muessen wir fertig sein.
break;
++nIndex;
// Der Endnode wird nicht mehr mitgenommen, es muss vom
// Aufrufenden (Section/MakeFrms()) sichergestellt sein, dass das Ende
// des Bereichs vor dem EndIndex liegt!
if ( nEndIndex && nIndex >= nEndIndex )
break;
}
if ( pActualSection )
{
//Kann passieren, dass noch eine leere (Follow-)Section uebrig geblieben ist.
if ( !(pLay = pActualSection->GetSectionFrm())->ContainsCntnt() )
{
pLay->Remove();
delete pLay;
}
delete pActualSection;
}
if ( bPages ) //Jetzt noch die Flys verbinden lassen.
{
if ( !bDontCreateObjects )
AppendAllObjs( pTbl, pLayout );
bObjsDirect = sal_True;
2000-09-18 23:08:29 +00:00
}
if( pPageMaker )
{
2001-06-29 06:58:06 +00:00
pPageMaker->CheckFlyCache( pPage );
delete pPageMaker;
if( pDoc->GetLayoutCache() )
{
#if OSL_DEBUG_LEVEL > 1
pDoc->GetLayoutCache()->CompareLayout( *pDoc );
#endif
pDoc->GetLayoutCache()->ClearImpl();
}
}
pDoc->UnblockIdling();
if( bOldCallbackActionEnabled )
pLayout->SetCallbackActionEnabled( bOldCallbackActionEnabled );
2000-09-18 23:08:29 +00:00
}
2000-09-18 23:08:29 +00:00
void MakeFrms( SwDoc *pDoc, const SwNodeIndex &rSttIdx,
const SwNodeIndex &rEndIdx )
{
bObjsDirect = sal_False;
2000-09-18 23:08:29 +00:00
SwNodeIndex aTmp( rSttIdx );
sal_uLong nEndIdx = rEndIdx.GetIndex();
SwNode* pNd = pDoc->GetNodes().FindPrvNxtFrmNode( aTmp,
2000-09-18 23:08:29 +00:00
pDoc->GetNodes()[ nEndIdx-1 ]);
if ( pNd )
{
sal_Bool bApres = aTmp < rSttIdx;
2000-09-18 23:08:29 +00:00
SwNode2Layout aNode2Layout( *pNd, rSttIdx.GetIndex() );
SwFrm* pFrm;
while( 0 != (pFrm = aNode2Layout.NextFrm()) )
{
SwLayoutFrm *pUpper = pFrm->GetUpper();
SwFtnFrm* pFtnFrm = pUpper->FindFtnFrm();
sal_Bool bOldLock, bOldFtn;
2000-09-18 23:08:29 +00:00
if( pFtnFrm )
{
bOldFtn = pFtnFrm->IsColLocked();
pFtnFrm->ColLock();
}
else
bOldFtn = sal_True;
2000-09-18 23:08:29 +00:00
SwSectionFrm* pSct = pUpper->FindSctFrm();
// Es sind innerhalb von Fussnoten nur die Bereiche interessant,
// die in den Fussnoten liegen, nicht etwa die (spaltigen) Bereiche,
// in denen die Fussnoten(Container) liegen.
// #109767# Table frame is in section, insert section in cell frame.
if( pSct && ((pFtnFrm && !pSct->IsInFtn()) || pUpper->IsCellFrm()) )
2000-09-18 23:08:29 +00:00
pSct = NULL;
if( pSct )
{ // damit der SectionFrm nicht zerstoert wird durch pTmp->MoveFwd()
bOldLock = pSct->IsColLocked();
pSct->ColLock();
}
else
bOldLock = sal_True;
2000-09-18 23:08:29 +00:00
// Wenn pFrm sich nicht bewegen kann, koennen wir auch niemanden
// auf die naechste Seite schieben. Innerhalb eines Rahmens auch
// nicht ( in der 1. Spalte eines Rahmens waere pFrm Moveable()! )
// Auch in spaltigen Bereichen in Tabellen waere pFrm Moveable.
sal_Bool bMoveNext = nEndIdx - rSttIdx.GetIndex() > 120;
sal_Bool bAllowMove = !pFrm->IsInFly() && pFrm->IsMoveable() &&
(!pFrm->IsInTab() || pFrm->IsTabFrm() );
if ( bMoveNext && bAllowMove )
2000-09-18 23:08:29 +00:00
{
SwFrm *pMove = pFrm;
SwFrm *pPrev = pFrm->GetPrev();
SwFlowFrm *pTmp = SwFlowFrm::CastFlowFrm( pMove );
OSL_ENSURE( pTmp, "Missing FlowFrm" );
2000-09-18 23:08:29 +00:00
if ( bApres )
{
// Wir wollen, dass der Rest der Seite leer ist, d.h.
// der naechste muss auf die naechste Seite wandern.
// Dieser kann auch in der naechsten Spalte stehen!
OSL_ENSURE( !pTmp->HasFollow(), "Follows forbidden" );
2000-09-18 23:08:29 +00:00
pPrev = pFrm;
// Wenn unser umgebender SectionFrm einen Next besitzt,
// so soll dieser ebenfalls gemoved werden!
pMove = pFrm->GetIndNext();
SwColumnFrm* pCol = (SwColumnFrm*)pFrm->FindColFrm();
if( pCol )
pCol = (SwColumnFrm*)pCol->GetNext();
do
{
if( pCol && !pMove )
{ // Bisher haben wir keinen Nachfolger gefunden
// jetzt gucken wir in die naechste Spalte
pMove = pCol->ContainsAny();
if( pCol->GetNext() )
pCol = (SwColumnFrm*)pCol->GetNext();
else if( pCol->IsInSct() )
{ // Wenn es keine naechste Spalte gibt, wir aber
// innerhalb eines spaltigen Bereichs sind,
// koennte es noch ausserhalb des Bereich
// (Seiten-)Spalten geben
pCol = (SwColumnFrm*)pCol->FindSctFrm()->FindColFrm();
if( pCol )
pCol = (SwColumnFrm*)pCol->GetNext();
}
else
pCol = NULL;
}
// Falls hier verschrottete SectionFrms herumgammeln,
// muessen diese uebersprungen werden.
while( pMove && pMove->IsSctFrm() &&
!((SwSectionFrm*)pMove)->GetSection() )
pMove = pMove->GetNext();
} while( !pMove && pCol );
if( pMove )
{
if ( pMove->IsCntntFrm() )
pTmp = (SwCntntFrm*)pMove;
else if ( pMove->IsTabFrm() )
pTmp = (SwTabFrm*)pMove;
else if ( pMove->IsSctFrm() )
{
pMove = ((SwSectionFrm*)pMove)->ContainsAny();
if( pMove )
pTmp = SwFlowFrm::CastFlowFrm( pMove );
else
pTmp = NULL;
}
}
else
pTmp = 0;
}
else
{
OSL_ENSURE( !pTmp->IsFollow(), "Follows really forbidden" );
2000-09-18 23:08:29 +00:00
// Bei Bereichen muss natuerlich der Inhalt auf die Reise
// geschickt werden.
if( pMove->IsSctFrm() )
{
while( pMove && pMove->IsSctFrm() &&
!((SwSectionFrm*)pMove)->GetSection() )
pMove = pMove->GetNext();
if( pMove && pMove->IsSctFrm() )
pMove = ((SwSectionFrm*)pMove)->ContainsAny();
if( pMove )
pTmp = SwFlowFrm::CastFlowFrm( pMove );
else
pTmp = NULL;
}
}
if( pTmp )
{
SwFrm* pOldUp = pTmp->GetFrm()->GetUpper();
// MoveFwd==sal_True bedeutet, dass wir auf der gleichen
2000-09-18 23:08:29 +00:00
// Seite geblieben sind, wir wollen aber die Seite wechseln,
// sofern dies moeglich ist
sal_Bool bTmpOldLock = pTmp->IsJoinLocked();
2000-09-18 23:08:29 +00:00
pTmp->LockJoin();
while( pTmp->MoveFwd( sal_True, sal_False, sal_True ) )
2000-09-18 23:08:29 +00:00
{
if( pOldUp == pTmp->GetFrm()->GetUpper() )
break;
pOldUp = pTmp->GetFrm()->GetUpper();
}
if( !bTmpOldLock )
2000-09-18 23:08:29 +00:00
pTmp->UnlockJoin();
}
::_InsertCnt( pUpper, pDoc, rSttIdx.GetIndex(),
pFrm->IsInDocBody(), nEndIdx, pPrev );
}
else
{
sal_Bool bSplit;
2000-09-18 23:08:29 +00:00
SwFrm* pPrv = bApres ? pFrm : pFrm->GetPrev();
// Wenn in einen SectionFrm ein anderer eingefuegt wird,
// muss dieser aufgebrochen werden
if( pSct && rSttIdx.GetNode().IsSectionNode() )
{
bSplit = pSct->SplitSect( pFrm, bApres );
// Wenn pSct nicht aufgespalten werden konnte
if( !bSplit && !bApres )
{
pUpper = pSct->GetUpper();
pPrv = pSct->GetPrev();
}
}
else
bSplit = sal_False;
::_InsertCnt( pUpper, pDoc, rSttIdx.GetIndex(), sal_False,
nEndIdx, pPrv );
// OD 23.06.2003 #108784# - correction: append objects doesn't
// depend on value of <bAllowMove>
if( !bDontCreateObjects )
{
const SwSpzFrmFmts *pTbl = pDoc->GetSpzFrmFmts();
if( pTbl->Count() )
AppendAllObjs( pTbl, pUpper );
}
2000-09-18 23:08:29 +00:00
// Wenn nichts eingefuegt wurde, z.B. ein ausgeblendeter Bereich,
// muss das Splitten rueckgaengig gemacht werden
if( bSplit && pSct && pSct->GetNext()
&& pSct->GetNext()->IsSctFrm() )
pSct->MergeNext( (SwSectionFrm*)pSct->GetNext() );
if( pFrm->IsInFly() )
pFrm->FindFlyFrm()->_Invalidate();
if( pFrm->IsInTab() )
pFrm->InvalidateSize();
}
SwPageFrm *pPage = pUpper->FindPageFrm();
SwFrm::CheckPageDescs( pPage, sal_False );
2000-09-18 23:08:29 +00:00
if( !bOldFtn )
pFtnFrm->ColUnlock();
if( !bOldLock )
{
pSct->ColUnlock();
// Zum Beispiel beim Einfuegen von gelinkten Bereichen,
// die wiederum Bereiche enthalten, kann pSct jetzt leer sein
// und damit ruhig zerstoert werden.
if( !pSct->ContainsCntnt() )
{
pSct->DelEmpty( sal_True );
pUpper->getRootFrm()->RemoveFromList( pSct );
2000-09-18 23:08:29 +00:00
delete pSct;
}
}
}
}
bObjsDirect = sal_True;
2000-09-18 23:08:29 +00:00
}
/*************************************************************************/
2000-09-18 23:08:29 +00:00
SwBorderAttrs::SwBorderAttrs( const SwModify *pMod, const SwFrm *pConstructor ) :
SwCacheObj( pMod ),
rAttrSet( pConstructor->IsCntntFrm()
? ((SwCntntFrm*)pConstructor)->GetNode()->GetSwAttrSet()
: ((SwLayoutFrm*)pConstructor)->GetFmt()->GetAttrSet() ),
rUL ( rAttrSet.GetULSpace() ),
// #i96772#
// LRSpaceItem is copied due to the possibility that it is adjusted - see below
2000-09-18 23:08:29 +00:00
rLR ( rAttrSet.GetLRSpace() ),
rBox ( rAttrSet.GetBox() ),
rShadow ( rAttrSet.GetShadow() ),
aFrmSize( rAttrSet.GetFrmSize().GetSize() )
{
// #i96772#
const SwTxtFrm* pTxtFrm = dynamic_cast<const SwTxtFrm*>(pConstructor);
if ( pTxtFrm )
{
pTxtFrm->GetTxtNode()->ClearLRSpaceItemDueToListLevelIndents( rLR );
}
2000-09-18 23:08:29 +00:00
//Achtung: Die USHORTs fuer die gecache'ten Werte werden absichtlich
//nicht initialisiert!
//Muessen alle einmal berechnet werden:
bTopLine = bBottomLine = bLeftLine = bRightLine =
bTop = bBottom = bLine = sal_True;
2000-09-18 23:08:29 +00:00
bCacheGetLine = bCachedGetTopLine = bCachedGetBottomLine = sal_False;
// OD 21.05.2003 #108789# - init cache status for values <bJoinedWithPrev>
// and <bJoinedWithNext>, which aren't initialized by default.
bCachedJoinedWithPrev = sal_False;
bCachedJoinedWithNext = sal_False;
2000-09-18 23:08:29 +00:00
bBorderDist = 0 != (pConstructor->GetType() & (FRM_CELL));
}
SwBorderAttrs::~SwBorderAttrs()
{
((SwModify*)pOwner)->SetInCache( sal_False );
2000-09-18 23:08:29 +00:00
}
/*************************************************************************
|*
|* SwBorderAttrs::CalcTop(), CalcBottom(), CalcLeft(), CalcRight()
|*
|* Beschreibung Die Calc-Methoden errechnen zusaetzlich zu den
|* von den Attributen vorgegebenen Groessen einen Sicherheitsabstand.
|* der Sicherheitsabstand wird nur einkalkuliert, wenn Umrandung und/oder
|* Schatten im Spiel sind; er soll vermeiden, dass aufgrund der
|* groben physikalischen Gegebenheiten Raender usw. uebermalt werden.
|*
|*************************************************************************/
void SwBorderAttrs::_CalcTop()
{
nTop = CalcTopLine() + rUL.GetUpper();
bTop = sal_False;
2000-09-18 23:08:29 +00:00
}
void SwBorderAttrs::_CalcBottom()
{
nBottom = CalcBottomLine() + rUL.GetLower();
bBottom = sal_False;
2000-09-18 23:08:29 +00:00
}
long SwBorderAttrs::CalcRight( const SwFrm* pCaller ) const
{
long nRight=0;
if (!pCaller->IsTxtFrm() || !((SwTxtFrm*)pCaller)->GetTxtNode()->GetDoc()->get(IDocumentSettingAccess::INVERT_BORDER_SPACING)) {
// OD 23.01.2003 #106895# - for cell frame in R2L text direction the left
// and right border are painted on the right respectively left.
if ( pCaller->IsCellFrm() && pCaller->IsRightToLeft() )
nRight = CalcLeftLine();
else
nRight = CalcRightLine();
}
2002-12-09 09:37:57 +00:00
// for paragraphs, "left" is "before text" and "right" is "after text"
if ( pCaller->IsTxtFrm() && pCaller->IsRightToLeft() )
nRight += rLR.GetLeft();
else
nRight += rLR.GetRight();
// correction: retrieve left margin for numbering in R2L-layout
if ( pCaller->IsTxtFrm() && pCaller->IsRightToLeft() )
{
nRight += ((SwTxtFrm*)pCaller)->GetTxtNode()->GetLeftMarginWithNum();
}
return nRight;
}
2000-09-18 23:08:29 +00:00
long SwBorderAttrs::CalcLeft( const SwFrm *pCaller ) const
{
long nLeft=0;
if (!pCaller->IsTxtFrm() || !((SwTxtFrm*)pCaller)->GetTxtNode()->GetDoc()->get(IDocumentSettingAccess::INVERT_BORDER_SPACING)) {
// OD 23.01.2003 #106895# - for cell frame in R2L text direction the left
// and right border are painted on the right respectively left.
if ( pCaller->IsCellFrm() && pCaller->IsRightToLeft() )
nLeft = CalcRightLine();
else
nLeft = CalcLeftLine();
}
2000-09-18 23:08:29 +00:00
// for paragraphs, "left" is "before text" and "right" is "after text"
if ( pCaller->IsTxtFrm() && pCaller->IsRightToLeft() )
nLeft += rLR.GetRight();
else
nLeft += rLR.GetLeft();
// correction: do not retrieve left margin for numbering in R2L-layout
// if ( pCaller->IsTxtFrm() )
if ( pCaller->IsTxtFrm() && !pCaller->IsRightToLeft() )
{
nLeft += ((SwTxtFrm*)pCaller)->GetTxtNode()->GetLeftMarginWithNum();
}
return nLeft;
2000-09-18 23:08:29 +00:00
}
/*************************************************************************
|*
|* SwBorderAttrs::CalcTopLine(), CalcBottomLine(),
|* CalcLeftLine(), CalcRightLine()
|*
|* Beschreibung Berechnung der Groessen fuer Umrandung und Schatten.
|* Es kann auch ohne Linien ein Abstand erwuenscht sein,
|* dieser wird dann nicht vom Attribut sondern hier
|* beruecksichtigt (bBorderDist, z.B. fuer Zellen).
|*
|*************************************************************************/
void SwBorderAttrs::_CalcTopLine()
{
nTopLine = (bBorderDist && !rBox.GetTop())
? rBox.GetDistance (BOX_LINE_TOP)
: rBox.CalcLineSpace(BOX_LINE_TOP);
nTopLine = nTopLine + rShadow.CalcShadowSpace(SHADOW_TOP);
bTopLine = sal_False;
2000-09-18 23:08:29 +00:00
}
void SwBorderAttrs::_CalcBottomLine()
{
nBottomLine = (bBorderDist && !rBox.GetBottom())
? rBox.GetDistance (BOX_LINE_BOTTOM)
: rBox.CalcLineSpace(BOX_LINE_BOTTOM);
nBottomLine = nBottomLine + rShadow.CalcShadowSpace(SHADOW_BOTTOM);
bBottomLine = sal_False;
2000-09-18 23:08:29 +00:00
}
void SwBorderAttrs::_CalcLeftLine()
{
nLeftLine = (bBorderDist && !rBox.GetLeft())
? rBox.GetDistance (BOX_LINE_LEFT)
: rBox.CalcLineSpace(BOX_LINE_LEFT);
nLeftLine = nLeftLine + rShadow.CalcShadowSpace(SHADOW_LEFT);
bLeftLine = sal_False;
2000-09-18 23:08:29 +00:00
}
void SwBorderAttrs::_CalcRightLine()
{
nRightLine = (bBorderDist && !rBox.GetRight())
? rBox.GetDistance (BOX_LINE_RIGHT)
: rBox.CalcLineSpace(BOX_LINE_RIGHT);
nRightLine = nRightLine + rShadow.CalcShadowSpace(SHADOW_RIGHT);
bRightLine = sal_False;
2000-09-18 23:08:29 +00:00
}
/*************************************************************************/
2000-09-18 23:08:29 +00:00
void SwBorderAttrs::_IsLine()
{
bIsLine = rBox.GetTop() || rBox.GetBottom() ||
rBox.GetLeft()|| rBox.GetRight();
bLine = sal_False;
2000-09-18 23:08:29 +00:00
}
/*************************************************************************
|*
|* SwBorderAttrs::CmpLeftRightLine(), IsTopLine(), IsBottomLine()
|*
|* Die Umrandungen benachbarter Absaetze werden nach folgendem
|* Algorithmus zusammengefasst:
|*
|* 1. Die Umrandung oben faellt weg, wenn der Vorgaenger dieselbe
|* Umrandung oben aufweist und 3. Zutrifft.
|* Zusaetzlich muss der Absatz mindestens rechts oder links oder
|* unten eine Umrandung haben.
|* 2. Die Umrandung unten faellt weg, wenn der Nachfolger dieselbe
|* Umrandung untern aufweist und 3. Zustrifft.
|* Zusaetzlich muss der Absatz mindestens rechts oder links oder
|* oben eine Umrandung haben.
|* 3. Die Umrandungen links und rechts vor Vorgaenger bzw. Nachfolger
|* sind identisch.
|*
|*************************************************************************/
inline int CmpLines( const editeng::SvxBorderLine *pL1, const editeng::SvxBorderLine *pL2 )
2000-09-18 23:08:29 +00:00
{
return ( ((pL1 && pL2) && (*pL1 == *pL2)) || (!pL1 && !pL2) );
}
// OD 21.05.2003 #108789# - change name of 1st parameter - "rAttrs" -> "rCmpAttrs"
// OD 21.05.2003 #108789# - compare <CalcRight()> and <rCmpAttrs.CalcRight()>
// instead of only the right LR-spacing, because R2L-layout has to be
// considered.
sal_Bool SwBorderAttrs::CmpLeftRight( const SwBorderAttrs &rCmpAttrs,
2000-09-18 23:08:29 +00:00
const SwFrm *pCaller,
const SwFrm *pCmp ) const
{
return ( CmpLines( rCmpAttrs.GetBox().GetLeft(), GetBox().GetLeft() ) &&
CmpLines( rCmpAttrs.GetBox().GetRight(),GetBox().GetRight() ) &&
CalcLeft( pCaller ) == rCmpAttrs.CalcLeft( pCmp ) &&
// OD 21.05.2003 #108789# - compare <CalcRight> with <rCmpAttrs.CalcRight>.
CalcRight( pCaller ) == rCmpAttrs.CalcRight( pCmp ) );
}
sal_Bool SwBorderAttrs::_JoinWithCmp( const SwFrm& _rCallerFrm,
const SwFrm& _rCmpFrm ) const
{
sal_Bool bReturnVal = sal_False;
SwBorderAttrAccess aCmpAccess( SwFrm::GetCache(), &_rCmpFrm );
const SwBorderAttrs &rCmpAttrs = *aCmpAccess.Get();
if ( rShadow == rCmpAttrs.GetShadow() &&
CmpLines( rBox.GetTop(), rCmpAttrs.GetBox().GetTop() ) &&
CmpLines( rBox.GetBottom(), rCmpAttrs.GetBox().GetBottom() ) &&
CmpLeftRight( rCmpAttrs, &_rCallerFrm, &_rCmpFrm )
)
{
bReturnVal = sal_True;
}
return bReturnVal;
}
// OD 21.05.2003 #108789# - method to determine, if borders are joined with
// previous frame. Calculated value saved in cached value <bJoinedWithPrev>
// OD 2004-02-26 #i25029# - add 2nd parameter <_pPrevFrm>
void SwBorderAttrs::_CalcJoinedWithPrev( const SwFrm& _rFrm,
const SwFrm* _pPrevFrm )
{
// set default
bJoinedWithPrev = sal_False;
if ( _rFrm.IsTxtFrm() )
{
// text frame can potentially join with previous text frame, if
// corresponding attribute set is set at previous text frame.
// OD 2004-02-26 #i25029# - If parameter <_pPrevFrm> is set, take this
// one as previous frame.
const SwFrm* pPrevFrm = _pPrevFrm ? _pPrevFrm : _rFrm.GetPrev();
// OD 2004-02-13 #i25029# - skip hidden text frames.
while ( pPrevFrm && pPrevFrm->IsTxtFrm() &&
static_cast<const SwTxtFrm*>(pPrevFrm)->IsHiddenNow() )
{
pPrevFrm = pPrevFrm->GetPrev();
}
if ( pPrevFrm && pPrevFrm->IsTxtFrm() &&
pPrevFrm->GetAttrSet()->GetParaConnectBorder().GetValue()
)
{
bJoinedWithPrev = _JoinWithCmp( _rFrm, *(pPrevFrm) );
}
}
// valid cache status, if demanded
// OD 2004-02-26 #i25029# - Do not validate cache, if parameter <_pPrevFrm>
// is set.
bCachedJoinedWithPrev = bCacheGetLine && !_pPrevFrm;
}
// OD 21.05.2003 #108789# - method to determine, if borders are joined with
// next frame. Calculated value saved in cached value <bJoinedWithNext>
void SwBorderAttrs::_CalcJoinedWithNext( const SwFrm& _rFrm )
{
// set default
bJoinedWithNext = sal_False;
if ( _rFrm.IsTxtFrm() )
{
// text frame can potentially join with next text frame, if
// corresponding attribute set is set at current text frame.
// OD 2004-02-13 #i25029# - get next frame, but skip hidden text frames.
const SwFrm* pNextFrm = _rFrm.GetNext();
while ( pNextFrm && pNextFrm->IsTxtFrm() &&
static_cast<const SwTxtFrm*>(pNextFrm)->IsHiddenNow() )
{
pNextFrm = pNextFrm->GetNext();
}
if ( pNextFrm && pNextFrm->IsTxtFrm() &&
_rFrm.GetAttrSet()->GetParaConnectBorder().GetValue()
)
{
bJoinedWithNext = _JoinWithCmp( _rFrm, *(pNextFrm) );
}
}
// valid cache status, if demanded
bCachedJoinedWithNext = bCacheGetLine;
}
// OD 21.05.2003 #108789# - accessor for cached values <bJoinedWithPrev>
// OD 2004-02-26 #i25029# - add 2nd parameter <_pPrevFrm>, which is passed to
// method <_CalcJoindWithPrev(..)>.
sal_Bool SwBorderAttrs::JoinedWithPrev( const SwFrm& _rFrm,
const SwFrm* _pPrevFrm ) const
{
if ( !bCachedJoinedWithPrev || _pPrevFrm )
{
// OD 2004-02-26 #i25029# - pass <_pPrevFrm> as 2nd parameter
const_cast<SwBorderAttrs*>(this)->_CalcJoinedWithPrev( _rFrm, _pPrevFrm );
}
return bJoinedWithPrev;
}
sal_Bool SwBorderAttrs::JoinedWithNext( const SwFrm& _rFrm ) const
{
if ( !bCachedJoinedWithNext )
{
const_cast<SwBorderAttrs*>(this)->_CalcJoinedWithNext( _rFrm );
}
return bJoinedWithNext;
2000-09-18 23:08:29 +00:00
}
// OD 2004-02-26 #i25029# - added 2nd parameter <_pPrevFrm>, which is passed to
// method <JoinedWithPrev>
void SwBorderAttrs::_GetTopLine( const SwFrm& _rFrm,
const SwFrm* _pPrevFrm )
2000-09-18 23:08:29 +00:00
{
sal_uInt16 nRet = CalcTopLine();
// OD 21.05.2003 #108789# - use new method <JoinWithPrev()>
// OD 2004-02-26 #i25029# - add 2nd parameter
if ( JoinedWithPrev( _rFrm, _pPrevFrm ) )
{
nRet = 0;
}
bCachedGetTopLine = bCacheGetLine;
2000-09-18 23:08:29 +00:00
nGetTopLine = nRet;
}
void SwBorderAttrs::_GetBottomLine( const SwFrm& _rFrm )
2000-09-18 23:08:29 +00:00
{
sal_uInt16 nRet = CalcBottomLine();
// OD 21.05.2003 #108789# - use new method <JoinWithPrev()>
if ( JoinedWithNext( _rFrm ) )
{
nRet = 0;
}
bCachedGetBottomLine = bCacheGetLine;
2000-09-18 23:08:29 +00:00
nGetBottomLine = nRet;
}
/*************************************************************************/
2000-09-18 23:08:29 +00:00
SwBorderAttrAccess::SwBorderAttrAccess( SwCache &rCach, const SwFrm *pFrm ) :
SwCacheAccess( rCach, (pFrm->IsCntntFrm() ?
2000-09-18 23:08:29 +00:00
(void*)((SwCntntFrm*)pFrm)->GetNode() :
(void*)((SwLayoutFrm*)pFrm)->GetFmt()),
(sal_Bool)(pFrm->IsCntntFrm() ?
((SwModify*)((SwCntntFrm*)pFrm)->GetNode())->IsInCache() :
((SwModify*)((SwLayoutFrm*)pFrm)->GetFmt())->IsInCache()) ),
2000-09-18 23:08:29 +00:00
pConstructor( pFrm )
{
}
/*************************************************************************/
2000-09-18 23:08:29 +00:00
SwCacheObj *SwBorderAttrAccess::NewObj()
{
((SwModify*)pOwner)->SetInCache( sal_True );
2000-09-18 23:08:29 +00:00
return new SwBorderAttrs( (SwModify*)pOwner, pConstructor );
}
SwBorderAttrs *SwBorderAttrAccess::Get()
{
return (SwBorderAttrs*)SwCacheAccess::Get();
}
/*************************************************************************/
2000-09-18 23:08:29 +00:00
SwOrderIter::SwOrderIter( const SwPageFrm *pPg, sal_Bool bFlys ) :
2000-09-18 23:08:29 +00:00
pPage( pPg ),
pCurrent( 0 ),
bFlysOnly( bFlys )
{
}
/*************************************************************************/
2000-09-18 23:08:29 +00:00
const SdrObject *SwOrderIter::Top()
{
pCurrent = 0;
if ( pPage->GetSortedObjs() )
{
const SwSortedObjs *pObjs = pPage->GetSortedObjs();
2000-09-18 23:08:29 +00:00
if ( pObjs->Count() )
{
Merge commit 'ooo/DEV300_m101' into integration/dev300_m101 Conflicts: starmath/inc/applicat.hxx starmath/inc/dialog.hxx starmath/inc/document.hxx starmath/inc/edit.hxx starmath/inc/format.hxx starmath/inc/node.hxx starmath/inc/parse.hxx starmath/inc/rect.hxx starmath/inc/smdll.hxx starmath/inc/smmod.hxx starmath/inc/starmath.hrc starmath/inc/symbol.hxx starmath/inc/toolbox.hxx starmath/inc/utility.hxx starmath/inc/view.hxx starmath/prj/build.lst starmath/qa/cppunit/version.map starmath/sdi/smslots.sdi starmath/source/accessibility.cxx starmath/source/cfgitem.cxx starmath/source/cfgitem.hxx starmath/source/config.cxx starmath/source/dialog.cxx starmath/source/document.cxx starmath/source/edit.cxx starmath/source/format.cxx starmath/source/makefile.mk starmath/source/math_pch.cxx starmath/source/mathmlexport.cxx starmath/source/mathmlimport.cxx starmath/source/mathtype.cxx starmath/source/node.cxx starmath/source/parse.cxx starmath/source/rect.cxx starmath/source/register.cxx starmath/source/smdetect.cxx starmath/source/smdll.cxx starmath/source/smmod.cxx starmath/source/smres.src starmath/source/symbol.cxx starmath/source/toolbox.cxx starmath/source/unomodel.cxx starmath/source/utility.cxx starmath/source/view.cxx sw/JunitTest_sw_unoapi.mk sw/Library_swd.mk sw/Makefile sw/inc/IDocumentFieldsAccess.hxx sw/inc/IDocumentSettingAccess.hxx sw/inc/IDocumentUndoRedo.hxx sw/inc/IShellCursorSupplier.hxx sw/inc/SwUndoField.hxx sw/inc/acmplwrd.hxx sw/inc/authfld.hxx sw/inc/bparr.hxx sw/inc/calbck.hxx sw/inc/calc.hxx sw/inc/ccoll.hxx sw/inc/cellatr.hxx sw/inc/cellfml.hxx sw/inc/chpfld.hxx sw/inc/cmdid.h sw/inc/crsrsh.hxx sw/inc/crstate.hxx sw/inc/dbfld.hxx sw/inc/dbmgr.hxx sw/inc/dcontact.hxx sw/inc/ddefld.hxx sw/inc/doc.hxx sw/inc/docary.hxx sw/inc/docsh.hxx sw/inc/docstat.hxx sw/inc/docstyle.hxx sw/inc/docufld.hxx sw/inc/editsh.hxx sw/inc/errhdl.hxx sw/inc/expfld.hxx sw/inc/fchrfmt.hxx sw/inc/fesh.hxx sw/inc/fldbas.hxx sw/inc/flddat.hxx sw/inc/flddropdown.hxx sw/inc/flypos.hxx sw/inc/fmtanchr.hxx sw/inc/fmtautofmt.hxx sw/inc/fmtclds.hxx sw/inc/fmtcnct.hxx sw/inc/fmtcol.hxx sw/inc/fmtfsize.hxx sw/inc/fmtftn.hxx sw/inc/fmtftntx.hxx sw/inc/fmthdft.hxx sw/inc/fmtinfmt.hxx sw/inc/fmtline.hxx sw/inc/fmtornt.hxx sw/inc/fmtpdsc.hxx sw/inc/fmtruby.hxx sw/inc/fmtsrnd.hxx sw/inc/fmturl.hxx sw/inc/fmtwrapinfluenceonobjpos.hxx sw/inc/format.hxx sw/inc/frmatr.hxx sw/inc/frmfmt.hxx sw/inc/grfatr.hxx sw/inc/helpid.h sw/inc/hintids.hxx sw/inc/hints.hxx sw/inc/htmltbl.hxx sw/inc/inetfld.hxx sw/inc/io.hxx sw/inc/iodetect.hxx sw/inc/itabenum.hxx sw/inc/ndarr.hxx sw/inc/ndgrf.hxx sw/inc/ndindex.hxx sw/inc/ndnotxt.hxx sw/inc/ndole.hxx sw/inc/ndtxt.hxx sw/inc/ndtyp.hxx sw/inc/node.hxx sw/inc/numrule.hxx sw/inc/pagedesc.hxx sw/inc/pagepreviewlayout.hxx sw/inc/pam.hxx sw/inc/paratr.hxx sw/inc/poolfmt.awk sw/inc/poolfmt.hxx sw/inc/printdata.hxx sw/inc/reffld.hxx sw/inc/shellio.hxx sw/inc/shellres.hxx sw/inc/swabstdlg.hxx sw/inc/swatrset.hxx sw/inc/swerror.h sw/inc/swprtopt.hxx sw/inc/swtable.hxx sw/inc/swtypes.hxx sw/inc/tblafmt.hxx sw/inc/tgrditem.hxx sw/inc/tox.hxx sw/inc/undobj.hxx sw/inc/unocoll.hxx sw/inc/unoframe.hxx sw/inc/unoprnms.hxx sw/inc/usrfld.hxx sw/inc/viewopt.hxx sw/inc/viewsh.hxx sw/inc/viscrs.hxx sw/prj/build.lst sw/qa/complex/accessibility/makefile.mk sw/qa/core/Test-BigPtrArray.cxx sw/qa/core/makefile.mk sw/sdi/makefile.mk sw/source/core/access/makefile.mk sw/source/core/access/textmarkuphelper.cxx sw/source/core/attr/calbck.cxx sw/source/core/attr/cellatr.cxx sw/source/core/attr/fmtwrapinfluenceonobjpos.cxx sw/source/core/attr/format.cxx sw/source/core/attr/hints.cxx sw/source/core/bastyp/calc.cxx sw/source/core/bastyp/init.cxx sw/source/core/bastyp/makefile.mk sw/source/core/bastyp/swcache.cxx sw/source/core/crsr/bookmrk.cxx sw/source/core/crsr/callnk.cxx sw/source/core/crsr/crsrsh.cxx sw/source/core/crsr/crstrvl.cxx sw/source/core/crsr/findattr.cxx sw/source/core/crsr/findcoll.cxx sw/source/core/crsr/makefile.mk sw/source/core/crsr/pam.cxx sw/source/core/crsr/swcrsr.cxx sw/source/core/crsr/trvltbl.cxx sw/source/core/crsr/unocrsr.cxx sw/source/core/crsr/viscrs.cxx sw/source/core/doc/acmplwrd.cxx sw/source/core/doc/doc.cxx sw/source/core/doc/docbm.cxx sw/source/core/doc/doccomp.cxx sw/source/core/doc/docdesc.cxx sw/source/core/doc/docdraw.cxx sw/source/core/doc/docedt.cxx sw/source/core/doc/docfld.cxx sw/source/core/doc/docfly.cxx sw/source/core/doc/docfmt.cxx sw/source/core/doc/docftn.cxx sw/source/core/doc/docglbl.cxx sw/source/core/doc/docglos.cxx sw/source/core/doc/doclay.cxx sw/source/core/doc/docnew.cxx sw/source/core/doc/docnum.cxx sw/source/core/doc/docredln.cxx sw/source/core/doc/docruby.cxx sw/source/core/doc/docsort.cxx sw/source/core/doc/docstat.cxx sw/source/core/doc/doctxm.cxx sw/source/core/doc/fmtcol.cxx sw/source/core/doc/gctable.cxx sw/source/core/doc/htmltbl.cxx sw/source/core/doc/makefile.mk sw/source/core/doc/number.cxx sw/source/core/doc/poolfmt.cxx sw/source/core/doc/tblafmt.cxx sw/source/core/doc/tblcpy.cxx sw/source/core/doc/tblrwcl.cxx sw/source/core/docnode/makefile.mk sw/source/core/docnode/ndcopy.cxx sw/source/core/docnode/ndnum.cxx sw/source/core/docnode/ndsect.cxx sw/source/core/docnode/ndtbl.cxx sw/source/core/docnode/ndtbl1.cxx sw/source/core/docnode/node.cxx sw/source/core/docnode/node2lay.cxx sw/source/core/docnode/nodes.cxx sw/source/core/docnode/section.cxx sw/source/core/docnode/swbaslnk.cxx sw/source/core/draw/dcontact.cxx sw/source/core/draw/dflyobj.cxx sw/source/core/draw/drawdoc.cxx sw/source/core/draw/dview.cxx sw/source/core/draw/makefile.mk sw/source/core/edit/autofmt.cxx sw/source/core/edit/edattr.cxx sw/source/core/edit/eddel.cxx sw/source/core/edit/edfcol.cxx sw/source/core/edit/edfld.cxx sw/source/core/edit/edfldexp.cxx sw/source/core/edit/edfmt.cxx sw/source/core/edit/edglss.cxx sw/source/core/edit/editsh.cxx sw/source/core/edit/edlingu.cxx sw/source/core/edit/ednumber.cxx sw/source/core/edit/edsect.cxx sw/source/core/edit/edtab.cxx sw/source/core/edit/edtox.cxx sw/source/core/edit/edundo.cxx sw/source/core/edit/makefile.mk sw/source/core/except/dbgloop.cxx sw/source/core/except/errhdl.cxx sw/source/core/fields/authfld.cxx sw/source/core/fields/cellfml.cxx sw/source/core/fields/chpfld.cxx sw/source/core/fields/dbfld.cxx sw/source/core/fields/ddefld.cxx sw/source/core/fields/ddetbl.cxx sw/source/core/fields/docufld.cxx sw/source/core/fields/expfld.cxx sw/source/core/fields/fldbas.cxx sw/source/core/fields/flddat.cxx sw/source/core/fields/flddropdown.cxx sw/source/core/fields/macrofld.cxx sw/source/core/fields/makefile.mk sw/source/core/fields/reffld.cxx sw/source/core/fields/scrptfld.cxx sw/source/core/fields/tblcalc.cxx sw/source/core/fields/usrfld.cxx sw/source/core/frmedt/fecopy.cxx sw/source/core/frmedt/fedesc.cxx sw/source/core/frmedt/fefly1.cxx sw/source/core/frmedt/feshview.cxx sw/source/core/frmedt/fetab.cxx sw/source/core/frmedt/fews.cxx sw/source/core/frmedt/makefile.mk sw/source/core/frmedt/tblsel.cxx sw/source/core/graphic/grfatr.cxx sw/source/core/inc/SwUndoFmt.hxx sw/source/core/inc/SwUndoTOXChange.hxx sw/source/core/inc/anchoredobjectposition.hxx sw/source/core/inc/dbgloop.hxx sw/source/core/inc/drawfont.hxx sw/source/core/inc/flowfrm.hxx sw/source/core/inc/frame.hxx sw/source/core/inc/frmtool.hxx sw/source/core/inc/layact.hxx sw/source/core/inc/layfrm.hxx sw/source/core/inc/notxtfrm.hxx sw/source/core/inc/rolbck.hxx sw/source/core/inc/rootfrm.hxx sw/source/core/inc/scriptinfo.hxx sw/source/core/inc/swblocks.hxx sw/source/core/inc/swcache.hxx sw/source/core/inc/tabfrm.hxx sw/source/core/inc/txmsrt.hxx sw/source/core/inc/undoflystrattr.hxx sw/source/core/inc/viewimp.hxx sw/source/core/layout/atrfrm.cxx sw/source/core/layout/calcmove.cxx sw/source/core/layout/dbg_lay.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/flyincnt.cxx sw/source/core/layout/flylay.cxx sw/source/core/layout/frmtool.cxx sw/source/core/layout/ftnfrm.cxx sw/source/core/layout/layact.cxx sw/source/core/layout/laycache.cxx sw/source/core/layout/makefile.mk sw/source/core/layout/objectformatter.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/tabfrm.cxx sw/source/core/layout/trvlfrm.cxx sw/source/core/layout/unusedf.cxx sw/source/core/layout/wsfrm.cxx sw/source/core/makefile.mk sw/source/core/objectpositioning/anchoredobjectposition.cxx sw/source/core/objectpositioning/ascharanchoredobjectposition.cxx sw/source/core/objectpositioning/makefile.mk sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx sw/source/core/objectpositioning/tolayoutanchoredobjectposition.cxx sw/source/core/ole/ndole.cxx sw/source/core/para/makefile.mk sw/source/core/para/paratr.cxx sw/source/core/sw3io/makefile.mk sw/source/core/sw3io/sw3convert.cxx sw/source/core/swg/SwXMLTextBlocks.cxx sw/source/core/swg/makefile.mk sw/source/core/swg/swblocks.cxx sw/source/core/table/swnewtable.cxx sw/source/core/table/swtable.cxx sw/source/core/text/EnhancedPDFExportHelper.cxx sw/source/core/text/atrstck.cxx sw/source/core/text/frmcrsr.cxx sw/source/core/text/frmform.cxx sw/source/core/text/itrcrsr.cxx sw/source/core/text/itrform2.cxx sw/source/core/text/makefile.mk sw/source/core/text/porlay.cxx sw/source/core/text/pormulti.cxx sw/source/core/text/txtfld.cxx sw/source/core/text/txtfrm.cxx sw/source/core/text/txtio.cxx sw/source/core/tox/makefile.mk sw/source/core/tox/txmsrt.cxx sw/source/core/txtnode/fmtatr2.cxx sw/source/core/txtnode/fntcache.cxx sw/source/core/txtnode/fntcap.cxx sw/source/core/txtnode/makefile.mk sw/source/core/txtnode/ndhints.cxx sw/source/core/txtnode/ndtxt.cxx sw/source/core/txtnode/swfont.cxx sw/source/core/txtnode/thints.cxx sw/source/core/txtnode/txtatr2.cxx sw/source/core/txtnode/txtedt.cxx sw/source/core/undo/SwUndoField.cxx sw/source/core/undo/SwUndoPageDesc.cxx sw/source/core/undo/SwUndoTOXChange.cxx sw/source/core/undo/docundo.cxx sw/source/core/undo/makefile.mk sw/source/core/undo/rolbck.cxx sw/source/core/undo/unbkmk.cxx sw/source/core/undo/undel.cxx sw/source/core/undo/undobj.cxx sw/source/core/undo/undobj1.cxx sw/source/core/undo/unfmco.cxx sw/source/core/undo/unins.cxx sw/source/core/undo/unnum.cxx sw/source/core/undo/unoutl.cxx sw/source/core/undo/unredln.cxx sw/source/core/undo/unsect.cxx sw/source/core/undo/unsort.cxx sw/source/core/undo/unspnd.cxx sw/source/core/undo/untbl.cxx sw/source/core/unocore/makefile.mk sw/source/core/unocore/swunohelper.cxx sw/source/core/unocore/unobkm.cxx sw/source/core/unocore/unocoll.cxx sw/source/core/unocore/unocrsrhelper.cxx sw/source/core/unocore/unodraw.cxx sw/source/core/unocore/unofield.cxx sw/source/core/unocore/unoframe.cxx sw/source/core/unocore/unomap.cxx sw/source/core/unocore/unoprnms.cxx sw/source/core/unocore/unoredlines.cxx sw/source/core/unocore/unosett.cxx sw/source/core/unocore/unosrch.cxx sw/source/core/unocore/unostyle.cxx sw/source/core/unocore/unotbl.cxx sw/source/core/view/vdraw.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/ascii/ascatr.cxx sw/source/filter/ascii/makefile.mk sw/source/filter/ascii/wrtasc.cxx sw/source/filter/basflt/fltini.cxx sw/source/filter/basflt/iodetect.cxx sw/source/filter/basflt/makefile.mk sw/source/filter/html/SwAppletImpl.cxx sw/source/filter/html/css1atr.cxx sw/source/filter/html/htmlatr.cxx sw/source/filter/html/htmlbas.cxx sw/source/filter/html/htmlcss1.cxx sw/source/filter/html/htmlfly.cxx sw/source/filter/html/htmlftn.cxx sw/source/filter/html/htmlgrin.cxx sw/source/filter/html/htmlnum.cxx sw/source/filter/html/htmlplug.cxx sw/source/filter/html/htmltab.cxx sw/source/filter/html/makefile.mk sw/source/filter/html/parcss1.cxx sw/source/filter/html/svxcss1.cxx sw/source/filter/html/swhtml.cxx sw/source/filter/inc/msfilter.hxx sw/source/filter/inc/wrtswtbl.hxx sw/source/filter/rtf/makefile.mk sw/source/filter/rtf/rtffly.cxx sw/source/filter/rtf/rtfnum.cxx sw/source/filter/rtf/rtftbl.cxx sw/source/filter/rtf/swparrtf.cxx sw/source/filter/rtf/swparrtf.hxx sw/source/filter/writer/makefile.mk sw/source/filter/writer/writer.cxx sw/source/filter/writer/wrt_fn.cxx sw/source/filter/writer/wrtswtbl.cxx sw/source/filter/ww1/fltshell.cxx sw/source/filter/ww1/makefile.mk sw/source/filter/ww1/w1class.cxx sw/source/filter/ww1/w1class.hxx sw/source/filter/ww1/w1filter.cxx sw/source/filter/ww1/w1par.cxx sw/source/filter/ww1/w1sprm.cxx sw/source/filter/ww1/w1struct.hxx sw/source/filter/ww8/README-rtf.txt sw/source/filter/ww8/attributeoutputbase.hxx sw/source/filter/ww8/docxattributeoutput.cxx sw/source/filter/ww8/docxattributeoutput.hxx sw/source/filter/ww8/docxexport.cxx sw/source/filter/ww8/docxexport.hxx sw/source/filter/ww8/docxexportfilter.cxx sw/source/filter/ww8/dump/dump8.cxx sw/source/filter/ww8/dump/dump8a.cxx sw/source/filter/ww8/dump/msvbasic.cxx sw/source/filter/ww8/dump/msvbasic.hxx sw/source/filter/ww8/dump/ww8darr.cxx sw/source/filter/ww8/dump/ww8darr.hxx sw/source/filter/ww8/dump/ww8dout.cxx sw/source/filter/ww8/dump/ww8dout.hxx sw/source/filter/ww8/dump/ww8scan.cxx sw/source/filter/ww8/dump/ww8scan.hxx sw/source/filter/ww8/dump/ww8struc.hxx sw/source/filter/ww8/makefile.mk sw/source/filter/ww8/rtfattributeoutput.cxx sw/source/filter/ww8/rtfattributeoutput.hxx sw/source/filter/ww8/rtfexport.cxx sw/source/filter/ww8/rtfexport.hxx sw/source/filter/ww8/rtfexportfilter.cxx sw/source/filter/ww8/rtfexportfilter.hxx sw/source/filter/ww8/rtfimportfilter.cxx sw/source/filter/ww8/rtfimportfilter.hxx sw/source/filter/ww8/rtfsdrexport.cxx sw/source/filter/ww8/rtfsdrexport.hxx sw/source/filter/ww8/writerhelper.cxx sw/source/filter/ww8/writerwordglue.cxx sw/source/filter/ww8/wrtw8esh.cxx sw/source/filter/ww8/wrtw8nds.cxx sw/source/filter/ww8/wrtw8num.cxx sw/source/filter/ww8/wrtw8sty.cxx sw/source/filter/ww8/wrtww8.cxx sw/source/filter/ww8/wrtww8.hxx sw/source/filter/ww8/wrtww8gr.cxx sw/source/filter/ww8/ww8atr.cxx sw/source/filter/ww8/ww8attributeoutput.hxx sw/source/filter/ww8/ww8graf.cxx sw/source/filter/ww8/ww8graf.hxx sw/source/filter/ww8/ww8graf2.cxx sw/source/filter/ww8/ww8par.cxx sw/source/filter/ww8/ww8par.hxx sw/source/filter/ww8/ww8par2.cxx sw/source/filter/ww8/ww8par3.cxx sw/source/filter/ww8/ww8par5.cxx sw/source/filter/ww8/ww8par6.cxx sw/source/filter/ww8/ww8scan.cxx sw/source/filter/ww8/ww8scan.hxx sw/source/filter/ww8/ww8struc.hxx sw/source/filter/xml/makefile.mk sw/source/filter/xml/xmlimpit.cxx sw/source/filter/xml/xmltble.cxx sw/source/filter/xml/xmltbli.cxx sw/source/ui/app/appenv.cxx sw/source/ui/app/apphdl.cxx sw/source/ui/app/applab.cxx sw/source/ui/app/appopt.cxx sw/source/ui/app/docsh.cxx sw/source/ui/app/docsh2.cxx sw/source/ui/app/docshini.cxx sw/source/ui/app/docst.cxx sw/source/ui/app/docstyle.cxx sw/source/ui/app/makefile.mk sw/source/ui/app/mn.src sw/source/ui/app/swmodul1.cxx sw/source/ui/cctrl/makefile.mk sw/source/ui/cctrl/swlbox.cxx sw/source/ui/chrdlg/break.cxx sw/source/ui/chrdlg/ccoll.cxx sw/source/ui/chrdlg/chardlg.cxx sw/source/ui/chrdlg/drpcps.cxx sw/source/ui/chrdlg/makefile.mk sw/source/ui/chrdlg/numpara.cxx sw/source/ui/chrdlg/pardlg.cxx sw/source/ui/chrdlg/swuiccoll.cxx sw/source/ui/config/barcfg.cxx sw/source/ui/config/caption.cxx sw/source/ui/config/cfgitems.cxx sw/source/ui/config/fontcfg.cxx sw/source/ui/config/mailconfigpage.cxx sw/source/ui/config/makefile.mk sw/source/ui/config/modcfg.cxx sw/source/ui/config/optcomp.cxx sw/source/ui/config/optload.cxx sw/source/ui/config/optpage.cxx sw/source/ui/config/prtopt.cxx sw/source/ui/config/uinums.cxx sw/source/ui/config/usrpref.cxx sw/source/ui/config/viewopt.cxx sw/source/ui/dbui/dbinsdlg.cxx sw/source/ui/dbui/dbmgr.cxx sw/source/ui/dbui/dbtree.cxx sw/source/ui/dbui/makefile.mk sw/source/ui/dbui/mmaddressblockpage.cxx sw/source/ui/dbui/mmdocselectpage.cxx sw/source/ui/dbui/mmoutputpage.cxx sw/source/ui/dbui/swdbtoolsclient.cxx sw/source/ui/dialog/abstract.cxx sw/source/ui/dialog/ascfldlg.cxx sw/source/ui/dialog/macassgn.cxx sw/source/ui/dialog/makefile.mk sw/source/ui/dialog/regionsw.cxx sw/source/ui/dialog/swdlgfact.cxx sw/source/ui/dialog/swdlgfact.hxx sw/source/ui/dialog/uiregionsw.cxx sw/source/ui/dochdl/gloshdl.cxx sw/source/ui/dochdl/makefile.mk sw/source/ui/dochdl/swdtflvr.cxx sw/source/ui/docvw/PostItMgr.cxx sw/source/ui/docvw/SidebarWin.cxx sw/source/ui/docvw/edtdd.cxx sw/source/ui/docvw/edtwin.cxx sw/source/ui/docvw/edtwin2.cxx sw/source/ui/docvw/edtwin3.cxx sw/source/ui/docvw/makefile.mk sw/source/ui/docvw/romenu.cxx sw/source/ui/docvw/romenu.hxx sw/source/ui/docvw/srcedtw.cxx sw/source/ui/envelp/envfmt.cxx sw/source/ui/envelp/envimg.cxx sw/source/ui/envelp/envlop1.cxx sw/source/ui/envelp/envprt.cxx sw/source/ui/envelp/label1.cxx sw/source/ui/envelp/labfmt.cxx sw/source/ui/envelp/labprt.cxx sw/source/ui/envelp/mailmrge.cxx sw/source/ui/envelp/makefile.mk sw/source/ui/fldui/flddb.cxx sw/source/ui/fldui/flddinf.cxx sw/source/ui/fldui/flddok.cxx sw/source/ui/fldui/fldedt.cxx sw/source/ui/fldui/fldfunc.cxx sw/source/ui/fldui/fldmgr.cxx sw/source/ui/fldui/fldpage.cxx sw/source/ui/fldui/fldref.cxx sw/source/ui/fldui/fldtdlg.cxx sw/source/ui/fldui/fldvar.cxx sw/source/ui/fldui/fldwrap.cxx sw/source/ui/fldui/inpdlg.cxx sw/source/ui/fldui/makefile.mk sw/source/ui/fmtui/makefile.mk sw/source/ui/fmtui/tmpdlg.cxx sw/source/ui/frmdlg/colmgr.cxx sw/source/ui/frmdlg/column.cxx sw/source/ui/frmdlg/cption.cxx sw/source/ui/frmdlg/frmdlg.cxx sw/source/ui/frmdlg/frmmgr.cxx sw/source/ui/frmdlg/frmpage.cxx sw/source/ui/frmdlg/makefile.mk sw/source/ui/frmdlg/wrap.cxx sw/source/ui/globdoc/makefile.mk sw/source/ui/inc/bmpwin.hxx sw/source/ui/inc/colmgr.hxx sw/source/ui/inc/column.hxx sw/source/ui/inc/envimg.hxx sw/source/ui/inc/envlop.hxx sw/source/ui/inc/frmpage.hxx sw/source/ui/inc/inputwin.hxx sw/source/ui/inc/javaedit.hxx sw/source/ui/inc/num.hxx sw/source/ui/inc/optpage.hxx sw/source/ui/inc/regionsw.hxx sw/source/ui/inc/split.hxx sw/source/ui/inc/swlbox.hxx sw/source/ui/inc/swmn_tmpl.hrc sw/source/ui/inc/swuiidxmrk.hxx sw/source/ui/inc/tabsh.hxx sw/source/ui/inc/toxmgr.hxx sw/source/ui/inc/uiitems.hxx sw/source/ui/inc/view.hxx sw/source/ui/inc/workctrl.hxx sw/source/ui/inc/wrap.hxx sw/source/ui/inc/wrtsh.hxx sw/source/ui/index/cnttab.cxx sw/source/ui/index/makefile.mk sw/source/ui/index/toxmgr.cxx sw/source/ui/lingu/hhcwrp.cxx sw/source/ui/lingu/makefile.mk sw/source/ui/lingu/olmenu.cxx sw/source/ui/misc/bookmark.cxx sw/source/ui/misc/docfnote.cxx sw/source/ui/misc/glosbib.cxx sw/source/ui/misc/glosdoc.cxx sw/source/ui/misc/glshell.cxx sw/source/ui/misc/insfnote.cxx sw/source/ui/misc/linenum.cxx sw/source/ui/misc/makefile.mk sw/source/ui/misc/num.cxx sw/source/ui/misc/numberingtypelistbox.cxx sw/source/ui/misc/outline.cxx sw/source/ui/misc/pgfnote.cxx sw/source/ui/misc/pggrid.cxx sw/source/ui/misc/redlndlg.cxx sw/source/ui/misc/srtdlg.cxx sw/source/ui/misc/swmodalredlineacceptdlg.cxx sw/source/ui/ribbar/conarc.cxx sw/source/ui/ribbar/drawbase.cxx sw/source/ui/ribbar/inputwin.cxx sw/source/ui/ribbar/inputwin.src sw/source/ui/ribbar/makefile.mk sw/source/ui/ribbar/tbxanchr.cxx sw/source/ui/ribbar/workctrl.cxx sw/source/ui/ribbar/workctrl.src sw/source/ui/shells/annotsh.cxx sw/source/ui/shells/basesh.cxx sw/source/ui/shells/beziersh.cxx sw/source/ui/shells/drawdlg.cxx sw/source/ui/shells/drwbassh.cxx sw/source/ui/shells/drwtxtex.cxx sw/source/ui/shells/drwtxtsh.cxx sw/source/ui/shells/frmsh.cxx sw/source/ui/shells/grfsh.cxx sw/source/ui/shells/grfshex.cxx sw/source/ui/shells/makefile.mk sw/source/ui/shells/tabsh.cxx sw/source/ui/shells/textfld.cxx sw/source/ui/shells/textglos.cxx sw/source/ui/shells/textsh.cxx sw/source/ui/shells/textsh1.cxx sw/source/ui/shells/txtattr.cxx sw/source/ui/shells/txtcrsr.cxx sw/source/ui/shells/txtnum.cxx sw/source/ui/table/convert.cxx sw/source/ui/table/instable.cxx sw/source/ui/table/makefile.mk sw/source/ui/table/swtablerep.cxx sw/source/ui/table/tabledlg.cxx sw/source/ui/table/tablemgr.cxx sw/source/ui/table/tablepg.hxx sw/source/ui/table/tautofmt.cxx sw/source/ui/uiview/formatclipboard.cxx sw/source/ui/uiview/makefile.mk sw/source/ui/uiview/pview.cxx sw/source/ui/uiview/pview.src sw/source/ui/uiview/scroll.cxx sw/source/ui/uiview/srcview.cxx sw/source/ui/uiview/swcli.cxx sw/source/ui/uiview/uivwimp.cxx sw/source/ui/uiview/view.cxx sw/source/ui/uiview/view1.cxx sw/source/ui/uiview/view2.cxx sw/source/ui/uiview/viewcoll.cxx sw/source/ui/uiview/viewdlg2.cxx sw/source/ui/uiview/viewling.cxx sw/source/ui/uiview/viewmdi.cxx sw/source/ui/uiview/viewport.cxx sw/source/ui/uiview/viewprt.cxx sw/source/ui/uiview/viewsrch.cxx sw/source/ui/uiview/viewtab.cxx sw/source/ui/uno/SwXDocumentSettings.cxx sw/source/ui/uno/SwXPrintPreviewSettings.cxx sw/source/ui/uno/SwXPrintPreviewSettings.hxx sw/source/ui/uno/unoatxt.cxx sw/source/ui/uno/unomod.cxx sw/source/ui/uno/unotxdoc.cxx sw/source/ui/uno/unotxvw.cxx sw/source/ui/utlui/attrdesc.cxx sw/source/ui/utlui/content.cxx sw/source/ui/utlui/glbltree.cxx sw/source/ui/utlui/initui.cxx sw/source/ui/utlui/makefile.mk sw/source/ui/utlui/navipi.cxx sw/source/ui/utlui/navipi.src sw/source/ui/utlui/numfmtlb.cxx sw/source/ui/utlui/prcntfld.cxx sw/source/ui/utlui/uiitems.cxx sw/source/ui/utlui/uitool.cxx sw/source/ui/utlui/unotools.cxx sw/source/ui/utlui/viewlayoutctrl.cxx sw/source/ui/utlui/zoomctrl.cxx sw/source/ui/vba/makefile.mk sw/source/ui/vba/service.cxx sw/source/ui/web/makefile.mk sw/source/ui/wrtsh/makefile.mk sw/source/ui/wrtsh/wrtsh1.cxx sw/source/ui/wrtsh/wrtsh2.cxx sw/source/ui/wrtsh/wrtsh4.cxx sw/source/ui/wrtsh/wrtundo.cxx sw/util/hidother.src sw/util/makefile.mk sw/util/msword.map
2011-03-14 16:51:14 +00:00
sal_uInt32 nTopOrd = 0;
(*pObjs)[0]->GetDrawObj()->GetOrdNum(); //Aktualisieren erzwingen!
for ( sal_uInt16 i = 0; i < pObjs->Count(); ++i )
2000-09-18 23:08:29 +00:00
{
const SdrObject* pObj = (*pObjs)[i]->GetDrawObj();
if ( bFlysOnly && !pObj->ISA(SwVirtFlyDrawObj) )
2000-09-18 23:08:29 +00:00
continue;
sal_uInt32 nTmp = pObj->GetOrdNumDirect();
2000-09-18 23:08:29 +00:00
if ( nTmp >= nTopOrd )
{
nTopOrd = nTmp;
pCurrent = pObj;
}
}
}
}
return pCurrent;
}
/*************************************************************************/
2000-09-18 23:08:29 +00:00
const SdrObject *SwOrderIter::Bottom()
{
pCurrent = 0;
if ( pPage->GetSortedObjs() )
{
sal_uInt32 nBotOrd = USHRT_MAX;
const SwSortedObjs *pObjs = pPage->GetSortedObjs();
2000-09-18 23:08:29 +00:00
if ( pObjs->Count() )
{
(*pObjs)[0]->GetDrawObj()->GetOrdNum(); //Aktualisieren erzwingen!
for ( sal_uInt16 i = 0; i < pObjs->Count(); ++i )
2000-09-18 23:08:29 +00:00
{
const SdrObject* pObj = (*pObjs)[i]->GetDrawObj();
if ( bFlysOnly && !pObj->ISA(SwVirtFlyDrawObj) )
2000-09-18 23:08:29 +00:00
continue;
sal_uInt32 nTmp = pObj->GetOrdNumDirect();
2000-09-18 23:08:29 +00:00
if ( nTmp < nBotOrd )
{
nBotOrd = nTmp;
pCurrent = pObj;
}
}
}
}
return pCurrent;
}
/*************************************************************************/
2000-09-18 23:08:29 +00:00
const SdrObject *SwOrderIter::Next()
{
const sal_uInt32 nCurOrd = pCurrent ? pCurrent->GetOrdNumDirect() : 0;
2000-09-18 23:08:29 +00:00
pCurrent = 0;
if ( pPage->GetSortedObjs() )
{
sal_uInt32 nOrd = USHRT_MAX;
const SwSortedObjs *pObjs = pPage->GetSortedObjs();
2000-09-18 23:08:29 +00:00
if ( pObjs->Count() )
{
(*pObjs)[0]->GetDrawObj()->GetOrdNum(); //Aktualisieren erzwingen!
for ( sal_uInt16 i = 0; i < pObjs->Count(); ++i )
2000-09-18 23:08:29 +00:00
{
const SdrObject* pObj = (*pObjs)[i]->GetDrawObj();
if ( bFlysOnly && !pObj->ISA(SwVirtFlyDrawObj) )
2000-09-18 23:08:29 +00:00
continue;
sal_uInt32 nTmp = pObj->GetOrdNumDirect();
2000-09-18 23:08:29 +00:00
if ( nTmp > nCurOrd && nTmp < nOrd )
{
nOrd = nTmp;
pCurrent = pObj;
}
}
}
}
return pCurrent;
}
/*************************************************************************/
2000-09-18 23:08:29 +00:00
const SdrObject *SwOrderIter::Prev()
{
const sal_uInt32 nCurOrd = pCurrent ? pCurrent->GetOrdNumDirect() : 0;
2000-09-18 23:08:29 +00:00
pCurrent = 0;
if ( pPage->GetSortedObjs() )
{
const SwSortedObjs *pObjs = pPage->GetSortedObjs();
2000-09-18 23:08:29 +00:00
if ( pObjs->Count() )
{
Merge commit 'ooo/DEV300_m101' into integration/dev300_m101 Conflicts: starmath/inc/applicat.hxx starmath/inc/dialog.hxx starmath/inc/document.hxx starmath/inc/edit.hxx starmath/inc/format.hxx starmath/inc/node.hxx starmath/inc/parse.hxx starmath/inc/rect.hxx starmath/inc/smdll.hxx starmath/inc/smmod.hxx starmath/inc/starmath.hrc starmath/inc/symbol.hxx starmath/inc/toolbox.hxx starmath/inc/utility.hxx starmath/inc/view.hxx starmath/prj/build.lst starmath/qa/cppunit/version.map starmath/sdi/smslots.sdi starmath/source/accessibility.cxx starmath/source/cfgitem.cxx starmath/source/cfgitem.hxx starmath/source/config.cxx starmath/source/dialog.cxx starmath/source/document.cxx starmath/source/edit.cxx starmath/source/format.cxx starmath/source/makefile.mk starmath/source/math_pch.cxx starmath/source/mathmlexport.cxx starmath/source/mathmlimport.cxx starmath/source/mathtype.cxx starmath/source/node.cxx starmath/source/parse.cxx starmath/source/rect.cxx starmath/source/register.cxx starmath/source/smdetect.cxx starmath/source/smdll.cxx starmath/source/smmod.cxx starmath/source/smres.src starmath/source/symbol.cxx starmath/source/toolbox.cxx starmath/source/unomodel.cxx starmath/source/utility.cxx starmath/source/view.cxx sw/JunitTest_sw_unoapi.mk sw/Library_swd.mk sw/Makefile sw/inc/IDocumentFieldsAccess.hxx sw/inc/IDocumentSettingAccess.hxx sw/inc/IDocumentUndoRedo.hxx sw/inc/IShellCursorSupplier.hxx sw/inc/SwUndoField.hxx sw/inc/acmplwrd.hxx sw/inc/authfld.hxx sw/inc/bparr.hxx sw/inc/calbck.hxx sw/inc/calc.hxx sw/inc/ccoll.hxx sw/inc/cellatr.hxx sw/inc/cellfml.hxx sw/inc/chpfld.hxx sw/inc/cmdid.h sw/inc/crsrsh.hxx sw/inc/crstate.hxx sw/inc/dbfld.hxx sw/inc/dbmgr.hxx sw/inc/dcontact.hxx sw/inc/ddefld.hxx sw/inc/doc.hxx sw/inc/docary.hxx sw/inc/docsh.hxx sw/inc/docstat.hxx sw/inc/docstyle.hxx sw/inc/docufld.hxx sw/inc/editsh.hxx sw/inc/errhdl.hxx sw/inc/expfld.hxx sw/inc/fchrfmt.hxx sw/inc/fesh.hxx sw/inc/fldbas.hxx sw/inc/flddat.hxx sw/inc/flddropdown.hxx sw/inc/flypos.hxx sw/inc/fmtanchr.hxx sw/inc/fmtautofmt.hxx sw/inc/fmtclds.hxx sw/inc/fmtcnct.hxx sw/inc/fmtcol.hxx sw/inc/fmtfsize.hxx sw/inc/fmtftn.hxx sw/inc/fmtftntx.hxx sw/inc/fmthdft.hxx sw/inc/fmtinfmt.hxx sw/inc/fmtline.hxx sw/inc/fmtornt.hxx sw/inc/fmtpdsc.hxx sw/inc/fmtruby.hxx sw/inc/fmtsrnd.hxx sw/inc/fmturl.hxx sw/inc/fmtwrapinfluenceonobjpos.hxx sw/inc/format.hxx sw/inc/frmatr.hxx sw/inc/frmfmt.hxx sw/inc/grfatr.hxx sw/inc/helpid.h sw/inc/hintids.hxx sw/inc/hints.hxx sw/inc/htmltbl.hxx sw/inc/inetfld.hxx sw/inc/io.hxx sw/inc/iodetect.hxx sw/inc/itabenum.hxx sw/inc/ndarr.hxx sw/inc/ndgrf.hxx sw/inc/ndindex.hxx sw/inc/ndnotxt.hxx sw/inc/ndole.hxx sw/inc/ndtxt.hxx sw/inc/ndtyp.hxx sw/inc/node.hxx sw/inc/numrule.hxx sw/inc/pagedesc.hxx sw/inc/pagepreviewlayout.hxx sw/inc/pam.hxx sw/inc/paratr.hxx sw/inc/poolfmt.awk sw/inc/poolfmt.hxx sw/inc/printdata.hxx sw/inc/reffld.hxx sw/inc/shellio.hxx sw/inc/shellres.hxx sw/inc/swabstdlg.hxx sw/inc/swatrset.hxx sw/inc/swerror.h sw/inc/swprtopt.hxx sw/inc/swtable.hxx sw/inc/swtypes.hxx sw/inc/tblafmt.hxx sw/inc/tgrditem.hxx sw/inc/tox.hxx sw/inc/undobj.hxx sw/inc/unocoll.hxx sw/inc/unoframe.hxx sw/inc/unoprnms.hxx sw/inc/usrfld.hxx sw/inc/viewopt.hxx sw/inc/viewsh.hxx sw/inc/viscrs.hxx sw/prj/build.lst sw/qa/complex/accessibility/makefile.mk sw/qa/core/Test-BigPtrArray.cxx sw/qa/core/makefile.mk sw/sdi/makefile.mk sw/source/core/access/makefile.mk sw/source/core/access/textmarkuphelper.cxx sw/source/core/attr/calbck.cxx sw/source/core/attr/cellatr.cxx sw/source/core/attr/fmtwrapinfluenceonobjpos.cxx sw/source/core/attr/format.cxx sw/source/core/attr/hints.cxx sw/source/core/bastyp/calc.cxx sw/source/core/bastyp/init.cxx sw/source/core/bastyp/makefile.mk sw/source/core/bastyp/swcache.cxx sw/source/core/crsr/bookmrk.cxx sw/source/core/crsr/callnk.cxx sw/source/core/crsr/crsrsh.cxx sw/source/core/crsr/crstrvl.cxx sw/source/core/crsr/findattr.cxx sw/source/core/crsr/findcoll.cxx sw/source/core/crsr/makefile.mk sw/source/core/crsr/pam.cxx sw/source/core/crsr/swcrsr.cxx sw/source/core/crsr/trvltbl.cxx sw/source/core/crsr/unocrsr.cxx sw/source/core/crsr/viscrs.cxx sw/source/core/doc/acmplwrd.cxx sw/source/core/doc/doc.cxx sw/source/core/doc/docbm.cxx sw/source/core/doc/doccomp.cxx sw/source/core/doc/docdesc.cxx sw/source/core/doc/docdraw.cxx sw/source/core/doc/docedt.cxx sw/source/core/doc/docfld.cxx sw/source/core/doc/docfly.cxx sw/source/core/doc/docfmt.cxx sw/source/core/doc/docftn.cxx sw/source/core/doc/docglbl.cxx sw/source/core/doc/docglos.cxx sw/source/core/doc/doclay.cxx sw/source/core/doc/docnew.cxx sw/source/core/doc/docnum.cxx sw/source/core/doc/docredln.cxx sw/source/core/doc/docruby.cxx sw/source/core/doc/docsort.cxx sw/source/core/doc/docstat.cxx sw/source/core/doc/doctxm.cxx sw/source/core/doc/fmtcol.cxx sw/source/core/doc/gctable.cxx sw/source/core/doc/htmltbl.cxx sw/source/core/doc/makefile.mk sw/source/core/doc/number.cxx sw/source/core/doc/poolfmt.cxx sw/source/core/doc/tblafmt.cxx sw/source/core/doc/tblcpy.cxx sw/source/core/doc/tblrwcl.cxx sw/source/core/docnode/makefile.mk sw/source/core/docnode/ndcopy.cxx sw/source/core/docnode/ndnum.cxx sw/source/core/docnode/ndsect.cxx sw/source/core/docnode/ndtbl.cxx sw/source/core/docnode/ndtbl1.cxx sw/source/core/docnode/node.cxx sw/source/core/docnode/node2lay.cxx sw/source/core/docnode/nodes.cxx sw/source/core/docnode/section.cxx sw/source/core/docnode/swbaslnk.cxx sw/source/core/draw/dcontact.cxx sw/source/core/draw/dflyobj.cxx sw/source/core/draw/drawdoc.cxx sw/source/core/draw/dview.cxx sw/source/core/draw/makefile.mk sw/source/core/edit/autofmt.cxx sw/source/core/edit/edattr.cxx sw/source/core/edit/eddel.cxx sw/source/core/edit/edfcol.cxx sw/source/core/edit/edfld.cxx sw/source/core/edit/edfldexp.cxx sw/source/core/edit/edfmt.cxx sw/source/core/edit/edglss.cxx sw/source/core/edit/editsh.cxx sw/source/core/edit/edlingu.cxx sw/source/core/edit/ednumber.cxx sw/source/core/edit/edsect.cxx sw/source/core/edit/edtab.cxx sw/source/core/edit/edtox.cxx sw/source/core/edit/edundo.cxx sw/source/core/edit/makefile.mk sw/source/core/except/dbgloop.cxx sw/source/core/except/errhdl.cxx sw/source/core/fields/authfld.cxx sw/source/core/fields/cellfml.cxx sw/source/core/fields/chpfld.cxx sw/source/core/fields/dbfld.cxx sw/source/core/fields/ddefld.cxx sw/source/core/fields/ddetbl.cxx sw/source/core/fields/docufld.cxx sw/source/core/fields/expfld.cxx sw/source/core/fields/fldbas.cxx sw/source/core/fields/flddat.cxx sw/source/core/fields/flddropdown.cxx sw/source/core/fields/macrofld.cxx sw/source/core/fields/makefile.mk sw/source/core/fields/reffld.cxx sw/source/core/fields/scrptfld.cxx sw/source/core/fields/tblcalc.cxx sw/source/core/fields/usrfld.cxx sw/source/core/frmedt/fecopy.cxx sw/source/core/frmedt/fedesc.cxx sw/source/core/frmedt/fefly1.cxx sw/source/core/frmedt/feshview.cxx sw/source/core/frmedt/fetab.cxx sw/source/core/frmedt/fews.cxx sw/source/core/frmedt/makefile.mk sw/source/core/frmedt/tblsel.cxx sw/source/core/graphic/grfatr.cxx sw/source/core/inc/SwUndoFmt.hxx sw/source/core/inc/SwUndoTOXChange.hxx sw/source/core/inc/anchoredobjectposition.hxx sw/source/core/inc/dbgloop.hxx sw/source/core/inc/drawfont.hxx sw/source/core/inc/flowfrm.hxx sw/source/core/inc/frame.hxx sw/source/core/inc/frmtool.hxx sw/source/core/inc/layact.hxx sw/source/core/inc/layfrm.hxx sw/source/core/inc/notxtfrm.hxx sw/source/core/inc/rolbck.hxx sw/source/core/inc/rootfrm.hxx sw/source/core/inc/scriptinfo.hxx sw/source/core/inc/swblocks.hxx sw/source/core/inc/swcache.hxx sw/source/core/inc/tabfrm.hxx sw/source/core/inc/txmsrt.hxx sw/source/core/inc/undoflystrattr.hxx sw/source/core/inc/viewimp.hxx sw/source/core/layout/atrfrm.cxx sw/source/core/layout/calcmove.cxx sw/source/core/layout/dbg_lay.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/flyincnt.cxx sw/source/core/layout/flylay.cxx sw/source/core/layout/frmtool.cxx sw/source/core/layout/ftnfrm.cxx sw/source/core/layout/layact.cxx sw/source/core/layout/laycache.cxx sw/source/core/layout/makefile.mk sw/source/core/layout/objectformatter.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/tabfrm.cxx sw/source/core/layout/trvlfrm.cxx sw/source/core/layout/unusedf.cxx sw/source/core/layout/wsfrm.cxx sw/source/core/makefile.mk sw/source/core/objectpositioning/anchoredobjectposition.cxx sw/source/core/objectpositioning/ascharanchoredobjectposition.cxx sw/source/core/objectpositioning/makefile.mk sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx sw/source/core/objectpositioning/tolayoutanchoredobjectposition.cxx sw/source/core/ole/ndole.cxx sw/source/core/para/makefile.mk sw/source/core/para/paratr.cxx sw/source/core/sw3io/makefile.mk sw/source/core/sw3io/sw3convert.cxx sw/source/core/swg/SwXMLTextBlocks.cxx sw/source/core/swg/makefile.mk sw/source/core/swg/swblocks.cxx sw/source/core/table/swnewtable.cxx sw/source/core/table/swtable.cxx sw/source/core/text/EnhancedPDFExportHelper.cxx sw/source/core/text/atrstck.cxx sw/source/core/text/frmcrsr.cxx sw/source/core/text/frmform.cxx sw/source/core/text/itrcrsr.cxx sw/source/core/text/itrform2.cxx sw/source/core/text/makefile.mk sw/source/core/text/porlay.cxx sw/source/core/text/pormulti.cxx sw/source/core/text/txtfld.cxx sw/source/core/text/txtfrm.cxx sw/source/core/text/txtio.cxx sw/source/core/tox/makefile.mk sw/source/core/tox/txmsrt.cxx sw/source/core/txtnode/fmtatr2.cxx sw/source/core/txtnode/fntcache.cxx sw/source/core/txtnode/fntcap.cxx sw/source/core/txtnode/makefile.mk sw/source/core/txtnode/ndhints.cxx sw/source/core/txtnode/ndtxt.cxx sw/source/core/txtnode/swfont.cxx sw/source/core/txtnode/thints.cxx sw/source/core/txtnode/txtatr2.cxx sw/source/core/txtnode/txtedt.cxx sw/source/core/undo/SwUndoField.cxx sw/source/core/undo/SwUndoPageDesc.cxx sw/source/core/undo/SwUndoTOXChange.cxx sw/source/core/undo/docundo.cxx sw/source/core/undo/makefile.mk sw/source/core/undo/rolbck.cxx sw/source/core/undo/unbkmk.cxx sw/source/core/undo/undel.cxx sw/source/core/undo/undobj.cxx sw/source/core/undo/undobj1.cxx sw/source/core/undo/unfmco.cxx sw/source/core/undo/unins.cxx sw/source/core/undo/unnum.cxx sw/source/core/undo/unoutl.cxx sw/source/core/undo/unredln.cxx sw/source/core/undo/unsect.cxx sw/source/core/undo/unsort.cxx sw/source/core/undo/unspnd.cxx sw/source/core/undo/untbl.cxx sw/source/core/unocore/makefile.mk sw/source/core/unocore/swunohelper.cxx sw/source/core/unocore/unobkm.cxx sw/source/core/unocore/unocoll.cxx sw/source/core/unocore/unocrsrhelper.cxx sw/source/core/unocore/unodraw.cxx sw/source/core/unocore/unofield.cxx sw/source/core/unocore/unoframe.cxx sw/source/core/unocore/unomap.cxx sw/source/core/unocore/unoprnms.cxx sw/source/core/unocore/unoredlines.cxx sw/source/core/unocore/unosett.cxx sw/source/core/unocore/unosrch.cxx sw/source/core/unocore/unostyle.cxx sw/source/core/unocore/unotbl.cxx sw/source/core/view/vdraw.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/ascii/ascatr.cxx sw/source/filter/ascii/makefile.mk sw/source/filter/ascii/wrtasc.cxx sw/source/filter/basflt/fltini.cxx sw/source/filter/basflt/iodetect.cxx sw/source/filter/basflt/makefile.mk sw/source/filter/html/SwAppletImpl.cxx sw/source/filter/html/css1atr.cxx sw/source/filter/html/htmlatr.cxx sw/source/filter/html/htmlbas.cxx sw/source/filter/html/htmlcss1.cxx sw/source/filter/html/htmlfly.cxx sw/source/filter/html/htmlftn.cxx sw/source/filter/html/htmlgrin.cxx sw/source/filter/html/htmlnum.cxx sw/source/filter/html/htmlplug.cxx sw/source/filter/html/htmltab.cxx sw/source/filter/html/makefile.mk sw/source/filter/html/parcss1.cxx sw/source/filter/html/svxcss1.cxx sw/source/filter/html/swhtml.cxx sw/source/filter/inc/msfilter.hxx sw/source/filter/inc/wrtswtbl.hxx sw/source/filter/rtf/makefile.mk sw/source/filter/rtf/rtffly.cxx sw/source/filter/rtf/rtfnum.cxx sw/source/filter/rtf/rtftbl.cxx sw/source/filter/rtf/swparrtf.cxx sw/source/filter/rtf/swparrtf.hxx sw/source/filter/writer/makefile.mk sw/source/filter/writer/writer.cxx sw/source/filter/writer/wrt_fn.cxx sw/source/filter/writer/wrtswtbl.cxx sw/source/filter/ww1/fltshell.cxx sw/source/filter/ww1/makefile.mk sw/source/filter/ww1/w1class.cxx sw/source/filter/ww1/w1class.hxx sw/source/filter/ww1/w1filter.cxx sw/source/filter/ww1/w1par.cxx sw/source/filter/ww1/w1sprm.cxx sw/source/filter/ww1/w1struct.hxx sw/source/filter/ww8/README-rtf.txt sw/source/filter/ww8/attributeoutputbase.hxx sw/source/filter/ww8/docxattributeoutput.cxx sw/source/filter/ww8/docxattributeoutput.hxx sw/source/filter/ww8/docxexport.cxx sw/source/filter/ww8/docxexport.hxx sw/source/filter/ww8/docxexportfilter.cxx sw/source/filter/ww8/dump/dump8.cxx sw/source/filter/ww8/dump/dump8a.cxx sw/source/filter/ww8/dump/msvbasic.cxx sw/source/filter/ww8/dump/msvbasic.hxx sw/source/filter/ww8/dump/ww8darr.cxx sw/source/filter/ww8/dump/ww8darr.hxx sw/source/filter/ww8/dump/ww8dout.cxx sw/source/filter/ww8/dump/ww8dout.hxx sw/source/filter/ww8/dump/ww8scan.cxx sw/source/filter/ww8/dump/ww8scan.hxx sw/source/filter/ww8/dump/ww8struc.hxx sw/source/filter/ww8/makefile.mk sw/source/filter/ww8/rtfattributeoutput.cxx sw/source/filter/ww8/rtfattributeoutput.hxx sw/source/filter/ww8/rtfexport.cxx sw/source/filter/ww8/rtfexport.hxx sw/source/filter/ww8/rtfexportfilter.cxx sw/source/filter/ww8/rtfexportfilter.hxx sw/source/filter/ww8/rtfimportfilter.cxx sw/source/filter/ww8/rtfimportfilter.hxx sw/source/filter/ww8/rtfsdrexport.cxx sw/source/filter/ww8/rtfsdrexport.hxx sw/source/filter/ww8/writerhelper.cxx sw/source/filter/ww8/writerwordglue.cxx sw/source/filter/ww8/wrtw8esh.cxx sw/source/filter/ww8/wrtw8nds.cxx sw/source/filter/ww8/wrtw8num.cxx sw/source/filter/ww8/wrtw8sty.cxx sw/source/filter/ww8/wrtww8.cxx sw/source/filter/ww8/wrtww8.hxx sw/source/filter/ww8/wrtww8gr.cxx sw/source/filter/ww8/ww8atr.cxx sw/source/filter/ww8/ww8attributeoutput.hxx sw/source/filter/ww8/ww8graf.cxx sw/source/filter/ww8/ww8graf.hxx sw/source/filter/ww8/ww8graf2.cxx sw/source/filter/ww8/ww8par.cxx sw/source/filter/ww8/ww8par.hxx sw/source/filter/ww8/ww8par2.cxx sw/source/filter/ww8/ww8par3.cxx sw/source/filter/ww8/ww8par5.cxx sw/source/filter/ww8/ww8par6.cxx sw/source/filter/ww8/ww8scan.cxx sw/source/filter/ww8/ww8scan.hxx sw/source/filter/ww8/ww8struc.hxx sw/source/filter/xml/makefile.mk sw/source/filter/xml/xmlimpit.cxx sw/source/filter/xml/xmltble.cxx sw/source/filter/xml/xmltbli.cxx sw/source/ui/app/appenv.cxx sw/source/ui/app/apphdl.cxx sw/source/ui/app/applab.cxx sw/source/ui/app/appopt.cxx sw/source/ui/app/docsh.cxx sw/source/ui/app/docsh2.cxx sw/source/ui/app/docshini.cxx sw/source/ui/app/docst.cxx sw/source/ui/app/docstyle.cxx sw/source/ui/app/makefile.mk sw/source/ui/app/mn.src sw/source/ui/app/swmodul1.cxx sw/source/ui/cctrl/makefile.mk sw/source/ui/cctrl/swlbox.cxx sw/source/ui/chrdlg/break.cxx sw/source/ui/chrdlg/ccoll.cxx sw/source/ui/chrdlg/chardlg.cxx sw/source/ui/chrdlg/drpcps.cxx sw/source/ui/chrdlg/makefile.mk sw/source/ui/chrdlg/numpara.cxx sw/source/ui/chrdlg/pardlg.cxx sw/source/ui/chrdlg/swuiccoll.cxx sw/source/ui/config/barcfg.cxx sw/source/ui/config/caption.cxx sw/source/ui/config/cfgitems.cxx sw/source/ui/config/fontcfg.cxx sw/source/ui/config/mailconfigpage.cxx sw/source/ui/config/makefile.mk sw/source/ui/config/modcfg.cxx sw/source/ui/config/optcomp.cxx sw/source/ui/config/optload.cxx sw/source/ui/config/optpage.cxx sw/source/ui/config/prtopt.cxx sw/source/ui/config/uinums.cxx sw/source/ui/config/usrpref.cxx sw/source/ui/config/viewopt.cxx sw/source/ui/dbui/dbinsdlg.cxx sw/source/ui/dbui/dbmgr.cxx sw/source/ui/dbui/dbtree.cxx sw/source/ui/dbui/makefile.mk sw/source/ui/dbui/mmaddressblockpage.cxx sw/source/ui/dbui/mmdocselectpage.cxx sw/source/ui/dbui/mmoutputpage.cxx sw/source/ui/dbui/swdbtoolsclient.cxx sw/source/ui/dialog/abstract.cxx sw/source/ui/dialog/ascfldlg.cxx sw/source/ui/dialog/macassgn.cxx sw/source/ui/dialog/makefile.mk sw/source/ui/dialog/regionsw.cxx sw/source/ui/dialog/swdlgfact.cxx sw/source/ui/dialog/swdlgfact.hxx sw/source/ui/dialog/uiregionsw.cxx sw/source/ui/dochdl/gloshdl.cxx sw/source/ui/dochdl/makefile.mk sw/source/ui/dochdl/swdtflvr.cxx sw/source/ui/docvw/PostItMgr.cxx sw/source/ui/docvw/SidebarWin.cxx sw/source/ui/docvw/edtdd.cxx sw/source/ui/docvw/edtwin.cxx sw/source/ui/docvw/edtwin2.cxx sw/source/ui/docvw/edtwin3.cxx sw/source/ui/docvw/makefile.mk sw/source/ui/docvw/romenu.cxx sw/source/ui/docvw/romenu.hxx sw/source/ui/docvw/srcedtw.cxx sw/source/ui/envelp/envfmt.cxx sw/source/ui/envelp/envimg.cxx sw/source/ui/envelp/envlop1.cxx sw/source/ui/envelp/envprt.cxx sw/source/ui/envelp/label1.cxx sw/source/ui/envelp/labfmt.cxx sw/source/ui/envelp/labprt.cxx sw/source/ui/envelp/mailmrge.cxx sw/source/ui/envelp/makefile.mk sw/source/ui/fldui/flddb.cxx sw/source/ui/fldui/flddinf.cxx sw/source/ui/fldui/flddok.cxx sw/source/ui/fldui/fldedt.cxx sw/source/ui/fldui/fldfunc.cxx sw/source/ui/fldui/fldmgr.cxx sw/source/ui/fldui/fldpage.cxx sw/source/ui/fldui/fldref.cxx sw/source/ui/fldui/fldtdlg.cxx sw/source/ui/fldui/fldvar.cxx sw/source/ui/fldui/fldwrap.cxx sw/source/ui/fldui/inpdlg.cxx sw/source/ui/fldui/makefile.mk sw/source/ui/fmtui/makefile.mk sw/source/ui/fmtui/tmpdlg.cxx sw/source/ui/frmdlg/colmgr.cxx sw/source/ui/frmdlg/column.cxx sw/source/ui/frmdlg/cption.cxx sw/source/ui/frmdlg/frmdlg.cxx sw/source/ui/frmdlg/frmmgr.cxx sw/source/ui/frmdlg/frmpage.cxx sw/source/ui/frmdlg/makefile.mk sw/source/ui/frmdlg/wrap.cxx sw/source/ui/globdoc/makefile.mk sw/source/ui/inc/bmpwin.hxx sw/source/ui/inc/colmgr.hxx sw/source/ui/inc/column.hxx sw/source/ui/inc/envimg.hxx sw/source/ui/inc/envlop.hxx sw/source/ui/inc/frmpage.hxx sw/source/ui/inc/inputwin.hxx sw/source/ui/inc/javaedit.hxx sw/source/ui/inc/num.hxx sw/source/ui/inc/optpage.hxx sw/source/ui/inc/regionsw.hxx sw/source/ui/inc/split.hxx sw/source/ui/inc/swlbox.hxx sw/source/ui/inc/swmn_tmpl.hrc sw/source/ui/inc/swuiidxmrk.hxx sw/source/ui/inc/tabsh.hxx sw/source/ui/inc/toxmgr.hxx sw/source/ui/inc/uiitems.hxx sw/source/ui/inc/view.hxx sw/source/ui/inc/workctrl.hxx sw/source/ui/inc/wrap.hxx sw/source/ui/inc/wrtsh.hxx sw/source/ui/index/cnttab.cxx sw/source/ui/index/makefile.mk sw/source/ui/index/toxmgr.cxx sw/source/ui/lingu/hhcwrp.cxx sw/source/ui/lingu/makefile.mk sw/source/ui/lingu/olmenu.cxx sw/source/ui/misc/bookmark.cxx sw/source/ui/misc/docfnote.cxx sw/source/ui/misc/glosbib.cxx sw/source/ui/misc/glosdoc.cxx sw/source/ui/misc/glshell.cxx sw/source/ui/misc/insfnote.cxx sw/source/ui/misc/linenum.cxx sw/source/ui/misc/makefile.mk sw/source/ui/misc/num.cxx sw/source/ui/misc/numberingtypelistbox.cxx sw/source/ui/misc/outline.cxx sw/source/ui/misc/pgfnote.cxx sw/source/ui/misc/pggrid.cxx sw/source/ui/misc/redlndlg.cxx sw/source/ui/misc/srtdlg.cxx sw/source/ui/misc/swmodalredlineacceptdlg.cxx sw/source/ui/ribbar/conarc.cxx sw/source/ui/ribbar/drawbase.cxx sw/source/ui/ribbar/inputwin.cxx sw/source/ui/ribbar/inputwin.src sw/source/ui/ribbar/makefile.mk sw/source/ui/ribbar/tbxanchr.cxx sw/source/ui/ribbar/workctrl.cxx sw/source/ui/ribbar/workctrl.src sw/source/ui/shells/annotsh.cxx sw/source/ui/shells/basesh.cxx sw/source/ui/shells/beziersh.cxx sw/source/ui/shells/drawdlg.cxx sw/source/ui/shells/drwbassh.cxx sw/source/ui/shells/drwtxtex.cxx sw/source/ui/shells/drwtxtsh.cxx sw/source/ui/shells/frmsh.cxx sw/source/ui/shells/grfsh.cxx sw/source/ui/shells/grfshex.cxx sw/source/ui/shells/makefile.mk sw/source/ui/shells/tabsh.cxx sw/source/ui/shells/textfld.cxx sw/source/ui/shells/textglos.cxx sw/source/ui/shells/textsh.cxx sw/source/ui/shells/textsh1.cxx sw/source/ui/shells/txtattr.cxx sw/source/ui/shells/txtcrsr.cxx sw/source/ui/shells/txtnum.cxx sw/source/ui/table/convert.cxx sw/source/ui/table/instable.cxx sw/source/ui/table/makefile.mk sw/source/ui/table/swtablerep.cxx sw/source/ui/table/tabledlg.cxx sw/source/ui/table/tablemgr.cxx sw/source/ui/table/tablepg.hxx sw/source/ui/table/tautofmt.cxx sw/source/ui/uiview/formatclipboard.cxx sw/source/ui/uiview/makefile.mk sw/source/ui/uiview/pview.cxx sw/source/ui/uiview/pview.src sw/source/ui/uiview/scroll.cxx sw/source/ui/uiview/srcview.cxx sw/source/ui/uiview/swcli.cxx sw/source/ui/uiview/uivwimp.cxx sw/source/ui/uiview/view.cxx sw/source/ui/uiview/view1.cxx sw/source/ui/uiview/view2.cxx sw/source/ui/uiview/viewcoll.cxx sw/source/ui/uiview/viewdlg2.cxx sw/source/ui/uiview/viewling.cxx sw/source/ui/uiview/viewmdi.cxx sw/source/ui/uiview/viewport.cxx sw/source/ui/uiview/viewprt.cxx sw/source/ui/uiview/viewsrch.cxx sw/source/ui/uiview/viewtab.cxx sw/source/ui/uno/SwXDocumentSettings.cxx sw/source/ui/uno/SwXPrintPreviewSettings.cxx sw/source/ui/uno/SwXPrintPreviewSettings.hxx sw/source/ui/uno/unoatxt.cxx sw/source/ui/uno/unomod.cxx sw/source/ui/uno/unotxdoc.cxx sw/source/ui/uno/unotxvw.cxx sw/source/ui/utlui/attrdesc.cxx sw/source/ui/utlui/content.cxx sw/source/ui/utlui/glbltree.cxx sw/source/ui/utlui/initui.cxx sw/source/ui/utlui/makefile.mk sw/source/ui/utlui/navipi.cxx sw/source/ui/utlui/navipi.src sw/source/ui/utlui/numfmtlb.cxx sw/source/ui/utlui/prcntfld.cxx sw/source/ui/utlui/uiitems.cxx sw/source/ui/utlui/uitool.cxx sw/source/ui/utlui/unotools.cxx sw/source/ui/utlui/viewlayoutctrl.cxx sw/source/ui/utlui/zoomctrl.cxx sw/source/ui/vba/makefile.mk sw/source/ui/vba/service.cxx sw/source/ui/web/makefile.mk sw/source/ui/wrtsh/makefile.mk sw/source/ui/wrtsh/wrtsh1.cxx sw/source/ui/wrtsh/wrtsh2.cxx sw/source/ui/wrtsh/wrtsh4.cxx sw/source/ui/wrtsh/wrtundo.cxx sw/util/hidother.src sw/util/makefile.mk sw/util/msword.map
2011-03-14 16:51:14 +00:00
sal_uInt32 nOrd = 0;
(*pObjs)[0]->GetDrawObj()->GetOrdNum(); //Aktualisieren erzwingen!
for ( sal_uInt16 i = 0; i < pObjs->Count(); ++i )
2000-09-18 23:08:29 +00:00
{
const SdrObject* pObj = (*pObjs)[i]->GetDrawObj();
if ( bFlysOnly && !pObj->ISA(SwVirtFlyDrawObj) )
2000-09-18 23:08:29 +00:00
continue;
sal_uInt32 nTmp = pObj->GetOrdNumDirect();
2000-09-18 23:08:29 +00:00
if ( nTmp < nCurOrd && nTmp >= nOrd )
{
nOrd = nTmp;
pCurrent = pObj;
}
}
}
}
return pCurrent;
}
/*************************************************************************/
2000-09-18 23:08:29 +00:00
//Unterstruktur eines LayoutFrms fuer eine Aktion aufheben und wieder
//restaurieren.
//Neuer Algorithmus: Es ist unuetz jeden Nachbarn einzeln zu betrachten und
//die Pointer sauber zu setzen (Upper, Nachbarn, usw.)
//Es reicht vollkommen jeweils eine Einzelkette zu loesen, und mit dem
//Letzen der Einzelkette nachzuschauen ob noch eine weitere Kette
//angeheangt werden muss. Es brauchen nur die Pointer korrigiert werden,
//die zur Verkettung notwendig sind. So koennen Beipspielsweise die Pointer
//auf die Upper auf den alten Uppern stehenbleiben. Korrigiert werden die
//Pointer dann im RestoreCntnt. Zwischenzeitlich ist sowieso jeder Zugriff
//verboten.
//Unterwegs werden die Flys bei der Seite abgemeldet.
2011-04-18 12:37:38 -03:00
// #115759# - 'remove' also drawing object from page and
// at-fly anchored objects from page
void MA_FASTCALL lcl_RemoveObjsFromPage( SwFrm* _pFrm )
2000-09-18 23:08:29 +00:00
{
OSL_ENSURE( _pFrm->GetDrawObjs(), "Keine DrawObjs fuer lcl_RemoveFlysFromPage." );
SwSortedObjs &rObjs = *_pFrm->GetDrawObjs();
for ( sal_uInt16 i = 0; i < rObjs.Count(); ++i )
2000-09-18 23:08:29 +00:00
{
SwAnchoredObject* pObj = rObjs[i];
2011-04-18 12:37:38 -03:00
// #115759# - reset member, at which the anchored
// object orients its vertical position
pObj->ClearVertPosOrientFrm();
// #i43913#
pObj->ResetLayoutProcessBools();
2011-04-18 12:37:38 -03:00
// #115759# - remove also lower objects of as-character
// anchored Writer fly frames from page
if ( pObj->ISA(SwFlyFrm) )
2000-09-18 23:08:29 +00:00
{
SwFlyFrm* pFlyFrm = static_cast<SwFlyFrm*>(pObj);
2011-04-18 12:37:38 -03:00
// #115759# - remove also direct lowers of Writer
// fly frame from page
if ( pFlyFrm->GetDrawObjs() )
{
::lcl_RemoveObjsFromPage( pFlyFrm );
}
SwCntntFrm* pCnt = pFlyFrm->ContainsCntnt();
2000-09-18 23:08:29 +00:00
while ( pCnt )
{
if ( pCnt->GetDrawObjs() )
::lcl_RemoveObjsFromPage( pCnt );
2000-09-18 23:08:29 +00:00
pCnt = pCnt->GetNextCntntFrm();
}
if ( pFlyFrm->IsFlyFreeFrm() )
{
// #i28701# - use new method <GetPageFrm()>
pFlyFrm->GetPageFrm()->RemoveFlyFromPage( pFlyFrm );
}
}
2011-04-18 12:37:38 -03:00
// #115759# - remove also drawing objects from page
else if ( pObj->ISA(SwAnchoredDrawObject) )
{
if (pObj->GetFrmFmt().GetAnchor().GetAnchorId() != FLY_AS_CHAR)
{
pObj->GetPageFrm()->RemoveDrawObjFromPage(
*(static_cast<SwAnchoredDrawObject*>(pObj)) );
}
2000-09-18 23:08:29 +00:00
}
}
}
SwFrm *SaveCntnt( SwLayoutFrm *pLay, SwFrm *pStart )
{
if( pLay->IsSctFrm() && pLay->Lower() && pLay->Lower()->IsColumnFrm() )
lcl_RemoveFtns( (SwColumnFrm*)pLay->Lower(), sal_True, sal_True );
2000-09-18 23:08:29 +00:00
SwFrm *pSav;
if ( 0 == (pSav = pLay->ContainsAny()) )
return 0;
if( pSav->IsInFtn() && !pLay->IsInFtn() )
{
do
pSav = pSav->FindNext();
while( pSav && pSav->IsInFtn() );
if( !pSav || !pLay->IsAnLower( pSav ) )
return NULL;
}
// Tables should be saved as a whole, expection:
// The contents of a section or a cell inside a table should be saved
if ( pSav->IsInTab() && !( ( pLay->IsSctFrm() || pLay->IsCellFrm() ) && pLay->IsInTab() ) )
2000-09-18 23:08:29 +00:00
while ( !pSav->IsTabFrm() )
pSav = pSav->GetUpper();
if( pSav->IsInSct() )
{ // Jetzt wird der oberste Bereich gesucht, der innerhalb von pLay ist.
SwFrm* pSect = pLay->FindSctFrm();
SwFrm *pTmp = pSav;
do
{
pSav = pTmp;
pTmp = pSav->GetUpper() ? pSav->GetUpper()->FindSctFrm() : NULL;
} while ( pTmp != pSect );
}
SwFrm *pFloat = pSav;
if( !pStart )
pStart = pSav;
sal_Bool bGo = pStart == pSav;
2000-09-18 23:08:29 +00:00
do
{
if( bGo )
pFloat->GetUpper()->pLower = 0; //Die Teilkette ausklinken.
//Das Ende der Teilkette suchen, unterwegs die Flys abmelden.
do
{
if( bGo )
{
if ( pFloat->IsCntntFrm() )
{
if ( pFloat->GetDrawObjs() )
::lcl_RemoveObjsFromPage( (SwCntntFrm*)pFloat );
2000-09-18 23:08:29 +00:00
}
else if ( pFloat->IsTabFrm() || pFloat->IsSctFrm() )
{
SwCntntFrm *pCnt = ((SwLayoutFrm*)pFloat)->ContainsCntnt();
if( pCnt )
{
do
{ if ( pCnt->GetDrawObjs() )
::lcl_RemoveObjsFromPage( pCnt );
2000-09-18 23:08:29 +00:00
pCnt = pCnt->GetNextCntntFrm();
} while ( pCnt && ((SwLayoutFrm*)pFloat)->IsAnLower( pCnt ) );
}
}
else {
OSL_ENSURE( !pFloat, "Neuer Float-Frame?" );
}
2000-09-18 23:08:29 +00:00
}
if ( pFloat->GetNext() )
{
if( bGo )
pFloat->pUpper = NULL;
pFloat = pFloat->GetNext();
if( !bGo && pFloat == pStart )
{
bGo = sal_True;
2000-09-18 23:08:29 +00:00
pFloat->pPrev->pNext = NULL;
pFloat->pPrev = NULL;
}
}
else
break;
} while ( pFloat );
//Die naechste Teilkette suchen und die Ketten miteinander verbinden.
SwFrm *pTmp = pFloat->FindNext();
if( bGo )
pFloat->pUpper = NULL;
if( !pLay->IsInFtn() )
while( pTmp && pTmp->IsInFtn() )
pTmp = pTmp->FindNext();
if ( !pLay->IsAnLower( pTmp ) )
pTmp = 0;
if ( pTmp && bGo )
{
pFloat->pNext = pTmp; //Die beiden Ketten verbinden.
pFloat->pNext->pPrev = pFloat;
}
pFloat = pTmp;
bGo = bGo || ( pStart == pFloat );
} while ( pFloat );
return bGo ? pStart : NULL;
}
2011-04-18 12:37:38 -03:00
// #115759# - add also drawing objects to page and at-fly
// anchored objects to page
void MA_FASTCALL lcl_AddObjsToPage( SwFrm* _pFrm, SwPageFrm* _pPage )
2000-09-18 23:08:29 +00:00
{
OSL_ENSURE( _pFrm->GetDrawObjs(), "Keine DrawObjs fuer lcl_AddFlysToPage." );
SwSortedObjs &rObjs = *_pFrm->GetDrawObjs();
for ( sal_uInt16 i = 0; i < rObjs.Count(); ++i )
2000-09-18 23:08:29 +00:00
{
SwAnchoredObject* pObj = rObjs[i];
2011-04-18 12:37:38 -03:00
// #115759# - unlock position of anchored object
// in order to get the object's position calculated.
pObj->UnlockPosition();
2011-04-18 12:37:38 -03:00
// #115759# - add also lower objects of as-character
// anchored Writer fly frames from page
if ( pObj->ISA(SwFlyFrm) )
{
SwFlyFrm* pFlyFrm = static_cast<SwFlyFrm*>(pObj);
if ( pObj->ISA(SwFlyFreeFrm) )
{
_pPage->AppendFlyToPage( pFlyFrm );
}
pFlyFrm->_InvalidatePos();
pFlyFrm->_InvalidateSize();
pFlyFrm->InvalidatePage( _pPage );
2011-04-18 12:37:38 -03:00
// #115759# - add also at-fly anchored objects
// to page
if ( pFlyFrm->GetDrawObjs() )
{
::lcl_AddObjsToPage( pFlyFrm, _pPage );
}
SwCntntFrm *pCnt = pFlyFrm->ContainsCntnt();
2000-09-18 23:08:29 +00:00
while ( pCnt )
{
if ( pCnt->GetDrawObjs() )
::lcl_AddObjsToPage( pCnt, _pPage );
2000-09-18 23:08:29 +00:00
pCnt = pCnt->GetNextCntntFrm();
}
}
2011-04-18 12:37:38 -03:00
// #115759# - remove also drawing objects from page
else if ( pObj->ISA(SwAnchoredDrawObject) )
{
if (pObj->GetFrmFmt().GetAnchor().GetAnchorId() != FLY_AS_CHAR)
{
pObj->InvalidateObjPos();
_pPage->AppendDrawObjToPage(
*(static_cast<SwAnchoredDrawObject*>(pObj)) );
}
}
2000-09-18 23:08:29 +00:00
}
}
void RestoreCntnt( SwFrm *pSav, SwLayoutFrm *pParent, SwFrm *pSibling, bool bGrow )
2000-09-18 23:08:29 +00:00
{
OSL_ENSURE( pSav && pParent, "Kein Save oder Parent fuer Restore." );
SWRECTFN( pParent )
2000-09-18 23:08:29 +00:00
//Wenn es bereits FlowFrms unterhalb des neuen Parent gibt, so wird die
//Kette, beginnend mit pSav, hinter dem letzten angehaengt.
//Die Teile werden kurzerhand insertet und geeignet invalidiert.
//Unterwegs werden die Flys der CntntFrms bei der Seite angemeldet.
SwPageFrm *pPage = pParent->FindPageFrm();
if ( pPage )
pPage->InvalidatePage( pPage ); //Invalides Layout anmelden.
//Vorgaenger festellen und die Verbindung herstellen bzw. initialisieren.
pSav->pPrev = pSibling;
SwFrm* pNxt;
if ( pSibling )
{
pNxt = pSibling->pNext;
pSibling->pNext = pSav;
pSibling->_InvalidatePrt();
((SwCntntFrm*)pSibling)->InvalidatePage( pPage );//Invaliden Cntnt anmelden.
if ( ((SwCntntFrm*)pSibling)->GetFollow() )
pSibling->Prepare( PREP_CLEAR, 0, sal_False );
}
else
{ pNxt = pParent->pLower;
pParent->pLower = pSav;
pSav->pUpper = pParent; //Schon mal setzen, sonst ist fuer das
//invalidate der Parent (z.B. ein Fly) nicht klar.
//Invaliden Cntnt anmelden.
if ( pSav->IsCntntFrm() )
((SwCntntFrm*)pSav)->InvalidatePage( pPage );
else
{ // pSav koennte auch ein leerer SectFrm sein
SwCntntFrm* pCnt = pParent->ContainsCntnt();
if( pCnt )
pCnt->InvalidatePage( pPage );
}
}
//Der Parent muss entsprechend gegrow'ed werden.
SwTwips nGrowVal = 0;
SwFrm* pLast;
do
{ pSav->pUpper = pParent;
nGrowVal += (pSav->Frm().*fnRect->fnGetHeight)();
2000-09-18 23:08:29 +00:00
pSav->_InvalidateAll();
//Jetzt die Flys anmelden, fuer TxtFrms gleich geeignet invalidieren.
if ( pSav->IsCntntFrm() )
{
if ( pSav->IsTxtFrm() &&
((SwTxtFrm*)pSav)->GetCacheIdx() != USHRT_MAX )
((SwTxtFrm*)pSav)->Init(); //Ich bin sein Freund.
if ( pPage && pSav->GetDrawObjs() )
::lcl_AddObjsToPage( (SwCntntFrm*)pSav, pPage );
2000-09-18 23:08:29 +00:00
}
else
{ SwCntntFrm *pBlub = ((SwLayoutFrm*)pSav)->ContainsCntnt();
if( pBlub )
{
do
{ if ( pPage && pBlub->GetDrawObjs() )
::lcl_AddObjsToPage( pBlub, pPage );
2000-09-18 23:08:29 +00:00
if( pBlub->IsTxtFrm() && ((SwTxtFrm*)pBlub)->HasFtn() &&
((SwTxtFrm*)pBlub)->GetCacheIdx() != USHRT_MAX )
((SwTxtFrm*)pBlub)->Init(); //Ich bin sein Freund.
pBlub = pBlub->GetNextCntntFrm();
} while ( pBlub && ((SwLayoutFrm*)pSav)->IsAnLower( pBlub ));
}
}
pLast = pSav;
pSav = pSav->GetNext();
} while ( pSav );
if( pNxt )
{
pLast->pNext = pNxt;
pNxt->pPrev = pLast;
}
if ( bGrow )
pParent->Grow( nGrowVal );
2000-09-18 23:08:29 +00:00
}
/*************************************************************************
|*
|* SqRt() Berechnung der Quadratwurzel, damit die math.lib
|* nicht auch noch dazugelinkt werden muss.
|*
|*************************************************************************/
sal_uLong MA_FASTCALL SqRt( BigInt nX )
2000-09-18 23:08:29 +00:00
{
BigInt nErg = 1;
if ( !nX.IsNeg() )
{
BigInt nOldErg = 1;
for ( int i = 0; i <= 5; i++ )
{
nErg = (nOldErg + (nX / nOldErg)) / BigInt(2);
nOldErg = nErg;
}
}
return nErg >= BigInt(SAL_MAX_UINT32) ? ULONG_MAX : (sal_uLong)nErg;
2000-09-18 23:08:29 +00:00
}
/*************************************************************************/
2000-09-18 23:08:29 +00:00
SwPageFrm * MA_FASTCALL InsertNewPage( SwPageDesc &rDesc, SwFrm *pUpper,
sal_Bool bOdd, sal_Bool bInsertEmpty, sal_Bool bFtn,
2000-09-18 23:08:29 +00:00
SwFrm *pSibling )
{
SwPageFrm *pRet;
SwDoc *pDoc = ((SwLayoutFrm*)pUpper)->GetFmt()->GetDoc();
SwFrmFmt *pFmt = bOdd ? rDesc.GetRightFmt() : rDesc.GetLeftFmt();
//Wenn ich kein FrmFmt fuer die Seite gefunden habe, muss ich eben
//eine Leerseite einfuegen.
if ( !pFmt )
{
pFmt = bOdd ? rDesc.GetLeftFmt() : rDesc.GetRightFmt();
OSL_ENSURE( pFmt, "Descriptor without any format?!" );
bInsertEmpty = !bInsertEmpty;
}
if( bInsertEmpty )
2000-09-18 23:08:29 +00:00
{
SwPageDesc *pTmpDesc = pSibling && pSibling->GetPrev() ?
((SwPageFrm*)pSibling->GetPrev())->GetPageDesc() : &rDesc;
pRet = new SwPageFrm( pDoc->GetEmptyPageFmt(), pUpper, pTmpDesc );
2000-09-18 23:08:29 +00:00
pRet->Paste( pUpper, pSibling );
pRet->PreparePage( bFtn );
}
pRet = new SwPageFrm( pFmt, pUpper, &rDesc );
2000-09-18 23:08:29 +00:00
pRet->Paste( pUpper, pSibling );
pRet->PreparePage( bFtn );
if ( pRet->GetNext() )
((SwRootFrm*)pRet->GetUpper())->AssertPageFlys( pRet );
return pRet;
}
/*************************************************************************
|*
|* RegistFlys(), Regist() Die beiden folgenden Methoden durchsuchen rekursiv
|* eine Layoutstruktur und melden alle FlyFrms, die einen beliebigen Frm
|* innerhalb der Struktur als Anker haben bei der Seite an.
|*
|*************************************************************************/
void MA_FASTCALL lcl_Regist( SwPageFrm *pPage, const SwFrm *pAnch )
{
SwSortedObjs *pObjs = (SwSortedObjs*)pAnch->GetDrawObjs();
for ( sal_uInt16 i = 0; i < pObjs->Count(); ++i )
2000-09-18 23:08:29 +00:00
{
SwAnchoredObject* pObj = (*pObjs)[i];
if ( pObj->ISA(SwFlyFrm) )
2000-09-18 23:08:29 +00:00
{
SwFlyFrm *pFly = static_cast<SwFlyFrm*>(pObj);
2000-09-18 23:08:29 +00:00
//Ggf. ummelden, nicht anmelden wenn bereits bekannt.
// #i28701# - use new method <GetPageFrm()>
SwPageFrm *pPg = pFly->IsFlyFreeFrm()
? pFly->GetPageFrm() : pFly->FindPageFrm();
2000-09-18 23:08:29 +00:00
if ( pPg != pPage )
{
if ( pPg )
pPg->RemoveFlyFromPage( pFly );
pPage->AppendFlyToPage( pFly );
2000-09-18 23:08:29 +00:00
}
::RegistFlys( pPage, pFly );
}
else
{
// #i87493#
if ( pPage != pObj->GetPageFrm() )
{
// #i28701#
if ( pObj->GetPageFrm() )
pObj->GetPageFrm()->RemoveDrawObjFromPage( *pObj );
pPage->AppendDrawObjToPage( *pObj );
}
2000-09-18 23:08:29 +00:00
}
const SwFlyFrm* pFly = pAnch->FindFlyFrm();
if ( pFly &&
pObj->GetDrawObj()->GetOrdNum() < pFly->GetVirtDrawObj()->GetOrdNum() &&
pObj->GetDrawObj()->GetPage() )
{
pObj->DrawObj()->GetPage()->SetObjectOrdNum(
pObj->GetDrawObj()->GetOrdNumDirect(),
pFly->GetVirtDrawObj()->GetOrdNumDirect() + 1 );
}
2000-09-18 23:08:29 +00:00
}
}
void RegistFlys( SwPageFrm *pPage, const SwLayoutFrm *pLay )
{
if ( pLay->GetDrawObjs() )
::lcl_Regist( pPage, pLay );
const SwFrm *pFrm = pLay->Lower();
while ( pFrm )
{
if ( pFrm->IsLayoutFrm() )
::RegistFlys( pPage, (const SwLayoutFrm*)pFrm );
else if ( pFrm->GetDrawObjs() )
::lcl_Regist( pPage, pFrm );
pFrm = pFrm->GetNext();
}
}
/*************************************************************************
|*
|* void Notify()
|*
|* Beschreibung Benachrichtigt den Hintergrund je nach der
|* Veraenderung zwischen altem und neuem Rechteckt.
|*
|*************************************************************************/
void Notify( SwFlyFrm *pFly, SwPageFrm *pOld, const SwRect &rOld,
const SwRect* pOldPrt )
2000-09-18 23:08:29 +00:00
{
const SwRect aFrm( pFly->GetObjRectWithSpaces() );
2000-09-18 23:08:29 +00:00
if ( rOld.Pos() != aFrm.Pos() )
{ //Positionsaenderung, alten und neuen Bereich invalidieren
if ( rOld.HasArea() &&
rOld.Left()+pFly->GetFmt()->GetLRSpace().GetLeft() < WEIT_WECH )
{
pFly->NotifyBackground( pOld, rOld, PREP_FLY_LEAVE );
}
pFly->NotifyBackground( pFly->FindPageFrm(), aFrm, PREP_FLY_ARRIVE );
}
else if ( rOld.SSize() != aFrm.SSize() )
{ //Groessenaenderung, den Bereich der Verlassen wurde bzw. jetzt
//ueberdeckt wird invalidieren.
//Der Einfachheit halber wird hier bewusst jeweils ein Twip
//unnoetig invalidiert.
ViewShell *pSh = pFly->getRootFrm()->GetCurrShell();
2000-09-18 23:08:29 +00:00
if( pSh && rOld.HasArea() )
pSh->InvalidateWindows( rOld );
// #i51941# - consider case that fly frame isn't
// registered at the old page <pOld>
SwPageFrm* pPageFrm = pFly->FindPageFrm();
if ( pOld != pPageFrm )
{
pFly->NotifyBackground( pPageFrm, aFrm, PREP_FLY_ARRIVE );
}
2000-09-18 23:08:29 +00:00
if ( rOld.Left() != aFrm.Left() )
{
SwRect aTmp( rOld );
2000-09-18 23:08:29 +00:00
aTmp.Union( aFrm );
aTmp.Left( Min(aFrm.Left(), rOld.Left()) );
aTmp.Right( Max(aFrm.Left(), rOld.Left()) );
pFly->NotifyBackground( pOld, aTmp, PREP_FLY_CHGD );
}
SwTwips nOld = rOld.Right();
SwTwips nNew = aFrm.Right();
if ( nOld != nNew )
{
SwRect aTmp( rOld );
2000-09-18 23:08:29 +00:00
aTmp.Union( aFrm );
aTmp.Left( Min(nNew, nOld) );
aTmp.Right( Max(nNew, nOld) );
pFly->NotifyBackground( pOld, aTmp, PREP_FLY_CHGD );
}
if ( rOld.Top() != aFrm.Top() )
{
SwRect aTmp( rOld );
2000-09-18 23:08:29 +00:00
aTmp.Union( aFrm );
aTmp.Top( Min(aFrm.Top(), rOld.Top()) );
aTmp.Bottom( Max(aFrm.Top(), rOld.Top()) );
pFly->NotifyBackground( pOld, aTmp, PREP_FLY_CHGD );
}
nOld = rOld.Bottom();
nNew = aFrm.Bottom();
if ( nOld != nNew )
{
SwRect aTmp( rOld );
2000-09-18 23:08:29 +00:00
aTmp.Union( aFrm );
aTmp.Top( Min(nNew, nOld) );
aTmp.Bottom( Max(nNew, nOld) );
pFly->NotifyBackground( pOld, aTmp, PREP_FLY_CHGD );
}
}
else if ( pOldPrt && *pOldPrt != pFly->Prt() &&
pFly->GetFmt()->GetSurround().IsContour() )
{
// #i24097#
pFly->NotifyBackground( pFly->FindPageFrm(), aFrm, PREP_FLY_ARRIVE );
}
2000-09-18 23:08:29 +00:00
}
/*************************************************************************/
2001-11-06 08:32:12 +00:00
void lcl_CheckFlowBack( SwFrm* pFrm, const SwRect &rRect )
{
SwTwips nBottom = rRect.Bottom();
while( pFrm )
{
if( pFrm->IsLayoutFrm() )
{
if( rRect.IsOver( pFrm->Frm() ) )
lcl_CheckFlowBack( ((SwLayoutFrm*)pFrm)->Lower(), rRect );
}
else if( !pFrm->GetNext() && nBottom > pFrm->Frm().Bottom() )
{
if( pFrm->IsCntntFrm() && ((SwCntntFrm*)pFrm)->HasFollow() )
pFrm->InvalidateSize();
else
pFrm->InvalidateNextPos();
}
pFrm = pFrm->GetNext();
}
}
void MA_FASTCALL lcl_NotifyCntnt( const SdrObject *pThis, SwCntntFrm *pCnt,
2000-09-18 23:08:29 +00:00
const SwRect &rRect, const PrepareHint eHint )
{
if ( pCnt->IsTxtFrm() )
{
SwRect aCntPrt( pCnt->Prt() );
aCntPrt.Pos() += pCnt->Frm().Pos();
if ( eHint == PREP_FLY_ATTR_CHG )
{
// #i35640# - use given rectangle <rRect> instead
// of current bound rectangle
if ( aCntPrt.IsOver( rRect ) )
2000-09-18 23:08:29 +00:00
pCnt->Prepare( PREP_FLY_ATTR_CHG );
}
// #i23129# - only invalidate, if the text frame
// printing area overlaps with the given rectangle.
else if ( aCntPrt.IsOver( rRect ) )
2000-09-18 23:08:29 +00:00
pCnt->Prepare( eHint, (void*)&aCntPrt._Intersection( rRect ) );
if ( pCnt->GetDrawObjs() )
{
const SwSortedObjs &rObjs = *pCnt->GetDrawObjs();
for ( sal_uInt16 i = 0; i < rObjs.Count(); ++i )
2000-09-18 23:08:29 +00:00
{
SwAnchoredObject* pObj = rObjs[i];
if ( pObj->ISA(SwFlyFrm) )
2000-09-18 23:08:29 +00:00
{
SwFlyFrm *pFly = static_cast<SwFlyFrm*>(pObj);
2000-09-18 23:08:29 +00:00
if ( pFly->IsFlyInCntFrm() )
{
SwCntntFrm *pCntnt = pFly->ContainsCntnt();
while ( pCntnt )
{
::lcl_NotifyCntnt( pThis, pCntnt, rRect, eHint );
pCntnt = pCntnt->GetNextCntntFrm();
}
}
}
}
}
}
}
void Notify_Background( const SdrObject* pObj,
SwPageFrm* pPage,
const SwRect& rRect,
const PrepareHint eHint,
const sal_Bool bInva )
2000-09-18 23:08:29 +00:00
{
//Wenn der Frm gerade erstmalig sinnvoll positioniert wurde, braucht der
//alte Bereich nicht benachrichtigt werden.
if ( eHint == PREP_FLY_LEAVE && rRect.Top() == WEIT_WECH )
return;
SwLayoutFrm* pArea;
2000-09-18 23:08:29 +00:00
SwFlyFrm *pFlyFrm = 0;
SwFrm* pAnchor;
if( pObj->ISA(SwVirtFlyDrawObj) )
2000-09-18 23:08:29 +00:00
{
pFlyFrm = ((SwVirtFlyDrawObj*)pObj)->GetFlyFrm();
pAnchor = pFlyFrm->AnchorFrm();
2000-09-18 23:08:29 +00:00
}
else
{
pFlyFrm = NULL;
pAnchor = const_cast<SwFrm*>(
GetUserCall(pObj)->GetAnchoredObj( pObj )->GetAnchorFrm() );
2000-09-18 23:08:29 +00:00
}
if( PREP_FLY_LEAVE != eHint && pAnchor->IsInFly() )
pArea = pAnchor->FindFlyFrm();
else
pArea = pPage;
SwCntntFrm *pCnt = 0;
if ( pArea )
{
2001-11-06 08:32:12 +00:00
if( PREP_FLY_ARRIVE != eHint )
lcl_CheckFlowBack( pArea, rRect );
2000-09-18 23:08:29 +00:00
//Es reagieren sowieso nur die auf den Anker folgenden auf den Fly, also
//brauchen diese nicht abgeklappert werden.
//Ausnahme sind ist natuerlich das LEAVE, denn der Fly koennte ja von
//"oben" kommen.
// Wenn der Anker auf der vorhergehenden Seite liegt, muss ebenfalls
// die gesamte Seite abgearbeitet werden. (47722)
// OD 2004-05-13 #i28701# - If the wrapping style has to be considered
// on the object positioning, the complete area has to be processed,
// because content frames before the anchor frame also have to consider
// the object for the text wrapping.
// #i3317# - The complete area has always been
// processed.
{
2000-09-18 23:08:29 +00:00
pCnt = pArea->ContainsCntnt();
}
2000-09-18 23:08:29 +00:00
}
SwFrm *pLastTab = 0;
while ( pCnt && pArea && pArea->IsAnLower( pCnt ) )
2000-09-18 23:08:29 +00:00
{
::lcl_NotifyCntnt( pObj, pCnt, rRect, eHint );
if ( pCnt->IsInTab() )
{
SwLayoutFrm* pCell = pCnt->GetUpper();
// #i40606# - use <GetLastBoundRect()>
// instead of <GetCurrentBoundRect()>, because a recalculation
// of the bounding rectangle isn't intended here.
if ( pCell->IsCellFrm() &&
( pCell->Frm().IsOver( pObj->GetLastBoundRect() ) ||
pCell->Frm().IsOver( rRect ) ) )
2000-09-18 23:08:29 +00:00
{
const SwFmtVertOrient &rOri = pCell->GetFmt()->GetVertOrient();
if ( text::VertOrientation::NONE != rOri.GetVertOrient() )
2000-09-18 23:08:29 +00:00
pCell->InvalidatePrt();
}
SwTabFrm *pTab = pCnt->FindTabFrm();
if ( pTab != pLastTab )
{
pLastTab = pTab;
// #i40606# - use <GetLastBoundRect()>
// instead of <GetCurrentBoundRect()>, because a recalculation
// of the bounding rectangle isn't intended here.
if ( pTab->Frm().IsOver( pObj->GetLastBoundRect() ) ||
pTab->Frm().IsOver( rRect ) )
2000-09-18 23:08:29 +00:00
{
if ( !pFlyFrm || !pFlyFrm->IsLowerOf( pTab ) )
pTab->InvalidatePrt();
}
}
}
pCnt = pCnt->GetNextCntntFrm();
}
// #108745# Sorry, but this causes nothing but trouble. I remove these lines
// taking the risk that the footer frame will have a wrong height
// if( pPage->Lower() )
// {
// SwFrm* pFrm = pPage->Lower();
// while( pFrm->GetNext() )
// pFrm = pFrm->GetNext();
// if( pFrm->IsFooterFrm() &&
// ( ( pFrm->Frm().IsOver( pObj->GetBoundRect() ) ||
// pFrm->Frm().IsOver( rRect ) ) ) )
// pFrm->InvalidateSize();
// }
2011-04-18 12:37:38 -03:00
// #128702# - make code robust
if ( pPage && pPage->GetSortedObjs() )
2000-09-18 23:08:29 +00:00
{
pObj->GetOrdNum();
const SwSortedObjs &rObjs = *pPage->GetSortedObjs();
for ( sal_uInt16 i = 0; i < rObjs.Count(); ++i )
2000-09-18 23:08:29 +00:00
{
SwAnchoredObject* pAnchoredObj = rObjs[i];
if ( pAnchoredObj->ISA(SwFlyFrm) )
2000-09-18 23:08:29 +00:00
{
if( pAnchoredObj->GetDrawObj() == pObj )
2000-09-18 23:08:29 +00:00
continue;
SwFlyFrm *pFly = static_cast<SwFlyFrm*>(pAnchoredObj);
2000-09-18 23:08:29 +00:00
if ( pFly->Frm().Top() == WEIT_WECH )
continue;
if ( !pFlyFrm ||
(!pFly->IsLowerOf( pFlyFrm ) &&
pFly->GetVirtDrawObj()->GetOrdNumDirect() < pObj->GetOrdNumDirect()))
{
pCnt = pFly->ContainsCntnt();
while ( pCnt )
{
::lcl_NotifyCntnt( pObj, pCnt, rRect, eHint );
pCnt = pCnt->GetNextCntntFrm();
}
}
if( pFly->IsFlyLayFrm() )
{
if( pFly->Lower() && pFly->Lower()->IsColumnFrm() &&
pFly->Frm().Bottom() >= rRect.Top() &&
pFly->Frm().Top() <= rRect.Bottom() &&
pFly->Frm().Right() >= rRect.Left() &&
pFly->Frm().Left() <= rRect.Right() )
{
pFly->InvalidateSize();
}
}
//Flys, die ueber mir liegen muessen/mussten evtl.
//ausweichen, wenn sie eine automatische Ausrichtung haben.
//das ist unabhaengig von meinem Attribut, weil dies sich
//gerade geaendert haben kann und eben deshalb
//umformatiert wurde.
else if ( pFly->IsFlyAtCntFrm() &&
pObj->GetOrdNumDirect() <
pFly->GetVirtDrawObj()->GetOrdNumDirect() &&
pFlyFrm && !pFly->IsLowerOf( pFlyFrm ) )
{
const SwFmtHoriOrient &rH = pFly->GetFmt()->GetHoriOrient();
if ( text::HoriOrientation::NONE != rH.GetHoriOrient() &&
text::HoriOrientation::CENTER != rH.GetHoriOrient() &&
( !pFly->IsAutoPos() || text::RelOrientation::CHAR != rH.GetRelationOrient() ) &&
2000-09-18 23:08:29 +00:00
(pFly->Frm().Bottom() >= rRect.Top() &&
pFly->Frm().Top() <= rRect.Bottom()) )
pFly->InvalidatePos();
}
}
}
}
if ( pFlyFrm && pAnchor->GetUpper() && pAnchor->IsInTab() )//MA_FLY_HEIGHT
pAnchor->GetUpper()->InvalidateSize();
// #i82258# - make code robust
ViewShell* pSh = 0;
if ( bInva && pPage &&
0 != (pSh = pPage->getRootFrm()->GetCurrShell()) )
{
2000-09-18 23:08:29 +00:00
pSh->InvalidateWindows( rRect );
}
2000-09-18 23:08:29 +00:00
}
/*************************************************************************
|*
|* GetVirtualUpper() liefert bei absatzgebundenen Objekten den Upper
|* des Ankers. Falls es sich dabei um verkettete Rahmen oder
|* Fussnoten handelt, wird ggf. der "virtuelle" Upper ermittelt.
|*
|*************************************************************************/
const SwFrm* GetVirtualUpper( const SwFrm* pFrm, const Point& rPos )
{
if( pFrm->IsTxtFrm() )
{
pFrm = pFrm->GetUpper();
if( !pFrm->Frm().IsInside( rPos ) )
{
if( pFrm->IsFtnFrm() )
{
const SwFtnFrm* pTmp = ((SwFtnFrm*)pFrm)->GetFollow();
while( pTmp )
{
if( pTmp->Frm().IsInside( rPos ) )
return pTmp;
pTmp = pTmp->GetFollow();
}
}
else
{
SwFlyFrm* pTmp = (SwFlyFrm*)pFrm->FindFlyFrm();
while( pTmp )
{
if( pTmp->Frm().IsInside( rPos ) )
return pTmp;
pTmp = pTmp->GetNextLink();
}
}
}
}
return pFrm;
}
/*************************************************************************/
2000-09-18 23:08:29 +00:00
sal_Bool Is_Lower_Of( const SwFrm *pCurrFrm, const SdrObject* pObj )
2000-09-18 23:08:29 +00:00
{
Point aPos;
const SwFrm* pFrm;
if( pObj->ISA(SwVirtFlyDrawObj) )
2000-09-18 23:08:29 +00:00
{
const SwFlyFrm* pFly = ( (SwVirtFlyDrawObj*)pObj )->GetFlyFrm();
pFrm = pFly->GetAnchorFrm();
2000-09-18 23:08:29 +00:00
aPos = pFly->Frm().Pos();
}
else
{
pFrm = ( (SwDrawContact*)GetUserCall(pObj) )->GetAnchorFrm(pObj);
aPos = pObj->GetCurrentBoundRect().TopLeft();
2000-09-18 23:08:29 +00:00
}
OSL_ENSURE( pFrm, "8-( Fly is lost in Space." );
2000-09-18 23:08:29 +00:00
pFrm = GetVirtualUpper( pFrm, aPos );
do
{ if ( pFrm == pCurrFrm )
return sal_True;
2000-09-18 23:08:29 +00:00
if( pFrm->IsFlyFrm() )
{
aPos = pFrm->Frm().Pos();
pFrm = GetVirtualUpper( ((const SwFlyFrm*)pFrm)->GetAnchorFrm(), aPos );
2000-09-18 23:08:29 +00:00
}
else
pFrm = pFrm->GetUpper();
} while ( pFrm );
return sal_False;
2000-09-18 23:08:29 +00:00
}
const SwFrm *FindKontext( const SwFrm *pFrm, sal_uInt16 nAdditionalKontextTyp )
2000-09-18 23:08:29 +00:00
{
//Liefert die Umgebung des Frm in die kein Fly aus einer anderen
//Umgebung hineinragen kann.
const sal_uInt16 nTyp = FRM_ROOT | FRM_HEADER | FRM_FOOTER | FRM_FTNCONT |
2000-09-18 23:08:29 +00:00
FRM_FTN | FRM_FLY |
FRM_TAB | FRM_ROW | FRM_CELL |
nAdditionalKontextTyp;
do
{ if ( pFrm->GetType() & nTyp )
break;
pFrm = pFrm->GetUpper();
} while( pFrm );
return pFrm;
}
sal_Bool IsFrmInSameKontext( const SwFrm *pInnerFrm, const SwFrm *pFrm )
2000-09-18 23:08:29 +00:00
{
const SwFrm *pKontext = FindKontext( pInnerFrm, 0 );
const sal_uInt16 nTyp = FRM_ROOT | FRM_HEADER | FRM_FOOTER | FRM_FTNCONT |
2000-09-18 23:08:29 +00:00
FRM_FTN | FRM_FLY |
FRM_TAB | FRM_ROW | FRM_CELL;
do
{ if ( pFrm->GetType() & nTyp )
{
if( pFrm == pKontext )
return sal_True;
2000-09-18 23:08:29 +00:00
if( pFrm->IsCellFrm() )
return sal_False;
2000-09-18 23:08:29 +00:00
}
if( pFrm->IsFlyFrm() )
{
Point aPos( pFrm->Frm().Pos() );
pFrm = GetVirtualUpper( ((const SwFlyFrm*)pFrm)->GetAnchorFrm(), aPos );
2000-09-18 23:08:29 +00:00
}
else
pFrm = pFrm->GetUpper();
} while( pFrm );
return sal_False;
2000-09-18 23:08:29 +00:00
}
//---------------------------------
SwTwips MA_FASTCALL lcl_CalcCellRstHeight( SwLayoutFrm *pCell )
{
if ( pCell->Lower()->IsCntntFrm() || pCell->Lower()->IsSctFrm() )
{
SwFrm *pLow = pCell->Lower();
long nHeight = 0, nFlyAdd = 0;
do
{
long nLow = pLow->Frm().Height();
if( pLow->IsTxtFrm() && ((SwTxtFrm*)pLow)->IsUndersized() )
nLow += ((SwTxtFrm*)pLow)->GetParHeight()-pLow->Prt().Height();
else if( pLow->IsSctFrm() && ((SwSectionFrm*)pLow)->IsUndersized() )
nLow += ((SwSectionFrm*)pLow)->Undersize();
nFlyAdd = Max( 0L, nFlyAdd - nLow );
nFlyAdd = Max( nFlyAdd, ::CalcHeightWidthFlys( pLow ) );
nHeight += nLow;
pLow = pLow->GetNext();
} while ( pLow );
if ( nFlyAdd )
nHeight += nFlyAdd;
//Der Border will natuerlich auch mitspielen, er kann leider nicht
//aus PrtArea und Frm errechnet werden, da diese in beliebiger
//Kombination ungueltig sein koennen.
SwBorderAttrAccess aAccess( SwFrm::GetCache(), pCell );
const SwBorderAttrs &rAttrs = *aAccess.Get();
nHeight += rAttrs.CalcTop() + rAttrs.CalcBottom();
return pCell->Frm().Height() - nHeight;
}
else
{
long nRstHeight = 0;
SwFrm *pLow = pCell->Lower();
do
{ nRstHeight += ::CalcRowRstHeight( (SwLayoutFrm*)pLow );
pLow = pLow->GetNext();
} while ( pLow );
return nRstHeight;
}
}
SwTwips MA_FASTCALL CalcRowRstHeight( SwLayoutFrm *pRow )
{
SwTwips nRstHeight = LONG_MAX;
SwLayoutFrm *pLow = (SwLayoutFrm*)pRow->Lower();
while ( pLow )
{
nRstHeight = Min( nRstHeight, ::lcl_CalcCellRstHeight( pLow ) );
pLow = (SwLayoutFrm*)pLow->GetNext();
}
return nRstHeight;
}
const SwFrm* MA_FASTCALL FindPage( const SwRect &rRect, const SwFrm *pPage )
{
if ( !rRect.IsOver( pPage->Frm() ) )
{
const SwRootFrm* pRootFrm = static_cast<const SwRootFrm*>(pPage->GetUpper());
const SwFrm* pTmpPage = pRootFrm ? pRootFrm->GetPageAtPos( rRect.TopLeft(), &rRect.SSize(), true ) : 0;
if ( pTmpPage )
pPage = pTmpPage;
2000-09-18 23:08:29 +00:00
}
2000-09-18 23:08:29 +00:00
return pPage;
}
#include <svl/smplhint.hxx>
class SwFrmHolder : private SfxListener
{
SwFrm* pFrm;
bool bSet;
virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
public:
SwFrmHolder() : pFrm(0), bSet(false) {}
void SetFrm( SwFrm* pHold );
SwFrm* GetFrm() { return pFrm; }
void Reset();
bool IsSet() { return bSet; }
};
void SwFrmHolder::SetFrm( SwFrm* pHold )
{
bSet = true;
pFrm = pHold;
StartListening(*pHold);
}
void SwFrmHolder::Reset()
{
if (pFrm)
EndListening(*pFrm);
bSet = false;
pFrm = 0;
}
void SwFrmHolder::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
{
if ( rHint.IsA(TYPE(SfxSimpleHint)) )
{
if ( ( (SfxSimpleHint&) rHint ).GetId() == SFX_HINT_DYING && &rBC == pFrm )
pFrm = 0;
}
}
SwFrm* GetFrmOfModify( const SwRootFrm* pLayout, SwModify const& rMod, sal_uInt16 const nFrmType,
const Point* pPoint, const SwPosition *pPos, const sal_Bool bCalcFrm )
2000-09-18 23:08:29 +00:00
{
SwFrm *pMinFrm = 0, *pTmpFrm;
SwFrmHolder aHolder;
2000-09-18 23:08:29 +00:00
SwRect aCalcRect;
bool bClientIterChanged = false;
2000-09-18 23:08:29 +00:00
SwIterator<SwFrm,SwModify> aIter( rMod );
2000-09-18 23:08:29 +00:00
do {
pMinFrm = 0;
aHolder.Reset();
sal_uInt64 nMinDist = 0;
bClientIterChanged = false;
2000-09-18 23:08:29 +00:00
for( pTmpFrm = aIter.First(); pTmpFrm; pTmpFrm = aIter.Next() )
{
2000-09-18 23:08:29 +00:00
if( pTmpFrm->GetType() & nFrmType &&
( !pLayout || pLayout == pTmpFrm->getRootFrm() ) &&
2000-09-18 23:08:29 +00:00
(!pTmpFrm->IsFlowFrm() ||
!SwFlowFrm::CastFlowFrm( pTmpFrm )->IsFollow() ))
{
if( pPoint )
{
// watch for Frm being deleted
if ( pMinFrm )
aHolder.SetFrm( pMinFrm );
else
aHolder.Reset();
2000-09-18 23:08:29 +00:00
if( bCalcFrm )
{
// - format parent Writer
// fly frame, if it isn't been formatted yet.
// Note: The Writer fly frame could be the frame itself.
SwFlyFrm* pFlyFrm( pTmpFrm->FindFlyFrm() );
if ( pFlyFrm &&
pFlyFrm->Frm().Pos().X() == WEIT_WECH &&
pFlyFrm->Frm().Pos().Y() == WEIT_WECH )
{
SwObjectFormatter::FormatObj( *pFlyFrm );
}
2000-09-18 23:08:29 +00:00
pTmpFrm->Calc();
}
2000-09-18 23:08:29 +00:00
// #127369#
// aIter.IsChanged checks if the current pTmpFrm has been deleted while
// it is the current iterator
// FrmHolder watches for deletion of the current pMinFrm
if( aIter.IsChanged() || ( aHolder.IsSet() && !aHolder.GetFrm() ) )
{
// restart iteration
bClientIterChanged = true;
break;
}
2000-09-18 23:08:29 +00:00
// bei Flys ggfs. ueber den Parent gehen wenn sie selbst
// nocht nicht "formatiert" sind
if( !bCalcFrm && nFrmType & FRM_FLY &&
((SwFlyFrm*)pTmpFrm)->GetAnchorFrm() &&
2000-09-18 23:08:29 +00:00
WEIT_WECH == pTmpFrm->Frm().Pos().X() &&
WEIT_WECH == pTmpFrm->Frm().Pos().Y() )
aCalcRect = ((SwFlyFrm*)pTmpFrm)->GetAnchorFrm()->Frm();
2000-09-18 23:08:29 +00:00
else
aCalcRect = pTmpFrm->Frm();
if ( aCalcRect.IsInside( *pPoint ) )
2000-09-18 23:08:29 +00:00
{
pMinFrm = pTmpFrm;
break;
2000-09-18 23:08:29 +00:00
}
// Point not in rectangle. Compare distances:
const Point aCalcRectCenter = aCalcRect.Center();
const Point aDiff = aCalcRectCenter - *pPoint;
const sal_uInt64 nCurrentDist = aDiff.X() * aDiff.X() + aDiff.Y() * aDiff.Y(); // opt: no sqrt
if ( !pMinFrm || nCurrentDist < nMinDist )
2000-09-18 23:08:29 +00:00
{
pMinFrm = pTmpFrm;
nMinDist = nCurrentDist;
2000-09-18 23:08:29 +00:00
}
}
else
{
// Wenn kein pPoint angegeben ist, dann reichen
// wir irgendeinen raus: den ersten!
pMinFrm = pTmpFrm;
break;
}
}
}
} while( bClientIterChanged );
2000-09-18 23:08:29 +00:00
if( pPos && pMinFrm && pMinFrm->IsTxtFrm() )
return ((SwTxtFrm*)pMinFrm)->GetFrmAtPos( *pPos );
return pMinFrm;
}
sal_Bool IsExtraData( const SwDoc *pDoc )
2000-09-18 23:08:29 +00:00
{
const SwLineNumberInfo &rInf = pDoc->GetLineNumberInfo();
return rInf.IsPaintLineNumbers() ||
rInf.IsCountInFlys() ||
((sal_Int16)SW_MOD()->GetRedlineMarkPos() != text::HoriOrientation::NONE &&
2000-09-18 23:08:29 +00:00
pDoc->GetRedlineTbl().Count());
}
// OD 22.09.2003 #110978#
const SwRect SwPageFrm::PrtWithoutHeaderAndFooter() const
{
SwRect aPrtWithoutHeaderFooter( Prt() );
aPrtWithoutHeaderFooter.Pos() += Frm().Pos();
const SwFrm* pLowerFrm = Lower();
while ( pLowerFrm )
{
// Note: independent on text direction page header and page footer are
// always at top respectively at bottom of the page frame.
if ( pLowerFrm->IsHeaderFrm() )
{
aPrtWithoutHeaderFooter.Top( aPrtWithoutHeaderFooter.Top() +
pLowerFrm->Frm().Height() );
}
if ( pLowerFrm->IsFooterFrm() )
{
aPrtWithoutHeaderFooter.Bottom( aPrtWithoutHeaderFooter.Bottom() -
pLowerFrm->Frm().Height() );
}
pLowerFrm = pLowerFrm->GetNext();
}
return aPrtWithoutHeaderFooter;
}
/** method to determine the spacing values of a frame
OD 2004-03-10 #i28701#
CWS-TOOLING: integrate CWS sw32numbf01 2009-09-04 10:01:07 +0200 od r275780 : #i95907# method <SwWrtShell::NumOfBulletOn(..)> - adjust indentation of newly created automatic list style --> due to MRU add actual paragraph indentation to created automatic list style's indentation 2009-09-02 11:57:40 +0200 od r275703 : #i95907# method <SwTxtMargin::CtorInitTxtMargin(..)> - correct handling of paragraph indents, when list level indents are applicable. 2009-09-01 16:59:47 +0200 od r275671 : CWS-TOOLING: rebase CWS sw32numbf01 to trunk@275331 (milestone: DEV300:m56) 2009-08-28 16:42:34 +0200 od r275540 : #i102458# method <SwFlowFrm::CalcUpperSpace(..)> - correct handling of leading line spacing method <GetSpacingValuesOfFrm(..)> - add output parameter <obIsLineSpacingProportional> 2009-08-27 17:03:07 +0200 od r275496 : #i101516# method <SwTxtNode::SwTxtNode(..)> - in case that the paragraph is add to a list, apply paragraph style's assigned outline style list level as list level, if paragraph has no list level set already. 2009-08-27 15:23:34 +0200 od r275489 : #i101234# method <SwWrtShell::NumOrBulletOn(..)> - check before activation of certain list level of outline numbering, a numbering format is already set. In this only continue the outline numbering. 2009-08-27 14:15:07 +0200 od r275483 : #i95907# method <SwWrtShell::NumOrBulletOn(..)> - consider leading tab stops and intentation of paragraph first text line, when a new list style is created for its application to the selection. 2009-08-26 09:51:39 +0200 od r275401 : #i86492# Adjust copy of text nodes regarding lists - copy of part of paragraph in list does not copy list style and list id - copy of paragraphs in list into another list continues destination list - copy of paragraphs (at least one not in a list) at empty paragraph following a list does not continue the destination list. 2009-08-25 10:30:53 +0200 od r275339 : #i101349# method <XMLTextImportHelper::SetStyleAndAttrs(..) - assure that list style of automatic paragraph style is applied at paragraph.
2009-09-08 13:44:38 +00:00
OD 2009-08-28 #i102458#
Add output parameter <obIsLineSpacingProportional>
@author OD
*/
CWS-TOOLING: integrate CWS sw32numbf01 2009-09-04 10:01:07 +0200 od r275780 : #i95907# method <SwWrtShell::NumOfBulletOn(..)> - adjust indentation of newly created automatic list style --> due to MRU add actual paragraph indentation to created automatic list style's indentation 2009-09-02 11:57:40 +0200 od r275703 : #i95907# method <SwTxtMargin::CtorInitTxtMargin(..)> - correct handling of paragraph indents, when list level indents are applicable. 2009-09-01 16:59:47 +0200 od r275671 : CWS-TOOLING: rebase CWS sw32numbf01 to trunk@275331 (milestone: DEV300:m56) 2009-08-28 16:42:34 +0200 od r275540 : #i102458# method <SwFlowFrm::CalcUpperSpace(..)> - correct handling of leading line spacing method <GetSpacingValuesOfFrm(..)> - add output parameter <obIsLineSpacingProportional> 2009-08-27 17:03:07 +0200 od r275496 : #i101516# method <SwTxtNode::SwTxtNode(..)> - in case that the paragraph is add to a list, apply paragraph style's assigned outline style list level as list level, if paragraph has no list level set already. 2009-08-27 15:23:34 +0200 od r275489 : #i101234# method <SwWrtShell::NumOrBulletOn(..)> - check before activation of certain list level of outline numbering, a numbering format is already set. In this only continue the outline numbering. 2009-08-27 14:15:07 +0200 od r275483 : #i95907# method <SwWrtShell::NumOrBulletOn(..)> - consider leading tab stops and intentation of paragraph first text line, when a new list style is created for its application to the selection. 2009-08-26 09:51:39 +0200 od r275401 : #i86492# Adjust copy of text nodes regarding lists - copy of part of paragraph in list does not copy list style and list id - copy of paragraphs in list into another list continues destination list - copy of paragraphs (at least one not in a list) at empty paragraph following a list does not continue the destination list. 2009-08-25 10:30:53 +0200 od r275339 : #i101349# method <XMLTextImportHelper::SetStyleAndAttrs(..) - assure that list style of automatic paragraph style is applied at paragraph.
2009-09-08 13:44:38 +00:00
void GetSpacingValuesOfFrm( const SwFrm& rFrm,
SwTwips& onLowerSpacing,
SwTwips& onLineSpacing,
bool& obIsLineSpacingProportional )
{
CWS-TOOLING: integrate CWS sw32numbf01 2009-09-04 10:01:07 +0200 od r275780 : #i95907# method <SwWrtShell::NumOfBulletOn(..)> - adjust indentation of newly created automatic list style --> due to MRU add actual paragraph indentation to created automatic list style's indentation 2009-09-02 11:57:40 +0200 od r275703 : #i95907# method <SwTxtMargin::CtorInitTxtMargin(..)> - correct handling of paragraph indents, when list level indents are applicable. 2009-09-01 16:59:47 +0200 od r275671 : CWS-TOOLING: rebase CWS sw32numbf01 to trunk@275331 (milestone: DEV300:m56) 2009-08-28 16:42:34 +0200 od r275540 : #i102458# method <SwFlowFrm::CalcUpperSpace(..)> - correct handling of leading line spacing method <GetSpacingValuesOfFrm(..)> - add output parameter <obIsLineSpacingProportional> 2009-08-27 17:03:07 +0200 od r275496 : #i101516# method <SwTxtNode::SwTxtNode(..)> - in case that the paragraph is add to a list, apply paragraph style's assigned outline style list level as list level, if paragraph has no list level set already. 2009-08-27 15:23:34 +0200 od r275489 : #i101234# method <SwWrtShell::NumOrBulletOn(..)> - check before activation of certain list level of outline numbering, a numbering format is already set. In this only continue the outline numbering. 2009-08-27 14:15:07 +0200 od r275483 : #i95907# method <SwWrtShell::NumOrBulletOn(..)> - consider leading tab stops and intentation of paragraph first text line, when a new list style is created for its application to the selection. 2009-08-26 09:51:39 +0200 od r275401 : #i86492# Adjust copy of text nodes regarding lists - copy of part of paragraph in list does not copy list style and list id - copy of paragraphs in list into another list continues destination list - copy of paragraphs (at least one not in a list) at empty paragraph following a list does not continue the destination list. 2009-08-25 10:30:53 +0200 od r275339 : #i101349# method <XMLTextImportHelper::SetStyleAndAttrs(..) - assure that list style of automatic paragraph style is applied at paragraph.
2009-09-08 13:44:38 +00:00
if ( !rFrm.IsFlowFrm() )
{
CWS-TOOLING: integrate CWS sw32numbf01 2009-09-04 10:01:07 +0200 od r275780 : #i95907# method <SwWrtShell::NumOfBulletOn(..)> - adjust indentation of newly created automatic list style --> due to MRU add actual paragraph indentation to created automatic list style's indentation 2009-09-02 11:57:40 +0200 od r275703 : #i95907# method <SwTxtMargin::CtorInitTxtMargin(..)> - correct handling of paragraph indents, when list level indents are applicable. 2009-09-01 16:59:47 +0200 od r275671 : CWS-TOOLING: rebase CWS sw32numbf01 to trunk@275331 (milestone: DEV300:m56) 2009-08-28 16:42:34 +0200 od r275540 : #i102458# method <SwFlowFrm::CalcUpperSpace(..)> - correct handling of leading line spacing method <GetSpacingValuesOfFrm(..)> - add output parameter <obIsLineSpacingProportional> 2009-08-27 17:03:07 +0200 od r275496 : #i101516# method <SwTxtNode::SwTxtNode(..)> - in case that the paragraph is add to a list, apply paragraph style's assigned outline style list level as list level, if paragraph has no list level set already. 2009-08-27 15:23:34 +0200 od r275489 : #i101234# method <SwWrtShell::NumOrBulletOn(..)> - check before activation of certain list level of outline numbering, a numbering format is already set. In this only continue the outline numbering. 2009-08-27 14:15:07 +0200 od r275483 : #i95907# method <SwWrtShell::NumOrBulletOn(..)> - consider leading tab stops and intentation of paragraph first text line, when a new list style is created for its application to the selection. 2009-08-26 09:51:39 +0200 od r275401 : #i86492# Adjust copy of text nodes regarding lists - copy of part of paragraph in list does not copy list style and list id - copy of paragraphs in list into another list continues destination list - copy of paragraphs (at least one not in a list) at empty paragraph following a list does not continue the destination list. 2009-08-25 10:30:53 +0200 od r275339 : #i101349# method <XMLTextImportHelper::SetStyleAndAttrs(..) - assure that list style of automatic paragraph style is applied at paragraph.
2009-09-08 13:44:38 +00:00
onLowerSpacing = 0;
onLineSpacing = 0;
}
else
{
CWS-TOOLING: integrate CWS sw32numbf01 2009-09-04 10:01:07 +0200 od r275780 : #i95907# method <SwWrtShell::NumOfBulletOn(..)> - adjust indentation of newly created automatic list style --> due to MRU add actual paragraph indentation to created automatic list style's indentation 2009-09-02 11:57:40 +0200 od r275703 : #i95907# method <SwTxtMargin::CtorInitTxtMargin(..)> - correct handling of paragraph indents, when list level indents are applicable. 2009-09-01 16:59:47 +0200 od r275671 : CWS-TOOLING: rebase CWS sw32numbf01 to trunk@275331 (milestone: DEV300:m56) 2009-08-28 16:42:34 +0200 od r275540 : #i102458# method <SwFlowFrm::CalcUpperSpace(..)> - correct handling of leading line spacing method <GetSpacingValuesOfFrm(..)> - add output parameter <obIsLineSpacingProportional> 2009-08-27 17:03:07 +0200 od r275496 : #i101516# method <SwTxtNode::SwTxtNode(..)> - in case that the paragraph is add to a list, apply paragraph style's assigned outline style list level as list level, if paragraph has no list level set already. 2009-08-27 15:23:34 +0200 od r275489 : #i101234# method <SwWrtShell::NumOrBulletOn(..)> - check before activation of certain list level of outline numbering, a numbering format is already set. In this only continue the outline numbering. 2009-08-27 14:15:07 +0200 od r275483 : #i95907# method <SwWrtShell::NumOrBulletOn(..)> - consider leading tab stops and intentation of paragraph first text line, when a new list style is created for its application to the selection. 2009-08-26 09:51:39 +0200 od r275401 : #i86492# Adjust copy of text nodes regarding lists - copy of part of paragraph in list does not copy list style and list id - copy of paragraphs in list into another list continues destination list - copy of paragraphs (at least one not in a list) at empty paragraph following a list does not continue the destination list. 2009-08-25 10:30:53 +0200 od r275339 : #i101349# method <XMLTextImportHelper::SetStyleAndAttrs(..) - assure that list style of automatic paragraph style is applied at paragraph.
2009-09-08 13:44:38 +00:00
const SvxULSpaceItem& rULSpace = rFrm.GetAttrSet()->GetULSpace();
onLowerSpacing = rULSpace.GetLower();
CWS-TOOLING: integrate CWS sw32numbf01 2009-09-04 10:01:07 +0200 od r275780 : #i95907# method <SwWrtShell::NumOfBulletOn(..)> - adjust indentation of newly created automatic list style --> due to MRU add actual paragraph indentation to created automatic list style's indentation 2009-09-02 11:57:40 +0200 od r275703 : #i95907# method <SwTxtMargin::CtorInitTxtMargin(..)> - correct handling of paragraph indents, when list level indents are applicable. 2009-09-01 16:59:47 +0200 od r275671 : CWS-TOOLING: rebase CWS sw32numbf01 to trunk@275331 (milestone: DEV300:m56) 2009-08-28 16:42:34 +0200 od r275540 : #i102458# method <SwFlowFrm::CalcUpperSpace(..)> - correct handling of leading line spacing method <GetSpacingValuesOfFrm(..)> - add output parameter <obIsLineSpacingProportional> 2009-08-27 17:03:07 +0200 od r275496 : #i101516# method <SwTxtNode::SwTxtNode(..)> - in case that the paragraph is add to a list, apply paragraph style's assigned outline style list level as list level, if paragraph has no list level set already. 2009-08-27 15:23:34 +0200 od r275489 : #i101234# method <SwWrtShell::NumOrBulletOn(..)> - check before activation of certain list level of outline numbering, a numbering format is already set. In this only continue the outline numbering. 2009-08-27 14:15:07 +0200 od r275483 : #i95907# method <SwWrtShell::NumOrBulletOn(..)> - consider leading tab stops and intentation of paragraph first text line, when a new list style is created for its application to the selection. 2009-08-26 09:51:39 +0200 od r275401 : #i86492# Adjust copy of text nodes regarding lists - copy of part of paragraph in list does not copy list style and list id - copy of paragraphs in list into another list continues destination list - copy of paragraphs (at least one not in a list) at empty paragraph following a list does not continue the destination list. 2009-08-25 10:30:53 +0200 od r275339 : #i101349# method <XMLTextImportHelper::SetStyleAndAttrs(..) - assure that list style of automatic paragraph style is applied at paragraph.
2009-09-08 13:44:38 +00:00
onLineSpacing = 0;
obIsLineSpacingProportional = false;
if ( rFrm.IsTxtFrm() )
{
CWS-TOOLING: integrate CWS sw32numbf01 2009-09-04 10:01:07 +0200 od r275780 : #i95907# method <SwWrtShell::NumOfBulletOn(..)> - adjust indentation of newly created automatic list style --> due to MRU add actual paragraph indentation to created automatic list style's indentation 2009-09-02 11:57:40 +0200 od r275703 : #i95907# method <SwTxtMargin::CtorInitTxtMargin(..)> - correct handling of paragraph indents, when list level indents are applicable. 2009-09-01 16:59:47 +0200 od r275671 : CWS-TOOLING: rebase CWS sw32numbf01 to trunk@275331 (milestone: DEV300:m56) 2009-08-28 16:42:34 +0200 od r275540 : #i102458# method <SwFlowFrm::CalcUpperSpace(..)> - correct handling of leading line spacing method <GetSpacingValuesOfFrm(..)> - add output parameter <obIsLineSpacingProportional> 2009-08-27 17:03:07 +0200 od r275496 : #i101516# method <SwTxtNode::SwTxtNode(..)> - in case that the paragraph is add to a list, apply paragraph style's assigned outline style list level as list level, if paragraph has no list level set already. 2009-08-27 15:23:34 +0200 od r275489 : #i101234# method <SwWrtShell::NumOrBulletOn(..)> - check before activation of certain list level of outline numbering, a numbering format is already set. In this only continue the outline numbering. 2009-08-27 14:15:07 +0200 od r275483 : #i95907# method <SwWrtShell::NumOrBulletOn(..)> - consider leading tab stops and intentation of paragraph first text line, when a new list style is created for its application to the selection. 2009-08-26 09:51:39 +0200 od r275401 : #i86492# Adjust copy of text nodes regarding lists - copy of part of paragraph in list does not copy list style and list id - copy of paragraphs in list into another list continues destination list - copy of paragraphs (at least one not in a list) at empty paragraph following a list does not continue the destination list. 2009-08-25 10:30:53 +0200 od r275339 : #i101349# method <XMLTextImportHelper::SetStyleAndAttrs(..) - assure that list style of automatic paragraph style is applied at paragraph.
2009-09-08 13:44:38 +00:00
onLineSpacing = static_cast<const SwTxtFrm&>(rFrm).GetLineSpace();
obIsLineSpacingProportional =
onLineSpacing != 0 &&
static_cast<const SwTxtFrm&>(rFrm).GetLineSpace( true ) == 0;
}
OSL_ENSURE( onLowerSpacing >= 0 && onLineSpacing >= 0,
"<GetSpacingValuesOfFrm(..)> - spacing values aren't positive!" );
}
}
/** method to get the content of the table cell, skipping content from nested tables
*/
const SwCntntFrm* GetCellCntnt( const SwLayoutFrm& rCell )
{
const SwCntntFrm* pCntnt = rCell.ContainsCntnt();
const SwTabFrm* pTab = rCell.FindTabFrm();
while ( pCntnt && rCell.IsAnLower( pCntnt ) )
{
const SwTabFrm* pTmpTab = pCntnt->FindTabFrm();
if ( pTmpTab != pTab )
{
pCntnt = pTmpTab->FindLastCntnt();
if ( pCntnt )
pCntnt = pCntnt->FindNextCnt();
}
else
break;
}
return pCntnt;
}
/** Can be used to check if a frame has been deleted
*/
bool SwDeletionChecker::HasBeenDeleted()
{
if ( !mpFrm || !mpRegIn )
return false;
SwIterator<SwFrm,SwModify> aIter(*mpRegIn);
SwFrm* pLast = aIter.First();
while ( pLast )
{
if ( pLast == mpFrm )
return false;
pLast = aIter.Next();
}
return true;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */