summaryrefslogtreecommitdiff
path: root/sw/source/core/undo
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/core/undo')
-rw-r--r--sw/source/core/undo/SwRewriter.cxx5
-rw-r--r--sw/source/core/undo/SwUndoField.cxx5
-rw-r--r--sw/source/core/undo/SwUndoFmt.cxx5
-rw-r--r--sw/source/core/undo/SwUndoPageDesc.cxx5
-rw-r--r--sw/source/core/undo/SwUndoTOXChange.cxx5
-rw-r--r--sw/source/core/undo/docundo.cxx11
-rw-r--r--sw/source/core/undo/makefile.mk8
-rw-r--r--sw/source/core/undo/rolbck.cxx13
-rw-r--r--sw/source/core/undo/unattr.cxx28
-rw-r--r--sw/source/core/undo/unbkmk.cxx5
-rw-r--r--sw/source/core/undo/undel.cxx15
-rw-r--r--sw/source/core/undo/undo.hrc7
-rw-r--r--sw/source/core/undo/undo.src7
-rw-r--r--sw/source/core/undo/undobj.cxx17
-rw-r--r--sw/source/core/undo/undobj1.cxx98
-rw-r--r--sw/source/core/undo/undoflystrattr.cxx7
-rw-r--r--sw/source/core/undo/undraw.cxx42
-rw-r--r--sw/source/core/undo/unfmco.cxx5
-rw-r--r--sw/source/core/undo/unins.cxx7
-rw-r--r--sw/source/core/undo/unmove.cxx5
-rw-r--r--sw/source/core/undo/unnum.cxx7
-rw-r--r--sw/source/core/undo/unoutl.cxx5
-rw-r--r--sw/source/core/undo/unovwr.cxx5
-rw-r--r--sw/source/core/undo/unredln.cxx5
-rw-r--r--sw/source/core/undo/unsect.cxx7
-rw-r--r--sw/source/core/undo/unsort.cxx5
-rw-r--r--sw/source/core/undo/unspnd.cxx7
-rw-r--r--sw/source/core/undo/untbl.cxx26
-rw-r--r--sw/source/core/undo/untblk.cxx21
29 files changed, 158 insertions, 230 deletions
diff --git a/sw/source/core/undo/SwRewriter.cxx b/sw/source/core/undo/SwRewriter.cxx
index 2267497a31..07e51eb1c5 100644
--- a/sw/source/core/undo/SwRewriter.cxx
+++ b/sw/source/core/undo/SwRewriter.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: SwRewriter.cxx,v $
- * $Revision: 1.9 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/core/undo/SwUndoField.cxx b/sw/source/core/undo/SwUndoField.cxx
index a324432c90..ccc1f4d211 100644
--- a/sw/source/core/undo/SwUndoField.cxx
+++ b/sw/source/core/undo/SwUndoField.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: SwUndoField.cxx,v $
- * $Revision: 1.11 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/core/undo/SwUndoFmt.cxx b/sw/source/core/undo/SwUndoFmt.cxx
index 473aeb2cc9..339f3374f2 100644
--- a/sw/source/core/undo/SwUndoFmt.cxx
+++ b/sw/source/core/undo/SwUndoFmt.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: SwUndoFmt.cxx,v $
- * $Revision: 1.8 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/core/undo/SwUndoPageDesc.cxx b/sw/source/core/undo/SwUndoPageDesc.cxx
index d7ee78b070..b6eb8797ec 100644
--- a/sw/source/core/undo/SwUndoPageDesc.cxx
+++ b/sw/source/core/undo/SwUndoPageDesc.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: SwUndoPageDesc.cxx,v $
- * $Revision: 1.12 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/core/undo/SwUndoTOXChange.cxx b/sw/source/core/undo/SwUndoTOXChange.cxx
index 8368b8507c..8c1d6dcd8c 100644
--- a/sw/source/core/undo/SwUndoTOXChange.cxx
+++ b/sw/source/core/undo/SwUndoTOXChange.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: SwUndoTOXChange.cxx,v $
- * $Revision: 1.7 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/core/undo/docundo.cxx b/sw/source/core/undo/docundo.cxx
index 35c09ac23b..f596898aae 100644
--- a/sw/source/core/undo/docundo.cxx
+++ b/sw/source/core/undo/docundo.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: docundo.cxx,v $
- * $Revision: 1.26 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -203,9 +200,9 @@ void SwDoc::AppendUndo( SwUndo* pUndo )
USHORT nEnde = UNDO_ACTION_LIMIT;
// nur zum Testen der neuen DOC-Member
-#ifndef PRODUCT
+#ifdef DBG_UTIL
{
- SwUndoId nId = UNDO_EMPTY;
+ SwUndoId nId = UNDO_EMPTY;
USHORT nUndosCnt = 0, nSttEndCnt = 0;
for( USHORT nCnt = 0; nCnt < nUndoPos; ++nCnt )
{
@@ -551,7 +548,7 @@ SwUndoId SwDoc::EndUndo(SwUndoId eUndoId, const SwRewriter * pRewriter)
pUndoEnd->SetSttOffset( nSize );
// nur zum Testen der Start/End-Verpointerung vom Start/End Undo
-#ifndef PRODUCT
+#ifdef DBG_UTIL
{
USHORT nEndCnt = 1, nCnt = pUndos->Count();
SwUndoId nTmpId = UNDO_EMPTY;
diff --git a/sw/source/core/undo/makefile.mk b/sw/source/core/undo/makefile.mk
index 4c7a332eec..d6e6766a0f 100644
--- a/sw/source/core/undo/makefile.mk
+++ b/sw/source/core/undo/makefile.mk
@@ -1,15 +1,11 @@
#*************************************************************************
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2008 by Sun Microsystems, Inc.
+#
+# Copyright 2000, 2010 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
-# $RCSfile: makefile.mk,v $
-#
-# $Revision: 1.10 $
-#
# This file is part of OpenOffice.org.
#
# OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/core/undo/rolbck.cxx b/sw/source/core/undo/rolbck.cxx
index 72da13fe5a..0f56140366 100644
--- a/sw/source/core/undo/rolbck.cxx
+++ b/sw/source/core/undo/rolbck.cxx
@@ -1,14 +1,11 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: rolbck.cxx,v $
- * $Revision: 1.24 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -33,7 +30,7 @@
#include <hintids.hxx>
-#include <svtools/itemiter.hxx>
+#include <svl/itemiter.hxx>
#include <fmtftn.hxx>
#include <fchrfmt.hxx>
#include <fmtflcnt.hxx>
@@ -69,7 +66,7 @@
#ifndef _UNDO_HRC
#include <undo.hrc>
#endif
-#include <svx/brkitem.hxx>
+#include <editeng/brkitem.hxx>
#include <bookmrk.hxx>
SV_IMPL_PTRARR( SwpHstry, SwHistoryHintPtr)
@@ -922,7 +919,7 @@ SwHistoryChangeFlyAnchor::SwHistoryChangeFlyAnchor( SwFrmFmt& rFmt )
: SwHistoryHint( HSTRY_CHGFLYANCHOR )
, m_rFmt( rFmt )
, m_nOldNodeIndex( rFmt.GetAnchor().GetCntntAnchor()->nNode.GetIndex() )
- , m_nOldContentIndex( ( FLY_AUTO_CNTNT == rFmt.GetAnchor().GetAnchorId() )
+ , m_nOldContentIndex( (FLY_AT_CHAR == rFmt.GetAnchor().GetAnchorId())
? rFmt.GetAnchor().GetCntntAnchor()->nContent.GetIndex()
: STRING_MAXLEN )
{
diff --git a/sw/source/core/undo/unattr.cxx b/sw/source/core/undo/unattr.cxx
index 512c7c1afe..d24b364f67 100644
--- a/sw/source/core/undo/unattr.cxx
+++ b/sw/source/core/undo/unattr.cxx
@@ -1,15 +1,11 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: unattr.cxx,v $
- *
- * $Revision: 1.21 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -37,9 +33,9 @@
#define _SVSTDARR_USHORTSSORT
#include <hintids.hxx>
#include <svx/svdmodel.hxx>
-#include <svx/tstpitem.hxx>
+#include <editeng/tstpitem.hxx>
#include <svx/svdpage.hxx>
-#include <svtools/itemiter.hxx>
+#include <svl/itemiter.hxx>
#include <fmtflcnt.hxx>
@@ -462,10 +458,10 @@ void SwUndoFmtAttr::SaveFlyAnchor( bool bSvDrwPt )
xub_StrLen nCntnt = 0;
switch( rAnchor.GetAnchorId() )
{
- case FLY_IN_CNTNT:
- case FLY_AUTO_CNTNT:
+ case FLY_AS_CHAR:
+ case FLY_AT_CHAR:
nCntnt = rAnchor.GetCntntAnchor()->nContent.GetIndex();
- case FLY_AT_CNTNT:
+ case FLY_AT_PARA:
case FLY_AT_FLY:
m_nNodeIndex = rAnchor.GetCntntAnchor()->nNode.GetIndex();
break;
@@ -489,7 +485,7 @@ bool SwUndoFmtAttr::RestoreFlyAnchor( SwUndoIter& rIter )
static_cast<const SwFmtAnchor&>( m_pOldSet->Get( RES_ANCHOR, FALSE ) );
SwFmtAnchor aNewAnchor( rAnchor.GetAnchorId() );
- if( FLY_PAGE != rAnchor.GetAnchorId() )
+ if (FLY_AT_PAGE != rAnchor.GetAnchorId())
{
SwNode* pNd = pDoc->GetNodes()[ m_nNodeIndex ];
@@ -505,8 +501,8 @@ bool SwUndoFmtAttr::RestoreFlyAnchor( SwUndoIter& rIter )
}
SwPosition aPos( *pNd );
- if( FLY_IN_CNTNT == rAnchor.GetAnchorId() ||
- FLY_AUTO_CNTNT == rAnchor.GetAnchorId() )
+ if ((FLY_AS_CHAR == rAnchor.GetAnchorId()) ||
+ (FLY_AT_CHAR == rAnchor.GetAnchorId()))
{
aPos.nContent.Assign( (SwTxtNode*)pNd, rAnchor.GetPageNum() );
if ( aPos.nContent.GetIndex() >
@@ -549,7 +545,7 @@ bool SwUndoFmtAttr::RestoreFlyAnchor( SwUndoIter& rIter )
const SwFmtAnchor &rOldAnch = pFrmFmt->GetAnchor();
// --> OD 2006-03-13 #i54336#
// Consider case, that as-character anchored object has moved its anchor position.
- if ( FLY_IN_CNTNT == rOldAnch.GetAnchorId() )
+ if (FLY_AS_CHAR == rOldAnch.GetAnchorId())
// <--
{
//Bei InCntnt's wird es spannend: Das TxtAttribut muss vernichtet
@@ -613,7 +609,7 @@ bool SwUndoFmtAttr::RestoreFlyAnchor( SwUndoIter& rIter )
SwFmtFrmSize( ATT_VAR_SIZE, aDrawOldPt.X(), aDrawOldPt.Y() ) );
}
- if( FLY_IN_CNTNT == aNewAnchor.GetAnchorId() )
+ if (FLY_AS_CHAR == aNewAnchor.GetAnchorId())
{
const SwPosition* pPos = aNewAnchor.GetCntntAnchor();
SwTxtNode* pTxtNd = pPos->nNode.GetNode().GetTxtNode();
diff --git a/sw/source/core/undo/unbkmk.cxx b/sw/source/core/undo/unbkmk.cxx
index 6bc403478d..1240b3e8de 100644
--- a/sw/source/core/undo/unbkmk.cxx
+++ b/sw/source/core/undo/unbkmk.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: unbkmk.cxx,v $
- * $Revision: 1.10 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/core/undo/undel.cxx b/sw/source/core/undo/undel.cxx
index 1ebc3a084f..74c2c0854a 100644
--- a/sw/source/core/undo/undel.cxx
+++ b/sw/source/core/undo/undel.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: undel.cxx,v $
- * $Revision: 1.27 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -34,7 +31,7 @@
#include <hintids.hxx>
#include <unotools/charclass.hxx>
-#include <svx/brkitem.hxx>
+#include <editeng/brkitem.hxx>
#include <fmtpdsc.hxx>
#include <frmfmt.hxx>
#include <fmtanchr.hxx>
@@ -56,9 +53,9 @@
#include <comcore.hrc> // #111827#
#include <undo.hrc>
-// #include <svx/svxacorr.hxx>
+// #include <editeng/svxacorr.hxx>
// #include <comphelper/processfactory.hxx>
-// #include <svx/unolingu.hxx>
+// #include <editeng/unolingu.hxx>
// #include <unotools/localedatawrapper.hxx>
// using namespace comphelper;
@@ -81,7 +78,7 @@ void lcl_MakeAutoFrms( const SwSpzFrmFmts& rSpzArr, ULONG nMovedIndex )
{
pFmt = (SwFlyFrmFmt*)rSpzArr[n];
pAnchor = &pFmt->GetAnchor();
- if( pAnchor->GetAnchorId() == FLY_AUTO_CNTNT )
+ if (pAnchor->GetAnchorId() == FLY_AT_CHAR)
{
const SwPosition* pAPos = pAnchor->GetCntntAnchor();
if( pAPos && nMovedIndex == pAPos->nNode.GetIndex() )
@@ -632,7 +629,7 @@ void lcl_ReAnchorAtCntntFlyFrames( const SwSpzFrmFmts& rSpzArr, SwPosition &rPos
{
pFmt = (SwFlyFrmFmt*)rSpzArr[n];
pAnchor = &pFmt->GetAnchor();
- if( pAnchor->GetAnchorId() == FLY_AT_CNTNT )
+ if (pAnchor->GetAnchorId() == FLY_AT_PARA)
{
pAPos = pAnchor->GetCntntAnchor();
if( pAPos && nOldIdx == pAPos->nNode.GetIndex() )
diff --git a/sw/source/core/undo/undo.hrc b/sw/source/core/undo/undo.hrc
index 2b96ba202a..707ff307be 100644
--- a/sw/source/core/undo/undo.hrc
+++ b/sw/source/core/undo/undo.hrc
@@ -1,14 +1,11 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: undo.hrc,v $
- * $Revision: 1.6 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/core/undo/undo.src b/sw/source/core/undo/undo.src
index 2cf91da28b..4ad1e70b78 100644
--- a/sw/source/core/undo/undo.src
+++ b/sw/source/core/undo/undo.src
@@ -1,14 +1,11 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: undo.src,v $
- * $Revision: 1.12 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/core/undo/undobj.cxx b/sw/source/core/undo/undobj.cxx
index 9338e5fbc5..0a16b89699 100644
--- a/sw/source/core/undo/undobj.cxx
+++ b/sw/source/core/undo/undobj.cxx
@@ -1,14 +1,11 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: undobj.cxx,v $
- * $Revision: 1.29.52.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -68,7 +65,7 @@ public:
SwNodeIndex* GetMvSttIdx() const
{ return SwUndoSaveSection::GetMvSttIdx(); }
-#ifndef PRODUCT
+#ifdef DBG_UTIL
USHORT nRedlineCount;
#endif
};
@@ -593,7 +590,7 @@ void SwUndoSaveCntnt::DelCntntIndex( const SwPosition& rMark,
pAnchor = &pFmt->GetAnchor();
switch( pAnchor->GetAnchorId() )
{
- case FLY_IN_CNTNT:
+ case FLY_AS_CHAR:
if( 0 != (pAPos = pAnchor->GetCntntAnchor() ) &&
(( nsDelCntntType::DELCNT_CHKNOCNTNT & nDelCntntType )
? ( pStt->nNode <= pAPos->nNode &&
@@ -611,7 +608,7 @@ void SwUndoSaveCntnt::DelCntntIndex( const SwPosition& rMark,
n = n >= rSpzArr.Count() ? rSpzArr.Count() : n+1;
}
break;
- case FLY_AT_CNTNT:
+ case FLY_AT_PARA:
{
pAPos = pAnchor->GetCntntAnchor();
if( pAPos )
@@ -660,7 +657,7 @@ void SwUndoSaveCntnt::DelCntntIndex( const SwPosition& rMark,
}
}
break;
- case FLY_AUTO_CNTNT:
+ case FLY_AT_CHAR:
if( 0 != (pAPos = pAnchor->GetCntntAnchor() ) &&
( pStt->nNode <= pAPos->nNode && pAPos->nNode <= pEnd->nNode ) )
{
@@ -1089,7 +1086,7 @@ SwRedlineSaveData::SwRedlineSaveData( SwComparePosition eCmpPos,
ASSERT( !this, "keine gueltigen Daten!" )
}
-#ifndef PRODUCT
+#ifdef DBG_UTIL
nRedlineCount = rSttPos.nNode.GetNode().GetDoc()->GetRedlineTbl().Count();
#endif
}
diff --git a/sw/source/core/undo/undobj1.cxx b/sw/source/core/undo/undobj1.cxx
index d9ce9b12a8..07446350c2 100644
--- a/sw/source/core/undo/undobj1.cxx
+++ b/sw/source/core/undo/undobj1.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: undobj1.cxx,v $
- * $Revision: 1.18 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -33,7 +30,7 @@
#include <hintids.hxx>
-#include <svtools/itemiter.hxx>
+#include <svl/itemiter.hxx>
#include <fmtflcnt.hxx>
#include <fmtanchr.hxx>
#include <fmtcntnt.hxx>
@@ -93,15 +90,19 @@ void SwUndoFlyBase::InsFly( SwUndoIter& rUndoIter, BOOL bShowSelFrm )
SwFmtAnchor aAnchor( (RndStdIds)nRndId );
- if( FLY_PAGE == nRndId )
+ if (FLY_AT_PAGE == nRndId)
+ {
aAnchor.SetPageNum( (USHORT)nNdPgPos );
+ }
else
{
SwPosition aNewPos( *rUndoIter.pAktPam->GetPoint() );
aNewPos.nNode = nNdPgPos;
- if( FLY_IN_CNTNT == nRndId || FLY_AUTO_CNTNT == nRndId )
+ if ((FLY_AS_CHAR == nRndId) || (FLY_AT_CHAR == nRndId))
+ {
aNewPos.nContent.Assign( aNewPos.nNode.GetNode().GetCntntNode(),
nCntPos );
+ }
aAnchor.SetAnchor( &aNewPos );
}
@@ -119,7 +120,7 @@ void SwUndoFlyBase::InsFly( SwUndoIter& rUndoIter, BOOL bShowSelFrm )
// vorhanden ist! Sonst wuerde das Layout den Fly vorher
// formatieren, aber keine Inhalt finden; so geschene bei
// Grafiken aus dem Internet
- if( FLY_IN_CNTNT == nRndId )
+ if (FLY_AS_CHAR == nRndId)
{
// es muss mindestens das Attribut im TextNode stehen
SwCntntNode* pCNd = aAnchor.GetCntntAnchor()->nNode.GetNode().GetCntntNode();
@@ -138,22 +139,22 @@ void SwUndoFlyBase::InsFly( SwUndoIter& rUndoIter, BOOL bShowSelFrm )
switch( nRndId )
{
- case FLY_IN_CNTNT:
- case FLY_AUTO_CNTNT:
+ case FLY_AS_CHAR:
+ case FLY_AT_CHAR:
{
const SwFmtAnchor& rAnchor = pFrmFmt->GetAnchor();
nNdPgPos = rAnchor.GetCntntAnchor()->nNode.GetIndex();
nCntPos = rAnchor.GetCntntAnchor()->nContent.GetIndex();
}
break;
- case FLY_AT_CNTNT:
+ case FLY_AT_PARA:
case FLY_AT_FLY:
{
const SwFmtAnchor& rAnchor = pFrmFmt->GetAnchor();
nNdPgPos = rAnchor.GetCntntAnchor()->nNode.GetIndex();
}
break;
- case FLY_PAGE:
+ case FLY_AT_PAGE:
break;
}
bDelFmt = FALSE;
@@ -193,7 +194,8 @@ void SwUndoFlyBase::DelFly( SwDoc* pDoc )
const SwFmtAnchor& rAnchor = pFrmFmt->GetAnchor();
const SwPosition* pPos = rAnchor.GetCntntAnchor();
// die Positionen im Nodes-Array haben sich verschoben
- if( FLY_IN_CNTNT == ( nRndId = static_cast<USHORT>(rAnchor.GetAnchorId()) ) )
+ nRndId = static_cast<USHORT>(rAnchor.GetAnchorId());
+ if (FLY_AS_CHAR == nRndId)
{
nNdPgPos = pPos->nNode.GetIndex();
nCntPos = pPos->nContent.GetIndex();
@@ -210,15 +212,19 @@ void SwUndoFlyBase::DelFly( SwDoc* pDoc )
pTxtNd->EraseText( aIdx, 1 );
}
}
- else if( FLY_AUTO_CNTNT == nRndId )
+ else if (FLY_AT_CHAR == nRndId)
{
nNdPgPos = pPos->nNode.GetIndex();
nCntPos = pPos->nContent.GetIndex();
}
- else if( FLY_AT_CNTNT == nRndId || FLY_AT_FLY == nRndId )
+ else if ((FLY_AT_PARA == nRndId) || (FLY_AT_FLY == nRndId))
+ {
nNdPgPos = pPos->nNode.GetIndex();
+ }
else
+ {
nNdPgPos = rAnchor.GetPageNum();
+ }
pFrmFmt->ResetFmtAttr( RES_ANCHOR ); // Anchor loeschen
@@ -240,15 +246,15 @@ SwUndoInsLayFmt::SwUndoInsLayFmt( SwFrmFmt* pFormat, ULONG nNodeIdx, xub_StrLen
bDelFmt = FALSE;
switch( nRndId )
{
- case FLY_PAGE:
+ case FLY_AT_PAGE:
nNdPgPos = rAnchor.GetPageNum();
break;
- case FLY_AT_CNTNT:
+ case FLY_AT_PARA:
case FLY_AT_FLY:
nNdPgPos = rAnchor.GetCntntAnchor()->nNode.GetIndex();
break;
- case FLY_IN_CNTNT:
- case FLY_AUTO_CNTNT:
+ case FLY_AS_CHAR:
+ case FLY_AT_CHAR:
{
const SwPosition* pPos = rAnchor.GetCntntAnchor();
nCntPos = pPos->nContent.GetIndex();
@@ -305,13 +311,15 @@ void SwUndoInsLayFmt::Repeat( SwUndoIter& rUndoIter )
SwDoc* pDoc = &rUndoIter.GetDoc();
// erfrage und setze den Anker neu
SwFmtAnchor aAnchor( pFrmFmt->GetAnchor() );
- if( FLY_AT_CNTNT == aAnchor.GetAnchorId() ||
- FLY_AUTO_CNTNT == aAnchor.GetAnchorId() ||
- FLY_IN_CNTNT == aAnchor.GetAnchorId() )
+ if ((FLY_AT_PARA == aAnchor.GetAnchorId()) ||
+ (FLY_AT_CHAR == aAnchor.GetAnchorId()) ||
+ (FLY_AS_CHAR == aAnchor.GetAnchorId()))
{
SwPosition aPos( *rUndoIter.pAktPam->GetPoint() );
- if( FLY_AT_CNTNT == aAnchor.GetAnchorId() )
+ if (FLY_AT_PARA == aAnchor.GetAnchorId())
+ {
aPos.nContent.Assign( 0, 0 );
+ }
aAnchor.SetAnchor( &aPos );
}
else if( FLY_AT_FLY == aAnchor.GetAnchorId() )
@@ -328,7 +336,7 @@ void SwUndoInsLayFmt::Repeat( SwUndoIter& rUndoIter )
return ;
}
}
- else if( FLY_PAGE == aAnchor.GetAnchorId() )
+ else if (FLY_AT_PAGE == aAnchor.GetAnchorId())
{
aAnchor.SetPageNum( pDoc->GetRootFrm()->GetCurrPage(
rUndoIter.pAktPam ));
@@ -482,7 +490,7 @@ void SwUndoSetFlyFmt::GetAnchor( SwFmtAnchor& rAnchor,
ULONG nNode, xub_StrLen nCntnt )
{
RndStdIds nAnchorTyp = rAnchor.GetAnchorId();
- if( FLY_PAGE != nAnchorTyp )
+ if (FLY_AT_PAGE != nAnchorTyp)
{
SwNode* pNd = pFrmFmt->GetDoc()->GetNodes()[ nNode ];
@@ -490,26 +498,34 @@ void SwUndoSetFlyFmt::GetAnchor( SwFmtAnchor& rAnchor,
? ( !pNd->IsStartNode() || SwFlyStartNode !=
((SwStartNode*)pNd)->GetStartNodeType() )
: !pNd->IsTxtNode() )
- pNd = 0; // ungueltige Position
+ {
+ pNd = 0; // invalid position
+ }
else
{
SwPosition aPos( *pNd );
- if( FLY_IN_CNTNT == nAnchorTyp ||
- FLY_AUTO_CNTNT == nAnchorTyp )
+ if ((FLY_AS_CHAR == nAnchorTyp) ||
+ (FLY_AT_CHAR == nAnchorTyp))
{
- if( nCntnt > ((SwTxtNode*)pNd)->GetTxt().Len() )
- pNd = 0; // ungueltige Position
+ if ( nCntnt > static_cast<SwTxtNode*>(pNd)->GetTxt().Len() )
+ {
+ pNd = 0; // invalid position
+ }
else
- aPos.nContent.Assign( (SwTxtNode*)pNd, nCntnt );
+ {
+ aPos.nContent.Assign(static_cast<SwTxtNode*>(pNd), nCntnt);
+ }
}
- if( pNd )
+ if ( pNd )
+ {
rAnchor.SetAnchor( &aPos );
+ }
}
if( !pNd )
{
// ungueltige Position - setze auf 1. Seite
- rAnchor.SetType( FLY_PAGE );
+ rAnchor.SetType( FLY_AT_PAGE );
rAnchor.SetPageNum( 1 );
}
}
@@ -548,7 +564,7 @@ void SwUndoSetFlyFmt::Undo( SwUndoIter& rIter )
if( bAnchorChgd )
{
const SwFmtAnchor& rOldAnch = pFrmFmt->GetAnchor();
- if( FLY_IN_CNTNT == rOldAnch.GetAnchorId() )
+ if (FLY_AS_CHAR == rOldAnch.GetAnchorId())
{
// Bei InCntnt's wird es spannend: Das TxtAttribut muss
// vernichtet werden. Leider reisst dies neben den Frms
@@ -577,7 +593,7 @@ void SwUndoSetFlyFmt::Undo( SwUndoIter& rIter )
GetAnchor( aNewAnchor, nOldNode, nOldCntnt );
pFrmFmt->SetFmtAttr( aNewAnchor );
- if( FLY_IN_CNTNT == aNewAnchor.GetAnchorId() )
+ if (FLY_AS_CHAR == aNewAnchor.GetAnchorId())
{
SwPosition* pPos = (SwPosition*)aNewAnchor.GetCntntAnchor();
SwFmtFlyCnt aFmt( pFrmFmt );
@@ -629,10 +645,10 @@ void SwUndoSetFlyFmt::PutAttr( USHORT nWhich, const SfxPoolItem* pItem )
const SwFmtAnchor* pAnchor = (SwFmtAnchor*)pItem;
switch( nOldAnchorTyp = static_cast<USHORT>(pAnchor->GetAnchorId()) )
{
- case FLY_IN_CNTNT:
- case FLY_AUTO_CNTNT:
+ case FLY_AS_CHAR:
+ case FLY_AT_CHAR:
nOldCntnt = pAnchor->GetCntntAnchor()->nContent.GetIndex();
- case FLY_AT_CNTNT:
+ case FLY_AT_PARA:
case FLY_AT_FLY:
nOldNode = pAnchor->GetCntntAnchor()->nNode.GetIndex();
break;
@@ -644,10 +660,10 @@ void SwUndoSetFlyFmt::PutAttr( USHORT nWhich, const SfxPoolItem* pItem )
pAnchor = (SwFmtAnchor*)&pFrmFmt->GetAnchor();
switch( nNewAnchorTyp = static_cast<USHORT>(pAnchor->GetAnchorId()) )
{
- case FLY_IN_CNTNT:
- case FLY_AUTO_CNTNT:
+ case FLY_AS_CHAR:
+ case FLY_AT_CHAR:
nNewCntnt = pAnchor->GetCntntAnchor()->nContent.GetIndex();
- case FLY_AT_CNTNT:
+ case FLY_AT_PARA:
case FLY_AT_FLY:
nNewNode = pAnchor->GetCntntAnchor()->nNode.GetIndex();
break;
diff --git a/sw/source/core/undo/undoflystrattr.cxx b/sw/source/core/undo/undoflystrattr.cxx
index 767f300a53..b5795a1db8 100644
--- a/sw/source/core/undo/undoflystrattr.cxx
+++ b/sw/source/core/undo/undoflystrattr.cxx
@@ -1,14 +1,11 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: SwUndoPageDesc.cxx,v $
- * $Revision: 1.12 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/core/undo/undraw.cxx b/sw/source/core/undo/undraw.cxx
index 2b89cb1e7c..b61462014c 100644
--- a/sw/source/core/undo/undraw.cxx
+++ b/sw/source/core/undo/undraw.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: undraw.cxx,v $
- * $Revision: 1.22 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -32,15 +29,9 @@
#include "precompiled_sw.hxx"
#include <rtl/string.h>
-
-#ifndef _RTL_MEMORY_H
#include <rtl/memory.h>
-#endif
#include <hintids.hxx>
-#ifndef _RTL_STRING_H
-#include <rtl/string.h>
-#endif
#include <svx/svdogrp.hxx>
#include <svx/svdundo.hxx>
#include <svx/svdpage.hxx>
@@ -61,6 +52,7 @@
#include <rootfrm.hxx>
#include <viewsh.hxx>
+
struct SwUndoGroupObjImpl
{
SwDrawFrmFmt* pFmt;
@@ -142,15 +134,15 @@ void lcl_SendRemoveToUno( SwFmt& rFmt )
void lcl_SaveAnchor( SwFrmFmt* pFmt, ULONG& rNodePos )
{
const SwFmtAnchor& rAnchor = pFmt->GetAnchor();
- if( FLY_AT_CNTNT == rAnchor.GetAnchorId() ||
- FLY_AUTO_CNTNT == rAnchor.GetAnchorId() ||
- FLY_AT_FLY == rAnchor.GetAnchorId() ||
- FLY_IN_CNTNT == rAnchor.GetAnchorId() )
+ if ((FLY_AT_PARA == rAnchor.GetAnchorId()) ||
+ (FLY_AT_CHAR == rAnchor.GetAnchorId()) ||
+ (FLY_AT_FLY == rAnchor.GetAnchorId()) ||
+ (FLY_AS_CHAR == rAnchor.GetAnchorId()))
{
rNodePos = rAnchor.GetCntntAnchor()->nNode.GetIndex();
xub_StrLen nCntntPos = 0;
- if( FLY_IN_CNTNT == rAnchor.GetAnchorId() )
+ if (FLY_AS_CHAR == rAnchor.GetAnchorId())
{
nCntntPos = rAnchor.GetCntntAnchor()->nContent.GetIndex();
@@ -168,8 +160,10 @@ void lcl_SaveAnchor( SwFrmFmt* pFmt, ULONG& rNodePos )
pTxtNd->EraseText( aIdx, 1 );
}
}
- else if( FLY_AUTO_CNTNT == rAnchor.GetAnchorId() )
+ else if (FLY_AT_CHAR == rAnchor.GetAnchorId())
+ {
nCntntPos = rAnchor.GetCntntAnchor()->nContent.GetIndex();
+ }
pFmt->SetFmtAttr( SwFmtAnchor( rAnchor.GetAnchorId(), nCntntPos ) );
}
@@ -178,10 +172,10 @@ void lcl_SaveAnchor( SwFrmFmt* pFmt, ULONG& rNodePos )
void lcl_RestoreAnchor( SwFrmFmt* pFmt, ULONG& rNodePos )
{
const SwFmtAnchor& rAnchor = pFmt->GetAnchor();
- if( FLY_AT_CNTNT == rAnchor.GetAnchorId() ||
- FLY_AUTO_CNTNT == rAnchor.GetAnchorId() ||
- FLY_AT_FLY == rAnchor.GetAnchorId() ||
- FLY_IN_CNTNT == rAnchor.GetAnchorId() )
+ if ((FLY_AT_PARA == rAnchor.GetAnchorId()) ||
+ (FLY_AT_CHAR == rAnchor.GetAnchorId()) ||
+ (FLY_AT_FLY == rAnchor.GetAnchorId()) ||
+ (FLY_AS_CHAR == rAnchor.GetAnchorId()))
{
xub_StrLen nCntntPos = rAnchor.GetPageNum();
SwNodes& rNds = pFmt->GetDoc()->GetNodes();
@@ -190,13 +184,15 @@ void lcl_RestoreAnchor( SwFrmFmt* pFmt, ULONG& rNodePos )
SwPosition aPos( aIdx );
SwFmtAnchor aTmp( rAnchor.GetAnchorId() );
- if( FLY_IN_CNTNT == rAnchor.GetAnchorId() ||
- FLY_AUTO_CNTNT == rAnchor.GetAnchorId() )
+ if ((FLY_AS_CHAR == rAnchor.GetAnchorId()) ||
+ (FLY_AT_CHAR == rAnchor.GetAnchorId()))
+ {
aPos.nContent.Assign( aIdx.GetNode().GetCntntNode(), nCntntPos );
+ }
aTmp.SetAnchor( &aPos );
pFmt->SetFmtAttr( aTmp );
- if( FLY_IN_CNTNT == rAnchor.GetAnchorId() )
+ if (FLY_AS_CHAR == rAnchor.GetAnchorId())
{
SwTxtNode *pTxtNd = aIdx.GetNode().GetTxtNode();
ASSERT( pTxtNd, "no Text Node" );
diff --git a/sw/source/core/undo/unfmco.cxx b/sw/source/core/undo/unfmco.cxx
index c591075f8d..8157147e1b 100644
--- a/sw/source/core/undo/unfmco.cxx
+++ b/sw/source/core/undo/unfmco.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: unfmco.cxx,v $
- * $Revision: 1.11 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/core/undo/unins.cxx b/sw/source/core/undo/unins.cxx
index 36fc9bde50..14f2cdb9ff 100644
--- a/sw/source/core/undo/unins.cxx
+++ b/sw/source/core/undo/unins.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: unins.cxx,v $
- * $Revision: 1.33 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -33,7 +30,7 @@
#include <hintids.hxx>
#include <unotools/charclass.hxx>
#include <sot/storage.hxx>
-#include <svx/keepitem.hxx>
+#include <editeng/keepitem.hxx>
#include <svx/svdobj.hxx>
#include <docsh.hxx>
diff --git a/sw/source/core/undo/unmove.cxx b/sw/source/core/undo/unmove.cxx
index a7491da0c8..164e3abe5c 100644
--- a/sw/source/core/undo/unmove.cxx
+++ b/sw/source/core/undo/unmove.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: unmove.cxx,v $
- * $Revision: 1.12 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/core/undo/unnum.cxx b/sw/source/core/undo/unnum.cxx
index dd2d59fc17..11a92c6385 100644
--- a/sw/source/core/undo/unnum.cxx
+++ b/sw/source/core/undo/unnum.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: unnum.cxx,v $
- * $Revision: 1.17 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -33,7 +30,7 @@
#include <hintids.hxx>
-#include <svx/lrspitem.hxx>
+#include <editeng/lrspitem.hxx>
#include <doc.hxx>
#include <swundo.hxx> // fuer die UndoIds
#include <pam.hxx>
diff --git a/sw/source/core/undo/unoutl.cxx b/sw/source/core/undo/unoutl.cxx
index 27c85f7b1e..c519cb2938 100644
--- a/sw/source/core/undo/unoutl.cxx
+++ b/sw/source/core/undo/unoutl.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: unoutl.cxx,v $
- * $Revision: 1.6 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/core/undo/unovwr.cxx b/sw/source/core/undo/unovwr.cxx
index d91db0515e..22f9db9706 100644
--- a/sw/source/core/undo/unovwr.cxx
+++ b/sw/source/core/undo/unovwr.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: unovwr.cxx,v $
- * $Revision: 1.20 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/core/undo/unredln.cxx b/sw/source/core/undo/unredln.cxx
index 8ce47d86dc..b2a7442f8e 100644
--- a/sw/source/core/undo/unredln.cxx
+++ b/sw/source/core/undo/unredln.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: unredln.cxx,v $
- * $Revision: 1.14 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/core/undo/unsect.cxx b/sw/source/core/undo/unsect.cxx
index 76f8efa306..f43180178e 100644
--- a/sw/source/core/undo/unsect.cxx
+++ b/sw/source/core/undo/unsect.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: unsect.cxx,v $
- * $Revision: 1.17 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -32,7 +29,7 @@
#include "precompiled_sw.hxx"
-#include <svx/linkmgr.hxx>
+#include <sfx2/linkmgr.hxx>
#include <fmtcntnt.hxx>
#include <doc.hxx>
#include <docary.hxx>
diff --git a/sw/source/core/undo/unsort.cxx b/sw/source/core/undo/unsort.cxx
index e5f4a1c25c..9405a491c8 100644
--- a/sw/source/core/undo/unsort.cxx
+++ b/sw/source/core/undo/unsort.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: unsort.cxx,v $
- * $Revision: 1.9 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/core/undo/unspnd.cxx b/sw/source/core/undo/unspnd.cxx
index 0e39363c67..e304bd499e 100644
--- a/sw/source/core/undo/unspnd.cxx
+++ b/sw/source/core/undo/unspnd.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: unspnd.cxx,v $
- * $Revision: 1.11 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -37,7 +34,7 @@
#include "swtable.hxx"
#include "ndtxt.hxx"
#include "swundo.hxx" // fuer die UndoIds
-#include <svx/brkitem.hxx>
+#include <editeng/brkitem.hxx>
#include <fmtpdsc.hxx>
#include <frmfmt.hxx>
#include "undobj.hxx"
diff --git a/sw/source/core/undo/untbl.cxx b/sw/source/core/undo/untbl.cxx
index ab501f9558..aaf0efd655 100644
--- a/sw/source/core/undo/untbl.cxx
+++ b/sw/source/core/undo/untbl.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: untbl.cxx,v $
- * $Revision: 1.41 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -33,7 +30,7 @@
#include <hintids.hxx>
-#include <svx/brkitem.hxx>
+#include <editeng/brkitem.hxx>
#include <fmtornt.hxx>
#include <fmtpdsc.hxx>
#include <doc.hxx>
@@ -66,8 +63,7 @@
#include <comcore.hrc>
#include <unochart.hxx>
-
-#ifdef PRODUCT
+#ifndef DBG_UTIL
#define CHECK_TABLE(t)
#else
#ifdef DEBUG
@@ -77,7 +73,7 @@
#endif
#endif
-#ifdef PRODUCT
+#ifndef DBG_UTIL
#define _DEBUG_REDLINE( pDoc )
#else
void lcl_DebugRedline( const SwDoc* pDoc );
@@ -195,7 +191,7 @@ public:
void InsertSort( SvUShorts& rArr, USHORT nIdx, USHORT* pInsPos = 0 );
void InsertSort( SvULongs& rArr, ULONG nIdx, USHORT* pInsPos = 0 );
-#if defined( JP_DEBUG ) && !defined( PRODUCT )
+#if defined( JP_DEBUG ) && defined(DBG_UTIL)
#include "shellio.hxx"
void DumpDoc( SwDoc* pDoc, const String& rFileNm );
void CheckTable( const SwTable& );
@@ -449,12 +445,12 @@ SwUndoTblToTxt::SwUndoTblToTxt( const SwTable& rTbl, sal_Unicode cCh )
const SwSpzFrmFmts& rFrmFmtTbl = *pTblNd->GetDoc()->GetSpzFrmFmts();
for( USHORT n = 0; n < rFrmFmtTbl.Count(); ++n )
{
- const SwPosition* pAPos;
SwFrmFmt* pFmt = rFrmFmtTbl[ n ];
- const SwFmtAnchor* pAnchor = &pFmt->GetAnchor();
- if( 0 != ( pAPos = pAnchor->GetCntntAnchor()) &&
- ( FLY_AUTO_CNTNT == pAnchor->GetAnchorId() ||
- FLY_AT_CNTNT == pAnchor->GetAnchorId() ) &&
+ SwFmtAnchor const*const pAnchor = &pFmt->GetAnchor();
+ SwPosition const*const pAPos = pAnchor->GetCntntAnchor();
+ if (pAPos &&
+ ((FLY_AT_CHAR == pAnchor->GetAnchorId()) ||
+ (FLY_AT_PARA == pAnchor->GetAnchorId())) &&
nTblStt <= pAPos->nNode.GetIndex() &&
pAPos->nNode.GetIndex() < nTblEnd )
{
@@ -3253,7 +3249,7 @@ void InsertSort( SvULongs& rArr, ULONG nIdx, USHORT* pInsPos )
*pInsPos = nU;
}
-#if defined( JP_DEBUG ) && !defined( PRODUCT )
+#if defined( JP_DEBUG ) && defined(DBG_UTIL)
void DumpDoc( SwDoc* pDoc, const String& rFileNm )
diff --git a/sw/source/core/undo/untblk.cxx b/sw/source/core/undo/untblk.cxx
index e6aad03906..4893f6a90a 100644
--- a/sw/source/core/undo/untblk.cxx
+++ b/sw/source/core/undo/untblk.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: untblk.cxx,v $
- * $Revision: 1.16 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -69,10 +66,10 @@ SwUndoInserts::SwUndoInserts( SwUndoId nUndoId, const SwPaM& rPam )
for( USHORT n = 0; n < nArrLen; ++n )
{
SwFrmFmt* pFmt = (*pDoc->GetSpzFrmFmts())[n];
- const SwFmtAnchor* pAnchor = &pFmt->GetAnchor();
- const SwPosition* pAPos;
- if ( pAnchor->GetAnchorId() == FLY_AT_CNTNT &&
- 0 != ( pAPos = pAnchor->GetCntntAnchor()) &&
+ SwFmtAnchor const*const pAnchor = &pFmt->GetAnchor();
+ const SwPosition* pAPos = pAnchor->GetCntntAnchor();
+ if (pAPos &&
+ (pAnchor->GetAnchorId() == FLY_AT_PARA) &&
nSttNode == pAPos->nNode.GetIndex() )
{
if( !pFrmFmts )
@@ -124,10 +121,10 @@ void SwUndoInserts::SetInsertRange( const SwPaM& rPam, BOOL bScanFlys,
for( USHORT n = 0; n < nArrLen; ++n )
{
SwFrmFmt* pFmt = (*pDoc->GetSpzFrmFmts())[n];
- const SwFmtAnchor* pAnchor = &pFmt->GetAnchor();
- const SwPosition* pAPos;
- if( pAnchor->GetAnchorId() == FLY_AT_CNTNT &&
- 0 != ( pAPos = pAnchor->GetCntntAnchor()) &&
+ SwFmtAnchor const*const pAnchor = &pFmt->GetAnchor();
+ SwPosition const*const pAPos = pAnchor->GetCntntAnchor();
+ if (pAPos &&
+ (pAnchor->GetAnchorId() == FLY_AT_PARA) &&
nSttNode == pAPos->nNode.GetIndex() )
{
if( !pFrmFmts ||