summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMichael Stahl <mst@openoffice.org>2010-01-05 16:37:41 +0100
committerMichael Stahl <mst@openoffice.org>2010-01-05 16:37:41 +0100
commit733b831970204059b9d89eff203551d6d3bf4bbe (patch)
tree4ba13335cba78b98026eedee44ebf47da129bfa9 /sw
parentc941bb6a756a79a5c0ae1d903cc50399d8200812 (diff)
swunolocking1: swtypes.hxx: rename frame anchor types
enum RndStdIds: rename frame anchor types (FLY_*) to be more intuitive. [note the completely ridiculous number of files that care about anchor types]
Diffstat (limited to 'sw')
-rw-r--r--sw/inc/dcontact.hxx10
-rw-r--r--sw/inc/fmtanchr.hxx4
-rw-r--r--sw/inc/swtypes.hxx10
-rw-r--r--sw/source/core/access/accframe.cxx6
-rw-r--r--sw/source/core/access/accfrmobj.cxx6
-rw-r--r--sw/source/core/doc/doc.cxx4
-rw-r--r--sw/source/core/doc/docbm.cxx33
-rw-r--r--sw/source/core/doc/docdraw.cxx10
-rw-r--r--sw/source/core/doc/docedt.cxx38
-rw-r--r--sw/source/core/doc/docfly.cxx52
-rw-r--r--sw/source/core/doc/docglbl.cxx22
-rw-r--r--sw/source/core/doc/doclay.cxx98
-rw-r--r--sw/source/core/doc/docnew.cxx2
-rw-r--r--sw/source/core/doc/docsort.cxx19
-rw-r--r--sw/source/core/doc/poolfmt.cxx18
-rw-r--r--sw/source/core/doc/tblcpy.cxx12
-rw-r--r--sw/source/core/docnode/ndcopy.cxx47
-rw-r--r--sw/source/core/docnode/ndtbl.cxx19
-rw-r--r--sw/source/core/docnode/node.cxx6
-rw-r--r--sw/source/core/docnode/swbaslnk.cxx30
-rw-r--r--sw/source/core/draw/dcontact.cxx26
-rw-r--r--sw/source/core/draw/dview.cxx14
-rw-r--r--sw/source/core/edit/autofmt.cxx2
-rw-r--r--sw/source/core/fields/expfld.cxx15
-rw-r--r--sw/source/core/frmedt/fecopy.cxx73
-rw-r--r--sw/source/core/frmedt/fefly1.cxx84
-rw-r--r--sw/source/core/frmedt/feshview.cxx24
-rw-r--r--sw/source/core/frmedt/fews.cxx18
-rw-r--r--sw/source/core/frmedt/tblsel.cxx9
-rw-r--r--sw/source/core/inc/flyfrm.hxx8
-rw-r--r--sw/source/core/layout/anchoreddrawobject.cxx16
-rw-r--r--sw/source/core/layout/anchoredobject.cxx12
-rw-r--r--sw/source/core/layout/atrfrm.cxx75
-rw-r--r--sw/source/core/layout/calcmove.cxx6
-rw-r--r--sw/source/core/layout/flowfrm.cxx2
-rw-r--r--sw/source/core/layout/fly.cxx19
-rw-r--r--sw/source/core/layout/flycnt.cxx2
-rw-r--r--sw/source/core/layout/flylay.cxx9
-rw-r--r--sw/source/core/layout/flypos.cxx8
-rw-r--r--sw/source/core/layout/frmtool.cxx27
-rw-r--r--sw/source/core/layout/laycache.cxx11
-rw-r--r--sw/source/core/layout/objectformatter.cxx2
-rw-r--r--sw/source/core/layout/objectformattertxtfrm.cxx6
-rw-r--r--sw/source/core/layout/pagechg.cxx12
-rw-r--r--sw/source/core/layout/sortedobjsimpl.cxx41
-rw-r--r--sw/source/core/layout/tabfrm.cxx8
-rw-r--r--sw/source/core/layout/wsfrm.cxx10
-rw-r--r--sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx6
-rw-r--r--sw/source/core/text/EnhancedPDFExportHelper.cxx12
-rw-r--r--sw/source/core/text/itratr.cxx6
-rw-r--r--sw/source/core/text/porfly.cxx5
-rw-r--r--sw/source/core/text/txtfly.cxx50
-rw-r--r--sw/source/core/text/txtfrm.cxx20
-rw-r--r--sw/source/core/txtnode/atrflyin.cxx10
-rw-r--r--sw/source/core/txtnode/thints.cxx8
-rw-r--r--sw/source/core/undo/rolbck.cxx2
-rw-r--r--sw/source/core/undo/unattr.cxx16
-rw-r--r--sw/source/core/undo/undel.cxx4
-rw-r--r--sw/source/core/undo/undobj.cxx6
-rw-r--r--sw/source/core/undo/undobj1.cxx91
-rw-r--r--sw/source/core/undo/undraw.cxx37
-rw-r--r--sw/source/core/undo/untbl.cxx10
-rw-r--r--sw/source/core/undo/untblk.cxx16
-rw-r--r--sw/source/core/unocore/unodraw.cxx46
-rw-r--r--sw/source/core/unocore/unoframe.cxx23
-rw-r--r--sw/source/core/unocore/unoobj2.cxx3
-rw-r--r--sw/source/core/view/vdraw.cxx9
-rw-r--r--sw/source/filter/basflt/shellio.cxx19
-rw-r--r--sw/source/filter/html/css1atr.cxx10
-rw-r--r--sw/source/filter/html/htmlcss1.cxx13
-rw-r--r--sw/source/filter/html/htmldraw.cxx14
-rw-r--r--sw/source/filter/html/htmlfly.cxx20
-rw-r--r--sw/source/filter/html/htmlforw.cxx7
-rw-r--r--sw/source/filter/html/htmlgrin.cxx30
-rw-r--r--sw/source/filter/html/htmlplug.cxx8
-rw-r--r--sw/source/filter/html/swhtml.cxx36
-rw-r--r--sw/source/filter/inc/fltshell.hxx4
-rw-r--r--sw/source/filter/rtf/rtfatr.cxx20
-rw-r--r--sw/source/filter/rtf/rtffly.cxx17
-rw-r--r--sw/source/filter/rtf/swparrtf.cxx28
-rw-r--r--sw/source/filter/rtf/wrtrtf.cxx7
-rw-r--r--sw/source/filter/ww1/fltshell.cxx13
-rw-r--r--sw/source/filter/ww1/w1sprm.cxx10
-rw-r--r--sw/source/filter/ww8/writerhelper.cxx2
-rw-r--r--sw/source/filter/ww8/wrtw8esh.cxx16
-rw-r--r--sw/source/filter/ww8/wrtw8nds.cxx13
-rw-r--r--sw/source/filter/ww8/wrtww8.cxx2
-rw-r--r--sw/source/filter/ww8/wrtww8gr.cxx6
-rw-r--r--sw/source/filter/ww8/ww8atr.cxx8
-rw-r--r--sw/source/filter/ww8/ww8glsy.cxx13
-rw-r--r--sw/source/filter/ww8/ww8graf.cxx20
-rw-r--r--sw/source/filter/ww8/ww8graf2.cxx8
-rw-r--r--sw/source/filter/ww8/ww8par.cxx2
-rw-r--r--sw/source/filter/ww8/ww8par2.cxx13
-rw-r--r--sw/source/filter/ww8/ww8par4.cxx8
-rw-r--r--sw/source/filter/ww8/ww8par5.cxx8
-rw-r--r--sw/source/filter/ww8/ww8par6.cxx24
-rw-r--r--sw/source/filter/xml/xmltexti.cxx5
-rw-r--r--sw/source/ui/app/appenv.cxx20
-rw-r--r--sw/source/ui/app/applab.cxx18
-rw-r--r--sw/source/ui/dbui/mmlayoutpage.cxx6
-rw-r--r--sw/source/ui/dialog/regionsw.cxx23
-rw-r--r--sw/source/ui/docvw/edtwin.cxx25
-rw-r--r--sw/source/ui/frmdlg/column.cxx2
-rw-r--r--sw/source/ui/frmdlg/frmmgr.cxx27
-rw-r--r--sw/source/ui/frmdlg/frmpage.cxx60
-rw-r--r--sw/source/ui/frmdlg/wrap.cxx54
-rw-r--r--sw/source/ui/ribbar/conrect.cxx11
-rw-r--r--sw/source/ui/ribbar/drawbase.cxx3
-rw-r--r--sw/source/ui/shells/basesh.cxx58
-rw-r--r--sw/source/ui/shells/drwbassh.cxx12
-rw-r--r--sw/source/ui/shells/textdrw.cxx6
-rw-r--r--sw/source/ui/shells/textidx.cxx6
-rw-r--r--sw/source/ui/shells/textsh.cxx12
-rw-r--r--sw/source/ui/uiview/view2.cxx19
-rw-r--r--sw/source/ui/uiview/viewtab.cxx4
-rw-r--r--sw/source/ui/utlui/attrdesc.cxx8
-rw-r--r--sw/source/ui/wrtsh/select.cxx6
118 files changed, 1003 insertions, 1146 deletions
diff --git a/sw/inc/dcontact.hxx b/sw/inc/dcontact.hxx
index e1f20183deca..dc767403d1d5 100644
--- a/sw/inc/dcontact.hxx
+++ b/sw/inc/dcontact.hxx
@@ -191,11 +191,11 @@ public:
}
RndStdIds GetAnchorId() const { return GetAnchorFmt().GetAnchorId(); }
- bool ObjAnchoredAtPage() const { return GetAnchorId() == FLY_PAGE; }
- bool ObjAnchoredAtFly() const { return GetAnchorId() == FLY_AT_FLY; }
- bool ObjAnchoredAtPara() const { return GetAnchorId() == FLY_AT_CNTNT; }
- bool ObjAnchoredAtChar() const { return GetAnchorId() == FLY_AUTO_CNTNT; }
- bool ObjAnchoredAsChar() const { return GetAnchorId() == FLY_IN_CNTNT; }
+ bool ObjAnchoredAtPage() const { return GetAnchorId() == FLY_AT_PAGE; }
+ bool ObjAnchoredAtFly() const { return GetAnchorId() == FLY_AT_FLY; }
+ bool ObjAnchoredAtPara() const { return GetAnchorId() == FLY_AT_PARA; }
+ bool ObjAnchoredAtChar() const { return GetAnchorId() == FLY_AT_CHAR; }
+ bool ObjAnchoredAsChar() const { return GetAnchorId() == FLY_AS_CHAR; }
const SwPosition& GetCntntAnchor() const
{
diff --git a/sw/inc/fmtanchr.hxx b/sw/inc/fmtanchr.hxx
index fd6975205347..df544884dd51 100644
--- a/sw/inc/fmtanchr.hxx
+++ b/sw/inc/fmtanchr.hxx
@@ -55,7 +55,7 @@ class SW_DLLPUBLIC SwFmtAnchor: public SfxPoolItem
static sal_uInt32 mnOrderCounter;
public:
- SwFmtAnchor( RndStdIds eRnd = FLY_PAGE, USHORT nPageNum = 0 );
+ SwFmtAnchor( RndStdIds eRnd = FLY_AT_PAGE, USHORT nPageNum = 0 );
SwFmtAnchor( const SwFmtAnchor &rCpy );
~SwFmtAnchor();
@@ -86,7 +86,7 @@ public:
};
inline const SwFmtAnchor &SwAttrSet::GetAnchor(BOOL bInP) const
- { return (const SwFmtAnchor&)Get( RES_ANCHOR,bInP); }
+ { return static_cast<const SwFmtAnchor&>(Get(RES_ANCHOR, bInP)); }
inline const SwFmtAnchor &SwFmt::GetAnchor(BOOL bInP) const
{ return aSet.GetAnchor(bInP); }
diff --git a/sw/inc/swtypes.hxx b/sw/inc/swtypes.hxx
index 64cd8231f0ef..fbb90658098d 100644
--- a/sw/inc/swtypes.hxx
+++ b/sw/inc/swtypes.hxx
@@ -166,11 +166,11 @@ const short lOutlineMinTextDistance = 216; // 0.15 inch = 0.38 cm
//Schnittstellen Bedeutung haben (SwDoc).
enum RndStdIds
{
- FLY_AT_CNTNT, //Absatzgebundener Rahmen
- FLY_IN_CNTNT, //Zeichengebundener Rahmen
- FLY_PAGE, //Seitengebundener Rahmen
- FLY_AT_FLY, //Rahmengebundener Rahmen ( LAYER_IMPL )
- FLY_AUTO_CNTNT, //Automatisch positionierter, absatzgebundener Rahmen
+ FLY_AT_PARA, // anchored at paragraph
+ FLY_AS_CHAR, // anchored as character
+ FLY_AT_PAGE, // anchored at page
+ FLY_AT_FLY, // anchored at frame
+ FLY_AT_CHAR, // anchored at character
//Der Rest wird nur fuer SS benutzt.
RND_STD_HEADER,
RND_STD_FOOTER,
diff --git a/sw/source/core/access/accframe.cxx b/sw/source/core/access/accframe.cxx
index a62afc11e551..f6778c1564b8 100644
--- a/sw/source/core/access/accframe.cxx
+++ b/sw/source/core/access/accframe.cxx
@@ -438,7 +438,7 @@ const SwFrm *SwAccessibleFrame::GetParent( const SwFrmOrObj& rFrmOrObj,
const SwFlyFrm *pFly = static_cast< const SwFlyFrm *>( pFrm );
if( pFly->IsFlyInCntFrm() )
{
- // For FLY_IN_CNTNT the parent is the anchor
+ // For FLY_AS_CHAR the parent is the anchor
aParent = pFly->GetAnchorFrm();
ASSERT( aParent.IsAccessible( bInPagePreview ),
"parent is not accessible" );
@@ -471,9 +471,9 @@ const SwFrm *SwAccessibleFrame::GetParent( const SwFrmOrObj& rFrmOrObj,
{
const SwFrmFmt *pFrmFmt = pContact->GetFmt();
ASSERT( pFrmFmt, "frame format is missing" );
- if( pFrmFmt && FLY_IN_CNTNT == pFrmFmt->GetAnchor().GetAnchorId() )
+ if (pFrmFmt && FLY_AS_CHAR == pFrmFmt->GetAnchor().GetAnchorId())
{
- // For FLY_IN_CNTNT the parent is the anchor
+ // For FLY_AS_CHAR the parent is the anchor
aParent = pContact->GetAnchorFrm();
ASSERT( aParent.IsAccessible( bInPagePreview ),
"parent is not accessible" );
diff --git a/sw/source/core/access/accfrmobj.cxx b/sw/source/core/access/accfrmobj.cxx
index f16d11692c9c..c7822e80ea72 100644
--- a/sw/source/core/access/accfrmobj.cxx
+++ b/sw/source/core/access/accfrmobj.cxx
@@ -59,8 +59,10 @@ sal_Bool SwFrmOrObj::IsBoundAsChar() const
else
{
const SwFrmFmt *pFrmFmt = pObj ? ::FindFrmFmt( pObj ) : 0;
- return pFrmFmt ? static_cast<sal_Bool>(FLY_IN_CNTNT == pFrmFmt->GetAnchor().GetAnchorId())
- : sal_False;
+ return (pFrmFmt)
+ ? static_cast<sal_Bool>(FLY_AS_CHAR ==
+ pFrmFmt->GetAnchor().GetAnchorId())
+ : sal_False;
}
}
diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx
index 0c18b725d9f7..cacd46da9faf 100644
--- a/sw/source/core/doc/doc.cxx
+++ b/sw/source/core/doc/doc.cxx
@@ -95,9 +95,7 @@
#include <fldupde.hxx>
#include <swbaslnk.hxx>
#include <printdata.hxx>
-#ifndef _CMDID_H
#include <cmdid.h> // fuer den dflt - Printer in SetJob
-#endif
#ifndef _STATSTR_HRC
#include <statstr.hrc> // StatLine-String
#endif
@@ -923,7 +921,7 @@ SwFlyFrmFmt* SwDoc::_InsNoTxtNode( const SwPosition& rPos, SwNoTxtNode* pNode,
SwFlyFrmFmt *pFmt = 0;
if( pNode )
{
- pFmt = _MakeFlySection( rPos, *pNode, FLY_AT_CNTNT,
+ pFmt = _MakeFlySection( rPos, *pNode, FLY_AT_PARA,
pFlyAttrSet, pFrmFmt );
if( pGrfAttrSet )
pNode->SetAttr( *pGrfAttrSet );
diff --git a/sw/source/core/doc/docbm.cxx b/sw/source/core/doc/docbm.cxx
index e1b4f3ee4322..924a677785ee 100644
--- a/sw/source/core/doc/docbm.cxx
+++ b/sw/source/core/doc/docbm.cxx
@@ -1259,7 +1259,6 @@ void _SaveCntntIdx(SwDoc* pDoc,
SwCntntNode *pNode = pDoc->GetNodes()[nNode]->GetCntntNode();
if( pNode )
{
- const SwPosition* pAPos;
SwFrm* pFrm = pNode->GetFrm();
#if OSL_DEBUG_LEVEL > 1
@@ -1277,16 +1276,18 @@ void _SaveCntntIdx(SwDoc* pDoc,
SwAnchoredObject* pObj = rDObj[ --n ];
const SwFrmFmt& rFmt = pObj->GetFrmFmt();
const SwFmtAnchor& rAnchor = rFmt.GetAnchor();
- if( ( ( nSaveFly && FLY_AT_CNTNT == rAnchor.GetAnchorId() ) ||
- FLY_AUTO_CNTNT == rAnchor.GetAnchorId() ) &&
- ( 0 != ( pAPos = rAnchor.GetCntntAnchor() ) ) )
+ SwPosition const*const pAPos = rAnchor.GetCntntAnchor();
+ if ( pAPos &&
+ ( ( nSaveFly &&
+ FLY_AT_PARA == rAnchor.GetAnchorId() ) ||
+ ( FLY_AT_CHAR == rAnchor.GetAnchorId() ) ) )
{
aSave.SetType( 0x2000 );
aSave.SetContent( pAPos->nContent.GetIndex() );
OSL_ENSURE( nNode == pAPos->nNode.GetIndex(),
"_SaveCntntIdx: Wrong Node-Index" );
- if( FLY_AUTO_CNTNT == rAnchor.GetAnchorId() )
+ if ( FLY_AT_CHAR == rAnchor.GetAnchorId() )
{
if( nCntnt <= aSave.GetContent() )
{
@@ -1321,14 +1322,14 @@ void _SaveCntntIdx(SwDoc* pDoc,
continue;
const SwFmtAnchor& rAnchor = pFrmFmt->GetAnchor();
- if( ( FLY_AT_CNTNT == rAnchor.GetAnchorId() ||
- FLY_AUTO_CNTNT == rAnchor.GetAnchorId() ) &&
- 0 != ( pAPos = rAnchor.GetCntntAnchor()) &&
- nNode == pAPos->nNode.GetIndex() )
+ SwPosition const*const pAPos = rAnchor.GetCntntAnchor();
+ if ( pAPos && ( nNode == pAPos->nNode.GetIndex() ) &&
+ ( FLY_AT_PARA == rAnchor.GetAnchorId() ||
+ FLY_AT_CHAR == rAnchor.GetAnchorId() ) )
{
aSave.SetType( 0x2000 );
aSave.SetContent( pAPos->nContent.GetIndex() );
- if( FLY_AUTO_CNTNT == rAnchor.GetAnchorId() )
+ if ( FLY_AT_CHAR == rAnchor.GetAnchorId() )
{
if( nCntnt <= aSave.GetContent() )
{
@@ -1444,11 +1445,15 @@ void _RestoreCntntIdx(SwDoc* pDoc,
SwFmtAnchor aNew( rFlyAnchor );
SwPosition aNewPos( *rFlyAnchor.GetCntntAnchor() );
aNewPos.nNode = *pCNd;
- if( FLY_AUTO_CNTNT == rFlyAnchor.GetAnchorId() )
+ if ( FLY_AT_CHAR == rFlyAnchor.GetAnchorId() )
+ {
aNewPos.nContent.Assign( pCNd,
aSave.GetContent() + nOffset );
+ }
else
+ {
aNewPos.nContent.Assign( 0, 0 );
+ }
aNew.SetAnchor( &aNewPos );
pFrmFmt->SetFmtAttr( aNew );
}
@@ -1608,11 +1613,15 @@ void _RestoreCntntIdx(SvULongs& rSaveArr,
SwFmtAnchor aNew( rFlyAnchor );
SwPosition aNewPos( *rFlyAnchor.GetCntntAnchor() );
aNewPos.nNode = rNd;
- if( FLY_AUTO_CNTNT == rFlyAnchor.GetAnchorId() )
+ if ( FLY_AT_CHAR == rFlyAnchor.GetAnchorId() )
+ {
aNewPos.nContent.Assign( pCNd, Min(
aSave.GetContent(), nLen ) );
+ }
else
+ {
aNewPos.nContent.Assign( 0, 0 );
+ }
aNew.SetAnchor( &aNewPos );
pFrmFmt->SetFmtAttr( aNew );
}
diff --git a/sw/source/core/doc/docdraw.cxx b/sw/source/core/doc/docdraw.cxx
index 95e18a7e78af..4ab6f8541e02 100644
--- a/sw/source/core/doc/docdraw.cxx
+++ b/sw/source/core/doc/docdraw.cxx
@@ -32,9 +32,7 @@
#include "precompiled_sw.hxx"
#include <hintids.hxx>
#include <rtl/logfile.hxx>
-#ifndef _OUTDEV_HXX //autogen
#include <vcl/outdev.hxx>
-#endif
#include <sfx2/printer.hxx>
#include <svx/eeitem.hxx>
#include <svx/flditem.hxx>
@@ -46,22 +44,16 @@
#include <svx/langitem.hxx>
#include <svx/unolingu.hxx>
-#ifndef _SVDOMEAS_HXX
#include <svx/svdfield.hxx>
-#endif
#include <svx/svdpool.hxx>
#include <fmtanchr.hxx>
#include <charatr.hxx>
#include <frmfmt.hxx>
#include <charfmt.hxx>
#include <viewimp.hxx>
-#ifndef _SWHINTS_HXX
#include <swhints.hxx>
-#endif
#include <doc.hxx>
-#ifndef _DOCSH_HXX
#include <docsh.hxx>
-#endif
#include <rootfrm.hxx> //Damit der RootDtor gerufen wird.
#include <poolfmt.hxx>
#include <viewsh.hxx> // fuer MakeDrawView
@@ -481,7 +473,7 @@ BOOL SwDoc::DeleteSelection( SwDrawView& rDrawView )
SwDrawContact *pC = (SwDrawContact*)GetUserCall(pObj);
SwDrawFrmFmt *pFrmFmt = (SwDrawFrmFmt*)pC->GetFmt();
if( pFrmFmt &&
- FLY_IN_CNTNT == pFrmFmt->GetAnchor().GetAnchorId() )
+ FLY_AS_CHAR == pFrmFmt->GetAnchor().GetAnchorId() )
{
rDrawView.MarkObj( pObj, rDrawView.Imp().GetPageView(), TRUE );
--i;
diff --git a/sw/source/core/doc/docedt.cxx b/sw/source/core/doc/docedt.cxx
index ddc6024c89ae..61c89cc579e2 100644
--- a/sw/source/core/doc/docedt.cxx
+++ b/sw/source/core/doc/docedt.cxx
@@ -220,17 +220,15 @@ void _RestFlyInRange( _SaveFlyArr & rArr, const SwNodeIndex& rSttIdx,
void _SaveFlyInRange( const SwNodeRange& rRg, _SaveFlyArr& rArr )
{
- SwFrmFmt* pFmt;
- const SwFmtAnchor* pAnchor;
- const SwPosition* pAPos;
SwSpzFrmFmts& rFmts = *rRg.aStart.GetNode().GetDoc()->GetSpzFrmFmts();
for( sal_uInt16 n = 0; n < rFmts.Count(); ++n )
{
- pFmt = (SwFrmFmt*)rFmts[n];
- pAnchor = &pFmt->GetAnchor();
- if( ( FLY_AT_CNTNT == pAnchor->GetAnchorId() ||
- FLY_AUTO_CNTNT == pAnchor->GetAnchorId() ) &&
- 0 != ( pAPos = pAnchor->GetCntntAnchor() ) &&
+ SwFrmFmt *const pFmt = static_cast<SwFrmFmt*>(rFmts[n]);
+ SwFmtAnchor const*const pAnchor = &pFmt->GetAnchor();
+ SwPosition const*const pAPos = pAnchor->GetCntntAnchor();
+ if (pAPos &&
+ ((FLY_AT_PARA == pAnchor->GetAnchorId()) ||
+ (FLY_AT_CHAR == pAnchor->GetAnchorId())) &&
rRg.aStart <= pAPos->nNode && pAPos->nNode < rRg.aEnd )
{
_SaveFly aSave( pAPos->nNode.GetIndex() - rRg.aStart.GetIndex(),
@@ -260,7 +258,6 @@ void _SaveFlyInRange( const SwPaM& rPam, const SwNodeIndex& rInsPos,
pPos->nContent == rEndNdIdx.GetNode().GetCntntNode()->Len() ))
? 0 : 1;
- const SwPosition* pAPos;
const SwNodeIndex* pCntntIdx;
for( sal_uInt16 n = 0; n < rFmts.Count(); ++n )
@@ -268,9 +265,10 @@ void _SaveFlyInRange( const SwPaM& rPam, const SwNodeIndex& rInsPos,
sal_Bool bInsPos = sal_False;
pFmt = (SwFrmFmt*)rFmts[n];
pAnchor = &pFmt->GetAnchor();
- if( ( FLY_AT_CNTNT == pAnchor->GetAnchorId() ||
- FLY_AUTO_CNTNT == pAnchor->GetAnchorId() ) &&
- 0 != ( pAPos = pAnchor->GetCntntAnchor() ) &&
+ const SwPosition* pAPos = pAnchor->GetCntntAnchor();
+ if (pAPos &&
+ ((FLY_AT_PARA == pAnchor->GetAnchorId()) ||
+ (FLY_AT_CHAR == pAnchor->GetAnchorId())) &&
// nicht verschieben, wenn die InsPos im CntntBereich vom Fly ist
( 0 == ( pCntntIdx = pFmt->GetCntnt().GetCntntIdx() ) ||
!( *pCntntIdx < rInsPos &&
@@ -317,14 +315,14 @@ void DelFlyInRange( const SwNodeIndex& rMkNdIdx,
SwDoc* pDoc = rMkNdIdx.GetNode().GetDoc();
SwSpzFrmFmts& rTbl = *pDoc->GetSpzFrmFmts();
- const SwPosition* pAPos;
for ( sal_uInt16 i = rTbl.Count(); i; )
{
SwFrmFmt *pFmt = rTbl[--i];
const SwFmtAnchor &rAnch = pFmt->GetAnchor();
- if( ( rAnch.GetAnchorId() == FLY_AT_CNTNT ||
- rAnch.GetAnchorId() == FLY_AUTO_CNTNT ) &&
- 0 != ( pAPos = rAnch.GetCntntAnchor() ) &&
+ SwPosition const*const pAPos = rAnch.GetCntntAnchor();
+ if (pAPos &&
+ ((rAnch.GetAnchorId() == FLY_AT_PARA) ||
+ (rAnch.GetAnchorId() == FLY_AT_CHAR)) &&
( bDelFwrd
? rMkNdIdx < pAPos->nNode && pAPos->nNode <= rPtNdIdx
: rPtNdIdx <= pAPos->nNode && pAPos->nNode < rMkNdIdx ))
@@ -2620,14 +2618,14 @@ bool SwDoc::DelFullPara( SwPaM& rPam )
// was ist mit Fly's ??
{
// stehen noch FlyFrames rum, loesche auch diese
- const SwPosition* pAPos;
for( sal_uInt16 n = 0; n < GetSpzFrmFmts()->Count(); ++n )
{
SwFrmFmt* pFly = (*GetSpzFrmFmts())[n];
const SwFmtAnchor* pAnchor = &pFly->GetAnchor();
- if( ( FLY_AT_CNTNT == pAnchor->GetAnchorId() ||
- FLY_AUTO_CNTNT == pAnchor->GetAnchorId() ) &&
- 0 != ( pAPos = pAnchor->GetCntntAnchor() ) &&
+ SwPosition const*const pAPos = pAnchor->GetCntntAnchor();
+ if (pAPos &&
+ ((FLY_AT_PARA == pAnchor->GetAnchorId()) ||
+ (FLY_AT_CHAR == pAnchor->GetAnchorId())) &&
aRg.aStart <= pAPos->nNode && pAPos->nNode <= aRg.aEnd )
{
DelLayoutFmt( pFly );
diff --git a/sw/source/core/doc/docfly.cxx b/sw/source/core/doc/docfly.cxx
index 507e63ba7a47..a34dabb435cd 100644
--- a/sw/source/core/doc/docfly.cxx
+++ b/sw/source/core/doc/docfly.cxx
@@ -181,7 +181,7 @@ Point lcl_FindAnchorLayPos( SwDoc& rDoc, const SwFmtAnchor& rAnch,
if( rDoc.GetRootFrm() )
switch( rAnch.GetAnchorId() )
{
- case FLY_IN_CNTNT:
+ case FLY_AS_CHAR:
if( pFlyFmt && rAnch.GetCntntAnchor() )
{
const SwFrm* pOld = ((SwFlyFrmFmt*)pFlyFmt)->GetFrm( &aRet, FALSE );
@@ -190,8 +190,8 @@ Point lcl_FindAnchorLayPos( SwDoc& rDoc, const SwFmtAnchor& rAnch,
}
break;
- case FLY_AT_CNTNT:
- case FLY_AUTO_CNTNT: // LAYER_IMPL
+ case FLY_AT_PARA:
+ case FLY_AT_CHAR: // LAYER_IMPL
if( rAnch.GetCntntAnchor() )
{
const SwPosition *pPos = rAnch.GetCntntAnchor();
@@ -213,7 +213,7 @@ Point lcl_FindAnchorLayPos( SwDoc& rDoc, const SwFmtAnchor& rAnch,
}
break;
- case FLY_PAGE:
+ case FLY_AT_PAGE:
{
USHORT nPgNum = rAnch.GetPageNum();
const SwPageFrm *pPage = (SwPageFrm*)rDoc.GetRootFrm()->Lower();
@@ -249,9 +249,11 @@ sal_Int8 SwDoc::SetFlyFrmAnchor( SwFrmFmt& rFmt, SfxItemSet& rSet, BOOL bNewFrms
// ist der neue ein gueltiger Anker?
if( !aNewAnch.GetCntntAnchor() && (FLY_AT_FLY == nNew ||
- FLY_AT_CNTNT == nNew || FLY_IN_CNTNT == nNew ||
- FLY_AUTO_CNTNT == nNew ))
+ (FLY_AT_PARA == nNew) || (FLY_AS_CHAR == nNew) ||
+ (FLY_AT_CHAR == nNew) ))
+ {
return IGNOREANCHOR;
+ }
if( nOld == nNew )
return DONTMAKEFRMS;
@@ -264,7 +266,7 @@ sal_Int8 SwDoc::SetFlyFrmAnchor( SwFrmFmt& rFmt, SfxItemSet& rSet, BOOL bNewFrms
//doppeltes hiden waere so eine art Show!
rFmt.DelFrms();
- if( FLY_IN_CNTNT == nOld )
+ if ( FLY_AS_CHAR == nOld )
{
//Bei InCntnt's wird es spannend: Das TxtAttribut muss vernichtet
//werden. Leider reisst dies neben den Frms auch noch das Format mit
@@ -295,7 +297,7 @@ sal_Int8 SwDoc::SetFlyFrmAnchor( SwFrmFmt& rFmt, SfxItemSet& rSet, BOOL bNewFrms
const SfxPoolItem* pItem;
switch( nNew )
{
- case FLY_IN_CNTNT:
+ case FLY_AS_CHAR:
//Wenn keine Positionsattribute hereinkommen, dann muss dafuer
//gesorgt werden, das keine unerlaubte automatische Ausrichtung
//bleibt.
@@ -326,10 +328,10 @@ sal_Int8 SwDoc::SetFlyFrmAnchor( SwFrmFmt& rFmt, SfxItemSet& rSet, BOOL bNewFrms
}
break;
- case FLY_AT_CNTNT:
- case FLY_AUTO_CNTNT: // LAYER_IMPL
+ case FLY_AT_PARA:
+ case FLY_AT_CHAR: // LAYER_IMPL
case FLY_AT_FLY: // LAYER_IMPL
- case FLY_PAGE:
+ case FLY_AT_PAGE:
{
//Wenn keine Positionsattribute hereinschneien korrigieren wir
//die Position so, dass die Dokumentkoordinaten des Flys erhalten
@@ -345,7 +347,7 @@ sal_Int8 SwDoc::SetFlyFrmAnchor( SwFrmFmt& rFmt, SfxItemSet& rSet, BOOL bNewFrms
if( text::HoriOrientation::NONE == aOldH.GetHoriOrient() && ( !pItem ||
aOldH.GetPos() == ((SwFmtHoriOrient*)pItem)->GetPos() ))
{
- SwTwips nPos = FLY_IN_CNTNT == nOld ? 0 : aOldH.GetPos();
+ SwTwips nPos = (FLY_AS_CHAR == nOld) ? 0 : aOldH.GetPos();
nPos += aOldAnchorPos.X() - aNewAnchorPos.X();
if( pItem )
@@ -367,7 +369,7 @@ sal_Int8 SwDoc::SetFlyFrmAnchor( SwFrmFmt& rFmt, SfxItemSet& rSet, BOOL bNewFrms
if( text::VertOrientation::NONE == aOldV.GetVertOrient() && (!pItem ||
aOldV.GetPos() == ((SwFmtVertOrient*)pItem)->GetPos() ) )
{
- SwTwips nPos = FLY_IN_CNTNT == nOld ? 0 : aOldV.GetPos();
+ SwTwips nPos = (FLY_AS_CHAR == nOld) ? 0 : aOldV.GetPos();
nPos += aOldAnchorPos.Y() - aNewAnchorPos.Y();
if( pItem )
{
@@ -698,7 +700,7 @@ sal_Bool SwDoc::ChgAnchor( const SdrMarkList& _rMrkList,
// xub_StrLen nIndx = STRING_NOTFOUND;
const SwPosition* pOldAsCharAnchorPos( 0L );
const RndStdIds eOldAnchorType = pContact->GetAnchorId();
- if ( !_bSameOnly && eOldAnchorType == FLY_IN_CNTNT )
+ if ( !_bSameOnly && eOldAnchorType == FLY_AS_CHAR )
{
pOldAsCharAnchorPos = new SwPosition( pContact->GetCntntAnchor() );
}
@@ -713,8 +715,8 @@ sal_Bool SwDoc::ChgAnchor( const SdrMarkList& _rMrkList,
switch ( _eAnchorType )
{
- case FLY_AT_CNTNT:
- case FLY_AUTO_CNTNT:
+ case FLY_AT_PARA:
+ case FLY_AT_CHAR:
{
const Point aNewPoint = pOldAnchorFrm &&
( pOldAnchorFrm->IsVertical() ||
@@ -768,10 +770,10 @@ sal_Bool SwDoc::ChgAnchor( const SdrMarkList& _rMrkList,
break;
}
- aNewAnch.SetType( FLY_PAGE );
+ aNewAnch.SetType( FLY_AT_PAGE );
// no break
}
- case FLY_PAGE:
+ case FLY_AT_PAGE:
{
pNewAnchorFrm = GetRootFrm()->Lower();
while ( pNewAnchorFrm && !pNewAnchorFrm->Frm().IsInside( aPt ) )
@@ -782,7 +784,7 @@ sal_Bool SwDoc::ChgAnchor( const SdrMarkList& _rMrkList,
aNewAnch.SetPageNum( ((SwPageFrm*)pNewAnchorFrm)->GetPhyPageNum());
}
break;
- case FLY_IN_CNTNT:
+ case FLY_AS_CHAR:
if( _bSameOnly ) // Positions/Groessenaenderung
{
if( !pOldAnchorFrm )
@@ -805,7 +807,7 @@ sal_Bool SwDoc::ChgAnchor( const SdrMarkList& _rMrkList,
bUnmark = ( 0 != i );
Point aPoint( aPt );
aPoint.X() -= 1; // nicht im DrawObj landen!!
- aNewAnch.SetType( FLY_IN_CNTNT );
+ aNewAnch.SetType( FLY_AS_CHAR );
SwPosition aPos( *((SwCntntFrm*)pNewAnchorFrm)->GetNode() );
if ( pNewAnchorFrm->Frm().IsInside( aPoint ) )
{
@@ -839,7 +841,7 @@ sal_Bool SwDoc::ChgAnchor( const SdrMarkList& _rMrkList,
ASSERT( !this, "unexpected AnchorId." );
}
- if ( (FLY_IN_CNTNT != _eAnchorType) &&
+ if ( (FLY_AS_CHAR != _eAnchorType) &&
pNewAnchorFrm &&
( !_bSameOnly || pNewAnchorFrm != pOldAnchorFrm ) )
{
@@ -949,8 +951,8 @@ int SwDoc::Chainable( const SwFrmFmt &rSource, const SwFrmFmt &rDest )
const SwFmtAnchor& rAnchor = (*GetSpzFrmFmts())[ n ]->GetAnchor();
ULONG nTstSttNd;
// OD 11.12.2003 #i20622# - to-frame anchored objects are allowed.
- if ( ( rAnchor.GetAnchorId() == FLY_AT_CNTNT ||
- rAnchor.GetAnchorId() == FLY_AUTO_CNTNT ) &&
+ if ( ((rAnchor.GetAnchorId() == FLY_AT_PARA) ||
+ (rAnchor.GetAnchorId() == FLY_AT_CHAR)) &&
0 != rAnchor.GetCntntAnchor() &&
nFlySttNd <= ( nTstSttNd =
rAnchor.GetCntntAnchor()->nNode.GetIndex() ) &&
@@ -971,9 +973,9 @@ int SwDoc::Chainable( const SwFrmFmt &rSource, const SwFrmFmt &rDest )
&rDstAnchor = rDest.GetAnchor();
ULONG nEndOfExtras = GetNodes().GetEndOfExtras().GetIndex();
BOOL bAllowed = FALSE;
- if( FLY_PAGE == rSrcAnchor.GetAnchorId() )
+ if ( FLY_AT_PAGE == rSrcAnchor.GetAnchorId() )
{
- if( FLY_PAGE == rDstAnchor.GetAnchorId() ||
+ if ( (FLY_AT_PAGE == rDstAnchor.GetAnchorId()) ||
( rDstAnchor.GetCntntAnchor() &&
rDstAnchor.GetCntntAnchor()->nNode.GetIndex() > nEndOfExtras ))
bAllowed = TRUE;
diff --git a/sw/source/core/doc/docglbl.cxx b/sw/source/core/doc/docglbl.cxx
index 113319494e03..9bef76da7508 100644
--- a/sw/source/core/doc/docglbl.cxx
+++ b/sw/source/core/doc/docglbl.cxx
@@ -49,12 +49,8 @@
#include <docary.hxx>
#include <pam.hxx>
#include <ndtxt.hxx>
-#ifndef _DOCSH_HXX
#include <docsh.hxx>
-#endif
-#ifndef _GLOBDOC_HXX
#include <globdoc.hxx>
-#endif
#include <shellio.hxx>
#include <swundo.hxx> // fuer die UndoIds
#include <section.hxx>
@@ -371,14 +367,15 @@ BOOL SwDoc::SplitDoc( USHORT eDocType, const String& rPath,
CorrAbs( aSIdx, aEIdx, *aTmp.GetPoint(), TRUE);
// stehen noch FlyFrames rum, loesche auch diese
- const SwPosition* pAPos;
for( USHORT n = 0; n < GetSpzFrmFmts()->Count(); ++n )
{
SwFrmFmt* pFly = (*GetSpzFrmFmts())[n];
const SwFmtAnchor* pAnchor = &pFly->GetAnchor();
- if( ( FLY_AT_CNTNT == pAnchor->GetAnchorId() ||
- FLY_AUTO_CNTNT == pAnchor->GetAnchorId() ) &&
- 0 != ( pAPos = pAnchor->GetCntntAnchor() ) &&
+ SwPosition const*const pAPos =
+ pAnchor->GetCntntAnchor();
+ if (pAPos &&
+ ((FLY_AT_PARA == pAnchor->GetAnchorId()) ||
+ (FLY_AT_CHAR == pAnchor->GetAnchorId())) &&
aSIdx <= pAPos->nNode &&
pAPos->nNode < aEIdx )
{
@@ -717,14 +714,15 @@ BOOL SwDoc::SplitDoc( USHORT eDocType, const String& rPath, int nOutlineLevel )
CorrAbs( aSIdx, aEIdx, *aTmp.GetPoint(), TRUE);
// stehen noch FlyFrames rum, loesche auch diese
- const SwPosition* pAPos;
for( USHORT n = 0; n < GetSpzFrmFmts()->Count(); ++n )
{
SwFrmFmt* pFly = (*GetSpzFrmFmts())[n];
const SwFmtAnchor* pAnchor = &pFly->GetAnchor();
- if( ( FLY_AT_CNTNT == pAnchor->GetAnchorId() ||
- FLY_AUTO_CNTNT == pAnchor->GetAnchorId() ) &&
- 0 != ( pAPos = pAnchor->GetCntntAnchor() ) &&
+ SwPosition const*const pAPos =
+ pAnchor->GetCntntAnchor();
+ if (pAPos &&
+ ((FLY_AT_PARA == pAnchor->GetAnchorId()) ||
+ (FLY_AT_CHAR == pAnchor->GetAnchorId())) &&
aSIdx <= pAPos->nNode &&
pAPos->nNode < aEIdx )
{
diff --git a/sw/source/core/doc/doclay.cxx b/sw/source/core/doc/doclay.cxx
index 1af12a64bf2f..e58059d95ac9 100644
--- a/sw/source/core/doc/doclay.cxx
+++ b/sw/source/core/doc/doclay.cxx
@@ -68,9 +68,7 @@
#include <fmtfsize.hxx>
#include <fmtsrnd.hxx>
#include <fmtflcnt.hxx>
-#ifndef _FRMCNCT_HXX //autogen
#include <fmtcnct.hxx>
-#endif
#include <frmfmt.hxx>
#include <dcontact.hxx>
#include <txtflcnt.hxx>
@@ -85,9 +83,7 @@
#include <cntfrm.hxx>
#include <flyfrm.hxx>
#include <fesh.hxx>
-#ifndef _DOCSH_HXX
#include <docsh.hxx>
-#endif
#include <dflyobj.hxx>
#include <dcontact.hxx>
#include <swundo.hxx>
@@ -213,13 +209,12 @@ SwFrmFmt *SwDoc::MakeLayoutFmt( RndStdIds eRequest, const SfxItemSet* pSet )
break;
#ifndef PRODUCT
- case FLY_PAGE:
- case FLY_AUTO_CNTNT:
+ case FLY_AT_PAGE:
+ case FLY_AT_CHAR:
case FLY_AT_FLY:
- case FLY_AT_CNTNT:
- case FLY_IN_CNTNT:
- ASSERT( !this,
- "neue Schnittstelle benutzen: SwDoc::MakeFlySection!" );
+ case FLY_AT_PARA:
+ case FLY_AS_CHAR:
+ ASSERT( false, "use new interface instead: SwDoc::MakeFlySection!" );
break;
#endif
@@ -358,7 +353,7 @@ void SwDoc::DelLayoutFmt( SwFrmFmt *pFmt )
// ggfs. bei Zeichengebundenen Flys das Zeichen loeschen
const SwFmtAnchor& rAnchor = pFmt->GetAnchor();
- if( FLY_IN_CNTNT == rAnchor.GetAnchorId() && rAnchor.GetCntntAnchor())
+ if ((FLY_AS_CHAR == rAnchor.GetAnchorId()) && rAnchor.GetCntntAnchor())
{
const SwPosition* pPos = rAnchor.GetCntntAnchor();
SwTxtNode *pTxtNd = pPos->nNode.GetNode().GetTxtNode();
@@ -422,9 +417,9 @@ SwFrmFmt *SwDoc::CopyLayoutFmt( const SwFrmFmt& rSource,
static_cast<const SwDrawContact*>( rSource.FindContactObj() );
bMayNotCopy =
- ( FLY_AT_CNTNT == rNewAnchor.GetAnchorId() ||
- FLY_AT_FLY == rNewAnchor.GetAnchorId() ||
- FLY_AUTO_CNTNT == rNewAnchor.GetAnchorId() ) &&
+ ((FLY_AT_PARA == rNewAnchor.GetAnchorId()) ||
+ (FLY_AT_FLY == rNewAnchor.GetAnchorId()) ||
+ (FLY_AT_CHAR == rNewAnchor.GetAnchorId())) &&
rNewAnchor.GetCntntAnchor() &&
IsInHeaderFooter( rNewAnchor.GetCntntAnchor()->nNode ) &&
pDrawContact != NULL &&
@@ -551,7 +546,7 @@ SwFrmFmt *SwDoc::CopyLayoutFmt( const SwFrmFmt& rSource,
}
}
- if( bSetTxtFlyAtt && FLY_IN_CNTNT == rNewAnchor.GetAnchorId() )
+ if (bSetTxtFlyAtt && (FLY_AS_CHAR == rNewAnchor.GetAnchorId()))
{
const SwPosition* pPos = rNewAnchor.GetCntntAnchor();
SwFmtFlyCnt aFmt( pDest );
@@ -660,7 +655,7 @@ SwFlyFrmFmt* SwDoc::_MakeFlySection( const SwPosition& rAnchPos,
RndStdIds eAnchorId = pAnchor ? pAnchor->GetAnchorId()
: pFmt->GetAnchor().GetAnchorId();
if( !pAnchor ||
- (FLY_PAGE != pAnchor->GetAnchorId() &&
+ ((FLY_AT_PAGE != pAnchor->GetAnchorId()) &&
//Nur Page und nicht:
// FLY_AT_CNTNT == pAnchor->GetAnchorId() ||
// FLY_IN_CNTNT == pAnchor->GetAnchorId() ||
@@ -670,7 +665,7 @@ SwFlyFrmFmt* SwDoc::_MakeFlySection( const SwPosition& rAnchPos,
{
// dann setze ihn, wird im Undo gebraucht
SwFmtAnchor aAnch( pFmt->GetAnchor() );
- if( pAnchor && FLY_AT_FLY == pAnchor->GetAnchorId() )
+ if (pAnchor && (FLY_AT_FLY == pAnchor->GetAnchorId()))
{
SwPosition aPos( *rAnchPos.nNode.GetNode().FindFlyStartNode() );
aAnch.SetAnchor( &aPos );
@@ -683,7 +678,7 @@ SwFlyFrmFmt* SwDoc::_MakeFlySection( const SwPosition& rAnchPos,
aAnch.SetType( eRequestId );
eAnchorId = aAnch.GetAnchorId();
- if ( FLY_PAGE != eAnchorId )
+ if ( FLY_AT_PAGE != eAnchorId )
//Nur Page und nicht:
// if( FLY_AT_CNTNT == eAnchorId || FLY_IN_CNTNT == eAnchorId ||
// FLY_AT_FLY == eAnchorId || FLY_AUTO_CNTNT == eAnchorId )
@@ -694,7 +689,7 @@ SwFlyFrmFmt* SwDoc::_MakeFlySection( const SwPosition& rAnchPos,
else
eAnchorId = pFmt->GetAnchor().GetAnchorId();
- if( FLY_IN_CNTNT == eAnchorId )
+ if ( FLY_AS_CHAR == eAnchorId )
{
xub_StrLen nStt = rAnchPos.nContent.GetIndex();
SwTxtNode * pTxtNode = rAnchPos.nNode.GetNode().GetTxtNode();
@@ -751,7 +746,7 @@ SwFlyFrmFmt* SwDoc::MakeFlySection( RndStdIds eAnchorType,
{
SwFlyFrmFmt* pFmt = 0;
sal_Bool bCallMake = sal_True;
- if( !pAnchorPos && FLY_PAGE != eAnchorType )
+ if ( !pAnchorPos && (FLY_AT_PAGE != eAnchorType) )
{
const SwFmtAnchor* pAnch;
if( (pFlySet && SFX_ITEM_SET == pFlySet->GetItemState(
@@ -759,9 +754,14 @@ SwFlyFrmFmt* SwDoc::MakeFlySection( RndStdIds eAnchorType,
( pFrmFmt && SFX_ITEM_SET == pFrmFmt->GetItemState(
RES_ANCHOR, sal_True, (const SfxPoolItem**)&pAnch )) )
{
- if( FLY_PAGE != pAnch->GetAnchorId() &&
- 0 == ( pAnchorPos = pAnch->GetCntntAnchor() ) )
- bCallMake = sal_False;
+ if ( (FLY_AT_PAGE != pAnch->GetAnchorId()) )
+ {
+ pAnchorPos = pAnch->GetCntntAnchor();
+ if (pAnchorPos)
+ {
+ bCallMake = sal_False;
+ }
+ }
}
}
@@ -944,7 +944,7 @@ SwDrawFrmFmt* SwDoc::Insert( const SwPaM &rRg,
// Anker noch nicht gesetzt ?
// DrawObjecte duerfen niemals in Kopf-/Fusszeilen landen.
- sal_Bool bIsAtCntnt = FLY_PAGE != eAnchorId;
+ const bool bIsAtCntnt = (FLY_AT_PAGE != eAnchorId);
// FLY_AT_CNTNT == eAnchorId || FLY_IN_CNTNT == eAnchorId ||
// FLY_AT_FLY == eAnchorId || FLY_AUTO_CNTNT == eAnchorId;
@@ -966,7 +966,7 @@ SwDrawFrmFmt* SwDoc::Insert( const SwPaM &rRg,
::CheckControlLayer( &rDrawObj ) &&
IsInHeaderFooter( *pChkIdx ) )
{
- pFmt->SetFmtAttr( SwFmtAnchor( eAnchorId = FLY_PAGE ) );
+ pFmt->SetFmtAttr( SwFmtAnchor( eAnchorId = FLY_AT_PAGE ) );
}
else if( !pAnchor || (bIsAtCntnt && !pAnchor->GetCntntAnchor() ))
{
@@ -981,10 +981,10 @@ SwDrawFrmFmt* SwDoc::Insert( const SwPaM &rRg,
else
{
aAnch.SetAnchor( rRg.GetPoint() );
- if( FLY_PAGE == eAnchorId )
+ if ( FLY_AT_PAGE == eAnchorId )
{
eAnchorId = rDrawObj.ISA( SdrUnoObj )
- ? FLY_IN_CNTNT : FLY_AT_CNTNT;
+ ? FLY_AS_CHAR : FLY_AT_PARA;
aAnch.SetType( eAnchorId );
}
}
@@ -992,7 +992,7 @@ SwDrawFrmFmt* SwDoc::Insert( const SwPaM &rRg,
}
// bei als Zeichen gebundenen Draws das Attribut im Absatz setzen
- if( FLY_IN_CNTNT == eAnchorId )
+ if ( FLY_AS_CHAR == eAnchorId )
{
xub_StrLen nStt = rRg.GetPoint()->nContent.GetIndex();
SwFmtFlyCnt aFmt( pFmt );
@@ -1063,7 +1063,7 @@ sal_Bool TstFlyRange( const SwPaM* pPam, const SwPosition* pFlyPos,
const SwPosition* pPaMEnd = pTmp->End();
const sal_uInt32 nPamStartIndex = pPaMStart->nNode.GetIndex();
const sal_uInt32 nPamEndIndex = pPaMEnd->nNode.GetIndex();
- if(FLY_AT_CNTNT == nAnchorId)
+ if (FLY_AT_PARA == nAnchorId)
bOk = (nPamStartIndex < nFlyIndex && nPamEndIndex > nFlyIndex) ||
(((nPamStartIndex == nFlyIndex) && (pPaMStart->nContent.GetIndex() == 0)) &&
(nPamEndIndex > nFlyIndex));
@@ -1091,7 +1091,6 @@ void SwDoc::GetAllFlyFmts( SwPosFlyFrms& rPosFlyFmts,
const SwPaM* pCmpRange, sal_Bool bDrawAlso ) const
{
SwPosFlyFrm *pFPos = 0;
- const SwPosition* pAPos;
SwFrmFmt *pFly;
// erstmal alle Absatzgebundenen einsammeln
@@ -1103,10 +1102,11 @@ void SwDoc::GetAllFlyFmts( SwPosFlyFrms& rPosFlyFmts,
if( bFlyFmt || bDrawFmt )
{
const SwFmtAnchor& rAnchor = pFly->GetAnchor();
- if( ( FLY_AT_CNTNT == rAnchor.GetAnchorId() ||
- FLY_AT_FLY == rAnchor.GetAnchorId() ||
- FLY_AUTO_CNTNT == rAnchor.GetAnchorId() ) &&
- 0 != ( pAPos = rAnchor.GetCntntAnchor()) )
+ SwPosition const*const pAPos = rAnchor.GetCntntAnchor();
+ if (pAPos &&
+ ((FLY_AT_PARA == rAnchor.GetAnchorId()) ||
+ (FLY_AT_FLY == rAnchor.GetAnchorId()) ||
+ (FLY_AT_CHAR == rAnchor.GetAnchorId())))
{
if( pCmpRange &&
!TstFlyRange( pCmpRange, pAPos, rAnchor.GetAnchorId() ))
@@ -1140,9 +1140,9 @@ void SwDoc::GetAllFlyFmts( SwPosFlyFrms& rPosFlyFmts,
continue;
const SwFmtAnchor& rAnchor = pFly->GetAnchor();
- if( FLY_AT_CNTNT != rAnchor.GetAnchorId() &&
- FLY_AT_FLY != rAnchor.GetAnchorId() &&
- FLY_AUTO_CNTNT != rAnchor.GetAnchorId() )
+ if ((FLY_AT_PARA != rAnchor.GetAnchorId()) &&
+ (FLY_AT_FLY != rAnchor.GetAnchorId()) &&
+ (FLY_AT_CHAR != rAnchor.GetAnchorId()))
{
const SwCntntFrm * pCntntFrm = pPage->FindFirstBodyCntnt();
if ( !pCntntFrm )
@@ -1387,7 +1387,7 @@ SwFlyFrmFmt* SwDoc::InsertLabel( const SwLabelType eType, const String &rTxt, co
//loesen wir vorher die Verbindung zwischen Attribut und Format.
const SwFmtAnchor& rAnchor = pNewFmt->GetAnchor();
- if( FLY_IN_CNTNT == rAnchor.GetAnchorId() )
+ if ( FLY_AS_CHAR == rAnchor.GetAnchorId() )
{
const SwPosition *pPos = rAnchor.GetCntntAnchor();
SwTxtNode *pTxtNode = pPos->nNode.GetNode().GetTxtNode();
@@ -1433,7 +1433,7 @@ SwFlyFrmFmt* SwDoc::InsertLabel( const SwLabelType eType, const String &rTxt, co
pNewSet->Put( SvxULSpaceItem(RES_UL_SPACE) );
//Der Alte ist absatzgebunden, und zwar am Absatz im neuen.
- SwFmtAnchor aAnch( FLY_AT_CNTNT );
+ SwFmtAnchor aAnch( FLY_AT_PARA );
SwNodeIndex aAnchIdx( *pNewFmt->GetCntnt().GetCntntIdx(), 1 );
pNew = aAnchIdx.GetNode().GetTxtNode();
SwPosition aPos( aAnchIdx );
@@ -1684,7 +1684,7 @@ SwFlyFrmFmt* SwDoc::InsertDrawLabel( const String &rTxt,
pNewFmt->SetFmtAttr( *pNewSet );
const SwFmtAnchor& rAnchor = pNewFmt->GetAnchor();
- if( FLY_IN_CNTNT == rAnchor.GetAnchorId() )
+ if ( FLY_AS_CHAR == rAnchor.GetAnchorId() )
{
const SwPosition *pPos = rAnchor.GetCntntAnchor();
SwTxtNode *pTxtNode = pPos->nNode.GetNode().GetTxtNode();
@@ -1722,7 +1722,7 @@ SwFlyFrmFmt* SwDoc::InsertDrawLabel( const String &rTxt,
pNewSet->Put( SwFmtHoriOrient( 0, text::HoriOrientation::CENTER, text::RelOrientation::FRAME ) );
//Der Alte ist absatzgebunden, und zwar am Absatz im neuen.
- SwFmtAnchor aAnch( FLY_AT_CNTNT );
+ SwFmtAnchor aAnch( FLY_AT_PARA );
SwNodeIndex aAnchIdx( *pNewFmt->GetCntnt().GetCntntIdx(), 1 );
pNew = aAnchIdx.GetNode().GetTxtNode();
SwPosition aPos( aAnchIdx );
@@ -2095,15 +2095,17 @@ void SwDoc::SetAllUniqueFlyNames()
if( bLoadedFlag )
{
const SwFmtAnchor& rAnchor = pFlyFmt->GetAnchor();
- if( ( FLY_PAGE == rAnchor.GetAnchorId() &&
- rAnchor.GetCntntAnchor() ) ||
+ if (((FLY_AT_PAGE == rAnchor.GetAnchorId()) &&
+ rAnchor.GetCntntAnchor()) ||
// oder werden DrawObjecte rel. zu irgendetwas ausgerichtet?
( RES_DRAWFRMFMT == pFlyFmt->Which() && (
SFX_ITEM_SET == pFlyFmt->GetItemState(
RES_VERT_ORIENT )||
SFX_ITEM_SET == pFlyFmt->GetItemState(
RES_HORI_ORIENT ))) )
+ {
bLoadedFlag = sal_False;
+ }
}
}
@@ -2200,9 +2202,11 @@ sal_Bool SwDoc::IsInHeaderFooter( const SwNodeIndex& rIdx ) const
if( pIdx && pFlyNd == &pIdx->GetNode() )
{
const SwFmtAnchor& rAnchor = pFmt->GetAnchor();
- if( FLY_PAGE == rAnchor.GetAnchorId() ||
+ if ((FLY_AT_PAGE == rAnchor.GetAnchorId()) ||
!rAnchor.GetCntntAnchor() )
+ {
return sal_False;
+ }
pNd = &rAnchor.GetCntntAnchor()->nNode.GetNode();
pFlyNd = pNd->FindFlyStartNode();
@@ -2247,10 +2251,12 @@ short SwDoc::GetTextDirection( const SwPosition& rPos,
{
pItem = 0;
const SwFmtAnchor* pAnchor = &pFlyFmt->GetAnchor();
- if( FLY_PAGE != pAnchor->GetAnchorId() &&
- pAnchor->GetCntntAnchor() )
+ if ((FLY_AT_PAGE != pAnchor->GetAnchorId()) &&
+ pAnchor->GetCntntAnchor())
+ {
pFlyFmt = pAnchor->GetCntntAnchor()->nNode.
GetNode().GetFlyFmt();
+ }
else
pFlyFmt = 0;
}
diff --git a/sw/source/core/doc/docnew.cxx b/sw/source/core/doc/docnew.cxx
index 2a36ce970615..71c42cf27176 100644
--- a/sw/source/core/doc/docnew.cxx
+++ b/sw/source/core/doc/docnew.cxx
@@ -1415,7 +1415,7 @@ void SwDoc::Paste( const SwDoc& rSource )
if( bInsWithFmt )
{
SwFmtAnchor aAnchor( rCpyFmt.GetAnchor() );
- if( FLY_PAGE == aAnchor.GetAnchorId() )
+ if (FLY_AT_PAGE == aAnchor.GetAnchorId())
{
aAnchor.SetPageNum( aAnchor.GetPageNum() + /*nStartPageNumber - */1 );
}
diff --git a/sw/source/core/doc/docsort.cxx b/sw/source/core/doc/docsort.cxx
index 3f1a6babac56..de845b4ef433 100644
--- a/sw/source/core/doc/docsort.cxx
+++ b/sw/source/core/doc/docsort.cxx
@@ -48,9 +48,7 @@
#include <swtable.hxx>
#include <swundo.hxx>
#include <sortopt.hxx>
-#ifndef _DOCSORT_HXX
#include <docsort.hxx>
-#endif
#include <undobj.hxx>
#include <tblsel.hxx>
#include <cellatr.hxx>
@@ -341,18 +339,13 @@ BOOL SwDoc::SortText(const SwPaM& rPaM, const SwSortOptions& rOpt)
const SwPosition *pStart = rPaM.Start(), *pEnd = rPaM.End();
// Index auf den Start der Selektion
- SwFrmFmt* pFmt;
- const SwFmtAnchor* pAnchor;
- const SwPosition* pAPos;
- USHORT n;
-
- for( n = 0; n < GetSpzFrmFmts()->Count(); ++n )
+ for ( USHORT n = 0; n < GetSpzFrmFmts()->Count(); ++n )
{
- pFmt = (SwFrmFmt*)(*GetSpzFrmFmts())[n];
- pAnchor = &pFmt->GetAnchor();
+ SwFrmFmt *const pFmt = static_cast<SwFrmFmt*>((*GetSpzFrmFmts())[n]);
+ SwFmtAnchor const*const pAnchor = &pFmt->GetAnchor();
+ SwPosition const*const pAPos = pAnchor->GetCntntAnchor();
- if( FLY_AT_CNTNT == pAnchor->GetAnchorId() &&
- 0 != (pAPos = pAnchor->GetCntntAnchor() ) &&
+ if (pAPos && (FLY_AT_PARA == pAnchor->GetAnchorId()) &&
pStart->nNode <= pAPos->nNode && pAPos->nNode <= pEnd->nNode )
return FALSE;
}
@@ -444,7 +437,7 @@ BOOL SwDoc::SortText(const SwPaM& rPaM, const SwSortOptions& rOpt)
DoUndo( FALSE );
- for( n = 0; n < aSortArr.Count(); ++n )
+ for ( USHORT n = 0; n < aSortArr.Count(); ++n )
{
SwSortTxtElement* pBox = (SwSortTxtElement*)aSortArr[n];
aStart = nBeg + n;
diff --git a/sw/source/core/doc/poolfmt.cxx b/sw/source/core/doc/poolfmt.cxx
index 5e2b2fead999..058dd50a833c 100644
--- a/sw/source/core/doc/poolfmt.cxx
+++ b/sw/source/core/doc/poolfmt.cxx
@@ -37,9 +37,7 @@
#include <svx/wghtitem.hxx>
#include <svx/fontitem.hxx>
#include <svx/fhgtitem.hxx>
-#ifndef _SVX_TSTPITEM_HXX //autogen
#include <svx/tstpitem.hxx>
-#endif
#include <svx/lrspitem.hxx>
#include <svx/ulspitem.hxx>
#include <svx/adjitem.hxx>
@@ -55,9 +53,7 @@
#include <svx/langitem.hxx>
#include <svx/charrotateitem.hxx>
#include <svx/frmdiritem.hxx>
-#ifndef _SVX_EMPHITEM_HXX
#include <svx/emphitem.hxx>
-#endif
#include <svx/scriptspaceitem.hxx>
#include <viewopt.hxx>
#include <doc.hxx>
@@ -1303,13 +1299,13 @@ SwFmt* SwDoc::GetFmtFromPool( USHORT nId )
{
if ( get(IDocumentSettingAccess::BROWSE_MODE) )
{
- aSet.Put( SwFmtAnchor( FLY_IN_CNTNT ));
+ aSet.Put( SwFmtAnchor( FLY_AS_CHAR ));
aSet.Put( SwFmtVertOrient( 0, text::VertOrientation::LINE_CENTER, text::RelOrientation::PRINT_AREA ) );
aSet.Put( SwFmtSurround( SURROUND_NONE ) );
}
else
{
- aSet.Put( SwFmtAnchor( FLY_AT_CNTNT ));
+ aSet.Put( SwFmtAnchor( FLY_AT_PARA ));
aSet.Put( SwFmtSurround( SURROUND_PARALLEL ) );
aSet.Put( SwFmtHoriOrient( 0, text::HoriOrientation::CENTER, text::RelOrientation::PRINT_AREA ) );
aSet.Put( SwFmtVertOrient( 0, text::VertOrientation::TOP, text::RelOrientation::PRINT_AREA ) );
@@ -1330,7 +1326,7 @@ SwFmt* SwDoc::GetFmtFromPool( USHORT nId )
case RES_POOLFRM_GRAPHIC:
case RES_POOLFRM_OLE:
{
- aSet.Put( SwFmtAnchor( FLY_AT_CNTNT ));
+ aSet.Put( SwFmtAnchor( FLY_AT_PARA ));
aSet.Put( SwFmtHoriOrient( 0, text::HoriOrientation::CENTER, text::RelOrientation::FRAME ));
aSet.Put( SwFmtVertOrient( 0, text::VertOrientation::TOP, text::RelOrientation::FRAME ));
aSet.Put( SwFmtSurround( SURROUND_NONE ));
@@ -1338,14 +1334,14 @@ SwFmt* SwDoc::GetFmtFromPool( USHORT nId )
break;
case RES_POOLFRM_FORMEL:
{
- aSet.Put( SwFmtAnchor( FLY_IN_CNTNT ) );
+ aSet.Put( SwFmtAnchor( FLY_AS_CHAR ) );
aSet.Put( SwFmtVertOrient( 0, text::VertOrientation::CHAR_CENTER, text::RelOrientation::FRAME ) );
aSet.Put( SvxLRSpaceItem( 114, 114, 0, 0, RES_LR_SPACE ) );
}
break;
case RES_POOLFRM_MARGINAL:
{
- aSet.Put( SwFmtAnchor( FLY_AT_CNTNT ));
+ aSet.Put( SwFmtAnchor( FLY_AT_PARA ));
aSet.Put( SwFmtHoriOrient( 0, text::HoriOrientation::LEFT, text::RelOrientation::FRAME ));
aSet.Put( SwFmtVertOrient( 0, text::VertOrientation::TOP, text::RelOrientation::FRAME ));
aSet.Put( SwFmtSurround( SURROUND_PARALLEL ));
@@ -1358,7 +1354,7 @@ SwFmt* SwDoc::GetFmtFromPool( USHORT nId )
break;
case RES_POOLFRM_WATERSIGN:
{
- aSet.Put( SwFmtAnchor( FLY_PAGE ));
+ aSet.Put( SwFmtAnchor( FLY_AT_PAGE ));
aSet.Put( SwFmtHoriOrient( 0, text::HoriOrientation::CENTER, text::RelOrientation::FRAME ));
aSet.Put( SwFmtVertOrient( 0, text::VertOrientation::CENTER, text::RelOrientation::FRAME ));
aSet.Put( SvxOpaqueItem( FALSE ));
@@ -1368,7 +1364,7 @@ SwFmt* SwDoc::GetFmtFromPool( USHORT nId )
case RES_POOLFRM_LABEL:
{
- aSet.Put( SwFmtAnchor( FLY_IN_CNTNT ) );
+ aSet.Put( SwFmtAnchor( FLY_AS_CHAR ) );
aSet.Put( SwFmtVertOrient( 0, text::VertOrientation::TOP, text::RelOrientation::FRAME ) );
aSet.Put( SvxLRSpaceItem( 114, 114, 0, 0, RES_LR_SPACE ) );
diff --git a/sw/source/core/doc/tblcpy.cxx b/sw/source/core/doc/tblcpy.cxx
index 5eea4c33247c..297328d0cca5 100644
--- a/sw/source/core/doc/tblcpy.cxx
+++ b/sw/source/core/doc/tblcpy.cxx
@@ -591,14 +591,14 @@ void lcl_CpyBox( const SwTable& rCpyTbl, const SwTableBox* pCpyBox,
}
// stehen noch FlyFrames rum, loesche auch diese
- const SwPosition* pAPos;
for( USHORT n = 0; n < pDoc->GetSpzFrmFmts()->Count(); ++n )
{
- SwFrmFmt* pFly = (*pDoc->GetSpzFrmFmts())[n];
- const SwFmtAnchor* pAnchor = &pFly->GetAnchor();
- if( ( FLY_AT_CNTNT == pAnchor->GetAnchorId() ||
- FLY_AUTO_CNTNT == pAnchor->GetAnchorId() ) &&
- 0 != ( pAPos = pAnchor->GetCntntAnchor() ) &&
+ SwFrmFmt *const pFly = (*pDoc->GetSpzFrmFmts())[n];
+ SwFmtAnchor const*const pAnchor = &pFly->GetAnchor();
+ SwPosition const*const pAPos = pAnchor->GetCntntAnchor();
+ if (pAPos &&
+ ((FLY_AT_PARA == pAnchor->GetAnchorId()) ||
+ (FLY_AT_CHAR == pAnchor->GetAnchorId())) &&
aInsIdx <= pAPos->nNode && pAPos->nNode <= aEndNdIdx )
{
pDoc->DelLayoutFmt( pFly );
diff --git a/sw/source/core/docnode/ndcopy.cxx b/sw/source/core/docnode/ndcopy.cxx
index a2263bc3f442..f37b9c36392c 100644
--- a/sw/source/core/docnode/ndcopy.cxx
+++ b/sw/source/core/docnode/ndcopy.cxx
@@ -552,20 +552,18 @@ void SwTxtNode::CopyCollFmt( SwTxtNode& rDestNd )
BOOL lcl_ChkFlyFly( SwDoc* pDoc, ULONG nSttNd, ULONG nEndNd,
ULONG nInsNd )
{
- const SwFrmFmt* pFmt;
- const SwFmtAnchor* pAnchor;
- const SwPosition* pAPos;
const SwSpzFrmFmts& rFrmFmtTbl = *pDoc->GetSpzFrmFmts();
for( USHORT n = 0; n < rFrmFmtTbl.Count(); ++n )
{
- pFmt = rFrmFmtTbl[n];
- pAnchor = &pFmt->GetAnchor();
- if( 0 != ( pAPos = pAnchor->GetCntntAnchor()) &&
- ( FLY_IN_CNTNT == pAnchor->GetAnchorId() ||
- FLY_AUTO_CNTNT == pAnchor->GetAnchorId() ||
- FLY_AT_FLY == pAnchor->GetAnchorId() ||
- FLY_AT_CNTNT == pAnchor->GetAnchorId() ) &&
+ SwFrmFmt const*const pFmt = rFrmFmtTbl[n];
+ SwFmtAnchor const*const pAnchor = &pFmt->GetAnchor();
+ SwPosition const*const pAPos = pAnchor->GetCntntAnchor();
+ if (pAPos &&
+ ((FLY_AS_CHAR == pAnchor->GetAnchorId()) ||
+ (FLY_AT_CHAR == pAnchor->GetAnchorId()) ||
+ (FLY_AT_FLY == pAnchor->GetAnchorId()) ||
+ (FLY_AT_PARA == pAnchor->GetAnchorId())) &&
nSttNd <= pAPos->nNode.GetIndex() &&
pAPos->nNode.GetIndex() < nEndNd )
{
@@ -1398,18 +1396,17 @@ void SwDoc::CopyFlyInFlyImpl( const SwNodeRange& rRg,
SwDoc *const pDest = rStartIdx.GetNode().GetDoc();
_ZSortFlys aArr;
USHORT nArrLen = GetSpzFrmFmts()->Count();
- USHORT n;
- for( n = 0; n < nArrLen; ++n )
+ for ( USHORT n = 0; n < nArrLen; ++n )
{
- const SwFrmFmt* pFmt = (*GetSpzFrmFmts())[n];
- const SwFmtAnchor* pAnchor = &pFmt->GetAnchor();
- const SwPosition* pAPos;
- bool bAtCntnt = pAnchor->GetAnchorId() == FLY_AT_CNTNT;
- if ( ( bAtCntnt ||
- pAnchor->GetAnchorId() == FLY_AT_FLY ||
- pAnchor->GetAnchorId() == FLY_AUTO_CNTNT ) &&
- 0 != ( pAPos = pAnchor->GetCntntAnchor()) &&
+ SwFrmFmt const*const pFmt = (*GetSpzFrmFmts())[n];
+ SwFmtAnchor const*const pAnchor = &pFmt->GetAnchor();
+ SwPosition const*const pAPos = pAnchor->GetCntntAnchor();
+ bool bAtCntnt = (pAnchor->GetAnchorId() == FLY_AT_PARA);
+ if ( pAPos &&
+ ( bAtCntnt ||
+ (pAnchor->GetAnchorId() == FLY_AT_FLY) ||
+ (pAnchor->GetAnchorId() == FLY_AT_CHAR)) &&
(( bCopyFlyAtFly && FLY_AT_FLY == pAnchor->GetAnchorId() )
? rRg.aStart <= pAPos->nNode.GetIndex() + 1
: ( IsRedlineMove()
@@ -1470,7 +1467,7 @@ void SwDoc::CopyFlyInFlyImpl( const SwNodeRange& rRg,
//die Chains entsprechend aufgebaut werden koennen.
SvPtrarr aNewArr( 10, 10 );
- for( n = 0; n < aArr.Count(); ++n )
+ for ( USHORT n = 0; n < aArr.Count(); ++n )
{
const _ZSortFly& rZSortFly = aArr[ n ];
@@ -1485,8 +1482,8 @@ void SwDoc::CopyFlyInFlyImpl( const SwNodeRange& rRg,
// method <SwNodes::_CopyNodes(..)>.
// Thus, the new anchor position in the destination document is found
// by counting the text nodes.
- if ( aAnchor.GetAnchorId() == FLY_AT_CNTNT ||
- aAnchor.GetAnchorId() == FLY_AUTO_CNTNT )
+ if ((aAnchor.GetAnchorId() == FLY_AT_PARA) ||
+ (aAnchor.GetAnchorId() == FLY_AT_CHAR) )
{
// First, determine number of anchor text node in the copied range.
// Note: The anchor text node *have* to be inside the copied range.
@@ -1552,7 +1549,7 @@ void SwDoc::CopyFlyInFlyImpl( const SwNodeRange& rRg,
}
// <--
// die am Zeichen Flys wieder ans das vorgegebene Zeichen setzen
- if ( FLY_AUTO_CNTNT == aAnchor.GetAnchorId() &&
+ if ((FLY_AT_CHAR == aAnchor.GetAnchorId()) &&
pNewPos->nNode.GetNode().IsTxtNode() )
{
pNewPos->nContent.Assign( (SwTxtNode*)&pNewPos->nNode.GetNode(),
@@ -1592,7 +1589,7 @@ void SwDoc::CopyFlyInFlyImpl( const SwNodeRange& rRg,
ASSERT( aArr.Count() == aNewArr.Count(), "Missing new Flys" );
if ( aArr.Count() == aNewArr.Count() )
{
- for ( n = 0; n < aArr.Count(); ++n )
+ for ( USHORT n = 0; n < aArr.Count(); ++n )
{
const SwFrmFmt *pFmt = aArr[n].GetFmt();
const SwFmtChain &rChain = pFmt->GetChain();
diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx
index 6407e505aa0c..3c4149298983 100644
--- a/sw/source/core/docnode/ndtbl.cxx
+++ b/sw/source/core/docnode/ndtbl.cxx
@@ -38,7 +38,6 @@
#endif
#include <hintids.hxx>
-
#include <svx/lrspitem.hxx>
#include <svx/brkitem.hxx>
#include <svx/protitem.hxx>
@@ -91,9 +90,7 @@
#include <comcore.hrc>
#endif
#include "docsh.hxx"
-#ifdef LINUX
#include <tabcol.hxx>
-#endif
#include <unochart.hxx>
#include <node.hxx>
@@ -104,6 +101,9 @@
// --> OD 2005-12-05 #i27138#
#include <rootfrm.hxx>
// <--
+#include <fldupde.hxx>
+
+
#ifdef PRODUCT
#define CHECK_TABLE(t)
#else
@@ -113,7 +113,6 @@
#define CHECK_TABLE(t)
#endif
#endif
-#include <fldupde.hxx>
using namespace ::com::sun::star;
@@ -1684,17 +1683,19 @@ BOOL SwNodes::TableToText( const SwNodeRange& rRange, sal_Unicode cCh,
// #i28006# Fly frames have to be restored even if the table was
// #alone in the section
const SwSpzFrmFmts& rFlyArr = *GetDoc()->GetSpzFrmFmts();
- const SwPosition* pAPos;
for( USHORT n = 0; n < rFlyArr.Count(); ++n )
{
- SwFrmFmt* pFmt = (SwFrmFmt*)rFlyArr[n];
+ SwFrmFmt *const pFmt = (SwFrmFmt*)rFlyArr[n];
const SwFmtAnchor& rAnchor = pFmt->GetAnchor();
- if( ( FLY_AT_CNTNT == rAnchor.GetAnchorId() ||
- FLY_AUTO_CNTNT == rAnchor.GetAnchorId() ) &&
- 0 != ( pAPos = rAnchor.GetCntntAnchor() ) &&
+ SwPosition const*const pAPos = rAnchor.GetCntntAnchor();
+ if (pAPos &&
+ ((FLY_AT_PARA == rAnchor.GetAnchorId()) ||
+ (FLY_AT_CHAR == rAnchor.GetAnchorId())) &&
nStt <= pAPos->nNode.GetIndex() &&
pAPos->nNode.GetIndex() < nEnd )
+ {
pFmt->MakeFrms();
+ }
}
return TRUE;
diff --git a/sw/source/core/docnode/node.cxx b/sw/source/core/docnode/node.cxx
index 61dd90bc509c..2dd69ef99db5 100644
--- a/sw/source/core/docnode/node.cxx
+++ b/sw/source/core/docnode/node.cxx
@@ -38,9 +38,7 @@
#include <svx/frmdiritem.hxx>
// <--
#include <svx/protitem.hxx>
-#ifndef _COM_SUN_STAR_I18N_CHARACTERITERATORMODE_HDL_
#include <com/sun/star/i18n/CharacterIteratorMode.hdl>
-#endif
#include <fmtcntnt.hxx>
#include <fmtanchr.hxx>
#include <frmfmt.hxx>
@@ -609,7 +607,7 @@ const SwPageDesc* SwNode::FindPageDesc( BOOL bCalcLay,
if( pFmt )
{
const SwFmtAnchor* pAnchor = &pFmt->GetAnchor();
- if( FLY_PAGE != pAnchor->GetAnchorId() &&
+ if ((FLY_AT_PAGE != pAnchor->GetAnchorId()) &&
pAnchor->GetCntntAnchor() )
{
pNd = &pAnchor->GetCntntAnchor()->nNode.GetNode();
@@ -631,7 +629,7 @@ const SwPageDesc* SwNode::FindPageDesc( BOOL bCalcLay,
break;
}
pAnchor = &pFrmFmt->GetAnchor();
- if( FLY_PAGE == pAnchor->GetAnchorId() ||
+ if ((FLY_AT_PAGE == pAnchor->GetAnchorId()) ||
!pAnchor->GetCntntAnchor() )
{
pFlyNd = 0;
diff --git a/sw/source/core/docnode/swbaslnk.cxx b/sw/source/core/docnode/swbaslnk.cxx
index bb799f7728e0..822a21e5b8c8 100644
--- a/sw/source/core/docnode/swbaslnk.cxx
+++ b/sw/source/core/docnode/swbaslnk.cxx
@@ -31,14 +31,11 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-
#include <hintids.hxx>
#include <vcl/svapp.hxx>
#include <vcl/outdev.hxx>
-#ifndef _OSL_THREAD_HXX_
#include <osl/thread.hxx>
-#endif
#include <salhelper/condition.hxx>
#include <comphelper/mediadescriptor.hxx>
#include <sfx2/docfile.hxx>
@@ -492,18 +489,23 @@ void SwBaseLink::Closed()
const SwNode* SwBaseLink::GetAnchor() const
{
- SwFrmFmt* pFmt;
- if( pCntntNode && 0 != ( pFmt = pCntntNode->GetFlyFmt()) )
+ if (pCntntNode)
{
- const SwFmtAnchor& rAnchor = pFmt->GetAnchor();
- const SwPosition* pAPos;
- if( 0 != ( pAPos = rAnchor.GetCntntAnchor()) &&
- ( FLY_IN_CNTNT == rAnchor.GetAnchorId() ||
- FLY_AUTO_CNTNT == rAnchor.GetAnchorId() ||
- FLY_AT_FLY == rAnchor.GetAnchorId() ||
- FLY_AT_CNTNT == rAnchor.GetAnchorId() ))
- return &pAPos->nNode.GetNode();
- return 0;
+ SwFrmFmt *const pFmt = pCntntNode->GetFlyFmt();
+ if (pFmt)
+ {
+ const SwFmtAnchor& rAnchor = pFmt->GetAnchor();
+ SwPosition const*const pAPos = rAnchor.GetCntntAnchor();
+ if (pAPos &&
+ ((FLY_AS_CHAR == rAnchor.GetAnchorId()) ||
+ (FLY_AT_CHAR == rAnchor.GetAnchorId()) ||
+ (FLY_AT_FLY == rAnchor.GetAnchorId()) ||
+ (FLY_AT_PARA == rAnchor.GetAnchorId())))
+ {
+ return &pAPos->nNode.GetNode();
+ }
+ return 0;
+ }
}
ASSERT( !this, "GetAnchor nicht ueberlagert" );
diff --git a/sw/source/core/draw/dcontact.cxx b/sw/source/core/draw/dcontact.cxx
index aa20281038da..13ae626bc8c7 100644
--- a/sw/source/core/draw/dcontact.cxx
+++ b/sw/source/core/draw/dcontact.cxx
@@ -61,9 +61,7 @@
#include <dflyobj.hxx>
#include <dcontact.hxx>
#include <unodraw.hxx>
-#ifndef IDOCUMENTDRAWMODELACCESS_HXX_INCLUDED
#include <IDocumentDrawModelAccess.hxx>
-#endif
#include <doc.hxx>
#include <hints.hxx>
#include <txtfrm.hxx>
@@ -80,17 +78,9 @@
#include <basegfx/matrix/b2dhommatrix.hxx>
// AW: For VCOfDrawVirtObj and stuff
-#ifndef _SDR_CONTACT_VIEWCONTACTOFVIRTOBJ_HXX
#include <svx/sdr/contact/viewcontactofvirtobj.hxx>
-#endif
-
-#ifndef INCLUDED_DRAWINGLAYER_PRIMITIVE2D_TRANSFORMPRIMITIVE2D_HXX
#include <drawinglayer/primitive2d/transformprimitive2d.hxx>
-#endif
-
-#ifndef _SDR_CONTACT_VIEWOBJECTCONTACTOFSDROBJ_HXX
#include <svx/sdr/contact/viewobjectcontactofsdrobj.hxx>
-#endif
#include <com/sun/star/text/WritingMode2.hpp>
@@ -1958,7 +1948,7 @@ void SwDrawContact::ConnectToLayout( const SwFmtAnchor* pAnch )
switch ( pAnch->GetAnchorId() )
{
- case FLY_PAGE:
+ case FLY_AT_PAGE:
{
USHORT nPgNum = pAnch->GetPageNum();
SwPageFrm *pPage = static_cast<SwPageFrm*>(pRoot->Lower());
@@ -1978,12 +1968,12 @@ void SwDrawContact::ConnectToLayout( const SwFmtAnchor* pAnch )
}
break;
- case FLY_AUTO_CNTNT:
- case FLY_AT_CNTNT:
+ case FLY_AT_CHAR:
+ case FLY_AT_PARA:
case FLY_AT_FLY:
- case FLY_IN_CNTNT:
+ case FLY_AS_CHAR:
{
- if ( pAnch->GetAnchorId() == FLY_IN_CNTNT )
+ if ( pAnch->GetAnchorId() == FLY_AS_CHAR )
{
ClrContourCache( GetMaster() );
}
@@ -2058,7 +2048,7 @@ void SwDrawContact::ConnectToLayout( const SwFmtAnchor* pAnch )
// OD 2004-01-20 #110582# - find correct follow for
// as character anchored objects.
- if ( pAnch->GetAnchorId() == FLY_IN_CNTNT &&
+ if ((pAnch->GetAnchorId() == FLY_AS_CHAR) &&
pFrm->IsTxtFrm() )
{
pFrm = lcl_GetFlyInCntntAnchor(
@@ -2076,7 +2066,7 @@ void SwDrawContact::ConnectToLayout( const SwFmtAnchor* pAnch )
{
// append 'virtual' drawing object
SwDrawVirtObj* pDrawVirtObj = AddVirtObj();
- if ( pAnch->GetAnchorId() == FLY_IN_CNTNT )
+ if ( pAnch->GetAnchorId() == FLY_AS_CHAR )
{
ClrContourCache( pDrawVirtObj );
}
@@ -2087,7 +2077,7 @@ void SwDrawContact::ConnectToLayout( const SwFmtAnchor* pAnch )
pDrawVirtObj->ActionChanged();
}
- if ( pAnch->GetAnchorId() == FLY_IN_CNTNT )
+ if ( pAnch->GetAnchorId() == FLY_AS_CHAR )
{
pFrm->InvalidatePrt();
}
diff --git a/sw/source/core/draw/dview.cxx b/sw/source/core/draw/dview.cxx
index 9843f8f8c34e..8cf40983caf9 100644
--- a/sw/source/core/draw/dview.cxx
+++ b/sw/source/core/draw/dview.cxx
@@ -34,9 +34,7 @@
#include "hintids.hxx"
#include <svx/protitem.hxx>
#include <svx/svdpagv.hxx>
-#ifndef _FM_FMMODEL_HXX
#include <svx/fmmodel.hxx>
-#endif
#include "swtypes.hxx"
#include "pagefrm.hxx"
@@ -62,8 +60,6 @@
#include <com/sun/star/embed/EmbedMisc.hpp>
-using namespace com::sun::star;
-
// OD 18.06.2003 #108784#
//#ifndef _SVDVMARK_HXX //autogen
//#include <svx/svdvmark.hxx>
@@ -74,6 +70,10 @@ using namespace com::sun::star;
#include <flyfrms.hxx>
// <--
+
+using namespace com::sun::star;
+
+
class SwSdrHdl : public SdrHdl
{
public:
@@ -258,7 +258,7 @@ void SwDrawView::AddCustomHdl()
const SwFmtAnchor &rAnchor = pFrmFmt->GetAnchor();
// <--
- if(FLY_IN_CNTNT == rAnchor.GetAnchorId())
+ if (FLY_AS_CHAR == rAnchor.GetAnchorId())
return;
const SwFrm* pAnch;
@@ -267,7 +267,7 @@ void SwDrawView::AddCustomHdl()
Point aPos(aAnchorPoint);
- if ( FLY_AUTO_CNTNT == rAnchor.GetAnchorId() )
+ if ( FLY_AT_CHAR == rAnchor.GetAnchorId() )
{
// --> OD 2004-06-24 #i28701# - use last character rectangle saved at object
// in order to avoid a format of the anchor frame
@@ -1019,7 +1019,7 @@ void SwDrawView::CheckPossibilities()
"<SwDrawView::CheckPossibilities()> - missing frame format" );
bProtect = TRUE;
}
- else if ( FLY_IN_CNTNT == pFrmFmt->GetAnchor().GetAnchorId() &&
+ else if ((FLY_AS_CHAR == pFrmFmt->GetAnchor().GetAnchorId()) &&
rMrkList.GetMarkCount() > 1 )
{
bProtect = TRUE;
diff --git a/sw/source/core/edit/autofmt.cxx b/sw/source/core/edit/autofmt.cxx
index 7bacee8fbde4..533810062ee7 100644
--- a/sw/source/core/edit/autofmt.cxx
+++ b/sw/source/core/edit/autofmt.cxx
@@ -386,7 +386,7 @@ BOOL SwAutoFormat::HasObjects( const SwNode& rNd )
for( USHORT n = 0; n < rFmts.Count(); ++n )
{
const SwFmtAnchor& rAnchor = rFmts[ n ]->GetAnchor();
- if( FLY_PAGE != rAnchor.GetAnchorId() &&
+ if ((FLY_AT_PAGE != rAnchor.GetAnchorId()) &&
rAnchor.GetCntntAnchor() &&
&rAnchor.GetCntntAnchor()->nNode.GetNode() == &rNd )
{
diff --git a/sw/source/core/fields/expfld.cxx b/sw/source/core/fields/expfld.cxx
index ccb47233753d..38745a12ba7b 100644
--- a/sw/source/core/fields/expfld.cxx
+++ b/sw/source/core/fields/expfld.cxx
@@ -64,9 +64,7 @@
#include <swtable.hxx>
#include <breakit.hxx>
#include <SwStyleNameMapper.hxx>
-#ifndef _UNOFLDMID_H
#include <unofldmid.h>
-#endif
#include <numrule.hxx>
using namespace ::com::sun::star;
@@ -187,17 +185,20 @@ const SwTxtNode* GetBodyTxtNode( const SwDoc& rDoc, SwPosition& rPos,
pLayout = (SwLayoutFrm*)((SwFlyFrm*)pLayout)->GetAnchorFrm();
continue;
}
- else if( FLY_AT_CNTNT == rAnchor.GetAnchorId() ||
- FLY_AUTO_CNTNT == rAnchor.GetAnchorId() ||
- FLY_IN_CNTNT == rAnchor.GetAnchorId() )
+ else if ((FLY_AT_PARA == rAnchor.GetAnchorId()) ||
+ (FLY_AT_CHAR == rAnchor.GetAnchorId()) ||
+ (FLY_AS_CHAR == rAnchor.GetAnchorId()))
{
ASSERT( rAnchor.GetCntntAnchor(), "keine gueltige Position" );
rPos = *rAnchor.GetCntntAnchor();
pTxtNode = rPos.nNode.GetNode().GetTxtNode();
- if( FLY_AT_CNTNT == rAnchor.GetAnchorId() )
- ((SwTxtNode*)pTxtNode)->MakeStartIndex( &rPos.nContent );
+ if ( FLY_AT_PARA == rAnchor.GetAnchorId() )
+ {
+ const_cast<SwTxtNode*>(pTxtNode)->MakeStartIndex(
+ &rPos.nContent );
// oder doch besser das Ende vom (Anker-)TextNode nehmen ??
// ((SwTxtNode*)pTxtNode)->MakeEndIndex( &rPos.nContent );
+ }
// noch nicht abbrechen, kann ja auch noch im
// Header/Footer/Footnote/Fly stehen !!
diff --git a/sw/source/core/frmedt/fecopy.cxx b/sw/source/core/frmedt/fecopy.cxx
index ccd2d86e4531..bb1a230699ae 100644
--- a/sw/source/core/frmedt/fecopy.cxx
+++ b/sw/source/core/frmedt/fecopy.cxx
@@ -151,14 +151,16 @@ BOOL SwFEShell::Copy( SwDoc* pClpDoc, const String* pNewClpTxt )
SwFrmFmt* pFlyFmt = pFly->GetFmt();
SwFmtAnchor aAnchor( pFlyFmt->GetAnchor() );
- if ( FLY_AT_CNTNT == aAnchor.GetAnchorId() ||
- FLY_AUTO_CNTNT == aAnchor.GetAnchorId() ||
- FLY_AT_FLY == aAnchor.GetAnchorId() ||
- FLY_IN_CNTNT == aAnchor.GetAnchorId() )
+ if ((FLY_AT_PARA == aAnchor.GetAnchorId()) ||
+ (FLY_AT_CHAR == aAnchor.GetAnchorId()) ||
+ (FLY_AT_FLY == aAnchor.GetAnchorId()) ||
+ (FLY_AS_CHAR == aAnchor.GetAnchorId()))
{
SwPosition aPos( aSttIdx );
- if( FLY_IN_CNTNT == aAnchor.GetAnchorId() )
+ if ( FLY_AS_CHAR == aAnchor.GetAnchorId() )
+ {
aPos.nContent.Assign( pTxtNd, 0 );
+ }
aAnchor.SetAnchor( &aPos );
}
pFlyFmt = pClpDoc->CopyLayoutFmt( *pFlyFmt, aAnchor, true, true );
@@ -175,7 +177,7 @@ BOOL SwFEShell::Copy( SwDoc* pClpDoc, const String* pNewClpTxt )
rSpzFrmFmts.Insert( pFlyFmt, 0 );
}
- if( FLY_IN_CNTNT == aAnchor.GetAnchorId() )
+ if ( FLY_AS_CHAR == aAnchor.GetAnchorId() )
{
// JP 13.02.99 Bug 61863: wenn eine Rahmenselektion ins Clipboard
// gestellt wird, so muss beim Pasten auch wieder
@@ -206,24 +208,25 @@ BOOL SwFEShell::Copy( SwDoc* pClpDoc, const String* pNewClpTxt )
{
SfxItemSet aSet( pClpDoc->GetAttrPool(), aFrmFmtSetRange );
- SwFmtAnchor aAnchor( FLY_AT_CNTNT );
+ SwFmtAnchor aAnchor( FLY_AT_PARA );
aAnchor.SetAnchor( &aPos );
aSet.Put( aAnchor );
- SdrObject* pNew = pClpDoc->CloneSdrObj( *pObj, FALSE, TRUE );
+ SdrObject *const pNew =
+ pClpDoc->CloneSdrObj( *pObj, FALSE, TRUE );
SwPaM aTemp(aPos);
- pClpDoc->Insert(aTemp, *pNew, &aSet, NULL);
+ pClpDoc->Insert(aTemp, *pNew, &aSet, NULL);
}
else
{
SwDrawContact *pContact = (SwDrawContact*)GetUserCall( pObj );
SwFrmFmt *pFmt = pContact->GetFmt();
SwFmtAnchor aAnchor( pFmt->GetAnchor() );
- if ( FLY_AT_CNTNT == aAnchor.GetAnchorId() ||
- FLY_AUTO_CNTNT == aAnchor.GetAnchorId() ||
- FLY_AT_FLY == aAnchor.GetAnchorId() ||
- FLY_IN_CNTNT == aAnchor.GetAnchorId() )
+ if ((FLY_AT_PARA == aAnchor.GetAnchorId()) ||
+ (FLY_AT_CHAR == aAnchor.GetAnchorId()) ||
+ (FLY_AT_FLY == aAnchor.GetAnchorId()) ||
+ (FLY_AS_CHAR == aAnchor.GetAnchorId()))
{
aAnchor.SetAnchor( &aPos );
}
@@ -269,7 +272,9 @@ BOOL lcl_SetAnchor( const SwPosition& rPos, const SwNode& rNd, SwFlyFrm* pFly,
SwCntntFrm* pTmpFrm = rNd.GetCntntNode()->GetFrm( &rInsPt, 0, FALSE );
SwFlyFrm *pTmpFly = pTmpFrm->FindFlyFrm();
if( pTmpFly && bCheckFlyRecur && pFly->IsUpperOf( *pTmpFly ) )
+ {
bRet = FALSE;
+ }
else if ( FLY_AT_FLY == rAnchor.GetAnchorId() )
{
if( pTmpFly )
@@ -281,7 +286,7 @@ BOOL lcl_SetAnchor( const SwPosition& rPos, const SwNode& rNd, SwFlyFrm* pFly,
}
else
{
- rAnchor.SetType( FLY_PAGE );
+ rAnchor.SetType( FLY_AT_PAGE );
rAnchor.SetPageNum( rDestShell.GetPageNumber( rInsPt ) );
const SwFrm *pPg = pTmpFrm->FindPageFrm();
rNewPos = pPg->Frm().Pos();
@@ -329,7 +334,7 @@ BOOL SwFEShell::CopyDrawSel( SwFEShell* pDestShell, const Point& rSttPt,
// in die Gruppe einfuegen, wenns aus einer betretenen Gruppe
// kommt oder das Object nicht zeichengebunden ist
if( pSrcDrwView->IsGroupEntered() ||
- FLY_IN_CNTNT != rAnchor.GetAnchorId() )
+ (FLY_AS_CHAR != rAnchor.GetAnchorId()) )
{
SdrObject* pNew = pDestDoc->CloneSdrObj( *pObj, bIsMove &&
@@ -345,10 +350,10 @@ BOOL SwFEShell::CopyDrawSel( SwFEShell* pDestShell, const Point& rSttPt,
SwFmtAnchor aAnchor( rAnchor );
Point aNewAnch;
- if ( FLY_AT_CNTNT == aAnchor.GetAnchorId() ||
- FLY_AUTO_CNTNT == aAnchor.GetAnchorId() ||
- FLY_AT_FLY == aAnchor.GetAnchorId() ||
- FLY_IN_CNTNT == aAnchor.GetAnchorId() )
+ if ((FLY_AT_PARA == aAnchor.GetAnchorId()) ||
+ (FLY_AT_CHAR == aAnchor.GetAnchorId()) ||
+ (FLY_AT_FLY == aAnchor.GetAnchorId()) ||
+ (FLY_AS_CHAR == aAnchor.GetAnchorId()))
{
if ( this == pDestShell )
{
@@ -378,7 +383,7 @@ BOOL SwFEShell::CopyDrawSel( SwFEShell* pDestShell, const Point& rSttPt,
aNewAnch, FALSE );
}
}
- else if( FLY_PAGE == aAnchor.GetAnchorId() )
+ else if ( FLY_AT_PAGE == aAnchor.GetAnchorId() )
{
aAnchor.SetPageNum( pDestShell->GetPageNumber( rInsPt ) );
const SwRootFrm* pTmpRoot = pDestShell->GetLayout();
@@ -406,7 +411,7 @@ BOOL SwFEShell::CopyDrawSel( SwFEShell* pDestShell, const Point& rSttPt,
if ( pFmt )
{
SdrObject* pNew = pFmt->FindSdrObject();
- if( FLY_IN_CNTNT != aAnchor.GetAnchorId() )
+ if ( FLY_AS_CHAR != aAnchor.GetAnchorId() )
{
Point aPos( rInsPt );
aPos -= aNewAnch;
@@ -496,10 +501,10 @@ BOOL SwFEShell::Copy( SwFEShell* pDestShell, const Point& rSttPt,
bRet = TRUE;
Point aNewAnch;
- if ( FLY_AT_CNTNT == aAnchor.GetAnchorId() ||
- FLY_AUTO_CNTNT == aAnchor.GetAnchorId() ||
- FLY_AT_FLY == aAnchor.GetAnchorId() ||
- FLY_IN_CNTNT == aAnchor.GetAnchorId() )
+ if ((FLY_AT_PARA == aAnchor.GetAnchorId()) ||
+ (FLY_AT_CHAR == aAnchor.GetAnchorId()) ||
+ (FLY_AT_FLY == aAnchor.GetAnchorId()) ||
+ (FLY_AS_CHAR == aAnchor.GetAnchorId()))
{
if ( this == pDestShell )
{
@@ -537,7 +542,7 @@ BOOL SwFEShell::Copy( SwFEShell* pDestShell, const Point& rSttPt,
aNewAnch, GetDoc() == pDestShell->GetDoc());
}
}
- else if( FLY_PAGE == aAnchor.GetAnchorId() )
+ else if ( FLY_AT_PAGE == aAnchor.GetAnchorId() )
{
aAnchor.SetPageNum( pDestShell->GetPageNumber( rInsPt ) );
const SwRootFrm* pTmpRoot = pDestShell->GetLayout();
@@ -554,7 +559,7 @@ BOOL SwFEShell::Copy( SwFEShell* pDestShell, const Point& rSttPt,
SwFrmFmt *pOldFmt = pFlyFmt;
pFlyFmt = pDestShell->GetDoc()->CopyLayoutFmt( *pFlyFmt, aAnchor, true, true );
- if( FLY_IN_CNTNT != aAnchor.GetAnchorId() )
+ if ( FLY_AS_CHAR != aAnchor.GetAnchorId() )
{
Point aPos( rInsPt );
aPos -= aNewAnch;
@@ -918,7 +923,7 @@ BOOL SwFEShell::Paste( SwDoc* pClpDoc, BOOL bIncludingPageFrames )
if( Imp()->GetDrawView()->IsGroupEntered() &&
RES_DRAWFRMFMT == rCpyFmt.Which() &&
- FLY_IN_CNTNT != rCpyFmt.GetAnchor().GetAnchorId() )
+ (FLY_AS_CHAR != rCpyFmt.GetAnchor().GetAnchorId()) )
{
const SdrObject* pSdrObj = rCpyFmt.FindSdrObject();
if( pSdrObj )
@@ -966,9 +971,9 @@ BOOL SwFEShell::Paste( SwDoc* pClpDoc, BOOL bIncludingPageFrames )
if( bInsWithFmt )
{
SwFmtAnchor aAnchor( rCpyFmt.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* pPos = PCURCRSR->GetPoint();
// #108784# allow shapes (no controls) in header/footer
@@ -979,7 +984,7 @@ BOOL SwFEShell::Paste( SwDoc* pClpDoc, BOOL bIncludingPageFrames )
aAnchor.SetAnchor( pPos );
}
- else if( FLY_PAGE == aAnchor.GetAnchorId() )
+ else if ( FLY_AT_PAGE == aAnchor.GetAnchorId() )
{
aAnchor.SetPageNum( GetPhyPageNum() );
}
@@ -1091,7 +1096,7 @@ BOOL SwFEShell::Paste( SwDoc* pClpDoc, BOOL bIncludingPageFrames )
if( bInsWithFmt )
{
SwFmtAnchor aAnchor( rCpyFmt.GetAnchor() );
- if( FLY_PAGE == aAnchor.GetAnchorId() )
+ if ( FLY_AT_PAGE == aAnchor.GetAnchorId() )
{
aAnchor.SetPageNum( aAnchor.GetPageNum() + nStartPageNumber - 1 );
}
@@ -1199,7 +1204,7 @@ BOOL SwFEShell::PastePages( SwFEShell& rToFill, USHORT nStartPage, USHORT nEndPa
{
const SwFrmFmt& rCpyFmt = *(*GetDoc()->GetSpzFrmFmts())[i];
SwFmtAnchor aAnchor( rCpyFmt.GetAnchor() );
- if( FLY_PAGE == aAnchor.GetAnchorId() &&
+ if ((FLY_AT_PAGE == aAnchor.GetAnchorId()) &&
aAnchor.GetPageNum() >= nStartPage && aAnchor.GetPageNum() <= nEndPage)
{
aAnchor.SetPageNum( aAnchor.GetPageNum() - nStartPage + 1);
diff --git a/sw/source/core/frmedt/fefly1.cxx b/sw/source/core/frmedt/fefly1.cxx
index 1b18dc178dae..db708c63a0e1 100644
--- a/sw/source/core/frmedt/fefly1.cxx
+++ b/sw/source/core/frmedt/fefly1.cxx
@@ -113,7 +113,7 @@ sal_Bool lcl_SetNewFlyPos( const SwNode& rNode, SwFmtAnchor& rAnchor,
const SwPageFrm *pPg = pCFrm ? pCFrm->FindPageFrm() : 0;
rAnchor.SetPageNum( pPg ? pPg->GetPhyPageNum() : 1 );
- rAnchor.SetType( FLY_PAGE );
+ rAnchor.SetType( FLY_AT_PAGE );
}
return bRet;
}
@@ -130,9 +130,9 @@ BOOL lcl_FindAnchorPos( SwDoc& rDoc, const Point& rPt, const SwFrm& rFrm,
Point aTmpPnt( rPt );
switch( nNew )
{
- case FLY_IN_CNTNT: // sollte der nicht auch mit hinein?
- case FLY_AT_CNTNT:
- case FLY_AUTO_CNTNT: // LAYER_IMPL
+ case FLY_AS_CHAR: // sollte der nicht auch mit hinein?
+ case FLY_AT_PARA:
+ case FLY_AT_CHAR: // LAYER_IMPL
{
//Ausgehend von der linken oberen Ecke des Fly den
//dichtesten CntntFrm suchen.
@@ -146,7 +146,7 @@ BOOL lcl_FindAnchorPos( SwDoc& rDoc, const Point& rPt, const SwFrm& rFrm,
}
SwPosition aPos( *((SwCntntFrm*)pNewAnch)->GetNode() );
- if( FLY_AUTO_CNTNT == nNew || FLY_IN_CNTNT == nNew )
+ if ((FLY_AT_CHAR == nNew) || (FLY_AS_CHAR == nNew))
{
// es muss ein TextNode gefunden werden, denn nur in diesen
// ist ein Inhaltsgebundene Frames zu verankern
@@ -186,10 +186,10 @@ BOOL lcl_FindAnchorPos( SwDoc& rDoc, const Point& rPt, const SwFrm& rFrm,
}
}
- aNewAnch.SetType( nNew = FLY_PAGE );
+ aNewAnch.SetType( nNew = FLY_AT_PAGE );
// no break
- case FLY_PAGE:
+ case FLY_AT_PAGE:
pNewAnch = rFrm.FindPageFrm();
aNewAnch.SetPageNum( pNewAnch->GetPhyPageNum() );
break;
@@ -219,8 +219,8 @@ sal_Bool lcl_ChkAndSetNewAnchor( const SwFlyFrm& rFly, SfxItemSet& rSet )
SwDoc* pDoc = (SwDoc*)rFmt.GetDoc();
#ifndef PRODUCT
- ASSERT( !(nNew == FLY_PAGE &&
- (FLY_AT_CNTNT==nOld || FLY_AUTO_CNTNT==nOld || FLY_IN_CNTNT==nOld ) &&
+ ASSERT( !(nNew == FLY_AT_PAGE &&
+ (FLY_AT_PARA==nOld || FLY_AT_CHAR==nOld || FLY_AS_CHAR==nOld ) &&
pDoc->IsInHeaderFooter( rOldAnch.GetCntntAnchor()->nNode )),
"Unerlaubter Ankerwechsel in Head/Foot." );
#endif
@@ -441,7 +441,7 @@ Point SwFEShell::FindAnchorPos( const Point& rAbsPos, sal_Bool bMoveIt )
SwFrmFmt& rFmt = pAnchoredObj->GetFrmFmt();
RndStdIds nAnchorId = rFmt.GetAnchor().GetAnchorId();
- if ( FLY_IN_CNTNT == nAnchorId )
+ if ( FLY_AS_CHAR == nAnchorId )
return aRet;
sal_Bool bFlyFrame = pObj->ISA(SwVirtFlyDrawObj);
@@ -462,8 +462,10 @@ Point SwFEShell::FindAnchorPos( const Point& rAbsPos, sal_Bool bMoveIt )
pOldAnch = pFly->GetAnchorFrm();
if( !pOldAnch )
return aRet;
- if( FLY_PAGE != nAnchorId )
+ if ( FLY_AT_PAGE != nAnchorId )
+ {
pFooterOrHeader = pCntnt->FindFooterOrHeader();
+ }
}
// OD 26.06.2003 #108784# - set <pFooterOrHeader> also for drawing
// objects, but not for control objects.
@@ -489,14 +491,18 @@ Point SwFEShell::FindAnchorPos( const Point& rAbsPos, sal_Bool bMoveIt )
const SwFrm *pNewAnch;
if( pTxtFrm )
{
- if( FLY_PAGE == nAnchorId )
+ if ( FLY_AT_PAGE == nAnchorId )
+ {
pNewAnch = pTxtFrm->FindPageFrm();
+ }
else
{
pNewAnch = ::FindAnchor( pTxtFrm, rAbsPos );
if( FLY_AT_FLY == nAnchorId ) // LAYER_IMPL
+ {
pNewAnch = pNewAnch->FindFlyFrm();
+ }
}
}
else
@@ -522,19 +528,19 @@ Point SwFEShell::FindAnchorPos( const Point& rAbsPos, sal_Bool bMoveIt )
{
aRet = pNewAnch->GetFrmAnchorPos( ::HasWrap( pObj ) );
- if( bMoveIt || nAnchorId == FLY_AUTO_CNTNT )
+ if ( bMoveIt || (nAnchorId == FLY_AT_CHAR) )
{
SwFmtAnchor aAnch( rFmt.GetAnchor() );
switch ( nAnchorId )
{
- case FLY_AT_CNTNT:
+ case FLY_AT_PARA:
{
SwPosition *pPos = (SwPosition*)aAnch.GetCntntAnchor();
pPos->nNode = *pTxtFrm->GetNode();
pPos->nContent.Assign(0,0);
break;
}
- case FLY_PAGE:
+ case FLY_AT_PAGE:
{
aAnch.SetPageNum( ((const SwPageFrm*)pNewAnch)->
GetPhyPageNum() );
@@ -547,7 +553,7 @@ Point SwFEShell::FindAnchorPos( const Point& rAbsPos, sal_Bool bMoveIt )
aAnch.SetAnchor( &aPos );
break;
}
- case FLY_AUTO_CNTNT:
+ case FLY_AT_CHAR:
{
SwPosition *pPos = (SwPosition*)aAnch.GetCntntAnchor();
Point aTmpPnt( rAbsPos );
@@ -666,21 +672,25 @@ const SwFrmFmt *SwFEShell::NewFlyFrm( const SfxItemSet& rSet, sal_Bool bAnchVali
RndStdIds eRndId = rAnch.GetAnchorId();
switch( eRndId )
{
- case FLY_PAGE:
+ case FLY_AT_PAGE:
if( !rAnch.GetPageNum() ) //HotFix: Bug in UpdateByExample
rAnch.SetPageNum( 1 );
break;
case FLY_AT_FLY:
- case FLY_AT_CNTNT:
- case FLY_AUTO_CNTNT:
- case FLY_IN_CNTNT:
+ case FLY_AT_PARA:
+ case FLY_AT_CHAR:
+ case FLY_AS_CHAR:
if( !bAnchValid )
{
if( FLY_AT_FLY != eRndId )
+ {
rAnch.SetAnchor( &rPos );
+ }
else if( lcl_SetNewFlyPos( rPos.nNode.GetNode(), rAnch, aPt ) )
- eRndId = FLY_PAGE;
+ {
+ eRndId = FLY_AT_PAGE;
+ }
}
break;
@@ -698,7 +708,7 @@ const SwFrmFmt *SwFEShell::NewFlyFrm( const SfxItemSet& rSet, sal_Bool bAnchVali
SwFmtVertOrient aOldV;
SwFmtHoriOrient aOldH;
- if( FLY_PAGE != eRndId )
+ if ( FLY_AT_PAGE != eRndId )
{
// erstmal als mit Seitenbindung, Absatz/Zeichenbindung erst wenn
// alles verschoben ist. Dann ist die Position gueltig!
@@ -706,7 +716,7 @@ const SwFrmFmt *SwFEShell::NewFlyFrm( const SfxItemSet& rSet, sal_Bool bAnchVali
// umsetzen, damit diese beim Umanker NICHT
// korrigiert wird
pOldAnchor = new SwFmtAnchor( rAnch );
- ((SfxItemSet&)rSet).Put( SwFmtAnchor( FLY_PAGE, 1 ) );
+ const_cast<SfxItemSet&>(rSet).Put( SwFmtAnchor( FLY_AT_PAGE, 1 ) );
const SfxPoolItem* pItem;
if( SFX_ITEM_SET == rSet.GetItemState( RES_HORI_ORIENT, sal_False, &pItem )
@@ -741,8 +751,10 @@ const SwFrmFmt *SwFEShell::NewFlyFrm( const SfxItemSet& rSet, sal_Bool bAnchVali
const SwFrm* pAnch = ::FindAnchor( GetLayout(), aPt, sal_False );
SwPosition aPos( *((SwCntntFrm*)pAnch)->GetNode() );
- if( FLY_IN_CNTNT == eRndId )
+ if ( FLY_AS_CHAR == eRndId )
+ {
aPos.nContent.Assign( ((SwCntntFrm*)pAnch)->GetNode(), 0 );
+ }
pOldAnchor->SetAnchor( &aPos );
// das verschieben von TabelleSelektion ist noch nicht
@@ -818,9 +830,9 @@ void SwFEShell::Insert( const String& rGrfName, const String& rFltName,
SwFmtAnchor* pAnchor = (SwFmtAnchor*)pItem;
switch( pAnchor->GetAnchorId())
{
- case FLY_AT_CNTNT:
- case FLY_AUTO_CNTNT: // LAYER_IMPL
- case FLY_IN_CNTNT:
+ case FLY_AT_PARA:
+ case FLY_AT_CHAR: // LAYER_IMPL
+ case FLY_AS_CHAR:
if( !pAnchor->GetCntntAnchor() )
{
pAnchor->SetAnchor( pCursor->GetPoint() );
@@ -833,7 +845,7 @@ void SwFEShell::Insert( const String& rGrfName, const String& rFltName,
*pAnchor, GetCrsrDocPos() );
}
break;
- case FLY_PAGE:
+ case FLY_AT_PAGE:
if( !pAnchor->GetPageNum() )
{
pAnchor->SetPageNum( pCursor->GetPageNum(
@@ -912,10 +924,10 @@ void SwFEShell::Insert( SdrObject& rDrawObj,
const SfxPoolItem* pItem;
if( !pFlyAttrSet ||
!pFlyAttrSet->GetItemState( RES_ANCHOR, sal_False, &pItem ) ||
- FLY_PAGE != ((SwFmtAnchor*)pItem)->GetAnchorId() )
+ (FLY_AT_PAGE != ((SwFmtAnchor*)pItem)->GetAnchorId()))
{
pSet = new SfxItemSet( GetDoc()->GetAttrPool(), aFrmFmtSetRange );
- pSet->Put( SwFmtAnchor( FLY_AT_CNTNT ));
+ pSet->Put( SwFmtAnchor( FLY_AT_PARA ));
pFlyAttrSet = pSet;
}
@@ -978,8 +990,10 @@ void SwFEShell::GetPageObjs( SvPtrarr& rFillArr )
for( sal_uInt16 n = 0; n < pDoc->GetSpzFrmFmts()->Count(); ++n )
{
pFmt = (const SwFrmFmt*)(*pDoc->GetSpzFrmFmts())[n];
- if( FLY_PAGE == pFmt->GetAnchor().GetAnchorId() )
+ if (FLY_AT_PAGE == pFmt->GetAnchor().GetAnchorId())
+ {
rFillArr.Insert( (VoidPtr)pFmt, rFillArr.Count() );
+ }
}
}
@@ -1010,7 +1024,7 @@ void SwFEShell::SetPageObjsNewPage( SvPtrarr& rFillArr, int nOffset )
{
// FlyFmt ist noch gueltig, also behandeln
SwFmtAnchor aNewAnchor( pFmt->GetAnchor() );
- if( FLY_PAGE != aNewAnchor.GetAnchorId() ||
+ if ((FLY_AT_PAGE != aNewAnchor.GetAnchorId()) ||
0 >= ( nNewPage = aNewAnchor.GetPageNum() + nOffset ) )
// chaos::Anchor wurde veraendert oder ungueltige SeitenNummer,
// also nicht veraendern !!
@@ -1086,12 +1100,12 @@ sal_Bool SwFEShell::GetFlyFrmAttr( SfxItemSet &rSet ) const
SwFmtAnchor* pAnchor = (SwFmtAnchor*)pItem;
RndStdIds eType = pAnchor->GetAnchorId();
- if( FLY_PAGE != eType )
+ if ( FLY_AT_PAGE != eType )
{
// OD 12.11.2003 #i22341# - content anchor of anchor item is needed.
// Thus, don't overwrite anchor item by default contructed anchor item.
//rSet.Put( SwFmtAnchor( eType ) );
- if( FLY_IN_CNTNT == eType )
+ if ( FLY_AS_CHAR == eType )
{
rSet.ClearItem( RES_OPAQUE );
rSet.ClearItem( RES_SURROUND );
@@ -1828,7 +1842,7 @@ ObjCntType SwFEShell::GetObjCntType( const SdrObject& rObj ) const
"<SwFEShell::GetObjCntType(..)> - missing frame format" );
eType = OBJCNT_NONE;
}
- else if ( FLY_IN_CNTNT != pFrmFmt->GetAnchor().GetAnchorId() )
+ else if ( FLY_AS_CHAR != pFrmFmt->GetAnchor().GetAnchorId() )
{
eType = OBJCNT_GROUPOBJ;
}
diff --git a/sw/source/core/frmedt/feshview.cxx b/sw/source/core/frmedt/feshview.cxx
index d465abc4403e..af2e8d1c7677 100644
--- a/sw/source/core/frmedt/feshview.cxx
+++ b/sw/source/core/frmedt/feshview.cxx
@@ -326,7 +326,7 @@ sal_Bool SwFEShell::MoveAnchor( USHORT nDir )
SwFrmFmt& rFmt = pAnchoredObj->GetFrmFmt();
SwFmtAnchor aAnch( rFmt.GetAnchor() );
RndStdIds nAnchorId = aAnch.GetAnchorId();
- if ( FLY_IN_CNTNT == nAnchorId )
+ if ( FLY_AS_CHAR == nAnchorId )
return sal_False;
if( pOld->IsVertical() )
{
@@ -348,7 +348,7 @@ sal_Bool SwFEShell::MoveAnchor( USHORT nDir )
}
}
switch ( nAnchorId ) {
- case FLY_PAGE:
+ case FLY_AT_PAGE:
{
ASSERT( pOld->IsPageFrm(), "Wrong anchor, page exspected." );
if( SW_MOVE_UP == nDir )
@@ -362,7 +362,7 @@ sal_Bool SwFEShell::MoveAnchor( USHORT nDir )
}
break;
}
- case FLY_AUTO_CNTNT:
+ case FLY_AT_CHAR:
{
ASSERT( pOld->IsCntntFrm(), "Wrong anchor, page exspected." );
if( SW_MOVE_LEFT == nDir || SW_MOVE_RIGHT == nDir )
@@ -396,7 +396,7 @@ sal_Bool SwFEShell::MoveAnchor( USHORT nDir )
}
}
} // no break!
- case FLY_AT_CNTNT:
+ case FLY_AT_PARA:
{
ASSERT( pOld->IsCntntFrm(), "Wrong anchor, page exspected." );
if( SW_MOVE_UP == nDir )
@@ -1652,7 +1652,7 @@ BOOL SwFEShell::ImpEndCreate()
if( bCharBound )
{
- aAnch.SetType( FLY_IN_CNTNT );
+ aAnch.SetType( FLY_AS_CHAR );
aAnch.SetAnchor( &aPos );
}
}
@@ -1719,7 +1719,7 @@ BOOL SwFEShell::ImpEndCreate()
bAtPage = true;
else
{
- aAnch.SetType( FLY_AT_CNTNT );
+ aAnch.SetType( FLY_AT_PARA );
aAnch.SetAnchor( &aPos );
}
}
@@ -1728,7 +1728,7 @@ BOOL SwFEShell::ImpEndCreate()
{
pPage = pAnch->FindPageFrm();
- aAnch.SetType( FLY_PAGE );
+ aAnch.SetType( FLY_AT_PAGE );
aAnch.SetPageNum( pPage->GetPhyPageNum() );
pAnch = pPage; // die Page wird jetzt zum Anker
}
@@ -1871,7 +1871,7 @@ BOOL SwFEShell::ImpEndCreate()
// <--
if( bCharBound )
{
- ASSERT( aAnch.GetAnchorId() == FLY_IN_CNTNT, "wrong AnchorType" );
+ ASSERT( aAnch.GetAnchorId() == FLY_AS_CHAR, "wrong AnchorType" );
SwTxtNode *pNd = aAnch.GetCntntAnchor()->nNode.GetNode().GetTxtNode();
SwFmtFlyCnt aFmt( pFmt );
pNd->InsertItem(aFmt,
@@ -2256,7 +2256,7 @@ BOOL SwFEShell::IsGroupSelected()
// --> FME 2004-12-08 #i38505# No ungroup allowed for 3d objects
!pObj->Is3DObj() &&
// <--
- FLY_IN_CNTNT != ((SwDrawContact*)GetUserCall(pObj))->
+ FLY_AS_CHAR != ((SwDrawContact*)GetUserCall(pObj))->
GetFmt()->GetAnchor().GetAnchorId() )
{
return TRUE;
@@ -2302,7 +2302,7 @@ bool SwFEShell::IsGroupAllowed() const
"<SwFEShell::IsGroupAllowed()> - missing frame format" );
bIsGroupAllowed = false;
}
- else if ( FLY_IN_CNTNT == pFrmFmt->GetAnchor().GetAnchorId() )
+ else if ( FLY_AS_CHAR == pFrmFmt->GetAnchor().GetAnchorId() )
{
bIsGroupAllowed = false;
}
@@ -2619,7 +2619,7 @@ BOOL SwFEShell::IsAlignPossible() const
SdrObject *pO = Imp()->GetDrawView()->GetMarkedObjectList().GetMark(0)->GetMarkedSdrObj();
SwDrawContact *pC = (SwDrawContact*)GetUserCall(pO);
//only as character bound drawings can be aligned
- bRet = pC->GetFmt()->GetAnchor().GetAnchorId() == FLY_IN_CNTNT;
+ bRet = (pC->GetFmt()->GetAnchor().GetAnchorId() == FLY_AS_CHAR);
}
if ( bRet )
return Imp()->GetDrawView()->IsAlignPossible();
@@ -2664,7 +2664,7 @@ void SwFEShell::CheckUnboundObjects()
{
pAnch = ::FindAnchor( pPage, aPt, TRUE );
SwPosition aPos( *((SwCntntFrm*)pAnch)->GetNode() );
- aAnch.SetType( FLY_AT_CNTNT );
+ aAnch.SetType( FLY_AT_PARA );
aAnch.SetAnchor( &aPos );
((SwRect&)GetCharRect()).Pos() = aPt;
}
diff --git a/sw/source/core/frmedt/fews.cxx b/sw/source/core/frmedt/fews.cxx
index d82b1de4cfdb..9319cddcfd82 100644
--- a/sw/source/core/frmedt/fews.cxx
+++ b/sw/source/core/frmedt/fews.cxx
@@ -31,11 +31,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-
#include <tools/list.hxx>
-//#ifndef _SVDVMARK_HXX //autogen
-//#include <svx/svdvmark.hxx>
-//#endif
#include <svx/svdobj.hxx>
#include <init.hxx>
#include <fesh.hxx>
@@ -71,8 +67,10 @@
// OD 2004-03-29 #i26791#
#include <dcontact.hxx>
+
using namespace com::sun::star;
+
TYPEINIT1(SwFEShell,SwEditShell)
/***********************************************************************
@@ -780,12 +778,12 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect,
BOOL bVertic = FALSE;
BOOL bRTL = FALSE;
- if( FLY_PAGE == _nAnchorId || FLY_AT_FLY == _nAnchorId ) // LAYER_IMPL
+ if ((FLY_AT_PAGE == _nAnchorId) || (FLY_AT_FLY == _nAnchorId)) // LAYER_IMPL
{
const SwFrm* pTmp = pFrm;
// OD 06.11.2003 #i22305#
- if ( FLY_PAGE == _nAnchorId ||
- ( FLY_AT_FLY == _nAnchorId && !_bFollowTextFlow ) )
+ if ((FLY_AT_PAGE == _nAnchorId) ||
+ ((FLY_AT_FLY == _nAnchorId) && !_bFollowTextFlow))
{
pFrm = pPage;
}
@@ -906,7 +904,7 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect,
aPos = (pFrm->Frm().*fnRect->fnGetPos)();
// OD 08.09.2003 #i17567#, #108749#, #110354# - allow negative positions
// for fly frames anchor to paragraph/to character.
- if ( _nAnchorId == FLY_AT_CNTNT || _nAnchorId == FLY_AUTO_CNTNT )
+ if ((_nAnchorId == FLY_AT_PARA) || (_nAnchorId == FLY_AT_CHAR))
{
// The rectangle, the fly frame can be positioned in, is determined
// horizontally by the frame area of the horizontal environment
@@ -985,7 +983,7 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect,
// fly frame). Thus, assure this.
const SwTxtFrm* pTxtFrm( dynamic_cast<const SwTxtFrm*>(pFrm) );
if ( pTxtFrm &&
- _nAnchorId == FLY_AUTO_CNTNT &&
+ (_nAnchorId == FLY_AT_CHAR) &&
( _eVertRelOrient == text::RelOrientation::CHAR ||
_eVertRelOrient == text::RelOrientation::TEXT_LINE ) )
{
@@ -1032,7 +1030,7 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect,
// position (<aPos.X()> respectively <aPos.Y()>), if object is
// anchored to character and horizontal aligned at character.
if ( pTxtFrm &&
- _nAnchorId == FLY_AUTO_CNTNT &&
+ (_nAnchorId == FLY_AT_CHAR) &&
_eHoriRelOrient == text::RelOrientation::CHAR )
{
SwTwips nLeft = 0L;
diff --git a/sw/source/core/frmedt/tblsel.cxx b/sw/source/core/frmedt/tblsel.cxx
index f971be8d79e4..a61f27e864b4 100644
--- a/sw/source/core/frmedt/tblsel.cxx
+++ b/sw/source/core/frmedt/tblsel.cxx
@@ -30,6 +30,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
+
#include <hintids.hxx>
#include <svx/boxitem.hxx>
#include <svx/protitem.hxx>
@@ -984,11 +985,11 @@ BOOL IsEmptyBox( const SwTableBox& rBox, SwPaM& rPam )
for( USHORT n = 0; n < rFmts.Count(); ++n )
{
- const SwPosition* pAPos;
const SwFmtAnchor& rAnchor = rFmts[n]->GetAnchor();
- if( ( FLY_AT_CNTNT == rAnchor.GetAnchorId() ||
- FLY_AUTO_CNTNT == rAnchor.GetAnchorId() ) &&
- 0 != ( pAPos = rAnchor.GetCntntAnchor() ) &&
+ const SwPosition* pAPos = rAnchor.GetCntntAnchor();
+ if (pAPos &&
+ ((FLY_AT_PARA == rAnchor.GetAnchorId()) ||
+ (FLY_AT_CHAR == rAnchor.GetAnchorId())) &&
nSttIdx <= ( nIdx = pAPos->nNode.GetIndex() ) &&
nIdx < nEndIdx )
{
diff --git a/sw/source/core/inc/flyfrm.hxx b/sw/source/core/inc/flyfrm.hxx
index dc8975f3fd47..61004c3816a5 100644
--- a/sw/source/core/inc/flyfrm.hxx
+++ b/sw/source/core/inc/flyfrm.hxx
@@ -109,10 +109,10 @@ protected:
//(CheckClip) nur das Format aufgerufen wird;
//nicht aber die Breite anhand der Attribute
//wieder bestimmt wird.
- BOOL bInCnt :1; // FLY_IN_CNTNT, als Zeichen verankert
- BOOL bAtCnt :1; // FLY_AT_CNTNT, am Absatz verankert
- BOOL bLayout :1; // FLY_PAGE, FLY_AT_FLY, an Seite oder Rahmen
- BOOL bAutoPosition :1; // FLY_AUTO_CNTNT, im Text verankerter Rahmen
+ BOOL bInCnt :1; // FLY_AS_CHAR, anchored as character
+ BOOL bAtCnt :1; // FLY_AT_PARA, anchored at paragraph
+ BOOL bLayout :1; // FLY_AT_PAGE, FLY_AT_FLY, at page or at frame
+ BOOL bAutoPosition :1; // FLY_AT_CHAR, anchored at character
BOOL bNoShrink :1; // temporary forbud of shrinking to avoid loops
BOOL bLockDeleteContent :1; // If the flag is set, the content of the
// fly frame is not deleted if moved to
diff --git a/sw/source/core/layout/anchoreddrawobject.cxx b/sw/source/core/layout/anchoreddrawobject.cxx
index 0976dcbefdc0..5a6be9f2e255 100644
--- a/sw/source/core/layout/anchoreddrawobject.cxx
+++ b/sw/source/core/layout/anchoreddrawobject.cxx
@@ -37,12 +37,8 @@
#include <pagefrm.hxx>
#include <cntfrm.hxx>
#include <doc.hxx>
-#ifndef _TOCNTNTANCHOROBJECTPOSITION_HXX
#include <tocntntanchoredobjectposition.hxx>
-#endif
-#ifndef _TOLAYOUTANCHOROBJECTPOSITION_HXX
#include <tolayoutanchoredobjectposition.hxx>
-#endif
#include <frmtool.hxx>
#include <fmtornt.hxx>
// --> OD 2004-08-12 #i32795#
@@ -357,7 +353,7 @@ void SwAnchoredDrawObject::MakeObjPos()
// determine relative position of drawing object and set it
switch ( pDrawContact->GetAnchorId() )
{
- case FLY_IN_CNTNT:
+ case FLY_AS_CHAR:
{
// indicate that position will be valid after positioning is performed
mbValidPos = true;
@@ -365,15 +361,15 @@ void SwAnchoredDrawObject::MakeObjPos()
// during the format of its anchor frame - see <SwFlyCntPortion::SetBase(..)>
}
break;
- case FLY_AT_CNTNT:
- case FLY_AUTO_CNTNT:
+ case FLY_AT_PARA:
+ case FLY_AT_CHAR:
{
// --> OD 2004-08-12 #i32795# - move intrinsic positioning to
// helper method <_MakeObjPosAnchoredAtPara()>
_MakeObjPosAnchoredAtPara();
}
break;
- case FLY_PAGE:
+ case FLY_AT_PAGE:
case FLY_AT_FLY:
{
// --> OD 2004-08-12 #i32795# - move intrinsic positioning to
@@ -603,7 +599,7 @@ void SwAnchoredDrawObject::_InvalidatePage( SwPageFrm* _pPageFrm )
{
// --> OD 2004-11-11 #i35007# - correct invalidation for as-character
// anchored objects.
- if ( GetFrmFmt().GetAnchor().GetAnchorId() == FLY_IN_CNTNT )
+ if ( GetFrmFmt().GetAnchor().GetAnchorId() == FLY_AS_CHAR )
{
_pPageFrm->InvalidateFlyInCnt();
}
@@ -645,7 +641,7 @@ void SwAnchoredDrawObject::InvalidateObjPos()
// --> OD 2005-03-09 #i44559# - assure, that text hint is already
// existing in the text frame
if ( GetAnchorFrm()->ISA(SwTxtFrm) &&
- GetFrmFmt().GetAnchor().GetAnchorId() == FLY_IN_CNTNT )
+ (GetFrmFmt().GetAnchor().GetAnchorId() == FLY_AS_CHAR) )
{
SwTxtFrm* pAnchorTxtFrm( static_cast<SwTxtFrm*>(AnchorFrm()) );
if ( pAnchorTxtFrm->GetTxtNode()->GetpSwpHints() &&
diff --git a/sw/source/core/layout/anchoredobject.cxx b/sw/source/core/layout/anchoredobject.cxx
index 62048fbca378..67a072832eb1 100644
--- a/sw/source/core/layout/anchoredobject.cxx
+++ b/sw/source/core/layout/anchoredobject.cxx
@@ -306,7 +306,7 @@ void SwAnchoredObject::CheckCharRectAndTopOfLine(
GetAnchorFrm()->IsTxtFrm() )
{
const SwFmtAnchor& rAnch = GetFrmFmt().GetAnchor();
- if ( rAnch.GetAnchorId() == FLY_AUTO_CNTNT &&
+ if ( (rAnch.GetAnchorId() == FLY_AT_CHAR) &&
rAnch.GetCntntAnchor() )
{
// --> OD 2004-07-14 #117380# - if requested, assure that anchor frame,
@@ -540,8 +540,8 @@ bool SwAnchoredObject::ConsiderObjWrapInfluenceOnObjPos() const
// <--
{
const SwFmtAnchor& rAnchor = rObjFmt.GetAnchor();
- if ( ( rAnchor.GetAnchorId() == FLY_AUTO_CNTNT ||
- rAnchor.GetAnchorId() == FLY_AT_CNTNT ) &&
+ if ( ((rAnchor.GetAnchorId() == FLY_AT_CHAR) ||
+ (rAnchor.GetAnchorId() == FLY_AT_PARA)) &&
rObjFmt.GetSurround().GetSurround() != SURROUND_THROUGHT )
{
// --> OD 2004-09-23 #i34520# - text also wraps around anchored
@@ -792,7 +792,7 @@ void SwAnchoredObject::UpdateObjInSortedList()
AnchorFrm()->GetDrawObjs()->Update( *this );
// update its position in the sorted object list of its page frame
// note: as-character anchored object aren't registered at a page frame
- if ( GetFrmFmt().GetAnchor().GetAnchorId() != FLY_IN_CNTNT )
+ if ( GetFrmFmt().GetAnchor().GetAnchorId() != FLY_AS_CHAR )
{
GetPageFrm()->GetSortedObjs()->Update( *this );
}
@@ -859,8 +859,8 @@ SwTxtFrm* SwAnchoredObject::FindAnchorCharFrm()
if ( mpAnchorFrm )
{
const SwFmtAnchor& rAnch = GetFrmFmt().GetAnchor();
- if ( rAnch.GetAnchorId() == FLY_AUTO_CNTNT ||
- rAnch.GetAnchorId() == FLY_IN_CNTNT )
+ if ((rAnch.GetAnchorId() == FLY_AT_CHAR) ||
+ (rAnch.GetAnchorId() == FLY_AS_CHAR))
{
pAnchorCharFrm = &(static_cast<SwTxtFrm*>(AnchorFrm())->
GetFrmAtOfst( rAnch.GetCntntAnchor()->nContent.GetIndex() ));
diff --git a/sw/source/core/layout/atrfrm.cxx b/sw/source/core/layout/atrfrm.cxx
index 7601f4ae370d..bdef8a74bcf7 100644
--- a/sw/source/core/layout/atrfrm.cxx
+++ b/sw/source/core/layout/atrfrm.cxx
@@ -51,9 +51,7 @@
#include <com/sun/star/awt/Size.hpp>
#include <svtools/unoimap.hxx>
#include <svtools/unoevent.hxx>
-#ifndef __SBX_SBXVARIABLE_HXX //autogen
#include <basic/sbxvar.hxx>
-#endif
#include <svtools/imap.hxx>
#include <svtools/imapobj.hxx>
#include <svx/ulspitem.hxx>
@@ -79,9 +77,7 @@
#include <fmtcnct.hxx>
#include <node.hxx>
#include <section.hxx>
-#ifndef _FMTLINE_HXX
#include <fmtline.hxx>
-#endif
#include <tgrditem.hxx>
#include <hfspacingitem.hxx>
#include <doc.hxx>
@@ -110,18 +106,12 @@
#include <svx/brshitem.hxx>
#include <goodies/grfmgr.hxx>
-#ifndef _CMDID_H
#include <cmdid.h>
-#endif
-#ifndef _UNOMID_H
#include <unomid.h>
-#endif
#ifndef _COMCORE_HRC
#include <comcore.hrc>
#endif
-#ifndef _SVX_SVUNDO_HXX
#include <svx/svdundo.hxx> // #111827#
-#endif
// OD 2004-05-24 #i28701#
#include <sortedobjs.hxx>
// --> OD 2006-03-06 #125892#
@@ -1484,9 +1474,11 @@ void SwFmtAnchor::SetAnchor( const SwPosition *pPos )
delete pCntntAnchor;
pCntntAnchor = pPos ? new SwPosition( *pPos ) : 0;
//AM Absatz gebundene Flys sollten nie in den Absatz hineinzeigen.
- if ( pCntntAnchor && ( FLY_AT_CNTNT == nAnchorId ||
- FLY_AT_FLY == nAnchorId ))
+ if (pCntntAnchor &&
+ ((FLY_AT_PARA == nAnchorId) || (FLY_AT_FLY == nAnchorId)))
+ {
pCntntAnchor->nContent.Assign( 0, 0 );
+ }
}
SwFmtAnchor& SwFmtAnchor::operator=(const SwFmtAnchor& rAnchor)
@@ -1543,14 +1535,23 @@ BOOL SwFmtAnchor::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
case MID_ANCHOR_ANCHORTYPE:
text::TextContentAnchorType eRet;
- switch((sal_Int16)GetAnchorId())
+ switch (GetAnchorId())
{
- case FLY_AUTO_CNTNT : eRet = text::TextContentAnchorType_AT_CHARACTER;break;
- case FLY_PAGE : eRet = text::TextContentAnchorType_AT_PAGE; break;
- case FLY_AT_FLY : eRet = text::TextContentAnchorType_AT_FRAME; break;
- case FLY_IN_CNTNT : eRet = text::TextContentAnchorType_AS_CHARACTER;break;
- //case FLY_AT_CNTNT :
- default: eRet = text::TextContentAnchorType_AT_PARAGRAPH;
+ case FLY_AT_CHAR:
+ eRet = text::TextContentAnchorType_AT_CHARACTER;
+ break;
+ case FLY_AT_PAGE:
+ eRet = text::TextContentAnchorType_AT_PAGE;
+ break;
+ case FLY_AT_FLY:
+ eRet = text::TextContentAnchorType_AT_FRAME;
+ break;
+ case FLY_AS_CHAR:
+ eRet = text::TextContentAnchorType_AS_CHARACTER;
+ break;
+ //case FLY_AT_PARA:
+ default:
+ eRet = text::TextContentAnchorType_AT_PARAGRAPH;
}
rVal <<= eRet;
break;
@@ -1591,10 +1592,10 @@ BOOL SwFmtAnchor::PutValue( const uno::Any& rVal, BYTE nMemberId )
switch( SWUnoHelper::GetEnumAsInt32( rVal ) )
{
case text::TextContentAnchorType_AS_CHARACTER:
- eAnchor = FLY_IN_CNTNT;
+ eAnchor = FLY_AS_CHAR;
break;
case text::TextContentAnchorType_AT_PAGE:
- eAnchor = FLY_PAGE;
+ eAnchor = FLY_AT_PAGE;
if( GetPageNum() > 0 && pCntntAnchor )
{
// If the anchor type is page and a valid page number
@@ -1608,11 +1609,11 @@ BOOL SwFmtAnchor::PutValue( const uno::Any& rVal, BYTE nMemberId )
eAnchor = FLY_AT_FLY;
break;
case text::TextContentAnchorType_AT_CHARACTER:
- eAnchor = FLY_AUTO_CNTNT;
+ eAnchor = FLY_AT_CHAR;
break;
//case text::TextContentAnchorType_AT_PARAGRAPH:
default:
- eAnchor = FLY_AT_CNTNT;
+ eAnchor = FLY_AT_PARA;
break;
}
SetType( eAnchor );
@@ -1624,7 +1625,7 @@ BOOL SwFmtAnchor::PutValue( const uno::Any& rVal, BYTE nMemberId )
if((rVal >>= nVal) && nVal > 0)
{
SetPageNum( nVal );
- if( FLY_PAGE == GetAnchorId() && pCntntAnchor )
+ if ((FLY_AT_PAGE == GetAnchorId()) && pCntntAnchor)
{
// If the anchor type is page and a valid page number
// is set, the content paoition has to be deleted to not
@@ -2597,7 +2598,7 @@ sal_Bool SwFrmFmt::IsLowerOf( const SwFrmFmt& rFmt ) const
// dann mal ueber die Node-Positionen versuchen
const SwFmtAnchor* pAnchor = &rFmt.GetAnchor();
- if( FLY_PAGE != pAnchor->GetAnchorId() && pAnchor->GetCntntAnchor() )
+ if ((FLY_AT_PAGE != pAnchor->GetAnchorId()) && pAnchor->GetCntntAnchor())
{
const SwSpzFrmFmts& rFmts = *GetDoc()->GetSpzFrmFmts();
const SwNode* pFlyNd = pAnchor->GetCntntAnchor()->nNode.GetNode().
@@ -2616,9 +2617,11 @@ sal_Bool SwFrmFmt::IsLowerOf( const SwFrmFmt& rFmt ) const
return sal_True;
pAnchor = &pFmt->GetAnchor();
- if( FLY_PAGE == pAnchor->GetAnchorId() ||
+ if ((FLY_AT_PAGE == pAnchor->GetAnchorId()) ||
!pAnchor->GetCntntAnchor() )
+ {
return sal_False;
+ }
pFlyNd = pAnchor->GetCntntAnchor()->nNode.GetNode().
FindFlyStartNode();
@@ -2702,11 +2705,13 @@ void SwFlyFrmFmt::MakeFrms()
SwFmtAnchor aAnchorAttr( GetAnchor() );
switch( aAnchorAttr.GetAnchorId() )
{
- case FLY_IN_CNTNT:
- case FLY_AT_CNTNT:
- case FLY_AUTO_CNTNT:
+ case FLY_AS_CHAR:
+ case FLY_AT_PARA:
+ case FLY_AT_CHAR:
if( aAnchorAttr.GetCntntAnchor() )
+ {
pModify = aAnchorAttr.GetCntntAnchor()->nNode.GetNode().GetCntntNode();
+ }
break;
case FLY_AT_FLY:
@@ -2739,7 +2744,7 @@ void SwFlyFrmFmt::MakeFrms()
}
break;
- case FLY_PAGE:
+ case FLY_AT_PAGE:
{
sal_uInt16 nPgNum = aAnchorAttr.GetPageNum();
SwPageFrm *pPage = (SwPageFrm*)GetDoc()->GetRootFrm()->Lower();
@@ -2822,12 +2827,12 @@ void SwFlyFrmFmt::MakeFrms()
pFly = new SwFlyLayFrm( this, pFrm );
break;
- case FLY_AT_CNTNT:
- case FLY_AUTO_CNTNT:
+ case FLY_AT_PARA:
+ case FLY_AT_CHAR:
pFly = new SwFlyAtCntFrm( this, pFrm );
break;
- case FLY_IN_CNTNT:
+ case FLY_AS_CHAR:
pFly = new SwFlyInCntFrm( this, pFrm );
break;
default:
@@ -3026,8 +3031,8 @@ SwHandleAnchorNodeChg::SwHandleAnchorNodeChg( SwFlyFrmFmt& _rFlyFrmFmt,
mbAnchorNodeChanged( false )
{
const RndStdIds nNewAnchorType( _rNewAnchorFmt.GetAnchorId() );
- if ( ( nNewAnchorType == FLY_AT_CNTNT ||
- nNewAnchorType == FLY_AUTO_CNTNT ) &&
+ if ( ((nNewAnchorType == FLY_AT_PARA) ||
+ (nNewAnchorType == FLY_AT_CHAR)) &&
_rNewAnchorFmt.GetCntntAnchor() &&
_rNewAnchorFmt.GetCntntAnchor()->nNode.GetNode().GetCntntNode() )
{
diff --git a/sw/source/core/layout/calcmove.cxx b/sw/source/core/layout/calcmove.cxx
index b24ee7fd78b1..442a0fe38c57 100644
--- a/sw/source/core/layout/calcmove.cxx
+++ b/sw/source/core/layout/calcmove.cxx
@@ -46,9 +46,7 @@
#include <svx/ulspitem.hxx>
#include <svx/keepitem.hxx>
-#ifndef _OUTDEV_HXX //autogen
#include <vcl/outdev.hxx>
-#endif
#include <fmtfsize.hxx>
#include <fmtanchr.hxx>
#include <fmtclbl.hxx>
@@ -1014,10 +1012,12 @@ BOOL SwCntntFrm::MakePrtArea( const SwBorderAttrs &rAttrs )
rFmt.GetFrmSize().GetWidthPercent() )
continue;
- if ( FLY_IN_CNTNT == rFmt.GetAnchor().GetAnchorId() )
+ if ( FLY_AS_CHAR == rFmt.GetAnchor().GetAnchorId() )
+ {
nMinWidth = Max( nMinWidth,
bFly ? rFmt.GetFrmSize().GetWidth()
: pObj->GetObjRect().Width() );
+ }
// <--
}
diff --git a/sw/source/core/layout/flowfrm.cxx b/sw/source/core/layout/flowfrm.cxx
index 108dadf23ec8..0be59dbbeca1 100644
--- a/sw/source/core/layout/flowfrm.cxx
+++ b/sw/source/core/layout/flowfrm.cxx
@@ -366,7 +366,7 @@ BYTE SwFlowFrm::BwdMoveNecessary( const SwPageFrm *pPage, const SwRect &rRect )
//denn dann weiche ich ihm nicht aus.
if ( ::IsFrmInSameKontext( pAnchor, &rThis ) )
{
- if ( rFmt.GetAnchor().GetAnchorId() == FLY_AT_CNTNT )
+ if ( rFmt.GetAnchor().GetAnchorId() == FLY_AT_PARA )
{
// Den Index des anderen erhalten wir immer ueber das Ankerattr.
ULONG nTmpIndex = rFmt.GetAnchor().GetCntntAnchor()->nNode.GetIndex();
diff --git a/sw/source/core/layout/fly.cxx b/sw/source/core/layout/fly.cxx
index 9ce3bc237db4..983c3a2b055e 100644
--- a/sw/source/core/layout/fly.cxx
+++ b/sw/source/core/layout/fly.cxx
@@ -33,9 +33,7 @@
#include "hintids.hxx"
#include <svtools/itemiter.hxx>
#include <svtools/imap.hxx>
-#ifndef _GRAPH_HXX //autogen
#include <vcl/graph.hxx>
-#endif
#include <tools/poly.hxx>
#include <svx/contdlg.hxx>
#include <svx/protitem.hxx>
@@ -1182,7 +1180,7 @@ void SwFlyFrm::ChgRelPos( const Point &rNewPos )
// --> OD 2004-11-12 #i34948# - handle also at-page and at-fly anchored
// Writer fly frames
const RndStdIds eAnchorType = GetFrmFmt().GetAnchor().GetAnchorId();
- if ( eAnchorType == FLY_PAGE )
+ if ( eAnchorType == FLY_AT_PAGE )
{
aVert.SetVertOrient( text::VertOrientation::NONE );
aVert.SetRelationOrient( text::RelOrientation::PAGE_FRAME );
@@ -1235,7 +1233,7 @@ void SwFlyFrm::ChgRelPos( const Point &rNewPos )
SwFmtHoriOrient aHori( pFmt->GetHoriOrient() );
// --> OD 2004-11-12 #i34948# - handle also at-page and at-fly anchored
// Writer fly frames
- if ( eAnchorType == FLY_PAGE )
+ if ( eAnchorType == FLY_AT_PAGE )
{
aHori.SetHoriOrient( text::HoriOrientation::NONE );
aHori.SetRelationOrient( text::RelOrientation::PAGE_FRAME );
@@ -1645,11 +1643,17 @@ void CalcCntnt( SwLayoutFrm *pLay,
{
// Bei autopositionierten hilft manchmal nur
// noch, auf Durchlauf zu schalten
- if( rFmt.GetAnchor().GetAnchorId() == FLY_AUTO_CNTNT &&
- SURROUND_PARALLEL == aAttr.GetSurround() )
+ if ((rFmt.GetAnchor().GetAnchorId() ==
+ FLY_AT_CHAR) &&
+ (SURROUND_PARALLEL ==
+ aAttr.GetSurround()))
+ {
aAttr.SetSurround( SURROUND_THROUGHT );
+ }
else
+ {
aAttr.SetSurround( SURROUND_PARALLEL );
+ }
rFmt.LockModify();
rFmt.SetFmtAttr( aAttr );
rFmt.UnlockModify();
@@ -2313,7 +2317,8 @@ void SwFrm::InvalidateObjs( const bool _bInvaPosOnly,
{
SwAnchoredObject* pAnchoredObj = (*GetDrawObjs())[i];
if ( _bNoInvaOfAsCharAnchoredObjs &&
- pAnchoredObj->GetFrmFmt().GetAnchor().GetAnchorId() == FLY_IN_CNTNT )
+ (pAnchoredObj->GetFrmFmt().GetAnchor().GetAnchorId()
+ == FLY_AS_CHAR) )
{
continue;
}
diff --git a/sw/source/core/layout/flycnt.cxx b/sw/source/core/layout/flycnt.cxx
index 41d0e97ec6d6..90017ee4884e 100644
--- a/sw/source/core/layout/flycnt.cxx
+++ b/sw/source/core/layout/flycnt.cxx
@@ -90,7 +90,7 @@ SwFlyAtCntFrm::SwFlyAtCntFrm( SwFlyFrmFmt *pFmt, SwFrm *pAnch ) :
SwFlyFreeFrm( pFmt, pAnch )
{
bAtCnt = TRUE;
- bAutoPosition = FLY_AUTO_CNTNT == pFmt->GetAnchor().GetAnchorId();
+ bAutoPosition = (FLY_AT_CHAR == pFmt->GetAnchor().GetAnchorId());
}
// --> OD 2004-06-29 #i28701#
diff --git a/sw/source/core/layout/flylay.cxx b/sw/source/core/layout/flylay.cxx
index 252ea3298531..b68335451178 100644
--- a/sw/source/core/layout/flylay.cxx
+++ b/sw/source/core/layout/flylay.cxx
@@ -600,7 +600,7 @@ void SwFlyLayFrm::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew )
SwPageFrm *pOldPage = GetPageFrm();
AnchorFrm()->RemoveFly( this );
- if( FLY_PAGE == pAnch->GetAnchorId() )
+ if ( FLY_AT_PAGE == pAnch->GetAnchorId() )
{
USHORT nPgNum = pAnch->GetPageNum();
SwRootFrm *pRoot = FindRootFrm();
@@ -955,7 +955,7 @@ void SwPageFrm::AppendDrawObjToPage( SwAnchoredObject& _rNewObj )
_rNewObj.DrawObj()->SetOrdNum( nNewNum );
}
- if ( FLY_IN_CNTNT == _rNewObj.GetFrmFmt().GetAnchor().GetAnchorId() )
+ if ( FLY_AS_CHAR == _rNewObj.GetFrmFmt().GetAnchor().GetAnchorId() )
{
return;
}
@@ -999,7 +999,8 @@ void SwPageFrm::RemoveDrawObjFromPage( SwAnchoredObject& _rToRemoveObj )
}
if ( GetUpper() )
{
- if ( FLY_IN_CNTNT != _rToRemoveObj.GetFrmFmt().GetAnchor().GetAnchorId() )
+ if (FLY_AS_CHAR !=
+ _rToRemoveObj.GetFrmFmt().GetAnchor().GetAnchorId())
{
((SwRootFrm*)GetUpper())->SetSuperfluous();
InvalidatePage();
@@ -1333,7 +1334,7 @@ BOOL CalcClipRect( const SdrObject *pSdrObj, SwRect &rRect, BOOL bMove )
const SwDrawContact *pC = (const SwDrawContact*)GetUserCall(pSdrObj);
const SwFrmFmt *pFmt = (const SwFrmFmt*)pC->GetFmt();
const SwFmtAnchor &rAnch = pFmt->GetAnchor();
- if ( FLY_IN_CNTNT == rAnch.GetAnchorId() )
+ if ( FLY_AS_CHAR == rAnch.GetAnchorId() )
{
const SwFrm* pAnchorFrm = pC->GetAnchorFrm( pSdrObj );
if( !pAnchorFrm )
diff --git a/sw/source/core/layout/flypos.cxx b/sw/source/core/layout/flypos.cxx
index 333de7f3ff97..cb566792ca83 100644
--- a/sw/source/core/layout/flypos.cxx
+++ b/sw/source/core/layout/flypos.cxx
@@ -57,8 +57,10 @@ SwPosFlyFrm::SwPosFlyFrm( const SwNodeIndex& rIdx, const SwFrmFmt* pFmt,
{
BOOL bFnd = FALSE;
const SwFmtAnchor& rAnchor = pFmt->GetAnchor();
- if( FLY_PAGE == rAnchor.GetAnchorId() )
+ if (FLY_AT_PAGE == rAnchor.GetAnchorId())
+ {
pNdIdx = new SwNodeIndex( rIdx );
+ }
else if( pFmt->GetDoc()->GetRootFrm() )
{
SwClientIter aIter( (SwFmt&)*pFmt );
@@ -88,8 +90,10 @@ SwPosFlyFrm::SwPosFlyFrm( const SwNodeIndex& rIdx, const SwFrmFmt* pFmt,
SwPosFlyFrm::~SwPosFlyFrm()
{
const SwFmtAnchor& rAnchor = pFrmFmt->GetAnchor();
- if( FLY_PAGE == rAnchor.GetAnchorId() )
+ if (FLY_AT_PAGE == rAnchor.GetAnchorId())
+ {
delete pNdIdx;
+ }
}
BOOL SwPosFlyFrm::operator==( const SwPosFlyFrm& )
diff --git a/sw/source/core/layout/frmtool.cxx b/sw/source/core/layout/frmtool.cxx
index f7fa2a0a8e80..f3ac0f966c67 100644
--- a/sw/source/core/layout/frmtool.cxx
+++ b/sw/source/core/layout/frmtool.cxx
@@ -1033,9 +1033,11 @@ SwCntntNotify::~SwCntntNotify()
SwFrmFmt *pFmt = (*pTbl)[i];
const SwFmtAnchor &rAnch = pFmt->GetAnchor();
- if ( FLY_PAGE != rAnch.GetAnchorId() &&
- FLY_AT_CNTNT != rAnch.GetAnchorId() )
+ if ((FLY_AT_PAGE != rAnch.GetAnchorId()) &&
+ (FLY_AT_PARA != rAnch.GetAnchorId()))
+ {
continue; //#60878# nicht etwa zeichengebundene.
+ }
BOOL bCheckPos = FALSE;
if ( rAnch.GetCntntAnchor() )
@@ -1047,7 +1049,7 @@ SwCntntNotify::~SwCntntNotify()
if ( rAnch.GetCntntAnchor()->nNode == *pIdx )
{
bCheckPos = TRUE;
- if ( FLY_PAGE == rAnch.GetAnchorId() )
+ if (FLY_AT_PAGE == rAnch.GetAnchorId())
{
ASSERT( false, "<SwCntntNotify::~SwCntntNotify()> - to page anchored object with content position. Please inform OD." );
SwFmtAnchor aAnch( rAnch );
@@ -1097,7 +1099,7 @@ SwCntntNotify::~SwCntntNotify()
{
SwAnchoredObject* pAnchoredObj = (*pObjs)[i];
if ( pAnchoredObj->GetFrmFmt().GetAnchor().GetAnchorId()
- == FLY_AUTO_CNTNT )
+ == FLY_AT_CHAR )
{
pAnchoredObj->CheckCharRectAndTopOfLine( !pMasterFrm->IsEmpty() );
}
@@ -1135,11 +1137,11 @@ void AppendObjs( const SwSpzFrmFmts *pTbl, ULONG nIndex,
// OD 23.06.2003 #108784# - append also drawing objects anchored
// as character.
const bool bDrawObjInCntnt = bSdrObj &&
- rAnch.GetAnchorId() == FLY_IN_CNTNT;
+ (rAnch.GetAnchorId() == FLY_AS_CHAR);
if( bFlyAtFly ||
- rAnch.GetAnchorId() == FLY_AT_CNTNT ||
- rAnch.GetAnchorId() == FLY_AUTO_CNTNT ||
+ (rAnch.GetAnchorId() == FLY_AT_PARA) ||
+ (rAnch.GetAnchorId() == FLY_AT_CHAR) ||
bDrawObjInCntnt )
{
SdrObject* pSdrObj = 0;
@@ -1227,7 +1229,7 @@ bool lcl_InHeaderOrFooter( SwFrmFmt& _rFmt )
const SwFmtAnchor& rAnch = _rFmt.GetAnchor();
- if ( rAnch.GetAnchorId() != FLY_PAGE )
+ if (rAnch.GetAnchorId() != FLY_AT_PAGE)
{
bRetVal = _rFmt.GetDoc()->IsInHeaderFooter( rAnch.GetCntntAnchor()->nNode );
}
@@ -1256,10 +1258,13 @@ void AppendAllObjs( const SwSpzFrmFmts *pTbl )
SwFrmFmt *pFmt = (SwFrmFmt*)aCpy[ USHORT(i) ];
const SwFmtAnchor &rAnch = pFmt->GetAnchor();
BOOL bRemove = FALSE;
- if ( rAnch.GetAnchorId() == FLY_PAGE || rAnch.GetAnchorId() == FLY_IN_CNTNT )
+ if ((rAnch.GetAnchorId() == FLY_AT_PAGE) ||
+ (rAnch.GetAnchorId() == FLY_AS_CHAR))
+ {
//Seitengebunde sind bereits verankert, zeichengebundene
//will ich hier nicht.
bRemove = TRUE;
+ }
else if ( FALSE == (bRemove = ::lcl_ObjConnected( pFmt )) ||
::lcl_InHeaderOrFooter( *pFmt ) )
{
@@ -2578,7 +2583,7 @@ void MA_FASTCALL lcl_RemoveObjsFromPage( SwFrm* _pFrm )
// --> OD 2004-11-29 #115759# - remove also drawing objects from page
else if ( pObj->ISA(SwAnchoredDrawObject) )
{
- if ( pObj->GetFrmFmt().GetAnchor().GetAnchorId() != FLY_IN_CNTNT )
+ if (pObj->GetFrmFmt().GetAnchor().GetAnchorId() != FLY_AS_CHAR)
{
pObj->GetPageFrm()->RemoveDrawObjFromPage(
*(static_cast<SwAnchoredDrawObject*>(pObj)) );
@@ -2746,7 +2751,7 @@ void MA_FASTCALL lcl_AddObjsToPage( SwFrm* _pFrm, SwPageFrm* _pPage )
// --> OD 2004-11-29 #115759# - remove also drawing objects from page
else if ( pObj->ISA(SwAnchoredDrawObject) )
{
- if ( pObj->GetFrmFmt().GetAnchor().GetAnchorId() != FLY_IN_CNTNT )
+ if (pObj->GetFrmFmt().GetAnchor().GetAnchorId() != FLY_AS_CHAR)
{
pObj->InvalidateObjPos();
_pPage->AppendDrawObjToPage(
diff --git a/sw/source/core/layout/laycache.cxx b/sw/source/core/layout/laycache.cxx
index 56995fcfcb26..999b8a1a6e77 100644
--- a/sw/source/core/layout/laycache.cxx
+++ b/sw/source/core/layout/laycache.cxx
@@ -63,17 +63,16 @@
#include <sortedobjs.hxx>
// --> OD 2006-03-22 #b6375613#
#include <pam.hxx>
-#ifndef _DOCSH_HXX
#include <docsh.hxx>
-#endif
#include <com/sun/star/document/XDocumentInfoSupplier.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
+#include <set>
+
+
using namespace ::com::sun::star;
// <--
-#include <set>
-
SV_IMPL_PTRARR( SwPageFlyCache, SwFlyCachePtr )
/*-----------------28.5.2001 10:06------------------
@@ -696,8 +695,8 @@ bool lcl_HasTextFrmAnchoredObjs( SwTxtFrm* p_pTxtFrm )
SwFrmFmt *pFmt = (SwFrmFmt*)(*pSpzFrmFmts)[i];
const SwFmtAnchor &rAnch = pFmt->GetAnchor();
if ( rAnch.GetCntntAnchor() &&
- ( rAnch.GetAnchorId() == FLY_AT_CNTNT ||
- rAnch.GetAnchorId() == FLY_AUTO_CNTNT ) &&
+ ((rAnch.GetAnchorId() == FLY_AT_PARA) ||
+ (rAnch.GetAnchorId() == FLY_AT_CHAR)) &&
rAnch.GetCntntAnchor()->nNode.GetIndex() ==
p_pTxtFrm->GetTxtNode()->GetIndex() )
{
diff --git a/sw/source/core/layout/objectformatter.cxx b/sw/source/core/layout/objectformatter.cxx
index b8d45b719014..0b98bc03f4cd 100644
--- a/sw/source/core/layout/objectformatter.cxx
+++ b/sw/source/core/layout/objectformatter.cxx
@@ -338,7 +338,7 @@ void SwObjectFormatter::_FormatObj( SwAnchoredObject& _rAnchoredObj )
// check, if only as-character anchored object have to be formatted, and
// check the anchor type
if ( FormatOnlyAsCharAnchored() &&
- !_rAnchoredObj.GetFrmFmt().GetAnchor().GetAnchorId() == FLY_IN_CNTNT )
+ !(_rAnchoredObj.GetFrmFmt().GetAnchor().GetAnchorId() == FLY_AS_CHAR) )
{
return;
}
diff --git a/sw/source/core/layout/objectformattertxtfrm.cxx b/sw/source/core/layout/objectformattertxtfrm.cxx
index 697bea11dabf..2d7c2b02fb39 100644
--- a/sw/source/core/layout/objectformattertxtfrm.cxx
+++ b/sw/source/core/layout/objectformattertxtfrm.cxx
@@ -136,7 +136,7 @@ bool SwObjectFormatterTxtFrm::DoFormatObj( SwAnchoredObject& _rAnchoredObj,
// check, if only as-character anchored object have to be formatted, and
// check the anchor type
if ( FormatOnlyAsCharAnchored() &&
- !_rAnchoredObj.GetFrmFmt().GetAnchor().GetAnchorId() == FLY_IN_CNTNT )
+ !(_rAnchoredObj.GetFrmFmt().GetAnchor().GetAnchorId() == FLY_AS_CHAR) )
{
return true;
}
@@ -656,8 +656,8 @@ bool SwObjectFormatterTxtFrm::CheckMovedFwdCondition(
// which will be on the next page.
if ( !bAnchorIsMovedForward &&
_bAnchoredAtMasterBeforeFormatAnchor &&
- ( _rAnchoredObj.GetFrmFmt().GetAnchor().GetAnchorId() == FLY_AUTO_CNTNT ||
- _rAnchoredObj.GetFrmFmt().GetAnchor().GetAnchorId() == FLY_AT_CNTNT ) )
+ ((_rAnchoredObj.GetFrmFmt().GetAnchor().GetAnchorId() == FLY_AT_CHAR) ||
+ (_rAnchoredObj.GetFrmFmt().GetAnchor().GetAnchorId() == FLY_AT_PARA)))
{
SwFrm* pAnchorFrm = _rAnchoredObj.GetAnchorFrmContainingAnchPos();
ASSERT( pAnchorFrm->IsTxtFrm(),
diff --git a/sw/source/core/layout/pagechg.cxx b/sw/source/core/layout/pagechg.cxx
index b73f8b4d1eeb..ef80288b9349 100644
--- a/sw/source/core/layout/pagechg.cxx
+++ b/sw/source/core/layout/pagechg.cxx
@@ -46,9 +46,7 @@
#include <ftninfo.hxx>
#include <tgrditem.hxx>
#include <viewopt.hxx>
-#ifndef _DOCSH_HXX
#include <docsh.hxx>
-#endif
#include "viewimp.hxx"
#include "pagefrm.hxx"
@@ -408,7 +406,7 @@ void MA_FASTCALL lcl_MakeObjs( const SwSpzFrmFmts &rTbl, SwPageFrm *pPage )
{
if( rAnch.GetCntntAnchor() )
{
- if( FLY_PAGE == rAnch.GetAnchorId() )
+ if (FLY_AT_PAGE == rAnch.GetAnchorId())
{
SwFmtAnchor aAnch( rAnch );
aAnch.SetAnchor( 0 );
@@ -1659,7 +1657,7 @@ void SwRootFrm::AssertPageFlys( SwPageFrm *pPage )
SwFrmFmt& rFmt = (*pPage->GetSortedObjs())[i]->GetFrmFmt();
const SwFmtAnchor &rAnch = rFmt.GetAnchor();
const USHORT nPg = rAnch.GetPageNum();
- if ( rAnch.GetAnchorId() == FLY_PAGE &&
+ if ((rAnch.GetAnchorId() == FLY_AT_PAGE) &&
nPg != pPage->GetPhyPageNum() )
{
//Das er auf der falschen Seite steht muss noch nichts
@@ -1834,11 +1832,11 @@ void SwRootFrm::ImplCalcBrowseWidth()
long nWidth = 0;
switch ( rFmt.GetAnchor().GetAnchorId() )
{
- case FLY_IN_CNTNT:
+ case FLY_AS_CHAR:
nWidth = bFly ? rFmt.GetFrmSize().GetWidth() :
pAnchoredObj->GetObjRect().Width();
break;
- case FLY_AT_CNTNT:
+ case FLY_AT_PARA:
{
// --> FME 2004-09-13 #i33170#
// Reactivated old code because
@@ -2007,7 +2005,7 @@ void lcl_MoveAllLowerObjs( SwFrm* pFrm, const Point& rOffset )
// all except from the as character anchored objects are moved
// when processing the page frame:
- const bool bAsChar = rAnchor.GetAnchorId() == FLY_IN_CNTNT;
+ const bool bAsChar = (rAnchor.GetAnchorId() == FLY_AS_CHAR);
if ( !bPage && !bAsChar )
continue;
diff --git a/sw/source/core/layout/sortedobjsimpl.cxx b/sw/source/core/layout/sortedobjsimpl.cxx
index 96d3c73e8e3b..8afa7968b5f0 100644
--- a/sw/source/core/layout/sortedobjsimpl.cxx
+++ b/sw/source/core/layout/sortedobjsimpl.cxx
@@ -41,17 +41,14 @@
#include <ndtxt.hxx>
#include <fmtsrnd.hxx>
#include <fmtwrapinfluenceonobjpos.hxx>
-#ifndef IDOCUMENTDRAWMODELACCESS_HXX_INCLUDED
#include <IDocumentDrawModelAccess.hxx>
-#endif
+
using namespace ::com::sun::star;
typedef std::vector< SwAnchoredObject* >::iterator tIter;
typedef std::vector< SwAnchoredObject* >::const_iterator tConstIter;
-using namespace ::com::sun::star;
-
SwSortedObjsImpl::SwSortedObjsImpl()
{
@@ -96,36 +93,36 @@ struct ObjAnchorOrder
const SwFmtAnchor* pAnchorNew = &(rFmtNew.GetAnchor());
// check for to-page anchored objects
- if ( pAnchorListed->GetAnchorId() == FLY_PAGE &&
- pAnchorNew->GetAnchorId() != FLY_PAGE )
+ if ((pAnchorListed->GetAnchorId() == FLY_AT_PAGE) &&
+ (pAnchorNew ->GetAnchorId() != FLY_AT_PAGE))
{
return true;
}
- else if ( pAnchorListed->GetAnchorId() != FLY_PAGE &&
- pAnchorNew->GetAnchorId() == FLY_PAGE )
+ else if ((pAnchorListed->GetAnchorId() != FLY_AT_PAGE) &&
+ (pAnchorNew ->GetAnchorId() == FLY_AT_PAGE))
{
return false;
}
- else if ( pAnchorListed->GetAnchorId() == FLY_PAGE &&
- pAnchorNew->GetAnchorId() == FLY_PAGE )
+ else if ((pAnchorListed->GetAnchorId() == FLY_AT_PAGE) &&
+ (pAnchorNew ->GetAnchorId() == FLY_AT_PAGE))
{
return pAnchorListed->GetOrder() < pAnchorNew->GetOrder();
}
// Both objects aren't anchored to page.
// Thus, check for to-fly anchored objects
- if ( pAnchorListed->GetAnchorId() == FLY_AT_FLY &&
- pAnchorNew->GetAnchorId() != FLY_AT_FLY )
+ if ((pAnchorListed->GetAnchorId() == FLY_AT_FLY) &&
+ (pAnchorNew ->GetAnchorId() != FLY_AT_FLY))
{
return true;
}
- else if ( pAnchorListed->GetAnchorId() != FLY_AT_FLY &&
- pAnchorNew->GetAnchorId() == FLY_AT_FLY )
+ else if ((pAnchorListed->GetAnchorId() != FLY_AT_FLY) &&
+ (pAnchorNew ->GetAnchorId() == FLY_AT_FLY))
{
return false;
}
- else if ( pAnchorListed->GetAnchorId() == FLY_AT_FLY &&
- pAnchorNew->GetAnchorId() == FLY_AT_FLY )
+ else if ((pAnchorListed->GetAnchorId() == FLY_AT_FLY) &&
+ (pAnchorNew ->GetAnchorId() == FLY_AT_FLY))
{
return pAnchorListed->GetOrder() < pAnchorNew->GetOrder();
}
@@ -144,21 +141,21 @@ struct ObjAnchorOrder
// --> OD 2006-11-29 #???# - objects have to be ordered by anchor node position
// Thus, compare content anchor node positions and anchor type,
// if not anchored at-paragraph
- if ( pAnchorListed->GetAnchorId() != FLY_AT_CNTNT &&
- pAnchorNew->GetAnchorId() != FLY_AT_CNTNT &&
+ if ((pAnchorListed->GetAnchorId() != FLY_AT_PARA) &&
+ (pAnchorNew ->GetAnchorId() != FLY_AT_PARA) &&
pCntntAnchorListed && pCntntAnchorNew )
{
if ( pCntntAnchorListed->nContent != pCntntAnchorNew->nContent )
{
return pCntntAnchorListed->nContent < pCntntAnchorNew->nContent;
}
- else if ( pAnchorListed->GetAnchorId() == FLY_AUTO_CNTNT &&
- pAnchorNew->GetAnchorId() == FLY_IN_CNTNT )
+ else if ((pAnchorListed->GetAnchorId() == FLY_AT_CHAR) &&
+ (pAnchorNew ->GetAnchorId() == FLY_AS_CHAR))
{
return true;
}
- else if ( pAnchorListed->GetAnchorId() == FLY_IN_CNTNT &&
- pAnchorNew->GetAnchorId() == FLY_AUTO_CNTNT )
+ else if ((pAnchorListed->GetAnchorId() == FLY_AS_CHAR) &&
+ (pAnchorNew ->GetAnchorId() == FLY_AT_CHAR))
{
return false;
}
diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx
index f2a507bbd764..3605e3899706 100644
--- a/sw/source/core/layout/tabfrm.cxx
+++ b/sw/source/core/layout/tabfrm.cxx
@@ -57,9 +57,7 @@
// --> collapsing borders FME 2005-05-27 #i29550#
#include <svx/boxitem.hxx>
// <--
-#ifndef _OUTDEV_HXX //autogen
#include <vcl/outdev.hxx>
-#endif
#include <fmtlsplt.hxx>
#include <fmtrowsplt.hxx>
#include <fmtsrnd.hxx>
@@ -340,7 +338,7 @@ void lcl_InvalidateLowerObjs( SwLayoutFrm& _rLayoutFrm,
pAnchoredObj->ClearCharRectAndTopOfLine();
pAnchoredObj->SetCurrRelPos( Point( 0, 0 ) );
if ( pAnchoredObj->GetFrmFmt().GetAnchor().GetAnchorId()
- == FLY_IN_CNTNT )
+ == FLY_AS_CHAR )
{
pAnchoredObj->AnchorFrm()
->Prepare( PREP_FLY_ATTR_CHG,
@@ -4194,7 +4192,7 @@ long MA_FASTCALL CalcHeightWidthFlys( const SwFrm *pFrm )
// the text flow have to be considered.
const SwFrmFmt& rFrmFmt = pAnchoredObj->GetFrmFmt();
const bool bConsiderObj =
- rFrmFmt.GetAnchor().GetAnchorId() != FLY_IN_CNTNT &&
+ (rFrmFmt.GetAnchor().GetAnchorId() != FLY_AS_CHAR) &&
pAnchoredObj->GetObjRect().Top() != WEIT_WECH &&
rFrmFmt.GetFollowTextFlow().GetValue() &&
pAnchoredObj->GetPageFrm() == pTmp->FindPageFrm();
@@ -5222,7 +5220,7 @@ BOOL lcl_ArrangeLowers( SwLayoutFrm *pLay, long lYStart, BOOL bInva )
!( pTabFrm->IsFollow() &&
pTabFrm->FindMaster()->IsRebuildLastLine() ) &&
!pAnchoredObj->GetFrmFmt().GetAnchor().GetAnchorId()
- == FLY_IN_CNTNT )
+ == FLY_AS_CHAR )
{
SwPageFrm* pPageFrm = pAnchoredObj->GetPageFrm();
SwPageFrm* pPageOfAnchor = pFrm->FindPageFrm();
diff --git a/sw/source/core/layout/wsfrm.cxx b/sw/source/core/layout/wsfrm.cxx
index af97063da6e3..4bca9ba61c5c 100644
--- a/sw/source/core/layout/wsfrm.cxx
+++ b/sw/source/core/layout/wsfrm.cxx
@@ -35,9 +35,7 @@
#include <hintids.hxx>
#include <hints.hxx>
#include <tools/pstm.hxx>
-#ifndef _OUTDEV_HXX
#include <vcl/outdev.hxx>
-#endif
#include <svtools/itemiter.hxx>
#include <svx/brshitem.hxx>
#include <svx/keepitem.hxx>
@@ -52,9 +50,7 @@
#include <viewimp.hxx>
#include <doc.hxx>
#include <fesh.hxx>
-#ifndef _DOCSH_HXX
#include <docsh.hxx>
-#endif
#include <flyfrm.hxx>
#include <frmtool.hxx>
#include <ftninfo.hxx>
@@ -81,8 +77,10 @@
// OD 2004-05-24 #i28701#
#include <sortedobjs.hxx>
+
using namespace ::com::sun::star;
+
/*************************************************************************
|*
|* SwFrm::SwFrm()
@@ -3999,8 +3997,8 @@ void SwRootFrm::InvalidateAllObjPos()
{
SwAnchoredObject* pAnchoredObj = rObjs[i];
const SwFmtAnchor& rAnch = pAnchoredObj->GetFrmFmt().GetAnchor();
- if ( rAnch.GetAnchorId() != FLY_AT_CNTNT &&
- rAnch.GetAnchorId() != FLY_AUTO_CNTNT )
+ if ((rAnch.GetAnchorId() != FLY_AT_PARA) &&
+ (rAnch.GetAnchorId() != FLY_AT_CHAR))
{
// only to paragraph and to character anchored objects are considered.
continue;
diff --git a/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx b/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx
index 800235bf95e5..90a64c335e6f 100644
--- a/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx
+++ b/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx
@@ -47,13 +47,9 @@
#include <fmtornt.hxx>
#include <svx/lrspitem.hxx>
#include <svx/ulspitem.hxx>
-#ifndef _SVX_SVDOBJ_HXX
#include <svx/svdobj.hxx>
-#endif
#include <pam.hxx>
-#ifndef _ENVIRONMENTOFANCHOREDOBJECT
#include <environmentofanchoredobject.hxx>
-#endif
#include <frmtool.hxx>
#include <ndtxt.hxx>
#include <dflyobj.hxx>
@@ -209,7 +205,7 @@ void SwToCntntAnchoredObjectPosition::CalcPosition()
{
// if object is at-character anchored, determine character-rectangle
// and frame, position has to be oriented at.
- mbAnchorToChar = FLY_AUTO_CNTNT == rFrmFmt.GetAnchor().GetAnchorId();
+ mbAnchorToChar = (FLY_AT_CHAR == rFrmFmt.GetAnchor().GetAnchorId());
if ( mbAnchorToChar )
{
const SwFmtAnchor& rAnch = rFrmFmt.GetAnchor();
diff --git a/sw/source/core/text/EnhancedPDFExportHelper.cxx b/sw/source/core/text/EnhancedPDFExportHelper.cxx
index 1784ad946e41..09758fe6e6c2 100644
--- a/sw/source/core/text/EnhancedPDFExportHelper.cxx
+++ b/sw/source/core/text/EnhancedPDFExportHelper.cxx
@@ -31,15 +31,11 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
#include <com/sun/star/embed/XEmbeddedObject.hpp>
-#ifndef _COM_SUN_STAR_I18N_SCRIPTTYPE_HDL_
#include <com/sun/star/i18n/ScriptType.hdl>
-#endif
#include <EnhancedPDFExportHelper.hxx>
#include <hintids.hxx>
-#ifndef _OUTDEV_HXX
#include <vcl/outdev.hxx>
-#endif
#include <tools/multisel.hxx>
#include <svx/adjitem.hxx>
#include <svx/lrspitem.hxx>
@@ -370,9 +366,9 @@ bool SwTaggedPDFHelper::CheckReopenTag()
{
const SwFmtAnchor& rAnchor =
static_cast<const SwFlyFrm*>(&rFrm)->GetFmt()->GetAnchor();
- if ( FLY_AT_CNTNT == rAnchor.GetAnchorId() ||
- FLY_AUTO_CNTNT == rAnchor.GetAnchorId() ||
- FLY_PAGE == rAnchor.GetAnchorId() )
+ if ((FLY_AT_PARA == rAnchor.GetAnchorId()) ||
+ (FLY_AT_CHAR == rAnchor.GetAnchorId()) ||
+ (FLY_AT_PAGE == rAnchor.GetAnchorId()))
{
pKeyFrm = static_cast<const SwFlyFrm&>(rFrm).GetAnchorFrm();
bContinue = true;
@@ -1814,7 +1810,7 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport()
// --> FME 2005-05-09 #i44368# Links in Header/Footer
const SwFmtAnchor &rAnch = pFrmFmt->GetAnchor();
- if ( FLY_PAGE != rAnch.GetAnchorId() )
+ if (FLY_AT_PAGE != rAnch.GetAnchorId())
{
const SwPosition* pPosition = rAnch.GetCntntAnchor();
if ( pPosition && pDoc->IsInHeaderFooter( pPosition->nNode ) )
diff --git a/sw/source/core/text/itratr.cxx b/sw/source/core/text/itratr.cxx
index bd51317f77fe..318f6770bf97 100644
--- a/sw/source/core/text/itratr.cxx
+++ b/sw/source/core/text/itratr.cxx
@@ -461,10 +461,8 @@ sal_Bool lcl_MinMaxNode( const SwFrmFmtPtr& rpNd, void* pArgs )
const SwFmtAnchor& rFmtA = ((SwFrmFmt*)rpNd)->GetAnchor();
bool bCalculate = false;
- if (
- (FLY_AT_CNTNT == rFmtA.GetAnchorId()) ||
- (FLY_AUTO_CNTNT == rFmtA.GetAnchorId())
- )
+ if ((FLY_AT_PARA == rFmtA.GetAnchorId()) ||
+ (FLY_AT_CHAR == rFmtA.GetAnchorId()))
{
bCalculate = true;
}
diff --git a/sw/source/core/text/porfly.cxx b/sw/source/core/text/porfly.cxx
index 55c905b7e679..105a1488cb06 100644
--- a/sw/source/core/text/porfly.cxx
+++ b/sw/source/core/text/porfly.cxx
@@ -39,9 +39,7 @@
#include "frmfmt.hxx" // SwFrmFmt
#include "viewsh.hxx"
-#ifndef _OUTDEV_HXX //autogen
#include <vcl/outdev.hxx>
-#endif
#include <svx/lrspitem.hxx>
#include <svx/ulspitem.hxx>
#include <fmtanchr.hxx>
@@ -57,6 +55,7 @@
// OD 2004-05-24 #i28701#
#include <sortedobjs.hxx>
+
/*************************************************************************
* class SwFlyPortion
*
@@ -178,7 +177,7 @@ void SwTxtFrm::MoveFlyInCnt( SwTxtFrm *pNew, xub_StrLen nStart, xub_StrLen nEnd
// <SwSortedList> entries
SwAnchoredObject* pAnchoredObj = (*pObjs)[i];
const SwFmtAnchor& rAnch = pAnchoredObj->GetFrmFmt().GetAnchor();
- if ( rAnch.GetAnchorId() == FLY_IN_CNTNT )
+ if (rAnch.GetAnchorId() == FLY_AS_CHAR)
{
const SwPosition* pPos = rAnch.GetCntntAnchor();
xub_StrLen nIdx = pPos->nContent.GetIndex();
diff --git a/sw/source/core/text/txtfly.cxx b/sw/source/core/text/txtfly.cxx
index 706eca2ec52e..b7d87b540bc1 100644
--- a/sw/source/core/text/txtfly.cxx
+++ b/sw/source/core/text/txtfly.cxx
@@ -31,12 +31,8 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-#ifndef _OUTDEV_HXX //autogen
#include <vcl/outdev.hxx>
-#endif
-#ifndef _VIRDEV_HXX //autogen
#include <vcl/virdev.hxx>
-#endif
#include "viewsh.hxx"
#include "pagefrm.hxx"
@@ -61,14 +57,9 @@
#include "flyfrms.hxx"
#include "fmtcnct.hxx" // SwFmtChain
#include <pormulti.hxx> // SwMultiPortion
-#ifdef VERT_DISTANCE
-#include <math.h>
-#endif
#include <svx/obj3d.hxx>
-#ifndef _TXTRANGE_HXX //autogen
#include <svx/txtrange.hxx>
-#endif
#include <svx/lrspitem.hxx>
#include <svx/ulspitem.hxx>
// --> OD 2004-06-16 #i28701#
@@ -83,30 +74,26 @@
#include <tgrditem.hxx>
#include <sortedobjs.hxx>
#include <layouter.hxx>
-#ifndef IDOCUMENTDRAWMODELACCESS_HXX_INCLUDED
#include <IDocumentDrawModelAccess.hxx>
-#endif
#include <IDocumentLayoutAccess.hxx>
#include <IDocumentSettingAccess.hxx>
#include <svx/obj3d.hxx>
-#ifndef _TXTRANGE_HXX //autogen
#include <svx/txtrange.hxx>
-#endif
#include <svx/lrspitem.hxx>
#include <svx/ulspitem.hxx>
#include <svx/lspcitem.hxx>
#include <svx/svdoedge.hxx>
-
+#include "doc.hxx"
#ifndef PRODUCT
#include "viewopt.hxx" // SwViewOptions, nur zum Testen (Test2)
#endif
-#include "doc.hxx"
#ifdef VERT_DISTANCE
#include <math.h>
#endif
+
using namespace ::com::sun::star;
/*****************************************************************************
@@ -1006,8 +993,8 @@ sal_Bool SwTxtFly::DrawTextOpaque( SwDrawTextInfo &rInf )
// --> OD 2006-08-15 #i68520#
GetMaster() == pFly->GetAnchorFrm() ||
// <--
- ( FLY_AT_CNTNT != rAnchor.GetAnchorId() &&
- FLY_AUTO_CNTNT != rAnchor.GetAnchorId()
+ ((FLY_AT_PARA != rAnchor.GetAnchorId()) &&
+ (FLY_AT_CHAR != rAnchor.GetAnchorId())
)
) &&
// --> OD 2006-08-15 #i68520#
@@ -1176,7 +1163,7 @@ sal_Bool SwTxtFly::GetTop( const SwAnchoredObject* _pAnchoredObj,
const SwFrmFmt& rFrmFmt = _pAnchoredObj->GetFrmFmt();
const SwFmtAnchor& rNewA = rFrmFmt.GetAnchor();
// <--
- if ( FLY_PAGE == rNewA.GetAnchorId() )
+ if (FLY_AT_PAGE == rNewA.GetAnchorId())
{
if ( bInFtn )
return sal_False;
@@ -1225,23 +1212,25 @@ sal_Bool SwTxtFly::GetTop( const SwAnchoredObject* _pAnchoredObj,
// If <mpCurrAnchoredObj> is anchored as character, its content
// does not wrap around pNew
- if( FLY_IN_CNTNT == rCurrA.GetAnchorId() )
+ if (FLY_AS_CHAR == rCurrA.GetAnchorId())
return sal_False;
// If pNew is anchored to page and <mpCurrAnchoredObj is not anchored
// to page, the content of <mpCurrAnchoredObj> does not wrap around pNew
// If both pNew and <mpCurrAnchoredObj> are anchored to page, we can do
// some more checks
- if( FLY_PAGE == rNewA.GetAnchorId() )
+ if (FLY_AT_PAGE == rNewA.GetAnchorId())
{
- if( FLY_PAGE == rCurrA.GetAnchorId() )
+ if (FLY_AT_PAGE == rCurrA.GetAnchorId())
+ {
bEvade = sal_True;
+ }
else
return sal_False;
}
- else if( FLY_PAGE == rCurrA.GetAnchorId() )
+ else if (FLY_AT_PAGE == rCurrA.GetAnchorId())
return sal_False; // Seitengebundene weichen nur seitengeb. aus
- else if( FLY_AT_FLY == rNewA.GetAnchorId() )
+ else if (FLY_AT_FLY == rNewA.GetAnchorId())
bEvade = sal_True; // Nicht seitengeb. weichen Rahmengeb. aus
else if( FLY_AT_FLY == rCurrA.GetAnchorId() )
return sal_False; // Rahmengebundene weichen abs.geb. nicht aus
@@ -1285,8 +1274,9 @@ sal_Bool SwTxtFly::GetTop( const SwAnchoredObject* _pAnchoredObj,
// --> OD 2004-10-06 #i26945#
const SwFmtAnchor& rNewA = _pAnchoredObj->GetFrmFmt().GetAnchor();
// <--
- ASSERT( FLY_IN_CNTNT != rNewA.GetAnchorId(), "Don't call GetTop with a FlyInCntFrm" );
- if( FLY_PAGE == rNewA.GetAnchorId() )
+ ASSERT( FLY_AS_CHAR != rNewA.GetAnchorId(),
+ "Don't call GetTop with a FlyInCntFrm" );
+ if (FLY_AT_PAGE == rNewA.GetAnchorId())
return sal_True; // Seitengebundenen wird immer ausgewichen.
// Wenn absatzgebundene Flys in einem FlyCnt gefangen sind, so
@@ -2015,8 +2005,8 @@ sal_Bool SwTxtFly::ForEach( const SwRect &rRect, SwRect* pRect, sal_Bool bAvoid
// --> OD 2006-08-15 #i68520#
GetMaster() == pAnchoredObj->GetAnchorFrm() ||
// <--
- ( FLY_AT_CNTNT != rAnchor.GetAnchorId() &&
- FLY_AUTO_CNTNT != rAnchor.GetAnchorId() ) ) )
+ ((FLY_AT_PARA != rAnchor.GetAnchorId()) &&
+ (FLY_AT_CHAR != rAnchor.GetAnchorId())) ) )
|| aRect.Top() == WEIT_WECH )
continue;
}
@@ -2442,9 +2432,11 @@ SwSurround SwTxtFly::_GetSurroundForTextWrap( const SwAnchoredObject* pAnchoredO
if( rFlyFmt.IsAnchorOnly() && pAnchoredObj->GetAnchorFrm() != GetMaster() )
{
const SwFmtAnchor& rAnchor = pFmt->GetAnchor();
- if ( FLY_AT_CNTNT == rAnchor.GetAnchorId() ||
- FLY_AUTO_CNTNT == rAnchor.GetAnchorId() )
+ if ((FLY_AT_PARA == rAnchor.GetAnchorId()) ||
+ (FLY_AT_CHAR == rAnchor.GetAnchorId()))
+ {
return SURROUND_NONE;
+ }
}
// Beim Durchlauf und Nowrap wird smart ignoriert.
diff --git a/sw/source/core/text/txtfrm.cxx b/sw/source/core/text/txtfrm.cxx
index 14944264d39e..479d082b5477 100644
--- a/sw/source/core/text/txtfrm.cxx
+++ b/sw/source/core/text/txtfrm.cxx
@@ -65,9 +65,7 @@
#include <txtftn.hxx>
#include <charatr.hxx>
#include <ftninfo.hxx>
-#ifndef _FMTLINE_HXX
#include <fmtline.hxx>
-#endif
#include <txtfrm.hxx> // SwTxtFrm
#include <sectfrm.hxx> // SwSectFrm
#include <txtcfg.hxx> // DBG_LOOP
@@ -76,9 +74,7 @@
#include <txtcache.hxx>
#include <fntcache.hxx> // GetLineSpace benutzt pLastFont
#include <SwGrammarMarkUp.hxx>
-#ifndef _LINEINFO_HXX
#include <lineinfo.hxx>
-#endif
#include <SwPortionHandler.hxx>
// OD 2004-01-15 #110582#
#include <dcontact.hxx>
@@ -101,6 +97,7 @@
extern const sal_Char *GetPrepName( const enum PrepareHint ePrep );
#endif
+
TYPEINIT1( SwTxtFrm, SwCntntFrm );
// Switches width and height of the text frame
@@ -487,7 +484,7 @@ bool lcl_HideObj( const SwTxtFrm& _rFrm,
{
bool bRet( true );
- if ( _eAnchorType == FLY_AUTO_CNTNT )
+ if (_eAnchorType == FLY_AT_CHAR)
{
const IDocumentSettingAccess* pIDSA = _rFrm.GetTxtNode()->getIDocumentSettingAccess();
if ( !pIDSA->get(IDocumentSettingAccess::USE_FORMER_TEXT_WRAPPING) &&
@@ -560,8 +557,9 @@ void SwTxtFrm::HideAndShowObjects()
// under certain conditions
const RndStdIds eAnchorType( pContact->GetAnchorId() );
const xub_StrLen nObjAnchorPos = pContact->GetCntntAnchorIndex().GetIndex();
- if ( eAnchorType != FLY_AUTO_CNTNT ||
- lcl_HideObj( *this, eAnchorType, nObjAnchorPos, (*GetDrawObjs())[i] ) )
+ if ((eAnchorType != FLY_AT_CHAR) ||
+ lcl_HideObj( *this, eAnchorType, nObjAnchorPos,
+ (*GetDrawObjs())[i] ))
{
pContact->MoveObjToInvisibleLayer( pObj );
}
@@ -588,12 +586,12 @@ void SwTxtFrm::HideAndShowObjects()
const RndStdIds eAnchorType( pContact->GetAnchorId() );
// <--
- if ( eAnchorType == FLY_AT_CNTNT )
+ if (eAnchorType == FLY_AT_PARA)
{
pContact->MoveObjToVisibleLayer( pObj );
}
- else if ( eAnchorType == FLY_AUTO_CNTNT ||
- eAnchorType == FLY_IN_CNTNT )
+ else if ((eAnchorType == FLY_AT_CHAR) ||
+ (eAnchorType == FLY_AS_CHAR))
{
xub_StrLen nHiddenStart;
xub_StrLen nHiddenEnd;
@@ -1704,7 +1702,7 @@ void SwTxtFrm::Prepare( const PrepareHint ePrep, const void* pVoid,
// --> OD 2004-07-16 #i28701# - consider all
// to-character anchored objects
if ( pAnchoredObj->GetFrmFmt().GetAnchor().GetAnchorId()
- == FLY_AUTO_CNTNT )
+ == FLY_AT_CHAR )
{
bFormat = sal_True;
break;
diff --git a/sw/source/core/txtnode/atrflyin.cxx b/sw/source/core/txtnode/atrflyin.cxx
index fa0a734f79c1..eefca09e08d0 100644
--- a/sw/source/core/txtnode/atrflyin.cxx
+++ b/sw/source/core/txtnode/atrflyin.cxx
@@ -124,8 +124,8 @@ void SwTxtFlyCnt::CopyFlyFmt( SwDoc* pDoc )
BOOL bUndo = pDoc->DoesUndo();
pDoc->DoUndo( FALSE );
SwFmtAnchor aAnchor( pFmt->GetAnchor() );
- if( FLY_PAGE != aAnchor.GetAnchorId() &&
- pDoc != pFmt->GetDoc() ) // Unterschiedliche Docs?
+ if ((FLY_AT_PAGE != aAnchor.GetAnchorId()) &&
+ (pDoc != pFmt->GetDoc())) // different documents?
{
// JP 03.06.96: dann sorge dafuer, das der koperierte Anker auf
// gueltigen Content zeigt! Die Umsetzung auf die
@@ -137,8 +137,10 @@ void SwTxtFlyCnt::CopyFlyFmt( SwDoc* pDoc )
SwPosition* pPos = (SwPosition*)aAnchor.GetCntntAnchor();
pPos->nNode = aIdx;
- if( FLY_IN_CNTNT == aAnchor.GetAnchorId() )
+ if (FLY_AS_CHAR == aAnchor.GetAnchorId())
+ {
pPos->nContent.Assign( pCNd, 0 );
+ }
else
{
pPos->nContent.Assign( 0, 0 );
@@ -181,7 +183,7 @@ void SwTxtFlyCnt::SetAnchor( const SwTxtNode *pNode )
else
aPos.nNode = aAnchor.GetCntntAnchor()->nNode;
- aAnchor.SetType( FLY_IN_CNTNT ); // defaulten !!
+ aAnchor.SetType( FLY_AS_CHAR ); // default!
aAnchor.SetAnchor( &aPos );
// beim Ankerwechsel werden immer alle FlyFrms vom Attribut geloescht
diff --git a/sw/source/core/txtnode/thints.cxx b/sw/source/core/txtnode/thints.cxx
index 81a3b629f402..ba471381cad4 100644
--- a/sw/source/core/txtnode/thints.cxx
+++ b/sw/source/core/txtnode/thints.cxx
@@ -1270,11 +1270,15 @@ bool SwTxtNode::InsertHint( SwTxtAttr * const pAttr, const SetAttrMode nMode )
InsertText( c, aIdx, nInsertFlags );
nInsMode |= nsSetAttrMode::SETATTR_NOTXTATRCHR;
- if( pAnchor && FLY_IN_CNTNT == pAnchor->GetAnchorId() &&
+ if (pAnchor &&
+ (FLY_AS_CHAR == pAnchor->GetAnchorId()) &&
pAnchor->GetCntntAnchor() &&
pAnchor->GetCntntAnchor()->nNode == *this &&
pAnchor->GetCntntAnchor()->nContent == aIdx )
- ((SwIndex&)pAnchor->GetCntntAnchor()->nContent)--;
+ {
+ const_cast<SwIndex&>(
+ pAnchor->GetCntntAnchor()->nContent)--;
+ }
}
pFly->SetAnchor( this );
diff --git a/sw/source/core/undo/rolbck.cxx b/sw/source/core/undo/rolbck.cxx
index 908fc480fe66..d7df1593af7a 100644
--- a/sw/source/core/undo/rolbck.cxx
+++ b/sw/source/core/undo/rolbck.cxx
@@ -922,7 +922,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 e5312b3cefdd..acc167ed9900 100644
--- a/sw/source/core/undo/unattr.cxx
+++ b/sw/source/core/undo/unattr.cxx
@@ -462,10 +462,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 +489,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 +505,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 +549,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 +613,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/undel.cxx b/sw/source/core/undo/undel.cxx
index d9a2e6e8486c..dfa0ee9d469e 100644
--- a/sw/source/core/undo/undel.cxx
+++ b/sw/source/core/undo/undel.cxx
@@ -81,7 +81,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 +632,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/undobj.cxx b/sw/source/core/undo/undobj.cxx
index 3b090e875ea8..ce479d51ac98 100644
--- a/sw/source/core/undo/undobj.cxx
+++ b/sw/source/core/undo/undobj.cxx
@@ -593,7 +593,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 +611,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 +660,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 ) )
{
diff --git a/sw/source/core/undo/undobj1.cxx b/sw/source/core/undo/undobj1.cxx
index dd261282e5c7..69b235d7f5eb 100644
--- a/sw/source/core/undo/undobj1.cxx
+++ b/sw/source/core/undo/undobj1.cxx
@@ -93,15 +93,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 +123,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 +142,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 +197,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 +215,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 +249,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 +314,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 +339,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 +493,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 +501,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 +567,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 +596,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 +648,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 +663,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/undraw.cxx b/sw/source/core/undo/undraw.cxx
index 54ed7ea8421d..2c09ff4f3da6 100644
--- a/sw/source/core/undo/undraw.cxx
+++ b/sw/source/core/undo/undraw.cxx
@@ -32,15 +32,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 +55,7 @@
#include <rootfrm.hxx>
#include <viewsh.hxx>
+
struct SwUndoGroupObjImpl
{
SwDrawFrmFmt* pFmt;
@@ -142,15 +137,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 +163,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 +175,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 +187,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/untbl.cxx b/sw/source/core/undo/untbl.cxx
index 3d5dbd429e49..438bdf733666 100644
--- a/sw/source/core/undo/untbl.cxx
+++ b/sw/source/core/undo/untbl.cxx
@@ -449,12 +449,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 )
{
diff --git a/sw/source/core/undo/untblk.cxx b/sw/source/core/undo/untblk.cxx
index 1c076a05dcce..6a6618935155 100644
--- a/sw/source/core/undo/untblk.cxx
+++ b/sw/source/core/undo/untblk.cxx
@@ -69,10 +69,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 +124,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 ||
diff --git a/sw/source/core/unocore/unodraw.cxx b/sw/source/core/unocore/unodraw.cxx
index f8256a7ada0b..5a050eb690ed 100644
--- a/sw/source/core/unocore/unodraw.cxx
+++ b/sw/source/core/unocore/unodraw.cxx
@@ -163,7 +163,9 @@ public:
SwFmtAnchor* GetAnchor(sal_Bool bCreate = sal_False)
{
if(bCreate && !pAnchor)
- pAnchor = new SwFmtAnchor(FLY_IN_CNTNT);
+ {
+ pAnchor = new SwFmtAnchor(FLY_AS_CHAR);
+ }
return pAnchor;
}
SwFmtHoriOrient* GetHOrient(sal_Bool bCreate = sal_False)
@@ -700,7 +702,7 @@ void SwXDrawPage::add(const uno::Reference< drawing::XShape > & xShape)
SfxItemSet aSet( pDoc->GetAttrPool(), RES_FRMATR_BEGIN,
RES_FRMATR_END-1 );
- SwFmtAnchor aAnchor( FLY_IN_CNTNT );
+ SwFmtAnchor aAnchor( FLY_AS_CHAR );
sal_Bool bOpaque = sal_False;
if( pDesc )
{
@@ -781,14 +783,18 @@ void SwXDrawPage::add(const uno::Reference< drawing::XShape > & xShape)
{
if(FLY_AT_FLY == aAnchor.GetAnchorId() &&
!pInternalPam->GetNode()->FindFlyStartNode())
- aAnchor.SetType(FLY_IN_CNTNT);
- else if(FLY_PAGE == aAnchor.GetAnchorId())
+ {
+ aAnchor.SetType(FLY_AS_CHAR);
+ }
+ else if (FLY_AT_PAGE == aAnchor.GetAnchorId())
+ {
aAnchor.SetAnchor(pInternalPam->Start());
+ }
}
else
throw uno::RuntimeException();
}
- else if( aAnchor.GetAnchorId() != FLY_PAGE && pDoc->GetRootFrm() )
+ else if ((aAnchor.GetAnchorId() != FLY_AT_PAGE) && pDoc->GetRootFrm())
{
SwCrsrMoveState aState( MV_SETONLYTEXT );
Point aTmp(MM100_TO_TWIP(aMM100Pos.X), MM100_TO_TWIP(aMM100Pos.Y));
@@ -800,7 +806,7 @@ void SwXDrawPage::add(const uno::Reference< drawing::XShape > & xShape)
}
else
{
- aAnchor.SetType(FLY_PAGE);
+ aAnchor.SetType(FLY_AT_PAGE);
// --> OD 2004-08-18 #i32349# - adjustment of vertical positioning
// attributes no longer needed, because its already got a default.
@@ -853,8 +859,11 @@ uno::Reference< drawing::XShapeGroup > SwXDrawPage::group(const uno::Reference<
for ( sal_uInt16 i = 0; !bFlyInCnt && i < rMarkList.GetMarkCount(); ++i )
{
const SdrObject *pObj = rMarkList.GetMark( i )->GetMarkedSdrObj();
- if ( FLY_IN_CNTNT == ::FindFrmFmt( (SdrObject*)pObj )->GetAnchor().GetAnchorId() )
+ if (FLY_AS_CHAR == ::FindFrmFmt(const_cast<SdrObject*>(
+ pObj))->GetAnchor().GetAnchorId())
+ {
bFlyInCnt = sal_True;
+ }
}
if( bFlyInCnt )
throw uno::RuntimeException();
@@ -864,7 +873,9 @@ uno::Reference< drawing::XShapeGroup > SwXDrawPage::group(const uno::Reference<
pDoc->StartUndo( UNDO_START, NULL );
SwDrawContact* pContact = pDoc->GroupSelection( *pPage->GetDrawView() );
- pDoc->ChgAnchor( pPage->GetDrawView()->GetMarkedObjectList(), FLY_AT_CNTNT/*int eAnchorId*/,
+ pDoc->ChgAnchor(
+ pPage->GetDrawView()->GetMarkedObjectList(),
+ FLY_AT_PARA/*int eAnchorId*/,
sal_True, sal_False );
pPage->GetDrawView()->UnmarkAll();
@@ -899,7 +910,8 @@ void SwXDrawPage::ungroup(const uno::Reference< drawing::XShapeGroup > & xShapeG
pDoc->StartUndo( UNDO_START, NULL );
pDoc->UnGroupSelection( *pPage->GetDrawView() );
- pDoc->ChgAnchor( pPage->GetDrawView()->GetMarkedObjectList(), FLY_AT_CNTNT/*int eAnchorId*/,
+ pDoc->ChgAnchor( pPage->GetDrawView()->GetMarkedObjectList(),
+ FLY_AT_PARA/*int eAnchorId*/,
sal_True, sal_False );
pDoc->EndUndo( UNDO_END, NULL );
}
@@ -1274,7 +1286,7 @@ void SwXShape::setPropertyValue(const rtl::OUString& rPropertyName, const uno::A
else if ( FN_TEXT_RANGE == pEntry->nWID )
{
SwFmtAnchor aAnchor( static_cast<const SwFmtAnchor&>(aSet.Get( RES_ANCHOR )) );
- if ( aAnchor.GetAnchorId() == FLY_PAGE )
+ if (aAnchor.GetAnchorId() == FLY_AT_PAGE)
{
// set property <TextRange> not valid for to-page anchored shapes
throw lang::IllegalArgumentException();
@@ -1287,7 +1299,7 @@ void SwXShape::setPropertyValue(const rtl::OUString& rPropertyName, const uno::A
aValue >>= xRg;
if ( SwXTextRange::XTextRangeToSwPaM(*pInternalPam, xRg) )
{
- if(aAnchor.GetAnchorId() == FLY_IN_CNTNT)
+ if (aAnchor.GetAnchorId() == FLY_AS_CHAR)
{
//delete old SwFmtFlyCnt
//With AnchorAsCharacter the current TxtAttribute has to be deleted.
@@ -1375,7 +1387,7 @@ void SwXShape::setPropertyValue(const rtl::OUString& rPropertyName, const uno::A
SwFrmFmt *pFlyFmt = FindFrmFmt( pObj );
pFlyFmt->DelFrms();
if( text::TextContentAnchorType_AS_CHARACTER != eNewAnchor &&
- FLY_IN_CNTNT == eOldAnchorId )
+ (FLY_AS_CHAR == eOldAnchorId))
{
//With AnchorAsCharacter the current TxtAttribute has to be deleted.
//Tbis removes the frame format too.
@@ -1398,7 +1410,7 @@ void SwXShape::setPropertyValue(const rtl::OUString& rPropertyName, const uno::A
pTxtNode->DeleteAttributes(RES_TXTATR_FLYCNT, nIdx);
}
else if( text::TextContentAnchorType_AT_PAGE != eNewAnchor &&
- FLY_PAGE == eOldAnchorId )
+ (FLY_AT_PAGE == eOldAnchorId))
{
SwFmtAnchor aNewAnchor( dynamic_cast< const SwFmtAnchor& >( aSet.Get( RES_ANCHOR ) ) );
//if the fly has been anchored at page then it needs to be connected
@@ -1421,7 +1433,7 @@ void SwXShape::setPropertyValue(const rtl::OUString& rPropertyName, const uno::A
pFmt->SetFmtAttr(aSet);
bSetAttr = false;
if( text::TextContentAnchorType_AS_CHARACTER == eNewAnchor &&
- FLY_IN_CNTNT != eOldAnchorId )
+ (FLY_AS_CHAR != eOldAnchorId))
{
//the RES_TXTATR_FLYCNT needs to be added now
SwTxtNode *pNd = aPam.GetNode()->GetTxtNode();
@@ -1606,7 +1618,7 @@ uno::Any SwXShape::getPropertyValue(const rtl::OUString& rPropertyName)
else if ( FN_TEXT_RANGE == pEntry->nWID )
{
const SwFmtAnchor aAnchor = pFmt->GetAnchor();
- if ( aAnchor.GetAnchorId() == FLY_PAGE )
+ if (aAnchor.GetAnchorId() == FLY_AT_PAGE)
{
// return nothing, because property <TextRange> isn't
// valid for to-page anchored shapes
@@ -2180,7 +2192,7 @@ uno::Reference< text::XTextRange > SwXShape::getAnchor(void) throw( uno::Runtim
const SwFmtAnchor& rAnchor = pFmt->GetAnchor();
// return an anchor for non-page bound frames
// and for page bound frames that have a page no == NULL and a content position
- if( rAnchor.GetAnchorId() != FLY_PAGE ||
+ if ((rAnchor.GetAnchorId() != FLY_AT_PAGE) ||
(rAnchor.GetCntntAnchor() && !rAnchor.GetPageNum()))
{
const SwPosition &rPos = *(pFmt->GetAnchor().GetCntntAnchor());
@@ -2224,7 +2236,7 @@ void SwXShape::dispose(void) throw( uno::RuntimeException )
pObj->IsInserted() )
// <--
{
- if( pFmt->GetAnchor().GetAnchorId() == FLY_IN_CNTNT )
+ if (pFmt->GetAnchor().GetAnchorId() == FLY_AS_CHAR)
{
const SwPosition &rPos = *(pFmt->GetAnchor().GetCntntAnchor());
SwTxtNode *pTxtNode = rPos.nNode.GetNode().GetTxtNode();
diff --git a/sw/source/core/unocore/unoframe.cxx b/sw/source/core/unocore/unoframe.cxx
index 09066c447546..1f9d39bca94c 100644
--- a/sw/source/core/unocore/unoframe.cxx
+++ b/sw/source/core/unocore/unoframe.cxx
@@ -45,9 +45,7 @@
#include <memory>
#include <hints.hxx>
#include <doc.hxx>
-#ifndef _DOCSH_HXX //autogen
#include <docsh.hxx>
-#endif
#include <editsh.hxx>
#include <swcli.hxx>
#include <ndindex.hxx>
@@ -1402,7 +1400,8 @@ void SwXFrame::setPropertyValue(const :: OUString& rPropertyName, const :: uno::
aSet.Put(aAnchor);
}
}
- else if(aAnchor.GetAnchorId() != FLY_PAGE && !aAnchor.GetCntntAnchor())
+ else if ((aAnchor.GetAnchorId() != FLY_AT_PAGE) &&
+ !aAnchor.GetCntntAnchor())
{
SwNode& rNode = pDoc->GetNodes().GetEndOfContent();
SwPaM aPam(rNode);
@@ -2023,7 +2022,7 @@ void SwXFrame::dispose(void) throw( uno::RuntimeException )
( pObj->GetUserCall() &&
!static_cast<SwContact*>(pObj->GetUserCall())->IsInDTOR() ) ) )
{
- if( pFmt->GetAnchor().GetAnchorId() == FLY_IN_CNTNT )
+ if (pFmt->GetAnchor().GetAnchorId() == FLY_AS_CHAR)
{
const SwPosition &rPos = *(pFmt->GetAnchor().GetCntntAnchor());
SwTxtNode *pTxtNode = rPos.nNode.GetNode().GetTxtNode();
@@ -2049,7 +2048,7 @@ uno::Reference< text::XTextRange > SwXFrame::getAnchor(void) throw( uno::Runtim
const SwFmtAnchor& rAnchor = pFmt->GetAnchor();
// return an anchor for non-page bound frames
// and for page bound frames that have a page no == NULL and a content position
- if( rAnchor.GetAnchorId() != FLY_PAGE ||
+ if ((rAnchor.GetAnchorId() != FLY_AT_PAGE) ||
(rAnchor.GetCntntAnchor() && !rAnchor.GetPageNum()))
{
const SwPosition &rPos = *(rAnchor.GetCntntAnchor());
@@ -2128,7 +2127,7 @@ void SwXFrame::attachToRange(const uno::Reference< text::XTextRange > & xTextRan
}
const SfxPoolItem* pItem;
- RndStdIds eAnchorId = FLY_AT_CNTNT;
+ RndStdIds eAnchorId = FLY_AT_PARA;
if(SFX_ITEM_SET == aFrmSet.GetItemState(RES_ANCHOR, sal_False, &pItem) )
{
eAnchorId = ((const SwFmtAnchor*)pItem)->GetAnchorId();
@@ -2136,10 +2135,10 @@ void SwXFrame::attachToRange(const uno::Reference< text::XTextRange > & xTextRan
!aPam.GetNode()->FindFlyStartNode())
{
//rahmengebunden geht nur dort, wo ein Rahmen ist!
- SwFmtAnchor aAnchor(FLY_AT_CNTNT);
+ SwFmtAnchor aAnchor(FLY_AT_PARA);
aFrmSet.Put(aAnchor);
}
- else if( FLY_PAGE == eAnchorId &&
+ else if ((FLY_AT_PAGE == eAnchorId) &&
0 == ((const SwFmtAnchor*)pItem)->GetPageNum() )
{
SwFmtAnchor aAnchor( *((const SwFmtAnchor*)pItem) );
@@ -2162,10 +2161,10 @@ void SwXFrame::attachToRange(const uno::Reference< text::XTextRange > & xTextRan
SwFmtAnchor* pAnchorItem = 0;
// the frame is inserted bound to page
// to prevent conflicts if the to-be-anchored position is part of the to-be-copied text
- if(eAnchorId != FLY_PAGE)
+ if (eAnchorId != FLY_AT_PAGE)
{
pAnchorItem = static_cast<SwFmtAnchor*>(aFrmSet.Get(RES_ANCHOR).Clone());
- aFrmSet.Put( SwFmtAnchor( FLY_PAGE, 1 ));
+ aFrmSet.Put( SwFmtAnchor( FLY_AT_PAGE, 1 ));
}
pFmt = pDoc->MakeFlyAndMove( *m_pCopySource, aFrmSet,
@@ -2183,8 +2182,10 @@ void SwXFrame::attachToRange(const uno::Reference< text::XTextRange > & xTextRan
DELETEZ( m_pCopySource );
}
else
- pFmt = pDoc->MakeFlySection( FLY_AT_CNTNT, aPam.GetPoint(),
+ {
+ pFmt = pDoc->MakeFlySection( FLY_AT_PARA, aPam.GetPoint(),
&aFrmSet, pParentFrmFmt );
+ }
if(pFmt)
{
pFmt->Add(this);
diff --git a/sw/source/core/unocore/unoobj2.cxx b/sw/source/core/unocore/unoobj2.cxx
index 0d606ab2f50d..26a237b5625a 100644
--- a/sw/source/core/unocore/unoobj2.cxx
+++ b/sw/source/core/unocore/unoobj2.cxx
@@ -163,7 +163,8 @@ void CollectFrameAtNode( SwClient& rClnt, const SwNodeIndex& rIdx,
// gebunden sind
SwDoc* pDoc = rIdx.GetNode().GetDoc();
- USHORT nChkType = static_cast< USHORT >(_bAtCharAnchoredObjs ? FLY_AUTO_CNTNT : FLY_AT_CNTNT);
+ USHORT nChkType = static_cast< USHORT >((_bAtCharAnchoredObjs)
+ ? FLY_AT_CHAR : FLY_AT_PARA);
const SwCntntFrm* pCFrm;
const SwCntntNode* pCNd;
if( pDoc->GetRootFrm() &&
diff --git a/sw/source/core/view/vdraw.cxx b/sw/source/core/view/vdraw.cxx
index 7429eb5c444d..2e25913611a8 100644
--- a/sw/source/core/view/vdraw.cxx
+++ b/sw/source/core/view/vdraw.cxx
@@ -46,10 +46,8 @@
#include <svx/svdoutl.hxx>
#ifndef PRODUCT
-#ifndef _SVX_FMGLOB_HXX
#include <svx/fmglob.hxx>
#endif
-#endif
#include "fesh.hxx"
#include "pagefrm.hxx"
@@ -62,9 +60,8 @@
#include "flyfrm.hxx"
#include <vcl/svapp.hxx>
-#ifndef IDOCUMENTDRAWMODELACCESS_HXX_INCLUDED
#include <IDocumentDrawModelAccess.hxx>
-#endif
+
/*************************************************************************
|*
@@ -337,8 +334,10 @@ void SwViewImp::NotifySizeChg( const Size &rNewSz )
const SwFrm *pAnchor = ((SwDrawContact*)pCont)->GetAnchorFrm();
if ( !pAnchor || pAnchor->IsInFly() || !pAnchor->IsValid() ||
!pAnchor->GetUpper() || !pAnchor->FindPageFrm() ||
- FLY_IN_CNTNT == pCont->GetFmt()->GetAnchor().GetAnchorId() )
+ (FLY_AS_CHAR == pCont->GetFmt()->GetAnchor().GetAnchorId()) )
+ {
continue;
+ }
// OD 19.06.2003 #108784# - no move for drawing objects in header/footer
if ( pAnchor->FindFooterOrHeader() )
diff --git a/sw/source/filter/basflt/shellio.cxx b/sw/source/filter/basflt/shellio.cxx
index e21433271845..4d849174ddba 100644
--- a/sw/source/filter/basflt/shellio.cxx
+++ b/sw/source/filter/basflt/shellio.cxx
@@ -34,9 +34,7 @@
#include <tools/date.hxx>
#include <tools/time.hxx>
#include <svtools/urihelper.hxx>
-#ifndef SVTOOLS_FSTATHELPER_HXX
#include <svtools/fstathelper.hxx>
-#endif
#include <svtools/moduleoptions.hxx>
#include <sfx2/docfile.hxx>
#include <svx/lrspitem.hxx>
@@ -60,9 +58,7 @@
#include <pagedesc.hxx>
#include <poolfmt.hxx>
#include <fltini.hxx>
-#ifndef _DOCSH_HXX
#include <docsh.hxx>
-#endif
#include <redline.hxx>
#include <swerror.h>
@@ -72,6 +68,7 @@
#include <pausethreadstarting.hxx>
// <--
+
using namespace ::com::sun::star;
//////////////////////////////////////////////////////////////////////////
@@ -241,9 +238,9 @@ ULONG SwReader::Read( const Reader& rOptions )
{
SwPosition const*const pFrameAnchor(
rAnchor.GetCntntAnchor());
- if ( (FLY_PAGE == rAnchor.GetAnchorId())
+ if ( (FLY_AT_PAGE == rAnchor.GetAnchorId())
|| ( pFrameAnchor
- && ( ( (FLY_AT_CNTNT == rAnchor.GetAnchorId())
+ && ( ( (FLY_AT_PARA == rAnchor.GetAnchorId())
&& ( (pUndoPam->GetPoint()->nNode ==
pFrameAnchor->nNode)
|| (pUndoPam->GetMark()->nNode ==
@@ -251,7 +248,7 @@ ULONG SwReader::Read( const Reader& rOptions )
)
)
// #i97570# also check frames anchored AT char
- || ( (FLY_AUTO_CNTNT == rAnchor.GetAnchorId())
+ || ( (FLY_AT_CHAR == rAnchor.GetAnchorId())
&& !IsDestroyFrameAnchoredAtChar(
*pFrameAnchor,
*pUndoPam->GetPoint(),
@@ -262,7 +259,7 @@ ULONG SwReader::Read( const Reader& rOptions )
)
{
if( bChkHeaderFooter &&
- FLY_AT_CNTNT == rAnchor.GetAnchorId() &&
+ (FLY_AT_PARA == rAnchor.GetAnchorId()) &&
RES_DRAWFRMFMT == pFrmFmt->Which() )
{
// DrawObjecte in Kopf-/Fusszeilen ist nicht
@@ -286,15 +283,19 @@ ULONG SwReader::Read( const Reader& rOptions )
pFrmFmt->DelFrms();
}
- if( FLY_PAGE == rAnchor.GetAnchorId() )
+ if (FLY_AT_PAGE == rAnchor.GetAnchorId())
{
if( !rAnchor.GetCntntAnchor() )
+ {
pFrmFmt->MakeFrms();
+ }
else if( pCrsr )
+ {
// seitengebundene Flys eingefuegt, dann schalte
// die Optimierungs-Flags vom SwDoc ab. Sonst
// werden die Flys nicht an der Position erzeugt.
pDoc->SetLoaded( FALSE );
+ }
}
else
pFrmFmt->MakeFrms();
diff --git a/sw/source/filter/html/css1atr.cxx b/sw/source/filter/html/css1atr.cxx
index 01108a0d2567..33c354fbfebe 100644
--- a/sw/source/filter/html/css1atr.cxx
+++ b/sw/source/filter/html/css1atr.cxx
@@ -35,9 +35,7 @@
#include "hintids.hxx"
#include <vcl/svapp.hxx>
-#ifndef _WRKWIN_HXX //autogen
#include <vcl/wrkwin.hxx>
-#endif
#include <svtools/whiter.hxx>
#include <svx/boxitem.hxx>
#include <svx/ulspitem.hxx>
@@ -2130,8 +2128,8 @@ void SwHTMLWriter::OutCSS1_FrmFmtOptions( const SwFrmFmt& rFrmFmt,
const SwFmtAnchor& rAnchor = rFrmFmt.GetAnchor();
switch( rAnchor.GetAnchorId() )
{
- case FLY_AT_CNTNT:
- case FLY_AUTO_CNTNT:
+ case FLY_AT_PARA:
+ case FLY_AT_CHAR:
if( text::RelOrientation::FRAME == rHoriOri.GetRelationOrient() ||
text::RelOrientation::PRINT_AREA == rHoriOri.GetRelationOrient() )
{
@@ -2146,7 +2144,7 @@ void SwHTMLWriter::OutCSS1_FrmFmtOptions( const SwFrmFmt& rFrmFmt,
break;
}
- case FLY_PAGE:
+ case FLY_AT_PAGE:
case FLY_AT_FLY:
{
// position
@@ -2375,7 +2373,7 @@ void SwHTMLWriter::OutCSS1_FrmFmtBackground( const SwFrmFmt& rFrmFmt )
const SwFmtAnchor& rAnchor = rFrmFmt.GetAnchor();
RndStdIds eAnchorId = rAnchor.GetAnchorId();
const SwPosition *pAnchorPos = rAnchor.GetCntntAnchor();
- if( FLY_PAGE != eAnchorId && pAnchorPos )
+ if (FLY_AT_PAGE != eAnchorId && pAnchorPos)
{
const SwNode& rNode = pAnchorPos->nNode.GetNode();
if( rNode.IsCntntNode() )
diff --git a/sw/source/filter/html/htmlcss1.cxx b/sw/source/filter/html/htmlcss1.cxx
index 7fb4fd8502af..89af81314b99 100644
--- a/sw/source/filter/html/htmlcss1.cxx
+++ b/sw/source/filter/html/htmlcss1.cxx
@@ -39,17 +39,12 @@
#include <svtools/urihelper.hxx>
#include <i18npool/mslangid.hxx>
#include <sfx2/docfile.hxx>
-#ifndef _APP_HXX //autogen
#include <vcl/svapp.hxx>
-#endif
#include <svx/fhgtitem.hxx>
#include <svx/brshitem.hxx>
#include <svx/lrspitem.hxx>
#include <svx/ulspitem.hxx>
-#ifndef _SVX_BOXITEM_HXX //autogen
-
#include <svx/boxitem.hxx>
-#endif
#include <svx/fhgtitem.hxx>
#include <svx/flstitem.hxx>
#include <svx/brkitem.hxx>
@@ -2094,7 +2089,7 @@ void SwHTMLParser::SetAnchorAndAdjustment( const SfxItemSet & /*rItemSet*/,
}
else
{
- aAnchor.SetType( FLY_PAGE );
+ aAnchor.SetType( FLY_AT_PAGE );
aAnchor.SetPageNum( 1 );
}
nHoriPos = rPropInfo.nLeft;
@@ -2102,7 +2097,7 @@ void SwHTMLParser::SetAnchorAndAdjustment( const SfxItemSet & /*rItemSet*/,
}
else
{
- aAnchor.SetType( FLY_AT_CNTNT );
+ aAnchor.SetType( FLY_AT_PARA );
aAnchor.SetAnchor( pPam->GetPoint() );
eVertOri = text::VertOrientation::TOP;
eVertRel = text::RelOrientation::CHAR;
@@ -2128,14 +2123,14 @@ void SwHTMLParser::SetAnchorAndAdjustment( const SfxItemSet & /*rItemSet*/,
xub_StrLen nCntnt = pPam->GetPoint()->nContent.GetIndex();
if( nCntnt )
{
- aAnchor.SetType( FLY_AUTO_CNTNT );
+ aAnchor.SetType( FLY_AT_CHAR );
pPam->Move( fnMoveBackward );
eVertOri = text::VertOrientation::CHAR_BOTTOM;
eVertRel = text::RelOrientation::CHAR;
}
else
{
- aAnchor.SetType( FLY_AT_CNTNT );
+ aAnchor.SetType( FLY_AT_PARA );
eVertOri = text::VertOrientation::TOP;
eVertRel = text::RelOrientation::PRINT_AREA;
}
diff --git a/sw/source/filter/html/htmldraw.cxx b/sw/source/filter/html/htmldraw.cxx
index 328eb21be526..e3b3af0029a7 100644
--- a/sw/source/filter/html/htmldraw.cxx
+++ b/sw/source/filter/html/htmldraw.cxx
@@ -34,9 +34,7 @@
#include "hintids.hxx"
#include <vcl/svapp.hxx>
-#ifndef _WRKWIN_HXX //autogen
#include <vcl/wrkwin.hxx>
-#endif
#include <svx/svdmodel.hxx>
#include <svx/svdpage.hxx>
#include <svx/svdobj.hxx>
@@ -182,7 +180,7 @@ void SwHTMLParser::InsertDrawObject( SdrObject* pNewDrawObj,
aFrmSet.Put( aULItem );
}
- SwFmtAnchor aAnchor( FLY_IN_CNTNT );
+ SwFmtAnchor aAnchor( FLY_AS_CHAR );
if( SVX_CSS1_POS_ABSOLUTE == rCSS1PropInfo.ePosition &&
SVX_CSS1_LTYPE_TWIP == rCSS1PropInfo.eLeftType &&
SVX_CSS1_LTYPE_TWIP == rCSS1PropInfo.eTopType )
@@ -198,7 +196,7 @@ void SwHTMLParser::InsertDrawObject( SdrObject* pNewDrawObj,
}
else
{
- aAnchor.SetType( FLY_PAGE );
+ aAnchor.SetType( FLY_AT_PAGE );
}
// OD 2004-04-13 #i26791# - direct positioning for <SwDoc::Insert(..)>
pNewDrawObj->SetRelativePos( Point(rCSS1PropInfo.nLeft + nLeftSpace,
@@ -208,7 +206,7 @@ void SwHTMLParser::InsertDrawObject( SdrObject* pNewDrawObj,
else if( SVX_ADJUST_LEFT == rCSS1PropInfo.eFloat ||
text::HoriOrientation::LEFT == eHoriOri )
{
- aAnchor.SetType( FLY_AT_CNTNT );
+ aAnchor.SetType( FLY_AT_PARA );
aFrmSet.Put( SwFmtSurround(bHidden ? SURROUND_THROUGHT
: SURROUND_RIGHT) );
// OD 2004-04-13 #i26791# - direct positioning for <SwDoc::Insert(..)>
@@ -219,10 +217,14 @@ void SwHTMLParser::InsertDrawObject( SdrObject* pNewDrawObj,
aFrmSet.Put( SwFmtVertOrient( 0, eVertOri ) );
}
- if( FLY_PAGE == aAnchor.GetAnchorId() )
+ if (FLY_AT_PAGE == aAnchor.GetAnchorId())
+ {
aAnchor.SetPageNum( 1 );
+ }
else if( FLY_AT_FLY != aAnchor.GetAnchorId() )
+ {
aAnchor.SetAnchor( pPam->GetPoint() );
+ }
aFrmSet.Put( aAnchor );
pDoc->Insert( *pPam, *pNewDrawObj, &aFrmSet, NULL );
diff --git a/sw/source/filter/html/htmlfly.cxx b/sw/source/filter/html/htmlfly.cxx
index 92f9e1adb3d5..acbcb8eb0c25 100644
--- a/sw/source/filter/html/htmlfly.cxx
+++ b/sw/source/filter/html/htmlfly.cxx
@@ -39,12 +39,8 @@
#include "hintids.hxx"
#include <tools/string.hxx>
#include <svtools/urihelper.hxx>
-#ifndef _APP_HXX
#include <vcl/svapp.hxx>
-#endif
-#ifndef _WRKWIN_HXX //autogen
#include <vcl/wrkwin.hxx>
-#endif
#include <svtools/htmlkywd.hxx>
#include <svtools/htmlout.hxx>
#include <svtools/imap.hxx>
@@ -338,12 +334,12 @@ void SwHTMLWriter::CollectFlyFrms()
sal_Int16 eHoriRel = rFrmFmt.GetHoriOrient().GetRelationOrient();
switch( rAnchor.GetAnchorId() )
{
- case FLY_PAGE:
+ case FLY_AT_PAGE:
case FLY_AT_FLY:
nMode = aHTMLOutFrmPageFlyTable[eType][nExportMode];
break;
- case FLY_AT_CNTNT:
+ case FLY_AT_PARA:
// Absatz-gebundene Rahmen werden nur dann vor den
// Absatz geschrieben, wenn der Absatz einen Abstand
// hat.
@@ -362,7 +358,7 @@ void SwHTMLWriter::CollectFlyFrms()
nMode = aHTMLOutFrmParaPrtAreaTable[eType][nExportMode];
break;
- case FLY_AUTO_CNTNT:
+ case FLY_AT_CHAR:
if( text::RelOrientation::FRAME == eHoriRel || text::RelOrientation::PRINT_AREA == eHoriRel )
nMode = aHTMLOutFrmParaPrtAreaTable[eType][nExportMode];
else
@@ -594,7 +590,7 @@ void SwHTMLWriter::OutFrmFmtOptions( const SwFrmFmt &rFrmFmt,
const sal_Char *pStr = 0;
RndStdIds eAnchorId = rFrmFmt.GetAnchor().GetAnchorId();
if( (nFrmOpts & HTML_FRMOPT_ALIGN) &&
- (FLY_AT_CNTNT == eAnchorId || FLY_AUTO_CNTNT == eAnchorId) )
+ ((FLY_AT_PARA == eAnchorId) || (FLY_AT_CHAR == eAnchorId)) )
{
// MIB 12.3.98: Ist es nicht schlauer, absatzgebundene
// Rahmen notfalls links auszurichten als sie
@@ -611,7 +607,7 @@ void SwHTMLWriter::OutFrmFmtOptions( const SwFrmFmt &rFrmFmt,
}
if( (nFrmOpts & HTML_FRMOPT_ALIGN) && !pStr &&
( (nFrmOpts & HTML_FRMOPT_S_ALIGN) == 0 ||
- FLY_IN_CNTNT == eAnchorId ) &&
+ (FLY_AS_CHAR == eAnchorId) ) &&
SFX_ITEM_SET == rItemSet.GetItemState( RES_VERT_ORIENT, TRUE, &pItem ))
{
switch( ((SwFmtVertOrient*)pItem)->GetVertOrient() )
@@ -764,8 +760,8 @@ void SwHTMLWriter::OutFrmFmtOptions( const SwFrmFmt &rFrmFmt,
// Umlauf fuer absatzgeb. Grafiken als <BR CLEAR=...> in den String
// schreiben
if( (nFrmOpts & HTML_FRMOPT_BRCLEAR) &&
- (FLY_AT_CNTNT== rFrmFmt.GetAnchor().GetAnchorId() ||
- FLY_AUTO_CNTNT== rFrmFmt.GetAnchor().GetAnchorId()) &&
+ ((FLY_AT_PARA == rFrmFmt.GetAnchor().GetAnchorId()) ||
+ (FLY_AT_CHAR == rFrmFmt.GetAnchor().GetAnchorId())) &&
SFX_ITEM_SET == rItemSet.GetItemState( RES_SURROUND, TRUE, &pItem ))
{
const SwFmtSurround* pSurround = (const SwFmtSurround*)pItem;
@@ -1893,7 +1889,7 @@ SwHTMLPosFlyFrm::SwHTMLPosFlyFrm( const SwPosFlyFrm& rPosFly,
nOutputMode( nOutMode )
{
const SwFmtAnchor& rAnchor = rPosFly.GetFmt().GetAnchor();
- if( FLY_AUTO_CNTNT==rAnchor.GetAnchorId() &&
+ if ((FLY_AT_CHAR == rAnchor.GetAnchorId()) &&
HTML_POS_INSIDE == GetOutPos() )
{
// Auto-gebundene Rahmen werden ein Zeichen weiter hinten
diff --git a/sw/source/filter/html/htmlforw.cxx b/sw/source/filter/html/htmlforw.cxx
index 147e736a4353..575cbc4c719e 100644
--- a/sw/source/filter/html/htmlforw.cxx
+++ b/sw/source/filter/html/htmlforw.cxx
@@ -45,18 +45,14 @@
#include <com/sun/star/awt/XTextLayoutConstrains.hpp>
#include <hintids.hxx>
#include <vcl/svapp.hxx>
-#ifndef _WRKWIN_HXX //autogen
#include <vcl/wrkwin.hxx>
-#endif
#include <svtools/macitem.hxx>
#include <tools/urlobj.hxx>
#include <svtools/htmlout.hxx>
#include <svtools/htmltokn.h>
#include <svtools/htmlkywd.hxx>
#include "svtools/urihelper.hxx"
-#ifndef _TOOLKIT_UNOHLP_HXX
#include <toolkit/helper/vclunohelper.hxx>
-#endif
#include <svx/svdouno.hxx>
#include <svx/fmglob.hxx>
#include <svx/brshitem.hxx>
@@ -81,6 +77,7 @@
#include "htmlfly.hxx"
#include "htmlform.hxx"
+
using namespace ::com::sun::star;
using ::rtl::OUString;
/* */
@@ -1427,7 +1424,7 @@ void SwHTMLWriter::GetControls()
const SwFmtAnchor& rAnchor = pFrmFmt->GetAnchor();
const SwPosition *pPos = rAnchor.GetCntntAnchor();
- if( FLY_IN_CNTNT != rAnchor.GetAnchorId() || !pPos )
+ if ((FLY_AS_CHAR != rAnchor.GetAnchorId()) || !pPos)
continue;
const SdrObject *pSdrObj =
diff --git a/sw/source/filter/html/htmlgrin.cxx b/sw/source/filter/html/htmlgrin.cxx
index d18a2b762aa0..eaf43495fe1e 100644
--- a/sw/source/filter/html/htmlgrin.cxx
+++ b/sw/source/filter/html/htmlgrin.cxx
@@ -33,9 +33,7 @@
#include "hintids.hxx"
#include <vcl/svapp.hxx>
-#ifndef _WRKWIN_HXX //autogen
#include <vcl/wrkwin.hxx>
-#endif
#include <i18npool/mslangid.hxx>
#include <svtools/stritem.hxx>
#include <svtools/urihelper.hxx>
@@ -208,7 +206,7 @@ void SwHTMLParser::SetAnchorAndAdjustment( sal_Int16 eVertOri,
BOOL bDontAppend )
{
BOOL bMoveBackward = FALSE;
- SwFmtAnchor aAnchor( FLY_IN_CNTNT );
+ SwFmtAnchor aAnchor( FLY_AS_CHAR );
sal_Int16 eVertRel = text::RelOrientation::FRAME;
if( text::HoriOrientation::NONE != eHoriOri )
@@ -267,14 +265,14 @@ void SwHTMLParser::SetAnchorAndAdjustment( sal_Int16 eVertOri,
xub_StrLen nCntnt = pPam->GetPoint()->nContent.GetIndex();
if( nCntnt )
{
- aAnchor.SetType( FLY_AUTO_CNTNT );
+ aAnchor.SetType( FLY_AT_CHAR );
bMoveBackward = TRUE;
eVertOri = text::VertOrientation::CHAR_BOTTOM;
eVertRel = text::RelOrientation::CHAR;
}
else
{
- aAnchor.SetType( FLY_AT_CNTNT );
+ aAnchor.SetType( FLY_AT_PARA );
eVertOri = text::VertOrientation::TOP;
eVertRel = text::RelOrientation::PRINT_AREA;
}
@@ -301,7 +299,7 @@ void SwHTMLParser::RegisterFlyFrm( SwFrmFmt *pFlyFmt )
// automatisch verankerte Rahmen muessen noch um eine Position
// nach vorne verschoben werden.
if( RES_DRAWFRMFMT != pFlyFmt->Which() &&
- FLY_AT_CNTNT == pFlyFmt->GetAnchor().GetAnchorId() &&
+ (FLY_AT_PARA == pFlyFmt->GetAnchor().GetAnchorId()) &&
SURROUND_THROUGHT == pFlyFmt->GetSurround().GetSurround() )
{
aMoveFlyFrms.Insert( pFlyFmt, aMoveFlyFrms.Count() );
@@ -778,7 +776,7 @@ IMAGE_SETEVENT:
aMacroItem.SetMacro( aEvents[ n ], *pMacro );
}
- if( FLY_IN_CNTNT == pFlyFmt->GetAnchor().GetAnchorId() &&
+ if ((FLY_AS_CHAR == pFlyFmt->GetAnchor().GetAnchorId()) &&
aAttrTab.pINetFmt->GetSttPara() ==
pPam->GetPoint()->nNode &&
aAttrTab.pINetFmt->GetSttCnt() ==
@@ -1342,20 +1340,16 @@ void SwHTMLParser::StripTrailingPara()
{
ULONG nNodeIdx = pPam->GetPoint()->nNode.GetIndex();
- USHORT i;
-
- const SwFrmFmt* pFmt;
- const SwFmtAnchor* pAnchor;
- const SwPosition* pAPos;
const SwSpzFrmFmts& rFrmFmtTbl = *pDoc->GetSpzFrmFmts();
- for( i=0; i<rFrmFmtTbl.Count(); i++ )
+ for( USHORT i=0; i<rFrmFmtTbl.Count(); i++ )
{
- pFmt = rFrmFmtTbl[i];
- pAnchor = &pFmt->GetAnchor();
- if( 0 != ( pAPos = pAnchor->GetCntntAnchor()) &&
- (FLY_AT_CNTNT == pAnchor->GetAnchorId() ||
- FLY_AUTO_CNTNT == pAnchor->GetAnchorId()) &&
+ SwFrmFmt const*const pFmt = rFrmFmtTbl[i];
+ SwFmtAnchor const*const pAnchor = &pFmt->GetAnchor();
+ SwPosition const*const pAPos = pAnchor->GetCntntAnchor();
+ if (pAPos &&
+ ((FLY_AT_PARA == pAnchor->GetAnchorId()) ||
+ (FLY_AT_CHAR == pAnchor->GetAnchorId())) &&
pAPos->nNode == nNodeIdx )
return; // den Knoten duerfen wir nicht loeschen
diff --git a/sw/source/filter/html/htmlplug.cxx b/sw/source/filter/html/htmlplug.cxx
index 21e409c48530..a003678013da 100644
--- a/sw/source/filter/html/htmlplug.cxx
+++ b/sw/source/filter/html/htmlplug.cxx
@@ -33,8 +33,6 @@
#include <com/sun/star/embed/EmbedStates.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
-
-
#include "hintids.hxx"
#include <svtools/urihelper.hxx>
#define _SVSTDARR_ULONGS
@@ -42,9 +40,7 @@
#include <vcl/svapp.hxx>
#include <sfx2/frmhtml.hxx>
#include <sfx2/frmhtmlw.hxx>
-#ifndef _WRKWIN_HXX //autogen
#include <vcl/wrkwin.hxx>
-#endif
#include <sot/storage.hxx>
#include <svx/xoutbmp.hxx>
#include <svx/ulspitem.hxx>
@@ -465,7 +461,7 @@ void SwHTMLParser::InsertEmbed()
}
else
{
- SwFmtAnchor aAnchor( FLY_AT_CNTNT );
+ SwFmtAnchor aAnchor( FLY_AT_PARA );
aAnchor.SetAnchor( pPam->GetPoint() );
aFrmSet.Put( aAnchor );
aFrmSet.Put( SwFmtHoriOrient( 0, text::HoriOrientation::LEFT, text::RelOrientation::FRAME) );
@@ -1167,7 +1163,7 @@ Writer& OutHTML_FrmFmtOLENode( Writer& rWrt, const SwFrmFmt& rFrmFmt,
sOut = '\"';
}
- if( FLY_AT_CNTNT == rFrmFmt.GetAnchor().GetAnchorId() &&
+ if ((FLY_AT_PARA == rFrmFmt.GetAnchor().GetAnchorId()) &&
SURROUND_THROUGHT == rFrmFmt.GetSurround().GetSurround() )
{
// Das Plugin ist HIDDEN
diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx
index 551ebf937be2..9f13486da684 100644
--- a/sw/source/filter/html/swhtml.cxx
+++ b/sw/source/filter/html/swhtml.cxx
@@ -2837,7 +2837,7 @@ void SwHTMLParser::_SetAttr( BOOL bChkEnd, BOOL bBeforeTable,
SwFrmFmt *pFrmFmt = aMoveFlyFrms[ --n ];
const SwFmtAnchor& rAnchor = pFrmFmt->GetAnchor();
- ASSERT( FLY_AT_CNTNT==rAnchor.GetAnchorId(),
+ ASSERT( FLY_AT_PARA == rAnchor.GetAnchorId(),
"Nur Auto-Rahmen brauchen eine Spezialbehandlung" );
const SwPosition *pFlyPos = rAnchor.GetCntntAnchor();
ULONG nFlyParaIdx = pFlyPos->nNode.GetIndex();
@@ -2862,7 +2862,7 @@ void SwHTMLParser::_SetAttr( BOOL bChkEnd, BOOL bBeforeTable,
pAttrPam->GetPoint()->nContent.Assign( pAttrPam->GetCntntNode(),
aMoveFlyCnts[n] );
SwFmtAnchor aAnchor( rAnchor );
- aAnchor.SetType( FLY_AUTO_CNTNT );
+ aAnchor.SetType( FLY_AT_CHAR );
aAnchor.SetAnchor( pAttrPam->GetPoint() );
pFrmFmt->SetFmtAttr( aAnchor );
@@ -4411,27 +4411,23 @@ BOOL SwHTMLParser::HasCurrentParaFlys( BOOL bNoSurroundOnly,
// sonst: Der Absatz enthaelt irgendeinen Rahmen
SwNodeIndex& rNodeIdx = pPam->GetPoint()->nNode;
- SwFrmFmt* pFmt;
- const SwFmtAnchor* pAnchor;
- const SwPosition* pAPos;
const SwSpzFrmFmts& rFrmFmtTbl = *pDoc->GetSpzFrmFmts();
- USHORT i;
BOOL bFound = FALSE;
- for( i=0; i<rFrmFmtTbl.Count(); i++ )
+ for ( USHORT i=0; i<rFrmFmtTbl.Count(); i++ )
{
- pFmt = rFrmFmtTbl[i];
- pAnchor = &pFmt->GetAnchor();
+ SwFrmFmt *const pFmt = rFrmFmtTbl[i];
+ SwFmtAnchor const*const pAnchor = &pFmt->GetAnchor();
// Ein Rahmen wurde gefunden, wenn
// - er absatzgebunden ist, und
// - im aktuellen Absatz verankert ist, und
// - jeder absatzgebunene Rahmen zaehlt, oder
// - (nur Rahmen oder umlauf zaehlen und ) der Rahmen keinen
// Umlauf besitzt
-
- if( 0 != ( pAPos = pAnchor->GetCntntAnchor()) &&
- (FLY_AT_CNTNT == pAnchor->GetAnchorId() ||
- FLY_AUTO_CNTNT == pAnchor->GetAnchorId()) &&
+ SwPosition const*const pAPos = pAnchor->GetCntntAnchor();
+ if (pAPos &&
+ ((FLY_AT_PARA == pAnchor->GetAnchorId()) ||
+ (FLY_AT_CHAR == pAnchor->GetAnchorId())) &&
pAPos->nNode == rNodeIdx )
{
if( !(bNoSurroundOnly || bSurroundOnly) )
@@ -5073,18 +5069,16 @@ void SwHTMLParser::InsertLineBreak()
SwTxtNode* pTxtNd = rNodeIdx.GetNode().GetTxtNode();
if( pTxtNd )
{
- SwFrmFmt* pFmt;
- const SwFmtAnchor* pAnchor;
- const SwPosition* pAPos;
const SwSpzFrmFmts& rFrmFmtTbl = *pDoc->GetSpzFrmFmts();
for( USHORT i=0; i<rFrmFmtTbl.Count(); i++ )
{
- pFmt = rFrmFmtTbl[i];
- pAnchor = &pFmt->GetAnchor();
- if( 0 != ( pAPos = pAnchor->GetCntntAnchor()) &&
- (FLY_AT_CNTNT == pAnchor->GetAnchorId() ||
- FLY_AUTO_CNTNT == pAnchor->GetAnchorId()) &&
+ SwFrmFmt *const pFmt = rFrmFmtTbl[i];
+ SwFmtAnchor const*const pAnchor = &pFmt->GetAnchor();
+ SwPosition const*const pAPos = pAnchor->GetCntntAnchor();
+ if (pAPos &&
+ ((FLY_AT_PARA == pAnchor->GetAnchorId()) ||
+ (FLY_AT_CHAR == pAnchor->GetAnchorId())) &&
pAPos->nNode == rNodeIdx &&
pFmt->GetSurround().GetSurround() != SURROUND_NONE )
{
diff --git a/sw/source/filter/inc/fltshell.hxx b/sw/source/filter/inc/fltshell.hxx
index ec836f2b8549..036933bd4a67 100644
--- a/sw/source/filter/inc/fltshell.hxx
+++ b/sw/source/filter/inc/fltshell.hxx
@@ -36,9 +36,7 @@
#include <com/sun/star/text/VertOrientation.hpp>
#include <com/sun/star/text/RelOrientation.hpp>
#include <hintids.hxx>
-#ifndef _KEYCOD_HXX //autogen
#include <vcl/keycod.hxx>
-#endif
#include <tools/datetime.hxx>
#include <svx/brkitem.hxx>
#include <poolfmt.hxx>
@@ -556,7 +554,7 @@ public:
pOut->EndTable(); }
// methoden zur verwaltung von Flys
BOOL IsInFly() { return pOut->IsInFly(); }
- BOOL BeginFly( RndStdIds eAnchor = FLY_AT_CNTNT, BOOL bAbsolutePos = FALSE );
+ BOOL BeginFly( RndStdIds eAnchor = FLY_AT_PARA, BOOL bAbsolutePos = FALSE );
void SetFlyAnchor( RndStdIds eAnchor )
{ pOut->SetFlyAnchor( eAnchor ); }
void SetFlyXPos( short nXPos, sal_Int16 eHRel = com::sun::star::text::RelOrientation::FRAME,
diff --git a/sw/source/filter/rtf/rtfatr.cxx b/sw/source/filter/rtf/rtfatr.cxx
index fc60c857aedb..1f2e60f7c87d 100644
--- a/sw/source/filter/rtf/rtfatr.cxx
+++ b/sw/source/filter/rtf/rtfatr.cxx
@@ -38,9 +38,7 @@
*/
#include <hintids.hxx>
-#ifndef _COM_SUN_STAR_I18N_SCRIPTTYPE_HDL_
#include <com/sun/star/i18n/ScriptType.hdl>
-#endif
#include <vcl/cvtgrf.hxx>
#include <svtools/urihelper.hxx>
#include <svtools/stritem.hxx>
@@ -50,9 +48,7 @@
#include <svtools/itemiter.hxx>
#include <svx/fontitem.hxx>
#include <svx/hyznitem.hxx>
-#ifndef _SVX_TSTPITEM_HXX //autogen
#include <svx/tstpitem.hxx>
-#endif
#include <svx/lspcitem.hxx>
#include <svx/langitem.hxx>
#include <svx/keepitem.hxx>
@@ -72,16 +68,12 @@
#include <svx/lrspitem.hxx>
#include <svx/boxitem.hxx>
#include <svx/crsditem.hxx>
-#ifndef _SVX_CNTRITEM_HXX //autogen
#include <svx/cntritem.hxx>
-#endif
#include <svx/postitem.hxx>
#include <svx/shdditem.hxx>
#include <svx/wghtitem.hxx>
#include <svx/wrlmitem.hxx>
-#ifndef _SVX_EMPHITEM_HXX
#include <svx/emphitem.hxx>
-#endif
#include <svx/twolinesitem.hxx>
#include <svx/charscaleitem.hxx>
#include <svx/charrotateitem.hxx>
@@ -127,9 +119,7 @@
#include <flddat.hxx>
#include <pagedesc.hxx> // fuer SwPageDesc ...
#include <swtable.hxx> // fuer SwPageDesc ...
-#ifndef _DOCSH_HXX
#include <docsh.hxx>
-#endif
#include <swrect.hxx>
#include <section.hxx>
#include <wrtswtbl.hxx>
@@ -3592,7 +3582,7 @@ static Writer& OutRTF_SwFmtVertOrient ( Writer& rWrt, const SfxPoolItem& rHt )
const char* pOrient;
RndStdIds eAnchor = rRTFWrt.pFlyFmt->GetAnchor().GetAnchorId();
sal_Int16 eOrient = rFlyVert.GetRelationOrient();
- if( FLY_PAGE == eAnchor )
+ if (FLY_AT_PAGE == eAnchor)
{
if( text::RelOrientation::PAGE_FRAME == eOrient || text::RelOrientation::FRAME == eOrient )
pOrient = OOO_STRING_SVTOOLS_RTF_PVPG;
@@ -3648,7 +3638,7 @@ static Writer& OutRTF_SwFmtHoriOrient( Writer& rWrt, const SfxPoolItem& rHt )
const char* pS;
RndStdIds eAnchor = rRTFWrt.pFlyFmt->GetAnchor().GetAnchorId();
sal_Int16 eOrient = rFlyHori.GetRelationOrient();
- if( FLY_PAGE == eAnchor )
+ if (FLY_AT_PAGE == eAnchor)
{
if( text::RelOrientation::PAGE_FRAME == eOrient || text::RelOrientation::FRAME == eOrient )
pS = OOO_STRING_SVTOOLS_RTF_PHPG;
@@ -3702,12 +3692,12 @@ static Writer& OutRTF_SwFmtAnchor( Writer& rWrt, const SfxPoolItem& rHt )
rRTFWrt.bOutFmtAttr = TRUE;
switch( nId )
{
- case FLY_PAGE:
+ case FLY_AT_PAGE:
rWrt.Strm() << OOO_STRING_SVTOOLS_RTF_FLYPAGE;
rWrt.OutULong( rAnchor.GetPageNum() );
break;
- case FLY_AT_CNTNT:
- case FLY_IN_CNTNT:
+ case FLY_AT_PARA:
+ case FLY_AS_CHAR:
rWrt.Strm() << OOO_STRING_SVTOOLS_RTF_FLYCNTNT;
break;
}
diff --git a/sw/source/filter/rtf/rtffly.cxx b/sw/source/filter/rtf/rtffly.cxx
index e4043f2e8529..0bfdaa0b206b 100644
--- a/sw/source/filter/rtf/rtffly.cxx
+++ b/sw/source/filter/rtf/rtffly.cxx
@@ -64,15 +64,9 @@
#include <txtflcnt.hxx>
#include <fmtflcnt.hxx>
#include <fltini.hxx>
-#ifndef __SGI_STL_DEQUE
#include <deque>
-#endif
-#ifndef __SGI_STL_MAP
#include <map>
-#endif
-#ifndef __SGI_STL_UTILITY
#include <utility>
-#endif
// --> OD 2004-06-30 #i27767#
#include <fmtwrapinfluenceonobjpos.hxx>
// <--
@@ -82,6 +76,7 @@
#include "dcontact.hxx"
// <--
+
using namespace ::com::sun::star;
#define ANCHOR(p) ((SwFmtAnchor*)p)
@@ -459,7 +454,7 @@ void SwRTFParser::SetFlysInDoc()
SwFlyFrmFmt* pFmt = pDoc->MakeFlyFrmFmt( aEmptyStr, pParent );
pFmt->SetFmtAttr( pFlySave->aFlySet );
const SwFmtAnchor& rAnchor = pFmt->GetAnchor();
- if( FLY_IN_CNTNT != rAnchor.GetAnchorId() )
+ if (FLY_AS_CHAR != rAnchor.GetAnchorId())
{
// korrigiere noch den Absatz, ist immer der vorhergehende !
// JP 20.09.95: wenn es diesen gibt! (DocAnfang!)
@@ -568,7 +563,7 @@ void SwRTFParser::ReadFly( int nToken, SfxItemSet* pSet )
// RTF-Defaults setzen:
// --> OD 2004-06-24 #i27767#
- SwFmtAnchor aAnchor( FLY_AT_CNTNT );
+ SwFmtAnchor aAnchor( FLY_AT_PARA );
SwFmtHoriOrient aHori( 0, text::HoriOrientation::LEFT, text::RelOrientation::FRAME );
SwFmtVertOrient aVert( 0, text::VertOrientation::TOP, text::RelOrientation::FRAME );
@@ -844,7 +839,7 @@ void SwRTFParser::ReadFly( int nToken, SfxItemSet* pSet )
switch( GetNextToken() )
{
case RTF_FLY_PAGE:
- aAnchor.SetType( FLY_PAGE );
+ aAnchor.SetType( FLY_AT_PAGE );
aAnchor.SetPageNum( USHORT(nTokenValue));
aAnchor.SetAnchor( 0 );
break;
@@ -854,7 +849,7 @@ void SwRTFParser::ReadFly( int nToken, SfxItemSet* pSet )
SwNodeIndex aIdx( pPam->GetPoint()->nNode );
pDoc->GetNodes().GoPrevious( &aIdx );
SwPosition aPos( aIdx );
- aAnchor.SetType( FLY_AT_CNTNT );
+ aAnchor.SetType( FLY_AT_PARA );
aAnchor.SetAnchor( &aPos );
}
break;
@@ -1288,7 +1283,7 @@ void SwRTFParser::InsPicture( const String& rGrfNm, const Graphic* pGrf,
RES_VERT_ORIENT,*/ RES_ANCHOR );
const SwPosition* pPos = pPam->GetPoint();
- SwFmtAnchor aAnchor( FLY_IN_CNTNT );
+ SwFmtAnchor aAnchor( FLY_AS_CHAR );
aAnchor.SetAnchor( pPos );
aFlySet.Put( aAnchor );
aFlySet.Put( SwFmtVertOrient( 0, text::VertOrientation::TOP ));
diff --git a/sw/source/filter/rtf/swparrtf.cxx b/sw/source/filter/rtf/swparrtf.cxx
index 9b5b90a01641..c23cdb521491 100644
--- a/sw/source/filter/rtf/swparrtf.cxx
+++ b/sw/source/filter/rtf/swparrtf.cxx
@@ -35,18 +35,14 @@
#include <stack>
-#ifndef __RSC //autogen
#include <tools/errinf.hxx>
-#endif
#include <tools/stream.hxx>
#include <svtools/itemiter.hxx>
#include <svtools/rtftoken.h>
#include <svtools/intitem.hxx>
#include <svx/fhgtitem.hxx>
#include <svx/ulspitem.hxx>
-#ifndef _SVX_TSTPITEM_HXX //autogen
#include <svx/tstpitem.hxx>
-#endif
#include <svx/lspcitem.hxx>
#include <svx/lrspitem.hxx>
#include <svx/escpitem.hxx>
@@ -82,18 +78,14 @@
#include <fltini.hxx>
#include <fchrfmt.hxx>
#include <paratr.hxx>
-#ifndef _SECTIOM_HXX
#include <section.hxx>
-#endif
#include <fmtclbl.hxx>
#include <viewsh.hxx>
#include <shellres.hxx>
#include <hfspacingitem.hxx>
#include <tox.hxx>
#include <swerror.h>
-#ifndef _CMDID_H
#include <cmdid.h>
-#endif
#ifndef _STATSTR_HRC
#include <statstr.hrc> // ResId fuer Statusleiste
#endif
@@ -471,8 +463,8 @@ if( pSttNdIdx->GetIndex()+1 == pPam->GetBound( FALSE ).nNode.GetIndex() )
for ( USHORT nI = pFrmFmts->Count(); nI; --nI )
{
const SwFmtAnchor & rAnchor = (*pFrmFmts)[ nI - 1 ]->GetAnchor();
- if ( FLY_AT_CNTNT == rAnchor.GetAnchorId() ||
- FLY_AUTO_CNTNT == rAnchor.GetAnchorId() )
+ if ((FLY_AT_PARA == rAnchor.GetAnchorId()) ||
+ (FLY_AT_CHAR == rAnchor.GetAnchorId()))
{
const SwPosition * pObjPos = rAnchor.GetCntntAnchor();
if ( pObjPos && nNodeIdx == pObjPos->nNode.GetIndex() )
@@ -1270,14 +1262,7 @@ void SwRTFParser::ReadDrawingObject()
sw::util::SetLayer aSetLayer(*pDoc);
aSetLayer.SendObjectToHeaven(*pStroke);
*/
- /*
- FLY_AT_CNTNT, //Absatzgebundener Rahmen <to paragraph>
- FLY_IN_CNTNT, //Zeichengebundener Rahmen <as character>
- FLY_PAGE, //Seitengebundener Rahmen <to page>
- FLY_AT_FLY, //Rahmengebundener Rahmen ( LAYER_IMPL ) <to frame>
- FLY_AUTO_CNTNT, //Automatisch positionierter, absatzgebundener Rahmen <to character>
- */
- SwFmtAnchor aAnchor( FLY_AT_CNTNT );
+ SwFmtAnchor aAnchor( FLY_AT_PARA );
aAnchor.SetAnchor( pPam->GetPoint() );
aFlySet.Put( aAnchor );
@@ -1343,7 +1328,7 @@ void SwRTFParser::InsertShpObject(SdrObject* pStroke, int _nZOrder)
SwFmtFollowTextFlow aFollowTextFlow( FALSE );
aFlySet.Put( aFollowTextFlow );
- SwFmtAnchor aAnchor( FLY_AT_CNTNT );
+ SwFmtAnchor aAnchor( FLY_AT_PARA );
aAnchor.SetAnchor( pPam->GetPoint() );
aFlySet.Put( aAnchor );
@@ -3710,8 +3695,9 @@ void SwRTFParser::ReadHeaderFooter( int nToken, SwPageDesc* pPageDesc )
xub_StrLen nPos = pPam->GetPoint()->nContent.GetIndex();
SfxItemSet aSet( pDoc->GetAttrPool(), RES_FRMATR_BEGIN,
RES_FRMATR_END-1 );
- aSet.Put( SwFmtAnchor( FLY_IN_CNTNT ));
- pHdFtFmt = pDoc->MakeFlySection( FLY_IN_CNTNT, pPam->GetPoint(), &aSet );
+ aSet.Put( SwFmtAnchor( FLY_AS_CHAR ));
+ pHdFtFmt = pDoc->MakeFlySection( FLY_AS_CHAR,
+ pPam->GetPoint(), &aSet );
pTxtAttr = pPam->GetNode()->GetTxtNode()->GetTxtAttrForCharAt(
nPos, RES_TXTATR_FLYCNT );
diff --git a/sw/source/filter/rtf/wrtrtf.cxx b/sw/source/filter/rtf/wrtrtf.cxx
index d0129f29380f..bcfafdd0c28f 100644
--- a/sw/source/filter/rtf/wrtrtf.cxx
+++ b/sw/source/filter/rtf/wrtrtf.cxx
@@ -46,9 +46,7 @@
#include <svx/brshitem.hxx>
#include <svx/colritem.hxx>
#include <svx/boxitem.hxx>
-#ifndef _SVX_TSTPITEM_HXX //autogen
#include <svx/tstpitem.hxx>
-#endif
#include <svx/ulspitem.hxx>
#include <svx/lrspitem.hxx>
#include <svx/frmdiritem.hxx>
@@ -85,6 +83,7 @@
#include <com/sun/star/document/XDocumentProperties.hpp>
#include <com/sun/star/document/XDocumentPropertiesSupplier.hpp>
+
#if defined(UNX)
const sal_Char SwRTFWriter::sNewLine = '\012';
#else
@@ -1129,7 +1128,7 @@ bool ExportAsInline(const SwFlyFrmFmt& rFlyFrmFmt)
{
//if not an inline element (hack in our limitations here as to only
//graphics like this!!!!
- return rFlyFrmFmt.GetAnchor().GetAnchorId() == FLY_IN_CNTNT;
+ return rFlyFrmFmt.GetAnchor().GetAnchorId() == FLY_AS_CHAR;
}
void SwRTFWriter::OutRTFFlyFrms(const SwFlyFrmFmt& rFlyFrmFmt)
@@ -1779,7 +1778,7 @@ short SwRTFWriter::TrueFrameDirection(const SwFrmFmt &rFlyFmt) const
{
pItem = 0;
const SwFmtAnchor* pAnchor = &pFlyFmt2->GetAnchor();
- if( FLY_PAGE != pAnchor->GetAnchorId() &&
+ if ((FLY_AT_PAGE != pAnchor->GetAnchorId()) &&
pAnchor->GetCntntAnchor() )
{
pFlyFmt2 = pAnchor->GetCntntAnchor()->nNode.
diff --git a/sw/source/filter/ww1/fltshell.cxx b/sw/source/filter/ww1/fltshell.cxx
index 822091cec765..fa784f9fb86e 100644
--- a/sw/source/filter/ww1/fltshell.cxx
+++ b/sw/source/filter/ww1/fltshell.cxx
@@ -35,9 +35,7 @@
#include <hintids.hxx>
#include <hints.hxx>
-#ifndef _GRAPH_HXX //autogen
#include <vcl/graph.hxx>
-#endif
#include <svtools/urihelper.hxx>
#include <svx/impgrf.hxx>
#include <svx/boxitem.hxx>
@@ -72,13 +70,12 @@
#include <section.hxx> // class SwSection
#include <tblsel.hxx> // class SwSelBoxes
#include <pagedesc.hxx>
-#ifndef _DOCSH_HXX
#include <docsh.hxx> // class SwDocSh
-#endif
#include <fltshell.hxx>
#include <viewsh.hxx>
#include <shellres.hxx>
+
#define MAX_FIELDLEN 64000
using namespace com::sun::star;
@@ -437,7 +434,7 @@ void SwFltControlStack::SetAttrInDoc(const SwPosition& rTmpPos, SwFltStackEntry*
// Damit die Frames bei Einfuegen in existierendes Doc
// erzeugt werden (erst nach Setzen des Ankers!):
if(pDoc->GetRootFrm()
- && FLY_AT_CNTNT == pFmt->GetAnchor().GetAnchorId())
+ && (FLY_AT_PARA == pFmt->GetAnchor().GetAnchorId()))
{
pFmt->MakeFrms();
}
@@ -1285,7 +1282,7 @@ SwFltOutBase::~SwFltOutBase()
}
SwFltOutBase::SwFltOutBase(SwDoc& rDocu)
- : rDoc(rDocu), eFlyAnchor(FLY_AT_CNTNT), bFlyAbsPos(false)
+ : rDoc(rDocu), eFlyAnchor(FLY_AT_PARA), bFlyAbsPos(false)
{
}
@@ -1702,8 +1699,8 @@ BOOL SwFltOutBase::BeginFly( RndStdIds eAnchor /*= FLY_AT_CNTNT*/,
ASSERT( FALSE, "SetFlyAnchor() ohne Fly" );
return;
}
- if( eAnchor == FLY_IN_CNTNT ){
- ASSERT( FALSE, "SetFlyAnchor( FLY_IN_CNTNT ) nicht implementiert" );
+ if ( eAnchor == FLY_AS_CHAR ){
+ ASSERT( FALSE, "SetFlyAnchor( FLY_AS_CHAR ) nicht implementiert" );
return;
}
SwFmtAnchor& rAnchor = (SwFmtAnchor&)GetFlyFrmAttr( RES_ANCHOR );
diff --git a/sw/source/filter/ww1/w1sprm.cxx b/sw/source/filter/ww1/w1sprm.cxx
index 6aac7b226289..3ed4718cd7a8 100644
--- a/sw/source/filter/ww1/w1sprm.cxx
+++ b/sw/source/filter/ww1/w1sprm.cxx
@@ -31,9 +31,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-
-
-
#include <hintids.hxx>
#include <tools/solar.h>
@@ -46,10 +43,7 @@
#include <svx/shaditem.hxx>
#include <svx/ulspitem.hxx>
#include <svx/lspcitem.hxx>
-#ifndef _SVX_TSTPITEM_HXX //autogen
#include <svx/tstpitem.hxx>
-#endif
-
#include <fmtclds.hxx>
#include <fmtfsize.hxx>
@@ -595,13 +589,13 @@ void Ww1SingleSprmPpc::Start(
sal_Int16 eVRel; // Seite oder Seitenrand
switch ( ( nPpc & 0x30 ) >> 4 ){ // Y - Bindung bestimmt Sw-Bindung
- case 0: eAnchor = FLY_AT_CNTNT; // Vert Margin
+ case 0: eAnchor = FLY_AT_PARA; // Vert Margin
eVRel = text::RelOrientation::PRINT_AREA;
// if( nYPos < 0 )
// nYPos = 0; // koennen wir nicht
break;
/* case 1:*/ // Vert. Seite
- default:eAnchor = FLY_PAGE; // Vert Page oder unknown
+ default:eAnchor = FLY_AT_PAGE; // Vert Page oder unknown
eVRel = text::RelOrientation::FRAME;
break; // 2=Vert. Paragraph, 3=Use Default
}
diff --git a/sw/source/filter/ww8/writerhelper.cxx b/sw/source/filter/ww8/writerhelper.cxx
index 2ad32c7be689..8bd1eaa39601 100644
--- a/sw/source/filter/ww8/writerhelper.cxx
+++ b/sw/source/filter/ww8/writerhelper.cxx
@@ -190,7 +190,7 @@ namespace sw
meWriterType(eTxtBox),
mpStartFrameContent(0),
// --> OD 2007-04-19 #i43447# - move to initialization list
- mbIsInline( (rFmt.GetAnchor().GetAnchorId() == FLY_IN_CNTNT) )
+ mbIsInline( (rFmt.GetAnchor().GetAnchorId() == FLY_AS_CHAR) )
// <--
{
switch (rFmt.Which())
diff --git a/sw/source/filter/ww8/wrtw8esh.cxx b/sw/source/filter/ww8/wrtw8esh.cxx
index 5bb1ffc557b7..a53ee1b87e9f 100644
--- a/sw/source/filter/ww8/wrtw8esh.cxx
+++ b/sw/source/filter/ww8/wrtw8esh.cxx
@@ -587,7 +587,7 @@ void PlcDrawObj::WritePlc( WW8Export& rWrt ) const
//fHdr/bx/by/wr/wrk/fRcaSimple/fBelowText/fAnchorLock
USHORT nFlags=0;
//If nFlags isn't 0x14 its overridden by the escher properties
- if( FLY_PAGE == rFmt.GetAnchor().GetAnchorId())
+ if (FLY_AT_PAGE == rFmt.GetAnchor().GetAnchorId())
nFlags = 0x0000;
else
nFlags = 0x0014; // x-rel to text, y-rel to text
@@ -2117,7 +2117,7 @@ bool WinwordAnchoring::ConvertPosition( SwFmtHoriOrient& _iorHoriOri,
{
const RndStdIds eAnchor = _rFrmFmt.GetAnchor().GetAnchorId();
- if ( FLY_IN_CNTNT == eAnchor || FLY_AT_FLY == eAnchor )
+ if ( (FLY_AS_CHAR == eAnchor) || (FLY_AT_FLY == eAnchor) )
{
// no conversion for as-character or at frame anchored objects
return false;
@@ -2166,7 +2166,7 @@ bool WinwordAnchoring::ConvertPosition( SwFmtHoriOrient& _iorHoriOri,
// the fact, that the object is anchored at a paragraph, which has a "column
// break before" attribute
bool bConvDueToAnchoredAtColBreakPara( false );
- if ( ( eAnchor == FLY_AT_CNTNT || eAnchor == FLY_AUTO_CNTNT ) &&
+ if ( ( (eAnchor == FLY_AT_PARA) || (eAnchor == FLY_AT_CHAR) ) &&
_rFrmFmt.GetAnchor().GetCntntAnchor() &&
_rFrmFmt.GetAnchor().GetCntntAnchor()->nNode.GetNode().IsTxtNode() )
{
@@ -2403,7 +2403,7 @@ bool WinwordAnchoring::ConvertPosition( SwFmtHoriOrient& _iorHoriOri,
void WinwordAnchoring::SetAnchoring(const SwFrmFmt& rFmt)
{
const RndStdIds eAnchor = rFmt.GetAnchor().GetAnchorId();
- mbInline = (eAnchor == FLY_IN_CNTNT);
+ mbInline = (eAnchor == FLY_AS_CHAR);
SwFmtHoriOrient rHoriOri = rFmt.GetHoriOrient();
SwFmtVertOrient rVertOri = rFmt.GetVertOrient();
@@ -2487,13 +2487,13 @@ void WinwordAnchoring::SetAnchoring(const SwFrmFmt& rFmt)
case text::RelOrientation::FRAME:
case text::RelOrientation::FRAME_LEFT: //:-(
case text::RelOrientation::FRAME_RIGHT: //:-(
- if (eAnchor == FLY_PAGE)
+ if (eAnchor == FLY_AT_PAGE)
mnXRelTo = 1;
else
mnXRelTo = 2;
break;
case text::RelOrientation::PRINT_AREA:
- if (eAnchor == FLY_PAGE)
+ if (eAnchor == FLY_AT_PAGE)
mnXRelTo = 0;
else
mnXRelTo = 2;
@@ -2515,13 +2515,13 @@ void WinwordAnchoring::SetAnchoring(const SwFrmFmt& rFmt)
mnYRelTo = 1;
break;
case text::RelOrientation::PRINT_AREA:
- if (eAnchor == FLY_PAGE)
+ if (eAnchor == FLY_AT_PAGE)
mnYRelTo = 0;
else
mnYRelTo = 2;
break;
case text::RelOrientation::FRAME:
- if (eAnchor == FLY_PAGE)
+ if (eAnchor == FLY_AT_PAGE)
mnYRelTo = 1;
else
mnYRelTo = 2;
diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx
index 2cbbb7943f37..b9bf46cf750f 100644
--- a/sw/source/filter/ww8/wrtw8nds.cxx
+++ b/sw/source/filter/ww8/wrtw8nds.cxx
@@ -376,7 +376,7 @@ xub_StrLen SwAttrIter::SearchNext( xub_StrLen nStartPos )
if (nPos >= nStartPos && nPos <= nMinPos)
nMinPos = nPos;
- if (maFlyIter->GetFrmFmt().GetAnchor().GetAnchorId() == FLY_AUTO_CNTNT)
+ if (maFlyIter->GetFrmFmt().GetAnchor().GetAnchorId() == FLY_AT_CHAR)
{
++nPos;
if (nPos >= nStartPos && nPos <= nMinPos)
@@ -1301,7 +1301,7 @@ short MSWordExportBase::TrueFrameDirection( const SwFrmFmt &rFlyFmt ) const
{
pItem = 0;
const SwFmtAnchor* pAnchor = &pFlyFmt->GetAnchor();
- if ( FLY_PAGE != pAnchor->GetAnchorId() &&
+ if ((FLY_AT_PAGE != pAnchor->GetAnchorId()) &&
pAnchor->GetCntntAnchor() )
{
pFlyFmt = pAnchor->GetCntntAnchor()->nNode.GetNode().GetFlyFmt();
@@ -1359,7 +1359,7 @@ SvxBrushItem WW8Export::TrueFrameBgBrush(const SwFrmFmt &rFlyFmt) const
{
pRet = 0;
const SwFmtAnchor* pAnchor = &pFlyFmt->GetAnchor();
- if (FLY_PAGE != pAnchor->GetAnchorId() &&
+ if ((FLY_AT_PAGE != pAnchor->GetAnchorId()) &&
pAnchor->GetCntntAnchor())
{
pFlyFmt =
@@ -2497,12 +2497,13 @@ void WW8AttributeOutput::OutputFlyFrame_Impl( const sw::Frame& rFmt, const Point
aOffset -= aPageRect.Pos();
m_rWW8Export.pFlyOffset = &aOffset;
- m_rWW8Export.eNewAnchorType = FLY_PAGE;
+ m_rWW8Export.eNewAnchorType = FLY_AT_PAGE;
}
m_rWW8Export.mpParentFrame = &rFmt;
if (
- m_rWW8Export.bIsInTable && (FLY_PAGE != rAnch.GetAnchorId()) &&
+ m_rWW8Export.bIsInTable &&
+ (FLY_AT_PAGE != rAnch.GetAnchorId()) &&
!m_rWW8Export.pDoc->GetNodes()[ nStt ]->IsNoTxtNode()
)
{
@@ -2534,7 +2535,7 @@ void AttributeOutputBase::OutputFlyFrame( const sw::Frame& rFmt )
Point* pLayPos;
bool bValidNdPos = false, bValidPgPos = false;
- if ( FLY_PAGE == rFmt.GetFrmFmt().GetAnchor().GetAnchorId() )
+ if (FLY_AT_PAGE == rFmt.GetFrmFmt().GetAnchor().GetAnchorId())
{
// get the Layout Node-Position.
if ( !bValidPgPos )
diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx
index dcef287a1537..a32962640117 100644
--- a/sw/source/filter/ww8/wrtww8.cxx
+++ b/sw/source/filter/ww8/wrtww8.cxx
@@ -2899,7 +2899,7 @@ void MSWordExportBase::ExportDocument( bool bWriteAll )
mpParentFrame = 0;
pFlyOffset = 0;
- eNewAnchorType = FLY_PAGE;
+ eNewAnchorType = FLY_AT_PAGE;
nTxtTyp = TXT_MAINTEXT;
// --> OD 2007-04-19 #i43447# - removed
// nFlyWidth = nFlyHeight = 0;
diff --git a/sw/source/filter/ww8/wrtww8gr.cxx b/sw/source/filter/ww8/wrtww8gr.cxx
index aaafe0ee49fc..649bb7ed3b8e 100644
--- a/sw/source/filter/ww8/wrtww8gr.cxx
+++ b/sw/source/filter/ww8/wrtww8gr.cxx
@@ -404,7 +404,7 @@ void WW8Export::OutGrf(const sw::Frame &rFrame)
const SwFrmFmt &rFlyFmt = rFrame.GetFrmFmt();
const RndStdIds eAn = rFlyFmt.GetAttrSet().GetAnchor(false).GetAnchorId();
- if( eAn == FLY_IN_CNTNT )
+ if (eAn == FLY_AS_CHAR)
{
sal_Int16 eVert = rFlyFmt.GetVertOrient().GetVertOrient();
if ((eVert == text::VertOrientation::CHAR_CENTER) || (eVert == text::VertOrientation::LINE_CENTER))
@@ -465,8 +465,8 @@ void WW8Export::OutGrf(const sw::Frame &rFrame)
// Otherwise, an additional paragraph is exported for a graphic, which is
// forced to be treated as inline, because it's anchored inside another frame.
if ( !rFrame.IsInline() &&
- ( ( eAn == FLY_AT_CNTNT && ( bWrtWW8 || !bIsInTable ) ) ||
- eAn == FLY_PAGE ) )
+ ( ((eAn == FLY_AT_PARA) && ( bWrtWW8 || !bIsInTable )) ||
+ (eAn == FLY_AT_PAGE)) )
// <--
{
WriteChar( (char)0x0d ); // umgebenden Rahmen mit CR abschliessen
diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx
index 3b91de937668..3712c13d372d 100644
--- a/sw/source/filter/ww8/ww8atr.cxx
+++ b/sw/source/filter/ww8/ww8atr.cxx
@@ -4069,15 +4069,15 @@ void WW8AttributeOutput::FormatAnchor( const SwFmtAnchor& rAnchor )
BYTE nP = 0;
switch ( rAnchor.GetAnchorId() )
{
- case FLY_PAGE:
+ case FLY_AT_PAGE:
// Vert: Page | Horz: Page
nP |= (1 << 4) | (2 << 6);
break;
// Im Fall eine Flys als Zeichen: Absatz-gebunden setzen!!!
case FLY_AT_FLY:
- case FLY_AUTO_CNTNT:
- case FLY_AT_CNTNT:
- case FLY_IN_CNTNT:
+ case FLY_AT_CHAR:
+ case FLY_AT_PARA:
+ case FLY_AS_CHAR:
// Vert: Page | Horz: Page
nP |= (2 << 4) | (0 << 6);
break;
diff --git a/sw/source/filter/ww8/ww8glsy.cxx b/sw/source/filter/ww8/ww8glsy.cxx
index b0dabff56b2f..cdb13be50aaa 100644
--- a/sw/source/filter/ww8/ww8glsy.cxx
+++ b/sw/source/filter/ww8/ww8glsy.cxx
@@ -36,14 +36,10 @@
#include <svtools/urihelper.hxx>
#include <rtl/tencinfo.h>
#include <swerror.h>
-#ifndef _NDTXT
#include <ndtxt.hxx>
-#endif
#include <pam.hxx>
#include <shellio.hxx>
-#ifndef _DOCSH_HXX
#include <docsh.hxx>
-#endif
#include <fmtanchr.hxx>
#include <frmfmt.hxx>
#include <doc.hxx>
@@ -51,6 +47,7 @@
#include "ww8glsy.hxx"
#include "ww8par.hxx"
+
WW8Glossary::WW8Glossary(SvStorageStreamRef &refStrm, BYTE nVersion,
SvStorage *pStg)
: pGlossary(0), rStrm(refStrm), xStg(pStg), nStrings(0)
@@ -82,10 +79,10 @@ bool WW8Glossary::HasBareGraphicEnd(SwDoc *pDoc,SwNodeIndex &rIdx)
RES_DRAWFRMFMT != pFrmFmt->Which() )
continue;
const SwFmtAnchor& rAnchor = pFrmFmt->GetAnchor();
- const SwPosition* pAPos;
- if( ( FLY_AT_CNTNT == rAnchor.GetAnchorId() ||
- FLY_AUTO_CNTNT == rAnchor.GetAnchorId() ) &&
- 0 != ( pAPos = rAnchor.GetCntntAnchor()) &&
+ SwPosition const*const pAPos = rAnchor.GetCntntAnchor();
+ if (pAPos &&
+ ((FLY_AT_PARA == rAnchor.GetAnchorId()) ||
+ (FLY_AT_CHAR == rAnchor.GetAnchorId())) &&
rIdx == pAPos->nNode.GetIndex() )
{
bRet=true;
diff --git a/sw/source/filter/ww8/ww8graf.cxx b/sw/source/filter/ww8/ww8graf.cxx
index 4948ac5eddae..cc17df625630 100644
--- a/sw/source/filter/ww8/ww8graf.cxx
+++ b/sw/source/filter/ww8/ww8graf.cxx
@@ -58,9 +58,7 @@
#include <svx/adjitem.hxx>
#include <svx/wghtitem.hxx>
#include <svx/crsditem.hxx>
-#ifndef _SVX_CNTRITEM_HXX
#include <svx/cntritem.hxx>
-#endif
#include <svx/shdditem.hxx>
#include <svx/fontitem.hxx>
#include <svx/ulspitem.hxx>
@@ -191,13 +189,13 @@ bool SwWW8ImplReader::ReadGrafStart(void* pData, short nDataSiz,
}
pStrm->Read(pData, nDataSiz);
- RndStdIds eAnchor = (SVBT8ToByte(pDo->by) < 2) ? FLY_PAGE : FLY_AT_CNTNT;
+ RndStdIds eAnchor = (SVBT8ToByte(pDo->by) < 2) ? FLY_AT_PAGE : FLY_AT_PARA;
rSet.Put(SwFmtAnchor(eAnchor));
nDrawXOfs2 = nDrawXOfs;
nDrawYOfs2 = nDrawYOfs;
- if( eAnchor == FLY_AT_CNTNT )
+ if (eAnchor == FLY_AT_PARA)
{
if( SVBT8ToByte( pDo->bx ) == 1 ) // Pos: echt links
nDrawXOfs2 = static_cast< short >(nDrawXOfs2 - maSectionManager.GetPageLeft());
@@ -2247,7 +2245,7 @@ RndStdIds SwWW8ImplReader::ProcessEscherAlign(SvxMSDffImportRec* pRecord,
{
ASSERT(pRecord || pFSPA, "give me something! to work with for anchoring");
if (!pRecord && !pFSPA)
- return FLY_PAGE;
+ return FLY_AT_PAGE;
SvxMSDffImportRec aRecordFromFSPA;
if (!pRecord)
@@ -2298,7 +2296,7 @@ RndStdIds SwWW8ImplReader::ProcessEscherAlign(SvxMSDffImportRec* pRecord,
UINT32 nYRelTo = nCntRelTo > pRecord->nYRelTo ? pRecord->nYRelTo : 1;
// --> OD 2005-03-03 #i43718#
- RndStdIds eAnchor = IsInlineEscherHack() ? FLY_IN_CNTNT : FLY_AUTO_CNTNT;
+ RndStdIds eAnchor = IsInlineEscherHack() ? FLY_AS_CHAR : FLY_AT_CHAR;
// <--
SwFmtAnchor aAnchor( eAnchor );
@@ -2462,7 +2460,7 @@ RndStdIds SwWW8ImplReader::ProcessEscherAlign(SvxMSDffImportRec* pRecord,
if (
(pFSPA->nYaTop < 0) && (eVertOri == text::VertOrientation::NONE) &&
- ((eAnchor == FLY_AT_CNTNT) || (eAnchor == FLY_AUTO_CNTNT))
+ ((eAnchor == FLY_AT_PARA) || (eAnchor == FLY_AT_CHAR))
)
{
maTracer.Log(sw::log::eNegativeVertPlacement);
@@ -2845,7 +2843,7 @@ SwFrmFmt* SwWW8ImplReader::Read_GrafLayer( long nGrafAnchorCp )
SwFrmFmt *SwWW8ImplReader::AddAutoAnchor(SwFrmFmt *pFmt)
{
- if (pFmt && (pFmt->GetAnchor().GetAnchorId() != FLY_IN_CNTNT))
+ if (pFmt && (pFmt->GetAnchor().GetAnchorId() != FLY_AS_CHAR))
{
sal_uInt16 nTextAreaWidth = static_cast< sal_uInt16 >( maSectionManager.GetPageWidth() -
maSectionManager.GetPageRight() - maSectionManager.GetPageLeft());
@@ -2860,8 +2858,10 @@ SwFrmFmt *SwWW8ImplReader::AddAutoAnchor(SwFrmFmt *pFmt)
*
* Leave to later and set the correct location then.
*/
- if ((pFmt) && (pFmt->GetAnchor().GetAnchorId() != FLY_IN_CNTNT))
+ if ((pFmt) && (pFmt->GetAnchor().GetAnchorId() != FLY_AS_CHAR))
+ {
pAnchorStck->AddAnchor(*pPaM->GetPoint(), pFmt);
+ }
return pFmt;
}
@@ -3234,7 +3234,7 @@ void SwWW8ImplReader::GrafikDtor()
void SwWW8FltAnchorStack::AddAnchor(const SwPosition& rPos, SwFrmFmt *pFmt)
{
- ASSERT(pFmt->GetAnchor().GetAnchorId() != FLY_IN_CNTNT,
+ ASSERT(pFmt->GetAnchor().GetAnchorId() != FLY_AS_CHAR,
"Don't use fltanchors with inline frames, slap!");
NewAttr(rPos, SwFltAnchor(pFmt));
}
diff --git a/sw/source/filter/ww8/ww8graf2.cxx b/sw/source/filter/ww8/ww8graf2.cxx
index dc653c5738e6..9c0ea275f10d 100644
--- a/sw/source/filter/ww8/ww8graf2.cxx
+++ b/sw/source/filter/ww8/ww8graf2.cxx
@@ -33,9 +33,7 @@
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil -*- */
-#ifndef __SGI_STL_ITERATOR
#include <iterator>
-#endif
#include <hintids.hxx>
#include <svtools/urihelper.hxx>
#include <svx/impgrf.hxx>
@@ -415,7 +413,7 @@ SwFlyFrmFmt* SwWW8ImplReader::MakeGrafNotInCntnt(const WW8PicDesc& rPD,
// Damit die Frames bei Einfuegen in existierendes Doc erzeugt werden:
if (rDoc.GetRootFrm() &&
- (FLY_AT_CNTNT == pFlyFmt->GetAnchor().GetAnchorId()))
+ (FLY_AT_PARA == pFlyFmt->GetAnchor().GetAnchorId()))
{
pFlyFmt->MakeFrms();
}
@@ -548,9 +546,11 @@ SwFrmFmt* SwWW8ImplReader::ImportGraf(SdrTextObj* pTextObj,
// it is anchored in content; because this anchor add
// a character into the textnode.
// IussueZilla task 2806
- if( FLY_IN_CNTNT ==
+ if (FLY_AS_CHAR ==
pFlyFmtOfJustInsertedGraphic->GetAnchor().GetAnchorId() )
+ {
aFlySet.ClearItem( RES_ANCHOR );
+ }
pFlyFmtOfJustInsertedGraphic->SetFmtAttr( aFlySet );
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index 599c6b3ea1b6..2602c03f7138 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -1648,7 +1648,7 @@ void SwWW8ImplReader::Read_HdFtTextAsHackedFrame(long nStart, long nLen,
pPaM->GetPoint()->nNode = pSttIdx->GetIndex() + 1;
pPaM->GetPoint()->nContent.Assign(pPaM->GetCntntNode(), 0);
- SwFlyFrmFmt *pFrame = rDoc.MakeFlySection(FLY_AT_CNTNT, pPaM->GetPoint());
+ SwFlyFrmFmt *pFrame = rDoc.MakeFlySection(FLY_AT_PARA, pPaM->GetPoint());
pFrame->SetFmtAttr(SwFmtFrmSize(ATT_MIN_SIZE, nPageWidth, MINLAY));
pFrame->SetFmtAttr(SwFmtSurround(SURROUND_THROUGHT));
diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx
index 5cb19358f385..87b5cc4a806a 100644
--- a/sw/source/filter/ww8/ww8par2.cxx
+++ b/sw/source/filter/ww8/ww8par2.cxx
@@ -3473,7 +3473,7 @@ bool SwWW8ImplReader::StartTable(WW8_CP nStartCp)
// --> OD 2005-03-21 #i45301# - anchor nested table inside Writer fly frame
// only at-character, if absolute position object attributes are available.
// Thus, default anchor type is as-character anchored.
- RndStdIds eAnchor( FLY_IN_CNTNT );
+ RndStdIds eAnchor( FLY_AS_CHAR );
// <--
if ( nInTable )
{
@@ -3505,7 +3505,7 @@ bool SwWW8ImplReader::StartTable(WW8_CP nStartCp)
// <--
// --> OD 2005-03-21 #i45301# - anchor nested table Writer fly
// frame at-character
- eAnchor = FLY_AUTO_CNTNT;
+ eAnchor = FLY_AT_CHAR;
// <--
}
}
@@ -3523,7 +3523,8 @@ bool SwWW8ImplReader::StartTable(WW8_CP nStartCp)
"how could we be in a local apo and have no apo");
}
- if ( eAnchor == FLY_AUTO_CNTNT && !maTableStack.empty() && !InEqualApo(nNewInTable) )
+ if ((eAnchor == FLY_AT_CHAR)
+ && !maTableStack.empty() && !InEqualApo(nNewInTable) )
{
pTableDesc->pParentPos = new SwPosition(*pPaM->GetPoint());
SfxItemSet aItemSet(rDoc.GetAttrPool(),
@@ -3551,7 +3552,7 @@ bool SwWW8ImplReader::StartTable(WW8_CP nStartCp)
if ( pTableWFlyPara && pTableSFlyPara )
{
WW8FlySet aFlySet( *this, pTableWFlyPara, pTableSFlyPara, false );
- SwFmtAnchor aAnchor( FLY_AUTO_CNTNT );
+ SwFmtAnchor aAnchor( FLY_AT_CHAR );
aAnchor.SetAnchor( pTableDesc->pParentPos );
aFlySet.Put( aAnchor );
pTableDesc->pFlyFmt->SetFmtAttr( aFlySet );
@@ -3606,8 +3607,8 @@ bool lcl_PamContainsFly(SwPaM & rPam)
switch (pAnchor->GetAnchorId())
{
- case FLY_AT_CNTNT:
- case FLY_AUTO_CNTNT:
+ case FLY_AT_PARA:
+ case FLY_AT_CHAR:
{
const SwPosition* pAPos = pAnchor->GetCntntAnchor();
diff --git a/sw/source/filter/ww8/ww8par4.cxx b/sw/source/filter/ww8/ww8par4.cxx
index ccabdcf8cac1..eef92f7148cf 100644
--- a/sw/source/filter/ww8/ww8par4.cxx
+++ b/sw/source/filter/ww8/ww8par4.cxx
@@ -35,12 +35,8 @@
#include "writerhelper.hxx"
#include <com/sun/star/embed/XClassifiedObject.hpp>
-#ifndef __SGI_STL_ALGORITHM
#include <algorithm>
-#endif
-#ifndef __SGI_STL_FUNCTIONAL
#include <functional>
-#endif
#include <osl/endian.h>
#include <sot/storage.hxx>
#include <com/sun/star/drawing/XShape.hpp>
@@ -59,9 +55,7 @@
#include <frmfmt.hxx>
#include <pam.hxx>
#include <ndgrf.hxx>
-#ifndef _DOCSH_HXX
#include <docsh.hxx> // fuer Ole-Node
-#endif
#include <mdiexp.hxx> // Progress
#include <redline.hxx>
#include <fltshell.hxx>
@@ -296,7 +290,7 @@ SwFrmFmt* SwWW8ImplReader::ImportOle(const Graphic* pGrf,
if (!mbNewDoc)
Reader::ResetFrmFmtAttrs( *pTempSet );
- SwFmtAnchor aAnchor( FLY_IN_CNTNT );
+ SwFmtAnchor aAnchor( FLY_AS_CHAR );
aAnchor.SetAnchor( pPaM->GetPoint() );
pTempSet->Put( aAnchor );
diff --git a/sw/source/filter/ww8/ww8par5.cxx b/sw/source/filter/ww8/ww8par5.cxx
index f5f82d879aac..d51b4c5d2f4b 100644
--- a/sw/source/filter/ww8/ww8par5.cxx
+++ b/sw/source/filter/ww8/ww8par5.cxx
@@ -45,17 +45,11 @@
#include <svtools/zformat.hxx>
#include <sfx2/linkmgr.hxx>
-#ifndef _UCBHELPER_CONTENT_HXX_
#include <ucbhelper/content.hxx>
-#endif
-#ifndef _UCBHELPER_CONTENTBROKER_HXX_
#include <ucbhelper/contentbroker.hxx>
-#endif
#include <ucbhelper/commandenvironment.hxx>
-#ifndef _COM_SUN_STAR_I18N_SCRIPTTYPE_HDL_
#include <com/sun/star/i18n/ScriptType.hdl>
-#endif
#include <hintids.hxx>
#include <svx/fontitem.hxx>
#include <svx/fhgtitem.hxx>
@@ -2216,7 +2210,7 @@ eF_ResT SwWW8ImplReader::Read_F_IncludePicture( WW8FieldDesc*, String& rStr )
*/
SfxItemSet aFlySet( rDoc.GetAttrPool(), RES_FRMATR_BEGIN,
RES_FRMATR_END-1 );
- aFlySet.Put( SwFmtAnchor( FLY_IN_CNTNT ) );
+ aFlySet.Put( SwFmtAnchor( FLY_AS_CHAR ) );
aFlySet.Put( SwFmtVertOrient( 0, text::VertOrientation::TOP, text::RelOrientation::FRAME ));
pFlyFmtOfJustInsertedGraphic = rDoc.Insert( *pPaM,
aGrfName,
diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx
index 978834f3345e..21bfa4efdc64 100644
--- a/sw/source/filter/ww8/ww8par6.cxx
+++ b/sw/source/filter/ww8/ww8par6.cxx
@@ -44,9 +44,7 @@
#include <svx/langitem.hxx>
#include <svx/cmapitem.hxx>
#include <svx/shdditem.hxx>
-#ifndef _SVX_CNTRITEM_HXX //autogen
#include <svx/cntritem.hxx>
-#endif
#include <svx/crsditem.hxx>
#include <svx/postitem.hxx>
#include <svx/wghtitem.hxx>
@@ -65,19 +63,13 @@
#include <svx/boxitem.hxx>
#include <svx/ulspitem.hxx>
#include <svx/lrspitem.hxx>
-#ifndef _SVX_TSTPITEM_HXX //autogen
#include <svx/tstpitem.hxx>
-#endif
#include <svx/akrnitem.hxx>
#include <svx/paperinf.hxx>
-#ifndef _SVX_EMPHITEM_HXX //autogen
#include <svx/emphitem.hxx>
-#endif
#include <svx/forbiddenruleitem.hxx>
#include <svx/twolinesitem.hxx>
-#ifndef _SVX_SCRIPSPACEITEM_HXX
#include <svx/scriptspaceitem.hxx>
-#endif
#include <svx/hngpnctitem.hxx>
#include <svx/pbinitem.hxx>
#include <svx/charscaleitem.hxx>
@@ -1995,7 +1987,7 @@ WW8SwFlyPara::WW8SwFlyPara( SwPaM& rPaM,
nYBind = (( rWW.nSp29 & 0x30 ) >> 4);
// --> OD 2005-08-24 #i53725# - absolute positioned objects have to be
// anchored at-paragraph to assure its correct anchor position.
- eAnchor = FLY_AT_CNTNT;
+ eAnchor = FLY_AT_PARA;
// <--
switch (nYBind)
{
@@ -2287,7 +2279,7 @@ void WW8FlySet::Init(const SwWW8ImplReader& rReader, const SwPaM* pPaM)
Reader::ResetFrmFmtAttrs(*this); // Abstand/Umrandung raus
Put(SvxLRSpaceItem(RES_LR_SPACE)); //inline writer ole2 objects start with 0.2cm l/r
- SwFmtAnchor aAnchor(FLY_IN_CNTNT);
+ SwFmtAnchor aAnchor(FLY_AS_CHAR);
aAnchor.SetAnchor(pPaM->GetPoint());
Put(aAnchor);
@@ -2519,8 +2511,10 @@ bool SwWW8ImplReader::StartApo(const ApoTestResults &rApo,
pWWZOrder->InsertTextLayerObject(pOurNewObject);
}
- if (FLY_IN_CNTNT != pSFlyPara->eAnchor)
+ if (FLY_AS_CHAR != pSFlyPara->eAnchor)
+ {
pAnchorStck->AddAnchor(*pPaM->GetPoint(),pSFlyPara->pFlyFmt);
+ }
// merke Pos im Haupttext
pSFlyPara->pMainTextPos = new SwPosition( *pPaM->GetPoint() );
@@ -3206,7 +3200,7 @@ SwFrmFmt *SwWW8ImplReader::ContainsSingleInlineGraphic(const SwPaM &rRegion)
subscripting to force the graphic into a centered position on the line, so
we must check when applying sub/super to see if it the subscript range
contains only a single graphic, and if that graphic is anchored as
- FLY_IN_CNTNT and then we can change its anchoring to centered in the line.
+ FLY_AS_CHAR and then we can change its anchoring to centered in the line.
*/
SwFrmFmt *pRet=0;
SwNodeIndex aBegin(rRegion.Start()->nNode);
@@ -3223,8 +3217,8 @@ SwFrmFmt *SwWW8ImplReader::ContainsSingleInlineGraphic(const SwPaM &rRegion)
{
const SwFmtFlyCnt& rFly = pTFlyAttr->GetFlyCnt();
SwFrmFmt *pFlyFmt = rFly.GetFrmFmt();
- if( pFlyFmt &&
- FLY_IN_CNTNT == pFlyFmt->GetAnchor().GetAnchorId() )
+ if (pFlyFmt &&
+ (FLY_AS_CHAR == pFlyFmt->GetAnchor().GetAnchorId()))
{
pRet = pFlyFmt;
}
@@ -3240,7 +3234,7 @@ bool SwWW8ImplReader::ConvertSubToGraphicPlacement()
subscripting to force the graphic into a centered position on the line, so
we must check when applying sub/super to see if it the subscript range
contains only a single graphic, and if that graphic is anchored as
- FLY_IN_CNTNT and then we can change its anchoring to centered in the line.
+ FLY_AS_CHAR and then we can change its anchoring to centered in the line.
*/
bool bIsGraphicPlacementHack = false;
USHORT nPos;
diff --git a/sw/source/filter/xml/xmltexti.cxx b/sw/source/filter/xml/xmltexti.cxx
index 6953e065c82a..8c414cdeab0e 100644
--- a/sw/source/filter/xml/xmltexti.cxx
+++ b/sw/source/filter/xml/xmltexti.cxx
@@ -47,9 +47,7 @@
#include <xmloff/prstylei.hxx>
#include <xmloff/maptype.hxx>
#include <xmloff/xmlprmap.hxx>
-#ifndef _XMLOFF_TXTPRMAP_HXX
#include <xmloff/txtprmap.hxx>
-#endif
#include <xmloff/i18nmap.hxx>
#include "unocrsr.hxx"
#include "unoobj.hxx"
@@ -76,6 +74,7 @@
#include <svtools/embedhlp.hxx>
#include <svtools/urihelper.hxx>
+
using ::rtl::OUString;
using ::rtl::OUStringBuffer;
using namespace ::com::sun::star;
@@ -126,7 +125,7 @@ static void lcl_putHeightAndWidth ( SfxItemSet &rItemSet,
rItemSet.Put( SwFmtFrmSize( ATT_FIX_SIZE, nWidth, nHeight ) );
}
- SwFmtAnchor aAnchor( FLY_AUTO_CNTNT );
+ SwFmtAnchor aAnchor( FLY_AT_CHAR );
rItemSet.Put( aAnchor );
if( pTwipWidth )
diff --git a/sw/source/ui/app/appenv.cxx b/sw/source/ui/app/appenv.cxx
index 7f3acf375b35..57a5bed15f5c 100644
--- a/sw/source/ui/app/appenv.cxx
+++ b/sw/source/ui/app/appenv.cxx
@@ -43,18 +43,12 @@
#include <svx/svxids.hrc>
#include <svtools/svmedit.hxx>
-#ifndef _APP_HXX //autogen
#include <vcl/svapp.hxx>
-#endif
-#ifndef _WRKWIN_HXX //autogen
#include <vcl/wrkwin.hxx>
-#endif
#include <sfx2/app.hxx>
#include <sfx2/docfac.hxx>
#include <sfx2/printer.hxx>
-#ifndef _MSGBOX_HXX //autogen
#include <vcl/msgbox.hxx>
-#endif
#include <sfx2/dispatch.hxx>
#include <svx/boxitem.hxx>
#include <svx/lrspitem.hxx>
@@ -67,21 +61,13 @@
#include <paratr.hxx>
#include <swmodule.hxx>
#include <wrtsh.hxx>
-#ifndef _VIEW_HXX
#include <view.hxx>
-#endif
-#ifndef _DOCSH_HXX
#include <docsh.hxx>
-#endif
#include <frmatr.hxx>
#include <fldbas.hxx>
#include <swundo.hxx>
-#ifndef IDOCUMENTDEVICEACCESS_HXX_INCLUDED
#include <IDocumentDeviceAccess.hxx>
-#endif
-#ifndef _DBMGR_HXX
#include <dbmgr.hxx>
-#endif
#include <fmtcol.hxx>
#include <frmmgr.hxx>
#include <fldmgr.hxx>
@@ -91,9 +77,7 @@
#include <SwStyleNameMapper.hxx>
#include <crsskip.hxx>
-#ifndef _CMDID_H
#include <cmdid.h>
-#endif
#ifndef _GLOBALS_HRC
#include <globals.hrc>
#endif
@@ -478,7 +462,7 @@ static USHORT nTitleNo = 0;
if (rItem.bSend)
{
pSh->SttEndDoc(TRUE);
- aMgr.InsertFlyFrm(FLY_PAGE,
+ aMgr.InsertFlyFrm(FLY_AT_PAGE,
Point(rItem.lSendFromLeft + lLeft, rItem.lSendFromTop + lUpper),
Size (rItem.lAddrFromLeft - rItem.lSendFromLeft, 0));
@@ -494,7 +478,7 @@ static USHORT nTitleNo = 0;
// Empfaenger
pSh->SttEndDoc(TRUE);
- aMgr.InsertFlyFrm(FLY_PAGE,
+ aMgr.InsertFlyFrm(FLY_AT_PAGE,
Point(rItem.lAddrFromLeft + lLeft, rItem.lAddrFromTop + lUpper),
Size (nPageW - rItem.lAddrFromLeft - 566, 0));
pSh->EnterSelFrmMode();
diff --git a/sw/source/ui/app/applab.cxx b/sw/source/ui/app/applab.cxx
index d09e522599d7..b6df61c2b968 100644
--- a/sw/source/ui/app/applab.cxx
+++ b/sw/source/ui/app/applab.cxx
@@ -39,15 +39,9 @@
#include <hintids.hxx>
-#ifndef _APP_HXX //autogen
#include <vcl/svapp.hxx>
-#endif
-#ifndef _WRKWIN_HXX //autogen
#include <vcl/wrkwin.hxx>
-#endif
-#ifndef _MSGBOX_HXX //autogen
#include <vcl/msgbox.hxx>
-#endif
#include <sfx2/app.hxx>
#include <sfx2/dispatch.hxx>
#include <sfx2/printer.hxx>
@@ -71,21 +65,13 @@
#include <frmatr.hxx>
#include <paratr.hxx>
#include <swmodule.hxx>
-#ifndef _VIEW_HXX
#include <view.hxx>
-#endif
-#ifndef _DOCSH_HXX
#include <docsh.hxx>
-#endif
#include <fldbas.hxx>
#include <swundo.hxx>
#include <wrtsh.hxx>
-#ifndef _CMDID_H
#include <cmdid.h>
-#endif
-#ifndef _DBMGR_HXX
#include <dbmgr.hxx>
-#endif
#include <fmtcol.hxx>
#include <expfld.hxx>
#include <fldmgr.hxx>
@@ -126,7 +112,7 @@ const SwFrmFmt *lcl_InsertBCText( SwWrtShell& rSh, const SwLabItem& rItem,
sal_uInt16 nPhyPageNum, nVirtPageNum;
rSh.GetPageNum( nPhyPageNum, nVirtPageNum );
- aSet.Put(SwFmtAnchor(bPage ? FLY_IN_CNTNT : FLY_PAGE, nPhyPageNum));
+ aSet.Put(SwFmtAnchor(bPage ? FLY_AS_CHAR : FLY_AT_PAGE, nPhyPageNum));
if (!bPage)
{
aSet.Put(SwFmtHoriOrient(rItem.lLeft + nCol * rItem.lHDist,
@@ -166,7 +152,7 @@ const SwFrmFmt *lcl_InsertLabText( SwWrtShell& rSh, const SwLabItem& rItem,
sal_uInt16 nPhyPageNum, nVirtPageNum;
rSh.GetPageNum( nPhyPageNum, nVirtPageNum );
- aSet.Put(SwFmtAnchor(bPage ? FLY_IN_CNTNT : FLY_PAGE, nPhyPageNum));
+ aSet.Put(SwFmtAnchor(bPage ? FLY_AS_CHAR : FLY_AT_PAGE, nPhyPageNum));
if (!bPage)
{
aSet.Put(SwFmtHoriOrient(rItem.lLeft + nCol * rItem.lHDist,
diff --git a/sw/source/ui/dbui/mmlayoutpage.cxx b/sw/source/ui/dbui/mmlayoutpage.cxx
index ddb37e3c8eeb..450311349694 100644
--- a/sw/source/ui/dbui/mmlayoutpage.cxx
+++ b/sw/source/ui/dbui/mmlayoutpage.cxx
@@ -42,9 +42,7 @@
#include <unotools/tempfile.hxx>
#include <uitool.hxx>
#include <svx/dlgutil.hxx>
-#ifndef _VIEW_HXX
#include <view.hxx>
-#endif
#include <swundo.hxx>
#include <sfx2/dispatch.hxx>
#include <svtools/stritem.hxx>
@@ -56,9 +54,7 @@
#include <fldbas.hxx>
#include <poolfmt.hxx>
#include <unotxdoc.hxx>
-#ifndef _DOCSH_HXX
#include <docsh.hxx>
-#endif
#include <doc.hxx>
#include <wrtsh.hxx>
#include <fmtsrnd.hxx>
@@ -325,7 +321,7 @@ SwFrmFmt* SwMailMergeLayoutPage::InsertAddressFrame(
RES_FRM_SIZE, RES_FRM_SIZE,
RES_SURROUND, RES_SURROUND,
0 );
- aSet.Put(SwFmtAnchor(FLY_PAGE, 1));
+ aSet.Put(SwFmtAnchor(FLY_AT_PAGE, 1));
if(bAlignLeft)
aSet.Put(SwFmtHoriOrient( 0, text::HoriOrientation::NONE, text::RelOrientation::PAGE_PRINT_AREA ));
else
diff --git a/sw/source/ui/dialog/regionsw.cxx b/sw/source/ui/dialog/regionsw.cxx
index 47936697a20d..aaf95674cb10 100644
--- a/sw/source/ui/dialog/regionsw.cxx
+++ b/sw/source/ui/dialog/regionsw.cxx
@@ -36,37 +36,24 @@
#include <uitool.hxx>
#include <svtools/urihelper.hxx>
#include <svtools/PasswordHelper.hxx>
-#ifndef _MSGBOX_HXX //autogen
#include <vcl/msgbox.hxx>
-#endif
#include <svtools/stritem.hxx>
#include <svtools/eitem.hxx>
#include <sot/formats.hxx>
-#ifndef _PASSWD_HXX //autogen
#include <sfx2/passwd.hxx>
-#endif
#include <sfx2/docfilt.hxx>
#include <sfx2/request.hxx>
#include <sfx2/docfile.hxx>
#include <sfx2/linkmgr.hxx>
-#ifndef _SVX_SIZEITEM_HXX //autogen
-
#include <svx/sizeitem.hxx>
-#endif
#include <svx/htmlcfg.hxx>
#include <section.hxx>
#include <docary.hxx>
#include <regionsw.hxx>
-#ifndef _BASESH_HXX
#include <basesh.hxx>
-#endif
-#ifndef _WDOCSH_HXX
#include <wdocsh.hxx>
-#endif
-#ifndef _VIEW_HXX
#include <view.hxx>
-#endif
#include <swmodule.hxx>
#include <wrtsh.hxx>
#include <swundo.hxx> // fuer Undo-Ids
@@ -75,12 +62,8 @@
#include <swunodef.hxx>
#include <shellio.hxx>
-#ifndef _HELPID_H
#include <helpid.h>
-#endif
-#ifndef _CMDID_H
#include <cmdid.h>
-#endif
#ifndef _REGIONSW_HRC
#include <regionsw.hrc>
#endif
@@ -118,7 +101,7 @@ void SwBaseShell::InsertRegionDialog(SfxRequest& rReq)
if (!pSet || pSet->Count()==0)
{
SwRect aRect;
- rSh.CalcBoundRect(aRect, FLY_IN_CNTNT);
+ rSh.CalcBoundRect(aRect, FLY_AS_CHAR);
long nWidth = aRect.Width();
aSet.Put(SwFmtFrmSize(ATT_VAR_SIZE, nWidth));
@@ -154,7 +137,7 @@ void SwBaseShell::InsertRegionDialog(SfxRequest& rReq)
{
SwFmtCol aCol;
SwRect aRect;
- rSh.CalcBoundRect(aRect, FLY_IN_CNTNT);
+ rSh.CalcBoundRect(aRect, FLY_AS_CHAR);
long nWidth = aRect.Width();
USHORT nCol = ((SfxUInt16Item *)pItem)->GetValue();
@@ -232,7 +215,7 @@ IMPL_STATIC_LINK( SwWrtShell, InsertRegionDialog, SwSection*, pSect )
SID_ATTR_PAGE_SIZE, SID_ATTR_PAGE_SIZE,
0);
SwRect aRect;
- pThis->CalcBoundRect(aRect, FLY_IN_CNTNT);
+ pThis->CalcBoundRect(aRect, FLY_AS_CHAR);
long nWidth = aRect.Width();
aSet.Put(SwFmtFrmSize(ATT_VAR_SIZE, nWidth));
// Hoehe=Breite fuer konsistentere Vorschau (analog zu Bereich bearbeiten)
diff --git a/sw/source/ui/docvw/edtwin.cxx b/sw/source/ui/docvw/edtwin.cxx
index 7d8e38443ca0..cdaa09f0a549 100644
--- a/sw/source/ui/docvw/edtwin.cxx
+++ b/sw/source/ui/docvw/edtwin.cxx
@@ -50,16 +50,12 @@
#include <sot/storage.hxx>
#include <svtools/macitem.hxx>
#include <svtools/securityoptions.hxx>
-#ifndef __SBX_SBXVARIABLE_HXX //autogen
#include <basic/sbxvar.hxx>
-#endif
#include <svtools/ctloptions.hxx>
#include <basic/sbx.hxx>
#include <svtools/eitem.hxx>
#include <svtools/stritem.hxx>
-#ifndef _SFX_CLIENTSH_HXX
#include <sfx2/ipclient.hxx>
-#endif
#include <sfx2/viewfrm.hxx>
#include <sfx2/request.hxx>
#include <sfx2/bindings.hxx>
@@ -69,9 +65,6 @@
#include <svx/langitem.hxx>
#include <svx/htmlmode.hxx>
#include <svx/svdview.hxx>
-//#ifndef _SVDVMARK_HXX //autogen
-//#include <svx/svdvmark.hxx>
-//#endif
#include <svx/svdhdl.hxx>
#include <svx/svdoutl.hxx>
#include <svx/editeng.hxx>
@@ -128,12 +121,8 @@
#include <breakit.hxx>
#include <checkit.hxx>
-#ifndef _HELPID_H
#include <helpid.h>
-#endif
-#ifndef _CMDID_H
#include <cmdid.h>
-#endif
#ifndef _DOCVW_HRC
#include <docvw.hrc>
#endif
@@ -1019,7 +1008,7 @@ void SwEditWin::ChangeFly( BYTE nDir, BOOL bWeb )
default: ASSERT( TRUE, "ChangeFly: Unknown direction." );
}
BOOL bSet = FALSE;
- if( FLY_IN_CNTNT == eAnchorId && ( nDir % 2 ) )
+ if ((FLY_AS_CHAR == eAnchorId) && ( nDir % 2 ))
{
long aDiff = aTmp.Top() - aRefPoint.Y();
if( aDiff > 0 )
@@ -1064,7 +1053,8 @@ void SwEditWin::ChangeFly( BYTE nDir, BOOL bWeb )
aSet.Put( aVert );
bSet = TRUE;
}
- if( bWeb && FLY_AT_CNTNT == eAnchorId && ( nDir==MOVE_LEFT_SMALL || nDir==MOVE_RIGHT_BIG ) )
+ if (bWeb && (FLY_AT_PARA == eAnchorId)
+ && ( nDir==MOVE_LEFT_SMALL || nDir==MOVE_RIGHT_BIG ))
{
SwFmtHoriOrient aHori( (SwFmtHoriOrient&)aSet.Get(RES_HORI_ORIENT) );
sal_Int16 eNew;
@@ -1091,11 +1081,13 @@ void SwEditWin::ChangeFly( BYTE nDir, BOOL bWeb )
rSh.StartAllAction();
if( bSet )
rSh.SetFlyFrmAttr( aSet );
- BOOL bSetPos = FLY_IN_CNTNT != eAnchorId;
+ BOOL bSetPos = (FLY_AS_CHAR != eAnchorId);
if(bSetPos && bWeb)
{
- if(FLY_PAGE != eAnchorId)
+ if (FLY_AT_PAGE != eAnchorId)
+ {
bSetPos = FALSE;
+ }
else
{
bSetPos = (::GetHtmlMode(rView.GetDocShell()) & HTMLMODE_SOME_ABS_POS) ?
@@ -1185,7 +1177,8 @@ void SwEditWin::ChangeDrawing( BYTE nDir )
BOOL bDummy;
const bool bVertAnchor = rSh.IsFrmVertical( TRUE, bDummy );
const bool bHoriMove = !bVertAnchor == !( nDir % 2 );
- const bool bMoveAllowed = !bHoriMove || rSh.GetAnchorId() != FLY_IN_CNTNT;
+ const bool bMoveAllowed =
+ !bHoriMove || (rSh.GetAnchorId() != FLY_AS_CHAR);
if ( bMoveAllowed )
{
// <--
diff --git a/sw/source/ui/frmdlg/column.cxx b/sw/source/ui/frmdlg/column.cxx
index a9df9762ad92..af0298fe807e 100644
--- a/sw/source/ui/frmdlg/column.cxx
+++ b/sw/source/ui/frmdlg/column.cxx
@@ -125,7 +125,7 @@ SwColumnDlg::SwColumnDlg(Window* pParent, SwWrtShell& rSh) :
FreeResource();
SwRect aRect;
- rWrtShell.CalcBoundRect(aRect, FLY_IN_CNTNT);
+ rWrtShell.CalcBoundRect(aRect, FLY_AS_CHAR);
nSelectionWidth = aRect.Width();
diff --git a/sw/source/ui/frmdlg/frmmgr.cxx b/sw/source/ui/frmdlg/frmmgr.cxx
index bd1e98b37b9e..1d872a47e919 100644
--- a/sw/source/ui/frmdlg/frmmgr.cxx
+++ b/sw/source/ui/frmdlg/frmmgr.cxx
@@ -31,12 +31,9 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-
-
#include "cmdid.h"
#include "hintids.hxx"
-
#include <svtools/stritem.hxx>
#include <svx/protitem.hxx>
#include <svx/boxitem.hxx>
@@ -212,11 +209,11 @@ void SwFlyFrmAttrMgr::InsertFlyFrm(RndStdIds eAnchorType,
const Size &rSize,
BOOL bAbs )
{
- ASSERT( eAnchorType == FLY_PAGE ||
- eAnchorType == FLY_AT_CNTNT ||
- eAnchorType == FLY_AUTO_CNTNT ||
- eAnchorType == FLY_AT_FLY ||
- eAnchorType == FLY_IN_CNTNT, "Rahmentyp nicht erlaubt" );
+ ASSERT( eAnchorType == FLY_AT_PAGE ||
+ eAnchorType == FLY_AT_PARA ||
+ eAnchorType == FLY_AT_CHAR ||
+ eAnchorType == FLY_AT_FLY ||
+ eAnchorType == FLY_AS_CHAR, "invalid frame type" );
if ( bAbs )
SetAbsPos( rPos );
@@ -238,8 +235,8 @@ void SwFlyFrmAttrMgr::SetAnchor( RndStdIds eId )
pOwnSh->GetPageNum( nPhyPageNum, nVirtPageNum );
aSet.Put( SwFmtAnchor( eId, nPhyPageNum ) );
- if( FLY_PAGE == eId || FLY_AT_CNTNT == eId || FLY_AUTO_CNTNT == eId
- || FLY_AT_FLY == eId )
+ if ((FLY_AT_PAGE == eId) || (FLY_AT_PARA == eId) || (FLY_AT_CHAR == eId)
+ || (FLY_AT_FLY == eId))
{
SwFmtVertOrient aVertOrient( GetVertOrient() );
SwFmtHoriOrient aHoriOrient( GetHoriOrient() );
@@ -319,7 +316,7 @@ void SwFlyFrmAttrMgr::ValidateMetrics( SvxSwFrameValidation& rVal,
rVal.nWidth = rVal.nHeight;
rVal.nHeight = nTmp;
}
- if ( eAnchorType == FLY_PAGE || eAnchorType == FLY_AT_FLY )
+ if ((eAnchorType == FLY_AT_PAGE) || (eAnchorType == FLY_AT_FLY))
{
// MinimalPosition
rVal.nMinHPos = aBoundRect.Left();
@@ -369,8 +366,8 @@ void SwFlyFrmAttrMgr::ValidateMetrics( SvxSwFrameValidation& rVal,
}
// OD 12.11.2003 #i22341# - handle to character anchored objects vertical
// aligned at character or top of line in a special case
- else if ( eAnchorType == FLY_AT_CNTNT ||
- ( eAnchorType == FLY_AUTO_CNTNT &&
+ else if ((eAnchorType == FLY_AT_PARA) ||
+ ((eAnchorType == FLY_AT_CHAR) &&
!(rVal.nVRelOrient == text::RelOrientation::CHAR) &&
!(rVal.nVRelOrient == text::RelOrientation::TEXT_LINE) ) )
{
@@ -437,7 +434,7 @@ void SwFlyFrmAttrMgr::ValidateMetrics( SvxSwFrameValidation& rVal,
// vertical aligned at character or top of line.
// Note: (1) positive vertical values are positions above the top of line
// (2) negative vertical values are positions below the top of line
- else if ( eAnchorType == FLY_AUTO_CNTNT &&
+ else if ( (eAnchorType == FLY_AT_CHAR) &&
( rVal.nVRelOrient == text::RelOrientation::CHAR ||
rVal.nVRelOrient == text::RelOrientation::TEXT_LINE ) )
{
@@ -484,7 +481,7 @@ void SwFlyFrmAttrMgr::ValidateMetrics( SvxSwFrameValidation& rVal,
rVal.nMaxHeight = aBoundRect.Height();
}
}
- else if ( eAnchorType == FLY_IN_CNTNT )
+ else if ( eAnchorType == FLY_AS_CHAR )
{
rVal.nMinHPos = 0;
rVal.nMaxHPos = 0;
diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx
index dc9fe2d1bf2e..c95f97e5ae59 100644
--- a/sw/source/ui/frmdlg/frmpage.cxx
+++ b/sw/source/ui/frmdlg/frmpage.cxx
@@ -37,12 +37,8 @@
#include <com/sun/star/embed/Aspects.hpp>
#include <com/sun/star/embed/EmbedMisc.hpp>
-#ifndef _CMDID_H
#include <cmdid.h>
-#endif
-#ifndef _HELPID_H
#include <helpid.h>
-#endif
#include <hintids.hxx>
#include <vcl/msgbox.hxx>
#include <vcl/mnemonic.hxx>
@@ -68,9 +64,7 @@
#include <wrtsh.hxx>
#include <swmodule.hxx>
#include <uitool.hxx>
-#ifndef _DOCSH_HXX
#include <docsh.hxx>
-#endif
#include <viewopt.hxx>
#include <frmatr.hxx>
#include <frmdlg.hxx>
@@ -881,10 +875,10 @@ void SwFrmPage::Reset( const SfxItemSet &rSet )
// Allgemeiner Initialisierungteil
switch(rAnchor.GetAnchorId())
{
- case FLY_PAGE: aAnchorAtPageRB.Check(); break;
- case FLY_AT_CNTNT: aAnchorAtParaRB.Check(); break;
- case FLY_AUTO_CNTNT: aAnchorAtCharRB.Check(); break;
- case FLY_IN_CNTNT: aAnchorAsCharRB.Check(); break;
+ case FLY_AT_PAGE: aAnchorAtPageRB.Check(); break;
+ case FLY_AT_PARA: aAnchorAtParaRB.Check(); break;
+ case FLY_AT_CHAR: aAnchorAtCharRB.Check(); break;
+ case FLY_AS_CHAR: aAnchorAsCharRB.Check(); break;
case FLY_AT_FLY: aAnchorAtFrameRB.Check();break;
default:; //prevent warning
}
@@ -911,7 +905,7 @@ void SwFrmPage::Reset( const SfxItemSet &rSet )
}
if( 0 == (nHtmlMode & HTMLMODE_SOME_ABS_POS))
{
- if(GetAnchor() == FLY_PAGE)
+ if (GetAnchor() == FLY_AT_PAGE)
{
aAnchorAtParaRB.Check();
}
@@ -1048,8 +1042,10 @@ BOOL SwFrmPage::FillItemSet(SfxItemSet &rSet)
// Vertikale Position
// fuer zeichengebundene Rahmen Offset umrechenen
SwTwips nY = static_cast< SwTwips >(aAtVertPosED.Denormalize(aAtVertPosED.GetValue(FUNIT_TWIP)));
- if (eAnchorId == FLY_IN_CNTNT)
+ if (eAnchorId == FLY_AS_CHAR)
+ {
nY *= -1;
+ }
aVertOrient.SetPos( nY );
}
pOldItem = GetOldItem(rSet, FN_VERT_ORIENT);
@@ -1188,7 +1184,7 @@ void SwFrmPage::InitPos(RndStdIds eId,
}
BOOL bEnable = TRUE;
- if ( eId == FLY_PAGE )
+ if ( eId == FLY_AT_PAGE )
{
pVMap = bHtmlMode ? aVPageHtmlMap : aVPageMap;
pHMap = bHtmlMode ? aHPageHtmlMap : aHPageMap;
@@ -1200,7 +1196,7 @@ void SwFrmPage::InitPos(RndStdIds eId,
pVMap = bHtmlMode ? aVFlyHtmlMap : aVFrameMap;
pHMap = bHtmlMode ? aHFlyHtmlMap : aHFrameMap;
}
- else if ( eId == FLY_AT_CNTNT )
+ else if ( eId == FLY_AT_PARA )
{
if(bHtmlMode)
{
@@ -1213,7 +1209,7 @@ void SwFrmPage::InitPos(RndStdIds eId,
pHMap = aHParaMap;
}
}
- else if ( eId == FLY_AUTO_CNTNT )
+ else if ( eId == FLY_AT_CHAR )
{
if(bHtmlMode)
{
@@ -1226,7 +1222,7 @@ void SwFrmPage::InitPos(RndStdIds eId,
pHMap = aHCharMap;
}
}
- else if ( eId == FLY_IN_CNTNT )
+ else if ( eId == FLY_AS_CHAR )
{
pVMap = bHtmlMode ? aVAsCharHtmlMap : aVAsCharMap;
pHMap = 0;
@@ -1257,7 +1253,7 @@ void SwFrmPage::InitPos(RndStdIds eId,
FillRelLB(pVMap, nMapPos, nV, nVRel, aVertRelationLB, aVertRelationFT);
// Edits init
- bEnable = nH == text::HoriOrientation::NONE && eId != FLY_IN_CNTNT;//#61359# warum nicht in Formaten&& !bFormat;
+ bEnable = nH == text::HoriOrientation::NONE && eId != FLY_AS_CHAR;
if (!bEnable)
{
aAtHorzPosED.SetValue( 0, FUNIT_TWIP );
@@ -1281,7 +1277,7 @@ void SwFrmPage::InitPos(RndStdIds eId,
}
else
{
- if ( eId == FLY_IN_CNTNT )
+ if ( eId == FLY_AS_CHAR )
{
if ( nY == LONG_MAX )
nY = 0;
@@ -1608,15 +1604,23 @@ USHORT SwFrmPage::GetMapPos( const FrmMap *pMap, ListBox &rAlignLB )
RndStdIds SwFrmPage::GetAnchor()
{
- RndStdIds nRet = FLY_PAGE;
+ RndStdIds nRet = FLY_AT_PAGE;
if(aAnchorAtParaRB.IsChecked())
- nRet = FLY_AT_CNTNT;
+ {
+ nRet = FLY_AT_PARA;
+ }
else if(aAnchorAtCharRB.IsChecked())
- nRet = FLY_AUTO_CNTNT;
+ {
+ nRet = FLY_AT_CHAR;
+ }
else if(aAnchorAsCharRB.IsChecked())
- nRet = FLY_IN_CNTNT;
+ {
+ nRet = FLY_AS_CHAR;
+ }
else if(aAnchorAtFrameRB.IsChecked())
+ {
nRet = FLY_AT_FLY;
+ }
return nRet;
}
@@ -1818,8 +1822,10 @@ IMPL_LINK( SwFrmPage, RangeModifyHdl, Edit *, EMPTYARG )
if ( aVal.nHPos != nAtHorzPosVal )
aAtHorzPosED.SetValue(aAtHorzPosED.Normalize(aVal.nHPos), FUNIT_TWIP);
- SwTwips nUpperOffset = aVal.nAnchorType == FLY_IN_CNTNT ? nUpperBorder : 0;
- SwTwips nLowerOffset = aVal.nAnchorType == FLY_IN_CNTNT ? nLowerBorder : 0;
+ const SwTwips nUpperOffset = (aVal.nAnchorType == FLY_AS_CHAR)
+ ? nUpperBorder : 0;
+ const SwTwips nLowerOffset = (aVal.nAnchorType == FLY_AS_CHAR)
+ ? nLowerBorder : 0;
aAtVertPosED.SetMin(aAtVertPosED.Normalize(aVal.nMinVPos + nLowerOffset + nUpperOffset), FUNIT_TWIP);
aAtVertPosED.SetMax(aAtVertPosED.Normalize(aVal.nMaxVPos), FUNIT_TWIP);
@@ -1905,7 +1911,7 @@ IMPL_LINK( SwFrmPage, PosHdl, ListBox *, pLB )
// Sonderbehandlung fuer HTML-Mode mit horz-vert-Abhaengigkeiten
if(bHtmlMode && nHtmlMode&HTMLMODE_SOME_ABS_POS &&
- FLY_AUTO_CNTNT == (RndStdIds)GetAnchor())
+ (FLY_AT_CHAR == GetAnchor()))
{
BOOL bSet = FALSE;
if(bHori)
@@ -1977,7 +1983,7 @@ IMPL_LINK( SwFrmPage, RelHdl, ListBox *, pLB )
else
bAtVertPosModified = TRUE;
- if(bHtmlMode && FLY_AUTO_CNTNT == (RndStdIds)GetAnchor()) // wieder Sonderbehandlung
+ if (bHtmlMode && (FLY_AT_CHAR == GetAnchor()))
{
if(bHori)
{
@@ -2219,7 +2225,7 @@ void SwFrmPage::Init(const SfxItemSet& rSet, BOOL bReset)
nOldV = rVert.GetVertOrient(),
nOldVRel = rVert.GetRelationOrient();
- if (eAnchorId == FLY_PAGE)
+ if (eAnchorId == FLY_AT_PAGE)
{
if (nOldHRel == text::RelOrientation::FRAME)
nOldHRel = text::RelOrientation::PAGE_FRAME;
diff --git a/sw/source/ui/frmdlg/wrap.cxx b/sw/source/ui/frmdlg/wrap.cxx
index b3828797fc07..4479b7da8b1e 100644
--- a/sw/source/ui/frmdlg/wrap.cxx
+++ b/sw/source/ui/frmdlg/wrap.cxx
@@ -36,7 +36,6 @@
#endif
-
#include "hintids.hxx"
#include <vcl/graph.hxx>
#include <svx/htmlmode.hxx>
@@ -141,7 +140,7 @@ SwWrapTabPage::SwWrapTabPage(Window *pParent, const SfxItemSet &rSet) :
aWrapIL (SW_RES(IL_WRAP)),
aWrapILH (SW_RES(ILH_WRAP)),
- nAnchorId(FLY_AT_CNTNT),
+ nAnchorId(FLY_AT_PARA),
nHtmlMode(0),
pWrtSh(0),
@@ -254,10 +253,15 @@ void SwWrapTabPage::Reset(const SfxItemSet &rSet)
const SwFmtAnchor &rAnch = (const SwFmtAnchor&)rSet.Get(RES_ANCHOR);
nAnchorId = rAnch.GetAnchorId();
- if ( (nAnchorId == FLY_AT_CNTNT || nAnchorId == FLY_AUTO_CNTNT) && nSur != SURROUND_NONE )
+ if (((nAnchorId == FLY_AT_PARA) || (nAnchorId == FLY_AT_CHAR))
+ && (nSur != SURROUND_NONE))
+ {
aWrapAnchorOnlyCB.Check( rSurround.IsAnchorOnly() );
+ }
else
+ {
aWrapAnchorOnlyCB.Enable( FALSE );
+ }
BOOL bContour = rSurround.IsContour();
aWrapOutlineCB.Check( bContour );
@@ -452,7 +456,7 @@ void SwWrapTabPage::ActivatePage(const SfxItemSet& rSet)
// Anchor
const SwFmtAnchor &rAnch = (const SwFmtAnchor&)rSet.Get(RES_ANCHOR);
nAnchorId = rAnch.GetAnchorId();
- BOOL bEnable = nAnchorId != FLY_IN_CNTNT;
+ BOOL bEnable = (nAnchorId != FLY_AS_CHAR);
if (!bDrawMode)
{
@@ -521,7 +525,7 @@ void SwWrapTabPage::ActivatePage(const SfxItemSet& rSet)
}
else
{
- if (aVal.nAnchorType == FLY_IN_CNTNT)
+ if (aVal.nAnchorType == FLY_AS_CHAR)
{
nLeft = nRight;
@@ -566,7 +570,8 @@ void SwWrapTabPage::ActivatePage(const SfxItemSet& rSet)
sal_Int16 eHOrient = rHori.GetHoriOrient();
sal_Int16 eHRelOrient = rHori.GetRelationOrient();
aWrapOutlineCB.Hide();
- BOOL bAllHtmlModes = (nAnchorId == FLY_AT_CNTNT || nAnchorId == FLY_AUTO_CNTNT) &&
+ const bool bAllHtmlModes =
+ ((nAnchorId == FLY_AT_PARA) || (nAnchorId == FLY_AT_CHAR)) &&
(eHOrient == text::HoriOrientation::RIGHT || eHOrient == text::HoriOrientation::LEFT);
aWrapAnchorOnlyCB.Enable( bAllHtmlModes && nSur != SURROUND_NONE );
aWrapOutsideCB.Hide();
@@ -574,17 +579,26 @@ void SwWrapTabPage::ActivatePage(const SfxItemSet& rSet)
aWrapTransparentCB.Enable( FALSE );
- aNoWrapRB.Enable( FLY_AT_CNTNT == nAnchorId );
+ aNoWrapRB.Enable( FLY_AT_PARA == nAnchorId );
aWrapParallelRB.Enable( FALSE );
- aWrapLeftRB .Enable( FLY_AT_CNTNT == nAnchorId ||
- (FLY_AUTO_CNTNT == nAnchorId && eHOrient == text::HoriOrientation::RIGHT && eHRelOrient == text::RelOrientation::PRINT_AREA));
- aWrapRightRB .Enable( FLY_AT_CNTNT == nAnchorId ||
- ( FLY_AUTO_CNTNT == nAnchorId && eHOrient == text::HoriOrientation::LEFT && eHRelOrient == text::RelOrientation::PRINT_AREA));
-
- aWrapThroughRB.Enable( (FLY_PAGE == nAnchorId ||
- (FLY_AUTO_CNTNT == nAnchorId && eHRelOrient != text::RelOrientation::PRINT_AREA) || FLY_AT_CNTNT == nAnchorId )
- && bSomeAbsPos &&
- eHOrient != text::HoriOrientation::RIGHT);
+ aWrapLeftRB .Enable
+ ( (FLY_AT_PARA == nAnchorId)
+ || ( (FLY_AT_CHAR == nAnchorId)
+ && (eHOrient == text::HoriOrientation::RIGHT)
+ && (eHRelOrient == text::RelOrientation::PRINT_AREA)));
+ aWrapRightRB .Enable
+ ( (FLY_AT_PARA == nAnchorId)
+ || ( (FLY_AT_CHAR == nAnchorId)
+ && (eHOrient == text::HoriOrientation::LEFT)
+ && (eHRelOrient == text::RelOrientation::PRINT_AREA)));
+
+ aWrapThroughRB.Enable
+ ( ( (FLY_AT_PAGE == nAnchorId)
+ || ( (FLY_AT_CHAR == nAnchorId)
+ && (eHRelOrient != text::RelOrientation::PRINT_AREA))
+ || (FLY_AT_PARA == nAnchorId))
+ && bSomeAbsPos
+ && (eHOrient != text::HoriOrientation::RIGHT));
if(aNoWrapRB.IsChecked() && !aNoWrapRB.IsEnabled())
{
if(aWrapThroughRB.IsEnabled())
@@ -624,7 +638,8 @@ void SwWrapTabPage::ActivatePage(const SfxItemSet& rSet)
aIdealWrapRB.Enable( bEnable );
aWrapThroughRB.Enable( bEnable );
aWrapParallelRB.Enable( bEnable );
- aWrapAnchorOnlyCB.Enable( (nAnchorId == FLY_AT_CNTNT || nAnchorId == FLY_AUTO_CNTNT)
+ aWrapAnchorOnlyCB.Enable(
+ ((nAnchorId == FLY_AT_PARA) || (nAnchorId == FLY_AT_CHAR))
&& nSur != SURROUND_NONE );
}
ContourHdl(0);
@@ -693,10 +708,11 @@ IMPL_LINK( SwWrapTabPage, WrapTypeHdl, ImageRadioButton *, pBtn )
{
BOOL bWrapThrough = (pBtn == &aWrapThroughRB);
aWrapTransparentCB.Enable( bWrapThrough && !bHtmlMode );
- bWrapThrough |= ( nAnchorId == FLY_IN_CNTNT );
+ bWrapThrough |= ( nAnchorId == FLY_AS_CHAR );
aWrapOutlineCB.Enable( !bWrapThrough && pBtn != &aNoWrapRB);
aWrapOutsideCB.Enable( !bWrapThrough && aWrapOutlineCB.IsChecked() );
- aWrapAnchorOnlyCB.Enable( (nAnchorId == FLY_AT_CNTNT || nAnchorId == FLY_AUTO_CNTNT) &&
+ aWrapAnchorOnlyCB.Enable(
+ ((nAnchorId == FLY_AT_PARA) || (nAnchorId == FLY_AT_CHAR)) &&
(pBtn != &aNoWrapRB) );
ContourHdl(0);
diff --git a/sw/source/ui/ribbar/conrect.cxx b/sw/source/ui/ribbar/conrect.cxx
index e5540dab1c11..51cdc5a72a1f 100644
--- a/sw/source/ui/ribbar/conrect.cxx
+++ b/sw/source/ui/ribbar/conrect.cxx
@@ -43,21 +43,14 @@
#include <svx/svdview.hxx>
#include <svx/svdocapt.hxx>
#include <svx/outlobj.hxx>
-#ifndef _CMDID_H
#include <cmdid.h>
-#endif
-#ifndef _VIEW_HXX
#include <view.hxx>
-#endif
#include <edtwin.hxx>
#include <wrtsh.hxx>
#include <viewopt.hxx>
-#ifndef _DRAWBASE_HXX
#include <drawbase.hxx>
-#endif
-#ifndef _CONRECT_HXX
#include <conrect.hxx>
-#endif
+
/*************************************************************************
|*
@@ -119,7 +112,7 @@ BOOL ConstRectangle::MouseButtonUp(const MouseEvent& rMEvt)
case OBJ_TEXT:
if( bMarquee )
{
- m_pSh->ChgAnchor(FLY_IN_CNTNT);
+ m_pSh->ChgAnchor(FLY_AS_CHAR);
if( pObj )
{
diff --git a/sw/source/ui/ribbar/drawbase.cxx b/sw/source/ui/ribbar/drawbase.cxx
index f6a48d36cd68..aa33c637f44c 100644
--- a/sw/source/ui/ribbar/drawbase.cxx
+++ b/sw/source/ui/ribbar/drawbase.cxx
@@ -344,7 +344,8 @@ BOOL SwDrawBase::MouseButtonUp(const MouseEvent& rMEvt)
if ( xRecorder.is() )
{
SfxRequest aReq(m_pSh->GetView().GetViewFrame(),FN_INSERT_FRAME);
- aReq.AppendItem(SfxUInt16Item( FN_INSERT_FRAME, (USHORT)FLY_AT_CNTNT ));
+ aReq.AppendItem(SfxUInt16Item( FN_INSERT_FRAME,
+ static_cast<USHORT>(FLY_AT_PARA) ));
aReq.AppendItem(SfxPointItem( FN_PARAM_1, m_pSh->GetAnchorObjDiff()));
aReq.AppendItem(SvxSizeItem( FN_PARAM_2, m_pSh->GetObjSize()));
aReq.Done();
diff --git a/sw/source/ui/shells/basesh.cxx b/sw/source/ui/shells/basesh.cxx
index 6bb599e44867..93b74d40040f 100644
--- a/sw/source/ui/shells/basesh.cxx
+++ b/sw/source/ui/shells/basesh.cxx
@@ -100,9 +100,7 @@
#include <tblafmt.hxx>
#include <caption.hxx>
#include <swwait.hxx>
-#ifndef _CMDID_H
#include <cmdid.h>
-#endif
#ifndef _GLOBALS_HRC
#include <globals.hrc>
#endif
@@ -1063,14 +1061,14 @@ void SwBaseShell::Execute(SfxRequest &rReq)
case FN_TOOL_ANKER_FRAME:
{
RndStdIds eSet = nSlot == FN_TOOL_ANKER_PAGE
- ? FLY_PAGE
+ ? FLY_AT_PAGE
: nSlot == FN_TOOL_ANKER_PARAGRAPH
- ? FLY_AT_CNTNT
+ ? FLY_AT_PARA
: nSlot == FN_TOOL_ANKER_FRAME
? FLY_AT_FLY
: nSlot == FN_TOOL_ANKER_CHAR
- ? FLY_IN_CNTNT
- : FLY_AUTO_CNTNT;
+ ? FLY_AS_CHAR
+ : FLY_AT_CHAR;
rSh.StartUndo();
if( rSh.IsObjSelected() )
rSh.ChgAnchor( eSet );
@@ -1101,7 +1099,7 @@ void SwBaseShell::Execute(SfxRequest &rReq)
switch( eSet )
{
case FLY_AT_FLY:
- case FLY_PAGE:
+ case FLY_AT_PAGE:
//Durchlauf, links oder von links, oben, von oben
if(eSurround != SURROUND_THROUGHT)
@@ -1114,7 +1112,7 @@ void SwBaseShell::Execute(SfxRequest &rReq)
aSet.Put(SwFmtHoriOrient(0, text::HoriOrientation::LEFT));
break;
- case FLY_AT_CNTNT:
+ case FLY_AT_PARA:
//links, von links, rechts, oben, kein Uml, li+re Umlauf,
if(eSurround != SURROUND_LEFT || eSurround != SURROUND_RIGHT)
aSet.Put(SwFmtSurround(SURROUND_LEFT));
@@ -1126,7 +1124,7 @@ void SwBaseShell::Execute(SfxRequest &rReq)
aSet.Put(SwFmtHoriOrient(0, text::HoriOrientation::LEFT));
break;
- case FLY_AUTO_CNTNT:
+ case FLY_AT_CHAR:
//links, von links, rechts, oben, Durchlauf
if(eSurround != SURROUND_THROUGHT)
aSet.Put(SwFmtSurround(SURROUND_THROUGHT));
@@ -1624,12 +1622,17 @@ void SwBaseShell::GetState( SfxItemSet &rSet )
else
rSh.GetFlyFrmAttr(aSet);
RndStdIds eSet = ((SwFmtAnchor&)aSet.Get(RES_ANCHOR)).GetAnchorId();
- BOOL bSet;
- bSet = (nWhich == FN_TOOL_ANKER_PAGE && eSet == FLY_PAGE) ||
- (nWhich == FN_TOOL_ANKER_PARAGRAPH && eSet == FLY_AT_CNTNT) ||
- (nWhich == FN_TOOL_ANKER_FRAME && eSet == FLY_AT_FLY) ||
- (nWhich == FN_TOOL_ANKER_AT_CHAR && eSet == FLY_AUTO_CNTNT) ||
- (nWhich == FN_TOOL_ANKER_CHAR && eSet == FLY_IN_CNTNT);
+ const BOOL bSet =
+ ((nWhich == FN_TOOL_ANKER_PAGE) &&
+ (eSet == FLY_AT_PAGE))
+ || ((nWhich == FN_TOOL_ANKER_PARAGRAPH) &&
+ (eSet == FLY_AT_PARA))
+ || ((nWhich == FN_TOOL_ANKER_FRAME) &&
+ (eSet == FLY_AT_FLY))
+ || ((nWhich == FN_TOOL_ANKER_AT_CHAR) &&
+ (eSet == FLY_AT_CHAR))
+ || ((nWhich == FN_TOOL_ANKER_CHAR) &&
+ (eSet == FLY_AS_CHAR));
if(nWhich != FN_TOOL_ANKER)
{
USHORT nHtmlMode = ::GetHtmlMode(GetView().GetDocShell());
@@ -1646,16 +1649,16 @@ void SwBaseShell::GetState( SfxItemSet &rSet )
switch (eSet)
{
- case FLY_PAGE:
+ case FLY_AT_PAGE:
nSlotId = FN_TOOL_ANKER_PAGE;
break;
- case FLY_AT_CNTNT:
+ case FLY_AT_PARA:
nSlotId = FN_TOOL_ANKER_PARAGRAPH;
break;
- case FLY_IN_CNTNT:
+ case FLY_AS_CHAR:
nSlotId = FN_TOOL_ANKER_CHAR;
break;
- case FLY_AUTO_CNTNT:
+ case FLY_AT_CHAR:
nSlotId = FN_TOOL_ANKER_AT_CHAR;
break;
case FLY_AT_FLY:
@@ -1705,15 +1708,18 @@ void SwBaseShell::GetState( SfxItemSet &rSet )
SwSurround nSurround = rWrap.GetSurround();
BOOL bSet = FALSE;
- BOOL bDisable = nAnchorType == - 1 || nAnchorType == FLY_IN_CNTNT;
- BOOL bHtmlMode = 0 != ::GetHtmlMode(GetView().GetDocShell());
+ bool bDisable =
+ (nAnchorType == - 1) || (nAnchorType == FLY_AS_CHAR);
+ const bool bHtmlMode =
+ 0 != ::GetHtmlMode(GetView().GetDocShell());
switch( nWhich )
{
case FN_FRAME_NOWRAP:
bDisable |=
- ( nAnchorType != FLY_AT_CNTNT &&
- nAnchorType != FLY_AUTO_CNTNT && nAnchorType != FLY_PAGE);
+ ( (nAnchorType != FLY_AT_PARA)
+ && (nAnchorType != FLY_AT_CHAR)
+ && (nAnchorType != FLY_AT_PAGE));
bSet = nSurround == SURROUND_NONE;
break;
case FN_FRAME_WRAP:
@@ -1726,7 +1732,9 @@ void SwBaseShell::GetState( SfxItemSet &rSet )
break;
case FN_FRAME_WRAPTHRU:
bDisable |= (bHtmlMode ||
- (nAnchorType != FLY_AT_CNTNT&& nAnchorType != FLY_AUTO_CNTNT && nAnchorType != FLY_PAGE));
+ ( (nAnchorType != FLY_AT_PARA)
+ && (nAnchorType != FLY_AT_CHAR)
+ && (nAnchorType != FLY_AT_PAGE)));
if(bObj)
bSet = nSurround == SURROUND_THROUGHT && rSh.GetLayerId();
else
@@ -1766,7 +1774,7 @@ void SwBaseShell::GetState( SfxItemSet &rSet )
break;
case FN_WRAP_ANCHOR_ONLY:
bDisable |= (bHtmlMode ||
- (nAnchorType != FLY_AT_CNTNT));
+ (nAnchorType != FLY_AT_PARA));
bSet = rWrap.IsAnchorOnly();
break;
case FN_FRAME_WRAP_LEFT:
diff --git a/sw/source/ui/shells/drwbassh.cxx b/sw/source/ui/shells/drwbassh.cxx
index 339c332c9135..2de9201bffdd 100644
--- a/sw/source/ui/shells/drwbassh.cxx
+++ b/sw/source/ui/shells/drwbassh.cxx
@@ -49,9 +49,7 @@
#include <svx/htmlmode.hxx>
#include <uitool.hxx>
#include <fmtornt.hxx>
-#ifndef _CMDID_H
#include <cmdid.h>
-#endif
#include <swmodule.hxx>
#include <wrtsh.hxx>
#include <wview.hxx>
@@ -479,7 +477,7 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq)
{ // Objekte nicht aneinander ausrichten
USHORT nAnchor = pSh->GetAnchorId();
- if (nAnchor == FLY_IN_CNTNT)
+ if (nAnchor == FLY_AS_CHAR)
{
sal_Int16 nVertOrient = -1;
@@ -509,7 +507,7 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq)
}
break;
}
- if (nAnchor == FLY_AT_CNTNT)
+ if (nAnchor == FLY_AT_PARA)
break; // Absatzverankerte Rahmen nicht ausrichten
}
@@ -855,7 +853,7 @@ IMPL_LINK(SwDrawBaseShell, ValidatePosition, SvxSwFrameValidation*, pValidation
pValidation->nWidth = pValidation->nHeight;
pValidation->nHeight = nTmp;
}
- if ( eAnchorType == FLY_PAGE || eAnchorType == FLY_AT_FLY )
+ if ((eAnchorType == FLY_AT_PAGE) || (eAnchorType == FLY_AT_FLY))
{
// MinimalPosition
pValidation->nMinHPos = aBoundRect.Left();
@@ -903,7 +901,7 @@ IMPL_LINK(SwDrawBaseShell, ValidatePosition, SvxSwFrameValidation*, pValidation
pValidation->nMaxVPos = aBoundRect.Bottom() - pValidation->nHeight;
pValidation->nMaxWidth = aBoundRect.Right() - nH;
}
- else if ( eAnchorType == FLY_AT_CNTNT || eAnchorType == FLY_AUTO_CNTNT )
+ else if ((eAnchorType == FLY_AT_PARA) || (eAnchorType == FLY_AT_CHAR))
{
if (pValidation->nHPos + pValidation->nWidth > aBoundRect.Right())
{
@@ -964,7 +962,7 @@ IMPL_LINK(SwDrawBaseShell, ValidatePosition, SvxSwFrameValidation*, pValidation
pValidation->nMaxHeight = pValidation->nMaxVPos + pValidation->nHeight - nV;
pValidation->nMaxWidth = pValidation->nMaxHPos + pValidation->nWidth - nH;
}
- else if ( eAnchorType == FLY_IN_CNTNT )
+ else if (eAnchorType == FLY_AS_CHAR)
{
pValidation->nMinHPos = 0;
pValidation->nMaxHPos = 0;
diff --git a/sw/source/ui/shells/textdrw.cxx b/sw/source/ui/shells/textdrw.cxx
index 1d10c885bc17..77a88a5a33ea 100644
--- a/sw/source/ui/shells/textdrw.cxx
+++ b/sw/source/ui/shells/textdrw.cxx
@@ -39,23 +39,17 @@
#include <com/sun/star/form/FormButtonType.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
-#ifndef _VIEW_HXX
#include <view.hxx>
-#endif
#include <wrtsh.hxx>
#include <edtwin.hxx>
#include <swundo.hxx>
-#ifndef _BASESH_HXX
#include <basesh.hxx>
-#endif
#ifndef _POOLFMT_HRC
#include <poolfmt.hrc>
#endif
-#ifndef _DOCSH_HXX
#include <docsh.hxx>
-#endif
#include <sfx2/docfile.hxx>
#include <svtools/urihelper.hxx>
#include <avmedia/mediawindow.hxx>
diff --git a/sw/source/ui/shells/textidx.cxx b/sw/source/ui/shells/textidx.cxx
index 3eb67f725acd..8ad65538640f 100644
--- a/sw/source/ui/shells/textidx.cxx
+++ b/sw/source/ui/shells/textidx.cxx
@@ -32,9 +32,7 @@
#include "precompiled_sw.hxx"
#include <hintids.hxx>
-#ifndef _MSGBOX_HXX //autogen
#include <vcl/msgbox.hxx>
-#endif
#include <sfx2/request.hxx>
#include <sfx2/viewfrm.hxx>
#include <svtools/stritem.hxx>
@@ -55,6 +53,8 @@
#include "swabstdlg.hxx"
#include <index.hrc>
#include <globals.hrc>
+
+
// STATIC DATA -----------------------------------------------------------
void SwTextShell::ExecIdx(SfxRequest &rReq)
@@ -136,7 +136,7 @@ void SwTextShell::ExecIdx(SfxRequest &rReq)
0 );
SwWrtShell& rSh = GetShell();
SwRect aRect;
- rSh.CalcBoundRect(aRect, FLY_IN_CNTNT);
+ rSh.CalcBoundRect(aRect, FLY_AS_CHAR);
long nWidth = aRect.Width();
aSet.Put(SwFmtFrmSize(ATT_VAR_SIZE, nWidth));
diff --git a/sw/source/ui/shells/textsh.cxx b/sw/source/ui/shells/textsh.cxx
index 7e38c1297d0b..6dffd49dd8c3 100644
--- a/sw/source/ui/shells/textsh.cxx
+++ b/sw/source/ui/shells/textsh.cxx
@@ -39,9 +39,7 @@
#include <sfx2/objface.hxx>
#include <sfx2/lnkbase.hxx>
-#ifndef __RSC //autogen
#include <tools/errinf.hxx>
-#endif
#include <svx/svdview.hxx>
#include <svtools/ptitem.hxx>
#include <svtools/stritem.hxx>
@@ -82,9 +80,7 @@
#include <docsh.hxx>
#include <doc.hxx>
#include <uitool.hxx>
-#ifndef _CMDID_H
#include <cmdid.h>
-#endif
#ifndef _GLOBALS_HRC
#include <globals.hrc>
#endif
@@ -112,9 +108,7 @@
#ifndef _POPUP_HRC
#include <popup.hrc>
#endif
-#ifndef _SWERROR_H
#include <swerror.h>
-#endif
#include <SwAppletImpl.hxx>
#include <unochart.hxx>
@@ -566,7 +560,7 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
aCol.Init( nCols, aCol.GetGutterWidth(), aCol.GetWishWidth() );
aMgr.SetCol( aCol );
}
- aMgr.InsertFlyFrm(FLY_AT_CNTNT, aStartPos, aSize);
+ aMgr.InsertFlyFrm(FLY_AT_PARA, aStartPos, aSize);
GetShell().EndAllAction();
GetShell().UnlockPaint();
}
@@ -600,7 +594,7 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
Size aSize(aMgr.GetSize());
aSize.Width() = GetShell().GetAnyCurRect(RECT_PAGE_PRT).Width();
Point aPos = aMgr.GetPos();
- RndStdIds eAnchor = FLY_AT_CNTNT;
+ RndStdIds eAnchor = FLY_AT_PARA;
if(pArgs->GetItemState(nSlot, FALSE, &pItem) == SFX_ITEM_SET)
eAnchor = (RndStdIds)((SfxUInt16Item *)pItem)->GetValue();
if(pArgs->GetItemState(FN_PARAM_1, FALSE, &pItem) == SFX_ITEM_SET)
@@ -764,7 +758,7 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
SwFlyFrmAttrMgr aFrmMgr( TRUE, &rSh, FRMMGR_TYPE_GRF );
// am FrmMgr muessen die richtigen Parameter eingestellt werden
- aFrmMgr.SetAnchor(FLY_IN_CNTNT);
+ aFrmMgr.SetAnchor(FLY_AS_CHAR);
rSh.SplitNode( FALSE, FALSE );
rSh.SplitNode( FALSE, FALSE );
diff --git a/sw/source/ui/uiview/view2.cxx b/sw/source/ui/uiview/view2.cxx
index 77c06f44c494..dea0dc3d096b 100644
--- a/sw/source/ui/uiview/view2.cxx
+++ b/sw/source/ui/uiview/view2.cxx
@@ -34,12 +34,6 @@
#include <com/sun/star/util/SearchFlags.hpp>
#include <com/sun/star/i18n/TransliterationModules.hpp>
-// #ifndef _COM_SUN_STAR_LANG_LOCALE_HPP_
-// #include <com/sun/star/lang/Locale.hpp>
-// #endif
-// #ifndef _COM_SUN_STAR_UI_DIALOGS_XFILEPICKER_HPP_
-// #include <com/sun/star/ui/dialogs/XFilePicker.hpp>
-// #endif
#include <com/sun/star/ui/dialogs/XFilePickerControlAccess.hpp>
#include <com/sun/star/ui/dialogs/ExtendedFilePickerElementIds.hpp>
#include <com/sun/star/ui/dialogs/ListboxControlActions.hpp>
@@ -49,9 +43,6 @@
#include <svtools/svstdarr.hxx>
#include <svtools/aeitem.hxx>
-// #ifndef _FILTER_HXX
-// #include <svtools/filter.hxx>
-// #endif
#include <SwStyleNameMapper.hxx>
#include <docary.hxx>
#include <hintids.hxx>
@@ -69,12 +60,8 @@
#include <svx/viewlayoutitem.hxx>
#include <svx/zoomslideritem.hxx>
#include <svx/htmlmode.hxx>
-#ifndef _APP_HXX //autogen
#include <vcl/svapp.hxx>
-#endif
-#ifndef _WRKWIN_HXX //autogen
#include <vcl/wrkwin.hxx>
-#endif
#include <sfx2/app.hxx>
#include <sfx2/request.hxx>
#include <sfx2/bindings.hxx>
@@ -94,9 +81,7 @@
#include <svtools/whiter.hxx>
#include <svtools/ptitem.hxx>
#include <svx/linkmgr.hxx>
-#ifndef __RSC //autogen
#include <tools/errinf.hxx>
-#endif
#include <tools/urlobj.hxx>
#include <svx/svdview.hxx>
#include <swtypes.hxx>
@@ -148,10 +133,6 @@
#include <PostItMgr.hxx>
#include <postit.hxx>
-// #ifndef _FRMMGR_HXX
-// #include <frmmgr.hxx>
-// #endif
-
#include <ndtxt.hxx> //#outline level,added by zhaojianwei
#include <comphelper/processfactory.hxx>
diff --git a/sw/source/ui/uiview/viewtab.cxx b/sw/source/ui/uiview/viewtab.cxx
index 6223d1d0234a..592be8bc1d73 100644
--- a/sw/source/ui/uiview/viewtab.cxx
+++ b/sw/source/ui/uiview/viewtab.cxx
@@ -347,7 +347,7 @@ void SwView::ExecTabWin( SfxRequest& rReq )
if(aSize.GetWidthPercent())
{
SwRect aRect;
- rSh.CalcBoundRect(aRect, FLY_IN_CNTNT);
+ rSh.CalcBoundRect(aRect, FLY_AS_CHAR);
long nPrtWidth = aRect.Width();
aSize.SetWidthPercent(BYTE((nPageWidth - aLongLR.GetLeft() - aLongLR.GetRight()) * 100 /nPrtWidth));
}
@@ -472,7 +472,7 @@ void SwView::ExecTabWin( SfxRequest& rReq )
if(aSize.GetHeightPercent())
{
SwRect aRect;
- rSh.CalcBoundRect(aRect, FLY_IN_CNTNT);
+ rSh.CalcBoundRect(aRect, FLY_AS_CHAR);
long nPrtHeight = aRect.Height();
aSize.SetHeightPercent(BYTE(nHeight * 100 /nPrtHeight));
}
diff --git a/sw/source/ui/utlui/attrdesc.cxx b/sw/source/ui/utlui/attrdesc.cxx
index 14c27c19b137..fcf675c26fcc 100644
--- a/sw/source/ui/utlui/attrdesc.cxx
+++ b/sw/source/ui/utlui/attrdesc.cxx
@@ -53,9 +53,7 @@
#include <fmturl.hxx>
#include <fmthdft.hxx>
#include <fmtcnct.hxx>
-#ifndef _FMTLINE_HXX
#include <fmtline.hxx>
-#endif
#include <tgrditem.hxx>
#include <hfspacingitem.hxx>
#include <fmtruby.hxx>
@@ -687,13 +685,13 @@ SfxItemPresentation SwFmtAnchor::GetPresentation
USHORT nId = 0;
switch ( GetAnchorId() )
{
- case FLY_AT_CNTNT: //Absatzgebundener Rahmen
+ case FLY_AT_PARA:
nId = STR_FLY_AT_CNTNT;
break;
- case FLY_IN_CNTNT: //Zeichengebundener Rahmen
+ case FLY_AS_CHAR:
nId = STR_FLY_IN_CNTNT;
break;
- case FLY_PAGE: //Seitengebundener Rahmen
+ case FLY_AT_PAGE:
nId = STR_FLY_PAGE;
break;
default:;//prevent warning
diff --git a/sw/source/ui/wrtsh/select.cxx b/sw/source/ui/wrtsh/select.cxx
index 44a854a7ad4d..9499c44b63a4 100644
--- a/sw/source/ui/wrtsh/select.cxx
+++ b/sw/source/ui/wrtsh/select.cxx
@@ -39,15 +39,9 @@
#include <svtools/macitem.hxx>
#include <unotools/charclass.hxx>
#include <svx/scripttypeitem.hxx>
-#ifndef _CMDID_H
#include <cmdid.h>
-#endif
-#ifndef _VIEW_HXX
#include <view.hxx>
-#endif
-#ifndef _BASESH_HXX
#include <basesh.hxx>
-#endif
#include <wrtsh.hxx>
#include <frmatr.hxx>
#include <initui.hxx>