Files
libreoffice/sw/source/core/docnode/node.cxx

1994 lines
64 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
*
************************************************************************/
2000-09-18 23:08:29 +00:00
#include <hintids.hxx>
#include <editeng/frmdiritem.hxx>
#include <editeng/protitem.hxx>
#include <com/sun/star/i18n/CharacterIteratorMode.hpp>
2000-09-18 23:08:29 +00:00
#include <fmtcntnt.hxx>
#include <fmtanchr.hxx>
#include <frmfmt.hxx>
#include <txtftn.hxx>
#include <ftnfrm.hxx>
#include <doc.hxx>
#include <docary.hxx>
#include <node.hxx>
#include <ndindex.hxx>
#include <numrule.hxx>
#include <swtable.hxx>
#include <ndtxt.hxx>
#include <pam.hxx>
#include <swcache.hxx>
#include <section.hxx>
#include <cntfrm.hxx>
#include <flyfrm.hxx>
#include <txtfrm.hxx>
#include <tabfrm.hxx> // SwTabFrm
#include <viewsh.hxx>
#include <paratr.hxx>
#include <ftnidx.hxx>
#include <fmtftn.hxx>
#include <fmthdft.hxx>
#include <frmatr.hxx>
#include <fmtautofmt.hxx>
2000-09-18 23:08:29 +00:00
#include <frmtool.hxx>
#include <pagefrm.hxx>
#include <node2lay.hxx>
#include <pagedesc.hxx>
#include <fmtpdsc.hxx>
#include <breakit.hxx>
#include <crsskip.hxx>
#include <SwStyleNameMapper.hxx>
#include <scriptinfo.hxx>
#include <rootfrm.hxx>
#include <istyleaccess.hxx>
#include <IDocumentListItems.hxx>
#include <switerator.hxx>
#include "ndole.hxx"
2000-11-20 15:40:58 +00:00
using namespace ::com::sun::star::i18n;
2000-09-18 23:08:29 +00:00
TYPEINIT2( SwCntntNode, SwModify, SwIndexReg )
/*
* Some local helper functions for the attribute set handle of a content node.
* Since the attribute set of a content node may not be modified directly,
* we always have to create a new SwAttrSet, do the modifications, and get
* a new handle from the style access
*/
namespace AttrSetHandleHelper
{
void GetNewAutoStyle( boost::shared_ptr<const SfxItemSet>& mrpAttrSet,
const SwCntntNode& rNode,
SwAttrSet& rNewAttrSet )
{
const SwAttrSet* pAttrSet = static_cast<const SwAttrSet*>(mrpAttrSet.get());
if( rNode.GetModifyAtAttr() )
const_cast<SwAttrSet*>(pAttrSet)->SetModifyAtAttr( 0 );
IStyleAccess& rSA = pAttrSet->GetPool()->GetDoc()->GetIStyleAccess();
mrpAttrSet = rSA.getAutomaticStyle( rNewAttrSet, rNode.IsTxtNode() ?
IStyleAccess::AUTO_STYLE_PARA :
IStyleAccess::AUTO_STYLE_NOTXT );
const bool bSetModifyAtAttr = ((SwAttrSet*)mrpAttrSet.get())->SetModifyAtAttr( &rNode );
rNode.SetModifyAtAttr( bSetModifyAtAttr );
}
void SetParent( boost::shared_ptr<const SfxItemSet>& mrpAttrSet,
const SwCntntNode& rNode,
const SwFmt* pParentFmt,
const SwFmt* pConditionalFmt )
{
const SwAttrSet* pAttrSet = static_cast<const SwAttrSet*>(mrpAttrSet.get());
OSL_ENSURE( pAttrSet, "no SwAttrSet" );
OSL_ENSURE( pParentFmt || !pConditionalFmt, "ConditionalFmt without ParentFmt?" );
const SwAttrSet* pParentSet = pParentFmt ? &pParentFmt->GetAttrSet() : 0;
if ( pParentSet != pAttrSet->GetParent() )
{
SwAttrSet aNewSet( *pAttrSet );
aNewSet.SetParent( pParentSet );
aNewSet.ClearItem( RES_FRMATR_STYLE_NAME );
aNewSet.ClearItem( RES_FRMATR_CONDITIONAL_STYLE_NAME );
String sVal;
if ( pParentFmt )
{
SwStyleNameMapper::FillProgName( pParentFmt->GetName(), sVal, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL, sal_True );
const SfxStringItem aAnyFmtColl( RES_FRMATR_STYLE_NAME, sVal );
aNewSet.Put( aAnyFmtColl );
if ( pConditionalFmt != pParentFmt )
SwStyleNameMapper::FillProgName( pConditionalFmt->GetName(), sVal, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL, sal_True );
const SfxStringItem aFmtColl( RES_FRMATR_CONDITIONAL_STYLE_NAME, sVal );
aNewSet.Put( aFmtColl );
}
GetNewAutoStyle( mrpAttrSet, rNode, aNewSet );
}
}
const SfxPoolItem* Put( boost::shared_ptr<const SfxItemSet>& mrpAttrSet,
const SwCntntNode& rNode,
const SfxPoolItem& rAttr )
{
SwAttrSet aNewSet( (SwAttrSet&)*mrpAttrSet );
const SfxPoolItem* pRet = aNewSet.Put( rAttr );
if ( pRet )
GetNewAutoStyle( mrpAttrSet, rNode, aNewSet );
return pRet;
}
int Put( boost::shared_ptr<const SfxItemSet>& mrpAttrSet, const SwCntntNode& rNode,
const SfxItemSet& rSet )
{
SwAttrSet aNewSet( (SwAttrSet&)*mrpAttrSet );
// #i76273# Robust
SfxItemSet* pStyleNames = 0;
if ( SFX_ITEM_SET == rSet.GetItemState( RES_FRMATR_STYLE_NAME, sal_False ) )
{
pStyleNames = new SfxItemSet( *aNewSet.GetPool(), RES_FRMATR_STYLE_NAME, RES_FRMATR_CONDITIONAL_STYLE_NAME );
pStyleNames->Put( aNewSet );
}
const int nRet = aNewSet.Put( rSet );
// #i76273# Robust
if ( pStyleNames )
{
aNewSet.Put( *pStyleNames );
delete pStyleNames;
}
if ( nRet )
GetNewAutoStyle( mrpAttrSet, rNode, aNewSet );
return nRet;
}
int Put_BC( boost::shared_ptr<const SfxItemSet>& mrpAttrSet,
const SwCntntNode& rNode, const SfxPoolItem& rAttr,
SwAttrSet* pOld, SwAttrSet* pNew )
{
SwAttrSet aNewSet( (SwAttrSet&)*mrpAttrSet );
// for a correct broadcast, we need to do a SetModifyAtAttr with the items
// from aNewSet. The 'regular' SetModifyAtAttr is done in GetNewAutoStyle
if( rNode.GetModifyAtAttr() )
aNewSet.SetModifyAtAttr( &rNode );
const int nRet = aNewSet.Put_BC( rAttr, pOld, pNew );
if ( nRet )
GetNewAutoStyle( mrpAttrSet, rNode, aNewSet );
return nRet;
}
int Put_BC( boost::shared_ptr<const SfxItemSet>& mrpAttrSet,
const SwCntntNode& rNode, const SfxItemSet& rSet,
SwAttrSet* pOld, SwAttrSet* pNew )
{
SwAttrSet aNewSet( (SwAttrSet&)*mrpAttrSet );
// #i76273# Robust
SfxItemSet* pStyleNames = 0;
if ( SFX_ITEM_SET == rSet.GetItemState( RES_FRMATR_STYLE_NAME, sal_False ) )
{
pStyleNames = new SfxItemSet( *aNewSet.GetPool(), RES_FRMATR_STYLE_NAME, RES_FRMATR_CONDITIONAL_STYLE_NAME );
pStyleNames->Put( aNewSet );
}
// for a correct broadcast, we need to do a SetModifyAtAttr with the items
// from aNewSet. The 'regular' SetModifyAtAttr is done in GetNewAutoStyle
if( rNode.GetModifyAtAttr() )
aNewSet.SetModifyAtAttr( &rNode );
const int nRet = aNewSet.Put_BC( rSet, pOld, pNew );
// #i76273# Robust
if ( pStyleNames )
{
aNewSet.Put( *pStyleNames );
delete pStyleNames;
}
if ( nRet )
GetNewAutoStyle( mrpAttrSet, rNode, aNewSet );
return nRet;
}
sal_uInt16 ClearItem_BC( boost::shared_ptr<const SfxItemSet>& mrpAttrSet,
const SwCntntNode& rNode, sal_uInt16 nWhich,
SwAttrSet* pOld, SwAttrSet* pNew )
{
SwAttrSet aNewSet( (SwAttrSet&)*mrpAttrSet );
if( rNode.GetModifyAtAttr() )
aNewSet.SetModifyAtAttr( &rNode );
const sal_uInt16 nRet = aNewSet.ClearItem_BC( nWhich, pOld, pNew );
if ( nRet )
GetNewAutoStyle( mrpAttrSet, rNode, aNewSet );
return nRet;
}
sal_uInt16 ClearItem_BC( boost::shared_ptr<const SfxItemSet>& mrpAttrSet,
const SwCntntNode& rNode,
sal_uInt16 nWhich1, sal_uInt16 nWhich2,
SwAttrSet* pOld, SwAttrSet* pNew )
{
SwAttrSet aNewSet( (SwAttrSet&)*mrpAttrSet );
if( rNode.GetModifyAtAttr() )
aNewSet.SetModifyAtAttr( &rNode );
const sal_uInt16 nRet = aNewSet.ClearItem_BC( nWhich1, nWhich2, pOld, pNew );
if ( nRet )
GetNewAutoStyle( mrpAttrSet, rNode, aNewSet );
return nRet;
}
}
2000-09-18 23:08:29 +00:00
/*******************************************************************
|*
|* SwNode::GetSectionLevel
|*
|* Beschreibung
|* Die Funktion liefert den Sectionlevel an der durch
|* aIndex bezeichneten Position.
|*
|* Die Logik ist wie folgt: ( S -> Start, E -> End, C -> CntntNode)
|* Level 0 E
|* 1 S E
|* 2 SC
|*
|* alle EndNodes der GrundSection haben den Level 0
|* alle StartNodes der GrundSection haben den Level 1
|*
*******************************************************************/
sal_uInt16 SwNode::GetSectionLevel() const
2000-09-18 23:08:29 +00:00
{
// EndNode einer Grund-Section ?? diese sind immer 0 !!
if( IsEndNode() && 0 == pStartOfSection->StartOfSectionIndex() )
return 0;
sal_uInt16 nLevel;
2000-09-18 23:08:29 +00:00
const SwNode* pNode = IsStartNode() ? this : pStartOfSection;
for( nLevel = 1; 0 != pNode->StartOfSectionIndex(); ++nLevel )
pNode = pNode->pStartOfSection;
return IsEndNode() ? nLevel-1 : nLevel;
}
/*******************************************************************
|*
|* SwNode::SwNode
|*
|* Beschreibung
|* Konstruktor; dieser fuegt einen Node in das Array rNodes
|* an der Position rWhere ein. Dieser bekommt als
|* theEndOfSection den EndOfSection-Index des Nodes
|* unmittelbar vor ihm. Falls er sich an der Position 0
|* innerhalb des variablen Arrays befindet, wird
|* theEndOfSection 0 (der neue selbst).
|*
|* Parameter
|* IN
|* rNodes bezeichnet das variable Array, in das der Node
|* eingefuegt werden soll
|* IN
|* rWhere bezeichnet die Position innerhalb dieses Arrays,
|* an der der Node eingefuegt werden soll
|*
*******************************************************************/
#ifdef DBG_UTIL
long SwNode::s_nSerial = 0;
#endif
2000-09-18 23:08:29 +00:00
SwNode::SwNode( const SwNodeIndex &rWhere, const sal_uInt8 nNdType )
: nNodeType( nNdType ), pStartOfSection( 0 )
2000-09-18 23:08:29 +00:00
{
bSetNumLSpace = bIgnoreDontExpand = sal_False;
2000-11-06 09:46:12 +00:00
nAFmtNumLvl = 0;
2000-09-18 23:08:29 +00:00
SwNodes& rNodes = (SwNodes&)rWhere.GetNodes();
SwNode* pInsNd = this; // der MAC kann this nicht einfuegen !!
if( rWhere.GetIndex() )
{
SwNode* pNd = rNodes[ rWhere.GetIndex() -1 ];
rNodes.InsertNode( pInsNd, rWhere );
2000-09-18 23:08:29 +00:00
if( 0 == ( pStartOfSection = pNd->GetStartNode()) )
{
pStartOfSection = pNd->pStartOfSection;
if( pNd->GetEndNode() ) // EndNode ? Section ueberspringen!
{
pNd = pStartOfSection;
pStartOfSection = pNd->pStartOfSection;
}
}
}
else
{
rNodes.InsertNode( pInsNd, rWhere );
2000-09-18 23:08:29 +00:00
pStartOfSection = (SwStartNode*)this;
}
#ifdef DBG_UTIL
m_nSerial = s_nSerial;
s_nSerial++;
#endif
2000-09-18 23:08:29 +00:00
}
SwNode::SwNode( SwNodes& rNodes, sal_uLong nPos, const sal_uInt8 nNdType )
: nNodeType( nNdType ), pStartOfSection( 0 )
2000-09-18 23:08:29 +00:00
{
bSetNumLSpace = bIgnoreDontExpand = sal_False;
2000-11-06 09:46:12 +00:00
nAFmtNumLvl = 0;
2000-09-18 23:08:29 +00:00
SwNode* pInsNd = this; // der MAC kann this nicht einfuegen !!
if( nPos )
{
SwNode* pNd = rNodes[ nPos - 1 ];
rNodes.InsertNode( pInsNd, nPos );
2000-09-18 23:08:29 +00:00
if( 0 == ( pStartOfSection = pNd->GetStartNode()) )
{
pStartOfSection = pNd->pStartOfSection;
if( pNd->GetEndNode() ) // EndNode ? Section ueberspringen!
{
pNd = pStartOfSection;
pStartOfSection = pNd->pStartOfSection;
}
}
}
else
{
rNodes.InsertNode( pInsNd, nPos );
2000-09-18 23:08:29 +00:00
pStartOfSection = (SwStartNode*)this;
}
#ifdef DBG_UTIL
m_nSerial = s_nSerial;
s_nSerial++;
#endif
2000-09-18 23:08:29 +00:00
}
2000-11-06 09:46:12 +00:00
SwNode::~SwNode()
{
}
2000-09-18 23:08:29 +00:00
// suche den TabellenNode, in dem dieser steht. Wenn in keiner
// Tabelle wird 0 returnt.
SwTableNode* SwNode::FindTableNode()
{
if( IsTableNode() )
return GetTableNode();
SwStartNode* pTmp = pStartOfSection;
while( !pTmp->IsTableNode() && pTmp->GetIndex() )
pTmp = pTmp->pStartOfSection;
return pTmp->GetTableNode();
}
// liegt der Node im Sichtbarenbereich der Shell ?
sal_Bool SwNode::IsInVisibleArea( ViewShell* pSh ) const
2000-09-18 23:08:29 +00:00
{
sal_Bool bRet = sal_False;
2000-09-18 23:08:29 +00:00
const SwCntntNode* pNd;
if( ND_STARTNODE & nNodeType )
{
SwNodeIndex aIdx( *this );
pNd = GetNodes().GoNext( &aIdx );
}
else if( ND_ENDNODE & nNodeType )
{
SwNodeIndex aIdx( *EndOfSectionNode() );
pNd = GetNodes().GoPrevious( &aIdx );
}
else
pNd = GetCntntNode();
if( !pSh )
// dann die Shell vom Doc besorgen:
GetDoc()->GetEditShell( &pSh );
2000-09-18 23:08:29 +00:00
if( pSh )
{
const SwFrm* pFrm;
if( pNd && 0 != ( pFrm = pNd->getLayoutFrm( pSh->GetLayout(), 0, 0, sal_False ) ) )
2000-09-18 23:08:29 +00:00
{
2000-09-18 23:08:29 +00:00
if ( pFrm->IsInTab() )
pFrm = pFrm->FindTabFrm();
if( !pFrm->IsValid() )
do
{ pFrm = pFrm->FindPrev();
} while ( pFrm && !pFrm->IsValid() );
if( !pFrm || pSh->VisArea().IsOver( pFrm->Frm() ) )
bRet = sal_True;
2000-09-18 23:08:29 +00:00
}
}
return bRet;
}
sal_Bool SwNode::IsInProtectSect() const
2000-09-18 23:08:29 +00:00
{
const SwNode* pNd = ND_SECTIONNODE == nNodeType ? pStartOfSection : this;
const SwSectionNode* pSectNd = pNd->FindSectionNode();
return pSectNd && pSectNd->GetSection().IsProtectFlag();
}
// befindet sich der Node in irgendetwas geschuetzten ?
// (Bereich/Rahmen/Tabellenzellen/... incl. des Ankers bei
// Rahmen/Fussnoten/..)
sal_Bool SwNode::IsProtect() const
2000-09-18 23:08:29 +00:00
{
const SwNode* pNd = ND_SECTIONNODE == nNodeType ? pStartOfSection : this;
const SwStartNode* pSttNd = pNd->FindSectionNode();
if( pSttNd && ((SwSectionNode*)pSttNd)->GetSection().IsProtectFlag() )
return sal_True;
2000-09-18 23:08:29 +00:00
if( 0 != ( pSttNd = FindTableBoxStartNode() ) )
{
SwCntntFrm* pCFrm;
if( IsCntntNode() && 0 != (pCFrm = ((SwCntntNode*)this)->getLayoutFrm( GetDoc()->GetCurrentLayout() ) ))
2000-09-18 23:08:29 +00:00
return pCFrm->IsProtected();
const SwTableBox* pBox = pSttNd->FindTableNode()->GetTable().
GetTblBox( pSttNd->GetIndex() );
//Robust #149568
if( pBox && pBox->GetFrmFmt()->GetProtect().IsCntntProtected() )
return sal_True;
2000-09-18 23:08:29 +00:00
}
SwFrmFmt* pFlyFmt = GetFlyFmt();
if( pFlyFmt )
{
if( pFlyFmt->GetProtect().IsCntntProtected() )
return sal_True;
2000-09-18 23:08:29 +00:00
const SwFmtAnchor& rAnchor = pFlyFmt->GetAnchor();
return rAnchor.GetCntntAnchor()
? rAnchor.GetCntntAnchor()->nNode.GetNode().IsProtect()
: sal_False;
2000-09-18 23:08:29 +00:00
}
if( 0 != ( pSttNd = FindFootnoteStartNode() ) )
{
const SwTxtFtn* pTFtn = GetDoc()->GetFtnIdxs().SeekEntry(
SwNodeIndex( *pSttNd ) );
if( pTFtn )
return pTFtn->GetTxtNode().IsProtect();
}
return sal_False;
2000-09-18 23:08:29 +00:00
}
// suche den PageDesc, mit dem dieser Node formatiert ist. Wenn das
// Layout vorhanden ist wird ueber das gesucht, ansonsten gibt es nur
// die harte Tour ueber die Nodes nach vorne suchen!!
const SwPageDesc* SwNode::FindPageDesc( sal_Bool bCalcLay,
sal_uInt32* pPgDescNdIdx ) const
2000-09-18 23:08:29 +00:00
{
if ( !GetNodes().IsDocNodes() )
{
return 0;
}
2000-09-18 23:08:29 +00:00
const SwPageDesc* pPgDesc = 0;
const SwCntntNode* pNode;
if( ND_STARTNODE & nNodeType )
2000-09-18 23:08:29 +00:00
{
SwNodeIndex aIdx( *this );
pNode = GetNodes().GoNext( &aIdx );
}
else if( ND_ENDNODE & nNodeType )
{
SwNodeIndex aIdx( *EndOfSectionNode() );
pNode = GetNodes().GoPrevious( &aIdx );
}
else
{
pNode = GetCntntNode();
if( pNode )
pPgDesc = ((SwFmtPageDesc&)pNode->GetAttr( RES_PAGEDESC )).GetPageDesc();
}
2000-09-18 23:08:29 +00:00
// geht es uebers Layout?
if( !pPgDesc )
{
const SwFrm* pFrm;
const SwPageFrm* pPage;
if( pNode && 0 != ( pFrm = pNode->getLayoutFrm( pNode->GetDoc()->GetCurrentLayout(), 0, 0, bCalcLay ) ) &&
0 != ( pPage = pFrm->FindPageFrm() ) )
2000-09-18 23:08:29 +00:00
{
pPgDesc = pPage->GetPageDesc();
if ( pPgDescNdIdx )
2000-09-18 23:08:29 +00:00
{
*pPgDescNdIdx = pNode->GetIndex();
2000-09-18 23:08:29 +00:00
}
}
}
2000-09-18 23:08:29 +00:00
if( !pPgDesc )
{
// dann also uebers Nodes-Array
const SwDoc* pDoc = GetDoc();
const SwNode* pNd = this;
const SwStartNode* pSttNd;
if( pNd->GetIndex() < GetNodes().GetEndOfExtras().GetIndex() &&
0 != ( pSttNd = pNd->FindFlyStartNode() ) )
2000-09-18 23:08:29 +00:00
{
// dann erstmal den richtigen Anker finden
const SwFrmFmt* pFmt = 0;
const SwFrmFmts& rFmts = *pDoc->GetSpzFrmFmts();
sal_uInt16 n;
for( n = 0; n < rFmts.size(); ++n )
2000-09-18 23:08:29 +00:00
{
SwFrmFmt* pFrmFmt = rFmts[ n ];
const SwFmtCntnt& rCntnt = pFrmFmt->GetCntnt();
if( rCntnt.GetCntntIdx() &&
&rCntnt.GetCntntIdx()->GetNode() == (SwNode*)pSttNd )
2000-09-18 23:08:29 +00:00
{
pFmt = pFrmFmt;
break;
2000-09-18 23:08:29 +00:00
}
}
2000-09-18 23:08:29 +00:00
if( pFmt )
{
const SwFmtAnchor* pAnchor = &pFmt->GetAnchor();
if ((FLY_AT_PAGE != pAnchor->GetAnchorId()) &&
pAnchor->GetCntntAnchor() )
2000-09-18 23:08:29 +00:00
{
pNd = &pAnchor->GetCntntAnchor()->nNode.GetNode();
const SwNode* pFlyNd = pNd->FindFlyStartNode();
while( pFlyNd )
2000-09-18 23:08:29 +00:00
{
// dann ueber den Anker nach oben "hangeln"
for( n = 0; n < rFmts.size(); ++n )
2000-09-18 23:08:29 +00:00
{
const SwFrmFmt* pFrmFmt = rFmts[ n ];
const SwNodeIndex* pIdx = pFrmFmt->GetCntnt().
GetCntntIdx();
if( pIdx && pFlyNd == &pIdx->GetNode() )
2000-09-18 23:08:29 +00:00
{
if( pFmt == pFrmFmt )
2000-09-18 23:08:29 +00:00
{
pNd = pFlyNd;
pFlyNd = 0;
2000-09-18 23:08:29 +00:00
break;
}
pAnchor = &pFrmFmt->GetAnchor();
if ((FLY_AT_PAGE == pAnchor->GetAnchorId()) ||
!pAnchor->GetCntntAnchor() )
{
pFlyNd = 0;
break;
}
pFlyNd = pAnchor->GetCntntAnchor()->nNode.
GetNode().FindFlyStartNode();
break;
2000-09-18 23:08:29 +00:00
}
}
if( n >= rFmts.size() )
{
OSL_ENSURE( !this, "Fly-Section aber kein Format gefunden" );
return sal_False;
2000-09-18 23:08:29 +00:00
}
}
}
}
// in pNd sollte jetzt der richtige Anker Node stehen oder
// immer noch der this
}
2000-09-18 23:08:29 +00:00
if( pNd->GetIndex() < GetNodes().GetEndOfExtras().GetIndex() )
{
if( pNd->GetIndex() > GetNodes().GetEndOfAutotext().GetIndex() )
2000-09-18 23:08:29 +00:00
{
pPgDesc = &pDoc->GetPageDesc( 0 );
pNd = 0;
}
else
{
// suche den Body Textnode
if( 0 != ( pSttNd = pNd->FindHeaderStartNode() ) ||
0 != ( pSttNd = pNd->FindFooterStartNode() ))
2000-09-18 23:08:29 +00:00
{
// dann in den PageDescs diesen StartNode suchen
sal_uInt16 nId;
UseOnPage eAskUse;
if( SwHeaderStartNode == pSttNd->GetStartNodeType())
2000-09-18 23:08:29 +00:00
{
nId = RES_HEADER;
eAskUse = nsUseOnPage::PD_HEADERSHARE;
}
else
{
nId = RES_FOOTER;
eAskUse = nsUseOnPage::PD_FOOTERSHARE;
}
2000-09-18 23:08:29 +00:00
for( sal_uInt16 n = pDoc->GetPageDescCnt(); n && !pPgDesc; )
{
const SwPageDesc& rPgDsc = pDoc->GetPageDesc( --n );
const SwFrmFmt* pFmt = &rPgDsc.GetMaster();
int nStt = 0, nLast = 1;
if( !( eAskUse & rPgDsc.ReadUseOn() )) ++nLast;
2000-09-18 23:08:29 +00:00
for( ; nStt < nLast; ++nStt, pFmt = &rPgDsc.GetLeft() )
{
const SwFmtHeader& rHdFt = (SwFmtHeader&)
pFmt->GetFmtAttr( nId );
if( rHdFt.GetHeaderFmt() )
2000-09-18 23:08:29 +00:00
{
const SwFmtCntnt& rCntnt =
rHdFt.GetHeaderFmt()->GetCntnt();
if( rCntnt.GetCntntIdx() &&
&rCntnt.GetCntntIdx()->GetNode() ==
(SwNode*)pSttNd )
2000-09-18 23:08:29 +00:00
{
pPgDesc = &rPgDsc;
break;
2000-09-18 23:08:29 +00:00
}
}
}
}
if( !pPgDesc )
2000-09-18 23:08:29 +00:00
pPgDesc = &pDoc->GetPageDesc( 0 );
pNd = 0;
}
else if( 0 != ( pSttNd = pNd->FindFootnoteStartNode() ))
{
// der Anker kann nur im Bodytext sein
const SwTxtFtn* pTxtFtn;
const SwFtnIdxs& rFtnArr = pDoc->GetFtnIdxs();
for( sal_uInt16 n = 0; n < rFtnArr.size(); ++n )
if( 0 != ( pTxtFtn = rFtnArr[ n ])->GetStartNode() &&
(SwNode*)pSttNd ==
&pTxtFtn->GetStartNode()->GetNode() )
{
pNd = &pTxtFtn->GetTxtNode();
break;
}
}
else
{
// kann jetzt nur noch ein Seitengebundener Fly sein
// oder irgendetwas neueres.
// Hier koennen wir nur noch den Standard returnen
OSL_ENSURE( pNd->FindFlyStartNode(),
"wo befindet sich dieser Node?" );
pPgDesc = &pDoc->GetPageDesc( 0 );
pNd = 0;
2000-09-18 23:08:29 +00:00
}
}
}
2000-09-18 23:08:29 +00:00
if( pNd )
{
SwFindNearestNode aInfo( *pNd );
// dann ueber alle Nodes aller PageDesc
const SfxPoolItem* pItem;
sal_uInt32 i, nMaxItems = pDoc->GetAttrPool().GetItemCount2( RES_PAGEDESC );
for( i = 0; i < nMaxItems; ++i )
if( 0 != (pItem = pDoc->GetAttrPool().GetItem2( RES_PAGEDESC, i ) ) &&
((SwFmtPageDesc*)pItem)->GetDefinedIn() )
{
const SwModify* pMod = ((SwFmtPageDesc*)pItem)->GetDefinedIn();
if( pMod->ISA( SwCntntNode ) )
aInfo.CheckNode( *(SwCntntNode*)pMod );
else if( pMod->ISA( SwFmt ))
((SwFmt*)pMod)->GetInfo( aInfo );
}
2000-09-18 23:08:29 +00:00
if( 0 != ( pNd = aInfo.GetFoundNode() ))
{
if( pNd->IsCntntNode() )
pPgDesc = ((SwFmtPageDesc&)pNd->GetCntntNode()->
GetAttr( RES_PAGEDESC )).GetPageDesc();
else if( pNd->IsTableNode() )
pPgDesc = pNd->GetTableNode()->GetTable().
GetFrmFmt()->GetPageDesc().GetPageDesc();
else if( pNd->IsSectionNode() )
pPgDesc = pNd->GetSectionNode()->GetSection().
GetFmt()->GetPageDesc().GetPageDesc();
if ( pPgDescNdIdx )
2000-09-18 23:08:29 +00:00
{
*pPgDescNdIdx = pNd->GetIndex();
2000-09-18 23:08:29 +00:00
}
}
if( !pPgDesc )
pPgDesc = &pDoc->GetPageDesc( 0 );
2000-09-18 23:08:29 +00:00
}
}
return pPgDesc;
}
// falls der Node in einem Fly steht, dann wird das entsprechende Format
// returnt
SwFrmFmt* SwNode::GetFlyFmt() const
{
SwFrmFmt* pRet = 0;
const SwNode* pSttNd = FindFlyStartNode();
if( pSttNd )
{
if( IsCntntNode() )
{
SwCntntFrm* pFrm = SwIterator<SwCntntFrm,SwCntntNode>::FirstElement( *(SwCntntNode*)this );
if( pFrm )
pRet = pFrm->FindFlyFrm()->GetFmt();
2000-09-18 23:08:29 +00:00
}
if( !pRet )
{
// dann gibts noch harten steinigen Weg uebers Dokument:
const SwFrmFmts& rFrmFmtTbl = *GetDoc()->GetSpzFrmFmts();
for( sal_uInt16 n = 0; n < rFrmFmtTbl.size(); ++n )
2000-09-18 23:08:29 +00:00
{
SwFrmFmt* pFmt = rFrmFmtTbl[n];
const SwFmtCntnt& rCntnt = pFmt->GetCntnt();
if( rCntnt.GetCntntIdx() &&
&rCntnt.GetCntntIdx()->GetNode() == pSttNd )
{
pRet = pFmt;
break;
}
}
}
}
return pRet;
}
SwTableBox* SwNode::GetTblBox() const
{
SwTableBox* pBox = 0;
const SwNode* pSttNd = FindTableBoxStartNode();
if( pSttNd )
pBox = (SwTableBox*)pSttNd->FindTableNode()->GetTable().GetTblBox(
pSttNd->GetIndex() );
return pBox;
}
SwStartNode* SwNode::FindSttNodeByType( SwStartNodeType eTyp )
{
SwStartNode* pTmp = IsStartNode() ? (SwStartNode*)this : pStartOfSection;
while( eTyp != pTmp->GetStartNodeType() && pTmp->GetIndex() )
pTmp = pTmp->pStartOfSection;
return eTyp == pTmp->GetStartNodeType() ? pTmp : 0;
}
const SwTxtNode* SwNode::FindOutlineNodeOfLevel( sal_uInt8 nLvl ) const
2000-09-18 23:08:29 +00:00
{
const SwTxtNode* pRet = 0;
const SwOutlineNodes& rONds = GetNodes().GetOutLineNds();
if( MAXLEVEL > nLvl && !rONds.empty() )
2000-09-18 23:08:29 +00:00
{
sal_uInt16 nPos;
2000-09-18 23:08:29 +00:00
SwNode* pNd = (SwNode*)this;
sal_Bool bCheckFirst = sal_False;
2000-09-18 23:08:29 +00:00
if( !rONds.Seek_Entry( pNd, &nPos ))
{
if( nPos )
nPos = nPos-1;
else
bCheckFirst = sal_True;
2000-09-18 23:08:29 +00:00
}
if( bCheckFirst )
{
// der 1.GliederungsNode liegt hinter dem Fragenden. Dann
// teste mal, ob dieser auf der gleichen Seite steht. Wenn
// nicht, ist das ein ungueltiger. Bug 61865
pRet = rONds[0]->GetTxtNode();
const SwCntntNode* pCNd = GetCntntNode();
Point aPt( 0, 0 );
const SwFrm* pFrm = pRet->getLayoutFrm( pRet->GetDoc()->GetCurrentLayout(), &aPt, 0, sal_False ),
* pMyFrm = pCNd ? pCNd->getLayoutFrm( pCNd->GetDoc()->GetCurrentLayout(), &aPt, 0, sal_False ) : 0;
2000-09-18 23:08:29 +00:00
const SwPageFrm* pPgFrm = pFrm ? pFrm->FindPageFrm() : 0;
if( pPgFrm && pMyFrm &&
pPgFrm->Frm().Top() > pMyFrm->Frm().Top() )
{
// der Fragende liegt vor der Seite, also ist er ungueltig
pRet = 0;
}
}
else
{
// oder ans Feld und von dort holen !!
CWS-TOOLING: integrate CWS outlinelevel 2008-12-19 10:32:51 +0100 od r265718 : #i70748# method <SwWW8Writer::StartTOX(..)> - correction for custom to outline style assigned paragraph styles 2008-12-19 09:24:41 +0100 od r265715 : #i70748# method <HandleModifyAtTxtNode(..)> - retrieve former applied list style before potential reset of empty list style due to set outline level 2008-12-17 15:33:57 +0100 hde r265608 : #i97013# 2008-12-17 14:43:42 +0100 od r265603 : #i70748# adjust fix i44177 - adjustment of to outline style assigned paragraph styles only for OOo-Templates. 2008-12-17 12:59:42 +0100 od r265598 : #i70748# method <XMLTextImportHelper::SetStyleAndAttrs(..)> - special handling of OOo 2.x document regarding outline numbering of headings. 2008-12-17 12:45:53 +0100 od r265597 : #i70748# method <HandleModifyAtTxtNode(..)> - correct determination of new and former applied list style 2008-12-17 10:18:41 +0100 od r265581 : #i97312# method <XMLTextNumRuleInfo::Set(..)> - check, if numbering rules instance contains any numbering rule. 2008-12-16 14:34:22 +0100 hde r265542 : #i97013 2008-12-16 14:20:24 +0100 od r265541 : #i70748# adjust documentation of "Which"-ID numbers 2008-12-16 14:19:49 +0100 od r265539 : #i70748# Adjust Attribute-Function-Mapping table due to new attribute 2008-12-16 14:06:24 +0100 od r265538 : #i70748# - Correct handling of to outline style assigned paragraph styles on reset of all paragraph style attributes - WW8 import: Consider refactoring of paragraph style's outline level attribute - NO_NUMBERING define no longer exsits. 2008-12-16 10:37:19 +0100 od r265530 : #i70478# Correction on moving outline paragraph up respectively down in its outline level: - Check also outline paragraph, which are not an outline via a to outline style assigned paragraph style, if action is applicable. 2008-12-16 09:10:13 +0100 hde r265523 : #i97277 2008-12-16 09:09:30 +0100 hde r265522 : #i97277 2008-12-16 09:07:40 +0100 hde r265521 : Added control and purged obsolete id's 2008-12-10 13:09:36 +0100 od r265174 : #i70748# correction of previous fix due to warning-free code 2008-12-10 13:03:30 +0100 od r265172 : #i70748# method <XMLTextImportHelper::SetStyleAndAttrs(..)> - Due to performance issues avoid retrieving outline level value from paragraph's paragraph style for each paragraph. Instead retrieve current outline level value from paragraph, which is the inherited value from its paragraph style, and only when it is needed. 2008-12-09 16:50:36 +0100 ufi r265117 : help 2008-12-09 16:49:50 +0100 ufi r265116 : help 2008-12-09 15:45:05 +0100 od r265107 : #i70748# method <XMLTextImportHelper::SetStyleAndAttrs(..)> - some minor rework and check access to paragraph styles 2008-12-09 15:42:04 +0100 od r265106 : #i70748# adjust name of local variable to avoid hiding of class variable 2008-12-09 15:40:51 +0100 od r265105 : #i70748# correct initialization order 2008-12-09 15:35:07 +0100 od r265101 : #i70748# remove duplicate entry in certain property map 2008-12-09 15:33:39 +0100 od r265100 : #i70748# add end of file token 2008-12-07 15:11:54 +0100 zhaojianwei r264952 : conflicts left not to be resolved when cws rebase 2008-12-04 14:52:21 +0100 zhaojianwei r264846 : CWS-TOOLING: rebase CWS outlinelevel to trunk@264325 (milestone: DEV300:m36) 2008-11-28 03:42:09 +0100 zhaojianwei r264525 : #i70748#: migrate CWS outlinelevel to SVN 2008-11-28 03:41:39 +0100 zhaojianwei r264524 : #i70748#: migrate CWS outlinelevel to SVN 2008-11-28 03:41:11 +0100 zhaojianwei r264523 : #i70748#: migrate CWS outlinelevel to SVN
2009-01-07 11:57:24 +00:00
while( nPos &&
nLvl < ( pRet = rONds[nPos]->GetTxtNode() )
->GetAttrOutlineLevel() - 1 ) //<-end,zhaojianwei
2000-09-18 23:08:29 +00:00
--nPos;
if( !nPos ) // bei 0 gesondert holen !!
pRet = rONds[0]->GetTxtNode();
}
}
return pRet;
}
inline sal_Bool IsValidNextPrevNd( const SwNode& rNd )
2000-09-18 23:08:29 +00:00
{
return ND_TABLENODE == rNd.GetNodeType() ||
( ND_CONTENTNODE & rNd.GetNodeType() ) ||
( ND_ENDNODE == rNd.GetNodeType() && rNd.StartOfSectionNode() &&
ND_TABLENODE == rNd.StartOfSectionNode()->GetNodeType() );
}
sal_uInt8 SwNode::HasPrevNextLayNode() const
2000-09-18 23:08:29 +00:00
{
// assumption: <this> node is a node inside the document nodes array section.
sal_uInt8 nRet = 0;
2000-09-18 23:08:29 +00:00
if( IsValidNextPrevNd( *this ))
{
SwNodeIndex aIdx( *this, -1 );
2011-02-02 20:41:40 +09:00
// #i77805# - skip section start and end nodes
while ( aIdx.GetNode().IsSectionNode() ||
( aIdx.GetNode().IsEndNode() &&
aIdx.GetNode().StartOfSectionNode()->IsSectionNode() ) )
{
--aIdx;
}
2000-09-18 23:08:29 +00:00
if( IsValidNextPrevNd( aIdx.GetNode() ))
nRet |= ND_HAS_PREV_LAYNODE;
2010-11-19 12:33:24 +01:00
// #i77805# - skip section start and end nodes
aIdx = SwNodeIndex( *this, +1 );
while ( aIdx.GetNode().IsSectionNode() ||
( aIdx.GetNode().IsEndNode() &&
aIdx.GetNode().StartOfSectionNode()->IsSectionNode() ) )
{
++aIdx;
}
2000-09-18 23:08:29 +00:00
if( IsValidNextPrevNd( aIdx.GetNode() ))
nRet |= ND_HAS_NEXT_LAYNODE;
}
return nRet;
}
/*******************************************************************
|*
|* SwNode::StartOfSection
|*
|* Beschreibung
|* Die Funktion liefert die StartOfSection des Nodes.
|*
|* Parameter
|* IN
|* rNodes bezeichnet das variable Array, in dem sich der Node
|* befindet
|*
*******************************************************************/
SwStartNode::SwStartNode( const SwNodeIndex &rWhere, const sal_uInt8 nNdType,
2000-09-18 23:08:29 +00:00
SwStartNodeType eSttNd )
: SwNode( rWhere, nNdType ), eSttNdTyp( eSttNd )
{
// erstmal temporaer, bis der EndNode eingefuegt wird.
pEndOfSection = (SwEndNode*)this;
}
SwStartNode::SwStartNode( SwNodes& rNodes, sal_uLong nPos )
2000-09-18 23:08:29 +00:00
: SwNode( rNodes, nPos, ND_STARTNODE ), eSttNdTyp( SwNormalStartNode )
{
// erstmal temporaer, bis der EndNode eingefuegt wird.
pEndOfSection = (SwEndNode*)this;
}
void SwStartNode::CheckSectionCondColl() const
{
//FEATURE::CONDCOLL
SwNodeIndex aIdx( *this );
sal_uLong nEndIdx = EndOfSectionIndex();
2000-09-18 23:08:29 +00:00
const SwNodes& rNds = GetNodes();
SwCntntNode* pCNd;
while( 0 != ( pCNd = rNds.GoNext( &aIdx )) && pCNd->GetIndex() < nEndIdx )
pCNd->ChkCondColl();
//FEATURE::CONDCOLL
}
/*******************************************************************
|*
|* SwEndNode::SwEndNode
|*
|* Beschreibung
|* Konstruktor; dieser fuegt einen Node in das Array rNodes
|* an der Position aWhere ein. Der
|* theStartOfSection-Pointer wird entsprechend gesetzt,
|* und der EndOfSection-Pointer des zugehoerigen
|* Startnodes -- durch rStartOfSection bezeichnet --
|* wird auf diesen Node gesetzt.
|*
|* Parameter
|* IN
|* rNodes bezeichnet das variable Array, in das der Node
|* eingefuegt werden soll
|* IN
|* aWhere bezeichnet die Position innerhalb dieses Arrays,
|* an der der Node eingefuegt werden soll
|* !!!!!!!!!!!!
|* Es wird eine Kopie uebergeben!
|*
*******************************************************************/
SwEndNode::SwEndNode( const SwNodeIndex &rWhere, SwStartNode& rSttNd )
: SwNode( rWhere, ND_ENDNODE )
{
pStartOfSection = &rSttNd;
pStartOfSection->pEndOfSection = this;
}
SwEndNode::SwEndNode( SwNodes& rNds, sal_uLong nPos, SwStartNode& rSttNd )
2000-09-18 23:08:29 +00:00
: SwNode( rNds, nPos, ND_ENDNODE )
{
pStartOfSection = &rSttNd;
pStartOfSection->pEndOfSection = this;
}
// --------------------
// SwCntntNode
// --------------------
SwCntntNode::SwCntntNode( const SwNodeIndex &rWhere, const sal_uInt8 nNdType,
2000-09-18 23:08:29 +00:00
SwFmtColl *pColl )
: SwModify( pColl ), // CrsrsShell, FrameFmt,
SwNode( rWhere, nNdType ),
2000-09-18 23:08:29 +00:00
pCondColl( 0 ),
mbSetModifyAtAttr( false )
2000-09-18 23:08:29 +00:00
{
}
SwCntntNode::~SwCntntNode()
{
// Die Basisklasse SwClient vom SwFrm nimmt sich aus
// der Abhaengikeitsliste raus!
// Daher muessen alle Frames in der Abhaengigkeitsliste geloescht werden.
if( GetDepends() )
DelFrms();
2011-11-17 22:13:42 +04:00
delete pCondColl;
2000-09-18 23:08:29 +00:00
if ( mpAttrSet.get() && mbSetModifyAtAttr )
((SwAttrSet*)mpAttrSet.get())->SetModifyAtAttr( 0 );
}
2000-09-18 23:08:29 +00:00
void SwCntntNode::Modify( const SfxPoolItem* pOldValue, const SfxPoolItem* pNewValue )
2000-09-18 23:08:29 +00:00
{
sal_uInt16 nWhich = pOldValue ? pOldValue->Which() :
2000-09-18 23:08:29 +00:00
pNewValue ? pNewValue->Which() : 0 ;
switch( nWhich )
{
case RES_OBJECTDYING :
{
SwFmt * pFmt = (SwFmt *) ((SwPtrMsgPoolItem *)pNewValue)->pObject;
// nicht umhaengen wenn dieses das oberste Format ist !!
if( GetRegisteredIn() == pFmt )
2000-09-18 23:08:29 +00:00
{
if( pFmt->GetRegisteredIn() )
{
// wenn Parent, dann im neuen Parent wieder anmelden
((SwModify*)pFmt->GetRegisteredIn())->Add( this );
if ( GetpSwAttrSet() )
AttrSetHandleHelper::SetParent( mpAttrSet, *this, GetFmtColl(), GetFmtColl() );
2000-09-18 23:08:29 +00:00
}
else
{
// sonst auf jeden Fall beim sterbenden abmelden
((SwModify*)GetRegisteredIn())->Remove( this );
if ( GetpSwAttrSet() )
AttrSetHandleHelper::SetParent( mpAttrSet, *this, 0, 0 );
2000-09-18 23:08:29 +00:00
}
}
}
break;
case RES_FMT_CHG:
// falls mein Format Parent umgesetzt wird, dann melde ich
// meinen Attrset beim Neuen an.
// sein eigenes Modify ueberspringen !!
if( GetpSwAttrSet() &&
2000-09-18 23:08:29 +00:00
((SwFmtChg*)pNewValue)->pChangedFmt == GetRegisteredIn() )
{
// den Set an den neuen Parent haengen
AttrSetHandleHelper::SetParent( mpAttrSet, *this, GetFmtColl(), GetFmtColl() );
2000-09-18 23:08:29 +00:00
}
break;
//FEATURE::CONDCOLL
case RES_CONDCOLL_CONDCHG:
if( ((SwCondCollCondChg*)pNewValue)->pChangedFmt == GetRegisteredIn() &&
&GetNodes() == &GetDoc()->GetNodes() )
{
ChkCondColl();
}
return ; // nicht an die Basisklasse / Frames weitergeben
//FEATURE::CONDCOLL
case RES_ATTRSET_CHG:
if( GetNodes().IsDocNodes() && IsTxtNode() )
{
if( SFX_ITEM_SET == ((SwAttrSetChg*)pOldValue)->GetChgSet()->GetItemState(
RES_CHRATR_HIDDEN, sal_False ) )
{
((SwTxtNode*)this)->SetCalcHiddenCharFlags();
}
2000-09-18 23:08:29 +00:00
}
break;
case RES_UPDATE_ATTR:
if( GetNodes().IsDocNodes() && IsTxtNode() )
{
const sal_uInt16 nTmp = ((SwUpdateAttr*)pNewValue)->nWhichAttr;
if ( RES_ATTRSET_CHG == nTmp )
{
// anybody wants to do some optimization here?
((SwTxtNode*)this)->SetCalcHiddenCharFlags();
}
}
break;
2000-09-18 23:08:29 +00:00
}
NotifyClients( pOldValue, pNewValue );
2000-09-18 23:08:29 +00:00
}
sal_Bool SwCntntNode::InvalidateNumRule()
2000-09-18 23:08:29 +00:00
{
SwNumRule* pRule = 0;
const SfxPoolItem* pItem;
if( GetNodes().IsDocNodes() &&
0 != ( pItem = GetNoCondAttr( RES_PARATR_NUMRULE, sal_True )) &&
2000-09-18 23:08:29 +00:00
((SwNumRuleItem*)pItem)->GetValue().Len() &&
0 != (pRule = GetDoc()->FindNumRulePtr(
((SwNumRuleItem*)pItem)->GetValue() ) ) )
{
pRule->SetInvalidRule( sal_True );
2000-09-18 23:08:29 +00:00
}
return 0 != pRule;
}
SwCntntFrm *SwCntntNode::getLayoutFrm( const SwRootFrm* _pRoot,
const Point* pPoint, const SwPosition *pPos, const sal_Bool bCalcFrm ) const
2000-09-18 23:08:29 +00:00
{
return (SwCntntFrm*) ::GetFrmOfModify( _pRoot, *(SwModify*)this, FRM_CNTNT,
2000-09-18 23:08:29 +00:00
pPoint, pPos, bCalcFrm );
}
SwRect SwCntntNode::FindLayoutRect( const sal_Bool bPrtArea, const Point* pPoint,
const sal_Bool bCalcFrm ) const
2000-09-18 23:08:29 +00:00
{
SwRect aRet;
SwCntntFrm* pFrm = (SwCntntFrm*)::GetFrmOfModify( 0, *(SwModify*)this,
2000-09-18 23:08:29 +00:00
FRM_CNTNT, pPoint, 0, bCalcFrm );
if( pFrm )
aRet = bPrtArea ? pFrm->Prt() : pFrm->Frm();
return aRet;
}
SwRect SwCntntNode::FindPageFrmRect( const sal_Bool bPrtArea, const Point* pPoint,
const sal_Bool bCalcFrm ) const
2000-09-18 23:08:29 +00:00
{
SwRect aRet;
SwFrm* pFrm = ::GetFrmOfModify( 0, *(SwModify*)this,
2000-09-18 23:08:29 +00:00
FRM_CNTNT, pPoint, 0, bCalcFrm );
if( pFrm && 0 != ( pFrm = pFrm->FindPageFrm() ))
aRet = bPrtArea ? pFrm->Prt() : pFrm->Frm();
return aRet;
}
xub_StrLen SwCntntNode::Len() const { return 0; }
SwFmtColl *SwCntntNode::ChgFmtColl( SwFmtColl *pNewColl )
{
OSL_ENSURE( pNewColl, "Collectionpointer ist 0." );
2000-09-18 23:08:29 +00:00
SwFmtColl *pOldColl = GetFmtColl();
2000-09-18 23:08:29 +00:00
if( pNewColl != pOldColl )
{
pNewColl->Add( this );
// setze den Parent von unseren Auto-Attributen auf die neue
// Collection:
if( GetpSwAttrSet() )
AttrSetHandleHelper::SetParent( mpAttrSet, *this, pNewColl, pNewColl );
2000-09-18 23:08:29 +00:00
//FEATURE::CONDCOLL
// HACK: hier muss die entsprechend der neuen Vorlage die Bedingungen
// neu ueberprueft werden!
if( sal_True /*pNewColl */ )
2000-09-18 23:08:29 +00:00
{
SetCondFmtColl( 0 );
}
//FEATURE::CONDCOLL
if( !IsModifyLocked() )
{
SwFmtChg aTmp1( pOldColl );
SwFmtChg aTmp2( pNewColl );
SwCntntNode::Modify( &aTmp1, &aTmp2 );
}
}
if ( IsInCache() )
{
SwFrm::GetCache().Delete( this );
SetInCache( sal_False );
2000-09-18 23:08:29 +00:00
}
return pOldColl;
}
sal_Bool SwCntntNode::GoNext(SwIndex * pIdx, sal_uInt16 nMode ) const
2000-09-18 23:08:29 +00:00
{
sal_Bool bRet = sal_True;
2000-09-18 23:08:29 +00:00
if( pIdx->GetIndex() < Len() )
{
if( !IsTxtNode() )
(*pIdx)++;
else
2000-09-18 23:08:29 +00:00
{
const SwTxtNode& rTNd = *GetTxtNode();
xub_StrLen nPos = pIdx->GetIndex();
CWS-TOOLING: integrate CWS oj18 2009-08-21 15:08:49 +0200 oj r275263 : wrong check 2009-08-21 08:56:01 +0200 oj r275215 : missing not 2009-08-20 07:27:13 +0200 oj r275164 : use new method from global 2009-08-19 10:22:35 +0200 oj r275138 : call GetLocale instead of pLocale 2009-08-18 10:39:32 +0200 oj r275082 : missing header include 2009-08-18 10:09:44 +0200 oj r275081 : new methods at global 2009-08-18 10:09:00 +0200 oj r275080 : unused var 2009-08-18 08:59:04 +0200 oj r275078 : move files from classes to xml 2009-08-17 14:58:16 +0200 oj r275056 : CWS-TOOLING: rebase CWS oj18 to trunk@275001 (milestone: DEV300:m55) 2009-08-17 13:29:44 +0200 oj r275047 : compile error 2009-08-17 13:27:47 +0200 oj r275045 : compile error 2009-08-17 11:44:54 +0200 oj r275040 : add dep 2009-07-22 14:26:05 +0200 oj r274240 : move unused services into fwl 2009-07-22 14:25:35 +0200 oj r274239 : move unused services into fwl 2009-07-22 13:47:45 +0200 oj r274233 : remove some unused code 2009-07-22 09:06:20 +0200 oj r274219 : export dbtoolsclient dbcharsethelper for sc 2009-07-22 08:48:58 +0200 oj r274218 : create NumberFormatter on demand 2009-07-22 08:39:23 +0200 oj r274217 : change char to sal_Char 2009-07-22 07:33:34 +0200 oj r274214 : export dbtoolsclient dbcharsethelper for sc 2009-07-22 07:30:04 +0200 oj r274213 : late init of numberformatter and breakiterator 2009-07-22 07:28:55 +0200 oj r274212 : export dbtoolsclient dbcharsethelper for sc 2009-07-21 13:43:28 +0200 oj r274196 : check if quick start is enbaled 2009-07-21 13:40:09 +0200 oj r274195 : check config entry for UiEventsLogger 2009-07-21 13:37:40 +0200 oj r274194 : code refactoring, remove of duplicate code and some late inits and removale of not needed files 2009-07-21 13:35:38 +0200 oj r274193 : code refactoring, remove of duplicate code and some late inits and removale of not needed files 2009-07-21 13:33:41 +0200 oj r274192 : doc meta data will now be created on demand 2009-07-21 13:13:40 +0200 oj r274187 : load ldap functions on demand 2009-07-21 13:03:17 +0200 oj r274183 : late init of TransliterationImpl 2009-07-21 12:36:10 +0200 oj r274180 : late init of charClass
2009-09-08 04:57:32 +00:00
if( pBreakIt->GetBreakIter().is() )
2000-09-18 23:08:29 +00:00
{
sal_Int32 nDone = 0;
sal_uInt16 nItrMode = ( CRSR_SKIP_CELLS & nMode ) ?
CharacterIteratorMode::SKIPCELL :
CharacterIteratorMode::SKIPCONTROLCHARACTER;
CWS-TOOLING: integrate CWS oj18 2009-08-21 15:08:49 +0200 oj r275263 : wrong check 2009-08-21 08:56:01 +0200 oj r275215 : missing not 2009-08-20 07:27:13 +0200 oj r275164 : use new method from global 2009-08-19 10:22:35 +0200 oj r275138 : call GetLocale instead of pLocale 2009-08-18 10:39:32 +0200 oj r275082 : missing header include 2009-08-18 10:09:44 +0200 oj r275081 : new methods at global 2009-08-18 10:09:00 +0200 oj r275080 : unused var 2009-08-18 08:59:04 +0200 oj r275078 : move files from classes to xml 2009-08-17 14:58:16 +0200 oj r275056 : CWS-TOOLING: rebase CWS oj18 to trunk@275001 (milestone: DEV300:m55) 2009-08-17 13:29:44 +0200 oj r275047 : compile error 2009-08-17 13:27:47 +0200 oj r275045 : compile error 2009-08-17 11:44:54 +0200 oj r275040 : add dep 2009-07-22 14:26:05 +0200 oj r274240 : move unused services into fwl 2009-07-22 14:25:35 +0200 oj r274239 : move unused services into fwl 2009-07-22 13:47:45 +0200 oj r274233 : remove some unused code 2009-07-22 09:06:20 +0200 oj r274219 : export dbtoolsclient dbcharsethelper for sc 2009-07-22 08:48:58 +0200 oj r274218 : create NumberFormatter on demand 2009-07-22 08:39:23 +0200 oj r274217 : change char to sal_Char 2009-07-22 07:33:34 +0200 oj r274214 : export dbtoolsclient dbcharsethelper for sc 2009-07-22 07:30:04 +0200 oj r274213 : late init of numberformatter and breakiterator 2009-07-22 07:28:55 +0200 oj r274212 : export dbtoolsclient dbcharsethelper for sc 2009-07-21 13:43:28 +0200 oj r274196 : check if quick start is enbaled 2009-07-21 13:40:09 +0200 oj r274195 : check config entry for UiEventsLogger 2009-07-21 13:37:40 +0200 oj r274194 : code refactoring, remove of duplicate code and some late inits and removale of not needed files 2009-07-21 13:35:38 +0200 oj r274193 : code refactoring, remove of duplicate code and some late inits and removale of not needed files 2009-07-21 13:33:41 +0200 oj r274192 : doc meta data will now be created on demand 2009-07-21 13:13:40 +0200 oj r274187 : load ldap functions on demand 2009-07-21 13:03:17 +0200 oj r274183 : late init of TransliterationImpl 2009-07-21 12:36:10 +0200 oj r274180 : late init of charClass
2009-09-08 04:57:32 +00:00
nPos = (xub_StrLen)pBreakIt->GetBreakIter()->nextCharacters( rTNd.GetTxt(), nPos,
pBreakIt->GetLocale( rTNd.GetLang( nPos ) ),
nItrMode, 1, nDone );
// Check if nPos is inside hidden text range:
if ( CRSR_SKIP_HIDDEN & nMode )
{
xub_StrLen nHiddenStart;
xub_StrLen nHiddenEnd;
SwScriptInfo::GetBoundsOfHiddenRange( rTNd, nPos, nHiddenStart, nHiddenEnd );
if ( nHiddenStart != STRING_LEN && nHiddenStart != nPos )
nPos = nHiddenEnd;
}
if( 1 == nDone )
*pIdx = nPos;
else
bRet = sal_False;
2000-09-18 23:08:29 +00:00
}
else if( nPos < rTNd.GetTxt().Len() )
(*pIdx)++;
else
bRet = sal_False;
2000-09-18 23:08:29 +00:00
}
}
else
bRet = sal_False;
return bRet;
2000-09-18 23:08:29 +00:00
}
sal_Bool SwCntntNode::GoPrevious(SwIndex * pIdx, sal_uInt16 nMode ) const
2000-09-18 23:08:29 +00:00
{
sal_Bool bRet = sal_True;
2000-09-18 23:08:29 +00:00
if( pIdx->GetIndex() > 0 )
{
if( !IsTxtNode() )
(*pIdx)--;
else
2000-09-18 23:08:29 +00:00
{
const SwTxtNode& rTNd = *GetTxtNode();
xub_StrLen nPos = pIdx->GetIndex();
CWS-TOOLING: integrate CWS oj18 2009-08-21 15:08:49 +0200 oj r275263 : wrong check 2009-08-21 08:56:01 +0200 oj r275215 : missing not 2009-08-20 07:27:13 +0200 oj r275164 : use new method from global 2009-08-19 10:22:35 +0200 oj r275138 : call GetLocale instead of pLocale 2009-08-18 10:39:32 +0200 oj r275082 : missing header include 2009-08-18 10:09:44 +0200 oj r275081 : new methods at global 2009-08-18 10:09:00 +0200 oj r275080 : unused var 2009-08-18 08:59:04 +0200 oj r275078 : move files from classes to xml 2009-08-17 14:58:16 +0200 oj r275056 : CWS-TOOLING: rebase CWS oj18 to trunk@275001 (milestone: DEV300:m55) 2009-08-17 13:29:44 +0200 oj r275047 : compile error 2009-08-17 13:27:47 +0200 oj r275045 : compile error 2009-08-17 11:44:54 +0200 oj r275040 : add dep 2009-07-22 14:26:05 +0200 oj r274240 : move unused services into fwl 2009-07-22 14:25:35 +0200 oj r274239 : move unused services into fwl 2009-07-22 13:47:45 +0200 oj r274233 : remove some unused code 2009-07-22 09:06:20 +0200 oj r274219 : export dbtoolsclient dbcharsethelper for sc 2009-07-22 08:48:58 +0200 oj r274218 : create NumberFormatter on demand 2009-07-22 08:39:23 +0200 oj r274217 : change char to sal_Char 2009-07-22 07:33:34 +0200 oj r274214 : export dbtoolsclient dbcharsethelper for sc 2009-07-22 07:30:04 +0200 oj r274213 : late init of numberformatter and breakiterator 2009-07-22 07:28:55 +0200 oj r274212 : export dbtoolsclient dbcharsethelper for sc 2009-07-21 13:43:28 +0200 oj r274196 : check if quick start is enbaled 2009-07-21 13:40:09 +0200 oj r274195 : check config entry for UiEventsLogger 2009-07-21 13:37:40 +0200 oj r274194 : code refactoring, remove of duplicate code and some late inits and removale of not needed files 2009-07-21 13:35:38 +0200 oj r274193 : code refactoring, remove of duplicate code and some late inits and removale of not needed files 2009-07-21 13:33:41 +0200 oj r274192 : doc meta data will now be created on demand 2009-07-21 13:13:40 +0200 oj r274187 : load ldap functions on demand 2009-07-21 13:03:17 +0200 oj r274183 : late init of TransliterationImpl 2009-07-21 12:36:10 +0200 oj r274180 : late init of charClass
2009-09-08 04:57:32 +00:00
if( pBreakIt->GetBreakIter().is() )
2000-09-18 23:08:29 +00:00
{
sal_Int32 nDone = 0;
sal_uInt16 nItrMode = ( CRSR_SKIP_CELLS & nMode ) ?
CharacterIteratorMode::SKIPCELL :
CharacterIteratorMode::SKIPCONTROLCHARACTER;
CWS-TOOLING: integrate CWS oj18 2009-08-21 15:08:49 +0200 oj r275263 : wrong check 2009-08-21 08:56:01 +0200 oj r275215 : missing not 2009-08-20 07:27:13 +0200 oj r275164 : use new method from global 2009-08-19 10:22:35 +0200 oj r275138 : call GetLocale instead of pLocale 2009-08-18 10:39:32 +0200 oj r275082 : missing header include 2009-08-18 10:09:44 +0200 oj r275081 : new methods at global 2009-08-18 10:09:00 +0200 oj r275080 : unused var 2009-08-18 08:59:04 +0200 oj r275078 : move files from classes to xml 2009-08-17 14:58:16 +0200 oj r275056 : CWS-TOOLING: rebase CWS oj18 to trunk@275001 (milestone: DEV300:m55) 2009-08-17 13:29:44 +0200 oj r275047 : compile error 2009-08-17 13:27:47 +0200 oj r275045 : compile error 2009-08-17 11:44:54 +0200 oj r275040 : add dep 2009-07-22 14:26:05 +0200 oj r274240 : move unused services into fwl 2009-07-22 14:25:35 +0200 oj r274239 : move unused services into fwl 2009-07-22 13:47:45 +0200 oj r274233 : remove some unused code 2009-07-22 09:06:20 +0200 oj r274219 : export dbtoolsclient dbcharsethelper for sc 2009-07-22 08:48:58 +0200 oj r274218 : create NumberFormatter on demand 2009-07-22 08:39:23 +0200 oj r274217 : change char to sal_Char 2009-07-22 07:33:34 +0200 oj r274214 : export dbtoolsclient dbcharsethelper for sc 2009-07-22 07:30:04 +0200 oj r274213 : late init of numberformatter and breakiterator 2009-07-22 07:28:55 +0200 oj r274212 : export dbtoolsclient dbcharsethelper for sc 2009-07-21 13:43:28 +0200 oj r274196 : check if quick start is enbaled 2009-07-21 13:40:09 +0200 oj r274195 : check config entry for UiEventsLogger 2009-07-21 13:37:40 +0200 oj r274194 : code refactoring, remove of duplicate code and some late inits and removale of not needed files 2009-07-21 13:35:38 +0200 oj r274193 : code refactoring, remove of duplicate code and some late inits and removale of not needed files 2009-07-21 13:33:41 +0200 oj r274192 : doc meta data will now be created on demand 2009-07-21 13:13:40 +0200 oj r274187 : load ldap functions on demand 2009-07-21 13:03:17 +0200 oj r274183 : late init of TransliterationImpl 2009-07-21 12:36:10 +0200 oj r274180 : late init of charClass
2009-09-08 04:57:32 +00:00
nPos = (xub_StrLen)pBreakIt->GetBreakIter()->previousCharacters( rTNd.GetTxt(), nPos,
pBreakIt->GetLocale( rTNd.GetLang( nPos ) ),
nItrMode, 1, nDone );
// Check if nPos is inside hidden text range:
if ( CRSR_SKIP_HIDDEN & nMode )
{
xub_StrLen nHiddenStart;
xub_StrLen nHiddenEnd;
SwScriptInfo::GetBoundsOfHiddenRange( rTNd, nPos, nHiddenStart, nHiddenEnd );
if ( nHiddenStart != STRING_LEN )
nPos = nHiddenStart;
}
if( 1 == nDone )
*pIdx = nPos;
else
bRet = sal_False;
2000-09-18 23:08:29 +00:00
}
else if( nPos )
(*pIdx)--;
else
bRet = sal_False;
2000-09-18 23:08:29 +00:00
}
}
else
bRet = sal_False;
return bRet;
2000-09-18 23:08:29 +00:00
}
/*
* Methode erzeugt fuer den vorhergehenden Node alle Ansichten vom
* Dokument. Die erzeugten Contentframes werden in das entsprechende
* Layout gehaengt.
*/
void SwCntntNode::MakeFrms( SwCntntNode& rNode )
{
OSL_ENSURE( &rNode != this,
2000-09-18 23:08:29 +00:00
"Kein Contentnode oder Copy-Node und neuer Node identisch." );
if( !GetDepends() || &rNode == this ) // gibt es ueberhaupt Frames ??
return;
SwFrm *pFrm, *pNew;
SwLayoutFrm *pUpper;
// Frames anlegen fuer Nodes, die vor oder hinter der Tabelle stehen ??
OSL_ENSURE( FindTableNode() == rNode.FindTableNode(), "Table confusion" );
2000-09-18 23:08:29 +00:00
SwNode2Layout aNode2Layout( *this, rNode.GetIndex() );
while( 0 != (pUpper = aNode2Layout.UpperFrm( pFrm, rNode )) )
{
pNew = rNode.MakeFrm( pUpper );
2000-09-18 23:08:29 +00:00
pNew->Paste( pUpper, pFrm );
2011-02-02 20:41:40 +09:00
// #i27138#
// notify accessibility paragraphs objects about changed
// CONTENT_FLOWS_FROM/_TO relation.
// Relation CONTENT_FLOWS_FROM for next paragraph will change
// and relation CONTENT_FLOWS_TO for previous paragraph will change.
if ( pNew->IsTxtFrm() )
{
ViewShell* pViewShell( pNew->getRootFrm()->GetCurrShell() );
if ( pViewShell && pViewShell->GetLayout() &&
pViewShell->GetLayout()->IsAnyShellAccessible() )
{
pViewShell->InvalidateAccessibleParaFlowRelation(
dynamic_cast<SwTxtFrm*>(pNew->FindNextCnt( true )),
dynamic_cast<SwTxtFrm*>(pNew->FindPrevCnt( true )) );
}
}
2000-09-18 23:08:29 +00:00
}
}
/*
* Methode loescht fuer den Node alle Ansichten vom
* Dokument. Die Contentframes werden aus dem entsprechenden
* Layout ausgehaengt.
*/
void SwCntntNode::DelFrms()
{
if( !GetDepends() )
return;
SwCntntFrm::DelFrms(*this);
2000-09-18 23:08:29 +00:00
if( IsTxtNode() )
{
((SwTxtNode*)this)->SetWrong( NULL );
((SwTxtNode*)this)->SetWrongDirty( true );
((SwTxtNode*)this)->SetGrammarCheck( NULL );
((SwTxtNode*)this)->SetGrammarCheckDirty( true );
// SMARTTAGS
((SwTxtNode*)this)->SetSmartTags( NULL );
((SwTxtNode*)this)->SetSmartTagDirty( true );
((SwTxtNode*)this)->SetWordCountDirty( true );
((SwTxtNode*)this)->SetAutoCompleteWordDirty( true );
2000-09-18 23:08:29 +00:00
}
}
SwCntntNode *SwCntntNode::JoinNext()
{
return this;
}
SwCntntNode *SwCntntNode::JoinPrev()
{
return this;
}
// erfrage vom Modify Informationen
sal_Bool SwCntntNode::GetInfo( SfxPoolItem& rInfo ) const
2000-09-18 23:08:29 +00:00
{
switch( rInfo.Which() )
{
case RES_AUTOFMT_DOCNODE:
if( &GetNodes() == ((SwAutoFmtGetDocNode&)rInfo).pNodes )
{
((SwAutoFmtGetDocNode&)rInfo).pCntntNode = this;
return sal_False;
2000-09-18 23:08:29 +00:00
}
break;
case RES_FINDNEARESTNODE:
if( ((SwFmtPageDesc&)GetAttr( RES_PAGEDESC )).GetPageDesc() )
((SwFindNearestNode&)rInfo).CheckNode( *this );
return sal_True;
2000-09-18 23:08:29 +00:00
case RES_CONTENT_VISIBLE:
{
((SwPtrMsgPoolItem&)rInfo).pObject =
SwIterator<SwFrm,SwCntntNode>::FirstElement(*this);
2000-09-18 23:08:29 +00:00
}
return sal_False;
2000-09-18 23:08:29 +00:00
}
return SwModify::GetInfo( rInfo );
}
// setze ein Attribut
sal_Bool SwCntntNode::SetAttr(const SfxPoolItem& rAttr )
2000-09-18 23:08:29 +00:00
{
if( !GetpSwAttrSet() ) // lasse von den entsprechenden Nodes die
2000-09-18 23:08:29 +00:00
NewAttrSet( GetDoc()->GetAttrPool() ); // AttrSets anlegen
OSL_ENSURE( GetpSwAttrSet(), "warum wurde kein AttrSet angelegt?" );
2000-09-18 23:08:29 +00:00
if ( IsInCache() )
{
SwFrm::GetCache().Delete( this );
SetInCache( sal_False );
2000-09-18 23:08:29 +00:00
}
sal_Bool bRet = sal_False;
2000-09-18 23:08:29 +00:00
// wenn Modify gelockt ist, werden keine Modifies verschickt
if( IsModifyLocked() ||
( !GetDepends() && RES_PARATR_NUMRULE != rAttr.Which() ))
2000-09-18 23:08:29 +00:00
{
bRet = 0 != AttrSetHandleHelper::Put( mpAttrSet, *this, rAttr );
2000-09-18 23:08:29 +00:00
}
else
{
SwAttrSet aOld( *GetpSwAttrSet()->GetPool(), GetpSwAttrSet()->GetRanges() ),
aNew( *GetpSwAttrSet()->GetPool(), GetpSwAttrSet()->GetRanges() );
if( 0 != ( bRet = 0 != AttrSetHandleHelper::Put_BC( mpAttrSet, *this, rAttr, &aOld, &aNew ) ))
2000-09-18 23:08:29 +00:00
{
SwAttrSetChg aChgOld( *GetpSwAttrSet(), aOld );
SwAttrSetChg aChgNew( *GetpSwAttrSet(), aNew );
ModifyNotification( &aChgOld, &aChgNew ); // alle veraenderten werden verschickt
2000-09-18 23:08:29 +00:00
}
}
return bRet;
}
#include <svl/itemiter.hxx>
2000-09-18 23:08:29 +00:00
sal_Bool SwCntntNode::SetAttr( const SfxItemSet& rSet )
2000-09-18 23:08:29 +00:00
{
if ( IsInCache() )
{
SwFrm::GetCache().Delete( this );
SetInCache( sal_False );
2000-09-18 23:08:29 +00:00
}
const SfxPoolItem* pFnd = 0;
if( SFX_ITEM_SET == rSet.GetItemState( RES_AUTO_STYLE, sal_False, &pFnd ) )
{
OSL_ENSURE( rSet.Count() == 1, "SetAutoStyle mixed with other attributes?!" );
const SwFmtAutoFmt* pTmp = static_cast<const SwFmtAutoFmt*>(pFnd);
// If there already is an attribute set (usually containing a numbering
// item), we have to merge the attribute of the new set into the old set:
bool bSetParent = true;
if ( GetpSwAttrSet() )
{
bSetParent = false;
AttrSetHandleHelper::Put( mpAttrSet, *this, *pTmp->GetStyleHandle() );
}
else
{
mpAttrSet = pTmp->GetStyleHandle();
}
2000-09-18 23:08:29 +00:00
if ( bSetParent )
{
// If the content node has a conditional style, we have to set the
// string item containing the correct conditional style name (the
// style name property has already been set during the import!)
// In case we do not have a conditional style, we make use of the
// fact that nobody else uses the attribute set behind the handle.
// FME 2007-07-10 #i78124# If autostyle does not have a parent,
// the string is empty.
const SfxPoolItem* pNameItem = 0;
if ( 0 != GetCondFmtColl() ||
SFX_ITEM_SET != mpAttrSet->GetItemState( RES_FRMATR_STYLE_NAME, sal_False, &pNameItem ) ||
0 == static_cast<const SfxStringItem*>(pNameItem)->GetValue().Len() )
AttrSetHandleHelper::SetParent( mpAttrSet, *this, &GetAnyFmtColl(), GetFmtColl() );
else
const_cast<SfxItemSet*>(mpAttrSet.get())->SetParent( &GetFmtColl()->GetAttrSet() );
}
return sal_True;
}
if( !GetpSwAttrSet() ) // lasse von den entsprechenden Nodes die
NewAttrSet( GetDoc()->GetAttrPool() ); // AttrSets anlegen
sal_Bool bRet = sal_False;
2000-09-18 23:08:29 +00:00
// wenn Modify gelockt ist, werden keine Modifies verschickt
if ( IsModifyLocked() ||
( !GetDepends() &&
SFX_ITEM_SET != rSet.GetItemState( RES_PARATR_NUMRULE, sal_False ) ) )
2000-09-18 23:08:29 +00:00
{
// einige Sonderbehandlungen fuer Attribute
bRet = 0 != AttrSetHandleHelper::Put( mpAttrSet, *this, rSet );
2000-09-18 23:08:29 +00:00
}
else
{
SwAttrSet aOld( *GetpSwAttrSet()->GetPool(), GetpSwAttrSet()->GetRanges() ),
aNew( *GetpSwAttrSet()->GetPool(), GetpSwAttrSet()->GetRanges() );
if( 0 != (bRet = 0 != AttrSetHandleHelper::Put_BC( mpAttrSet, *this, rSet, &aOld, &aNew )) )
2000-09-18 23:08:29 +00:00
{
// einige Sonderbehandlungen fuer Attribute
SwAttrSetChg aChgOld( *GetpSwAttrSet(), aOld );
SwAttrSetChg aChgNew( *GetpSwAttrSet(), aNew );
ModifyNotification( &aChgOld, &aChgNew ); // alle veraenderten werden verschickt
2000-09-18 23:08:29 +00:00
}
}
return bRet;
}
// Nimmt den Hint mit nWhich aus dem Delta-Array
sal_Bool SwCntntNode::ResetAttr( sal_uInt16 nWhich1, sal_uInt16 nWhich2 )
2000-09-18 23:08:29 +00:00
{
if( !GetpSwAttrSet() )
return sal_False;
2000-09-18 23:08:29 +00:00
if ( IsInCache() )
{
SwFrm::GetCache().Delete( this );
SetInCache( sal_False );
2000-09-18 23:08:29 +00:00
}
// wenn Modify gelockt ist, werden keine Modifies verschickt
if( IsModifyLocked() )
{
sal_uInt16 nDel = 0;
if ( !nWhich2 || nWhich2 < nWhich1 )
{
std::vector<sal_uInt16> aClearWhichIds;
aClearWhichIds.push_back( nWhich1 );
nDel = ClearItemsFromAttrSet( aClearWhichIds );
}
else
nDel = AttrSetHandleHelper::ClearItem_BC( mpAttrSet, *this, nWhich1, nWhich2, 0, 0 );
2000-09-18 23:08:29 +00:00
if( !GetpSwAttrSet()->Count() ) // leer, dann loeschen
mpAttrSet.reset();//DELETEZ( mpAttrSet );
2000-09-18 23:08:29 +00:00
return 0 != nDel;
}
// sollte kein gueltiger Bereich definiert sein ?
if( !nWhich2 || nWhich2 < nWhich1 )
nWhich2 = nWhich1; // dann setze auf 1. Id, nur dieses Item
SwAttrSet aOld( *GetpSwAttrSet()->GetPool(), GetpSwAttrSet()->GetRanges() ),
aNew( *GetpSwAttrSet()->GetPool(), GetpSwAttrSet()->GetRanges() );
sal_Bool bRet = 0 != AttrSetHandleHelper::ClearItem_BC( mpAttrSet, *this, nWhich1, nWhich2, &aOld, &aNew );
2000-09-18 23:08:29 +00:00
if( bRet )
{
SwAttrSetChg aChgOld( *GetpSwAttrSet(), aOld );
SwAttrSetChg aChgNew( *GetpSwAttrSet(), aNew );
ModifyNotification( &aChgOld, &aChgNew ); // alle veraenderten werden verschickt
2000-09-18 23:08:29 +00:00
if( !GetpSwAttrSet()->Count() ) // leer, dann loeschen
mpAttrSet.reset();//DELETEZ( mpAttrSet );
2000-09-18 23:08:29 +00:00
}
return bRet;
}
sal_Bool SwCntntNode::ResetAttr( const std::vector<sal_uInt16>& rWhichArr )
2000-09-18 23:08:29 +00:00
{
if( !GetpSwAttrSet() )
return sal_False;
2000-09-18 23:08:29 +00:00
if ( IsInCache() )
{
SwFrm::GetCache().Delete( this );
SetInCache( sal_False );
2000-09-18 23:08:29 +00:00
}
// wenn Modify gelockt ist, werden keine Modifies verschickt
sal_uInt16 nDel = 0;
2000-09-18 23:08:29 +00:00
if( IsModifyLocked() )
{
std::vector<sal_uInt16> aClearWhichIds(rWhichArr);
nDel = ClearItemsFromAttrSet( aClearWhichIds );
2000-09-18 23:08:29 +00:00
}
else
{
SwAttrSet aOld( *GetpSwAttrSet()->GetPool(), GetpSwAttrSet()->GetRanges() ),
aNew( *GetpSwAttrSet()->GetPool(), GetpSwAttrSet()->GetRanges() );
2000-09-18 23:08:29 +00:00
std::vector<sal_uInt16>::const_iterator it;
for ( it = rWhichArr.begin(); it != rWhichArr.end(); ++it )
if( AttrSetHandleHelper::ClearItem_BC( mpAttrSet, *this, *it, &aOld, &aNew ))
2000-09-18 23:08:29 +00:00
++nDel;
if( nDel )
{
SwAttrSetChg aChgOld( *GetpSwAttrSet(), aOld );
SwAttrSetChg aChgNew( *GetpSwAttrSet(), aNew );
ModifyNotification( &aChgOld, &aChgNew ); // alle veraenderten werden verschickt
2000-09-18 23:08:29 +00:00
}
}
if( !GetpSwAttrSet()->Count() ) // leer, dann loeschen
mpAttrSet.reset();//DELETEZ( mpAttrSet );
2000-09-18 23:08:29 +00:00
return 0 != nDel ;
}
sal_uInt16 SwCntntNode::ResetAllAttr()
2000-09-18 23:08:29 +00:00
{
if( !GetpSwAttrSet() )
2000-09-18 23:08:29 +00:00
return 0;
if ( IsInCache() )
{
SwFrm::GetCache().Delete( this );
SetInCache( sal_False );
2000-09-18 23:08:29 +00:00
}
// wenn Modify gelockt ist, werden keine Modifies verschickt
if( IsModifyLocked() )
{
std::vector<sal_uInt16> aClearWhichIds;
aClearWhichIds.push_back(0);
sal_uInt16 nDel = ClearItemsFromAttrSet( aClearWhichIds );
if( !GetpSwAttrSet()->Count() ) // leer, dann loeschen
mpAttrSet.reset(); // DELETEZ( mpAttrSet );
2000-09-18 23:08:29 +00:00
return nDel;
}
SwAttrSet aOld( *GetpSwAttrSet()->GetPool(), GetpSwAttrSet()->GetRanges() ),
aNew( *GetpSwAttrSet()->GetPool(), GetpSwAttrSet()->GetRanges() );
sal_Bool bRet = 0 != AttrSetHandleHelper::ClearItem_BC( mpAttrSet, *this, 0, &aOld, &aNew );
2000-09-18 23:08:29 +00:00
if( bRet )
{
SwAttrSetChg aChgOld( *GetpSwAttrSet(), aOld );
SwAttrSetChg aChgNew( *GetpSwAttrSet(), aNew );
ModifyNotification( &aChgOld, &aChgNew ); // alle veraenderten werden verschickt
2000-09-18 23:08:29 +00:00
if( !GetpSwAttrSet()->Count() ) // leer, dann loeschen
mpAttrSet.reset();//DELETEZ( mpAttrSet );
2000-09-18 23:08:29 +00:00
}
return aNew.Count();
}
sal_Bool SwCntntNode::GetAttr( SfxItemSet& rSet, sal_Bool bInParent ) const
2000-09-18 23:08:29 +00:00
{
if( rSet.Count() )
rSet.ClearItem();
const SwAttrSet& rAttrSet = GetSwAttrSet();
if( bInParent )
return rSet.Set( rAttrSet, sal_True ) ? sal_True : sal_False;
2000-09-18 23:08:29 +00:00
rSet.Put( rAttrSet );
return rSet.Count() ? sal_True : sal_False;
2000-09-18 23:08:29 +00:00
}
sal_uInt16 SwCntntNode::ClearItemsFromAttrSet( const std::vector<sal_uInt16>& rWhichIds )
{
sal_uInt16 nRet = 0;
if ( 0 == rWhichIds.size() )
return nRet;
OSL_ENSURE( GetpSwAttrSet(), "no item set" );
SwAttrSet aNewAttrSet( *GetpSwAttrSet() );
for ( std::vector<sal_uInt16>::const_iterator aIter = rWhichIds.begin();
aIter != rWhichIds.end();
++aIter )
{
nRet = nRet + aNewAttrSet.ClearItem( *aIter );
}
if ( nRet )
AttrSetHandleHelper::GetNewAutoStyle( mpAttrSet, *this, aNewAttrSet );
return nRet;
}
const SfxPoolItem* SwCntntNode::GetNoCondAttr( sal_uInt16 nWhich,
sal_Bool bInParents ) const
2000-09-18 23:08:29 +00:00
{
const SfxPoolItem* pFnd = 0;
if( pCondColl && pCondColl->GetRegisteredIn() )
{
if( !GetpSwAttrSet() || ( SFX_ITEM_SET != GetpSwAttrSet()->GetItemState(
nWhich, sal_False, &pFnd ) && bInParents ))
2000-09-18 23:08:29 +00:00
((SwFmt*)GetRegisteredIn())->GetItemState( nWhich, bInParents, &pFnd );
}
2011-02-02 20:41:40 +09:00
// undo change of issue #i51029#
// Note: <GetSwAttrSet()> returns <mpAttrSet>, if set, otherwise it returns
// the attribute set of the paragraph style, which is valid for the
// content node - see file <node.hxx>
else
{
2000-09-18 23:08:29 +00:00
GetSwAttrSet().GetItemState( nWhich, bInParents, &pFnd );
}
2000-09-18 23:08:29 +00:00
return pFnd;
}
// koennen 2 Nodes zusammengefasst werden ?
// in pIdx kann die 2. Position returnt werden.
int SwCntntNode::CanJoinNext( SwNodeIndex* pIdx ) const
{
const SwNodes& rNds = GetNodes();
sal_uInt8 nNdType = GetNodeType();
2000-09-18 23:08:29 +00:00
SwNodeIndex aIdx( *this, 1 );
const SwNode* pNd = this;
while( aIdx < rNds.Count()-1 &&
(( pNd = &aIdx.GetNode())->IsSectionNode() ||
INTEGRATION: CWS writercorehandoff (1.22.48); FILE MERGED 2006/07/27 14:39:25 fme 1.22.48.18: RESYNC: (1.26-1.27); FILE MERGED 2006/05/09 10:37:57 fme 1.22.48.17: #i50348# make SwDoc accessible via interfaces 2006/05/08 11:21:11 fme 1.22.48.16: #i50348# Make SwDoc accessible via interfaces 2006/03/17 08:03:39 tra 1.22.48.15: RESYNC: (1.25-1.26); FILE MERGED 2006/01/19 08:50:04 fme 1.22.48.14: #i50348# General cleanup - removed unused header files, functions, members, declarations 2005/12/20 15:09:39 tra 1.22.48.13: RESYNC: (1.24-1.25); FILE MERGED 2005/11/18 14:53:21 fme 1.22.48.12: #i50348# Make SwDoc accessible via interfaces 2005/11/11 07:56:07 fme 1.22.48.11: #i50348# make SwDoc accessible via interfaces 2005/09/13 13:27:52 tra 1.22.48.10: RESYNC: (1.23-1.24); FILE MERGED 2005/07/28 11:55:30 tra 1.22.48.9: RESYNC: (1.22-1.23); FILE MERGED 2005/07/19 06:05:46 fme 1.22.48.8: #i50348# make SwDoc accessible via interfaces 2005/07/13 13:24:19 fme 1.22.48.7: #i50348# Make SwDoc accessible via interfaces 2005/07/05 08:12:39 tra 1.22.48.6: #i50348#make SwDoc interface based 2005/06/24 11:43:17 fme 1.22.48.5: #i50348# Make SwDoc accessible via interfaces 2005/06/22 13:08:12 tra 1.22.48.4: #i50348#toward a interface based SwDoc 2005/06/22 06:40:10 tra 1.22.48.3: #i50348# make SwDoc accessible via interfaces 2005/06/07 14:13:38 fme 1.22.48.2: #i50348# General cleanup - removed unused header files, functions, members, declarations etc. 2005/06/06 09:27:18 tra 1.22.48.1: Unnecessary includes removed #i50348#
2006-08-14 15:05:06 +00:00
( pNd->IsEndNode() && pNd->StartOfSectionNode()->IsSectionNode() )))
2000-09-18 23:08:29 +00:00
aIdx++;
if( pNd->GetNodeType() != nNdType || rNds.Count()-1 == aIdx.GetIndex() )
return sal_False;
if( IsTxtNode() )
{ // Do not merge strings if the result exceeds the allowed string length
const SwTxtNode* pTxtNd = static_cast<const SwTxtNode*>(this);
sal_uInt64 nSum = pTxtNd->GetTxt().Len();
pTxtNd = static_cast<const SwTxtNode*>(pNd);
nSum += pTxtNd->GetTxt().Len();
if( nSum > STRING_LEN )
return sal_False;
}
2000-09-18 23:08:29 +00:00
if( pIdx )
*pIdx = aIdx;
return sal_True;
2000-09-18 23:08:29 +00:00
}
// koennen 2 Nodes zusammengefasst werden ?
// in pIdx kann die 2. Position returnt werden.
int SwCntntNode::CanJoinPrev( SwNodeIndex* pIdx ) const
{
sal_uInt8 nNdType = GetNodeType();
2000-09-18 23:08:29 +00:00
SwNodeIndex aIdx( *this, -1 );
const SwNode* pNd = this;
while( aIdx.GetIndex() &&
(( pNd = &aIdx.GetNode())->IsSectionNode() ||
INTEGRATION: CWS writercorehandoff (1.22.48); FILE MERGED 2006/07/27 14:39:25 fme 1.22.48.18: RESYNC: (1.26-1.27); FILE MERGED 2006/05/09 10:37:57 fme 1.22.48.17: #i50348# make SwDoc accessible via interfaces 2006/05/08 11:21:11 fme 1.22.48.16: #i50348# Make SwDoc accessible via interfaces 2006/03/17 08:03:39 tra 1.22.48.15: RESYNC: (1.25-1.26); FILE MERGED 2006/01/19 08:50:04 fme 1.22.48.14: #i50348# General cleanup - removed unused header files, functions, members, declarations 2005/12/20 15:09:39 tra 1.22.48.13: RESYNC: (1.24-1.25); FILE MERGED 2005/11/18 14:53:21 fme 1.22.48.12: #i50348# Make SwDoc accessible via interfaces 2005/11/11 07:56:07 fme 1.22.48.11: #i50348# make SwDoc accessible via interfaces 2005/09/13 13:27:52 tra 1.22.48.10: RESYNC: (1.23-1.24); FILE MERGED 2005/07/28 11:55:30 tra 1.22.48.9: RESYNC: (1.22-1.23); FILE MERGED 2005/07/19 06:05:46 fme 1.22.48.8: #i50348# make SwDoc accessible via interfaces 2005/07/13 13:24:19 fme 1.22.48.7: #i50348# Make SwDoc accessible via interfaces 2005/07/05 08:12:39 tra 1.22.48.6: #i50348#make SwDoc interface based 2005/06/24 11:43:17 fme 1.22.48.5: #i50348# Make SwDoc accessible via interfaces 2005/06/22 13:08:12 tra 1.22.48.4: #i50348#toward a interface based SwDoc 2005/06/22 06:40:10 tra 1.22.48.3: #i50348# make SwDoc accessible via interfaces 2005/06/07 14:13:38 fme 1.22.48.2: #i50348# General cleanup - removed unused header files, functions, members, declarations etc. 2005/06/06 09:27:18 tra 1.22.48.1: Unnecessary includes removed #i50348#
2006-08-14 15:05:06 +00:00
( pNd->IsEndNode() && pNd->StartOfSectionNode()->IsSectionNode() )))
2000-09-18 23:08:29 +00:00
aIdx--;
if( pNd->GetNodeType() != nNdType || 0 == aIdx.GetIndex() )
return sal_False;
2000-09-18 23:08:29 +00:00
if( pIdx )
*pIdx = aIdx;
return sal_True;
2000-09-18 23:08:29 +00:00
}
//FEATURE::CONDCOLL
void SwCntntNode::SetCondFmtColl( SwFmtColl* pColl )
{
if( (!pColl && pCondColl) || ( pColl && !pCondColl ) ||
( pColl && pColl != pCondColl->GetRegisteredIn() ) )
{
SwFmtColl* pOldColl = GetCondFmtColl();
delete pCondColl;
if( pColl )
pCondColl = new SwDepend( this, pColl );
else
pCondColl = 0;
if( GetpSwAttrSet() )
2000-09-18 23:08:29 +00:00
{
AttrSetHandleHelper::SetParent( mpAttrSet, *this, &GetAnyFmtColl(), GetFmtColl() );
2000-09-18 23:08:29 +00:00
}
if( !IsModifyLocked() )
{
SwFmtChg aTmp1( pOldColl ? pOldColl : GetFmtColl() );
SwFmtChg aTmp2( pColl ? pColl : GetFmtColl() );
NotifyClients( &aTmp1, &aTmp2 );
2000-09-18 23:08:29 +00:00
}
if( IsInCache() )
{
SwFrm::GetCache().Delete( this );
SetInCache( sal_False );
2000-09-18 23:08:29 +00:00
}
}
}
sal_Bool SwCntntNode::IsAnyCondition( SwCollCondition& rTmp ) const
2000-09-18 23:08:29 +00:00
{
const SwNodes& rNds = GetNodes();
{
int nCond = 0;
INTEGRATION: CWS writercorehandoff (1.22.48); FILE MERGED 2006/07/27 14:39:25 fme 1.22.48.18: RESYNC: (1.26-1.27); FILE MERGED 2006/05/09 10:37:57 fme 1.22.48.17: #i50348# make SwDoc accessible via interfaces 2006/05/08 11:21:11 fme 1.22.48.16: #i50348# Make SwDoc accessible via interfaces 2006/03/17 08:03:39 tra 1.22.48.15: RESYNC: (1.25-1.26); FILE MERGED 2006/01/19 08:50:04 fme 1.22.48.14: #i50348# General cleanup - removed unused header files, functions, members, declarations 2005/12/20 15:09:39 tra 1.22.48.13: RESYNC: (1.24-1.25); FILE MERGED 2005/11/18 14:53:21 fme 1.22.48.12: #i50348# Make SwDoc accessible via interfaces 2005/11/11 07:56:07 fme 1.22.48.11: #i50348# make SwDoc accessible via interfaces 2005/09/13 13:27:52 tra 1.22.48.10: RESYNC: (1.23-1.24); FILE MERGED 2005/07/28 11:55:30 tra 1.22.48.9: RESYNC: (1.22-1.23); FILE MERGED 2005/07/19 06:05:46 fme 1.22.48.8: #i50348# make SwDoc accessible via interfaces 2005/07/13 13:24:19 fme 1.22.48.7: #i50348# Make SwDoc accessible via interfaces 2005/07/05 08:12:39 tra 1.22.48.6: #i50348#make SwDoc interface based 2005/06/24 11:43:17 fme 1.22.48.5: #i50348# Make SwDoc accessible via interfaces 2005/06/22 13:08:12 tra 1.22.48.4: #i50348#toward a interface based SwDoc 2005/06/22 06:40:10 tra 1.22.48.3: #i50348# make SwDoc accessible via interfaces 2005/06/07 14:13:38 fme 1.22.48.2: #i50348# General cleanup - removed unused header files, functions, members, declarations etc. 2005/06/06 09:27:18 tra 1.22.48.1: Unnecessary includes removed #i50348#
2006-08-14 15:05:06 +00:00
const SwStartNode* pSttNd = StartOfSectionNode();
2000-09-18 23:08:29 +00:00
while( pSttNd )
{
switch( pSttNd->GetNodeType() )
{
case ND_TABLENODE: nCond = PARA_IN_TABLEBODY; break;
case ND_SECTIONNODE: nCond = PARA_IN_SECTION; break;
default:
switch( pSttNd->GetStartNodeType() )
{
case SwTableBoxStartNode:
{
nCond = PARA_IN_TABLEBODY;
const SwTableNode* pTblNd = pSttNd->FindTableNode();
const SwTableBox* pBox;
if( pTblNd && 0 != ( pBox = pTblNd->GetTable().
GetTblBox( pSttNd->GetIndex() ) ) && pBox &&
2000-09-18 23:08:29 +00:00
pBox->IsInHeadline( &pTblNd->GetTable() ) )
nCond = PARA_IN_TABLEHEAD;
}
break;
case SwFlyStartNode: nCond = PARA_IN_FRAME; break;
case SwFootnoteStartNode:
{
nCond = PARA_IN_FOOTENOTE;
const SwFtnIdxs& rFtnArr = rNds.GetDoc()->GetFtnIdxs();
const SwTxtFtn* pTxtFtn;
const SwNode* pSrchNd = pSttNd;
for( sal_uInt16 n = 0; n < rFtnArr.size(); ++n )
2000-09-18 23:08:29 +00:00
if( 0 != ( pTxtFtn = rFtnArr[ n ])->GetStartNode() &&
pSrchNd == &pTxtFtn->GetStartNode()->GetNode() )
{
if( pTxtFtn->GetFtn().IsEndNote() )
nCond = PARA_IN_ENDNOTE;
break;
}
}
break;
case SwHeaderStartNode: nCond = PARA_IN_HEADER; break;
case SwFooterStartNode: nCond = PARA_IN_FOOTER; break;
case SwNormalStartNode: break;
2000-09-18 23:08:29 +00:00
}
}
if( nCond )
{
rTmp.SetCondition( (Master_CollConditions)nCond, 0 );
return sal_True;
2000-09-18 23:08:29 +00:00
}
pSttNd = pSttNd->GetIndex()
INTEGRATION: CWS writercorehandoff (1.22.48); FILE MERGED 2006/07/27 14:39:25 fme 1.22.48.18: RESYNC: (1.26-1.27); FILE MERGED 2006/05/09 10:37:57 fme 1.22.48.17: #i50348# make SwDoc accessible via interfaces 2006/05/08 11:21:11 fme 1.22.48.16: #i50348# Make SwDoc accessible via interfaces 2006/03/17 08:03:39 tra 1.22.48.15: RESYNC: (1.25-1.26); FILE MERGED 2006/01/19 08:50:04 fme 1.22.48.14: #i50348# General cleanup - removed unused header files, functions, members, declarations 2005/12/20 15:09:39 tra 1.22.48.13: RESYNC: (1.24-1.25); FILE MERGED 2005/11/18 14:53:21 fme 1.22.48.12: #i50348# Make SwDoc accessible via interfaces 2005/11/11 07:56:07 fme 1.22.48.11: #i50348# make SwDoc accessible via interfaces 2005/09/13 13:27:52 tra 1.22.48.10: RESYNC: (1.23-1.24); FILE MERGED 2005/07/28 11:55:30 tra 1.22.48.9: RESYNC: (1.22-1.23); FILE MERGED 2005/07/19 06:05:46 fme 1.22.48.8: #i50348# make SwDoc accessible via interfaces 2005/07/13 13:24:19 fme 1.22.48.7: #i50348# Make SwDoc accessible via interfaces 2005/07/05 08:12:39 tra 1.22.48.6: #i50348#make SwDoc interface based 2005/06/24 11:43:17 fme 1.22.48.5: #i50348# Make SwDoc accessible via interfaces 2005/06/22 13:08:12 tra 1.22.48.4: #i50348#toward a interface based SwDoc 2005/06/22 06:40:10 tra 1.22.48.3: #i50348# make SwDoc accessible via interfaces 2005/06/07 14:13:38 fme 1.22.48.2: #i50348# General cleanup - removed unused header files, functions, members, declarations etc. 2005/06/06 09:27:18 tra 1.22.48.1: Unnecessary includes removed #i50348#
2006-08-14 15:05:06 +00:00
? pSttNd->StartOfSectionNode()
2000-09-18 23:08:29 +00:00
: 0;
}
}
{
sal_uInt16 nPos;
2000-09-18 23:08:29 +00:00
const SwOutlineNodes& rOutlNds = rNds.GetOutLineNds();
if( !rOutlNds.empty() )
2000-09-18 23:08:29 +00:00
{
if( !rOutlNds.Seek_Entry( (SwCntntNode*)this, &nPos ) && nPos )
--nPos;
if( nPos < rOutlNds.size() &&
2000-09-18 23:08:29 +00:00
rOutlNds[ nPos ]->GetIndex() < GetIndex() )
{
SwTxtNode* pOutlNd = rOutlNds[ nPos ]->GetTxtNode();
if( pOutlNd->IsOutline())
2000-09-18 23:08:29 +00:00
{
CWS-TOOLING: integrate CWS outlinelevel 2008-12-19 10:32:51 +0100 od r265718 : #i70748# method <SwWW8Writer::StartTOX(..)> - correction for custom to outline style assigned paragraph styles 2008-12-19 09:24:41 +0100 od r265715 : #i70748# method <HandleModifyAtTxtNode(..)> - retrieve former applied list style before potential reset of empty list style due to set outline level 2008-12-17 15:33:57 +0100 hde r265608 : #i97013# 2008-12-17 14:43:42 +0100 od r265603 : #i70748# adjust fix i44177 - adjustment of to outline style assigned paragraph styles only for OOo-Templates. 2008-12-17 12:59:42 +0100 od r265598 : #i70748# method <XMLTextImportHelper::SetStyleAndAttrs(..)> - special handling of OOo 2.x document regarding outline numbering of headings. 2008-12-17 12:45:53 +0100 od r265597 : #i70748# method <HandleModifyAtTxtNode(..)> - correct determination of new and former applied list style 2008-12-17 10:18:41 +0100 od r265581 : #i97312# method <XMLTextNumRuleInfo::Set(..)> - check, if numbering rules instance contains any numbering rule. 2008-12-16 14:34:22 +0100 hde r265542 : #i97013 2008-12-16 14:20:24 +0100 od r265541 : #i70748# adjust documentation of "Which"-ID numbers 2008-12-16 14:19:49 +0100 od r265539 : #i70748# Adjust Attribute-Function-Mapping table due to new attribute 2008-12-16 14:06:24 +0100 od r265538 : #i70748# - Correct handling of to outline style assigned paragraph styles on reset of all paragraph style attributes - WW8 import: Consider refactoring of paragraph style's outline level attribute - NO_NUMBERING define no longer exsits. 2008-12-16 10:37:19 +0100 od r265530 : #i70478# Correction on moving outline paragraph up respectively down in its outline level: - Check also outline paragraph, which are not an outline via a to outline style assigned paragraph style, if action is applicable. 2008-12-16 09:10:13 +0100 hde r265523 : #i97277 2008-12-16 09:09:30 +0100 hde r265522 : #i97277 2008-12-16 09:07:40 +0100 hde r265521 : Added control and purged obsolete id's 2008-12-10 13:09:36 +0100 od r265174 : #i70748# correction of previous fix due to warning-free code 2008-12-10 13:03:30 +0100 od r265172 : #i70748# method <XMLTextImportHelper::SetStyleAndAttrs(..)> - Due to performance issues avoid retrieving outline level value from paragraph's paragraph style for each paragraph. Instead retrieve current outline level value from paragraph, which is the inherited value from its paragraph style, and only when it is needed. 2008-12-09 16:50:36 +0100 ufi r265117 : help 2008-12-09 16:49:50 +0100 ufi r265116 : help 2008-12-09 15:45:05 +0100 od r265107 : #i70748# method <XMLTextImportHelper::SetStyleAndAttrs(..)> - some minor rework and check access to paragraph styles 2008-12-09 15:42:04 +0100 od r265106 : #i70748# adjust name of local variable to avoid hiding of class variable 2008-12-09 15:40:51 +0100 od r265105 : #i70748# correct initialization order 2008-12-09 15:35:07 +0100 od r265101 : #i70748# remove duplicate entry in certain property map 2008-12-09 15:33:39 +0100 od r265100 : #i70748# add end of file token 2008-12-07 15:11:54 +0100 zhaojianwei r264952 : conflicts left not to be resolved when cws rebase 2008-12-04 14:52:21 +0100 zhaojianwei r264846 : CWS-TOOLING: rebase CWS outlinelevel to trunk@264325 (milestone: DEV300:m36) 2008-11-28 03:42:09 +0100 zhaojianwei r264525 : #i70748#: migrate CWS outlinelevel to SVN 2008-11-28 03:41:39 +0100 zhaojianwei r264524 : #i70748#: migrate CWS outlinelevel to SVN 2008-11-28 03:41:11 +0100 zhaojianwei r264523 : #i70748#: migrate CWS outlinelevel to SVN
2009-01-07 11:57:24 +00:00
rTmp.SetCondition( PARA_IN_OUTLINE, pOutlNd->GetAttrOutlineLevel() - 1 );
return sal_True;
2000-09-18 23:08:29 +00:00
}
}
}
}
return sal_False;
2000-09-18 23:08:29 +00:00
}
void SwCntntNode::ChkCondColl()
{
// zur Sicherheit abfragen
if( RES_CONDTXTFMTCOLL == GetFmtColl()->Which() )
{
SwCollCondition aTmp( 0, 0, 0 );
const SwCollCondition* pCColl;
bool bDone = false;
if( IsAnyCondition( aTmp ))
{
pCColl = static_cast<SwConditionTxtFmtColl*>(GetFmtColl())
->HasCondition( aTmp );
if (pCColl)
{
SetCondFmtColl( pCColl->GetTxtFmtColl() );
bDone = true;
}
}
if (!bDone)
2000-09-18 23:08:29 +00:00
{
if( IsTxtNode() && ((SwTxtNode*)this)->GetNumRule())
2000-09-18 23:08:29 +00:00
{
// steht in einer Numerierung
// welcher Level?
aTmp.SetCondition( PARA_IN_LIST,
((SwTxtNode*)this)->GetActualListLevel() );
2000-09-18 23:08:29 +00:00
pCColl = ((SwConditionTxtFmtColl*)GetFmtColl())->
HasCondition( aTmp );
}
else
pCColl = 0;
if( pCColl )
SetCondFmtColl( pCColl->GetTxtFmtColl() );
else if( pCondColl )
SetCondFmtColl( 0 );
}
}
}
2011-02-02 20:41:40 +09:00
// #i42921#
short SwCntntNode::GetTextDirection( const SwPosition& rPos,
const Point* pPt ) const
{
short nRet = -1;
Point aPt;
if( pPt )
aPt = *pPt;
2011-02-02 20:41:40 +09:00
// #i72024# - No format of the frame, because this can cause recursive layout actions
SwFrm* pFrm = getLayoutFrm( GetDoc()->GetCurrentLayout(), &aPt, &rPos, sal_False );
if ( pFrm )
{
if ( pFrm->IsVertical() )
{
if ( pFrm->IsRightToLeft() )
nRet = FRMDIR_VERT_TOP_LEFT;
else
nRet = FRMDIR_VERT_TOP_RIGHT;
}
else
{
if ( pFrm->IsRightToLeft() )
nRet = FRMDIR_HORI_RIGHT_TOP;
else
nRet = FRMDIR_HORI_LEFT_TOP;
}
}
return nRet;
}
SwOLENodes* SwCntntNode::CreateOLENodesArray( const SwFmtColl& rColl, bool bOnlyWithInvalidSize )
{
SwOLENodes *pNodes = 0;
SwIterator<SwCntntNode,SwFmtColl> aIter( rColl );
for( SwCntntNode* pNd = aIter.First(); pNd; pNd = aIter.Next() )
{
SwOLENode *pONd = pNd->GetOLENode();
if ( pONd && (!bOnlyWithInvalidSize || pONd->IsOLESizeInvalid()) )
{
if ( !pNodes )
pNodes = new SwOLENodes;
pNodes->push_back( pONd );
}
}
return pNodes;
}
INTEGRATION: CWS writercorehandoff (1.22.48); FILE MERGED 2006/07/27 14:39:25 fme 1.22.48.18: RESYNC: (1.26-1.27); FILE MERGED 2006/05/09 10:37:57 fme 1.22.48.17: #i50348# make SwDoc accessible via interfaces 2006/05/08 11:21:11 fme 1.22.48.16: #i50348# Make SwDoc accessible via interfaces 2006/03/17 08:03:39 tra 1.22.48.15: RESYNC: (1.25-1.26); FILE MERGED 2006/01/19 08:50:04 fme 1.22.48.14: #i50348# General cleanup - removed unused header files, functions, members, declarations 2005/12/20 15:09:39 tra 1.22.48.13: RESYNC: (1.24-1.25); FILE MERGED 2005/11/18 14:53:21 fme 1.22.48.12: #i50348# Make SwDoc accessible via interfaces 2005/11/11 07:56:07 fme 1.22.48.11: #i50348# make SwDoc accessible via interfaces 2005/09/13 13:27:52 tra 1.22.48.10: RESYNC: (1.23-1.24); FILE MERGED 2005/07/28 11:55:30 tra 1.22.48.9: RESYNC: (1.22-1.23); FILE MERGED 2005/07/19 06:05:46 fme 1.22.48.8: #i50348# make SwDoc accessible via interfaces 2005/07/13 13:24:19 fme 1.22.48.7: #i50348# Make SwDoc accessible via interfaces 2005/07/05 08:12:39 tra 1.22.48.6: #i50348#make SwDoc interface based 2005/06/24 11:43:17 fme 1.22.48.5: #i50348# Make SwDoc accessible via interfaces 2005/06/22 13:08:12 tra 1.22.48.4: #i50348#toward a interface based SwDoc 2005/06/22 06:40:10 tra 1.22.48.3: #i50348# make SwDoc accessible via interfaces 2005/06/07 14:13:38 fme 1.22.48.2: #i50348# General cleanup - removed unused header files, functions, members, declarations etc. 2005/06/06 09:27:18 tra 1.22.48.1: Unnecessary includes removed #i50348#
2006-08-14 15:05:06 +00:00
/*
* Document Interface Access
*/
const IDocumentSettingAccess* SwNode::getIDocumentSettingAccess() const { return GetDoc(); }
const IDocumentDeviceAccess* SwNode::getIDocumentDeviceAccess() const { return GetDoc(); }
CWS-TOOLING: integrate CWS swrefactormarks2 2009-04-09 12:51:41 +0200 b_michaelsen r270689 : #i94949# cleaned up assertions after rebasing 2009-04-08 17:37:08 +0200 b_michaelsen r270658 : fixing sw/source/ui/utlui/makefile.mk 2009-04-07 17:56:54 +0200 b_michaelsen r270606 : added bookctrl.cxx to EXCEPTIONFILES, because this is needed for stl on unxsols4 2009-04-07 17:05:20 +0200 b_michaelsen r270603 : added crbm.cxx to EXCEPTIONFILES, because this is needed for stl on unxsols4 2009-04-02 23:44:38 +0200 b_michaelsen r270436 : CWS-TOOLING: rebase CWS swrefactormarks2 to trunk@270033 (milestone: DEV300:m45) 2009-02-27 16:25:31 +0100 b_michaelsen r268606 : #i94949# fixed Windows buildbreaker 2009-02-25 18:01:13 +0100 b_michaelsen r268464 : #i94949# Bookmarktest document filter roundtrips 2009-02-24 18:23:55 +0100 b_michaelsen r268404 : #i94949# Bookmark unittests 2009-02-23 19:47:44 +0100 b_michaelsen r268370 : #i94949# added unittest for bookmarks 2009-02-23 12:22:07 +0100 b_michaelsen r268348 : #i94949# fixing CheckCrossReferences testcase 2009-02-20 18:12:50 +0100 b_michaelsen r268335 : #i94949# fixing SwXTextRange 2009-02-18 18:32:57 +0100 b_michaelsen r268252 : #i94949# deregistering DdeBookmarks on delete 2009-02-18 18:29:08 +0100 b_michaelsen r268251 : fixing dbgoutsw.cxx for debug builds 2009-02-16 18:42:43 +0100 b_michaelsen r267834 : CWS-TOOLING: rebase CWS swrefactormarks2 to trunk@267171 (milestone: DEV300:m41) 2009-02-12 15:32:02 +0100 b_michaelsen r267667 : #i94949 fixed crossrefbookmark naming 2009-02-11 18:30:08 +0100 b_michaelsen r267624 : #94949# fixing bookmark navigation 2009-02-11 13:55:26 +0100 b_michaelsen r267599 : #i94949# fixed bookmark naming 2009-02-10 17:53:05 +0100 b_michaelsen r267571 : #i94949# renamed HasOtherMarkPos to IsExpanded 2009-02-10 17:23:01 +0100 b_michaelsen r267564 : #i94949# renamed ::sw::bookmark namespace to more fitting ::sw::mark 2009-02-10 16:16:32 +0100 b_michaelsen r267553 : #i94949# creating only CrossRefBookmark per Txtnode 2009-02-10 12:14:05 +0100 b_michaelsen r267547 : #i94949# fixed bookmark count in navigator 2009-02-09 19:12:18 +0100 b_michaelsen r267532 : #i94949# lcl_CopyBookmarks(..) - handle marks on boundaries correctly 2009-02-09 17:32:45 +0100 b_michaelsen r267524 : #i94949# setting the refobject of the DdeBookmark in Sin SwServerObject::SetDdeBookmark(..) 2009-02-09 17:22:15 +0100 b_michaelsen r267523 : #i94949# trying to harden SwServerObject 2009-02-09 16:47:32 +0100 b_michaelsen r267521 : #i94949# lcl_CopyBookmarks(..): try to get the source mark name, if possible 2009-02-09 16:05:42 +0100 b_michaelsen r267519 : #i94949# clearing the OtherMarkPos if PaM has no mark in repositionMark(..), swapping inverted bookmarks without hissing an assertion 2009-02-09 15:55:38 +0100 b_michaelsen r267518 : #i94949# checking for out-of-bounds in SwView::ExecuteStatusLine(..) 2009-02-09 15:23:47 +0100 b_michaelsen r267517 : #i94949# using an UNO_BOOKMARK in ui/dbui/dbinsdlg.cxx 2009-02-09 14:14:47 +0100 b_michaelsen r267514 : #i94949# IDocumentMarkAccess::GetType(..) asserts on unknown type 2009-02-09 14:04:25 +0100 b_michaelsen r267513 : #i94949# using rtl strings instead of tools-strings in CrossRefBookmarks 2009-02-09 13:55:01 +0100 b_michaelsen r267510 : #i94949# using empty string for UnoMark construction 2009-02-09 13:46:46 +0100 b_michaelsen r267509 : #i94949# removed superfluous #includes, removed superfluous member DdeBookmark::bGenerateName, initialized DdeBookmark::m_aRefObj removed superfluous local _FindItem::ClearObj 2009-02-06 14:38:37 +0100 b_michaelsen r267462 : #i94949# fixing FN_STAT_BOOKMARK dispatches 2009-02-05 18:05:07 +0100 b_michaelsen r267436 : #i94949# removing superfluous #includes 2009-02-04 15:51:31 +0100 b_michaelsen r267391 : fixing resync merge error 2009-02-02 19:39:55 +0100 b_michaelsen r267294 : #i94949# bookmark performance 2009-01-30 19:30:51 +0100 b_michaelsen r267229 : #i94949# throwing IllegalArgumentException, if appropriate 2009-01-30 19:29:56 +0100 b_michaelsen r267228 : #i94949# refactored lcl_FillBookmarkArray, comments, constness 2009-01-30 19:23:49 +0100 b_michaelsen r267227 : #i94949# refactored lcl_FillBookmarkArray, comments, constness 2009-01-30 19:16:06 +0100 b_michaelsen r267226 : #i94949# refactored lcl_FillBookmarkArray 2009-01-30 17:59:27 +0100 b_michaelsen r267222 : #i94949# removed superficial #include 2009-01-30 17:50:02 +0100 b_michaelsen r267220 : #i94949# SwXTextRange remembers its UNO bookmark 2009-01-29 20:19:58 +0100 b_michaelsen r267168 : #i94949# implemented IDocumentMarkAccess::findBookmark 2009-01-29 17:22:17 +0100 b_michaelsen r267162 : #i94949# implemented renameMark in Markmanager 2009-01-29 14:17:10 +0100 b_michaelsen r267134 : #i94949# cleanup in SwXBookmark, whitespace 2009-01-29 13:21:54 +0100 b_michaelsen r267125 : #i94949# cleanup in SwXBookmark, whitespace 2009-01-29 13:06:10 +0100 b_michaelsen r267120 : #i94949# cleanup in SwXBookmark, whitespace 2009-01-29 13:00:09 +0100 b_michaelsen r267118 : #i94949# cleanup in SwXBookmark, whitespace 2009-01-29 10:35:10 +0100 b_michaelsen r267101 : #i94949# renamed SetCrsrToBkmk to SetCrsrToMark, moving to start/end of doc if no more bookmarks can be found 2009-01-28 17:05:36 +0100 b_michaelsen r267070 : #i94949# fixed order in aProvNamesId in unocoll.cxx 2009-01-28 15:46:13 +0100 b_michaelsen r267063 : #i94949# documentation 2009-01-28 15:36:59 +0100 b_michaelsen r267062 : #i94949# removing superficial #include 2009-01-28 15:30:36 +0100 b_michaelsen r267061 : #i94949# basic code conventions 2009-01-28 11:14:30 +0100 b_michaelsen r267039 : #i94949# comparing to the actual name of the new mark 2009-01-26 15:22:25 +0100 b_michaelsen r266927 : #i94949# performance fixes 2009-01-14 21:16:56 +0100 b_michaelsen r266332 : #i94949# fixing linux x86-64 compiler warnings 2009-01-14 19:52:06 +0100 b_michaelsen r266331 : #i94949# fixing some compiler warnings 2008-12-15 13:04:49 +0100 b_michaelsen r265474 : #i94949# fixed microsoft compiler warnings 2008-12-12 18:26:02 +0100 b_michaelsen r265434 : #i94949# fixed pro platform buildbreakers 2008-12-11 17:51:24 +0100 b_michaelsen r265342 : CWS-TOOLING: rebase CWS swrefactormarks2 to trunk@264807 (milestone: DEV300:m37) 2008-12-09 18:30:59 +0100 b_michaelsen r265134 : #i94949# fixed IDocumentMarkAccess::GetType for new mark inheritance tree 2008-12-09 16:56:26 +0100 b_michaelsen r265118 : #i94949# fixed deleteMark optimization 2008-12-09 14:55:58 +0100 b_michaelsen r265092 : #i94949# DdeLink and DdeBookmark 2008-12-05 18:28:05 +0100 b_michaelsen r264914 : #i94949# fixed InitDoc in bookmarks 2008-12-02 02:23:51 +0100 b_michaelsen r264649 : #i94949# removed obsolete naming proposal code in SwXTextRange, fixed navigator reminders to forget the oldest reminder when the pool is empty 2008-12-02 02:05:19 +0100 b_michaelsen r264648 : #i94949# using bisect search for delete 2008-12-02 01:58:16 +0100 b_michaelsen r264647 : #i94949# using bisect search for delete 2008-12-02 01:37:33 +0100 b_michaelsen r264646 : #i94949# using bisect search for delete 2008-12-02 01:03:29 +0100 b_michaelsen r264645 : #i94949# fixed deleteMark crash 2008-12-01 20:55:00 +0100 b_michaelsen r264638 : #i94949# removed crossrefs from ui enumerations 2008-12-01 15:48:12 +0100 b_michaelsen r264613 : #i94949# removed superfluous local functions 2008-12-01 15:01:19 +0100 b_michaelsen r264608 : #i94949# optimized insertion of new marks 2008-12-01 14:33:21 +0100 b_michaelsen r264603 : #i94949# simplified code finding Fieldmark for a position 2008-12-01 14:05:55 +0100 b_michaelsen r264598 : #i94949# fixed reverse travelling through marks, removed obsolete getUniqueMarkName() 2008-11-27 18:48:15 +0100 b_michaelsen r264515 : #i94949# fixed _SaveCntntIdx and friends 2008-11-27 15:59:49 +0100 b_michaelsen r264500 : #i94949# fix Mark position only in ctor 2008-11-27 15:52:28 +0100 b_michaelsen r264497 : #i94949# fixed Bug in SwXBookmark, was using pDoc too early 2008-11-26 14:54:22 +0100 b_michaelsen r264396 : #i94949# fixed documentation, simplified navigator reminder code 2008-11-24 20:45:51 +0100 b_michaelsen r264266 : #i94949# removed last obsolete getUniqueMarkName calls 2008-11-24 20:21:35 +0100 b_michaelsen r264265 : #i94949# fixed typo in IDocumentMarkAccess, removed obsolete getUniqueMarkName calls 2008-11-24 18:34:32 +0100 b_michaelsen r264264 : #i94949# repositioning of Marks, removed possibility to delete marks by name in the core, refactoring of navigator reminder generation 2008-11-21 14:08:49 +0100 b_michaelsen r264137 : #i94949# simplified makeMark 2008-11-21 12:07:09 +0100 b_michaelsen r264120 : #i94949# moved ShortName and KeyCode from IMark to IBookmark 2008-11-19 12:50:49 +0100 b_michaelsen r263981 : #i94949# starting refactoring of bookmark naming 2008-11-19 11:31:08 +0100 b_michaelsen r263972 : #i94949# getting rid of obsolete dynamic casts 2008-11-18 19:06:09 +0100 b_michaelsen r263795 : #i94949# getting rid of index based mark access, IDocumentMarkAccess already provides iterators 2008-11-18 17:50:18 +0100 b_michaelsen r263792 : #i94949# getting rid of index based mark access, IDocumentMarkAccess already provides iterators 2008-11-18 16:48:20 +0100 b_michaelsen r263783 : #i94949# removed methods from crsrsh which are already available directly via IDocumentMarkAccess 2008-11-18 11:31:35 +0100 b_michaelsen r263753 : #i94949# cleaning up mark code in crsrsh 2008-11-17 10:15:25 +0100 b_michaelsen r263705 : #i94949# removed possible integer overflow 2008-11-14 18:48:45 +0100 b_michaelsen r263695 : #i94949# management of mark names in MarkManager 2008-11-14 18:23:40 +0100 b_michaelsen r263693 : #i94949# using polymorphism to do mark-specific setup in SwDoc 2008-11-14 16:27:09 +0100 b_michaelsen r263684 : #i94949# got rid of makeCrossRefBookmark 2008-11-14 13:03:32 +0100 b_michaelsen r263674 : #i94949# refactored Correction methods 2008-11-13 12:27:55 +0100 b_michaelsen r263631 : #i94949# got rid of old-style tools assertions in new code 2008-11-12 16:58:16 +0100 b_michaelsen r263608 : #i94949# added assertion for unique names 2008-11-12 16:55:18 +0100 b_michaelsen r263607 : #i94949# maked XFormField deprecated 2008-11-12 13:04:29 +0100 b_michaelsen r263587 : #i94949# replaced IDocumentMarkAccess::GetType with simple dynamic_cast where possible 2008-11-11 18:45:53 +0100 b_michaelsen r263572 : #i94949# cleaned up SwHstryBookmark 2008-11-11 13:48:18 +0100 b_michaelsen r263557 : #i94949# removed dynamic_casts to SwModify by inheriting IMark from it 2008-11-11 11:26:28 +0100 b_michaelsen r263548 : #i94949# fixed SwXBookmark 2008-11-10 17:01:19 +0100 b_michaelsen r263529 : #i94949# fixed DdeBookmarks in clipboard 2008-11-10 16:44:52 +0100 b_michaelsen r263527 : #i94949# formatting 2008-11-10 16:29:16 +0100 b_michaelsen r263526 : #i94949# fixing unoobj.cxx 2008-11-10 16:23:50 +0100 b_michaelsen r263525 : #i94949# cleaning up crossrefbookmark.cxx/.hxx 2008-11-10 16:02:08 +0100 b_michaelsen r263524 : #i94949# Pdf Export should only generate 'real' bookmarks 2008-11-10 15:33:58 +0100 b_michaelsen r263521 : #i94949# removed const_casts 2008-11-10 15:12:06 +0100 b_michaelsen r263520 : #i94949# moved _DelBookmarks into MarksManager 2008-11-07 18:48:38 +0100 b_michaelsen r263480 : #i94949# using iterator interface 2008-11-07 18:41:46 +0100 b_michaelsen r263478 : #i94949# using iterator interface 2008-11-07 18:07:41 +0100 b_michaelsen r263477 : #i94949# using iterator interface 2008-11-07 17:54:41 +0100 b_michaelsen r263476 : #i94949# using iterator interface 2008-11-07 17:44:41 +0100 b_michaelsen r263475 : #i94949# moved correction methods into MarkManager 2008-11-06 18:47:28 +0100 b_michaelsen r263404 : #i94949# getting rid of superfluous const_casts 2008-11-06 17:58:01 +0100 b_michaelsen r263403 : #i94949# no more setting of mark positions outside of the core 2008-11-06 17:08:37 +0100 b_michaelsen r263401 : #i94949# removed setters from IMark 2008-11-06 13:55:25 +0100 b_michaelsen r263383 : #i94949 SwDoc does not implement IDocumentMarkAccess anymore 2008-11-04 18:17:03 +0100 b_michaelsen r263333 : #i94949# began removing IDocumentMarkAccess from SwDoc 2008-11-04 16:48:34 +0100 b_michaelsen r263330 : removing dead code (SwBitArray) found by mst 2008-11-04 16:29:32 +0100 b_michaelsen r263329 : removing dead code (SwBitArray) found by mst 2008-11-04 14:57:48 +0100 b_michaelsen r263326 : removing dead code (SwBitArray) found by mst 2008-11-04 14:50:18 +0100 b_michaelsen r263325 : #i94949# stricter typing in IDocumentMarkAccess 2008-10-24 15:16:27 +0200 b_michaelsen r262647 : #i94949# renamed ::sw::bookmark::SimpleMark to NavigatorReminder to fit the IDocumentMarkAccess enum 2008-10-24 15:10:10 +0200 b_michaelsen r262646 : #i94949# only 'real' bookmark implement IBookmark, Marks also get removed from m_vFieldmarks on delete/clear 2008-10-24 13:06:23 +0200 b_michaelsen r262636 : #i94949# Fieldmark tabnavigation 2008-10-23 12:16:36 +0200 b_michaelsen r262619 : #i94949# Fieldmark classes and filters 2008-10-22 13:17:18 +0200 b_michaelsen r262597 : #i94949# writer import fixes 2008-10-21 11:30:38 +0200 b_michaelsen r262565 : #i94949# renamed methods containing Bookmark in the generic IMark interface 2008-10-20 14:09:02 +0200 b_michaelsen r262318 : #i94949# fixed SwDoc::CorrRel 2008-10-16 22:45:13 +0200 b_michaelsen r262273 : #i94949 simplified Before/After methods 2008-10-16 21:40:57 +0200 b_michaelsen r262271 : #i94949 renamed SimpleMark to NavigatorReminder 2008-10-16 21:15:23 +0200 b_michaelsen r262270 : #i94949 using shared_ptr only in MarkManager 2008-10-16 17:46:37 +0200 b_michaelsen r262269 : #i94949# getFieldmarkBefore and getFieldmarkAfter 2008-10-16 17:12:13 +0200 b_michaelsen r262265 : #i94949# cleanup in crbm.cxx 2008-10-16 12:49:01 +0200 b_michaelsen r262257 : #i94949# fixed usage of invalid iterator, fixed invalid cast 2008-10-15 15:34:20 +0200 b_michaelsen r262239 : #i94949# added moved files 2008-10-15 15:26:45 +0200 b_michaelsen r262237 : #i94949# initial reimplementation of Bookmarks
2009-04-21 15:40:02 +00:00
const IDocumentMarkAccess* SwNode::getIDocumentMarkAccess() const { return GetDoc()->getIDocumentMarkAccess(); }
INTEGRATION: CWS writercorehandoff (1.22.48); FILE MERGED 2006/07/27 14:39:25 fme 1.22.48.18: RESYNC: (1.26-1.27); FILE MERGED 2006/05/09 10:37:57 fme 1.22.48.17: #i50348# make SwDoc accessible via interfaces 2006/05/08 11:21:11 fme 1.22.48.16: #i50348# Make SwDoc accessible via interfaces 2006/03/17 08:03:39 tra 1.22.48.15: RESYNC: (1.25-1.26); FILE MERGED 2006/01/19 08:50:04 fme 1.22.48.14: #i50348# General cleanup - removed unused header files, functions, members, declarations 2005/12/20 15:09:39 tra 1.22.48.13: RESYNC: (1.24-1.25); FILE MERGED 2005/11/18 14:53:21 fme 1.22.48.12: #i50348# Make SwDoc accessible via interfaces 2005/11/11 07:56:07 fme 1.22.48.11: #i50348# make SwDoc accessible via interfaces 2005/09/13 13:27:52 tra 1.22.48.10: RESYNC: (1.23-1.24); FILE MERGED 2005/07/28 11:55:30 tra 1.22.48.9: RESYNC: (1.22-1.23); FILE MERGED 2005/07/19 06:05:46 fme 1.22.48.8: #i50348# make SwDoc accessible via interfaces 2005/07/13 13:24:19 fme 1.22.48.7: #i50348# Make SwDoc accessible via interfaces 2005/07/05 08:12:39 tra 1.22.48.6: #i50348#make SwDoc interface based 2005/06/24 11:43:17 fme 1.22.48.5: #i50348# Make SwDoc accessible via interfaces 2005/06/22 13:08:12 tra 1.22.48.4: #i50348#toward a interface based SwDoc 2005/06/22 06:40:10 tra 1.22.48.3: #i50348# make SwDoc accessible via interfaces 2005/06/07 14:13:38 fme 1.22.48.2: #i50348# General cleanup - removed unused header files, functions, members, declarations etc. 2005/06/06 09:27:18 tra 1.22.48.1: Unnecessary includes removed #i50348#
2006-08-14 15:05:06 +00:00
const IDocumentRedlineAccess* SwNode::getIDocumentRedlineAccess() const { return GetDoc(); }
const IDocumentStylePoolAccess* SwNode::getIDocumentStylePoolAccess() const { return GetDoc(); }
const IDocumentLineNumberAccess* SwNode::getIDocumentLineNumberAccess() const { return GetDoc(); }
const IDocumentDrawModelAccess* SwNode::getIDocumentDrawModelAccess() const { return GetDoc(); }
const IDocumentLayoutAccess* SwNode::getIDocumentLayoutAccess() const { return GetDoc(); }
IDocumentLayoutAccess* SwNode::getIDocumentLayoutAccess() { return GetDoc(); }
const IDocumentLinksAdministration* SwNode::getIDocumentLinksAdministration() const { return GetDoc(); }
IDocumentLinksAdministration* SwNode::getIDocumentLinksAdministration() { return GetDoc(); }
const IDocumentFieldsAccess* SwNode::getIDocumentFieldsAccess() const { return GetDoc(); }
IDocumentFieldsAccess* SwNode::getIDocumentFieldsAccess() { return GetDoc(); }
IDocumentContentOperations* SwNode::getIDocumentContentOperations() { return GetDoc(); }
IStyleAccess& SwNode::getIDocumentStyleAccess() { return GetDoc()->GetIStyleAccess(); }
2011-02-02 20:41:40 +09:00
// #i83479#
IDocumentListItems& SwNode::getIDocumentListItems()
{
return *GetDoc();
}
INTEGRATION: CWS writercorehandoff (1.22.48); FILE MERGED 2006/07/27 14:39:25 fme 1.22.48.18: RESYNC: (1.26-1.27); FILE MERGED 2006/05/09 10:37:57 fme 1.22.48.17: #i50348# make SwDoc accessible via interfaces 2006/05/08 11:21:11 fme 1.22.48.16: #i50348# Make SwDoc accessible via interfaces 2006/03/17 08:03:39 tra 1.22.48.15: RESYNC: (1.25-1.26); FILE MERGED 2006/01/19 08:50:04 fme 1.22.48.14: #i50348# General cleanup - removed unused header files, functions, members, declarations 2005/12/20 15:09:39 tra 1.22.48.13: RESYNC: (1.24-1.25); FILE MERGED 2005/11/18 14:53:21 fme 1.22.48.12: #i50348# Make SwDoc accessible via interfaces 2005/11/11 07:56:07 fme 1.22.48.11: #i50348# make SwDoc accessible via interfaces 2005/09/13 13:27:52 tra 1.22.48.10: RESYNC: (1.23-1.24); FILE MERGED 2005/07/28 11:55:30 tra 1.22.48.9: RESYNC: (1.22-1.23); FILE MERGED 2005/07/19 06:05:46 fme 1.22.48.8: #i50348# make SwDoc accessible via interfaces 2005/07/13 13:24:19 fme 1.22.48.7: #i50348# Make SwDoc accessible via interfaces 2005/07/05 08:12:39 tra 1.22.48.6: #i50348#make SwDoc interface based 2005/06/24 11:43:17 fme 1.22.48.5: #i50348# Make SwDoc accessible via interfaces 2005/06/22 13:08:12 tra 1.22.48.4: #i50348#toward a interface based SwDoc 2005/06/22 06:40:10 tra 1.22.48.3: #i50348# make SwDoc accessible via interfaces 2005/06/07 14:13:38 fme 1.22.48.2: #i50348# General cleanup - removed unused header files, functions, members, declarations etc. 2005/06/06 09:27:18 tra 1.22.48.1: Unnecessary includes removed #i50348#
2006-08-14 15:05:06 +00:00
sal_Bool SwNode::IsInRedlines() const
{
const SwDoc * pDoc = GetDoc();
sal_Bool bResult = sal_False;
2000-09-18 23:08:29 +00:00
if (pDoc != NULL)
bResult = pDoc->IsInRedlines(*this);
2000-09-18 23:08:29 +00:00
return bResult;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */