2000-09-18 23:08:29 +00:00
|
|
|
/*************************************************************************
|
|
|
|
*
|
2008-04-10 12:46:05 +00:00
|
|
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
2000-09-18 23:08:29 +00:00
|
|
|
*
|
2008-04-10 12:46:05 +00:00
|
|
|
* Copyright 2008 by Sun Microsystems, Inc.
|
2000-09-18 23:08:29 +00:00
|
|
|
*
|
2008-04-10 12:46:05 +00:00
|
|
|
* OpenOffice.org - a multi-platform office productivity suite
|
2000-09-18 23:08:29 +00:00
|
|
|
*
|
2008-04-10 12:46:05 +00:00
|
|
|
* $RCSfile: edglbldc.cxx,v $
|
|
|
|
* $Revision: 1.9 $
|
2000-09-18 23:08:29 +00:00
|
|
|
*
|
2008-04-10 12:46:05 +00:00
|
|
|
* This file is part of OpenOffice.org.
|
2000-09-18 23:08:29 +00:00
|
|
|
*
|
2008-04-10 12:46:05 +00:00
|
|
|
* OpenOffice.org is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU Lesser General Public License version 3
|
|
|
|
* only, as published by the Free Software Foundation.
|
2000-09-18 23:08:29 +00:00
|
|
|
*
|
2008-04-10 12:46:05 +00:00
|
|
|
* OpenOffice.org is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU Lesser General Public License version 3 for more details
|
|
|
|
* (a copy is included in the LICENSE file that accompanied this code).
|
2000-09-18 23:08:29 +00:00
|
|
|
*
|
2008-04-10 12:46:05 +00:00
|
|
|
* You should have received a copy of the GNU Lesser General Public License
|
|
|
|
* version 3 along with OpenOffice.org. If not, see
|
|
|
|
* <http://www.openoffice.org/license.html>
|
|
|
|
* for a copy of the LGPLv3 License.
|
2000-09-18 23:08:29 +00:00
|
|
|
*
|
|
|
|
************************************************************************/
|
|
|
|
|
2006-09-16 20:06:11 +00:00
|
|
|
// MARKER(update_precomp.py): autogen include statement, do not remove
|
|
|
|
#include "precompiled_sw.hxx"
|
|
|
|
|
2000-09-18 23:08:29 +00:00
|
|
|
|
|
|
|
#include <doc.hxx>
|
|
|
|
#include <editsh.hxx>
|
|
|
|
#include <pam.hxx>
|
|
|
|
#include <ndtxt.hxx>
|
|
|
|
#include <docary.hxx>
|
|
|
|
#include <swwait.hxx>
|
|
|
|
#include <swundo.hxx> // fuer die UndoIds
|
|
|
|
#include <section.hxx>
|
|
|
|
#include <doctxm.hxx>
|
|
|
|
#include <edglbldc.hxx>
|
|
|
|
|
|
|
|
|
|
|
|
SV_IMPL_OP_PTRARR_SORT( SwGlblDocContents, SwGlblDocContentPtr )
|
|
|
|
|
|
|
|
BOOL SwEditShell::IsGlobalDoc() const
|
|
|
|
{
|
2006-08-14 15:08:42 +00:00
|
|
|
return getIDocumentSettingAccess()->get(IDocumentSettingAccess::GLOBAL_DOCUMENT);
|
2000-09-18 23:08:29 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void SwEditShell::SetGlblDocSaveLinks( BOOL bFlag )
|
|
|
|
{
|
2006-08-14 15:08:42 +00:00
|
|
|
getIDocumentSettingAccess()->set(IDocumentSettingAccess::GLOBAL_DOCUMENT_SAVE_LINKS, bFlag);
|
2000-09-18 23:08:29 +00:00
|
|
|
if( !GetDoc()->IsModified() ) // Bug 57028
|
|
|
|
GetDoc()->SetUndoNoResetModified();
|
|
|
|
GetDoc()->SetModified();
|
|
|
|
}
|
|
|
|
|
|
|
|
BOOL SwEditShell::IsGlblDocSaveLinks() const
|
|
|
|
{
|
2006-08-14 15:08:42 +00:00
|
|
|
return getIDocumentSettingAccess()->get(IDocumentSettingAccess::GLOBAL_DOCUMENT_SAVE_LINKS);
|
2000-09-18 23:08:29 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
USHORT SwEditShell::GetGlobalDocContent( SwGlblDocContents& rArr ) const
|
|
|
|
{
|
|
|
|
if( rArr.Count() )
|
|
|
|
rArr.DeleteAndDestroy( 0, rArr.Count() );
|
|
|
|
|
2006-08-14 15:08:42 +00:00
|
|
|
if( !getIDocumentSettingAccess()->get(IDocumentSettingAccess::GLOBAL_DOCUMENT) )
|
2000-09-18 23:08:29 +00:00
|
|
|
return 0;
|
|
|
|
|
|
|
|
// dann alle gelinkten Bereiche auf der obersten Ebene
|
2007-09-27 07:45:27 +00:00
|
|
|
SwDoc* pMyDoc = GetDoc();
|
|
|
|
const SwSectionFmts& rSectFmts = pMyDoc->GetSections();
|
2003-12-01 16:03:23 +00:00
|
|
|
USHORT n;
|
|
|
|
|
|
|
|
for( n = rSectFmts.Count(); n; )
|
2000-09-18 23:08:29 +00:00
|
|
|
{
|
|
|
|
const SwSection* pSect = rSectFmts[ --n ]->GetGlobalDocSection();
|
|
|
|
if( pSect )
|
|
|
|
{
|
|
|
|
SwGlblDocContentPtr pNew;
|
|
|
|
switch( pSect->GetType() )
|
|
|
|
{
|
|
|
|
case TOX_HEADER_SECTION: break; // ignore
|
|
|
|
case TOX_CONTENT_SECTION:
|
|
|
|
ASSERT( pSect->ISA( SwTOXBaseSection ), "keine TOXBaseSection!" );
|
|
|
|
pNew = new SwGlblDocContent( (SwTOXBaseSection*)pSect );
|
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
|
|
|
pNew = new SwGlblDocContent( pSect );
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
if( !rArr.Insert( pNew ) )
|
|
|
|
delete pNew;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// und als letztes die Dummies (sonstiger Text) einfuegen
|
|
|
|
SwNode* pNd;
|
2007-09-27 07:45:27 +00:00
|
|
|
ULONG nSttIdx = pMyDoc->GetNodes().GetEndOfExtras().GetIndex() + 2;
|
2000-09-18 23:08:29 +00:00
|
|
|
for( n = 0; n < rArr.Count(); ++n )
|
|
|
|
{
|
|
|
|
const SwGlblDocContent& rNew = *rArr[ n ];
|
|
|
|
// suche von StartPos bis rNew.DocPos nach einem Content Node.
|
|
|
|
// Existiert dieser, so muss ein DummyEintrag eingefuegt werden.
|
|
|
|
for( ; nSttIdx < rNew.GetDocPos(); ++nSttIdx )
|
2007-09-27 07:45:27 +00:00
|
|
|
if( ( pNd = pMyDoc->GetNodes()[ nSttIdx ])->IsCntntNode()
|
2000-09-18 23:08:29 +00:00
|
|
|
|| pNd->IsSectionNode() || pNd->IsTableNode() )
|
|
|
|
{
|
|
|
|
SwGlblDocContentPtr pNew = new SwGlblDocContent( nSttIdx );
|
|
|
|
if( !rArr.Insert( pNew ) )
|
|
|
|
delete pNew;
|
|
|
|
else
|
|
|
|
++n; // auf die naechste Position
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
// StartPosition aufs Ende setzen
|
2007-09-27 07:45:27 +00:00
|
|
|
nSttIdx = pMyDoc->GetNodes()[ rNew.GetDocPos() ]->EndOfSectionIndex();
|
2000-09-18 23:08:29 +00:00
|
|
|
++nSttIdx;
|
|
|
|
}
|
|
|
|
|
|
|
|
// sollte man das Ende auch noch setzen??
|
|
|
|
if( rArr.Count() )
|
|
|
|
{
|
2007-09-27 07:45:27 +00:00
|
|
|
ULONG nNdEnd = pMyDoc->GetNodes().GetEndOfContent().GetIndex();
|
2000-09-18 23:08:29 +00:00
|
|
|
for( ; nSttIdx < nNdEnd; ++nSttIdx )
|
2007-09-27 07:45:27 +00:00
|
|
|
if( ( pNd = pMyDoc->GetNodes()[ nSttIdx ])->IsCntntNode()
|
2000-09-18 23:08:29 +00:00
|
|
|
|| pNd->IsSectionNode() || pNd->IsTableNode() )
|
|
|
|
{
|
|
|
|
SwGlblDocContentPtr pNew = new SwGlblDocContent( nSttIdx );
|
|
|
|
if( !rArr.Insert( pNew ) )
|
|
|
|
delete pNew;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
SwGlblDocContentPtr pNew = new SwGlblDocContent(
|
2007-09-27 07:45:27 +00:00
|
|
|
pMyDoc->GetNodes().GetEndOfExtras().GetIndex() + 2 );
|
2000-09-18 23:08:29 +00:00
|
|
|
rArr.Insert( pNew );
|
|
|
|
}
|
|
|
|
return rArr.Count();
|
|
|
|
}
|
|
|
|
|
|
|
|
BOOL SwEditShell::InsertGlobalDocContent( const SwGlblDocContent& rInsPos,
|
|
|
|
const SwSection& rNew )
|
|
|
|
{
|
2006-08-14 15:08:42 +00:00
|
|
|
if( !getIDocumentSettingAccess()->get(IDocumentSettingAccess::GLOBAL_DOCUMENT) )
|
2000-09-18 23:08:29 +00:00
|
|
|
return FALSE;
|
|
|
|
|
|
|
|
SET_CURR_SHELL( this );
|
|
|
|
StartAllAction();
|
|
|
|
|
|
|
|
SwPaM* pCrsr = GetCrsr();
|
|
|
|
if( pCrsr->GetNext() != pCrsr || IsTableMode() )
|
|
|
|
ClearMark();
|
|
|
|
|
|
|
|
SwPosition& rPos = *pCrsr->GetPoint();
|
|
|
|
rPos.nNode = rInsPos.GetDocPos();
|
|
|
|
|
|
|
|
BOOL bEndUndo = FALSE;
|
2007-09-27 07:45:27 +00:00
|
|
|
SwDoc* pMyDoc = GetDoc();
|
|
|
|
SwTxtNode* pTxtNd = pMyDoc->GetNodes()[ rPos.nNode ]->GetTxtNode();
|
2000-09-18 23:08:29 +00:00
|
|
|
if( pTxtNd )
|
|
|
|
rPos.nContent.Assign( pTxtNd, 0 );
|
|
|
|
else
|
|
|
|
{
|
|
|
|
bEndUndo = TRUE;
|
2007-09-27 07:45:27 +00:00
|
|
|
pMyDoc->StartUndo( UNDO_START, NULL );
|
2000-09-18 23:08:29 +00:00
|
|
|
rPos.nNode--;
|
2007-09-27 07:45:27 +00:00
|
|
|
pMyDoc->AppendTxtNode( rPos );
|
2000-09-18 23:08:29 +00:00
|
|
|
pCrsr->SetMark();
|
|
|
|
}
|
|
|
|
|
|
|
|
InsertSection( rNew );
|
|
|
|
|
|
|
|
if( bEndUndo )
|
2007-09-27 07:45:27 +00:00
|
|
|
pMyDoc->EndUndo( UNDO_END, NULL );
|
2000-09-18 23:08:29 +00:00
|
|
|
EndAllAction();
|
|
|
|
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
BOOL SwEditShell::InsertGlobalDocContent( const SwGlblDocContent& rInsPos,
|
|
|
|
const SwTOXBase& rTOX )
|
|
|
|
{
|
2006-08-14 15:08:42 +00:00
|
|
|
if( !getIDocumentSettingAccess()->get(IDocumentSettingAccess::GLOBAL_DOCUMENT) )
|
2000-09-18 23:08:29 +00:00
|
|
|
return FALSE;
|
|
|
|
|
|
|
|
SET_CURR_SHELL( this );
|
|
|
|
StartAllAction();
|
|
|
|
|
|
|
|
SwPaM* pCrsr = GetCrsr();
|
|
|
|
if( pCrsr->GetNext() != pCrsr || IsTableMode() )
|
|
|
|
ClearMark();
|
|
|
|
|
|
|
|
SwPosition& rPos = *pCrsr->GetPoint();
|
|
|
|
rPos.nNode = rInsPos.GetDocPos();
|
|
|
|
|
|
|
|
BOOL bEndUndo = FALSE;
|
2007-09-27 07:45:27 +00:00
|
|
|
SwDoc* pMyDoc = GetDoc();
|
2000-09-18 23:08:29 +00:00
|
|
|
SwTxtNode* pTxtNd = rPos.nNode.GetNode().GetTxtNode();
|
|
|
|
if( pTxtNd && pTxtNd->GetTxt().Len() && rPos.nNode.GetIndex() + 1 !=
|
2007-09-27 07:45:27 +00:00
|
|
|
pMyDoc->GetNodes().GetEndOfContent().GetIndex() )
|
2000-09-18 23:08:29 +00:00
|
|
|
rPos.nContent.Assign( pTxtNd, 0 );
|
|
|
|
else
|
|
|
|
{
|
|
|
|
bEndUndo = TRUE;
|
2007-09-27 07:45:27 +00:00
|
|
|
pMyDoc->StartUndo( UNDO_START, NULL );
|
2000-09-18 23:08:29 +00:00
|
|
|
rPos.nNode--;
|
2007-09-27 07:45:27 +00:00
|
|
|
pMyDoc->AppendTxtNode( rPos );
|
2000-09-18 23:08:29 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
InsertTableOf( rTOX );
|
|
|
|
|
|
|
|
if( bEndUndo )
|
2007-09-27 07:45:27 +00:00
|
|
|
pMyDoc->EndUndo( UNDO_END, NULL );
|
2000-09-18 23:08:29 +00:00
|
|
|
EndAllAction();
|
|
|
|
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
BOOL SwEditShell::InsertGlobalDocContent( const SwGlblDocContent& rInsPos )
|
|
|
|
{
|
2006-08-14 15:08:42 +00:00
|
|
|
if( !getIDocumentSettingAccess()->get(IDocumentSettingAccess::GLOBAL_DOCUMENT) )
|
2000-09-18 23:08:29 +00:00
|
|
|
return FALSE;
|
|
|
|
|
|
|
|
SET_CURR_SHELL( this );
|
|
|
|
StartAllAction();
|
|
|
|
|
|
|
|
SwPaM* pCrsr = GetCrsr();
|
|
|
|
if( pCrsr->GetNext() != pCrsr || IsTableMode() )
|
|
|
|
ClearMark();
|
|
|
|
|
|
|
|
SwPosition& rPos = *pCrsr->GetPoint();
|
|
|
|
rPos.nNode = rInsPos.GetDocPos() - 1;
|
|
|
|
rPos.nContent.Assign( 0, 0 );
|
|
|
|
|
2007-09-27 07:45:27 +00:00
|
|
|
SwDoc* pMyDoc = GetDoc();
|
|
|
|
pMyDoc->AppendTxtNode( rPos );
|
2000-09-18 23:08:29 +00:00
|
|
|
EndAllAction();
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
BOOL SwEditShell::DeleteGlobalDocContent( const SwGlblDocContents& rArr ,
|
|
|
|
USHORT nDelPos )
|
|
|
|
{
|
2006-08-14 15:08:42 +00:00
|
|
|
if( !getIDocumentSettingAccess()->get(IDocumentSettingAccess::GLOBAL_DOCUMENT) )
|
2000-09-18 23:08:29 +00:00
|
|
|
return FALSE;
|
|
|
|
|
|
|
|
SET_CURR_SHELL( this );
|
|
|
|
StartAllAction();
|
|
|
|
StartUndo( UNDO_START );
|
|
|
|
|
|
|
|
SwPaM* pCrsr = GetCrsr();
|
|
|
|
if( pCrsr->GetNext() != pCrsr || IsTableMode() )
|
|
|
|
ClearMark();
|
|
|
|
|
|
|
|
SwPosition& rPos = *pCrsr->GetPoint();
|
|
|
|
|
2007-09-27 07:45:27 +00:00
|
|
|
SwDoc* pMyDoc = GetDoc();
|
2000-09-18 23:08:29 +00:00
|
|
|
const SwGlblDocContent& rDelPos = *rArr[ nDelPos ];
|
|
|
|
ULONG nDelIdx = rDelPos.GetDocPos();
|
|
|
|
if( 1 == rArr.Count() )
|
|
|
|
{
|
|
|
|
// ein Node muss aber da bleiben!
|
|
|
|
rPos.nNode = nDelIdx - 1;
|
|
|
|
rPos.nContent.Assign( 0, 0 );
|
|
|
|
|
2007-09-27 07:45:27 +00:00
|
|
|
pMyDoc->AppendTxtNode( rPos );
|
2000-09-18 23:08:29 +00:00
|
|
|
++nDelIdx;
|
|
|
|
}
|
|
|
|
|
|
|
|
switch( rDelPos.GetType() )
|
|
|
|
{
|
|
|
|
case GLBLDOC_UNKNOWN:
|
|
|
|
{
|
|
|
|
rPos.nNode = nDelIdx;
|
|
|
|
pCrsr->SetMark();
|
|
|
|
if( ++nDelPos < rArr.Count() )
|
|
|
|
rPos.nNode = rArr[ nDelPos ]->GetDocPos();
|
|
|
|
else
|
2007-09-27 07:45:27 +00:00
|
|
|
rPos.nNode = pMyDoc->GetNodes().GetEndOfContent();
|
2000-09-18 23:08:29 +00:00
|
|
|
rPos.nNode--;
|
2007-09-27 07:45:27 +00:00
|
|
|
if( !pMyDoc->DelFullPara( *pCrsr ) )
|
2000-09-18 23:08:29 +00:00
|
|
|
Delete();
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case GLBLDOC_TOXBASE:
|
|
|
|
{
|
|
|
|
SwTOXBaseSection* pTOX = (SwTOXBaseSection*)rDelPos.GetTOX();
|
2007-09-27 07:45:27 +00:00
|
|
|
pMyDoc->DeleteTOX( *pTOX, TRUE );
|
2000-09-18 23:08:29 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case GLBLDOC_SECTION:
|
|
|
|
{
|
|
|
|
SwSectionFmt* pSectFmt = (SwSectionFmt*)rDelPos.GetSection()->GetFmt();
|
2007-09-27 07:45:27 +00:00
|
|
|
pMyDoc->DelSectionFmt( pSectFmt, TRUE );
|
2000-09-18 23:08:29 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
EndUndo( UNDO_END );
|
|
|
|
EndAllAction();
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
BOOL SwEditShell::MoveGlobalDocContent( const SwGlblDocContents& rArr ,
|
|
|
|
USHORT nFromPos, USHORT nToPos,
|
|
|
|
USHORT nInsPos )
|
|
|
|
{
|
2006-08-14 15:08:42 +00:00
|
|
|
if( !getIDocumentSettingAccess()->get(IDocumentSettingAccess::GLOBAL_DOCUMENT) ||
|
2000-09-18 23:08:29 +00:00
|
|
|
nFromPos >= rArr.Count() || nToPos > rArr.Count() ||
|
|
|
|
nInsPos > rArr.Count() || nFromPos >= nToPos ||
|
|
|
|
( nFromPos <= nInsPos && nInsPos <= nToPos ) )
|
|
|
|
return FALSE;
|
|
|
|
|
|
|
|
SET_CURR_SHELL( this );
|
|
|
|
StartAllAction();
|
|
|
|
|
|
|
|
SwPaM* pCrsr = GetCrsr();
|
|
|
|
if( pCrsr->GetNext() != pCrsr || IsTableMode() )
|
|
|
|
ClearMark();
|
|
|
|
|
2007-09-27 07:45:27 +00:00
|
|
|
SwDoc* pMyDoc = GetDoc();
|
|
|
|
SwNodeRange aRg( pMyDoc->GetNodes(), rArr[ nFromPos ]->GetDocPos() );
|
2000-09-18 23:08:29 +00:00
|
|
|
if( nToPos < rArr.Count() )
|
|
|
|
aRg.aEnd = rArr[ nToPos ]->GetDocPos();
|
|
|
|
else
|
2007-09-27 07:45:27 +00:00
|
|
|
aRg.aEnd = pMyDoc->GetNodes().GetEndOfContent();
|
2000-09-18 23:08:29 +00:00
|
|
|
|
2007-09-27 07:45:27 +00:00
|
|
|
SwNodeIndex aInsPos( pMyDoc->GetNodes() );
|
2000-09-18 23:08:29 +00:00
|
|
|
if( nInsPos < rArr.Count() )
|
|
|
|
aInsPos = rArr[ nInsPos ]->GetDocPos();
|
|
|
|
else
|
2007-09-27 07:45:27 +00:00
|
|
|
aInsPos = pMyDoc->GetNodes().GetEndOfContent();
|
2000-09-18 23:08:29 +00:00
|
|
|
|
2009-09-08 14:13:58 +00:00
|
|
|
BOOL bRet = pMyDoc->Move( aRg, aInsPos,
|
|
|
|
IDocumentContentOperations::SwMoveFlags(IDocumentContentOperations::DOC_MOVEALLFLYS|IDocumentContentOperations::DOC_CREATEUNDOOBJ ));
|
2000-09-18 23:08:29 +00:00
|
|
|
|
|
|
|
EndAllAction();
|
|
|
|
return bRet;
|
|
|
|
}
|
|
|
|
|
|
|
|
BOOL SwEditShell::GotoGlobalDocContent( const SwGlblDocContent& rPos )
|
|
|
|
{
|
2006-08-14 15:08:42 +00:00
|
|
|
if( !getIDocumentSettingAccess()->get(IDocumentSettingAccess::GLOBAL_DOCUMENT) )
|
2000-09-18 23:08:29 +00:00
|
|
|
return FALSE;
|
|
|
|
|
|
|
|
SET_CURR_SHELL( this );
|
|
|
|
SttCrsrMove();
|
|
|
|
|
|
|
|
SwPaM* pCrsr = GetCrsr();
|
|
|
|
if( pCrsr->GetNext() != pCrsr || IsTableMode() )
|
|
|
|
ClearMark();
|
|
|
|
|
|
|
|
SwPosition& rCrsrPos = *pCrsr->GetPoint();
|
|
|
|
rCrsrPos.nNode = rPos.GetDocPos();
|
|
|
|
|
2007-09-27 07:45:27 +00:00
|
|
|
SwDoc* pMyDoc = GetDoc();
|
|
|
|
SwCntntNode* pCNd = pMyDoc->GetNodes()[ rCrsrPos.nNode ]->GetCntntNode();
|
2000-09-18 23:08:29 +00:00
|
|
|
if( !pCNd )
|
2007-09-27 07:45:27 +00:00
|
|
|
pCNd = pMyDoc->GetNodes().GoNext( &rCrsrPos.nNode );
|
2000-09-18 23:08:29 +00:00
|
|
|
|
|
|
|
rCrsrPos.nContent.Assign( pCNd, 0 );
|
|
|
|
|
|
|
|
EndCrsrMove();
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
SwGlblDocContent::SwGlblDocContent( ULONG nPos )
|
|
|
|
{
|
|
|
|
eType = GLBLDOC_UNKNOWN;
|
|
|
|
PTR.pTOX = 0;
|
|
|
|
nDocPos = nPos;
|
|
|
|
}
|
|
|
|
|
|
|
|
SwGlblDocContent::SwGlblDocContent( const SwTOXBaseSection* pTOX )
|
|
|
|
{
|
|
|
|
eType = GLBLDOC_TOXBASE;
|
|
|
|
PTR.pTOX = pTOX;
|
|
|
|
|
|
|
|
const SwSectionNode* pSectNd = pTOX->GetFmt()->GetSectionNode();
|
|
|
|
nDocPos = pSectNd ? pSectNd->GetIndex() : 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
SwGlblDocContent::SwGlblDocContent( const SwSection* pSect )
|
|
|
|
{
|
|
|
|
eType = GLBLDOC_SECTION;
|
|
|
|
PTR.pSect = pSect;
|
|
|
|
|
|
|
|
const SwSectionNode* pSectNd = pSect->GetFmt()->GetSectionNode();
|
|
|
|
nDocPos = pSectNd ? pSectNd->GetIndex() : 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|