summaryrefslogtreecommitdiff
path: root/sw/source/core/text/txtfly.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/core/text/txtfly.cxx')
-rw-r--r--sw/source/core/text/txtfly.cxx50
1 files changed, 21 insertions, 29 deletions
diff --git a/sw/source/core/text/txtfly.cxx b/sw/source/core/text/txtfly.cxx
index 561c1abf2923..749873cc2ea9 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"
#ifdef DBG_UTIL
#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.