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

3221 lines
114 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 <txtftn.hxx>
#include <fmtftn.hxx>
#include <ftnidx.hxx>
#include <pagefrm.hxx>
#include <colfrm.hxx>
#include <rootfrm.hxx>
#include <cntfrm.hxx>
#include <doc.hxx>
#include <ndtxt.hxx>
#include <frmtool.hxx>
#include <swtable.hxx>
#include <ftnfrm.hxx>
#include <txtfrm.hxx>
#include <tabfrm.hxx>
#include <pagedesc.hxx>
#include <ftninfo.hxx>
#include <ndindex.hxx>
#include <sectfrm.hxx>
#include <pam.hxx>
// --> OD 2005-05-17 #i49383#
#include <objectformatter.hxx>
// <--
2000-09-18 23:08:29 +00:00
/*************************************************************************
|*
|* lcl_FindFtnPos() Sucht die Position des Attributes im FtnArray am
|* Dokument, dort stehen die Fussnoten gluecklicherweise nach ihrem
|* Index sortiert.
|*
|*************************************************************************/
#define ENDNOTE 0x80000000
sal_uLong MA_FASTCALL lcl_FindFtnPos( const SwDoc *pDoc, const SwTxtFtn *pAttr )
2000-09-18 23:08:29 +00:00
{
const SwFtnIdxs &rFtnIdxs = pDoc->GetFtnIdxs();
sal_uInt16 nRet;
2000-09-18 23:08:29 +00:00
SwTxtFtnPtr pBla = (SwTxtFtn*)pAttr;
if ( rFtnIdxs.Seek_Entry( pBla, &nRet ) )
{
if( pAttr->GetFtn().IsEndNote() )
return sal_uLong(nRet) + ENDNOTE;
2000-09-18 23:08:29 +00:00
return nRet;
}
OSL_ENSURE( !pDoc, "FtnPos not found." );
2000-09-18 23:08:29 +00:00
return 0;
}
sal_Bool SwFtnFrm::operator<( const SwTxtFtn* pTxtFtn ) const
2000-09-18 23:08:29 +00:00
{
const SwDoc* pDoc = GetFmt()->GetDoc();
OSL_ENSURE( pDoc, "SwFtnFrm: Missing doc!" );
2000-09-18 23:08:29 +00:00
return lcl_FindFtnPos( pDoc, GetAttr() ) <
lcl_FindFtnPos( pDoc, pTxtFtn );
}
/*************************************************************************
|*
|* sal_Bool lcl_NextFtnBoss( SwFtnBossFrm* pBoss, SwPageFrm* pPage)
2000-09-18 23:08:29 +00:00
|* setzt pBoss auf den naechsten SwFtnBossFrm, das kann entweder eine Spalte
|* oder eine Seite (ohne Spalten) sein. Wenn die Seite dabei gewechselt wird
|* enthaelt pPage die neue Seite und die Funktion liefert sal_True.
2000-09-18 23:08:29 +00:00
|*
|*************************************************************************/
sal_Bool lcl_NextFtnBoss( SwFtnBossFrm* &rpBoss, SwPageFrm* &rpPage,
sal_Bool bDontLeave )
2000-09-18 23:08:29 +00:00
{
if( rpBoss->IsColumnFrm() )
{
if( rpBoss->GetNext() )
{
rpBoss = (SwFtnBossFrm*)rpBoss->GetNext(); //naechste Spalte
return sal_False;
2000-09-18 23:08:29 +00:00
}
if( rpBoss->IsInSct() )
{
SwSectionFrm* pSct = rpBoss->FindSctFrm()->GetFollow();
if( pSct )
{
OSL_ENSURE( pSct->Lower() && pSct->Lower()->IsColumnFrm(),
2000-09-18 23:08:29 +00:00
"Where's the column?" );
rpBoss = (SwColumnFrm*)pSct->Lower();
SwPageFrm* pOld = rpPage;
rpPage = pSct->FindPageFrm();
return pOld != rpPage;
}
else if( bDontLeave )
{
rpPage = NULL;
rpBoss = NULL;
return sal_False;
2000-09-18 23:08:29 +00:00
}
}
}
rpPage = (SwPageFrm*)rpPage->GetNext(); // naechste Seite
rpBoss = rpPage;
if( rpPage )
{
SwLayoutFrm* pBody = rpPage->FindBodyCont();
if( pBody && pBody->Lower() && pBody->Lower()->IsColumnFrm() )
rpBoss = (SwFtnBossFrm*)pBody->Lower(); // erste Spalte
}
return sal_True;
2000-09-18 23:08:29 +00:00
}
/*************************************************************************
|*
|* sal_uInt16 lcl_ColumnNum( SwFrm* pBoss )
2000-09-18 23:08:29 +00:00
|* liefert die Spaltennummer, wenn pBoss eine Spalte ist,
|* sonst eine Null (bei Seiten).
|*
|*************************************************************************/
sal_uInt16 lcl_ColumnNum( const SwFrm* pBoss )
2000-09-18 23:08:29 +00:00
{
sal_uInt16 nRet = 0;
2000-09-18 23:08:29 +00:00
if( !pBoss->IsColumnFrm() )
return 0;
const SwFrm* pCol;
if( pBoss->IsInSct() )
{
pCol = pBoss->GetUpper()->FindColFrm();
if( pBoss->GetNext() || pBoss->GetPrev() )
{
while( pBoss )
{
++nRet; // Section columns
pBoss = pBoss->GetPrev();
}
}
}
else
pCol = pBoss;
while( pCol )
{
nRet += 256; // Page columns
pCol = pCol->GetPrev();
}
return nRet;
}
/*************************************************************************
|*
|* SwFtnContFrm::SwFtnContFrm()
|*
|*************************************************************************/
SwFtnContFrm::SwFtnContFrm( SwFrmFmt *pFmt ):
SwLayoutFrm( pFmt )
{
nType = FRMC_FTNCONT;
2000-09-18 23:08:29 +00:00
}
// lcl_Undersize(..) klappert einen SwFrm und dessen Inneres ab
// und liefert die Summe aller TxtFrm-Vergroesserungswuensche
long lcl_Undersize( const SwFrm* pFrm )
{
long nRet = 0;
2001-10-08 13:10:07 +00:00
SWRECTFN( pFrm )
2000-09-18 23:08:29 +00:00
if( pFrm->IsTxtFrm() )
{
if( ((SwTxtFrm*)pFrm)->IsUndersized() )
2001-10-08 13:10:07 +00:00
{
2000-09-18 23:08:29 +00:00
// Dieser TxtFrm waere gern ein bisschen groesser
2001-10-08 13:10:07 +00:00
nRet = ((SwTxtFrm*)pFrm)->GetParHeight() -
(pFrm->Prt().*fnRect->fnGetHeight)();
2000-09-18 23:08:29 +00:00
if( nRet < 0 )
nRet = 0;
2001-10-08 13:10:07 +00:00
}
2000-09-18 23:08:29 +00:00
}
else if( pFrm->IsLayoutFrm() )
{
const SwFrm* pNxt = ((SwLayoutFrm*)pFrm)->Lower();
while( pNxt )
{
nRet += lcl_Undersize( pNxt );
pNxt = pNxt->GetNext();
}
}
return nRet;
}
/*************************************************************************
|*
|* SwFtnContFrm::Format()
|*
|* Beschreibung: "Formatiert" den Frame;
|* Die Fixsize wird hier nicht eingestellt.
|*
|*************************************************************************/
void SwFtnContFrm::Format( const SwBorderAttrs * )
{
//GesamtBorder ermitteln, es gibt nur einen Abstand nach oben.
const SwPageFrm* pPage = FindPageFrm();
const SwPageFtnInfo &rInf = pPage->GetPageDesc()->GetFtnInfo();
const SwTwips nBorder = rInf.GetTopDist() + rInf.GetBottomDist() +
rInf.GetLineWidth();
2001-10-08 13:10:07 +00:00
SWRECTFN( this )
2000-09-18 23:08:29 +00:00
if ( !bValidPrtArea )
{
bValidPrtArea = sal_True;
2001-10-08 13:10:07 +00:00
(Prt().*fnRect->fnSetTop)( nBorder );
(Prt().*fnRect->fnSetWidth)( (Frm().*fnRect->fnGetWidth)() );
(Prt().*fnRect->fnSetHeight)((Frm().*fnRect->fnGetHeight)() - nBorder );
if( (Prt().*fnRect->fnGetHeight)() < 0 && !pPage->IsFtnPage() )
bValidSize = sal_False;
2000-09-18 23:08:29 +00:00
}
if ( !bValidSize )
{
if ( pPage->IsFtnPage() && !GetFmt()->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE) )
Grow( LONG_MAX, sal_False );
2000-09-18 23:08:29 +00:00
else
{
//Die Groesse in der VarSize wird durch den Inhalt plus den
//Raendern bestimmt.
SwTwips nRemaining = 0;
SwFrm *pFrm = pLower;
while ( pFrm )
{ // lcl_Undersize(..) beruecksichtigt (rekursiv) TxtFrms, die gerne
// groesser waeren. Diese entstehen insbesondere in spaltigen Rahmen,
// wenn diese noch nicht ihre maximale Groesse haben.
2001-10-08 13:10:07 +00:00
nRemaining += (pFrm->Frm().*fnRect->fnGetHeight)()
+ lcl_Undersize( pFrm );
2000-09-18 23:08:29 +00:00
pFrm = pFrm->GetNext();
}
//Jetzt noch den Rand addieren
nRemaining += nBorder;
SwTwips nDiff;
if( IsInSct() )
{
2001-12-12 13:44:09 +00:00
nDiff = -(Frm().*fnRect->fnBottomDist)(
(GetUpper()->*fnRect->fnGetPrtBottom)() );
2001-11-22 08:36:37 +00:00
if( nDiff > 0 )
{
if( nDiff > (Frm().*fnRect->fnGetHeight)() )
nDiff = (Frm().*fnRect->fnGetHeight)();
(Frm().*fnRect->fnAddBottom)( -nDiff );
(Prt().*fnRect->fnAddHeight)( -nDiff );
}
2000-09-18 23:08:29 +00:00
}
2001-10-08 13:10:07 +00:00
nDiff = (Frm().*fnRect->fnGetHeight)() - nRemaining;
2000-09-18 23:08:29 +00:00
if ( nDiff > 0 )
Shrink( nDiff );
2000-09-18 23:08:29 +00:00
else if ( nDiff < 0 )
{
Grow( -nDiff );
2000-09-18 23:08:29 +00:00
//Es kann passieren, dass weniger Platz zur Verfuegung steht,
//als der bereits der Border benoetigt - die Groesse der
//PrtArea wird dann negativ.
2001-10-08 13:10:07 +00:00
SwTwips nPrtHeight = (Prt().*fnRect->fnGetHeight)();
if( nPrtHeight < 0 )
{
const SwTwips nTmpDiff = Max( (Prt().*fnRect->fnGetTop)(),
2001-10-08 13:10:07 +00:00
-nPrtHeight );
(Prt().*fnRect->fnSubTop)( nTmpDiff );
2001-10-08 13:10:07 +00:00
}
2000-09-18 23:08:29 +00:00
}
}
bValidSize = sal_True;
2000-09-18 23:08:29 +00:00
}
}
/*************************************************************************
|*
|* SwFtnContFrm::GrowFrm(), ShrinkFrm()
|*
|*************************************************************************/
SwTwips SwFtnContFrm::GrowFrm( SwTwips nDist, sal_Bool bTst, sal_Bool )
2000-09-18 23:08:29 +00:00
{
//Keine Pruefung ob FixSize oder nicht, die FtnContainer sind immer bis
//zur Maximalhoehe variabel.
//Wenn die Maximalhoehe LONG_MAX ist, so nehmen wir uns soviel Platz wie eben
//moeglich.
//Wenn die Seite eine spezielle Fussnotenseite ist, so nehmen wir uns auch
//soviel Platz wie eben moeglich.
#if OSL_DEBUG_LEVEL > 1
2000-09-18 23:08:29 +00:00
if ( !GetUpper() || !GetUpper()->IsFtnBossFrm() )
{ OSL_ENSURE( !this, "Keine FtnBoss." );
2000-09-18 23:08:29 +00:00
return 0;
}
#endif
2001-10-19 09:25:19 +00:00
SWRECTFN( this )
if( (Frm().*fnRect->fnGetHeight)() > 0 &&
nDist > ( LONG_MAX - (Frm().*fnRect->fnGetHeight)() ) )
nDist = LONG_MAX - (Frm().*fnRect->fnGetHeight)();
2000-09-18 23:08:29 +00:00
SwFtnBossFrm *pBoss = (SwFtnBossFrm*)GetUpper();
if( IsInSct() )
{
SwSectionFrm* pSect = FindSctFrm();
OSL_ENSURE( pSect, "GrowFrm: Missing SectFrm" );
2000-09-18 23:08:29 +00:00
// In a section, which has to maximize, a footnotecontainer is allowed
// to grow, when the section can't grow anymore.
if( !bTst && !pSect->IsColLocked() &&
pSect->ToMaximize( sal_False ) && pSect->Growable() )
2000-09-18 23:08:29 +00:00
{
pSect->InvalidateSize();
return 0;
}
}
const bool bBrowseMode = GetFmt()->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE);
2000-09-18 23:08:29 +00:00
SwPageFrm *pPage = pBoss->FindPageFrm();
if ( bBrowseMode || !pPage->IsFtnPage() )
2000-09-18 23:08:29 +00:00
{
if ( pBoss->GetMaxFtnHeight() != LONG_MAX )
{
2001-08-29 09:47:32 +00:00
nDist = Min( nDist, pBoss->GetMaxFtnHeight()
2001-10-19 09:25:19 +00:00
- (Frm().*fnRect->fnGetHeight)() );
2000-09-18 23:08:29 +00:00
if ( nDist <= 0 )
return 0L;
}
//Der FtnBoss will bezueglich des MaxWerts auch noch mitreden.
if( !IsInSct() )
{
const SwTwips nMax = pBoss->GetVarSpace();
if ( nDist > nMax )
nDist = nMax;
if ( nDist <= 0 )
return 0L;
}
}
2001-10-19 09:25:19 +00:00
else if( nDist > (GetPrev()->Frm().*fnRect->fnGetHeight)() )
2001-10-08 13:10:07 +00:00
//aber mehr als der Body kann koennen und wollen wir nun auch wieder
//nicht herausruecken.
2001-10-19 09:25:19 +00:00
nDist = (GetPrev()->Frm().*fnRect->fnGetHeight)();
2001-10-08 13:10:07 +00:00
long nAvail = 0;
if ( bBrowseMode )
2001-10-08 13:10:07 +00:00
{
2001-10-19 09:25:19 +00:00
nAvail = GetUpper()->Prt().Height();
2001-10-08 13:10:07 +00:00
const SwFrm *pAvail = GetUpper()->Lower();
do
2001-10-19 09:25:19 +00:00
{ nAvail -= pAvail->Frm().Height();
2001-10-08 13:10:07 +00:00
pAvail = pAvail->GetNext();
} while ( pAvail );
if ( nAvail > nDist )
nAvail = nDist;
}
if ( !bTst )
{
2001-10-19 09:25:19 +00:00
(Frm().*fnRect->fnSetHeight)( (Frm().*fnRect->fnGetHeight)() + nDist );
2009-03-04 16:19:59 +00:00
//Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
if( IsVertical() && !IsVertLR() && !IsReverse() )
2001-10-08 13:10:07 +00:00
Frm().Pos().X() -= nDist;
}
2000-09-18 23:08:29 +00:00
long nGrow = nDist - nAvail,
nReal = 0;
if ( nGrow > 0 )
{
sal_uInt8 nAdjust = pBoss->NeighbourhoodAdjustment( this );
2000-09-18 23:08:29 +00:00
if( NA_ONLY_ADJUST == nAdjust )
nReal = AdjustNeighbourhood( nGrow, bTst );
else
{
if( NA_GROW_ADJUST == nAdjust )
{
SwFrm* pFtn = Lower();
if( pFtn )
{
while( pFtn->GetNext() )
pFtn = pFtn->GetNext();
if( ((SwFtnFrm*)pFtn)->GetAttr()->GetFtn().IsEndNote() )
{
nReal = AdjustNeighbourhood( nGrow, bTst );
nAdjust = NA_GROW_SHRINK; // no more AdjustNeighbourhood
}
}
}
2001-10-19 09:25:19 +00:00
nReal += pBoss->Grow( nGrow - nReal, bTst );
2000-09-18 23:08:29 +00:00
if( ( NA_GROW_ADJUST == nAdjust || NA_ADJUST_GROW == nAdjust )
&& nReal < nGrow )
nReal += AdjustNeighbourhood( nGrow - nReal, bTst );
}
}
nReal += nAvail;
if ( !bTst )
{
if ( nReal != nDist )
2001-08-29 09:47:32 +00:00
{
nDist -= nReal;
2000-09-18 23:08:29 +00:00
//Den masslosen Wunsch koennen wir leider nur in Grenzen erfuellen.
2001-10-19 09:25:19 +00:00
Frm().SSize().Height() -= nDist;
2009-03-04 16:19:59 +00:00
//Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
if( IsVertical() && !IsVertLR() && !IsReverse() )
2001-08-29 09:47:32 +00:00
Frm().Pos().X() += nDist;
}
2000-09-18 23:08:29 +00:00
//Nachfolger braucht nicht invalidiert werden, denn wir wachsen
//immer nach oben.
if( nReal )
{
_InvalidateSize();
_InvalidatePos();
InvalidatePage( pPage );
}
}
return nReal;
}
SwTwips SwFtnContFrm::ShrinkFrm( SwTwips nDiff, sal_Bool bTst, sal_Bool bInfo )
2001-10-19 09:25:19 +00:00
{
SwPageFrm *pPage = FindPageFrm();
if ( pPage &&
( !pPage->IsFtnPage() ||
GetFmt()->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE) ) )
2001-10-19 09:25:19 +00:00
{
SwTwips nRet = SwLayoutFrm::ShrinkFrm( nDiff, bTst, bInfo );
2001-11-22 08:36:37 +00:00
if( IsInSct() && !bTst )
FindSctFrm()->InvalidateNextPos();
2000-09-18 23:08:29 +00:00
if ( !bTst && nRet )
{
_InvalidatePos();
InvalidatePage( pPage );
}
return nRet;
}
return 0;
}
/*************************************************************************
|*
|* SwFtnFrm::SwFtnFrm()
|*
|*************************************************************************/
SwFtnFrm::SwFtnFrm( SwFrmFmt *pFmt, SwCntntFrm *pCnt, SwTxtFtn *pAt ):
SwLayoutFrm( pFmt ),
pFollow( 0 ),
pMaster( 0 ),
pRef( pCnt ),
pAttr( pAt ),
bBackMoveLocked( sal_False ),
// --> OD 2005-08-11 #i49383#
mbUnlockPosOfLowerObjs( true )
// <--
2000-09-18 23:08:29 +00:00
{
nType = FRMC_FTN;
2000-09-18 23:08:29 +00:00
}
/*************************************************************************
|*
|* SwFtnFrm::InvalidateNxtFtnCnts()
|*
|*************************************************************************/
void SwFtnFrm::InvalidateNxtFtnCnts( SwPageFrm *pPage )
{
if ( GetNext() )
{
SwFrm *pCnt = ((SwLayoutFrm*)GetNext())->ContainsAny();
if( pCnt )
{
pCnt->InvalidatePage( pPage );
pCnt->_InvalidatePrt();
do
{ pCnt->_InvalidatePos();
if( pCnt->IsSctFrm() )
{
SwFrm* pTmp = ((SwSectionFrm*)pCnt)->ContainsAny();
if( pTmp )
pTmp->_InvalidatePos();
}
pCnt->GetUpper()->_InvalidateSize();
pCnt = pCnt->FindNext();
} while ( pCnt && GetUpper()->IsAnLower( pCnt ) );
}
}
}
#if OSL_DEBUG_LEVEL > 1
2000-09-18 23:08:29 +00:00
SwTwips SwFtnFrm::GrowFrm( SwTwips nDist, sal_Bool bTst, sal_Bool bInfo )
2001-10-19 09:25:19 +00:00
{
static sal_uInt16 nNum = USHRT_MAX;
2001-10-19 09:25:19 +00:00
SwTxtFtn* pTxtFtn = GetAttr();
if ( pTxtFtn->GetFtn().GetNumber() == nNum )
{
int bla = 5;
(void)bla;
2001-10-19 09:25:19 +00:00
}
return SwLayoutFrm::GrowFrm( nDist, bTst, bInfo );
}
2000-09-18 23:08:29 +00:00
SwTwips SwFtnFrm::ShrinkFrm( SwTwips nDist, sal_Bool bTst, sal_Bool bInfo )
2001-10-19 09:25:19 +00:00
{
static sal_uInt16 nNum = USHRT_MAX;
2001-10-19 09:25:19 +00:00
if( nNum != USHRT_MAX )
{
SwTxtFtn* pTxtFtn = GetAttr();
if( &pTxtFtn->GetAttr() && pTxtFtn->GetFtn().GetNumber() == nNum )
{
int bla = 5;
(void)bla;
2001-10-19 09:25:19 +00:00
}
}
return SwLayoutFrm::ShrinkFrm( nDist, bTst, bInfo );
}
#endif
2000-09-18 23:08:29 +00:00
/*************************************************************************
|*
|* SwFtnFrm::Cut()
|*
|*************************************************************************/
void SwFtnFrm::Cut()
{
if ( GetNext() )
GetNext()->InvalidatePos();
else if ( GetPrev() )
GetPrev()->SetRetouche();
//Erst removen, dann Upper Shrinken.
SwLayoutFrm *pUp = GetUpper();
//Verkettung korrigieren.
SwFtnFrm *pFtn = (SwFtnFrm*)this;
if ( pFtn->GetFollow() )
pFtn->GetFollow()->SetMaster( pFtn->GetMaster() );
if ( pFtn->GetMaster() )
pFtn->GetMaster()->SetFollow( pFtn->GetFollow() );
pFtn->SetFollow( 0 );
pFtn->SetMaster( 0 );
// Alle Verbindungen kappen.
Remove();
if ( pUp )
{
//Die letzte Fussnote nimmt ihren Container mit.
if ( !pUp->Lower() )
{
SwPageFrm *pPage = pUp->FindPageFrm();
if ( pPage )
{
SwLayoutFrm *pBody = pPage->FindBodyCont();
if ( !pBody->ContainsCntnt() )
pPage->FindRootFrm()->SetSuperfluous();
}
SwSectionFrm* pSect = pUp->FindSctFrm();
pUp->Cut();
delete pUp;
// Wenn der letzte Fussnotencontainer aus einem spaltigen Bereich verschwindet,
// so kann dieser, falls er keinen Follow besitzt, zusammenschrumpfen.
if( pSect && !pSect->ToMaximize( sal_False ) && !pSect->IsColLocked() )
2000-09-18 23:08:29 +00:00
pSect->_InvalidateSize();
}
else
{ if ( Frm().Height() )
pUp->Shrink( Frm().Height() );
2000-09-18 23:08:29 +00:00
pUp->SetCompletePaint();
pUp->InvalidatePage();
}
}
}
/*************************************************************************
|*
|* SwFtnFrm::Paste()
|*
|*************************************************************************/
void SwFtnFrm::Paste( SwFrm* pParent, SwFrm* pSibling )
{
OSL_ENSURE( pParent, "Kein Parent fuer Paste." );
OSL_ENSURE( pParent->IsLayoutFrm(), "Parent ist CntntFrm." );
OSL_ENSURE( pParent != this, "Bin selbst der Parent." );
OSL_ENSURE( pSibling != this, "Bin mein eigener Nachbar." );
OSL_ENSURE( !GetPrev() && !GetNext() && !GetUpper(),
2000-09-18 23:08:29 +00:00
"Bin noch irgendwo angemeldet." );
//In den Baum einhaengen.
InsertBefore( (SwLayoutFrm*)pParent, pSibling );
2001-10-08 13:10:07 +00:00
SWRECTFN( this )
if( (Frm().*fnRect->fnGetWidth)()!=(pParent->Prt().*fnRect->fnGetWidth)() )
2000-09-18 23:08:29 +00:00
_InvalidateSize();
_InvalidatePos();
SwPageFrm *pPage = FindPageFrm();
InvalidatePage( pPage );
if ( GetNext() )
GetNext()->_InvalidatePos();
2001-10-08 13:10:07 +00:00
if( (Frm().*fnRect->fnGetHeight)() )
2001-10-19 09:25:19 +00:00
pParent->Grow( (Frm().*fnRect->fnGetHeight)() );
2000-09-18 23:08:29 +00:00
//Wenn mein Vorgaenger mein Master ist und/oder wenn mein Nachfolger mein
//Follow ist so kann ich deren Inhalt uebernehmen und sie vernichten.
if ( GetPrev() && GetPrev() == GetMaster() )
{ OSL_ENSURE( SwFlowFrm::CastFlowFrm( GetPrev()->GetLower() ),
2000-09-18 23:08:29 +00:00
"Fussnote ohne Inhalt?" );
(SwFlowFrm::CastFlowFrm( GetPrev()->GetLower()))->
MoveSubTree( this, GetLower() );
SwFrm *pDel = GetPrev();
pDel->Cut();
delete pDel;
}
if ( GetNext() && GetNext() == GetFollow() )
{ OSL_ENSURE( SwFlowFrm::CastFlowFrm( GetNext()->GetLower() ),
2000-09-18 23:08:29 +00:00
"Fussnote ohne Inhalt?" );
(SwFlowFrm::CastFlowFrm( GetNext()->GetLower()))->MoveSubTree( this );
SwFrm *pDel = GetNext();
pDel->Cut();
delete pDel;
}
#if OSL_DEBUG_LEVEL > 1
2000-09-18 23:08:29 +00:00
SwDoc *pDoc = GetFmt()->GetDoc();
if ( GetPrev() )
{
OSL_ENSURE( lcl_FindFtnPos( pDoc, ((SwFtnFrm*)GetPrev())->GetAttr() ) <=
2000-09-18 23:08:29 +00:00
lcl_FindFtnPos( pDoc, GetAttr() ), "Prev ist not FtnPrev" );
}
if ( GetNext() )
{
OSL_ENSURE( lcl_FindFtnPos( pDoc, GetAttr() ) <=
2000-09-18 23:08:29 +00:00
lcl_FindFtnPos( pDoc, ((SwFtnFrm*)GetNext())->GetAttr() ),
"Next is not FtnNext" );
}
#endif
InvalidateNxtFtnCnts( pPage );
}
/*************************************************************************
|*
|* SwFrm::GetNextFtnLeaf()
|*
|* Beschreibung Liefert das naechste LayoutBlatt in den das
|* Frame gemoved werden kann.
|* Neue Seiten werden nur dann erzeugt, wenn der Parameter sal_True ist.
2000-09-18 23:08:29 +00:00
|*
|*************************************************************************/
SwLayoutFrm *SwFrm::GetNextFtnLeaf( MakePageType eMakePage )
{
SwFtnBossFrm *pOldBoss = FindFtnBossFrm();
SwPageFrm* pOldPage = pOldBoss->FindPageFrm();
SwPageFrm* pPage;
SwFtnBossFrm *pBoss = pOldBoss->IsColumnFrm() ?
(SwFtnBossFrm*)pOldBoss->GetNext() : 0; // naechste Spalte, wenn vorhanden
if( pBoss )
pPage = NULL;
else
{
if( pOldBoss->GetUpper()->IsSctFrm() )
{ // Das kann nur in einem spaltigen Bereich sein
SwLayoutFrm* pNxt = pOldBoss->GetNextSctLeaf( eMakePage );
if( pNxt )
{
OSL_ENSURE( pNxt->IsColBodyFrm(), "GetNextFtnLeaf: Funny Leaf" );
2000-09-18 23:08:29 +00:00
pBoss = (SwFtnBossFrm*)pNxt->GetUpper();
pPage = pBoss->FindPageFrm();
}
else
return 0;
}
else
{
// naechste Seite
pPage = (SwPageFrm*)pOldPage->GetNext();
// Leerseiten ueberspringen
if( pPage && pPage->IsEmptyPage() )
pPage = (SwPageFrm*)pPage->GetNext();
pBoss = pPage;
}
}
// Was haben wir jetzt?
// pBoss != NULL, pPage==NULL => pBoss ist die auf der gleichen Seite folgende Spalte
// pBoss != NULL, pPage!=NULL => pBoss und pPage sind die folgende Seite (Empty uebersprungen)
// pBoss == NULL => pPage == NULL, es gibt keine folgende Seite
//Wenn die Fussnote bereits einen Follow hat brauchen wir nicht zu suchen.
//Wenn allerdings zwischen Ftn und Follow unerwuenschte Leerseiten/spalten
//herumlungern, so legen wir auf der naechstbesten Seite/Spalte einen weiteren
//Follow an, der Rest wird sich schon finden.
SwFtnFrm *pFtn = FindFtnFrm();
if ( pFtn && pFtn->GetFollow() )
{
SwFtnBossFrm* pTmpBoss = pFtn->GetFollow()->FindFtnBossFrm();
// Folgende Faelle werden hier erkannt und akzeptiert
// 1. Die FtnBosse sind benachbarte Seiten oder benachbarte Spalten
// 2. Der neue ist die erste Spalte der benachbarten Seite
// 3. Der neue ist die erste Spalte in einem Bereich in der naechsten Spalte/Seite
while( pTmpBoss != pBoss && pTmpBoss && !pTmpBoss->GetPrev() )
pTmpBoss = pTmpBoss->GetUpper()->FindFtnBossFrm();
if( pTmpBoss == pBoss )
return pFtn->GetFollow();
}
// Wenn wir keinen pBoss gefunden haben oder es sich um eine "falsche" Seite handelt,
// muss eine neue Seite her
if ( !pBoss || ( pPage && pPage->IsEndNotePage() && !pOldPage->IsEndNotePage() ) )
{
if ( eMakePage == MAKEPAGE_APPEND || eMakePage == MAKEPAGE_INSERT )
{
pBoss = InsertPage( pOldPage, pOldPage->IsFtnPage() );
((SwPageFrm*)pBoss)->SetEndNotePage( pOldPage->IsEndNotePage() );
}
else
return 0;
}
if( pBoss->IsPageFrm() )
{ // Wenn wir auf einer spaltigen Seite gelandet sind,
// gehen wir in die erste Spalte
SwLayoutFrm* pLay = pBoss->FindBodyCont();
if( pLay && pLay->Lower() && pLay->Lower()->IsColumnFrm() )
pBoss = (SwFtnBossFrm*)pLay->Lower();
}
//Seite/Spalte gefunden, da schummeln wir uns doch gleich mal 'rein
SwFtnContFrm *pCont = pBoss->FindFtnCont();
if ( !pCont && pBoss->GetMaxFtnHeight() &&
( eMakePage == MAKEPAGE_APPEND || eMakePage == MAKEPAGE_INSERT ) )
pCont = pBoss->MakeFtnCont();
return pCont;
}
/*************************************************************************
|*
|* SwFrm::GetPrevFtnLeaf()
|*
|* Beschreibung Liefert das vorhergehende LayoutBlatt in das der
|* Frame gemoved werden kann.
|*
|*************************************************************************/
SwLayoutFrm *SwFrm::GetPrevFtnLeaf( MakePageType eMakeFtn )
{
//Der Vorgaenger fuer eine Fussnote ist falls moeglich der Master
//in der Fussnoteneigenen Verkettung.
SwLayoutFrm *pRet = 0;
SwFtnFrm *pFtn = FindFtnFrm();
pRet = pFtn->GetMaster();
SwFtnBossFrm* pOldBoss = FindFtnBossFrm();
SwPageFrm *pOldPage = pOldBoss->FindPageFrm();
if ( !pOldBoss->GetPrev() && !pOldPage->GetPrev() )
return pRet; // es gibt weder eine Spalte noch eine Seite vor uns
if ( !pRet )
{
CWS-TOOLING: integrate CWS odfmetadata2 2009-06-22 11:48:36 +0200 mst r273206 : - connectivity/source/drivers/mozab/mozillasrc/MNSInclude.hxx: + add "include ustrbuf.hxx" to work around warning caused by solaris <sys/kstat.h> declaring a global "long l ;" 2009-06-19 14:25:25 +0200 mst r273159 : - scp2/source/ooo/file_library_ooo.scp: + fix MinGW build 2009-06-08 12:52:33 +0200 mst r272727 : - redland/raptor-1.4.18.patch.mingw, redland/raptor/makefile.mk: + disable parsers that do not build on MinGW (thanks for patch by tono) 2009-05-15 17:31:07 +0200 mst r271957 : fix typos 2009-05-15 17:28:57 +0200 mst r271956 : #i101965# - offapi/com/sun/star/text/TextPortion: + add missing properties: SoftPageBreak, DocumentIndexMark, ReferenceMark, Footnote, TextField + fix read-only status of properties: Bookmark, IsStart, IsCollapsed - offapi/type_reference/{typelibrary_history.txt,types.rdb}: + update reference types.rdb 2009-05-07 14:41:38 +0200 mst r271669 : - sw/inc/{fmtftn.hxx,unocoll.hxx,doc.hxx,editsh.hxx,ftninfo.hxx}, sw/source/core/layout/{flowfrm.cxx,ftnfrm.cxx}, sw/source/core/doc/docftn.cxx, sw/source/core/edit/edattr.cxx, sw/source/core/txtnode/atrftn.cxx, sw/source/core/unocore/unocoll.cxx, sw/source/ui/fldui/fldref.cxx: + fix warning ... the hard way + also fix signature of SwDoc::SetCurFtn 2009-05-05 19:52:55 +0200 mst r271556 : - sw/inc/undobj.hxx: + make some members const 2009-05-05 19:34:40 +0200 mst r271555 : - sw/inc/rolbck.hxx, sw/source/core/undo/rolbck.cxx: + make some members const 2009-05-05 19:13:14 +0200 mst r271553 : - sw/inc/{undobj.hxx,rolbck.hxx}, sw/source/core/undo/{unbkmk.cxx,rolbck.cxx}: + fix rebase merge error + rename SwHstryBookmark to SwHistoryBookmark + clean up SwUndoBookmark 2009-05-05 19:05:53 +0200 mst r271552 : - sw/source/core/unocore/unoportenum.cxx: + fix annoying assertion 2009-05-05 15:34:48 +0200 mst r271522 : CWS-TOOLING: rebase CWS odfmetadata2 to trunk@271427 (milestone: DEV300:m47) 2009-05-04 12:37:01 +0200 mst r271444 : trivial 2009-04-22 13:30:37 +0200 mst r271102 : - sfx2/inc/sfx2/dinfdlg.hxx: + trivial change 2009-04-21 16:46:58 +0200 mst r271043 : - sw/inc/hintids.hxx: + introduce some predicates for the various hints, and use them 2009-04-21 16:19:03 +0200 mst r271041 : - sw/inc/undobj.hxx, sw/source/core/doc/{docfly.cxx,docfmt.cxx,docftn.cxx,doctxm.cxx}, sw/source/core/undo/{unattr.cxx,unins.cxx}: + clean up unattr.cxx: remove/fix casts, prefix members, use auto_ptr, etc. 2009-04-21 15:34:23 +0200 mst r271039 : - sw/inc/{rolbck.hxx,undobj.hxx}, sw/source/core/doc/docfmt.cxx, sw/source/core/txtnode/{thints.cxx,txtedt.cxx}, sw/source/core/undo/{rolbck.cxx,undel.cxx,undobj.cxx,unins.cxx,unmove.cxx, unovwr.cxx,unsect.cxx,unspnd.cxx,untbl.cxx,untblk.cxx,unattr.cxx}: + clean up SwHistory, SwRegHistory and SwHistoryHint etc.: remove/fix casts, prefix members, remove wrong const annotations, use auto_ptr, remove unused members, etc. 2009-04-20 19:17:36 +0200 mst r271013 : - sw/inc/ndhints.hxx, sw/source/core/text/{itrtxt.cxx,txtftn.cxx,itratr.cxx,porfly.cxx, txtfrm.cxx,txtdrop.cxx,frmform.cxx}, sw/source/core/txtnode/{ndtxt.cxx,ndhints.cxx,thints.cxx,txtedt.cxx}, sw/source/core/edit/acorrect.cxx, sw/source/core/doc/{docedt.cxx,docfmt.cxx}, sw/source/filter/html/swhtml.cxx: + clean up SwHintsArray and its subclasses: remove/fix casts, prefix members 2009-04-20 18:42:07 +0200 mst r271007 : - sw/source/core/text/txtio.cxx, sw/source/core/edit/edattr.cxx, sw/source/core/undo/rolbck.cxx: + remove JP_NEWCORE dead code 2009-04-20 18:38:09 +0200 mst r271006 : - sw/source/core/unocore/unochart.cxx: + silence unxlngi warning (debug=t) 2009-04-20 16:36:13 +0200 mst r270991 : - sfx2/inc/sfx2/dinfdlg.hxx, sfx2/source/dialog/dinfdlg.cxx, sfx2/source/doc/objserv.cxx, sw/source/ui/fldui/flddinf.hxx: + trivial cleanups 2009-04-20 15:28:52 +0200 mst r270990 : - sfx2/inc/sfx2/dinfdlg.hxx, sfx2/source/dialog/dinfdlg.cxx, sfx2/source/doc/objserv.cxx: + fix bug: replaying a macro with a DocumentInfoItem removes all user-defined properties 2009-03-10 15:08:20 +0100 mst r269273 : - sfx2/source/doc/Metadatable.cxx: + add missing SolarMutex guards 2009-03-10 14:46:29 +0100 mst r269272 : - unoxml/source/rdf/librdf_repository.cxx: + never free rdf_world because that would call libxm2 xmlCleanupParser (and, to add insult to injury, other libxml2 functions later...) 2009-03-06 19:02:44 +0100 mst r269041 : argh! undo... 2009-03-06 19:00:58 +0100 mst r269040 : fix #i99931# - sw/source/ui/uno/unomod.cxx: + SwXViewSettings::_getSingleValue returns uninitialized memory for the ZoomType property if the value is PAGE_WIDTH_EXACT 2009-03-06 18:59:28 +0100 mst r269039 : - sw/inc/ndtxt.hxx, sw/source/core/txtnode/ndtxt.cxx, sw/source/core/unocore/unoportenum.cxx: + fix some more wntmsci12 warnings... 2009-03-06 18:56:46 +0100 mst r269038 : - sd/source/ui/slidesorter/model/SlsPageEnumerationProvider.cxx: + work around spurious warning on unxsoli4 debug=t 2009-03-05 14:02:01 +0100 mst r268902 : - sw/inc/txatbase.hxx: + back to c-style casts, they also compile on wntmsci12... 2009-03-05 10:23:25 +0100 mst r268882 : - comphelper/inc/comphelper/processfactory.hxx, comphelper/source/processfactory/processfactory.cxx: + revert change of return type of comphelper_getProcessComponentContext to Reference: does not build on wntmsci12 2009-03-04 19:08:09 +0100 mst r268861 : - sw/source/core/txtnode/{atrtox.cxx,ndtxt.cxx}: + fix initialization 2009-03-04 14:37:30 +0100 mst r268831 : - solenv/inc/target.mk: + fix CLASSPATH so complex tests run (fix by sb) 2009-03-04 14:36:30 +0100 mst r268830 : - sw/inc/unoobj.hxx, sw/source/core/unocore/{unoparagraph.cxx,unoobj.cxx,unoobj2.cxx}: + SwXParaFrameEnumeration constructor now takes SwPaM, not SwUnoCrsr + move SwParaSelection into unoparagraph.cxx, as it is only used there + bugfix: replace SwUnoCrsrs on stack with SwCursors 2009-03-04 14:34:46 +0100 mst r268829 : - sw/inc/pam.hxx, sw/source/core/crsr/pam.cxx, sw/source/core/edit/eddel.cxx, sw/source/core/doc/docredln.cxx, sw/source/core/undo/{untbl.cxx,undel.cxx}, sw/source/filter/rtf/swparrtf.cxx: + clean up SwPaM: prefix members + new constructor SwPosition(SwCntntNode&, xub_StrLen) + fix several broken SwPosition and SwPaM constructors + SwPam::DeleteMark now actually resets the unused position to default 2009-03-02 12:07:09 +0100 mst r268646 : - sw/inc/fmtcol.hxx: + fix annoying warning (gcc 4) 2009-03-02 12:06:27 +0100 mst r268645 : - odk/util/check.pl, odk/examples/DevelopersGuide/Text/TextDocuments.java: + rename module from FieldMaster to fieldmaster 2009-02-27 19:49:56 +0100 mst r268614 : - sfx2/inc/sfx2/Metadatable.hxx, sfx2/prj/d.lst, sfx2/source/doc/{Metadatable.cxx,makefile.mk}, sw/inc/{SwMetadatable.hxx,unoobj.hxx,undobj.hxx,ndtxt.hxx}, sw/source/core/doc/{SwMetadatable.cxx,makefile.mk,docnew.cxx}, sw/source/core/undo/{untbl.cxx,unins.cxx}, sw/source/core/unocore/unoparagraph.cxx, sw/source/ui/app/docsh.cxx: + move Metadatable implementation from sw to sfx2 2009-02-27 17:58:55 +0100 mst r268608 : - sw/inc/{SwMetadatable.hxx,undobj.hxx}, sw/source/core/doc/SwMetadatable.cxx, sw/source/core/undo/{untbl.cxx,unins.cxx,undel.cxx}: + CreateUndo now returns an opaque MetadatableUndo object 2009-02-27 13:15:44 +0100 mst r268587 : - sw/inc/ndtxt.hxx, sw/source/core/doc/docfmt.cxx, sw/source/core/text/{itratr.cxx,porlay.cxx}, sw/source/core/txtnode/{txtedt.cxx,ndtxt.cxx,thints.cxx}: + clean up SwTxtNode: fix casts, prefix members + factor out inline function SwTxtNode::TryDeleteSwpHints() 2009-02-27 13:14:30 +0100 mst r268586 : - svx/inc/svx/emphitem.hxx: + fix borken header guard 2009-02-27 13:13:56 +0100 mst r268585 : - sfx2/source/bastyp/progress.cxx: + fix use of compiler specific macro 2009-02-27 11:00:32 +0100 mst r268564 : - sw/inc/{txatbase.hxx,txtatr.hxx,txtinet.hxx,txtfld.hxx,txtftn.hxx, txtflcnt.hxx,txttxmrk.hxx,txtrfmrk.hxx}, sw/source/core/txtnode/{atrtox.cxx,atrref.cxx,atrflyin.cxx,atrftn.cxx, txtatr2.cxx,txatbase.cxx,atrfld.cxx,txtedt.cxx}, sw/source/core/text/atrstck.cxx, sw/source/core/access/acchyperlink.cxx, sw/source/core/doc/visiturl.cxx, sw/source/ui/wrtsh/wrtsh2.cxx: + clean up SwTxtAttr and its subclasses: remove/fix casts, prefix members + SwTxtINetFmt: remove unused member bColor - sw/source/core/text/txtfld.cxx: + move SwTxtFld methods to atrfld.cxx 2009-02-27 10:58:44 +0100 mst r268563 : - sfx2/inc/sfx2/sfxbasemodel.hxx: + don't privately inherit BaseMutex, ScModelObj wants to access it 2009-02-27 10:58:02 +0100 mst r268562 : - xmloff/source/core/{RDFaExportHelper.cxx,RDFaImportHelper.cxx}: + arrrgh!!! someone thought it would be a good idea to have 2 different versions of boost in external! and they're NOT compatible!!! insert an ugly fragile hack that maybe works with both... 2009-02-26 17:42:26 +0100 mst r268544 : - comphelper/inc/comphelper/storagehelper.hxx. sfx2/source/doc/DocumentMetadataAccess.cxx: + someone made IsValidZipEntryFileName a static method and didn't tell me 2009-02-26 15:52:56 +0100 mst r268529 : redland: split up patches 2009-02-26 13:17:56 +0100 mst r268509 : migration of cws odfmetadata2 from CVS (resync to m42): module sw #i95863# - sw/inc/segdefs{,_}.hxx: + remove obsolete files - sw/source/ui/inc/itemdef.hxx: + remove itemdef.hxx - sw/source/ui/app/[apphdl.cxx,docsh.cxx}, sw/source/ui/misc/glshell.cxx, sw/source/ui/shells/*.cxx, sw/source/ui/uiview/*.cxx, sw/source/ui/web/*.cxx: + use sfx2/msg.hxx instead of itemdef.hxx - sw/source/core/edit/eddel.cxx: + @ JP: SwEditShell::Replace: you're right, deleting the text to be replaced first, and then inserting a space, and then replacing that space is unnecessary. whew, i'm so happy that we finally answered that question after 11 years. - sw/inc/edimp.hxx: + remove FOREACHCURSOR_START, FOREACHCURSOR_END - sw/inc/{swcrsr.hxx,unocrsr.hxx,viscrs.hxx}, sw/source/core/crsr/{crsrsh.cxx,swcrsr.cxx,trvlreg.cxx,trvltbl.cxx, unocrsr.cxx,viscrs.cxx}, sw/source/core/doc/{docbm.cxx,doccorr.cxx}, sw/source/core/docnode/{ndtbl.cxx,ndtbl1.cxx}, sw/source/core/edit/editsh.cxx, sw/source/core/frmedt/{fefly1.cxx,fetab.cxx,tblsel.cxx}, sw/source/core/layout/trvlfrm.cxx, sw/source/core/unocore/{unochart.cxx,unoobj2.cxx,unoparagraph.cxx, unoportenum.cxx,unotbl.cxx}, sw/source/core/view/vprint.cxx: + remove the hideous virtual operator SwFooCursor* + make SwCursor::IsReadOnlyAvailable() virtual + make SwUnoCrsr::Clone() virtual + refactor SwCursor methods IsSelOver(), LeftRight(), UpDown(), GotoTable(): replace dynamic_cast<...>(this) with new virtual methods 2009-02-26 13:14:58 +0100 mst r268508 : migration of cws odfmetadata2 from CVS (resync to m42): module sw - sw/source/filter/xml/swxml.cxx: + XMLReader::Read: load RDF metadata of the ODF document - sw/source/filter/xml/wrtxml.cxx: + SwXMLWriter::_Write: write RDF metadata of the ODF document if ODF >= 1.2 #i90620#: import xml:id in text tables (does not actually work yet) - sw/source/filter/xml/xmltbli{.hxx,.cxx}: + SwXMLTableCellAttrTokens,aTableCellAttrTokenMap: add XML_TOK_TABLE_XMLID + SwXMLTableCellContext_Impl::SwXMLTableCellContext_Impl: attribute xml:id + SwXMLTableCellContext_Impl::CreateChildContext: attribute xml:id + SwXMLTableColContext_Impl::SwXMLTableColContext_Impl: attribute xml:id + SwXMLTableContext::SwXMLTableContext: attribute xml:id fix #i98530# - sw/inc/unoport.hxx, sw/source/core/unocore/unoport.cxx: + SwXTextPortion: make constructor params const& - sw/source/core/unocore/unoportenum.cxx: + refactor to remove some code duplication + fix bug: paragraph w/out hints: bookmark before frame gets lost #i97274# handle invalid tables - sw/source/core/layout/tabfrm.cxx, sw/source/filter/xml/xmltbli.cxx: + SwXMLTableContext::MakeTable(): check that the table actually contains cells, and abort (removing the inserted table nodes) if not 2009-02-26 13:11:48 +0100 mst r268507 : migration of cws odfmetadata2 from CVS (resync to m42): module sw refactor SwXTextRange and SwXParagraph - sw/inc/unoobj.hxx, sw/source/core/unocore/unoobj2.cxx: + remove 3 constructors of SwXTextRange + new method SwXTextRange::CreateParentXText + refactor SwXTextRange::CreateTextRangeFromPosition and SwXTextRange::getText - sw/inc/unoobj.hxx, sw/source/core/unocore/unoparagraph.cxx: + SwXParagraph no longer uses a cursor; it registers directly at SwTxtNode + replace SwXParagraph::GetCrsr with SwXParagraph::GetTxtNode - sw/source/core/unocore/unotext.cxx, sw/source/ui/uno/unotxvw.cxx: + adapt to new SwXParagraph #i90620# - sw/inc/SwMetadatable.hxx, sw/source/core/doc/SwMetadatable.cxx: + new files: base classes sw::Metadatable and sw::MetadatableMixin; also, 2 implementations of IXmlIdRegistry: sw::XmlIdRegistryDocument and sw::XmlIdRegistryClipboard + setMetadataReference: handle empty stream name as auto-detect - sw/source/core/doc/makefile.mk: + add SwMetadatable add a XmlIdRegistry to SwDoc - sw/inc/doc.hxx: + SwDoc: add member m_pXmlIdRegistry, method GetXmlIdRegistry() - sw/source/core/doc/docnew.cxx: + initialize XmlIdRegistry in SwDoc::GetXmlIdRegistry, not in constructor, because the constructor is not told whether the SwDoc is a clipboard - sw/inc/docsh.hxx, sw/source/ui/app/docsh.cxx: + SwDocShell: override GetXmlIdRegistry() #i91563#: make the SwTxtNode metadatable - sw/inc/ndtxt.hxx + SwTxtNode inherits sw::Metadatable - sw/inc/unoobj.hxx, sw/source/core/unocore/unoparagraph.cxx: + SwXParagraph inherits sw::MetadatableMixin #i91563#: handle SwTxtNode's metadata for delete - sw/source/core/txtnode/ndtxt.cxx: + SwTxtNode::SplitCntntNode: handle XmlId + SwTxtNode::JoinNext: merge XmlIds - sw/source/core/doc/docedt.cxx: + lcl_GetJoinFlags: document postcondition + SwDoc::Delete: remove XmlId only if SwTxtNode _becomes_ empty #i91563#: handle SwTxtNode's metadata for delete with undo - sw/inc/undobj.hxx + SwUndoDelete: new members m_pMetadataUndoStart, m_pMetadataUndoEnd - sw/source/core/undo/undel.cxx: + SwUndoDelete::SaveCntnt: save XmlIds for start and end SwTxtNode + SwUndoDelete::SaveCntnt: remove XmlId only if SwTxtNode _becomes_ empty + SwUndoDelete::Undo: restore saved XmlIds for start and end SwTxtNode - sw/source/core/docnode/ndcopy.cxx: + SwTxtNode::MakeCopy: register copy at XmlIdRegistry #i91563#: handle SwTxtNode's metadata for find/replace with undo - sw/source/core/undo/unins.cxx: + _UnReplaceData: rename members: add prefix m_ + _UnReplaceData: new members m_pMetadataUndoStart, m_pMetadataUndoEnd + _UnReplaceData::_UnReplaceData: save XmlIds for start and end SwTxtNode + _UnReplaceData::Undo: restore saved XmlIds for start and end SwTxtNode #i91563#: handle SwTxtNode's metadata for table-to-text with undo - sw/source/core/undo/untbl.cxx: + SwTblToTxtSave: rename members: add prefix m_ + SwTblToTxtSave: new members m_pMetadataUndoStart, m_pMetadataUndoEnd + SwTblToTxtSave::SwTblToTxtSave: save XmlIds for start and end SwTxtNode + SwTblToTxtSave::SwTblToTxtSave, SwNodes::UndoTableToText: always store the index of the first SwTxtNode in the cell, instead of the index of the first SwTxtNode in case of the first cell in a row, and the cell start node in other cases + SwNodes::UndoTableToText: restore saved XmlIds for start and end SwTxtNode - sw/source/core/docnode/ndtbl.cxx: + lcl_DelBox: simplify for refactored start index handling in SwTblToTxtSave 2009-02-26 13:02:28 +0100 mst r268505 : migration of cws odfmetadata2 from CVS (resync to m42): module sd - sd/source/ui/table/tableobjectbar.cxx,sd/source/ui/view/*.cxx: + remove invocations of SFX_DECL_TYPE - sd/source/ui/slideshow/SlideShowRestarter.cxx, sd/source/ui/toolpanel/LayoutMenu.cxx, sd/source/ui/unoidl/DrawController.cxx, sd/source/ui/view/{ViewShellBase.cxx,ViewTabBar.cxx,frmview.cxx}: + fix abuses of comphelper_getProcessComponentContext (missing release) 2009-02-26 13:01:24 +0100 mst r268504 : migration of cws odfmetadata2 from CVS (resync to m42): module starmath - starmath/source/document.cxx: + don't touch SfxObjectShell's privates 2009-02-26 13:00:37 +0100 mst r268503 : migration of cws odfmetadata2 from CVS (resync to m42): module sfx2 #i90620# - sfx2/inc/sfx2/XmlIdRegistry.hxx: + new file: interfaces sfx2::IXmlIdRegistry and sfx2::IXmlIdRegistrySupplier and a couple of utility functions - sfx2/inc/sfx2/DocumentMetadataAccess.hxx, sfx2/source/doc/DocumentMetadataAccess.cxx: + new class sfx2::DocumentMetadataAccess, implements XDocumentMetadataAccess + the URI of the DocumentMetadataAccess is now the URI from which the document was loaded; for a new document, use a vnd.sun.star.tdoc URI + add new function sfx2::createBaseURI() + prevent using reserved file names + try not to recurse into embedded subdocuments - sfx2/source/doc/makefile.mk: + add DocumentMetadataAccess - sfx2/util/makefile.mk: + link libsfx2 against libxml2 (needed for xmlValidateNCName) - sfx2/source/doc/makefile.mk: + add LIBXML_CFLAGS to CFLAGS - sfx2/prj/build.lst: + add dependence on libxml2 - sfx2/prj/d.lst: + add XmlIdRegistry.hxx, DocumentMetadataAccess.hxx - sfx2/inc/sfx2/objsh.hxx, sfx2/source/doc/objxtor.cxx: + make SfxObjectShell's members private + new method SfxObjectShell::GetAutoStyleFilterIndex + SfxObjectShell inherits sfx2::IXmlIdRegistrySupplier - sfx2/source/dialog/templdlg.cxx, sfx2/source/doc/sfxbasemodel.cxx: + don't touch SfxObjectShell's privates - sfx2/inc/sfx2/sfxbasemodel.hxx, sfx2/source/doc/sfxbasemodel.cxx: + SfxBaseModel inherits BaseMutex instead of IMPL_SfxBaseModel_MutexContainer + SfxBaseModel implements additional interface XDocumentMetadataAccess + IMPL_SfxBaseModel_DataContainer has new member: a sfx2::DocumentMetadataAccess + implementation of XDocumentMetadataAccess forwards to the sfx2::DocumentMetadataAccess member - sfx2/qa/complex/DocumentMetadataAccessTest.java, sfx2/qa/complex/{tests.sce,makefile.mk}, sfx2/qa/complex/testdocuments/TESTRDFA.odt: + add complex test: DocumentMetadataAccessTest + add RDFa test document #i95863# - sfx2/inc/sfx2/dinfdlg.hxx, sfx2/source/dialog/dinfdlg.cxx: + refactor SfxDocumentItem so it no longer requires a XDocumentInfo + move struct CustomProperty to implementation file + remove class SfxDocumentUserPage + QueryValue,PutValue: remove MID_DOCINFO_FIELD* - sfx2/source/doc/objserv.cxx: + adapt to SfxDocumentItem change - sfx2/inc/sfx2/sfx.hrc, sfx2/sdi/sfxslots.sdi, sfx2/inc/sfx2/msg.hxx: + remove MID_DOCINFO_FIELD* + put all invocations of SFX_DECL_TYPE in msg.hxx, and undef SFX_DECL_TYPE - sfx2/source/doc/objxtor.cxx: + fix abuses of comphelper_getProcessComponentContext (missing release) - sfx2/source/doc/docfile.cxx: + SfxMedium::SfxMedium: don't dereference NULL, throw exception instead - sfx2/source/doc/objstor.cxx: + SfxObjectShell::DoLoad: fix bug: DocumentBaseURI is not initialized 2009-02-26 12:58:07 +0100 mst r268502 : migration of cws odfmetadata2 from CVS (resync to m42): module xmloff #i90620#: implement RDFa import (interface change) - xmloff/inc/xmloff/xmlimp.hxx. xmloff/source/core/xmlimp.cxx: + make SvXMLImport::GetAbsoluteReference() const + add SvXMLImport::GetComponentContext() + SvXMLImport::_InitCtor(): add RDFa namespace + add SvXMLImport::AddRDFa() + SvXMLImport::endDocument() inserts RDFa into document repository - xmloff/inc/xmloff/xmltoken.hxx, xmloff/source/core/xmltoken.cxx: + new tokens for RDFa: XML_ABOUT, XML_DATATYPE - xmloff/inc/RDFaImportHelper.hxx, xmloff/source/core/RDFaImportHelper.cxx: + new class RDFaImportHelper + adapt the code to the bleak reality of broken C++ implementations + handle empty xhtml:about attributes properly, which are actually valid relative URIs + work around broken SvXMLImport::GetAbsoluteReference - xmloff/source/core/makefile.mk: + add RDFaImportHelper.cxx #i90620#: implement RDFa export - xmloff/inc/xmloff/xmlexp.hxx, xmloff/source/core/xmlexp.cxx: + add SvXMLExport::EnsureNamespace(), and a stack of namespace maps + add SvXMLExport::GetComponentContext() + add SvXMLExport::AddAttributesRDFa() - xmloff/inc/RDFaExportHelper.hxx, xmloff/source/core/RDFaExportHelper.cxx: + new class RDFaExportHelper + don't use std::map::data_type, which is actually called std::map::mapped_type by libstdc++ - xmloff/source/core/makefile.mk: + add RDFaExportHelper.cxx #i91563# - xmloff/inc/xmloff/txtimp.hxx, xmloff/source/text/txtimp.cxx: + XMLTextPAttrTokens: add RDFa tokens - xmloff/source/text/txtparai{.hxx,.cxx}: + import RDFa for text:p - xmloff/source/text/txtparae.cxx: + export RDFa for text:p interface change: use XHTML namespace instead of RDFA - xmloff/inc/xmlnmspe.hxx, xmloff/inc/xmloff/xmltoken.hxx, xmloff/source/core/{xmltoken.cxx,xmlimp.cxx,xmlexp.cxx,RDFaExportHelper.cxx}, xmloff/source/text/txtimp.cxx: + use XHTML namespace instead of RDFA #i91565#, #i91566#: (preliminary) import for text:meta, text:meta-field - xmloff/source/text/txtparai.cxx: + new class XMLMetaImportContextBase with subclasses to import text:meta and text:meta-field - xmloff/source/text/XMLTextMarkImportContext.cxx: + change XMLTextMarkImportContext::CreateAndInsertMark to handle marks with no name (text:meta) #i91565#, #i91566#: (preliminary) export for text:meta, text:meta-field - xmloff/inc/txtflde.hxx, xmloff/source/text/txtflde.cxx: + add FIELD_ID_META to FieldIdEnum + new method XMLTextFieldExport::ExportMetaField() + change XMLTextFieldExport::ExportField{,AutoStyle,Helper} to take additional parameter for progress bar - xmloff/inc/xmloff/txtparae.hxx, xmloff/source/text/txtparae.cxx: + make XMLTextParagraphExport::exportTextRangeEnumeration() public + new method XMLTextParagraphExport::exportMeta() #i90620# - xmloff/inc/xmloff/xmlimp.hxx, xmloff/source/core/xmlimp.cxx, xmloff/inc/xmloff/xmlexp.hxx, xmloff/source/core/xmlexp.cxx: + rename SvXML{Im,Ex}port::GetStreamPath() to GetStreamName() + fix xml:id {im,ex}port for embedded documents and non-packages + adapt to API change: XMetadatable #i90620# GRDDL - xmloff/inc/xmlnmspe.hxx, xmloff/inc/xmloff/xmltoken.hxx, xmloff/source/core/{xmltoken.cxx,xmlexp.cxx}: + add GRDDL namespace + add token XML_TRANSFORMATION + add grddl:transformation attribute to root elements for meta.xml, content.xml and styles.xml 2009-02-26 12:54:40 +0100 mst r268501 : migration of cws odfmetadata2 from CVS (resync to m42): module unoxml #i90620# - unoxml/source/rdf/librdf_repository.cxx: + librdf_Repository::importGraph: allocate buffer sized length of stream + switch from one librdf_world per repository to a single static world because redland has global variables with a brain-damaged life-cycle... + exportGraph: use new raptor 1.4.18 feature to disable writing an xml:base attribute in RDF/XML files - unoxml/source/rdf/librdf_repository.cxx: unoxml/qa/complex/RDFRepositoryTest.java: + adapt to predicate is URI change + adapt to RDFa API change + adapt to API change: RDFa has multiple predicates... + adapt to API change: XMetadatable derives from XURI + allow xhtml:datatype without xhtml:content + adapt to API change: attribute MetadataReference is StringPair - unoxml/source/rdf/CURI.cxx: + add some more URI constants 2009-02-26 12:53:32 +0100 mst r268500 : migration of cws odfmetadata2 from CVS (resync to m42): module package - package/inc/ImplValidCharacters.hxx: + remove (moved to comphelper) 2009-02-26 12:52:49 +0100 mst r268499 : migration of cws odfmetadata2 from CVS (resync to m42): module comphelper - comphelper/inc/comphelper/processfactory.hxx, comphelper/source/processfactory/processfactory.cxx: + add getProcessComponentContext() + change return type of comphelper_getProcessComponentContext to Reference - comphelper/inc/comphelper/stl_types.hxx: + add OUStringBufferAppender + add algorithm intersperse - comphelper/source/misc/string.cxx: + rewrite convertCommaSeparated with intersperse and OUStringBufferAppender - comphelper/inc/comphelper/stlunosequence.hxx: + fix bug: begin() on empty sequence != end() 2009-02-26 12:50:47 +0100 mst r268498 : migration of cws odfmetadata2 from CVS (resync to m42): module offapi #i96209# - offapi/com/sun/star/text/fieldmaster/*.idl: + rename module from FieldMaster to fieldmaster - offapi/type_reference/{typelibrary_history.txt,types.rdb}: + update reference types.rdb #i90620# - offapi/com/sun/star/rdf/{XMetadatable.idl,XDocumentMetadataAccess.idl}: + API change: XMetadatable derives from XURI + API change: replace XmlId (string) with MetadataReference (StringPair) - offapi/com/sun/star/rdf/{Statement.idl,XDocumentRepository.idl, XNamedGraph.idl,XRepository.idl}: + the predicate of a statement is a URI, not a Resource - offapi/com/sun/star/rdf/XDocumentMetadataAccess.idl: + rename: s/Package/Document/ + remove uuid + remove everything related to mapping + graph names are now generated from base URI and file names + load methods: improve error handling with XInteractionHandler - offapi/com/sun/star/rdf/XDocumentRepository.idl: + change: RDFa permits using multiple predicates in one attribute + setStatementRDFa: subject is now XResource, object is now XMetadatable - offapi/com/sun/star/rdf/URIs.idl: + add some more URI constants - offapi/com/sun/star/rdf: + fix @since tags and replace <method> with <member> 2009-02-26 12:47:24 +0100 mst r268497 : migration of cws odfmetadata2 from CVS (resync to m42): module redland fix #i93768# - redland/raptor-1.4.17.patch, redland/raptor/makefile.mk: + disable GRDDL parser to prevent call to libxslt xsltSetDefaultSecurityPrefs, which breaks xmlhelp - redland/raptor/makefile.mk, redland/raptor-1.4.17.patch, redland/raptor-1.4.18.patch: + upgrade raptor to 1.4.18 + deactivate serializer for RSS/Atom (does not build) - redland/rasqal/makefile.mk, redland/rasqal-0.9.15.patch, redland/rasqal-0.9.16.patch, + upgrade rasqal to 0.9.16 - redland/redland/makefile.mk, redland/redland-1.0.7.patch, redland/redland-1.0.8.patch: + upgrade redland to 1.0.8 - redland/redlandversion.mk: + the librasqal SONAME has changed
2009-07-02 09:05:03 +00:00
bool bEndn = pFtn->GetAttr()->GetFtn().IsEndNote();
2000-09-18 23:08:29 +00:00
SwFrm* pTmpRef = NULL;
if( bEndn && pFtn->IsInSct() )
{
SwSectionFrm* pSect = pFtn->FindSctFrm();
if( pSect->IsEndnAtEnd() )
pTmpRef = pSect->FindLastCntnt( FINDMODE_LASTCNT );
}
if( !pTmpRef )
pTmpRef = pFtn->GetRef();
SwFtnBossFrm* pStop = pTmpRef->FindFtnBossFrm( !bEndn );
const sal_uInt16 nNum = pStop->GetPhyPageNum();
2000-09-18 23:08:29 +00:00
//Wenn die Fussnoten am Dokumentende angezeigt werden, so verlassen wir
//die Entsprechenden Seiten nicht.
//Selbiges gilt analog fuer die Endnotenseiten.
const sal_Bool bEndNote = pOldPage->IsEndNotePage();
const sal_Bool bFtnEndDoc = pOldPage->IsFtnPage();
2000-09-18 23:08:29 +00:00
SwFtnBossFrm* pNxtBoss = pOldBoss;
SwSectionFrm *pSect = pNxtBoss->GetUpper()->IsSctFrm() ?
(SwSectionFrm*)pNxtBoss->GetUpper() : 0;
do
{
if( pNxtBoss->IsColumnFrm() && pNxtBoss->GetPrev() )
pNxtBoss = (SwFtnBossFrm*)pNxtBoss->GetPrev(); // eine Spalte zurueck
else // oder eine Seite zurueck
{
SwLayoutFrm* pBody = 0;
2000-09-18 23:08:29 +00:00
if( pSect )
{
if( pSect->IsFtnLock() )
{
if( pNxtBoss == pOldBoss )
return 0;
pStop = pNxtBoss;
}
else
{
pSect = (SwSectionFrm*)pSect->FindMaster();
2000-09-18 23:08:29 +00:00
if( !pSect || !pSect->Lower() )
return 0;
OSL_ENSURE( pSect->Lower()->IsColumnFrm(),
2000-09-18 23:08:29 +00:00
"GetPrevFtnLeaf: Where's the column?" );
pNxtBoss = (SwFtnBossFrm*)pSect->Lower();
pBody = pSect;
}
}
else
{
SwPageFrm* pPage = (SwPageFrm*)pNxtBoss->FindPageFrm()->GetPrev();
if( !pPage || pPage->GetPhyPageNum() < nNum ||
bEndNote != pPage->IsEndNotePage() || bFtnEndDoc != pPage->IsFtnPage() )
return NULL; // Keine in Frage kommende Seite mehr gefunden
pNxtBoss = pPage;
pBody = pPage->FindBodyCont();
}
// Die vorherige Seite haben wir nun, ggf. sollten wir in die letzte Spalte
// der Seite wechseln
if( pBody )
{
if ( pBody->Lower() && pBody->Lower()->IsColumnFrm() )
{
pNxtBoss = static_cast<SwFtnBossFrm*>(pBody->GetLastLower());
2000-09-18 23:08:29 +00:00
}
}
}
SwFtnContFrm *pCont = pNxtBoss->FindFtnCont();
if ( pCont )
{
pRet = pCont;
break;
}
if ( pStop == pNxtBoss )
{ //Die Seite/Spalte auf der sich auch die Referenz tummelt, ist erreicht.
//Wir koennen jetzt probehalber mal einen Container erzeugen und
//uns hineinpasten.
if ( eMakeFtn == MAKEPAGE_FTN && pNxtBoss->GetMaxFtnHeight() )
pRet = pNxtBoss->MakeFtnCont();
break;
}
} while( !pRet );
}
if ( pRet )
{
const SwFtnBossFrm* pNewBoss = pRet->FindFtnBossFrm();
sal_Bool bJump = sal_False;
2000-09-18 23:08:29 +00:00
if( pOldBoss->IsColumnFrm() && pOldBoss->GetPrev() ) // es gibt eine vorherige Spalte
bJump = pOldBoss->GetPrev() != (SwFrm*)pNewBoss; // sind wir darin gelandet?
else if( pNewBoss->IsColumnFrm() && pNewBoss->GetNext() )
bJump = sal_True; // es gibt hinter dem neuen Boss noch eine Spalte, die aber nicht
2000-09-18 23:08:29 +00:00
// der alte Boss sein kann, das haben wir ja bereits geprueft.
else // hier landen wir nur, wenn neuer und alter Boss entweder Seiten oder letzte (neu)
{ // bzw. erste (alt) Spalten einer Seite sind. In diesem Fall muss noch geprueft
// werden, ob Seiten ueberspringen wurden.
sal_uInt16 nDiff = pOldPage->GetPhyPageNum() - pRet->FindPageFrm()->GetPhyPageNum();
2000-09-18 23:08:29 +00:00
if ( nDiff > 2 ||
(nDiff > 1 && !((SwPageFrm*)pOldPage->GetPrev())->IsEmptyPage()) )
bJump = sal_True;
2000-09-18 23:08:29 +00:00
}
if( bJump )
SwFlowFrm::SetMoveBwdJump( sal_True );
2000-09-18 23:08:29 +00:00
}
return pRet;
}
/*************************************************************************
|*
|* SwFrm::IsFtnAllowed()
|*
|*************************************************************************/
sal_Bool SwFrm::IsFtnAllowed() const
2000-09-18 23:08:29 +00:00
{
if ( !IsInDocBody() )
return sal_False;
2000-09-18 23:08:29 +00:00
if ( IsInTab() )
{
//Keine Ftns in wiederholten Headlines.
const SwTabFrm *pTab = ((SwFrm*)this)->ImplFindTabFrm();
if ( pTab->IsFollow() )
return !pTab->IsInHeadline( *this );
2000-09-18 23:08:29 +00:00
}
return sal_True;
2000-09-18 23:08:29 +00:00
}
/*************************************************************************
|*
|* SwRootFrm::UpdateFtnNums()
|*
|*************************************************************************/
void SwRootFrm::UpdateFtnNums()
{
//Seitenweise Numerierung nur wenn es am Dokument so eingestellt ist.
if ( GetFmt()->GetDoc()->GetFtnInfo().eNum == FTNNUM_PAGE )
{
SwPageFrm *pPage = (SwPageFrm*)Lower();
while ( pPage && !pPage->IsFtnPage() )
{
pPage->UpdateFtnNum();
pPage = (SwPageFrm*)pPage->GetNext();
}
}
}
/*************************************************************************
|*
|* RemoveFtns() Entfernen aller Fussnoten (nicht etwa die Referenzen)
|* und Entfernen aller Fussnotenseiten.
|*
|*************************************************************************/
void lcl_RemoveFtns( SwFtnBossFrm* pBoss, sal_Bool bPageOnly, sal_Bool bEndNotes )
2000-09-18 23:08:29 +00:00
{
do
{
SwFtnContFrm *pCont = pBoss->FindFtnCont();
if ( pCont )
{
SwFtnFrm *pFtn = (SwFtnFrm*)pCont->Lower();
OSL_ENSURE( pFtn, "FtnCont ohne Ftn." );
2000-09-18 23:08:29 +00:00
if ( bPageOnly )
while ( pFtn->GetMaster() )
pFtn = pFtn->GetMaster();
do
{
SwFtnFrm *pNxt = (SwFtnFrm*)pFtn->GetNext();
if ( !pFtn->GetAttr()->GetFtn().IsEndNote() ||
bEndNotes )
{
pFtn->GetRef()->Prepare( PREP_FTN, (void*)pFtn->GetAttr() );
if ( bPageOnly && !pNxt )
pNxt = pFtn->GetFollow();
pFtn->Cut();
delete pFtn;
}
pFtn = pNxt;
} while ( pFtn );
}
if( !pBoss->IsInSct() )
2000-09-18 23:08:29 +00:00
{
// A sectionframe with the Ftn/EndnAtEnd-flags may contain
// foot/endnotes. If the last lower frame of the bodyframe is
// a multicolumned sectionframe, it may contain footnotes, too.
SwLayoutFrm* pBody = pBoss->FindBodyCont();
if( pBody && pBody->Lower() )
{
SwFrm* pLow = pBody->Lower();
while( pLow->GetNext() )
{
if( pLow->IsSctFrm() && ( !pLow->GetNext() ||
((SwSectionFrm*)pLow)->IsAnyNoteAtEnd() ) &&
((SwSectionFrm*)pLow)->Lower() &&
((SwSectionFrm*)pLow)->Lower()->IsColumnFrm() )
lcl_RemoveFtns( (SwColumnFrm*)((SwSectionFrm*)pLow)->Lower(),
bPageOnly, bEndNotes );
pLow = pLow->GetNext();
}
}
}
// noch 'ne Spalte?
pBoss = pBoss->IsColumnFrm() ? (SwColumnFrm*)pBoss->GetNext() : NULL;
} while( pBoss );
}
void SwRootFrm::RemoveFtns( SwPageFrm *pPage, sal_Bool bPageOnly, sal_Bool bEndNotes )
2000-09-18 23:08:29 +00:00
{
if ( !pPage )
pPage = (SwPageFrm*)Lower();
do
{ // Bei spaltigen Seiten muessen wir in allen Spalten aufraeumen
SwFtnBossFrm* pBoss;
SwLayoutFrm* pBody = pPage->FindBodyCont();
if( pBody && pBody->Lower() && pBody->Lower()->IsColumnFrm() )
pBoss = (SwFtnBossFrm*)pBody->Lower(); // die erste Spalte
else
pBoss = pPage; // keine Spalten
lcl_RemoveFtns( pBoss, bPageOnly, bEndNotes );
if ( !bPageOnly )
{
if ( pPage->IsFtnPage() &&
(!pPage->IsEndNotePage() || bEndNotes) )
{
SwFrm *pDel = pPage;
pPage = (SwPageFrm*)pPage->GetNext();
pDel->Cut();
delete pDel;
}
else
pPage = (SwPageFrm*)pPage->GetNext();
}
else
break;
} while ( pPage );
}
/*************************************************************************
|*
|* SetFtnPageDescs() Seitenvorlagen der Fussnotenseiten aendern
|*
|*************************************************************************/
void SwRootFrm::CheckFtnPageDescs( sal_Bool bEndNote )
2000-09-18 23:08:29 +00:00
{
SwPageFrm *pPage = (SwPageFrm*)Lower();
while ( pPage && !pPage->IsFtnPage() )
pPage = (SwPageFrm*)pPage->GetNext();
while ( pPage && pPage->IsEndNotePage() != bEndNote )
pPage = (SwPageFrm*)pPage->GetNext();
if ( pPage )
SwFrm::CheckPageDescs( pPage, sal_False );
2000-09-18 23:08:29 +00:00
}
/*************************************************************************
|*
|* SwFtnBossFrm::MakeFtnCont()
|*
|*************************************************************************/
SwFtnContFrm *SwFtnBossFrm::MakeFtnCont()
{
//Einfuegen eines Fussnotencontainers. Der Fussnotencontainer sitzt
//immer direkt hinter dem Bodytext.
//Sein FrmFmt ist immer das DefaultFrmFmt.
#if OSL_DEBUG_LEVEL > 1
2000-09-18 23:08:29 +00:00
if ( FindFtnCont() )
{ OSL_ENSURE( !this, "Fussnotencontainer bereits vorhanden." );
2000-09-18 23:08:29 +00:00
return 0;
}
#endif
SwFtnContFrm *pNew = new SwFtnContFrm( GetFmt()->GetDoc()->GetDfltFrmFmt());
SwLayoutFrm *pLay = FindBodyCont();
pNew->Paste( this, pLay->GetNext() );
return pNew;
}
/*************************************************************************
|*
|* SwFtnBossFrm::FindFtnCont()
|*
|*************************************************************************/
SwFtnContFrm *SwFtnBossFrm::FindFtnCont()
{
SwFrm *pFrm = Lower();
while( pFrm && !pFrm->IsFtnContFrm() )
pFrm = pFrm->GetNext();
#if OSL_DEBUG_LEVEL > 1
2000-09-18 23:08:29 +00:00
if ( pFrm )
{
SwFrm *pFtn = pFrm->GetLower();
OSL_ENSURE( pFtn, "Cont ohne Fussnote." );
2000-09-18 23:08:29 +00:00
while ( pFtn )
{
OSL_ENSURE( pFtn->IsFtnFrm(), "Nachbar von Fussnote keine Fussnote." );
2000-09-18 23:08:29 +00:00
pFtn = pFtn->GetNext();
}
}
#endif
return (SwFtnContFrm*)pFrm;
}
/*************************************************************************
|*
|* SwFtnBossFrm::FindNearestFtnCont() Sucht den naechst greifbaren Fussnotencontainer.
|*
|*************************************************************************/
SwFtnContFrm *SwFtnBossFrm::FindNearestFtnCont( sal_Bool bDontLeave )
2000-09-18 23:08:29 +00:00
{
SwFtnContFrm *pCont = 0;
if ( GetFmt()->GetDoc()->GetFtnIdxs().Count() )
{
pCont = FindFtnCont();
if ( !pCont )
{
SwPageFrm *pPage = FindPageFrm();
SwFtnBossFrm* pBoss = this;
sal_Bool bEndNote = pPage->IsEndNotePage();
2000-09-18 23:08:29 +00:00
do
{
sal_Bool bChgPage = lcl_NextFtnBoss( pBoss, pPage, bDontLeave );
2000-09-18 23:08:29 +00:00
// Haben wir noch einen Boss gefunden? Bei einem Seitenwechsel muss
// zudem noch das EndNotenFlag uebereinstimmen
if( pBoss && ( !bChgPage || pPage->IsEndNotePage() == bEndNote ) )
pCont = pBoss->FindFtnCont();
} while ( !pCont && pPage );
}
}
return pCont;
}
/*************************************************************************
|*
|* SwFtnBossFrm::FindFirstFtn()
|*
|* Beschreibung Erste Fussnote des Fussnotenbosses suchen.
|*
|*************************************************************************/
SwFtnFrm *SwFtnBossFrm::FindFirstFtn()
{
//Erstmal den naechsten FussnotenContainer suchen.
SwFtnContFrm *pCont = FindNearestFtnCont();
if ( !pCont )
return 0;
//Ab der ersten Fussnote im Container die erste suchen, die
//von der aktuellen Spalte (bzw. einspaltigen Seite) referenziert wird.
SwFtnFrm *pRet = (SwFtnFrm*)pCont->Lower();
const sal_uInt16 nRefNum = FindPageFrm()->GetPhyPageNum();
const sal_uInt16 nRefCol = lcl_ColumnNum( this );
sal_uInt16 nPgNum, nColNum; //Seitennummer, Spaltennummer
2000-09-18 23:08:29 +00:00
SwFtnBossFrm* pBoss;
SwPageFrm* pPage;
if( pRet )
{
pBoss = pRet->GetRef()->FindFtnBossFrm();
OSL_ENSURE( pBoss, "FindFirstFtn: No boss found" );
2000-09-18 23:08:29 +00:00
if( !pBoss )
return sal_False; // ?There must be a bug, but no GPF
2000-09-18 23:08:29 +00:00
pPage = pBoss->FindPageFrm();
nPgNum = pPage->GetPhyPageNum();
if ( nPgNum == nRefNum )
{
nColNum = lcl_ColumnNum( pBoss );
if( nColNum == nRefCol )
return pRet; //hat ihn.
else if( nColNum > nRefCol )
return NULL; //mind. eine Spalte zu weit.
}
else if ( nPgNum > nRefNum )
return NULL; //mind. eine Seite zu weit.
}
else
return NULL;
// Ende, wenn Ref auf einer spaeteren Seite oder auf der gleichen Seite in einer
// spaeteren Spalte liegt
do
{
while ( pRet->GetFollow() )
pRet = pRet->GetFollow();
SwFtnFrm *pNxt = (SwFtnFrm*)pRet->GetNext();
if ( !pNxt )
{
pBoss = pRet->FindFtnBossFrm();
pPage = pBoss->FindPageFrm();
lcl_NextFtnBoss( pBoss, pPage, sal_False ); // naechster FtnBoss
2000-09-18 23:08:29 +00:00
pCont = pBoss ? pBoss->FindNearestFtnCont() : 0;
if ( pCont )
pNxt = (SwFtnFrm*)pCont->Lower();
}
if ( pNxt )
{
pRet = pNxt;
pBoss = pRet->GetRef()->FindFtnBossFrm();
pPage = pBoss->FindPageFrm();
nPgNum = pPage->GetPhyPageNum();
if ( nPgNum == nRefNum )
{
nColNum = lcl_ColumnNum( pBoss );
if( nColNum == nRefCol )
break; //hat ihn.
else if( nColNum > nRefCol )
pRet = 0; //mind. eine Spalte zu weit.
}
else if ( nPgNum > nRefNum )
pRet = 0; //mind. eine Seite zu weit.
}
else
pRet = 0; //Gibt eben keinen.
} while( pRet );
return pRet;
}
/*************************************************************************
|*
|* SwFtnBossFrm::FindFirstFtn()
|*
|* Beschreibunt Erste Fussnote zum Cnt suchen.
|*
|*************************************************************************/
const SwFtnFrm *SwFtnBossFrm::FindFirstFtn( SwCntntFrm *pCnt ) const
{
const SwFtnFrm *pRet = ((SwFtnBossFrm*)this)->FindFirstFtn();
if ( pRet )
{
const sal_uInt16 nColNum = lcl_ColumnNum( this ); //Spaltennummer
const sal_uInt16 nPageNum = GetPhyPageNum();
2000-09-18 23:08:29 +00:00
while ( pRet && (pRet->GetRef() != pCnt) )
{
while ( pRet->GetFollow() )
pRet = pRet->GetFollow();
if ( pRet->GetNext() )
pRet = (const SwFtnFrm*)pRet->GetNext();
else
{ SwFtnBossFrm *pBoss = (SwFtnBossFrm*)pRet->FindFtnBossFrm();
SwPageFrm *pPage = pBoss->FindPageFrm();
lcl_NextFtnBoss( pBoss, pPage, sal_False ); // naechster FtnBoss
2000-09-18 23:08:29 +00:00
SwFtnContFrm *pCont = pBoss ? pBoss->FindNearestFtnCont() : 0;
pRet = pCont ? (SwFtnFrm*)pCont->Lower() : 0;
}
if ( pRet )
{
const SwFtnBossFrm* pBoss = pRet->GetRef()->FindFtnBossFrm();
if( pBoss->GetPhyPageNum() != nPageNum ||
nColNum != lcl_ColumnNum( pBoss ) )
pRet = 0;
}
}
}
return pRet;
}
/*************************************************************************
|*
|* SwFtnBossFrm::ResetFtn()
|*
|*************************************************************************/
void SwFtnBossFrm::ResetFtn( const SwFtnFrm *pCheck )
{
//Vernichten der Inkarnationen von Fussnoten zum Attribut, wenn sie nicht
//zu pAssumed gehoeren.
OSL_ENSURE( !pCheck->GetMaster(), "Master not an Master." );
2000-09-18 23:08:29 +00:00
SwNodeIndex aIdx( *pCheck->GetAttr()->GetStartNode(), 1 );
SwCntntNode *pNd = aIdx.GetNode().GetCntntNode();
if ( !pNd )
pNd = pCheck->GetFmt()->GetDoc()->
GetNodes().GoNextSection( &aIdx, sal_True, sal_False );
2000-09-18 23:08:29 +00:00
SwClientIter aIter( *pNd );
SwClient* pLast = aIter.GoStart();
while( pLast )
{
if ( pLast->ISA(SwFrm) )
{
SwFrm *pFrm = (SwFrm*)pLast;
SwFrm *pTmp = pFrm->GetUpper();
while ( pTmp && !pTmp->IsFtnFrm() )
pTmp = pTmp->GetUpper();
SwFtnFrm *pFtn = (SwFtnFrm*)pTmp;
while ( pFtn && pFtn->GetMaster() )
pFtn = pFtn->GetMaster();
if ( pFtn != pCheck )
{
while ( pFtn )
{
SwFtnFrm *pNxt = pFtn->GetFollow();
pFtn->Cut();
delete pFtn;
pFtn = pNxt;
}
}
}
pLast = ++aIter;
}
}
/*************************************************************************
|*
|* SwFtnBossFrm::InsertFtn()
|*
|*************************************************************************/
void SwFtnBossFrm::InsertFtn( SwFtnFrm* pNew )
{
//Die Fussnote haben wir, sie muss jetzt nur noch irgendwo
//hin und zwar vor die Fussnote, deren Attribut vor das
//der neuen zeigt (Position wird ueber das Doc ermittelt)
//Gibt es in diesem Fussnotenboss noch keine Fussnoten, so muss eben ein
//Container erzeugt werden.
//Gibt es bereits einen Container aber noch keine Fussnote zu diesem
//Fussnotenboss, so muss die Fussnote hinter die letzte Fussnote der dichtesten
//Vorseite/spalte.
ResetFtn( pNew );
SwFtnFrm *pSibling = FindFirstFtn();
sal_Bool bDontLeave = sal_False;
2000-09-18 23:08:29 +00:00
// Ok, a sibling has been found, but is the sibling in an acceptable
// environment?
if( IsInSct() )
{
SwSectionFrm* pMySect = ImplFindSctFrm();
CWS-TOOLING: integrate CWS odfmetadata2 2009-06-22 11:48:36 +0200 mst r273206 : - connectivity/source/drivers/mozab/mozillasrc/MNSInclude.hxx: + add "include ustrbuf.hxx" to work around warning caused by solaris <sys/kstat.h> declaring a global "long l ;" 2009-06-19 14:25:25 +0200 mst r273159 : - scp2/source/ooo/file_library_ooo.scp: + fix MinGW build 2009-06-08 12:52:33 +0200 mst r272727 : - redland/raptor-1.4.18.patch.mingw, redland/raptor/makefile.mk: + disable parsers that do not build on MinGW (thanks for patch by tono) 2009-05-15 17:31:07 +0200 mst r271957 : fix typos 2009-05-15 17:28:57 +0200 mst r271956 : #i101965# - offapi/com/sun/star/text/TextPortion: + add missing properties: SoftPageBreak, DocumentIndexMark, ReferenceMark, Footnote, TextField + fix read-only status of properties: Bookmark, IsStart, IsCollapsed - offapi/type_reference/{typelibrary_history.txt,types.rdb}: + update reference types.rdb 2009-05-07 14:41:38 +0200 mst r271669 : - sw/inc/{fmtftn.hxx,unocoll.hxx,doc.hxx,editsh.hxx,ftninfo.hxx}, sw/source/core/layout/{flowfrm.cxx,ftnfrm.cxx}, sw/source/core/doc/docftn.cxx, sw/source/core/edit/edattr.cxx, sw/source/core/txtnode/atrftn.cxx, sw/source/core/unocore/unocoll.cxx, sw/source/ui/fldui/fldref.cxx: + fix warning ... the hard way + also fix signature of SwDoc::SetCurFtn 2009-05-05 19:52:55 +0200 mst r271556 : - sw/inc/undobj.hxx: + make some members const 2009-05-05 19:34:40 +0200 mst r271555 : - sw/inc/rolbck.hxx, sw/source/core/undo/rolbck.cxx: + make some members const 2009-05-05 19:13:14 +0200 mst r271553 : - sw/inc/{undobj.hxx,rolbck.hxx}, sw/source/core/undo/{unbkmk.cxx,rolbck.cxx}: + fix rebase merge error + rename SwHstryBookmark to SwHistoryBookmark + clean up SwUndoBookmark 2009-05-05 19:05:53 +0200 mst r271552 : - sw/source/core/unocore/unoportenum.cxx: + fix annoying assertion 2009-05-05 15:34:48 +0200 mst r271522 : CWS-TOOLING: rebase CWS odfmetadata2 to trunk@271427 (milestone: DEV300:m47) 2009-05-04 12:37:01 +0200 mst r271444 : trivial 2009-04-22 13:30:37 +0200 mst r271102 : - sfx2/inc/sfx2/dinfdlg.hxx: + trivial change 2009-04-21 16:46:58 +0200 mst r271043 : - sw/inc/hintids.hxx: + introduce some predicates for the various hints, and use them 2009-04-21 16:19:03 +0200 mst r271041 : - sw/inc/undobj.hxx, sw/source/core/doc/{docfly.cxx,docfmt.cxx,docftn.cxx,doctxm.cxx}, sw/source/core/undo/{unattr.cxx,unins.cxx}: + clean up unattr.cxx: remove/fix casts, prefix members, use auto_ptr, etc. 2009-04-21 15:34:23 +0200 mst r271039 : - sw/inc/{rolbck.hxx,undobj.hxx}, sw/source/core/doc/docfmt.cxx, sw/source/core/txtnode/{thints.cxx,txtedt.cxx}, sw/source/core/undo/{rolbck.cxx,undel.cxx,undobj.cxx,unins.cxx,unmove.cxx, unovwr.cxx,unsect.cxx,unspnd.cxx,untbl.cxx,untblk.cxx,unattr.cxx}: + clean up SwHistory, SwRegHistory and SwHistoryHint etc.: remove/fix casts, prefix members, remove wrong const annotations, use auto_ptr, remove unused members, etc. 2009-04-20 19:17:36 +0200 mst r271013 : - sw/inc/ndhints.hxx, sw/source/core/text/{itrtxt.cxx,txtftn.cxx,itratr.cxx,porfly.cxx, txtfrm.cxx,txtdrop.cxx,frmform.cxx}, sw/source/core/txtnode/{ndtxt.cxx,ndhints.cxx,thints.cxx,txtedt.cxx}, sw/source/core/edit/acorrect.cxx, sw/source/core/doc/{docedt.cxx,docfmt.cxx}, sw/source/filter/html/swhtml.cxx: + clean up SwHintsArray and its subclasses: remove/fix casts, prefix members 2009-04-20 18:42:07 +0200 mst r271007 : - sw/source/core/text/txtio.cxx, sw/source/core/edit/edattr.cxx, sw/source/core/undo/rolbck.cxx: + remove JP_NEWCORE dead code 2009-04-20 18:38:09 +0200 mst r271006 : - sw/source/core/unocore/unochart.cxx: + silence unxlngi warning (debug=t) 2009-04-20 16:36:13 +0200 mst r270991 : - sfx2/inc/sfx2/dinfdlg.hxx, sfx2/source/dialog/dinfdlg.cxx, sfx2/source/doc/objserv.cxx, sw/source/ui/fldui/flddinf.hxx: + trivial cleanups 2009-04-20 15:28:52 +0200 mst r270990 : - sfx2/inc/sfx2/dinfdlg.hxx, sfx2/source/dialog/dinfdlg.cxx, sfx2/source/doc/objserv.cxx: + fix bug: replaying a macro with a DocumentInfoItem removes all user-defined properties 2009-03-10 15:08:20 +0100 mst r269273 : - sfx2/source/doc/Metadatable.cxx: + add missing SolarMutex guards 2009-03-10 14:46:29 +0100 mst r269272 : - unoxml/source/rdf/librdf_repository.cxx: + never free rdf_world because that would call libxm2 xmlCleanupParser (and, to add insult to injury, other libxml2 functions later...) 2009-03-06 19:02:44 +0100 mst r269041 : argh! undo... 2009-03-06 19:00:58 +0100 mst r269040 : fix #i99931# - sw/source/ui/uno/unomod.cxx: + SwXViewSettings::_getSingleValue returns uninitialized memory for the ZoomType property if the value is PAGE_WIDTH_EXACT 2009-03-06 18:59:28 +0100 mst r269039 : - sw/inc/ndtxt.hxx, sw/source/core/txtnode/ndtxt.cxx, sw/source/core/unocore/unoportenum.cxx: + fix some more wntmsci12 warnings... 2009-03-06 18:56:46 +0100 mst r269038 : - sd/source/ui/slidesorter/model/SlsPageEnumerationProvider.cxx: + work around spurious warning on unxsoli4 debug=t 2009-03-05 14:02:01 +0100 mst r268902 : - sw/inc/txatbase.hxx: + back to c-style casts, they also compile on wntmsci12... 2009-03-05 10:23:25 +0100 mst r268882 : - comphelper/inc/comphelper/processfactory.hxx, comphelper/source/processfactory/processfactory.cxx: + revert change of return type of comphelper_getProcessComponentContext to Reference: does not build on wntmsci12 2009-03-04 19:08:09 +0100 mst r268861 : - sw/source/core/txtnode/{atrtox.cxx,ndtxt.cxx}: + fix initialization 2009-03-04 14:37:30 +0100 mst r268831 : - solenv/inc/target.mk: + fix CLASSPATH so complex tests run (fix by sb) 2009-03-04 14:36:30 +0100 mst r268830 : - sw/inc/unoobj.hxx, sw/source/core/unocore/{unoparagraph.cxx,unoobj.cxx,unoobj2.cxx}: + SwXParaFrameEnumeration constructor now takes SwPaM, not SwUnoCrsr + move SwParaSelection into unoparagraph.cxx, as it is only used there + bugfix: replace SwUnoCrsrs on stack with SwCursors 2009-03-04 14:34:46 +0100 mst r268829 : - sw/inc/pam.hxx, sw/source/core/crsr/pam.cxx, sw/source/core/edit/eddel.cxx, sw/source/core/doc/docredln.cxx, sw/source/core/undo/{untbl.cxx,undel.cxx}, sw/source/filter/rtf/swparrtf.cxx: + clean up SwPaM: prefix members + new constructor SwPosition(SwCntntNode&, xub_StrLen) + fix several broken SwPosition and SwPaM constructors + SwPam::DeleteMark now actually resets the unused position to default 2009-03-02 12:07:09 +0100 mst r268646 : - sw/inc/fmtcol.hxx: + fix annoying warning (gcc 4) 2009-03-02 12:06:27 +0100 mst r268645 : - odk/util/check.pl, odk/examples/DevelopersGuide/Text/TextDocuments.java: + rename module from FieldMaster to fieldmaster 2009-02-27 19:49:56 +0100 mst r268614 : - sfx2/inc/sfx2/Metadatable.hxx, sfx2/prj/d.lst, sfx2/source/doc/{Metadatable.cxx,makefile.mk}, sw/inc/{SwMetadatable.hxx,unoobj.hxx,undobj.hxx,ndtxt.hxx}, sw/source/core/doc/{SwMetadatable.cxx,makefile.mk,docnew.cxx}, sw/source/core/undo/{untbl.cxx,unins.cxx}, sw/source/core/unocore/unoparagraph.cxx, sw/source/ui/app/docsh.cxx: + move Metadatable implementation from sw to sfx2 2009-02-27 17:58:55 +0100 mst r268608 : - sw/inc/{SwMetadatable.hxx,undobj.hxx}, sw/source/core/doc/SwMetadatable.cxx, sw/source/core/undo/{untbl.cxx,unins.cxx,undel.cxx}: + CreateUndo now returns an opaque MetadatableUndo object 2009-02-27 13:15:44 +0100 mst r268587 : - sw/inc/ndtxt.hxx, sw/source/core/doc/docfmt.cxx, sw/source/core/text/{itratr.cxx,porlay.cxx}, sw/source/core/txtnode/{txtedt.cxx,ndtxt.cxx,thints.cxx}: + clean up SwTxtNode: fix casts, prefix members + factor out inline function SwTxtNode::TryDeleteSwpHints() 2009-02-27 13:14:30 +0100 mst r268586 : - svx/inc/svx/emphitem.hxx: + fix borken header guard 2009-02-27 13:13:56 +0100 mst r268585 : - sfx2/source/bastyp/progress.cxx: + fix use of compiler specific macro 2009-02-27 11:00:32 +0100 mst r268564 : - sw/inc/{txatbase.hxx,txtatr.hxx,txtinet.hxx,txtfld.hxx,txtftn.hxx, txtflcnt.hxx,txttxmrk.hxx,txtrfmrk.hxx}, sw/source/core/txtnode/{atrtox.cxx,atrref.cxx,atrflyin.cxx,atrftn.cxx, txtatr2.cxx,txatbase.cxx,atrfld.cxx,txtedt.cxx}, sw/source/core/text/atrstck.cxx, sw/source/core/access/acchyperlink.cxx, sw/source/core/doc/visiturl.cxx, sw/source/ui/wrtsh/wrtsh2.cxx: + clean up SwTxtAttr and its subclasses: remove/fix casts, prefix members + SwTxtINetFmt: remove unused member bColor - sw/source/core/text/txtfld.cxx: + move SwTxtFld methods to atrfld.cxx 2009-02-27 10:58:44 +0100 mst r268563 : - sfx2/inc/sfx2/sfxbasemodel.hxx: + don't privately inherit BaseMutex, ScModelObj wants to access it 2009-02-27 10:58:02 +0100 mst r268562 : - xmloff/source/core/{RDFaExportHelper.cxx,RDFaImportHelper.cxx}: + arrrgh!!! someone thought it would be a good idea to have 2 different versions of boost in external! and they're NOT compatible!!! insert an ugly fragile hack that maybe works with both... 2009-02-26 17:42:26 +0100 mst r268544 : - comphelper/inc/comphelper/storagehelper.hxx. sfx2/source/doc/DocumentMetadataAccess.cxx: + someone made IsValidZipEntryFileName a static method and didn't tell me 2009-02-26 15:52:56 +0100 mst r268529 : redland: split up patches 2009-02-26 13:17:56 +0100 mst r268509 : migration of cws odfmetadata2 from CVS (resync to m42): module sw #i95863# - sw/inc/segdefs{,_}.hxx: + remove obsolete files - sw/source/ui/inc/itemdef.hxx: + remove itemdef.hxx - sw/source/ui/app/[apphdl.cxx,docsh.cxx}, sw/source/ui/misc/glshell.cxx, sw/source/ui/shells/*.cxx, sw/source/ui/uiview/*.cxx, sw/source/ui/web/*.cxx: + use sfx2/msg.hxx instead of itemdef.hxx - sw/source/core/edit/eddel.cxx: + @ JP: SwEditShell::Replace: you're right, deleting the text to be replaced first, and then inserting a space, and then replacing that space is unnecessary. whew, i'm so happy that we finally answered that question after 11 years. - sw/inc/edimp.hxx: + remove FOREACHCURSOR_START, FOREACHCURSOR_END - sw/inc/{swcrsr.hxx,unocrsr.hxx,viscrs.hxx}, sw/source/core/crsr/{crsrsh.cxx,swcrsr.cxx,trvlreg.cxx,trvltbl.cxx, unocrsr.cxx,viscrs.cxx}, sw/source/core/doc/{docbm.cxx,doccorr.cxx}, sw/source/core/docnode/{ndtbl.cxx,ndtbl1.cxx}, sw/source/core/edit/editsh.cxx, sw/source/core/frmedt/{fefly1.cxx,fetab.cxx,tblsel.cxx}, sw/source/core/layout/trvlfrm.cxx, sw/source/core/unocore/{unochart.cxx,unoobj2.cxx,unoparagraph.cxx, unoportenum.cxx,unotbl.cxx}, sw/source/core/view/vprint.cxx: + remove the hideous virtual operator SwFooCursor* + make SwCursor::IsReadOnlyAvailable() virtual + make SwUnoCrsr::Clone() virtual + refactor SwCursor methods IsSelOver(), LeftRight(), UpDown(), GotoTable(): replace dynamic_cast<...>(this) with new virtual methods 2009-02-26 13:14:58 +0100 mst r268508 : migration of cws odfmetadata2 from CVS (resync to m42): module sw - sw/source/filter/xml/swxml.cxx: + XMLReader::Read: load RDF metadata of the ODF document - sw/source/filter/xml/wrtxml.cxx: + SwXMLWriter::_Write: write RDF metadata of the ODF document if ODF >= 1.2 #i90620#: import xml:id in text tables (does not actually work yet) - sw/source/filter/xml/xmltbli{.hxx,.cxx}: + SwXMLTableCellAttrTokens,aTableCellAttrTokenMap: add XML_TOK_TABLE_XMLID + SwXMLTableCellContext_Impl::SwXMLTableCellContext_Impl: attribute xml:id + SwXMLTableCellContext_Impl::CreateChildContext: attribute xml:id + SwXMLTableColContext_Impl::SwXMLTableColContext_Impl: attribute xml:id + SwXMLTableContext::SwXMLTableContext: attribute xml:id fix #i98530# - sw/inc/unoport.hxx, sw/source/core/unocore/unoport.cxx: + SwXTextPortion: make constructor params const& - sw/source/core/unocore/unoportenum.cxx: + refactor to remove some code duplication + fix bug: paragraph w/out hints: bookmark before frame gets lost #i97274# handle invalid tables - sw/source/core/layout/tabfrm.cxx, sw/source/filter/xml/xmltbli.cxx: + SwXMLTableContext::MakeTable(): check that the table actually contains cells, and abort (removing the inserted table nodes) if not 2009-02-26 13:11:48 +0100 mst r268507 : migration of cws odfmetadata2 from CVS (resync to m42): module sw refactor SwXTextRange and SwXParagraph - sw/inc/unoobj.hxx, sw/source/core/unocore/unoobj2.cxx: + remove 3 constructors of SwXTextRange + new method SwXTextRange::CreateParentXText + refactor SwXTextRange::CreateTextRangeFromPosition and SwXTextRange::getText - sw/inc/unoobj.hxx, sw/source/core/unocore/unoparagraph.cxx: + SwXParagraph no longer uses a cursor; it registers directly at SwTxtNode + replace SwXParagraph::GetCrsr with SwXParagraph::GetTxtNode - sw/source/core/unocore/unotext.cxx, sw/source/ui/uno/unotxvw.cxx: + adapt to new SwXParagraph #i90620# - sw/inc/SwMetadatable.hxx, sw/source/core/doc/SwMetadatable.cxx: + new files: base classes sw::Metadatable and sw::MetadatableMixin; also, 2 implementations of IXmlIdRegistry: sw::XmlIdRegistryDocument and sw::XmlIdRegistryClipboard + setMetadataReference: handle empty stream name as auto-detect - sw/source/core/doc/makefile.mk: + add SwMetadatable add a XmlIdRegistry to SwDoc - sw/inc/doc.hxx: + SwDoc: add member m_pXmlIdRegistry, method GetXmlIdRegistry() - sw/source/core/doc/docnew.cxx: + initialize XmlIdRegistry in SwDoc::GetXmlIdRegistry, not in constructor, because the constructor is not told whether the SwDoc is a clipboard - sw/inc/docsh.hxx, sw/source/ui/app/docsh.cxx: + SwDocShell: override GetXmlIdRegistry() #i91563#: make the SwTxtNode metadatable - sw/inc/ndtxt.hxx + SwTxtNode inherits sw::Metadatable - sw/inc/unoobj.hxx, sw/source/core/unocore/unoparagraph.cxx: + SwXParagraph inherits sw::MetadatableMixin #i91563#: handle SwTxtNode's metadata for delete - sw/source/core/txtnode/ndtxt.cxx: + SwTxtNode::SplitCntntNode: handle XmlId + SwTxtNode::JoinNext: merge XmlIds - sw/source/core/doc/docedt.cxx: + lcl_GetJoinFlags: document postcondition + SwDoc::Delete: remove XmlId only if SwTxtNode _becomes_ empty #i91563#: handle SwTxtNode's metadata for delete with undo - sw/inc/undobj.hxx + SwUndoDelete: new members m_pMetadataUndoStart, m_pMetadataUndoEnd - sw/source/core/undo/undel.cxx: + SwUndoDelete::SaveCntnt: save XmlIds for start and end SwTxtNode + SwUndoDelete::SaveCntnt: remove XmlId only if SwTxtNode _becomes_ empty + SwUndoDelete::Undo: restore saved XmlIds for start and end SwTxtNode - sw/source/core/docnode/ndcopy.cxx: + SwTxtNode::MakeCopy: register copy at XmlIdRegistry #i91563#: handle SwTxtNode's metadata for find/replace with undo - sw/source/core/undo/unins.cxx: + _UnReplaceData: rename members: add prefix m_ + _UnReplaceData: new members m_pMetadataUndoStart, m_pMetadataUndoEnd + _UnReplaceData::_UnReplaceData: save XmlIds for start and end SwTxtNode + _UnReplaceData::Undo: restore saved XmlIds for start and end SwTxtNode #i91563#: handle SwTxtNode's metadata for table-to-text with undo - sw/source/core/undo/untbl.cxx: + SwTblToTxtSave: rename members: add prefix m_ + SwTblToTxtSave: new members m_pMetadataUndoStart, m_pMetadataUndoEnd + SwTblToTxtSave::SwTblToTxtSave: save XmlIds for start and end SwTxtNode + SwTblToTxtSave::SwTblToTxtSave, SwNodes::UndoTableToText: always store the index of the first SwTxtNode in the cell, instead of the index of the first SwTxtNode in case of the first cell in a row, and the cell start node in other cases + SwNodes::UndoTableToText: restore saved XmlIds for start and end SwTxtNode - sw/source/core/docnode/ndtbl.cxx: + lcl_DelBox: simplify for refactored start index handling in SwTblToTxtSave 2009-02-26 13:02:28 +0100 mst r268505 : migration of cws odfmetadata2 from CVS (resync to m42): module sd - sd/source/ui/table/tableobjectbar.cxx,sd/source/ui/view/*.cxx: + remove invocations of SFX_DECL_TYPE - sd/source/ui/slideshow/SlideShowRestarter.cxx, sd/source/ui/toolpanel/LayoutMenu.cxx, sd/source/ui/unoidl/DrawController.cxx, sd/source/ui/view/{ViewShellBase.cxx,ViewTabBar.cxx,frmview.cxx}: + fix abuses of comphelper_getProcessComponentContext (missing release) 2009-02-26 13:01:24 +0100 mst r268504 : migration of cws odfmetadata2 from CVS (resync to m42): module starmath - starmath/source/document.cxx: + don't touch SfxObjectShell's privates 2009-02-26 13:00:37 +0100 mst r268503 : migration of cws odfmetadata2 from CVS (resync to m42): module sfx2 #i90620# - sfx2/inc/sfx2/XmlIdRegistry.hxx: + new file: interfaces sfx2::IXmlIdRegistry and sfx2::IXmlIdRegistrySupplier and a couple of utility functions - sfx2/inc/sfx2/DocumentMetadataAccess.hxx, sfx2/source/doc/DocumentMetadataAccess.cxx: + new class sfx2::DocumentMetadataAccess, implements XDocumentMetadataAccess + the URI of the DocumentMetadataAccess is now the URI from which the document was loaded; for a new document, use a vnd.sun.star.tdoc URI + add new function sfx2::createBaseURI() + prevent using reserved file names + try not to recurse into embedded subdocuments - sfx2/source/doc/makefile.mk: + add DocumentMetadataAccess - sfx2/util/makefile.mk: + link libsfx2 against libxml2 (needed for xmlValidateNCName) - sfx2/source/doc/makefile.mk: + add LIBXML_CFLAGS to CFLAGS - sfx2/prj/build.lst: + add dependence on libxml2 - sfx2/prj/d.lst: + add XmlIdRegistry.hxx, DocumentMetadataAccess.hxx - sfx2/inc/sfx2/objsh.hxx, sfx2/source/doc/objxtor.cxx: + make SfxObjectShell's members private + new method SfxObjectShell::GetAutoStyleFilterIndex + SfxObjectShell inherits sfx2::IXmlIdRegistrySupplier - sfx2/source/dialog/templdlg.cxx, sfx2/source/doc/sfxbasemodel.cxx: + don't touch SfxObjectShell's privates - sfx2/inc/sfx2/sfxbasemodel.hxx, sfx2/source/doc/sfxbasemodel.cxx: + SfxBaseModel inherits BaseMutex instead of IMPL_SfxBaseModel_MutexContainer + SfxBaseModel implements additional interface XDocumentMetadataAccess + IMPL_SfxBaseModel_DataContainer has new member: a sfx2::DocumentMetadataAccess + implementation of XDocumentMetadataAccess forwards to the sfx2::DocumentMetadataAccess member - sfx2/qa/complex/DocumentMetadataAccessTest.java, sfx2/qa/complex/{tests.sce,makefile.mk}, sfx2/qa/complex/testdocuments/TESTRDFA.odt: + add complex test: DocumentMetadataAccessTest + add RDFa test document #i95863# - sfx2/inc/sfx2/dinfdlg.hxx, sfx2/source/dialog/dinfdlg.cxx: + refactor SfxDocumentItem so it no longer requires a XDocumentInfo + move struct CustomProperty to implementation file + remove class SfxDocumentUserPage + QueryValue,PutValue: remove MID_DOCINFO_FIELD* - sfx2/source/doc/objserv.cxx: + adapt to SfxDocumentItem change - sfx2/inc/sfx2/sfx.hrc, sfx2/sdi/sfxslots.sdi, sfx2/inc/sfx2/msg.hxx: + remove MID_DOCINFO_FIELD* + put all invocations of SFX_DECL_TYPE in msg.hxx, and undef SFX_DECL_TYPE - sfx2/source/doc/objxtor.cxx: + fix abuses of comphelper_getProcessComponentContext (missing release) - sfx2/source/doc/docfile.cxx: + SfxMedium::SfxMedium: don't dereference NULL, throw exception instead - sfx2/source/doc/objstor.cxx: + SfxObjectShell::DoLoad: fix bug: DocumentBaseURI is not initialized 2009-02-26 12:58:07 +0100 mst r268502 : migration of cws odfmetadata2 from CVS (resync to m42): module xmloff #i90620#: implement RDFa import (interface change) - xmloff/inc/xmloff/xmlimp.hxx. xmloff/source/core/xmlimp.cxx: + make SvXMLImport::GetAbsoluteReference() const + add SvXMLImport::GetComponentContext() + SvXMLImport::_InitCtor(): add RDFa namespace + add SvXMLImport::AddRDFa() + SvXMLImport::endDocument() inserts RDFa into document repository - xmloff/inc/xmloff/xmltoken.hxx, xmloff/source/core/xmltoken.cxx: + new tokens for RDFa: XML_ABOUT, XML_DATATYPE - xmloff/inc/RDFaImportHelper.hxx, xmloff/source/core/RDFaImportHelper.cxx: + new class RDFaImportHelper + adapt the code to the bleak reality of broken C++ implementations + handle empty xhtml:about attributes properly, which are actually valid relative URIs + work around broken SvXMLImport::GetAbsoluteReference - xmloff/source/core/makefile.mk: + add RDFaImportHelper.cxx #i90620#: implement RDFa export - xmloff/inc/xmloff/xmlexp.hxx, xmloff/source/core/xmlexp.cxx: + add SvXMLExport::EnsureNamespace(), and a stack of namespace maps + add SvXMLExport::GetComponentContext() + add SvXMLExport::AddAttributesRDFa() - xmloff/inc/RDFaExportHelper.hxx, xmloff/source/core/RDFaExportHelper.cxx: + new class RDFaExportHelper + don't use std::map::data_type, which is actually called std::map::mapped_type by libstdc++ - xmloff/source/core/makefile.mk: + add RDFaExportHelper.cxx #i91563# - xmloff/inc/xmloff/txtimp.hxx, xmloff/source/text/txtimp.cxx: + XMLTextPAttrTokens: add RDFa tokens - xmloff/source/text/txtparai{.hxx,.cxx}: + import RDFa for text:p - xmloff/source/text/txtparae.cxx: + export RDFa for text:p interface change: use XHTML namespace instead of RDFA - xmloff/inc/xmlnmspe.hxx, xmloff/inc/xmloff/xmltoken.hxx, xmloff/source/core/{xmltoken.cxx,xmlimp.cxx,xmlexp.cxx,RDFaExportHelper.cxx}, xmloff/source/text/txtimp.cxx: + use XHTML namespace instead of RDFA #i91565#, #i91566#: (preliminary) import for text:meta, text:meta-field - xmloff/source/text/txtparai.cxx: + new class XMLMetaImportContextBase with subclasses to import text:meta and text:meta-field - xmloff/source/text/XMLTextMarkImportContext.cxx: + change XMLTextMarkImportContext::CreateAndInsertMark to handle marks with no name (text:meta) #i91565#, #i91566#: (preliminary) export for text:meta, text:meta-field - xmloff/inc/txtflde.hxx, xmloff/source/text/txtflde.cxx: + add FIELD_ID_META to FieldIdEnum + new method XMLTextFieldExport::ExportMetaField() + change XMLTextFieldExport::ExportField{,AutoStyle,Helper} to take additional parameter for progress bar - xmloff/inc/xmloff/txtparae.hxx, xmloff/source/text/txtparae.cxx: + make XMLTextParagraphExport::exportTextRangeEnumeration() public + new method XMLTextParagraphExport::exportMeta() #i90620# - xmloff/inc/xmloff/xmlimp.hxx, xmloff/source/core/xmlimp.cxx, xmloff/inc/xmloff/xmlexp.hxx, xmloff/source/core/xmlexp.cxx: + rename SvXML{Im,Ex}port::GetStreamPath() to GetStreamName() + fix xml:id {im,ex}port for embedded documents and non-packages + adapt to API change: XMetadatable #i90620# GRDDL - xmloff/inc/xmlnmspe.hxx, xmloff/inc/xmloff/xmltoken.hxx, xmloff/source/core/{xmltoken.cxx,xmlexp.cxx}: + add GRDDL namespace + add token XML_TRANSFORMATION + add grddl:transformation attribute to root elements for meta.xml, content.xml and styles.xml 2009-02-26 12:54:40 +0100 mst r268501 : migration of cws odfmetadata2 from CVS (resync to m42): module unoxml #i90620# - unoxml/source/rdf/librdf_repository.cxx: + librdf_Repository::importGraph: allocate buffer sized length of stream + switch from one librdf_world per repository to a single static world because redland has global variables with a brain-damaged life-cycle... + exportGraph: use new raptor 1.4.18 feature to disable writing an xml:base attribute in RDF/XML files - unoxml/source/rdf/librdf_repository.cxx: unoxml/qa/complex/RDFRepositoryTest.java: + adapt to predicate is URI change + adapt to RDFa API change + adapt to API change: RDFa has multiple predicates... + adapt to API change: XMetadatable derives from XURI + allow xhtml:datatype without xhtml:content + adapt to API change: attribute MetadataReference is StringPair - unoxml/source/rdf/CURI.cxx: + add some more URI constants 2009-02-26 12:53:32 +0100 mst r268500 : migration of cws odfmetadata2 from CVS (resync to m42): module package - package/inc/ImplValidCharacters.hxx: + remove (moved to comphelper) 2009-02-26 12:52:49 +0100 mst r268499 : migration of cws odfmetadata2 from CVS (resync to m42): module comphelper - comphelper/inc/comphelper/processfactory.hxx, comphelper/source/processfactory/processfactory.cxx: + add getProcessComponentContext() + change return type of comphelper_getProcessComponentContext to Reference - comphelper/inc/comphelper/stl_types.hxx: + add OUStringBufferAppender + add algorithm intersperse - comphelper/source/misc/string.cxx: + rewrite convertCommaSeparated with intersperse and OUStringBufferAppender - comphelper/inc/comphelper/stlunosequence.hxx: + fix bug: begin() on empty sequence != end() 2009-02-26 12:50:47 +0100 mst r268498 : migration of cws odfmetadata2 from CVS (resync to m42): module offapi #i96209# - offapi/com/sun/star/text/fieldmaster/*.idl: + rename module from FieldMaster to fieldmaster - offapi/type_reference/{typelibrary_history.txt,types.rdb}: + update reference types.rdb #i90620# - offapi/com/sun/star/rdf/{XMetadatable.idl,XDocumentMetadataAccess.idl}: + API change: XMetadatable derives from XURI + API change: replace XmlId (string) with MetadataReference (StringPair) - offapi/com/sun/star/rdf/{Statement.idl,XDocumentRepository.idl, XNamedGraph.idl,XRepository.idl}: + the predicate of a statement is a URI, not a Resource - offapi/com/sun/star/rdf/XDocumentMetadataAccess.idl: + rename: s/Package/Document/ + remove uuid + remove everything related to mapping + graph names are now generated from base URI and file names + load methods: improve error handling with XInteractionHandler - offapi/com/sun/star/rdf/XDocumentRepository.idl: + change: RDFa permits using multiple predicates in one attribute + setStatementRDFa: subject is now XResource, object is now XMetadatable - offapi/com/sun/star/rdf/URIs.idl: + add some more URI constants - offapi/com/sun/star/rdf: + fix @since tags and replace <method> with <member> 2009-02-26 12:47:24 +0100 mst r268497 : migration of cws odfmetadata2 from CVS (resync to m42): module redland fix #i93768# - redland/raptor-1.4.17.patch, redland/raptor/makefile.mk: + disable GRDDL parser to prevent call to libxslt xsltSetDefaultSecurityPrefs, which breaks xmlhelp - redland/raptor/makefile.mk, redland/raptor-1.4.17.patch, redland/raptor-1.4.18.patch: + upgrade raptor to 1.4.18 + deactivate serializer for RSS/Atom (does not build) - redland/rasqal/makefile.mk, redland/rasqal-0.9.15.patch, redland/rasqal-0.9.16.patch, + upgrade rasqal to 0.9.16 - redland/redland/makefile.mk, redland/redland-1.0.7.patch, redland/redland-1.0.8.patch: + upgrade redland to 1.0.8 - redland/redlandversion.mk: + the librasqal SONAME has changed
2009-07-02 09:05:03 +00:00
bool bEndnt = pNew->GetAttr()->GetFtn().IsEndNote();
2000-09-18 23:08:29 +00:00
if( bEndnt )
{
const SwSectionFmt* pEndFmt = pMySect->GetEndSectFmt();
bDontLeave = 0 != pEndFmt;
if( pSibling )
{
if( pEndFmt )
{
if( !pSibling->IsInSct() ||
!pSibling->ImplFindSctFrm()->IsDescendantFrom( pEndFmt ) )
pSibling = NULL;
}
else if( pSibling->IsInSct() )
pSibling = NULL;
}
}
else
{
bDontLeave = pMySect->IsFtnAtEnd();
if( pSibling )
{
if( pMySect->IsFtnAtEnd() )
{
if( !pSibling->IsInSct() ||
!pMySect->IsAnFollow( pSibling->ImplFindSctFrm() ) )
pSibling = NULL;
}
else if( pSibling->IsInSct() )
pSibling = NULL;
}
}
}
if( pSibling && pSibling->FindPageFrm()->IsEndNotePage() !=
FindPageFrm()->IsEndNotePage() )
pSibling = NULL;
//Damit die Position herausgefunden werden kann.
SwDoc *pDoc = GetFmt()->GetDoc();
const sal_uLong nStPos = ::lcl_FindFtnPos( pDoc, pNew->GetAttr() );
2000-09-18 23:08:29 +00:00
sal_uLong nCmpPos = 0;
sal_uLong nLastPos = 0;
2000-09-18 23:08:29 +00:00
SwFtnContFrm *pParent = 0;
if( pSibling )
{
nCmpPos = ::lcl_FindFtnPos( pDoc, pSibling->GetAttr() );
if( nCmpPos > nStPos )
pSibling = NULL;
}
if ( !pSibling )
{ pParent = FindFtnCont();
if ( !pParent )
{
//Es gibt noch keinen FussnotenContainer, also machen wir einen.
//HAAAAAAAALT! So einfach ist das leider mal wieder nicht: Es kann
//sein, dass irgendeine naechste Fussnote existiert die vor der
//einzufuegenden zu stehen hat, weil z.B. eine Fussnote ueber zig
//Seiten aufgespalten ist usw.
pParent = FindNearestFtnCont( bDontLeave );
if ( pParent )
{
SwFtnFrm *pFtn = (SwFtnFrm*)pParent->Lower();
if ( pFtn )
{
nCmpPos = ::lcl_FindFtnPos( pDoc, pFtn->GetAttr() );
if ( nCmpPos > nStPos )
pParent = 0;
}
else
pParent = 0;
}
}
if ( !pParent )
//Jetzt kann aber ein Fussnotencontainer gebaut werden.
pParent = MakeFtnCont();
else
{
//Ausgehend von der ersten Fussnote unterhalb des Parents wird die
//erste Fussnote gesucht deren Index hinter dem Index der
//einzufuegenden liegt; vor dieser kann der neue dann gepastet
//werden.
pSibling = (SwFtnFrm*)pParent->Lower();
if ( !pSibling )
{ OSL_ENSURE( !this, "Keinen Platz fuer Fussnote gefunden.");
2000-09-18 23:08:29 +00:00
return;
}
nCmpPos = ::lcl_FindFtnPos( pDoc, pSibling->GetAttr() );
SwFtnBossFrm *pNxtB = this; //Immer den letzten merken, damit wir nicht
SwFtnFrm *pLastSib = 0; //ueber das Ziel hinausschiessen.
while ( pSibling && nCmpPos <= nStPos )
{
pLastSib = pSibling; // der kommt schon mal in Frage
nLastPos = nCmpPos;
while ( pSibling->GetFollow() )
pSibling = pSibling->GetFollow();
if ( pSibling->GetNext() )
{
pSibling = (SwFtnFrm*)pSibling->GetNext();
OSL_ENSURE( !pSibling->GetMaster() || ( ENDNOTE > nStPos &&
2000-09-18 23:08:29 +00:00
pSibling->GetAttr()->GetFtn().IsEndNote() ),
"InsertFtn: Master expected I" );
}
else
{
pNxtB = pSibling->FindFtnBossFrm();
SwPageFrm *pSibPage = pNxtB->FindPageFrm();
sal_Bool bEndNote = pSibPage->IsEndNotePage();
sal_Bool bChgPage = lcl_NextFtnBoss( pNxtB, pSibPage, bDontLeave );
2000-09-18 23:08:29 +00:00
// Bei Seitenwechsel muss das EndNoteFlag ueberprueft werden.
SwFtnContFrm *pCont = pNxtB && ( !bChgPage ||
pSibPage->IsEndNotePage() == bEndNote )
? pNxtB->FindNearestFtnCont( bDontLeave ) : 0;
if( pCont )
pSibling = (SwFtnFrm*)pCont->Lower();
else // kein weiterer FtnContainer, dann werden wir uns wohl hinter
break; // pSibling haengen
}
if ( pSibling )
{
nCmpPos = ::lcl_FindFtnPos( pDoc, pSibling->GetAttr() );
OSL_ENSURE( nCmpPos > nLastPos, "InsertFtn: Order of FtnFrm's buggy" );
2000-09-18 23:08:29 +00:00
}
}
// pLastSib ist jetzt die letzte Fussnote vor uns,
// pSibling leer oder die erste nach uns.
if ( pSibling && pLastSib && (pSibling != pLastSib) )
{ //Sind wir vielleicht bereits ueber das Ziel hinausgeschossen?
if ( nCmpPos > nStPos )
pSibling = pLastSib;
}
else if ( !pSibling )
{ //Eine Chance haben wir noch: wir nehmen einfach die letzte
//Fussnote im Parent. Ein Sonderfall, der z.B. beim
//zurueckfliessen von Absaetzen mit mehreren Fussnoten
//vorkommt.
//Damit wir nicht die Reihenfolge verwuerfeln muessen wir den
//Parent der letzten Fussnote, die wir an der Hand hatten benutzen.
pSibling = pLastSib;
while( pSibling->GetFollow() )
pSibling = pSibling->GetFollow();
OSL_ENSURE( !pSibling->GetNext(), "InsertFtn: Who's that guy?" );
2000-09-18 23:08:29 +00:00
}
}
}
else
{ //Die erste Fussnote der Spalte/Seite haben wir an der Hand, jetzt ausgehend
//von dieser die erste zur selben Spalte/Seite suchen deren Index hinter
//den uebergebenen zeigt, die letzte, die wir an der Hand hatten, ist
//dann der Vorgaenger.
SwFtnBossFrm* pBoss = pNew->GetRef()->FindFtnBossFrm(
!pNew->GetAttr()->GetFtn().IsEndNote() );
sal_uInt16 nRefNum = pBoss->GetPhyPageNum(); // Die Seiten- und
sal_uInt16 nRefCol = lcl_ColumnNum( pBoss ); // Spaltennummer der neuen Fussnote
sal_Bool bEnd = sal_False;
2000-09-18 23:08:29 +00:00
SwFtnFrm *pLastSib = 0;
while ( pSibling && !bEnd && (nCmpPos <= nStPos) )
{
pLastSib = pSibling;
nLastPos = nCmpPos;
while ( pSibling->GetFollow() )
pSibling = pSibling->GetFollow();
SwFtnFrm *pFoll = (SwFtnFrm*)pSibling->GetNext();
if ( pFoll )
{
pBoss = pSibling->GetRef()->FindFtnBossFrm( !pSibling->
GetAttr()->GetFtn().IsEndNote() );
sal_uInt16 nTmpRef;
2000-09-18 23:08:29 +00:00
if( nStPos >= ENDNOTE ||
(nTmpRef = pBoss->GetPhyPageNum()) < nRefNum ||
( nTmpRef == nRefNum && lcl_ColumnNum( pBoss ) <= nRefCol ))
pSibling = pFoll;
else
bEnd = sal_True;
2000-09-18 23:08:29 +00:00
}
else
{
SwFtnBossFrm* pNxtB = pSibling->FindFtnBossFrm();
SwPageFrm *pSibPage = pNxtB->FindPageFrm();
sal_Bool bEndNote = pSibPage->IsEndNotePage();
sal_Bool bChgPage = lcl_NextFtnBoss( pNxtB, pSibPage, bDontLeave );
2000-09-18 23:08:29 +00:00
// Bei Seitenwechsel muss das EndNoteFlag ueberprueft werden.
SwFtnContFrm *pCont = pNxtB && ( !bChgPage ||
pSibPage->IsEndNotePage() == bEndNote )
? pNxtB->FindNearestFtnCont( bDontLeave ) : 0;
if ( pCont )
pSibling = (SwFtnFrm*)pCont->Lower();
else
bEnd = sal_True;
2000-09-18 23:08:29 +00:00
}
if ( !bEnd && pSibling )
nCmpPos = ::lcl_FindFtnPos( pDoc, pSibling->GetAttr() );
if ( pSibling && pLastSib && (pSibling != pLastSib) )
{ //Sind wir vielleicht bereits ueber das Ziel hinausgeschossen?
if ( (nLastPos < nCmpPos) && (nCmpPos > nStPos) )
{
pSibling = pLastSib;
bEnd = sal_True;
2000-09-18 23:08:29 +00:00
}
}
}
}
if ( pSibling )
{
nCmpPos = ::lcl_FindFtnPos( pDoc, pSibling->GetAttr() );
if ( nCmpPos < nStPos )
{
while ( pSibling->GetFollow() )
pSibling = pSibling->GetFollow();
pParent = (SwFtnContFrm*)pSibling->GetUpper();
pSibling = (SwFtnFrm*)pSibling->GetNext();
}
else
{
if( pSibling->GetMaster() )
{
if( ENDNOTE > nCmpPos || nStPos >= ENDNOTE )
{
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
OSL_ENSURE( sal_False, "InsertFtn: Master expected II" );
2000-09-18 23:08:29 +00:00
do
pSibling = pSibling->GetMaster();
while ( pSibling->GetMaster() );
}
}
pParent = (SwFtnContFrm*)pSibling->GetUpper();
}
}
OSL_ENSURE( pParent, "paste in space?" );
2000-09-18 23:08:29 +00:00
pNew->Paste( pParent, pSibling );
}
/*************************************************************************
|*
|* SwFtnBossFrm::AppendFtn()
|*
|*************************************************************************/
void SwFtnBossFrm::AppendFtn( SwCntntFrm *pRef, SwTxtFtn *pAttr )
{
//Wenn es die Fussnote schon gibt tun wir nix.
if ( FindFtn( pRef, pAttr ) )
return;
//Wenn Fussnoten am Dokumentende eingestellt sind, so brauchen wir 'eh erst
//ab der entsprechenden Seite zu suchen.
//Wenn es noch keine gibt, muss eben eine erzeugt werden.
//Wenn es sich um eine Endnote handelt, muss eine Endnotenseite gesucht
//bzw. erzeugt werden.
SwDoc *pDoc = GetFmt()->GetDoc();
SwFtnBossFrm *pBoss = this;
SwPageFrm *pPage = FindPageFrm();
SwPageFrm *pMyPage = pPage;
sal_Bool bChgPage = sal_False;
sal_Bool bEnd = sal_False;
2000-09-18 23:08:29 +00:00
if ( pAttr->GetFtn().IsEndNote() )
{
bEnd = sal_True;
2000-09-18 23:08:29 +00:00
if( GetUpper()->IsSctFrm() &&
((SwSectionFrm*)GetUpper())->IsEndnAtEnd() )
{
SwFrm* pLast =
((SwSectionFrm*)GetUpper())->FindLastCntnt( FINDMODE_ENDNOTE );
if( pLast )
{
pBoss = pLast->FindFtnBossFrm();
pPage = pBoss->FindPageFrm();
}
}
else
{
while ( pPage->GetNext() && !pPage->IsEndNotePage() )
{
pPage = (SwPageFrm*)pPage->GetNext();
bChgPage = sal_True;
2000-09-18 23:08:29 +00:00
}
if ( !pPage->IsEndNotePage() )
{
SwPageDesc *pDesc = pDoc->GetEndNoteInfo().GetPageDesc( *pDoc );
pPage = ::InsertNewPage( *pDesc, pPage->GetUpper(),
!pPage->OnRightPage(), sal_False, sal_True, 0 );
pPage->SetEndNotePage( sal_True );
bChgPage = sal_True;
2000-09-18 23:08:29 +00:00
}
else
{
//Wir koennen wenigstens schon mal ungefaehr die richtige Seite
//suchen. Damit stellen wir sicher das wir auch bei hunderten
//Fussnoten noch in endlicher Zeit fertig werden.
SwPageFrm *pNxt = (SwPageFrm*)pPage->GetNext();
const sal_uLong nStPos = ::lcl_FindFtnPos( pDoc, pAttr );
2000-09-18 23:08:29 +00:00
while ( pNxt && pNxt->IsEndNotePage() )
{
SwFtnContFrm *pCont = pNxt->FindFtnCont();
if ( pCont && pCont->Lower() )
{
OSL_ENSURE( pCont->Lower()->IsFtnFrm(), "Keine Ftn im Container" );
2000-09-18 23:08:29 +00:00
if ( nStPos > ::lcl_FindFtnPos( pDoc,
((SwFtnFrm*)pCont->Lower())->GetAttr()))
{
pPage = pNxt;
pNxt = (SwPageFrm*)pPage->GetNext();
continue;
}
}
break;
}
}
}
}
else if( FTNPOS_CHAPTER == pDoc->GetFtnInfo().ePos && ( !GetUpper()->
IsSctFrm() || !((SwSectionFrm*)GetUpper())->IsFtnAtEnd() ) )
{
while ( pPage->GetNext() && !pPage->IsFtnPage() &&
!((SwPageFrm*)pPage->GetNext())->IsEndNotePage() )
{
pPage = (SwPageFrm*)pPage->GetNext();
bChgPage = sal_True;
2000-09-18 23:08:29 +00:00
}
if ( !pPage->IsFtnPage() )
{
SwPageDesc *pDesc = pDoc->GetFtnInfo().GetPageDesc( *pDoc );
pPage = ::InsertNewPage( *pDesc, pPage->GetUpper(),
!pPage->OnRightPage(), sal_False, sal_True, pPage->GetNext() );
bChgPage = sal_True;
2000-09-18 23:08:29 +00:00
}
else
{
//Wir koennen wenigstens schon mal ungefaehr die richtige Seite
//suchen. Damit stellen wir sicher das wir auch bei hunderten
//Fussnoten noch in endlicher Zeit fertig werden.
SwPageFrm *pNxt = (SwPageFrm*)pPage->GetNext();
const sal_uLong nStPos = ::lcl_FindFtnPos( pDoc, pAttr );
2000-09-18 23:08:29 +00:00
while ( pNxt && pNxt->IsFtnPage() && !pNxt->IsEndNotePage() )
{
SwFtnContFrm *pCont = pNxt->FindFtnCont();
if ( pCont && pCont->Lower() )
{
OSL_ENSURE( pCont->Lower()->IsFtnFrm(), "Keine Ftn im Container" );
2000-09-18 23:08:29 +00:00
if ( nStPos > ::lcl_FindFtnPos( pDoc,
((SwFtnFrm*)pCont->Lower())->GetAttr()))
{
pPage = pNxt;
pNxt = (SwPageFrm*)pPage->GetNext();
continue;
}
}
break;
}
}
}
//Erstmal eine Fussnote und die benoetigten CntntFrms anlegen.
if ( !pAttr->GetStartNode() )
{ OSL_ENSURE( !this, "Kein Fussnoteninhalt." );
2000-09-18 23:08:29 +00:00
return;
}
// Wenn es auf der Seite/Spalte bereits einen FtnCont gibt,
// kann in einen spaltigen Bereich keiner erzeugt werden.
if( pBoss->IsInSct() && pBoss->IsColumnFrm() && !pPage->IsFtnPage() )
{
SwSectionFrm* pSct = pBoss->FindSctFrm();
if( bEnd ? !pSct->IsEndnAtEnd() : !pSct->IsFtnAtEnd() )
{
SwFtnContFrm* pFtnCont = pSct->FindFtnBossFrm(!bEnd)->FindFtnCont();
if( pFtnCont )
{
SwFtnFrm* pTmp = (SwFtnFrm*)pFtnCont->Lower();
if( bEnd )
while( pTmp && !pTmp->GetAttr()->GetFtn().IsEndNote() )
pTmp = (SwFtnFrm*)pTmp->GetNext();
if( pTmp && *pTmp < pAttr )
return;
}
}
}
SwFtnFrm *pNew = new SwFtnFrm( pDoc->GetDfltFrmFmt(), pRef, pAttr );
{
SwNodeIndex aIdx( *pAttr->GetStartNode(), 1 );
::_InsertCnt( pNew, pDoc, aIdx.GetIndex() );
}
// Wenn die Seite gewechselt (oder gar neu angelegt) wurde,
// muessen wir uns dort in die erste Spalte setzen
if( bChgPage )
{
SwLayoutFrm* pBody = pPage->FindBodyCont();
OSL_ENSURE( pBody, "AppendFtn: NoPageBody?" );
2000-09-18 23:08:29 +00:00
if( pBody->Lower() && pBody->Lower()->IsColumnFrm() )
pBoss = (SwFtnBossFrm*)pBody->Lower();
else
pBoss = pPage; // bei nichtspaltigen Seiten auf die Seite selbst
}
pBoss->InsertFtn( pNew );
if ( pNew->GetUpper() ) //Eingesetzt oder nicht?
{
::RegistFlys( pNew->FindPageFrm(), pNew );
SwSectionFrm* pSect = FindSctFrm();
// Der Inhalt des FtnContainers in einem (spaltigen) Bereich
// braucht nur kalkuliert zu werden,
// wenn der Bereich bereits bis zur Unterkante seines Uppers geht.
if( pSect && !pSect->IsJoinLocked() && ( bEnd ? !pSect->IsEndnAtEnd() :
!pSect->IsFtnAtEnd() ) && pSect->Growable() )
pSect->InvalidateSize();
else
{
// --> OD 2005-05-18 #i49383# - disable unlock of position of
// lower objects during format of footnote content.
const bool bOldFtnFrmLocked( pNew->IsColLocked() );
pNew->ColLock();
pNew->KeepLockPosOfLowerObjs();
// --> OD 2006-02-02 #i57914# - adjust fix #i49383#
// no extra notify for footnote frame
// SwLayNotify* pFtnFrmNotitfy = new SwLayNotify( pNew );
// <--
2000-09-18 23:08:29 +00:00
SwCntntFrm *pCnt = pNew->ContainsCntnt();
while ( pCnt && pCnt->FindFtnFrm()->GetAttr() == pAttr )
{
pCnt->Calc();
// --> OD 2005-05-17 #i49383# - format anchored objects
if ( pCnt->IsTxtFrm() && pCnt->IsValid() )
{
if ( !SwObjectFormatter::FormatObjsAtFrm( *pCnt,
*(pCnt->FindPageFrm()) ) )
{
// restart format with first content
pCnt = pNew->ContainsCntnt();
continue;
}
}
// <--
2000-09-18 23:08:29 +00:00
pCnt = (SwCntntFrm*)pCnt->FindNextCnt();
}
// --> OD 2005-05-18 #i49383#
if ( !bOldFtnFrmLocked )
{
pNew->ColUnlock();
}
// --> OD 2006-02-02 #i57914# - adjust fix #i49383#
// enable lock of lower object position before format of footnote frame.
pNew->UnlockPosOfLowerObjs();
// <--
pNew->Calc();
// --> OD 2006-02-02 #i57914# - adjust fix #i49383#
// no extra notify for footnote frame
// pNew->UnlockPosOfLowerObjs();
// delete pFtnFrmNotitfy;
// <--
if ( !bOldFtnFrmLocked && !pNew->GetLower() &&
!pNew->IsColLocked() && !pNew->IsBackMoveLocked() )
{
pNew->Cut();
delete pNew;
}
// <--
2000-09-18 23:08:29 +00:00
}
pMyPage->UpdateFtnNum();
}
else
delete pNew;
}
/*************************************************************************
|*
|* SwFtnBossFrm::FindFtn()
|*
|*************************************************************************/
SwFtnFrm *SwFtnBossFrm::FindFtn( const SwCntntFrm *pRef, const SwTxtFtn *pAttr )
{
//Der einfachste und sicherste Weg geht ueber das Attribut.
OSL_ENSURE( pAttr->GetStartNode(), "FtnAtr ohne StartNode." );
2000-09-18 23:08:29 +00:00
SwNodeIndex aIdx( *pAttr->GetStartNode(), 1 );
SwCntntNode *pNd = aIdx.GetNode().GetCntntNode();
if ( !pNd )
pNd = pRef->GetAttrSet()->GetDoc()->
GetNodes().GoNextSection( &aIdx, sal_True, sal_False );
2000-09-18 23:08:29 +00:00
if ( !pNd )
return 0;
SwClientIter aIter( *pNd );
SwClient *pClient;
if ( 0 != (pClient = aIter.GoStart()) )
do
{
if ( pClient->IsA( TYPE(SwFrm) ) )
{
SwFrm *pFrm = ((SwFrm*)pClient)->GetUpper();
// #i28500#, #i27243# Due to the endnode collector, there are
// SwFtnFrms, which are not in the layout. Therefore the
// bInfFtn flags are not set correctly, and a cell of FindFtnFrm
// would return 0. Therefore we better call ImplFindFtnFrm().
SwFtnFrm *pFtn = pFrm->ImplFindFtnFrm();
2000-09-18 23:08:29 +00:00
if ( pFtn && pFtn->GetRef() == pRef )
{
// The following condition becomes true, if the whole
// footnotecontent is a section. While no frames exist,
// the HiddenFlag of the section is set, this causes
// the GoNextSection-function leaves the footnote.
if( pFtn->GetAttr() != pAttr )
return 0;
while ( pFtn && pFtn->GetMaster() )
pFtn = pFtn->GetMaster();
return pFtn;
}
}
} while ( 0 != (pClient = aIter++) );
return 0;
}
/*************************************************************************
|*
|* SwFtnBossFrm::RemoveFtn()
|*
|*************************************************************************/
void SwFtnBossFrm::RemoveFtn( const SwCntntFrm *pRef, const SwTxtFtn *pAttr,
sal_Bool bPrep )
2000-09-18 23:08:29 +00:00
{
SwFtnFrm *pFtn = FindFtn( pRef, pAttr );
if( pFtn )
{
do
{
SwFtnFrm *pFoll = pFtn->GetFollow();
pFtn->Cut();
delete pFtn;
pFtn = pFoll;
} while ( pFtn );
if( bPrep && pRef->IsFollow() )
{
OSL_ENSURE( pRef->IsTxtFrm(), "NoTxtFrm has Footnote?" );
2000-09-18 23:08:29 +00:00
SwTxtFrm* pMaster = (SwTxtFrm*)pRef->FindMaster();
if( !pMaster->IsLocked() )
pMaster->Prepare( PREP_FTN_GONE );
}
}
FindPageFrm()->UpdateFtnNum();
}
/*************************************************************************
|*
|* SwFtnBossFrm::ChangeFtnRef()
|*
|*************************************************************************/
void SwFtnBossFrm::ChangeFtnRef( const SwCntntFrm *pOld, const SwTxtFtn *pAttr,
SwCntntFrm *pNew )
{
SwFtnFrm *pFtn = FindFtn( pOld, pAttr );
while ( pFtn )
{
pFtn->SetRef( pNew );
pFtn = pFtn->GetFollow();
}
}
/*************************************************************************
|*
|* SwFtnBossFrm::CollectFtns()
|*
|*************************************************************************/
/// OD 03.04.2003 #108446# - add parameter <_bCollectOnlyPreviousFtns> in
/// order to control, if only footnotes, which are positioned before the
/// footnote boss frame <this> have to be collected.
void SwFtnBossFrm::CollectFtns( const SwCntntFrm* _pRef,
SwFtnBossFrm* _pOld,
SvPtrarr& _rFtnArr,
const sal_Bool _bCollectOnlyPreviousFtns )
2000-09-18 23:08:29 +00:00
{
SwFtnFrm *pFtn = _pOld->FindFirstFtn();
2000-09-18 23:08:29 +00:00
while( !pFtn )
{
if( _pOld->IsColumnFrm() )
2000-09-18 23:08:29 +00:00
{ // Spalten abklappern
while ( !pFtn && _pOld->GetPrev() )
2000-09-18 23:08:29 +00:00
{
//Wenn wir keine Fussnote gefunden haben, ist noch nicht alles zu
//spaet. Die Schleife wird beim Aufnehmen von Follow-Zeilen durch
//Tabellen benoetigt. Fuer alle anderen Faelle ist sie in der Lage
//'krumme' Verhaeltnisse zu korrigieren.
_pOld = (SwFtnBossFrm*)_pOld->GetPrev();
pFtn = _pOld->FindFirstFtn();
2000-09-18 23:08:29 +00:00
}
}
if( !pFtn )
{
// vorherige Seite
SwPageFrm* pPg;
for ( SwFrm* pTmp = _pOld;
0 != ( pPg = (SwPageFrm*)pTmp->FindPageFrm()->GetPrev())
&& pPg->IsEmptyPage() ;
)
{
2000-09-18 23:08:29 +00:00
pTmp = pPg;
}
2000-09-18 23:08:29 +00:00
if( !pPg )
return;
SwLayoutFrm* pBody = pPg->FindBodyCont();
if( pBody->Lower() && pBody->Lower()->IsColumnFrm() )
{
// mehrspaltige Seite => letzte Spalte suchen
_pOld = static_cast<SwFtnBossFrm*>(pBody->GetLastLower());
2000-09-18 23:08:29 +00:00
}
else
_pOld = pPg; // einspaltige Seite
pFtn = _pOld->FindFirstFtn();
2000-09-18 23:08:29 +00:00
}
}
// OD 03.04.2003 #108446# - consider new parameter <_bCollectOnlyPreviousFtns>
SwFtnBossFrm* pRefBossFrm = NULL;
if ( _bCollectOnlyPreviousFtns )
{
pRefBossFrm = this;
}
_CollectFtns( _pRef, pFtn, _rFtnArr, _bCollectOnlyPreviousFtns, pRefBossFrm );
2000-09-18 23:08:29 +00:00
}
/*************************************************************************
|*
|* SwFtnBossFrm::_CollectFtns()
|*
|*************************************************************************/
inline void FtnInArr( SvPtrarr& rFtnArr, SwFtnFrm* pFtn )
{
if ( USHRT_MAX == rFtnArr.GetPos( (VoidPtr)pFtn ) )
rFtnArr.Insert( (VoidPtr)pFtn, rFtnArr.Count() );
}
/// OD 03.04.2003 #108446# - add parameters <_bCollectOnlyPreviousFtns> and
/// <_pRefFtnBossFrm> in order to control, if only footnotes, which are positioned
/// before the given reference footnote boss frame have to be collected.
/// Note: if parameter <_bCollectOnlyPreviousFtns> is true, then parameter
/// <_pRefFtnBossFrm> have to be referenced to an object.
/// Adjust parameter names.
void SwFtnBossFrm::_CollectFtns( const SwCntntFrm* _pRef,
SwFtnFrm* _pFtn,
SvPtrarr& _rFtnArr,
sal_Bool _bCollectOnlyPreviousFtns,
const SwFtnBossFrm* _pRefFtnBossFrm)
2000-09-18 23:08:29 +00:00
{
// OD 03.04.2003 #108446# - assert, that no reference footnote boss frame
// is set, in spite of the order, that only previous footnotes has to be
// collected.
OSL_ENSURE( !_bCollectOnlyPreviousFtns || _pRefFtnBossFrm,
"<SwFtnBossFrm::_CollectFtns(..)> - No reference footnote boss frame for collecting only previous footnotes set.\nCrash will be caused!" );
2000-09-18 23:08:29 +00:00
//Alle Fussnoten die von pRef referenziert werden nacheinander
//einsammeln (Attribut fuer Attribut), zusammengefuegen
//(der Inhalt zu einem Attribut kann ueber mehrere Seiten verteilt sein)
//und ausschneiden.
SvPtrarr aNotFtnArr( 20, 20 ); //Zur Robustheit werden hier die nicht
//dazugehoerigen Fussnoten eingetragen.
//Wenn eine Fussnote zweimal angefasst wird
//ists vorbei! So kommt die Funktion auch
//noch mit einem kaputten Layout
//einigermassen (ohne Schleife und Absturz)
//"klar".
//Hier sollte keiner mit einer Follow-Ftn ankommen, es sei denn er hat
//ernste Absichten (:-)); spricht er kommt mit einer Ftn an die vor der
//ersten der Referenz liegt.
OSL_ENSURE( !_pFtn->GetMaster() || _pFtn->GetRef() != _pRef, "FollowFtn moven?" );
while ( _pFtn->GetMaster() )
_pFtn = _pFtn->GetMaster();
2000-09-18 23:08:29 +00:00
sal_Bool bFound = sal_False;
2000-09-18 23:08:29 +00:00
while ( _pFtn )
2000-09-18 23:08:29 +00:00
{
//Erstmal die naechste Fussnote der Spalte/Seite suchen, damit wir nicht
//nach dem Cut jeder Fussnote von vorn anfangen muessen.
SwFtnFrm *pNxtFtn = _pFtn;
2000-09-18 23:08:29 +00:00
while ( pNxtFtn->GetFollow() )
pNxtFtn = pNxtFtn->GetFollow();
pNxtFtn = (SwFtnFrm*)pNxtFtn->GetNext();
if ( !pNxtFtn )
{
SwFtnBossFrm* pBoss = _pFtn->FindFtnBossFrm();
2000-09-18 23:08:29 +00:00
SwPageFrm* pPage = pBoss->FindPageFrm();
do
{
lcl_NextFtnBoss( pBoss, pPage, sal_False );
2000-09-18 23:08:29 +00:00
if( pBoss )
{
SwLayoutFrm* pCont = pBoss->FindFtnCont();
if( pCont )
{
pNxtFtn = (SwFtnFrm*)pCont->Lower();
if( pNxtFtn )
{
while( pNxtFtn->GetMaster() )
pNxtFtn = pNxtFtn->GetMaster();
if( pNxtFtn == _pFtn )
2000-09-18 23:08:29 +00:00
pNxtFtn = NULL;
}
}
}
} while( !pNxtFtn && pBoss );
}
else if( !pNxtFtn->GetAttr()->GetFtn().IsEndNote() )
{ OSL_ENSURE( !pNxtFtn->GetMaster(), "_CollectFtn: Master exspected" );
2000-09-18 23:08:29 +00:00
while ( pNxtFtn->GetMaster() )
pNxtFtn = pNxtFtn->GetMaster();
}
if ( pNxtFtn == _pFtn )
2000-09-18 23:08:29 +00:00
{
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
OSL_ENSURE( sal_False, "_CollectFtn: Devil's circle" );
2000-09-18 23:08:29 +00:00
pNxtFtn = 0;
}
// OD 03.04.2003 #108446# - determine, if found footnote has to be collected.
sal_Bool bCollectFoundFtn = sal_False;
if ( _pFtn->GetRef() == _pRef && !_pFtn->GetAttr()->GetFtn().IsEndNote() )
{
if ( _bCollectOnlyPreviousFtns )
{
SwFtnBossFrm* pBossOfFoundFtn = _pFtn->FindFtnBossFrm( sal_True );
OSL_ENSURE( pBossOfFoundFtn,
"<SwFtnBossFrm::_CollectFtns(..)> - footnote boss frame of found footnote frame missing.\nWrong layout!" );
if ( !pBossOfFoundFtn || // don't crash, if no footnote boss is found.
pBossOfFoundFtn->IsBefore( _pRefFtnBossFrm )
)
{
bCollectFoundFtn = sal_True;
}
}
else
{
bCollectFoundFtn = sal_True;
}
}
if ( bCollectFoundFtn )
2000-09-18 23:08:29 +00:00
{
OSL_ENSURE( !_pFtn->GetMaster(), "FollowFtn moven?" );
SwFtnFrm *pNxt = _pFtn->GetFollow();
2000-09-18 23:08:29 +00:00
while ( pNxt )
{
SwFrm *pCnt = pNxt->ContainsAny();
if ( pCnt )
{ //Unterwegs wird der Follow zerstoert weil er leer wird!
do
{ SwFrm *pNxtCnt = pCnt->GetNext();
pCnt->Cut();
pCnt->Paste( _pFtn );
2000-09-18 23:08:29 +00:00
pCnt = pNxtCnt;
} while ( pCnt );
}
else
{ OSL_ENSURE( !pNxt, "Fussnote ohne Inhalt?" );
2000-09-18 23:08:29 +00:00
pNxt->Cut();
delete pNxt;
}
pNxt = _pFtn->GetFollow();
2000-09-18 23:08:29 +00:00
}
_pFtn->Cut();
FtnInArr( _rFtnArr, _pFtn );
bFound = sal_True;
2000-09-18 23:08:29 +00:00
}
else
{
FtnInArr( aNotFtnArr, _pFtn );
2000-09-18 23:08:29 +00:00
if( bFound )
break;
}
if ( pNxtFtn &&
USHRT_MAX == _rFtnArr.GetPos( (VoidPtr)pNxtFtn ) &&
2000-09-18 23:08:29 +00:00
USHRT_MAX == aNotFtnArr.GetPos( (VoidPtr)pNxtFtn ) )
_pFtn = pNxtFtn;
2000-09-18 23:08:29 +00:00
else
break;
}
}
/*************************************************************************
|*
|* SwFtnBossFrm::_MoveFtns()
|*
|*************************************************************************/
void SwFtnBossFrm::_MoveFtns( SvPtrarr &rFtnArr, sal_Bool bCalc )
2000-09-18 23:08:29 +00:00
{
//Alle Fussnoten die von pRef referenziert werden muessen von der
//aktuellen Position, die sich durch die alte Spalte/Seite ergab, auf eine
//neue Position, bestimmt durch die neue Spalte/Seite, gemoved werden.
const sal_uInt16 nMyNum = FindPageFrm()->GetPhyPageNum();
const sal_uInt16 nMyCol = lcl_ColumnNum( this );
2001-10-08 13:10:07 +00:00
SWRECTFN( this )
2000-09-18 23:08:29 +00:00
// --> OD 2004-06-11 #i21478# - keep last inserted footnote in order to
// format the content of the following one.
SwFtnFrm* pLastInsertedFtn = 0L;
for ( sal_uInt16 i = 0; i < rFtnArr.Count(); ++i )
2000-09-18 23:08:29 +00:00
{
SwFtnFrm *pFtn = (SwFtnFrm*)rFtnArr[i];
SwFtnBossFrm* pRefBoss = pFtn->GetRef()->FindFtnBossFrm( sal_True );
2000-09-18 23:08:29 +00:00
if( pRefBoss != this )
{
const sal_uInt16 nRefNum = pRefBoss->FindPageFrm()->GetPhyPageNum();
const sal_uInt16 nRefCol = lcl_ColumnNum( this );
2000-09-18 23:08:29 +00:00
if( nRefNum < nMyNum || ( nRefNum == nMyNum && nRefCol <= nMyCol ) )
pRefBoss = this;
}
pRefBoss->InsertFtn( pFtn );
if ( pFtn->GetUpper() ) //Robust, z.B. bei doppelten
{
// Damit FtnFrms, die nicht auf die Seite passen, nicht fuer zuviel
// Unruhe sorgen (Loop 66312), wird ihr Inhalt zunaechst zusammengestaucht.
// Damit wird der FtnCont erst gegrowt, wenn der Inhalt formatiert wird
// und feststellt, dass er auf die Seite passt.
SwFrm *pCnt = pFtn->ContainsAny();
while( pCnt )
{
if( pCnt->IsLayoutFrm() )
{
SwFrm* pTmp = ((SwLayoutFrm*)pCnt)->ContainsAny();
while( pTmp && ((SwLayoutFrm*)pCnt)->IsAnLower( pTmp ) )
{
pTmp->Prepare( PREP_MOVEFTN );
2001-10-08 13:10:07 +00:00
(pTmp->Frm().*fnRect->fnSetHeight)(0);
(pTmp->Prt().*fnRect->fnSetHeight)(0);
2000-09-18 23:08:29 +00:00
pTmp = pTmp->FindNext();
}
}
else
pCnt->Prepare( PREP_MOVEFTN );
2001-10-08 13:10:07 +00:00
(pCnt->Frm().*fnRect->fnSetHeight)(0);
(pCnt->Prt().*fnRect->fnSetHeight)(0);
2000-09-18 23:08:29 +00:00
pCnt = pCnt->GetNext();
}
2001-10-08 13:10:07 +00:00
(pFtn->Frm().*fnRect->fnSetHeight)(0);
(pFtn->Prt().*fnRect->fnSetHeight)(0);
2000-09-18 23:08:29 +00:00
pFtn->Calc();
pFtn->GetUpper()->Calc();
if( bCalc )
{
SwTxtFtn *pAttr = pFtn->GetAttr();
pCnt = pFtn->ContainsAny();
sal_Bool bUnlock = !pFtn->IsBackMoveLocked();
2000-09-18 23:08:29 +00:00
pFtn->LockBackMove();
// --> OD 2005-05-18 #i49383# - disable unlock of position of
// lower objects during format of footnote content.
pFtn->KeepLockPosOfLowerObjs();
// --> OD 2006-02-02 #i57914# - adjust fix #i49383#
// no extra notify for footnote frame
// SwLayNotify aFtnFrmNotitfy( pFtn );
// <--
2000-09-18 23:08:29 +00:00
while ( pCnt && pCnt->FindFtnFrm()->GetAttr() == pAttr )
{
pCnt->_InvalidatePos();
pCnt->Calc();
// --> OD 2005-05-17 #i49383# - format anchored objects
if ( pCnt->IsTxtFrm() && pCnt->IsValid() )
{
if ( !SwObjectFormatter::FormatObjsAtFrm( *pCnt,
*(pCnt->FindPageFrm()) ) )
{
// restart format with first content
pCnt = pFtn->ContainsAny();
continue;
}
}
// <--
2000-09-18 23:08:29 +00:00
if( pCnt->IsSctFrm() )
{ // Wenn es sich um einen nichtleeren Bereich handelt,
// iterieren wir auch ueber seinen Inhalt
SwFrm* pTmp = ((SwSectionFrm*)pCnt)->ContainsAny();
if( pTmp )
pCnt = pTmp;
else
pCnt = pCnt->FindNext();
}
else
pCnt = pCnt->FindNext();
}
if( bUnlock )
{
pFtn->UnlockBackMove();
if( !pFtn->ContainsAny() && !pFtn->IsColLocked() )
{
pFtn->Cut();
delete pFtn;
// --> OD 2004-06-10 #i21478#
pFtn = 0L;
}
}
// --> OD 2005-05-18 #i49383#
if ( pFtn )
{
// --> OD 2006-02-02 #i57914# - adjust fix #i49383#
// enable lock of lower object position before format of footnote frame.
pFtn->UnlockPosOfLowerObjs();
pFtn->Calc();
// pFtn->UnlockPosOfLowerObjs();
// <--
}
// --> OD 2006-02-02 #i57914# - adjust fix #i49383#
// no extra notify for footnote frame
// else
// {
// aFtnFrmNotitfy.FrmDeleted();
// }
// <--
2000-09-18 23:08:29 +00:00
}
}
else
{ OSL_ENSURE( !pFtn->GetMaster() && !pFtn->GetFollow(),
2000-09-18 23:08:29 +00:00
"DelFtn und Master/Follow?" );
delete pFtn;
// --> OD 2004-06-10 #i21478#
pFtn = 0L;
}
// --> OD 2004-06-10 #i21478#
if ( pFtn )
{
pLastInsertedFtn = pFtn;
}
}
// --> OD 2004-06-10 #i21478# - format content of footnote following
// the new inserted ones.
if ( bCalc && pLastInsertedFtn )
{
if ( pLastInsertedFtn->GetNext() )
{
SwFtnFrm* pNextFtn = static_cast<SwFtnFrm*>(pLastInsertedFtn->GetNext());
SwTxtFtn* pAttr = pNextFtn->GetAttr();
SwFrm* pCnt = pNextFtn->ContainsAny();
sal_Bool bUnlock = !pNextFtn->IsBackMoveLocked();
pNextFtn->LockBackMove();
// --> OD 2005-05-18 #i49383# - disable unlock of position of
// lower objects during format of footnote content.
pNextFtn->KeepLockPosOfLowerObjs();
// --> OD 2006-02-02 #i57914# - adjust fix #i49383#
// no extra notify for footnote frame
// SwLayNotify aFtnFrmNotitfy( pNextFtn );
// <--
while ( pCnt && pCnt->FindFtnFrm()->GetAttr() == pAttr )
{
pCnt->_InvalidatePos();
pCnt->Calc();
// --> OD 2005-05-17 #i49383# - format anchored objects
if ( pCnt->IsTxtFrm() && pCnt->IsValid() )
{
if ( !SwObjectFormatter::FormatObjsAtFrm( *pCnt,
*(pCnt->FindPageFrm()) ) )
{
// restart format with first content
pCnt = pNextFtn->ContainsAny();
continue;
}
}
// <--
if( pCnt->IsSctFrm() )
{ // Wenn es sich um einen nichtleeren Bereich handelt,
// iterieren wir auch ueber seinen Inhalt
SwFrm* pTmp = ((SwSectionFrm*)pCnt)->ContainsAny();
if( pTmp )
pCnt = pTmp;
else
pCnt = pCnt->FindNext();
}
else
pCnt = pCnt->FindNext();
}
if( bUnlock )
{
pNextFtn->UnlockBackMove();
}
// --> OD 2005-05-18 #i49383#
// --> OD 2006-02-02 #i57914# - adjust fix #i49383#
// enable lock of lower object position before format of footnote frame.
pNextFtn->UnlockPosOfLowerObjs();
pNextFtn->Calc();
// pNextFtn->UnlockPosOfLowerObjs();
// <--
2000-09-18 23:08:29 +00:00
}
}
}
/*************************************************************************
|*
|* SwFtnBossFrm::MoveFtns()
|*
|*************************************************************************/
void SwFtnBossFrm::MoveFtns( const SwCntntFrm *pSrc, SwCntntFrm *pDest,
SwTxtFtn *pAttr )
{
if( ( GetFmt()->GetDoc()->GetFtnInfo().ePos == FTNPOS_CHAPTER &&
(!GetUpper()->IsSctFrm() || !((SwSectionFrm*)GetUpper())->IsFtnAtEnd()))
|| pAttr->GetFtn().IsEndNote() )
return;
2011-03-15 13:50:53 +00:00
OSL_ENSURE( this == pSrc->FindFtnBossFrm( sal_True ),
2000-09-18 23:08:29 +00:00
"SwPageFrm::MoveFtns: source frame isn't on that FtnBoss" );
SwFtnFrm *pFtn = FindFirstFtn();
if( pFtn )
{
ChangeFtnRef( pSrc, pAttr, pDest );
SwFtnBossFrm *pDestBoss = pDest->FindFtnBossFrm( sal_True );
OSL_ENSURE( pDestBoss, "+SwPageFrm::MoveFtns: no destination boss" );
2000-09-18 23:08:29 +00:00
if( pDestBoss ) // robust
{
SvPtrarr aFtnArr( 5, 5 );
pDestBoss->_CollectFtns( pDest, pFtn, aFtnArr );
if ( aFtnArr.Count() )
{
pDestBoss->_MoveFtns( aFtnArr, sal_True );
2000-09-18 23:08:29 +00:00
SwPageFrm* pSrcPage = FindPageFrm();
SwPageFrm* pDestPage = pDestBoss->FindPageFrm();
// Nur beim Seitenwechsel FtnNum Updaten
if( pSrcPage != pDestPage )
{
if( pSrcPage->GetPhyPageNum() > pDestPage->GetPhyPageNum() )
pSrcPage->UpdateFtnNum();
pDestPage->UpdateFtnNum();
}
}
}
}
}
/*************************************************************************
|*
|* SwFtnBossFrm::RearrangeFtns()
|*
|*************************************************************************/
void SwFtnBossFrm::RearrangeFtns( const SwTwips nDeadLine, const sal_Bool bLock,
2000-09-18 23:08:29 +00:00
const SwTxtFtn *pAttr )
{
//Alle Fussnoten der Spalte/Seite dergestalt anformatieren,
//dass sie ggf. die Spalte/Seite wechseln.
SwSaveFtnHeight aSave( this, nDeadLine );
SwFtnFrm *pFtn = FindFirstFtn();
if( pFtn && pFtn->GetPrev() && bLock )
{
SwFtnFrm* pFirst = (SwFtnFrm*)pFtn->GetUpper()->Lower();
SwFrm* pCntnt = pFirst->ContainsAny();
if( pCntnt )
{
sal_Bool bUnlock = !pFirst->IsBackMoveLocked();
2000-09-18 23:08:29 +00:00
pFirst->LockBackMove();
pFirst->Calc();
pCntnt->Calc();
// --> OD 2005-05-17 #i49383# - format anchored objects
if ( pCntnt->IsTxtFrm() && pCntnt->IsValid() )
{
SwObjectFormatter::FormatObjsAtFrm( *pCntnt,
*(pCntnt->FindPageFrm()) );
}
// <--
if( bUnlock )
pFirst->UnlockBackMove();
2000-09-18 23:08:29 +00:00
}
pFtn = FindFirstFtn();
}
SwDoc *pDoc = GetFmt()->GetDoc();
const sal_uLong nFtnPos = pAttr ? ::lcl_FindFtnPos( pDoc, pAttr ) : 0;
2000-09-18 23:08:29 +00:00
SwFrm *pCnt = pFtn ? pFtn->ContainsAny() : 0;
if ( pCnt )
{
sal_Bool bMore = sal_True;
sal_Bool bStart = pAttr == 0; // wenn kein Attribut uebergeben wird, alle bearbeiten
// --> OD 2005-05-18 #i49383# - disable unlock of position of
// lower objects during format of footnote and footnote content.
SwFtnFrm* pLastFtnFrm( 0L );
// --> OD 2006-02-02 #i57914# - adjust fix #i49383#
// no extra notify for footnote frame
// SwLayNotify* pFtnFrmNotify( 0L );
// footnote frame needs to be locked, if <bLock> isn't set.
bool bUnlockLastFtnFrm( false );
// <--
2000-09-18 23:08:29 +00:00
do
{
if( !bStart )
bStart = ::lcl_FindFtnPos( pDoc, pCnt->FindFtnFrm()->GetAttr() )
== nFtnPos;
if( bStart )
{
pCnt->_InvalidatePos();
2000-09-18 23:08:29 +00:00
pCnt->_InvalidateSize();
pCnt->Prepare( PREP_ADJUST_FRM );
SwFtnFrm* pFtnFrm = pCnt->FindFtnFrm();
// --> OD 2005-05-18 #i49383#
if ( pFtnFrm != pLastFtnFrm )
{
if ( pLastFtnFrm )
{
if ( !bLock && bUnlockLastFtnFrm )
{
pLastFtnFrm->ColUnlock();
}
// --> OD 2006-02-02 #i57914# - adjust fix #i49383#
// enable lock of lower object position before format of footnote frame.
pLastFtnFrm->UnlockPosOfLowerObjs();
pLastFtnFrm->Calc();
// pLastFtnFrm->UnlockPosOfLowerObjs();
// no extra notify for footnote frame
// delete pFtnFrmNotify;
// <--
if ( !bLock && bUnlockLastFtnFrm &&
!pLastFtnFrm->GetLower() &&
!pLastFtnFrm->IsColLocked() &&
!pLastFtnFrm->IsBackMoveLocked() )
{
pLastFtnFrm->Cut();
delete pLastFtnFrm;
pLastFtnFrm = 0L;
}
}
if ( !bLock )
{
bUnlockLastFtnFrm = !pFtnFrm->IsColLocked();
pFtnFrm->ColLock();
}
pFtnFrm->KeepLockPosOfLowerObjs();
pLastFtnFrm = pFtnFrm;
// --> OD 2006-02-02 #i57914# - adjust fix #i49383#
// no extra notify for footnote frame
// pFtnFrmNotify = new SwLayNotify( pLastFtnFrm );
// <--
}
// <--
// OD 30.10.2002 #97265# - invalidate position of footnote
// frame, if it's below its footnote container, in order to
// assure its correct position, probably calculating its previous
// footnote frames.
{
SWRECTFN( this );
SwFrm* aFtnContFrm = pFtnFrm->GetUpper();
if ( (pFtnFrm->Frm().*fnRect->fnTopDist)((aFtnContFrm->*fnRect->fnGetPrtBottom)()) > 0 )
{
pFtnFrm->_InvalidatePos();
}
}
2000-09-18 23:08:29 +00:00
if ( bLock )
{
sal_Bool bUnlock = !pFtnFrm->IsBackMoveLocked();
pFtnFrm->LockBackMove();
pFtnFrm->Calc();
2000-09-18 23:08:29 +00:00
pCnt->Calc();
// --> OD 2005-05-17 #i49383# - format anchored objects
if ( pCnt->IsTxtFrm() && pCnt->IsValid() )
{
if ( !SwObjectFormatter::FormatObjsAtFrm( *pCnt,
*(pCnt->FindPageFrm()) ) )
{
// restart format with first content
pCnt = pFtn->ContainsAny();
continue;
}
}
// <--
if( bUnlock )
2001-12-12 13:44:09 +00:00
{
pFtnFrm->UnlockBackMove();
if( !pFtnFrm->Lower() &&
!pFtnFrm->IsColLocked() )
2001-12-12 13:44:09 +00:00
{
// --> OD 2005-08-10 #i49383#
OSL_ENSURE( pLastFtnFrm == pFtnFrm,
"<SwFtnBossFrm::RearrangeFtns(..)> - <pLastFtnFrm> != <pFtnFrm>" );
pLastFtnFrm = 0L;
// --> OD 2006-02-02 #i57914# - adjust fix #i49383#
// no extra notify for footnote frame
// pFtnFrmNotify->FrmDeleted();
// delete pFtnFrmNotify;
// <--
pFtnFrm->Cut();
delete pFtnFrm;
2001-12-12 13:44:09 +00:00
}
}
2000-09-18 23:08:29 +00:00
}
else
{
pFtnFrm->Calc();
2000-09-18 23:08:29 +00:00
pCnt->Calc();
// --> OD 2005-05-17 #i49383# - format anchored objects
if ( pCnt->IsTxtFrm() && pCnt->IsValid() )
{
if ( !SwObjectFormatter::FormatObjsAtFrm( *pCnt,
*(pCnt->FindPageFrm()) ) )
{
// restart format with first content
pCnt = pFtn->ContainsAny();
continue;
}
}
// <--
2000-09-18 23:08:29 +00:00
}
}
SwSectionFrm *pDel = NULL;
if( pCnt->IsSctFrm() )
{
SwFrm* pTmp = ((SwSectionFrm*)pCnt)->ContainsAny();
if( pTmp )
{
pCnt = pTmp;
continue;
}
pDel = (SwSectionFrm*)pCnt;
}
if ( pCnt->GetNext() )
pCnt = pCnt->GetNext();
else
{
pCnt = pCnt->FindNext();
if ( pCnt )
{
SwFtnFrm* pFtnFrm = pCnt->FindFtnFrm();
if( pFtnFrm->GetRef()->FindFtnBossFrm(
pFtnFrm->GetAttr()->GetFtn().IsEndNote() ) != this )
bMore = sal_False;
2000-09-18 23:08:29 +00:00
}
else
bMore = sal_False;
2000-09-18 23:08:29 +00:00
}
if( pDel )
{
pDel->Cut();
delete pDel;
}
if ( bMore )
{
//Nicht weiter als bis zur angegebenen Fussnote, falls eine
//angegeben wurde.
if ( pAttr &&
(::lcl_FindFtnPos( pDoc,
pCnt->FindFtnFrm()->GetAttr()) > nFtnPos ) )
bMore = sal_False;
2000-09-18 23:08:29 +00:00
}
} while ( bMore );
// --> OD 2005-05-18 #i49383#
if ( pLastFtnFrm )
{
if ( !bLock && bUnlockLastFtnFrm )
{
pLastFtnFrm->ColUnlock();
}
// --> OD 2006-02-02 #i57914# - adjust fix #i49383#
// enable lock of lower object position before format of footnote frame.
pLastFtnFrm->UnlockPosOfLowerObjs();
pLastFtnFrm->Calc();
// pLastFtnFrm->UnlockPosOfLowerObjs();
// no extra notify for footnote frame
// delete pFtnFrmNotify;
// <--
if ( !bLock && bUnlockLastFtnFrm &&
!pLastFtnFrm->GetLower() &&
!pLastFtnFrm->IsColLocked() &&
!pLastFtnFrm->IsBackMoveLocked() )
{
pLastFtnFrm->Cut();
delete pLastFtnFrm;
}
}
// <--
2000-09-18 23:08:29 +00:00
}
}
/*************************************************************************
|*
|* SwPageFrm::UpdateFtnNum()
|*
|*************************************************************************/
void SwPageFrm::UpdateFtnNum()
{
//Seitenweise Numerierung nur wenn es am Dokument so eingestellt ist.
if ( GetFmt()->GetDoc()->GetFtnInfo().eNum != FTNNUM_PAGE )
return;
SwLayoutFrm* pBody = FindBodyCont();
if( !pBody || !pBody->Lower() )
return;
SwCntntFrm* pCntnt = pBody->ContainsCntnt();
sal_uInt16 nNum = 0;
2000-09-18 23:08:29 +00:00
while( pCntnt && pCntnt->FindPageFrm() == this )
{
if( ((SwTxtFrm*)pCntnt)->HasFtn() )
{
SwFtnBossFrm* pBoss = pCntnt->FindFtnBossFrm( sal_True );
2000-09-18 23:08:29 +00:00
if( pBoss->GetUpper()->IsSctFrm() &&
((SwSectionFrm*)pBoss->GetUpper())->IsOwnFtnNum() )
pCntnt = ((SwSectionFrm*)pBoss->GetUpper())->FindLastCntnt();
else
{
SwFtnFrm* pFtn = (SwFtnFrm*)pBoss->FindFirstFtn( pCntnt );
while( pFtn )
{
SwTxtFtn* pTxtFtn = pFtn->GetAttr();
if( !pTxtFtn->GetFtn().IsEndNote() &&
!pTxtFtn->GetFtn().GetNumStr().Len() &&
!pFtn->GetMaster() &&
(pTxtFtn->GetFtn().GetNumber() != ++nNum) )
pTxtFtn->SetNumber( nNum );
if ( pFtn->GetNext() )
pFtn = (SwFtnFrm*)pFtn->GetNext();
else
{
SwFtnBossFrm* pTmpBoss = pFtn->FindFtnBossFrm( sal_True );
if( pTmpBoss )
2000-09-18 23:08:29 +00:00
{
2011-02-19 17:33:21 +01:00
SwPageFrm* pPage = pTmpBoss->FindPageFrm();
pFtn = NULL;
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
lcl_NextFtnBoss( pTmpBoss, pPage, sal_False );
SwFtnContFrm *pCont = pTmpBoss->FindNearestFtnCont();
2000-09-18 23:08:29 +00:00
if ( pCont )
pFtn = (SwFtnFrm*)pCont->Lower();
}
}
if( pFtn && pFtn->GetRef() != pCntnt )
pFtn = NULL;
}
}
}
pCntnt = pCntnt->FindNextCnt();
}
}
/*************************************************************************
|*
|* SwFtnBossFrm::SetFtnDeadLine()
|*
|*************************************************************************/
void SwFtnBossFrm::SetFtnDeadLine( const SwTwips nDeadLine )
{
SwFrm *pBody = FindBodyCont();
pBody->Calc();
SwFrm *pCont = FindFtnCont();
const SwTwips nMax = nMaxFtnHeight;//Aktuelle MaxHeight nicht ueberschreiten.
2001-10-08 13:10:07 +00:00
SWRECTFN( this )
2000-09-18 23:08:29 +00:00
if ( pCont )
{
pCont->Calc();
2001-12-12 13:44:09 +00:00
nMaxFtnHeight = -(pCont->Frm().*fnRect->fnBottomDist)( nDeadLine );
2001-10-08 13:10:07 +00:00
}
else
2001-12-12 13:44:09 +00:00
nMaxFtnHeight = -(pBody->Frm().*fnRect->fnBottomDist)( nDeadLine );
2000-09-18 23:08:29 +00:00
if ( GetFmt()->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE) )
nMaxFtnHeight += pBody->Grow( LONG_MAX, sal_True );
2000-09-18 23:08:29 +00:00
if ( IsInSct() )
nMaxFtnHeight += FindSctFrm()->Grow( LONG_MAX, sal_True );
2000-09-18 23:08:29 +00:00
if ( nMaxFtnHeight < 0 )
nMaxFtnHeight = 0;
if ( nMax != LONG_MAX && nMaxFtnHeight > nMax )
nMaxFtnHeight = nMax;
}
/*************************************************************************
|*
|* SwFtnBossFrm::GetVarSpace()
|*
|*************************************************************************/
SwTwips SwFtnBossFrm::GetVarSpace() const
{
//Fuer Seiten soll ein Wert von 20% der Seitenhoehe nicht unterschritten
//werden (->AMA: was macht MS da?)
//->AMA: Was ist da fuer Bereiche sinnvoll (und kompatibel zu MS ;-)?
//AMA: MS kennt scheinbar kein Begrenzung, die Fussnoten nehmen durchaus
// die ganze Seite/Spalte ein.
const SwPageFrm* pPg = FindPageFrm();
OSL_ENSURE( pPg || IsInSct(), "Footnote lost page" );
2000-09-18 23:08:29 +00:00
const SwFrm *pBody = FindBodyCont();
SwTwips nRet;
if( pBody )
{
SWRECTFN( this )
if( IsInSct() )
{
nRet = 0;
SwTwips nTmp = (*fnRect->fnYDiff)( (pBody->*fnRect->fnGetPrtTop)(),
(Frm().*fnRect->fnGetTop)() );
2000-09-18 23:08:29 +00:00
const SwSectionFrm* pSect = FindSctFrm();
// Endnotes in a ftncontainer causes a deadline:
// the bottom of the last contentfrm
if( pSect->IsEndnAtEnd() ) // endnotes allowed?
{
OSL_ENSURE( !Lower() || !Lower()->GetNext() || Lower()->GetNext()->
2000-09-18 23:08:29 +00:00
IsFtnContFrm(), "FtnContainer exspected" );
const SwFtnContFrm* pCont = Lower() ?
(SwFtnContFrm*)Lower()->GetNext() : 0;
if( pCont )
{
SwFtnFrm* pFtn = (SwFtnFrm*)pCont->Lower();
while( pFtn)
{
if( pFtn->GetAttr()->GetFtn().IsEndNote() )
{ // endnote found
SwFrm* pFrm = ((SwLayoutFrm*)Lower())->Lower();
if( pFrm )
{
while( pFrm->GetNext() )
pFrm = pFrm->GetNext(); // last cntntfrm
nTmp += (*fnRect->fnYDiff)(
(Frm().*fnRect->fnGetTop)(),
(pFrm->Frm().*fnRect->fnGetBottom)() );
2000-09-18 23:08:29 +00:00
}
break;
}
pFtn = (SwFtnFrm*)pFtn->GetNext();
}
}
}
if( nTmp < nRet )
nRet = nTmp;
}
else
nRet = - (pPg->Prt().*fnRect->fnGetHeight)()/5;
nRet += (pBody->Frm().*fnRect->fnGetHeight)();
2000-09-18 23:08:29 +00:00
if( nRet < 0 )
nRet = 0;
}
else
nRet = 0;
if ( IsPageFrm() &&
GetFmt()->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE) )
2000-09-18 23:08:29 +00:00
nRet += BROWSE_HEIGHT - Frm().Height();
return nRet;
}
/*************************************************************************
|*
|* SwFtnBossFrm::NeighbourhoodAdjustment(SwFrm*)
|*
|* gibt Auskunft, ob die Groessenveraenderung von pFrm von AdjustNeighbourhood(...)
|* oder von Grow/Shrink(..) verarbeitet werden sollte.
|* Bei einem PageFrm oder in Spalten direkt unterhalb der Seite muss AdjustNei..
|* gerufen werden, in Rahmenspalten Grow/Shrink.
|* Spannend sind die spaltigen Bereiche: Wenn es in der Spalte einen Fussnotencontainer
|* gibt und die Fussnoten nicht vom Bereich eingesammelt werden, ist ein Adjust..,
|* ansonsten ein Grow/Shrink notwendig.
|*
|*************************************************************************/
sal_uInt8 SwFtnBossFrm::_NeighbourhoodAdjustment( const SwFrm* ) const
2000-09-18 23:08:29 +00:00
{
sal_uInt8 nRet = NA_ONLY_ADJUST;
2000-09-18 23:08:29 +00:00
if( GetUpper() && !GetUpper()->IsPageBodyFrm() )
{
// Spaltige Rahmen erfordern Grow/Shrink
if( GetUpper()->IsFlyFrm() )
nRet = NA_GROW_SHRINK;
else
{
OSL_ENSURE( GetUpper()->IsSctFrm(), "NeighbourhoodAdjustment: Unexspected Upper" );
2000-09-18 23:08:29 +00:00
if( !GetNext() && !GetPrev() )
nRet = NA_GROW_ADJUST; // section with a single column (FtnAtEnd)
else
{
const SwFrm* pTmp = Lower();
OSL_ENSURE( pTmp, "NeighbourhoodAdjustment: Missing Lower()" );
2000-09-18 23:08:29 +00:00
if( !pTmp->GetNext() )
nRet = NA_GROW_SHRINK;
else if( !GetUpper()->IsColLocked() )
nRet = NA_ADJUST_GROW;
OSL_ENSURE( !pTmp->GetNext() || pTmp->GetNext()->IsFtnContFrm(),
2000-09-18 23:08:29 +00:00
"NeighbourhoodAdjustment: Who's that guy?" );
}
}
}
return nRet;
}
/*************************************************************************
|*
|* SwPageFrm::SetColMaxFtnHeight()
|*
|*************************************************************************/
void SwPageFrm::SetColMaxFtnHeight()
{
SwLayoutFrm *pBody = FindBodyCont();
if( pBody && pBody->Lower() && pBody->Lower()->IsColumnFrm() )
{
SwColumnFrm* pCol = (SwColumnFrm*)pBody->Lower();
do
{
pCol->SetMaxFtnHeight( GetMaxFtnHeight() );
pCol = (SwColumnFrm*)pCol->GetNext();
} while ( pCol );
}
}
/*************************************************************************
|*
|* SwLayoutFrm::MoveLowerFtns
|*
|*************************************************************************/
sal_Bool SwLayoutFrm::MoveLowerFtns( SwCntntFrm *pStart, SwFtnBossFrm *pOldBoss,
SwFtnBossFrm *pNewBoss, const sal_Bool bFtnNums )
2000-09-18 23:08:29 +00:00
{
SwDoc *pDoc = GetFmt()->GetDoc();
if ( !pDoc->GetFtnIdxs().Count() )
return sal_False;
2000-09-18 23:08:29 +00:00
if( pDoc->GetFtnInfo().ePos == FTNPOS_CHAPTER &&
( !IsInSct() || !FindSctFrm()->IsFtnAtEnd() ) )
return sal_True;
2000-09-18 23:08:29 +00:00
if ( !pNewBoss )
pNewBoss = FindFtnBossFrm( sal_True );
2000-09-18 23:08:29 +00:00
if ( pNewBoss == pOldBoss )
return sal_False;
2000-09-18 23:08:29 +00:00
sal_Bool bMoved = sal_False;
2000-09-18 23:08:29 +00:00
if( !pStart )
pStart = ContainsCntnt();
SvPtrarr aFtnArr( 5, 5 );
while ( IsAnLower( pStart ) )
{
if ( ((SwTxtFrm*)pStart)->HasFtn() )
{
// OD 03.04.2003 #108446# - To avoid unnecessary moves of footnotes
// use new parameter <_bCollectOnlyPreviousFtn> (4th parameter of
// method <SwFtnBossFrm::CollectFtn(..)>) to control, that only
// footnotes have to be collected, that are positioned before the
// new dedicated footnote boss frame.
pNewBoss->CollectFtns( pStart, pOldBoss, aFtnArr, sal_True );
}
2000-09-18 23:08:29 +00:00
pStart = pStart->GetNextCntntFrm();
}
OSL_ENSURE( pOldBoss->IsInSct() == pNewBoss->IsInSct(),
2000-09-18 23:08:29 +00:00
"MoveLowerFtns: Section confusion" );
SvPtrarr *pFtnArr;
SwLayoutFrm* pNewChief = 0;
SwLayoutFrm* pOldChief = 0;
2000-09-18 23:08:29 +00:00
if( pStart && pOldBoss->IsInSct() && ( pOldChief = pOldBoss->FindSctFrm() )
!= ( pNewChief = pNewBoss->FindSctFrm() ) )
{
pFtnArr = new SvPtrarr( 5, 5 );
pOldChief = pOldBoss->FindFtnBossFrm( sal_True );
pNewChief = pNewBoss->FindFtnBossFrm( sal_True );
2000-09-18 23:08:29 +00:00
while( pOldChief->IsAnLower( pStart ) )
{
if ( ((SwTxtFrm*)pStart)->HasFtn() )
((SwFtnBossFrm*)pNewChief)->CollectFtns( pStart,
(SwFtnBossFrm*)pOldBoss, *pFtnArr );
pStart = pStart->GetNextCntntFrm();
}
if( !pFtnArr->Count() )
{
delete pFtnArr;
pFtnArr = NULL;
}
}
else
pFtnArr = NULL;
if ( aFtnArr.Count() || pFtnArr )
{
if( aFtnArr.Count() )
pNewBoss->_MoveFtns( aFtnArr, sal_True );
2000-09-18 23:08:29 +00:00
if( pFtnArr )
{
((SwFtnBossFrm*)pNewChief)->_MoveFtns( *pFtnArr, sal_True );
2000-09-18 23:08:29 +00:00
delete pFtnArr;
}
bMoved = sal_True;
2000-09-18 23:08:29 +00:00
// Nur bei einem Seitenwechsel muss die FtnNum neu berechnet werden
if ( bFtnNums )
{
SwPageFrm* pOldPage = pOldBoss->FindPageFrm();
SwPageFrm* pNewPage =pNewBoss->FindPageFrm();
if( pOldPage != pNewPage )
{
pOldPage->UpdateFtnNum();
pNewPage->UpdateFtnNum();
}
}
}
return bMoved;
}
/*************************************************************************
|*
|* SwLayoutFrm::MoveFtnCntFwd()
|*
|*************************************************************************/
sal_Bool SwCntntFrm::MoveFtnCntFwd( sal_Bool bMakePage, SwFtnBossFrm *pOldBoss )
2000-09-18 23:08:29 +00:00
{
OSL_ENSURE( IsInFtn(), "Keine Ftn." );
2000-09-18 23:08:29 +00:00
SwLayoutFrm *pFtn = FindFtnFrm();
// The first paragraph in the first footnote in the first column in the
// sectionfrm at the top of the page has not to move forward, if the
// columnbody is empty.
if( pOldBoss->IsInSct() && !pOldBoss->GetIndPrev() && !GetIndPrev() &&
!pFtn->GetPrev() )
{
SwLayoutFrm* pBody = pOldBoss->FindBodyCont();
if( !pBody || !pBody->Lower() )
return sal_True;
2000-09-18 23:08:29 +00:00
}
//fix(9538): Wenn die Ftn noch Nachbarn hinter sich hat, so muessen
//diese ersteinmal verschwinden.
SwLayoutFrm *pNxt = (SwLayoutFrm*)pFtn->GetNext();
SwLayoutFrm *pLst = 0;
while ( pNxt )
{
while ( pNxt->GetNext() )
pNxt = (SwLayoutFrm*)pNxt->GetNext();
if ( pNxt == pLst )
pNxt = 0;
else
{ pLst = pNxt;
SwCntntFrm *pCnt = pNxt->ContainsCntnt();
if( pCnt )
pCnt->MoveFtnCntFwd( sal_True, pOldBoss );
2000-09-18 23:08:29 +00:00
pNxt = (SwLayoutFrm*)pFtn->GetNext();
}
}
sal_Bool bSamePage = sal_True;
2000-09-18 23:08:29 +00:00
SwLayoutFrm *pNewUpper =
GetLeaf( bMakePage ? MAKEPAGE_INSERT : MAKEPAGE_NONE, sal_True );
2000-09-18 23:08:29 +00:00
if ( pNewUpper )
{
sal_Bool bSameBoss = sal_True;
2000-09-18 23:08:29 +00:00
SwFtnBossFrm * const pNewBoss = pNewUpper->FindFtnBossFrm();
//Wechseln wir die Spalte/Seite?
if ( sal_False == ( bSameBoss = pNewBoss == pOldBoss ) )
{
bSamePage = pOldBoss->FindPageFrm() == pNewBoss->FindPageFrm(); // Seitenwechsel?
2000-09-18 23:08:29 +00:00
pNewUpper->Calc();
}
//Das Layoutblatt, dass wir fuer Fussnoten bekommen ist entweder
//ein Fussnotencontainer oder eine Fussnote
//Wenn es eine Fussnote ist, und sie die gleiche Fussnotenreferez
//wie der alte Upper hat, so moven wir uns direkt hinein.
//Ist die Referenz einen andere oder ist es ein Container, so wird
//eine neue Fussnote erzeugt und in den Container gestellt.
// Wenn wir in einem Bereich innerhalb der Fussnote sind, muss
// SectionFrame noch angelegt werden.
SwFtnFrm* pTmpFtn = pNewUpper->IsFtnFrm() ? ((SwFtnFrm*)pNewUpper) : 0;
if( !pTmpFtn )
{
OSL_ENSURE( pNewUpper->IsFtnContFrm(), "Neuer Upper kein FtnCont.");
2000-09-18 23:08:29 +00:00
SwFtnContFrm *pCont = (SwFtnContFrm*)pNewUpper;
//Fussnote erzeugen.
SwFtnFrm *pOld = FindFtnFrm();
pTmpFtn = new SwFtnFrm( pOld->GetFmt()->GetDoc()->GetDfltFrmFmt(),
pOld->GetRef(), pOld->GetAttr() );
//Verkettung der Fussnoten.
if ( pOld->GetFollow() )
{
pTmpFtn->SetFollow( pOld->GetFollow() );
pOld->GetFollow()->SetMaster( pTmpFtn );
}
pOld->SetFollow( pTmpFtn );
pTmpFtn->SetMaster( pOld );
SwFrm* pNx = pCont->Lower();
if( pNx && pTmpFtn->GetAttr()->GetFtn().IsEndNote() )
while(pNx && !((SwFtnFrm*)pNx)->GetAttr()->GetFtn().IsEndNote())
pNx = pNx->GetNext();
pTmpFtn->Paste( pCont, pNx );
pTmpFtn->Calc();
}
OSL_ENSURE( pTmpFtn->GetAttr() == FindFtnFrm()->GetAttr(), "Wrong Footnote!" );
2000-09-18 23:08:29 +00:00
// Bereiche in Fussnoten beduerfen besonderer Behandlung
SwLayoutFrm *pNewUp = pTmpFtn;
if( IsInSct() )
{
SwSectionFrm* pSect = FindSctFrm();
// Bereich in Fussnote (oder nur Fussnote in Bereich)?
if( pSect->IsInFtn() )
{
if( pTmpFtn->Lower() && pTmpFtn->Lower()->IsSctFrm() &&
pSect->GetFollow() == (SwSectionFrm*)pTmpFtn->Lower() )
pNewUp = (SwSectionFrm*)pTmpFtn->Lower();
else
{
pNewUp = new SwSectionFrm( *pSect, sal_False );
2000-09-18 23:08:29 +00:00
pNewUp->InsertBefore( pTmpFtn, pTmpFtn->Lower() );
static_cast<SwSectionFrm*>(pNewUp)->Init();
2000-09-18 23:08:29 +00:00
pNewUp->Frm().Pos() = pTmpFtn->Frm().Pos();
pNewUp->Frm().Pos().Y() += 1; //wg. Benachrichtigungen.
// Wenn unser Bereichsframe einen Nachfolger hat, so muss dieser
// umgehaengt werden hinter den neuen Follow der Bereichsframes.
SwFrm* pTmp = pSect->GetNext();
if( pTmp )
{
SwFlowFrm* pTmpNxt;
2000-09-18 23:08:29 +00:00
if( pTmp->IsCntntFrm() )
pTmpNxt = (SwCntntFrm*)pTmp;
2000-09-18 23:08:29 +00:00
else if( pTmp->IsSctFrm() )
pTmpNxt = (SwSectionFrm*)pTmp;
2000-09-18 23:08:29 +00:00
else
{
OSL_ENSURE( pTmp->IsTabFrm(), "GetNextSctLeaf: Wrong Type" );
pTmpNxt = (SwTabFrm*)pTmp;
2000-09-18 23:08:29 +00:00
}
pTmpNxt->MoveSubTree( pTmpFtn, pNewUp->GetNext() );
2000-09-18 23:08:29 +00:00
}
}
}
}
MoveSubTree( pNewUp, pNewUp->Lower() );
if( !bSameBoss )
Prepare( PREP_BOSS_CHGD );
}
return bSamePage;
}
/*************************************************************************
|*
|* class SwSaveFtnHeight
|*
|*************************************************************************/
SwSaveFtnHeight::SwSaveFtnHeight( SwFtnBossFrm *pBs, const SwTwips nDeadLine ) :
pBoss( pBs ),
nOldHeight( pBs->GetMaxFtnHeight() )
{
pBoss->SetFtnDeadLine( nDeadLine );
nNewHeight = pBoss->GetMaxFtnHeight();
}
SwSaveFtnHeight::~SwSaveFtnHeight()
{
//Wenn zwischendurch jemand an der DeadLine gedreht hat, so lassen wir
//ihm seinen Spass!
if ( nNewHeight == pBoss->GetMaxFtnHeight() )
pBoss->nMaxFtnHeight = nOldHeight;
}
#if OSL_DEBUG_LEVEL > 1
//JP 15.10.2001: in a non pro version test if the attribute has the same
// meaning which his reference is
// Normally, the pRef member and the GetRefFromAttr() result has to be
// identically. Sometimes footnote will be moved from a master to its follow,
// but the GetRef() is called first, so we have to ignore a master/follow
// mismatch.
const SwCntntFrm* SwFtnFrm::GetRef() const
{
const SwCntntFrm* pRefAttr = GetRefFromAttr();
OSL_ENSURE( pRef == pRefAttr || pRef->IsAnFollow( pRefAttr )
2001-11-22 14:04:00 +00:00
|| pRefAttr->IsAnFollow( pRef ),
"access to deleted Frame? pRef != pAttr->GetRef()" );
return pRef;
}
SwCntntFrm* SwFtnFrm::GetRef()
{
const SwCntntFrm* pRefAttr = GetRefFromAttr();
OSL_ENSURE( pRef == pRefAttr || pRef->IsAnFollow( pRefAttr )
2001-11-22 14:04:00 +00:00
|| pRefAttr->IsAnFollow( pRef ),
"access to deleted Frame? pRef != pAttr->GetRef()" );
return pRef;
}
#endif
const SwCntntFrm* SwFtnFrm::GetRefFromAttr() const
{
SwFtnFrm* pThis = (SwFtnFrm*)this;
return pThis->GetRefFromAttr();
}
SwCntntFrm* SwFtnFrm::GetRefFromAttr()
{
OSL_ENSURE( pAttr, "invalid Attribute" );
SwTxtNode& rTNd = (SwTxtNode&)pAttr->GetTxtNode();
SwPosition aPos( rTNd, SwIndex( &rTNd, *pAttr->GetStart() ));
SwCntntFrm* pCFrm = rTNd.GetFrm( 0, &aPos, sal_False );
return pCFrm;
}
/** search for last content in the current footnote frame
OD 2005-12-02 #i27138#
@author OD
*/
SwCntntFrm* SwFtnFrm::FindLastCntnt()
{
SwCntntFrm* pLastCntntFrm( 0L );
// find last lower, which is a content frame or contains content.
// hidden text frames, empty sections and empty tables have to be skipped.
SwFrm* pLastLowerOfFtn( GetLower() );
SwFrm* pTmpLastLower( pLastLowerOfFtn );
while ( pTmpLastLower && pTmpLastLower->GetNext() )
{
pTmpLastLower = pTmpLastLower->GetNext();
if ( ( pTmpLastLower->IsTxtFrm() &&
!static_cast<SwTxtFrm*>(pTmpLastLower)->IsHiddenNow() ) ||
( pTmpLastLower->IsSctFrm() &&
static_cast<SwSectionFrm*>(pTmpLastLower)->GetSection() &&
static_cast<SwSectionFrm*>(pTmpLastLower)->ContainsCntnt() ) ||
( pTmpLastLower->IsTabFrm() &&
static_cast<SwTabFrm*>(pTmpLastLower)->ContainsCntnt() ) )
{
pLastLowerOfFtn = pTmpLastLower;
}
}
// determine last content frame depending on type of found last lower.
if ( pLastLowerOfFtn && pLastLowerOfFtn->IsTabFrm() )
{
pLastCntntFrm = static_cast<SwTabFrm*>(pLastLowerOfFtn)->FindLastCntnt();
}
else if ( pLastLowerOfFtn && pLastLowerOfFtn->IsSctFrm() )
{
pLastCntntFrm = static_cast<SwSectionFrm*>(pLastLowerOfFtn)->FindLastCntnt();
}
else
{
pLastCntntFrm = dynamic_cast<SwCntntFrm*>(pLastLowerOfFtn);
}
return pLastCntntFrm;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */