Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
7caa7ae8
Kaydet (Commit)
7caa7ae8
authored
Mar 14, 2012
tarafından
Philipp Weissenbacher
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Translate German comments
üst
ae62f61a
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
138 additions
and
146 deletions
+138
-146
txtfly.cxx
sw/source/core/text/txtfly.cxx
+138
-146
No files found.
sw/source/core/text/txtfly.cxx
Dosyayı görüntüle @
7caa7ae8
...
@@ -74,7 +74,7 @@
...
@@ -74,7 +74,7 @@
#include "doc.hxx"
#include "doc.hxx"
#ifdef DBG_UTIL
#ifdef DBG_UTIL
#include "viewopt.hxx" // SwViewOptions,
nur zum Testen
(Test2)
#include "viewopt.hxx" // SwViewOptions,
only for testing
(Test2)
#include "doc.hxx"
#include "doc.hxx"
#endif
#endif
...
@@ -82,37 +82,34 @@
...
@@ -82,37 +82,34 @@
using
namespace
::
com
::
sun
::
star
;
using
namespace
::
com
::
sun
::
star
;
/*****************************************************************************
/*****************************************************************************
* Beschreibung:
* Description:
* Die Klasse SwTxtFly soll die Universalschnittstelle zwischen der
* SwTxtFly's purpose is to be the universal interface between
* Formatierung/Textausgabe und den u.U. ueberlappenden freifliegenden
* formatting/text output and the possibly overlapping free-flying frames.
* Frames sein.
* During formatting the formatter gets the information from SwTxtFly, whether
* Waehrend der Formatierung erkundigt sich der Formatierer beim SwTxtFly,
* a certain area is present by the attributes of an overlapping frame.
* ob ein bestimmter Bereich durch die Attribute eines ueberlappenden
* Such areas are represented by dummy portions.
* Frames vorliegt. Solche Bereiche werden in Form von Dummy-Portions
* The whole text output and touch-up is, again, forwarded to a SwTxtFly.
* abgebildet.
* This one decides, whether parts of the text need to be clipped and splits
* Die gesamte Textausgabe und Retusche wird ebenfalls an ein SwTxtFly
* the areas for e.g. a DrawRect.
* weitergeleitet. Dieser entscheidet, ob Textteile geclippt werden muessen
* Please note that all free-flying frames are located in a PtrArray, sorted
* und zerteilt z.B. die Bereiche bei einem DrawRect.
* by TopLeft.
* Zu beachten ist, dass alle freifliegenden Frames in einem nach TopLeft
* Internally we always use document-global values. The IN and OUT parameters
* sortiertem PtrArray an der Seite zu finden sind. Intern wird immer nur
* are, however, adjusted to the needs of the LineIter most of the time. That
* in dokumentglobalen Werten gerechnet. Die IN- und OUT-Parameter sind
* is: they are converted to frame- and window-local coordinates.
* jedoch in den meisten Faellen an die Beduerfnisse des LineIters
* If multiple frames with wrap attributes are located on the same line, we get
* zugeschnitten, d.h. sie werden in frame- oder windowlokalen Koordinaten
* the following settings for the text flow:
* konvertiert.
* Wenn mehrere Frames mit Umlaufattributen in einer Zeile liegen,
* ergeben sich unterschiedliche Auswirkungen fuer den Textfluss:
*
*
* L/R P L R
K
* L/R P L R
N
* P -P-P- -P-L -P R- -P
K
* P -P-P- -P-L -P R- -P
N
* L -L P- -L L -L R- -L
K
* L -L P- -L L -L R- -L
N
* R R-P- R-L R R- R
K
* R R-P- R-L R R- R
N
*
K K P- K L K R- K K
*
N N P- N L N R- N N
*
*
* (P=parallel, L=l
inks, R=rechts, K=kein Umlauf
)
* (P=parallel, L=l
eft, R=right, N=no wrap
)
*
*
*
Das Verhalten so beschreiben
:
*
We can describe the behaviour as follows
:
*
Jeder Rahmen kann Text verdraengen, wobei der Einfluss allerdings nur
*
Every frame can push away text, with the restriction that it only has influence
*
bis zum naechsten Rahmen reicht
.
*
until the next frame
.
*****************************************************************************/
*****************************************************************************/
void
SwTxtFormatter
::
CalcUnclipped
(
SwTwips
&
rTop
,
SwTwips
&
rBottom
)
void
SwTxtFormatter
::
CalcUnclipped
(
SwTwips
&
rTop
,
SwTwips
&
rBottom
)
...
@@ -128,9 +125,10 @@ void SwTxtFormatter::CalcUnclipped( SwTwips& rTop, SwTwips& rBottom )
...
@@ -128,9 +125,10 @@ void SwTxtFormatter::CalcUnclipped( SwTwips& rTop, SwTwips& rBottom )
}
}
/*************************************************************************
/*************************************************************************
* SwTxtFormatter::UpdatePos() aktualisiert die Referenzpunkte der zeichengeb.
* SwTxtFormatter::UpdatePos()
* Objekte, z. B. nach Adjustierung ( rechtsbuendig, Blocksatz etc. )
* Updates the reference points of the character anchored objects,
* ( hauptsaechlich Korrrektur der X-Position )
* e.g. after adjusting right-aligned, justified etc.
* (That's mainly to correct the x position)
*************************************************************************/
*************************************************************************/
void
SwTxtFormatter
::
UpdatePos
(
SwLineLayout
*
pCurrent
,
Point
aStart
,
void
SwTxtFormatter
::
UpdatePos
(
SwLineLayout
*
pCurrent
,
Point
aStart
,
...
@@ -149,7 +147,7 @@ void SwTxtFormatter::UpdatePos( SwLineLayout *pCurrent, Point aStart,
...
@@ -149,7 +147,7 @@ void SwTxtFormatter::UpdatePos( SwLineLayout *pCurrent, Point aStart,
aTmpInf
.
SetKanaComp
(
pCurrent
->
GetpKanaComp
()
);
aTmpInf
.
SetKanaComp
(
pCurrent
->
GetpKanaComp
()
);
aTmpInf
.
ResetKanaIdx
();
aTmpInf
.
ResetKanaIdx
();
//
Die Groesse des Frames
//
The frame's size
aTmpInf
.
SetIdx
(
nStartIdx
);
aTmpInf
.
SetIdx
(
nStartIdx
);
aTmpInf
.
SetPos
(
aStart
);
aTmpInf
.
SetPos
(
aStart
);
...
@@ -185,9 +183,9 @@ void SwTxtFormatter::UpdatePos( SwLineLayout *pCurrent, Point aStart,
...
@@ -185,9 +183,9 @@ void SwTxtFormatter::UpdatePos( SwLineLayout *pCurrent, Point aStart,
while
(
pPos
)
while
(
pPos
)
{
{
//
bislang ist mir nur ein Fall bekannt, wo die Positionsaenderung
//
We only know one case where changing the position (caused by the
//
(verursacht durch das Adjustment) fuer eine Portion wichtig
//
adjustment) could be relevant for a portion: We need to SetRefPoint
//
sein koennte: Bei FlyCntPortions muss ein SetRefPoint erfolgen
.
//
for FlyCntPortions
.
if
(
(
pPos
->
IsFlyCntPortion
()
||
pPos
->
IsGrfNumPortion
()
)
if
(
(
pPos
->
IsFlyCntPortion
()
||
pPos
->
IsGrfNumPortion
()
)
&&
(
bAllWays
||
!
IsQuick
()
)
)
&&
(
bAllWays
||
!
IsQuick
()
)
)
{
{
...
@@ -257,7 +255,7 @@ void SwTxtFormatter::UpdatePos( SwLineLayout *pCurrent, Point aStart,
...
@@ -257,7 +255,7 @@ void SwTxtFormatter::UpdatePos( SwLineLayout *pCurrent, Point aStart,
/*************************************************************************
/*************************************************************************
* SwTxtFormatter::AlignFlyInCntBase()
* SwTxtFormatter::AlignFlyInCntBase()
*
richtet die zeichengeb. Objekte in Y-Richtung ggf. neu au
s.
*
If needed, re-adjusts the character anchored objects to the y axi
s.
*************************************************************************/
*************************************************************************/
void
SwTxtFormatter
::
AlignFlyInCntBase
(
long
nBaseLine
)
const
void
SwTxtFormatter
::
AlignFlyInCntBase
(
long
nBaseLine
)
const
...
@@ -309,11 +307,11 @@ void SwTxtFormatter::AlignFlyInCntBase( long nBaseLine ) const
...
@@ -309,11 +307,11 @@ void SwTxtFormatter::AlignFlyInCntBase( long nBaseLine ) const
/*************************************************************************
/*************************************************************************
* SwTxtFly::ChkFlyUnderflow()
* SwTxtFly::ChkFlyUnderflow()
* This is called after the real height of the line has been calculated
* This is called after the real height of the line has been calculated
.
* Therefore it is possible, that more flys from below intersect with the
* Therefore it is possible, that more flys from below intersect with the
* line, or that flys from above do not intersect with the line anymore
* line, or that flys from above do not intersect with the line anymore
.
* We check this and return true
if so
, meaning that the line has to be
* We check this and return true, meaning that the line has to be
* formatted again
* formatted again
.
*************************************************************************/
*************************************************************************/
sal_Bool
SwTxtFormatter
::
ChkFlyUnderflow
(
SwTxtFormatInfo
&
rInf
)
const
sal_Bool
SwTxtFormatter
::
ChkFlyUnderflow
(
SwTxtFormatInfo
&
rInf
)
const
...
@@ -321,7 +319,7 @@ sal_Bool SwTxtFormatter::ChkFlyUnderflow( SwTxtFormatInfo &rInf ) const
...
@@ -321,7 +319,7 @@ sal_Bool SwTxtFormatter::ChkFlyUnderflow( SwTxtFormatInfo &rInf ) const
OSL_ENSURE
(
rInf
.
GetTxtFly
()
->
IsOn
(),
"SwTxtFormatter::ChkFlyUnderflow: why?"
);
OSL_ENSURE
(
rInf
.
GetTxtFly
()
->
IsOn
(),
"SwTxtFormatter::ChkFlyUnderflow: why?"
);
if
(
GetCurr
()
)
if
(
GetCurr
()
)
{
{
//
Erst pruefen wir, ob ueberhaupt ein Fly mit der Zeile ueberlappt
.
//
First we check, whether a fly overlaps with the line
.
// = GetLineHeight()
// = GetLineHeight()
const
long
nHeight
=
GetCurr
()
->
GetRealHeight
();
const
long
nHeight
=
GetCurr
()
->
GetRealHeight
();
SwRect
aLine
(
GetLeftMargin
(),
Y
(),
rInf
.
RealWidth
(),
nHeight
);
SwRect
aLine
(
GetLeftMargin
(),
Y
(),
rInf
.
RealWidth
(),
nHeight
);
...
@@ -336,8 +334,8 @@ sal_Bool SwTxtFormatter::ChkFlyUnderflow( SwTxtFormatInfo &rInf ) const
...
@@ -336,8 +334,8 @@ sal_Bool SwTxtFormatter::ChkFlyUnderflow( SwTxtFormatInfo &rInf ) const
if
(
!
aInter
.
HasArea
()
)
if
(
!
aInter
.
HasArea
()
)
return
sal_False
;
return
sal_False
;
//
Nun ueberpruefen wir jede Portion, die sich haette senken koennen,
//
We now check every portion that could have lowered for overlapping
//
ob sie mit dem Fly ueberlappt
.
//
with the fly
.
const
SwLinePortion
*
pPos
=
GetCurr
()
->
GetFirstPortion
();
const
SwLinePortion
*
pPos
=
GetCurr
()
->
GetFirstPortion
();
aLine
.
Pos
().
Y
()
=
Y
()
+
GetCurr
()
->
GetRealHeight
()
-
GetCurr
()
->
Height
();
aLine
.
Pos
().
Y
()
=
Y
()
+
GetCurr
()
->
GetRealHeight
()
-
GetCurr
()
->
Height
();
aLine
.
Height
(
GetCurr
()
->
Height
()
);
aLine
.
Height
(
GetCurr
()
->
Height
()
);
...
@@ -353,7 +351,7 @@ sal_Bool SwTxtFormatter::ChkFlyUnderflow( SwTxtFormatInfo &rInf ) const
...
@@ -353,7 +351,7 @@ sal_Bool SwTxtFormatter::ChkFlyUnderflow( SwTxtFormatInfo &rInf ) const
if
(
pFrm
->
IsVertical
()
)
if
(
pFrm
->
IsVertical
()
)
pFrm
->
SwitchVerticalToHorizontal
(
aInter
);
pFrm
->
SwitchVerticalToHorizontal
(
aInter
);
//
n
ew flys from below?
//
N
ew flys from below?
if
(
!
pPos
->
IsFlyPortion
()
)
if
(
!
pPos
->
IsFlyPortion
()
)
{
{
if
(
aInter
.
IsOver
(
aLine
)
)
if
(
aInter
.
IsOver
(
aLine
)
)
...
@@ -361,7 +359,7 @@ sal_Bool SwTxtFormatter::ChkFlyUnderflow( SwTxtFormatInfo &rInf ) const
...
@@ -361,7 +359,7 @@ sal_Bool SwTxtFormatter::ChkFlyUnderflow( SwTxtFormatInfo &rInf ) const
aInter
.
_Intersection
(
aLine
);
aInter
.
_Intersection
(
aLine
);
if
(
aInter
.
HasArea
()
)
if
(
aInter
.
HasArea
()
)
{
{
//
t
o be evaluated during reformat of this line:
//
T
o be evaluated during reformat of this line:
// RealHeight including spacing
// RealHeight including spacing
rInf
.
SetLineHeight
(
KSHORT
(
nHeight
)
);
rInf
.
SetLineHeight
(
KSHORT
(
nHeight
)
);
// Height without extra spacing
// Height without extra spacing
...
@@ -372,7 +370,7 @@ sal_Bool SwTxtFormatter::ChkFlyUnderflow( SwTxtFormatInfo &rInf ) const
...
@@ -372,7 +370,7 @@ sal_Bool SwTxtFormatter::ChkFlyUnderflow( SwTxtFormatInfo &rInf ) const
}
}
else
else
{
{
//
the fly portion is not anylonger intersected by a fly
//
The fly portion is not intersected by a fly anymore
if
(
!
aInter
.
IsOver
(
aLine
)
)
if
(
!
aInter
.
IsOver
(
aLine
)
)
{
{
rInf
.
SetLineHeight
(
KSHORT
(
nHeight
)
);
rInf
.
SetLineHeight
(
KSHORT
(
nHeight
)
);
...
@@ -383,10 +381,10 @@ sal_Bool SwTxtFormatter::ChkFlyUnderflow( SwTxtFormatInfo &rInf ) const
...
@@ -383,10 +381,10 @@ sal_Bool SwTxtFormatter::ChkFlyUnderflow( SwTxtFormatInfo &rInf ) const
{
{
aInter
.
_Intersection
(
aLine
);
aInter
.
_Intersection
(
aLine
);
//
n
o area means a fly has become invalid because of
//
N
o area means a fly has become invalid because of
// lowering the line => reformat the line
// lowering the line => reformat the line
.
//
w
e also have to reformat the line, if the fly size
//
W
e also have to reformat the line, if the fly size
// differs from the intersection interval
s size
// differs from the intersection interval
's size.
if
(
!
aInter
.
HasArea
()
||
if
(
!
aInter
.
HasArea
()
||
((
SwFlyPortion
*
)
pPos
)
->
GetFixWidth
()
!=
aInter
.
Width
()
)
((
SwFlyPortion
*
)
pPos
)
->
GetFixWidth
()
!=
aInter
.
Width
()
)
{
{
...
@@ -406,12 +404,12 @@ sal_Bool SwTxtFormatter::ChkFlyUnderflow( SwTxtFormatInfo &rInf ) const
...
@@ -406,12 +404,12 @@ sal_Bool SwTxtFormatter::ChkFlyUnderflow( SwTxtFormatInfo &rInf ) const
/*************************************************************************
/*************************************************************************
* SwTxtFormatter::CalcFlyWidth()
* SwTxtFormatter::CalcFlyWidth()
*
ermittelt das naechste Objekt, das in die restliche Zeile ragt u
nd
*
Determines the next object, that reaches into the rest of the line a
nd
*
konstruiert die zugehoerig
e FlyPortion.
*
constructs the appropriat
e FlyPortion.
*
Dazu wird SwTxtFly.GetFrm(..) benutz
t.
*
We use SwTxtFly.GetFrm(..) for tha
t.
*************************************************************************/
*************************************************************************/
//
Durch Flys kann sich der rechte Rand verkuerzen
.
//
The right margin can be shortened by Flys
.
void
SwTxtFormatter
::
CalcFlyWidth
(
SwTxtFormatInfo
&
rInf
)
void
SwTxtFormatter
::
CalcFlyWidth
(
SwTxtFormatInfo
&
rInf
)
{
{
...
@@ -430,7 +428,7 @@ void SwTxtFormatter::CalcFlyWidth( SwTxtFormatInfo &rInf )
...
@@ -430,7 +428,7 @@ void SwTxtFormatter::CalcFlyWidth( SwTxtFormatInfo &rInf )
if
(
rInf
.
GetLineHeight
()
)
if
(
rInf
.
GetLineHeight
()
)
{
{
//
r
eal line height has already been calculated, we only have to
//
R
eal line height has already been calculated, we only have to
// search for intersections in the lower part of the strip
// search for intersections in the lower part of the strip
nAscent
=
pCurr
->
GetAscent
();
nAscent
=
pCurr
->
GetAscent
();
nHeight
=
rInf
.
GetLineNettoHeight
();
nHeight
=
rInf
.
GetLineNettoHeight
();
...
@@ -441,14 +439,14 @@ void SwTxtFormatter::CalcFlyWidth( SwTxtFormatInfo &rInf )
...
@@ -441,14 +439,14 @@ void SwTxtFormatter::CalcFlyWidth( SwTxtFormatInfo &rInf )
nAscent
=
pLast
->
GetAscent
();
nAscent
=
pLast
->
GetAscent
();
nHeight
=
pLast
->
Height
();
nHeight
=
pLast
->
Height
();
//
we make a first guess for the line
s real height
//
We make a first guess for the line'
s real height
if
(
!
pCurr
->
GetRealHeight
()
)
if
(
!
pCurr
->
GetRealHeight
()
)
CalcRealHeight
();
CalcRealHeight
();
if
(
pCurr
->
GetRealHeight
()
>
nHeight
)
if
(
pCurr
->
GetRealHeight
()
>
nHeight
)
nTop
+=
pCurr
->
GetRealHeight
()
-
nHeight
;
nTop
+=
pCurr
->
GetRealHeight
()
-
nHeight
;
else
else
//
i
mportant for fixed space between lines
//
I
mportant for fixed space between lines
nHeight
=
pCurr
->
GetRealHeight
();
nHeight
=
pCurr
->
GetRealHeight
();
}
}
...
@@ -495,10 +493,9 @@ void SwTxtFormatter::CalcFlyWidth( SwTxtFormatInfo &rInf )
...
@@ -495,10 +493,9 @@ void SwTxtFormatter::CalcFlyWidth( SwTxtFormatInfo &rInf )
nAddMar
=
nLeftMar
-
nFrmLeft
;
nAddMar
=
nLeftMar
-
nFrmLeft
;
aInter
.
Width
(
aInter
.
Width
()
+
nAddMar
);
aInter
.
Width
(
aInter
.
Width
()
+
nAddMar
);
// Bei negativem Erstzeileneinzug setzen wir das Flag,
// For a negative first line indent, we set this flag to show
// um anzuzeigen, dass der Einzug/Rand verschoben wurde
// that the indentation/margin has been moved.
// Dies muss beim DefaultTab an der Nullposition beruecksichtigt
// This needs to be respected by the DefaultTab at the zero position.
// werden.
if
(
IsFirstTxtLine
()
&&
HasNegFirst
()
)
if
(
IsFirstTxtLine
()
&&
HasNegFirst
()
)
bForced
=
sal_True
;
bForced
=
sal_True
;
}
}
...
@@ -509,17 +506,16 @@ void SwTxtFormatter::CalcFlyWidth( SwTxtFormatInfo &rInf )
...
@@ -509,17 +506,16 @@ void SwTxtFormatter::CalcFlyWidth( SwTxtFormatInfo &rInf )
const
sal_Bool
bFullLine
=
aLine
.
Left
()
==
aInter
.
Left
()
&&
const
sal_Bool
bFullLine
=
aLine
.
Left
()
==
aInter
.
Left
()
&&
aLine
.
Right
()
==
aInter
.
Right
();
aLine
.
Right
()
==
aInter
.
Right
();
// Obwohl kein Text mehr da ist, muss eine weitere Zeile
// Although no text is left, we need to format another line,
// formatiert werden, weil auch leere Zeilen einem Fly
// because also empty lines need to avoid a Fly with no wrapping.
// ohne Umlauf ausweichen muessen.
if
(
bFullLine
&&
rInf
.
GetIdx
()
==
rInf
.
GetTxt
().
Len
()
)
if
(
bFullLine
&&
rInf
.
GetIdx
()
==
rInf
.
GetTxt
().
Len
()
)
{
{
rInf
.
SetNewLine
(
sal_True
);
rInf
.
SetNewLine
(
sal_True
);
// 8221:
Dummies erkennt man an Ascent == H
eight
// 8221:
We know that for dummies, it holds ascent == h
eight
pCurr
->
SetDummy
(
sal_True
);
pCurr
->
SetDummy
(
sal_True
);
}
}
// aInter
wird framelok
al
// aInter
becomes frame-loc
al
aInter
.
Pos
().
X
()
-=
nLeftMar
;
aInter
.
Pos
().
X
()
-=
nLeftMar
;
SwFlyPortion
*
pFly
=
new
SwFlyPortion
(
aInter
);
SwFlyPortion
*
pFly
=
new
SwFlyPortion
(
aInter
);
if
(
bForced
)
if
(
bForced
)
...
@@ -530,24 +526,23 @@ void SwTxtFormatter::CalcFlyWidth( SwTxtFormatInfo &rInf )
...
@@ -530,24 +526,23 @@ void SwTxtFormatter::CalcFlyWidth( SwTxtFormatInfo &rInf )
if
(
bFullLine
)
if
(
bFullLine
)
{
{
// 8110: wir muessen um Einheiten von Zeilenhoehen anwachsen,
// 8110: In order to properly flow around Flys with different
// um nebeneinanderliegende Flys mit unterschiedlichen
// wrapping attributes, we need to increase by units of line height.
// Umlaufattributen angemessen zu umfliessen.
// The last avoiding line should be adjusted in height, so that
// Die letzte ausweichende Zeile, sollte in der Hoehe angepasst
// we don't get a frame spacing effect.
// sein, damit nicht der Eindruck von "Rahmenabstaenden" aufkommt.
// 8221: It is important that ascent == height, because the FlyPortion
// 8221: Wichtig ist, dass Ascent == Height ist, weil die FlyPortionWerte
// values are transferred to pCurr in CalcLine and IsDummy() relies
// im CalcLine in pCurr uebertragen werden und IsDummy() darauf
// on this behaviour.
// angewiesen ist.
// To my knowledge we only have two places where DummyLines can be
// Es gibt meines Wissens nur zwei Stellen, in denen DummyLines
// created: here and in MakeFlyDummies.
// entstehen koennen: hier und in MakeFlyDummies.
// IsDummy() is evaluated in IsFirstTxtLine(), when moving lines
// Ausgewertet wird IsDummy() in IsFirstTxtLine() und
// and in relation with DropCaps.
// beim Zeilenwandern und im Zusammenhang mit DropCaps.
pFly
->
Height
(
KSHORT
(
aInter
.
Height
())
);
pFly
->
Height
(
KSHORT
(
aInter
.
Height
())
);
//
In nNextTop steckt jetzt die Unterkante des Rahmens, dem wir
//
nNextTop now contains the margin's bottom edge, which we avoid
//
ausweichen oder die Oberkante des naechsten Rahmens, den wir
//
or the next margin's top edge, which we need to respect.
//
beachten muessen. Wir koennen also jetzt getrost bis zu diesem
//
That means we can comfortably grow up to this value; that's how
//
Wert anwachsen, so sparen wir einige Leerzeilen
.
//
we save a few empty lines
.
long
nNextTop
=
pTxtFly
->
GetNextTop
();
long
nNextTop
=
pTxtFly
->
GetNextTop
();
if
(
pFrm
->
IsVertical
()
)
if
(
pFrm
->
IsVertical
()
)
nNextTop
=
pFrm
->
SwitchVerticalToHorizontal
(
nNextTop
);
nNextTop
=
pFrm
->
SwitchVerticalToHorizontal
(
nNextTop
);
...
@@ -566,7 +561,7 @@ void SwTxtFormatter::CalcFlyWidth( SwTxtFormatInfo &rInf )
...
@@ -566,7 +561,7 @@ void SwTxtFormatter::CalcFlyWidth( SwTxtFormatInfo &rInf )
{
{
if
(
rInf
.
GetIdx
()
==
rInf
.
GetTxt
().
Len
()
)
if
(
rInf
.
GetIdx
()
==
rInf
.
GetTxt
().
Len
()
)
{
{
//
Nicht nHeight nehmen, sonst haben wir einen Riesen
descent
//
Don't use nHeight, or we have a huge
descent
pFly
->
Height
(
pLast
->
Height
()
);
pFly
->
Height
(
pLast
->
Height
()
);
pFly
->
SetAscent
(
pLast
->
GetAscent
()
);
pFly
->
SetAscent
(
pLast
->
GetAscent
()
);
}
}
...
@@ -598,7 +593,7 @@ void SwTxtFormatter::CalcFlyWidth( SwTxtFormatInfo &rInf )
...
@@ -598,7 +593,7 @@ void SwTxtFormatter::CalcFlyWidth( SwTxtFormatInfo &rInf )
(
pPageFrm
->*
fnRect
->
fnGetPrtLeft
)();
(
pPageFrm
->*
fnRect
->
fnGetPrtLeft
)();
const
SwDoc
*
pDoc
=
rInf
.
GetTxtFrm
()
->
GetNode
()
->
GetDoc
();
const
SwDoc
*
pDoc
=
rInf
.
GetTxtFrm
()
->
GetNode
()
->
GetDoc
();
const
sal_uInt16
nGridWidth
=
GETGRIDWIDTH
(
pGrid
,
pDoc
);
//f
or textgrid refactor
const
sal_uInt16
nGridWidth
=
GETGRIDWIDTH
(
pGrid
,
pDoc
);
// F
or textgrid refactor
SwTwips
nStartX
=
GetLeftMargin
();
SwTwips
nStartX
=
GetLeftMargin
();
if
(
bVert
)
if
(
bVert
)
...
@@ -624,7 +619,7 @@ void SwTxtFormatter::CalcFlyWidth( SwTxtFormatInfo &rInf )
...
@@ -624,7 +619,7 @@ void SwTxtFormatter::CalcFlyWidth( SwTxtFormatInfo &rInf )
/*****************************************************************************
/*****************************************************************************
* SwTxtFormatter::NewFlyCntPortion
* SwTxtFormatter::NewFlyCntPortion
*
legt eine neue Portion fuer ein zeichengebundenes Objekt an
.
*
Creates a new portion for a character anchored object
.
*****************************************************************************/
*****************************************************************************/
SwFlyCntPortion
*
SwTxtFormatter
::
NewFlyCntPortion
(
SwTxtFormatInfo
&
rInf
,
SwFlyCntPortion
*
SwTxtFormatter
::
NewFlyCntPortion
(
SwTxtFormatInfo
&
rInf
,
...
@@ -639,11 +634,9 @@ SwFlyCntPortion *SwTxtFormatter::NewFlyCntPortion( SwTxtFormatInfo &rInf,
...
@@ -639,11 +634,9 @@ SwFlyCntPortion *SwTxtFormatter::NewFlyCntPortion( SwTxtFormatInfo &rInf,
pFly
=
((
SwTxtFlyCnt
*
)
pHint
)
->
GetFlyFrm
(
pFrame
);
pFly
=
((
SwTxtFlyCnt
*
)
pHint
)
->
GetFlyFrm
(
pFrame
);
else
else
pFly
=
NULL
;
pFly
=
NULL
;
// aBase bezeichnet die dokumentglobale Position,
// aBase is the document-global position, from which the new extra portion is placed
// ab der die neue Extraportion plaziert wird.
// aBase.X() = Offset in in the line after the current position
// aBase.X() = Offset in der Zeile,
// aBase.Y() = LineIter.Y() + Ascent of the current position
// hinter der aktuellen Portion
// aBase.Y() = LineIter.Y() + Ascent der aktuellen Portion
long
nTmpAscent
,
nTmpDescent
,
nFlyAsc
,
nFlyDesc
;
long
nTmpAscent
,
nTmpDescent
,
nFlyAsc
,
nFlyDesc
;
// OD 08.01.2004 #i11859# - use new method <SwLineLayout::MaxAscentDescent(..)>
// OD 08.01.2004 #i11859# - use new method <SwLineLayout::MaxAscentDescent(..)>
...
@@ -651,11 +644,10 @@ SwFlyCntPortion *SwTxtFormatter::NewFlyCntPortion( SwTxtFormatInfo &rInf,
...
@@ -651,11 +644,10 @@ SwFlyCntPortion *SwTxtFormatter::NewFlyCntPortion( SwTxtFormatInfo &rInf,
//lcl_MaxAscDescent( pPos, nTmpAscent, nTmpDescent, nFlyAsc, nFlyDesc );
//lcl_MaxAscDescent( pPos, nTmpAscent, nTmpDescent, nFlyAsc, nFlyDesc );
pCurr
->
MaxAscentDescent
(
nTmpAscent
,
nTmpDescent
,
nFlyAsc
,
nFlyDesc
);
pCurr
->
MaxAscentDescent
(
nTmpAscent
,
nTmpDescent
,
nFlyAsc
,
nFlyDesc
);
// Wenn der Ascent des Rahmens groesser als der Ascent der akt. Portion
// If the ascent of the frame is larger than the ascent of the current position,
// ist, wird dieser bei der Base-Berechnung verwendet, sonst wuerde
// we use this one when calculating the base, or the frame would be positioned
// der Rahmen zunaechst zu weit nach oben gesetzt, um dann doch wieder
// too much to the top, sliding down after all causing a repaint in an area
// nach unten zu rutschen und dabei ein Repaint in einem Bereich ausloesen,
// he actually never was in.
// indem er niemals wirklich war.
KSHORT
nAscent
=
0
;
KSHORT
nAscent
=
0
;
const
bool
bTxtFrmVertical
=
GetInfo
().
GetTxtFrm
()
->
IsVertical
();
const
bool
bTxtFrmVertical
=
GetInfo
().
GetTxtFrm
()
->
IsVertical
();
...
@@ -670,7 +662,7 @@ SwFlyCntPortion *SwTxtFormatter::NewFlyCntPortion( SwTxtFormatInfo &rInf,
...
@@ -670,7 +662,7 @@ SwFlyCntPortion *SwTxtFormatter::NewFlyCntPortion( SwTxtFormatInfo &rInf,
pFly
->
GetRelPos
().
X
()
:
pFly
->
GetRelPos
().
X
()
:
pFly
->
GetRelPos
().
Y
()
)
)
);
pFly
->
GetRelPos
().
Y
()
)
)
);
//
check if b
e prefer to use the ascent of the last portion:
//
Check if w
e prefer to use the ascent of the last portion:
if
(
IsQuick
()
||
if
(
IsQuick
()
||
!
bUseFlyAscent
||
!
bUseFlyAscent
||
nAscent
<
rInf
.
GetLast
()
->
GetAscent
()
)
nAscent
<
rInf
.
GetLast
()
->
GetAscent
()
)
...
@@ -697,11 +689,11 @@ SwFlyCntPortion *SwTxtFormatter::NewFlyCntPortion( SwTxtFormatInfo &rInf,
...
@@ -697,11 +689,11 @@ SwFlyCntPortion *SwTxtFormatter::NewFlyCntPortion( SwTxtFormatInfo &rInf,
{
{
pRet
=
new
SwFlyCntPortion
(
*
GetInfo
().
GetTxtFrm
(),
pFly
,
aTmpBase
,
pRet
=
new
SwFlyCntPortion
(
*
GetInfo
().
GetTxtFrm
(),
pFly
,
aTmpBase
,
nTmpAscent
,
nTmpDescent
,
nFlyAsc
,
nFlyDesc
,
nMode
);
nTmpAscent
,
nTmpDescent
,
nFlyAsc
,
nFlyDesc
,
nMode
);
// W
ir muessen sicherstellen, dass unser Font wieder im
OutputDevice
// W
e need to make sure that our font is set again in the
OutputDevice
//
steht. Es koennte sein, dass der FlyInCnt frisch eingefuegt wurde,
//
It could be that the FlyInCnt was added anew and GetFlyFrm() would
//
dann hat GetFlyFrm dazu gefuehrt, dass er neu angelegt wird
.
//
in turn cause, that it'd be created anew again
.
//
Dessen Frames werden sofort formatiert, die verstellen den Font
//
This one's frames get formatted right away, which change the font and
//
und schon haben wir den Salat
(3322).
//
we have a bug
(3322).
rInf
.
SelectFont
();
rInf
.
SelectFont
();
if
(
pRet
->
GetAscent
()
>
nAscent
)
if
(
pRet
->
GetAscent
()
>
nAscent
)
{
{
...
@@ -770,11 +762,11 @@ void SwTxtFly::CtorInitTxtFly( const SwTxtFrm *pFrm )
...
@@ -770,11 +762,11 @@ void SwTxtFly::CtorInitTxtFly( const SwTxtFrm *pFrm )
pMaster
=
pCurrFrm
->
IsFollow
()
?
NULL
:
pCurrFrm
;
pMaster
=
pCurrFrm
->
IsFollow
()
?
NULL
:
pCurrFrm
;
// #i68520#
// #i68520#
mpAnchoredObjList
=
NULL
;
mpAnchoredObjList
=
NULL
;
//
Wenn wir nicht von einem Frame ueberlappt werden, oder wenn
//
If we're not overlapped by a frame or if a FlyCollection does not exist
//
es gar keine FlyCollection gibt, dann schaltet wir uns fuer immer ab
.
//
at all, we switch off forever
.
//
Aber es koennte sein, dass waehrend der Formatierung eine Zeile
//
It could be, however, that a line is added while formatting, that
//
hinzukommt, die in einen Frame hineinragt. Deswegen keine Optimierung
//
extends into a frame.
//
per
bOn = pSortedFlys && IsAnyFrm();
//
That's why we do not optimize for:
bOn = pSortedFlys && IsAnyFrm();
bOn
=
pPage
->
GetSortedObjs
()
!=
0
;
bOn
=
pPage
->
GetSortedObjs
()
!=
0
;
bTopRule
=
sal_True
;
bTopRule
=
sal_True
;
bLeftSide
=
sal_False
;
bLeftSide
=
sal_False
;
...
@@ -785,11 +777,12 @@ void SwTxtFly::CtorInitTxtFly( const SwTxtFrm *pFrm )
...
@@ -785,11 +777,12 @@ void SwTxtFly::CtorInitTxtFly( const SwTxtFrm *pFrm )
/*************************************************************************
/*************************************************************************
* SwTxtFly::_GetFrm()
* SwTxtFly::_GetFrm()
*
*
* IN: dokumentglobal (rRect)
* IN: document-global (rRect)
* OUT: framelokal (return-Wert)
* OUT: frame-local (return value)
* Diese Methode wird waehrend der Formatierung vom LineIter gerufen.
*
* 1. um die naechste FlyPortion vorzubereiten
* This method is called during formatting of LineIter in order to:
* 2. um nach Aenderung der Zeilenhoehe neue Ueberlappungen festzustellen
* 1. prepare the next FlyPortion
* 2. remember new overlappings after changes to the line height
*************************************************************************/
*************************************************************************/
SwRect
SwTxtFly
::
_GetFrm
(
const
SwRect
&
rRect
,
sal_Bool
bTop
)
const
SwRect
SwTxtFly
::
_GetFrm
(
const
SwRect
&
rRect
,
sal_Bool
bTop
)
const
...
@@ -801,7 +794,7 @@ SwRect SwTxtFly::_GetFrm( const SwRect &rRect, sal_Bool bTop ) const
...
@@ -801,7 +794,7 @@ SwRect SwTxtFly::_GetFrm( const SwRect &rRect, sal_Bool bTop ) const
if
(
bTop
)
if
(
bTop
)
(
aRet
.
*
fnRect
->
fnSetTop
)(
(
rRect
.
*
fnRect
->
fnGetTop
)()
);
(
aRet
.
*
fnRect
->
fnSetTop
)(
(
rRect
.
*
fnRect
->
fnGetTop
)()
);
// 8110:
Bottom nicht immer anpassen.
// 8110:
Do not always adapt the bottom
const
SwTwips
nRetBottom
=
(
aRet
.
*
fnRect
->
fnGetBottom
)();
const
SwTwips
nRetBottom
=
(
aRet
.
*
fnRect
->
fnGetBottom
)();
const
SwTwips
nRectBottom
=
(
rRect
.
*
fnRect
->
fnGetBottom
)();
const
SwTwips
nRectBottom
=
(
rRect
.
*
fnRect
->
fnGetBottom
)();
if
(
(
*
fnRect
->
fnYDiff
)(
nRetBottom
,
nRectBottom
)
>
0
||
if
(
(
*
fnRect
->
fnYDiff
)(
nRetBottom
,
nRectBottom
)
>
0
||
...
@@ -814,10 +807,10 @@ SwRect SwTxtFly::_GetFrm( const SwRect &rRect, sal_Bool bTop ) const
...
@@ -814,10 +807,10 @@ SwRect SwTxtFly::_GetFrm( const SwRect &rRect, sal_Bool bTop ) const
/*************************************************************************
/*************************************************************************
* SwTxtFly::IsAnyFrm()
* SwTxtFly::IsAnyFrm()
*
*
* IN: do
kument
global
* IN: do
cument-
global
* f
uer die Printarea des aktuellen F
rame
* f
or the print area of the current f
rame
*
*
*
dient zum Abschalten des SwTxtFly, wenn keine Objekte ueberlappen (R
elax)
*
Is used to disable the SwTxtFly if no objects overlap (r
elax)
*
*
*************************************************************************/
*************************************************************************/
...
@@ -837,11 +830,11 @@ sal_Bool SwTxtFly::IsAnyFrm() const
...
@@ -837,11 +830,11 @@ sal_Bool SwTxtFly::IsAnyFrm() const
/*************************************************************************
/*************************************************************************
* SwTxtFly::IsAnyObj()
* SwTxtFly::IsAnyObj()
*
*
* IN: do
kument
global
* IN: do
cument-
global
* OUT: sal_True
Wenn ein Rahmen oder DrawObj beruecksichtigt werden muss
* OUT: sal_True
If a frame or DrawObj needs to be respected
*
Nur wenn IsAnyObj sal_False liefert, koennen Optimierungen benutzt werden
*
*
wie Paint/FormatEmpty fuer leere Absaetz
e
*
Only if this method returns sal_False, we can use optimizations lik
e
*
und auch das virtuelle Outputd
evice.
*
Paint/FormatEmpty for empty paragraphs and also the virtual OutputD
evice.
*************************************************************************/
*************************************************************************/
sal_Bool
SwTxtFly
::
IsAnyObj
(
const
SwRect
&
rRect
)
const
sal_Bool
SwTxtFly
::
IsAnyObj
(
const
SwRect
&
rRect
)
const
...
@@ -854,8 +847,8 @@ sal_Bool SwTxtFly::IsAnyObj( const SwRect &rRect ) const
...
@@ -854,8 +847,8 @@ sal_Bool SwTxtFly::IsAnyObj( const SwRect &rRect ) const
pCurrFrm
->
Prt
().
SSize
()
);
pCurrFrm
->
Prt
().
SSize
()
);
const
SwSortedObjs
*
pSorted
=
pPage
->
GetSortedObjs
();
const
SwSortedObjs
*
pSorted
=
pPage
->
GetSortedObjs
();
if
(
pSorted
)
//
Eigentlich ist durch bOn sichergestellt, dass es an der
if
(
pSorted
)
//
bOn actually makes sure that we have objects on the side,
// Seite Objekte gibt, aber wer weiss, wer inzwischen etwas geloescht hat.
// but who knows who deleted somehting in the meantime?
{
{
for
(
MSHORT
i
=
0
;
i
<
pSorted
->
Count
();
++
i
)
for
(
MSHORT
i
=
0
;
i
<
pSorted
->
Count
();
++
i
)
{
{
...
@@ -863,7 +856,7 @@ sal_Bool SwTxtFly::IsAnyObj( const SwRect &rRect ) const
...
@@ -863,7 +856,7 @@ sal_Bool SwTxtFly::IsAnyObj( const SwRect &rRect ) const
const
SwRect
aBound
(
pObj
->
GetObjRectWithSpaces
()
);
const
SwRect
aBound
(
pObj
->
GetObjRectWithSpaces
()
);
// Optimi
erung
// Optimi
zation
if
(
pObj
->
GetObjRect
().
Left
()
>
aRect
.
Right
()
)
if
(
pObj
->
GetObjRect
().
Left
()
>
aRect
.
Right
()
)
continue
;
continue
;
...
@@ -886,12 +879,13 @@ const SwCntntFrm* SwTxtFly::_GetMaster()
...
@@ -886,12 +879,13 @@ const SwCntntFrm* SwTxtFly::_GetMaster()
/*************************************************************************
/*************************************************************************
* SwTxtFly::DrawTextOpaque()
* SwTxtFly::DrawTextOpaque()
*
*
* IN: dokumentglobal
* IN: document-global
* DrawTextOpaque() wird von DrawText() gerufen.
*
* Die Clipregions werden so gesetzt, dass nur die Teile ausgegeben werden,
* DrawTextOpaque() is called by DrawText().
* die nicht in den Bereichen von FlyFrms liegen, die undurchsichtig und
* The ClipRegions are placed int a way, that only those parts are displayed
* ueber dem aktuellen Frame liegen.
* which are not within the areas of FlyFrms which are opaque and above the
* Die On-Optimierung uebernimmt DrawText()!
* current Frame.
* DrawText() takes over the on optimization!
*************************************************************************/
*************************************************************************/
sal_Bool
SwTxtFly
::
DrawTextOpaque
(
SwDrawTextInfo
&
rInf
)
sal_Bool
SwTxtFly
::
DrawTextOpaque
(
SwDrawTextInfo
&
rInf
)
...
@@ -952,7 +946,7 @@ sal_Bool SwTxtFly::DrawTextOpaque( SwDrawTextInfo &rInf )
...
@@ -952,7 +946,7 @@ sal_Bool SwTxtFly::DrawTextOpaque( SwDrawTextInfo &rInf )
const
SwFrmFmt
*
pFmt
=
pFly
->
GetFmt
();
const
SwFrmFmt
*
pFmt
=
pFly
->
GetFmt
();
const
SwFmtSurround
&
rSur
=
pFmt
->
GetSurround
();
const
SwFmtSurround
&
rSur
=
pFmt
->
GetSurround
();
const
SwFmtAnchor
&
rAnchor
=
pFmt
->
GetAnchor
();
const
SwFmtAnchor
&
rAnchor
=
pFmt
->
GetAnchor
();
//Nur undurchsichtige und weiter oben liegende.
// Only the ones who are opaque and more to the top
if
(
!
(
pFly
->
IsBackgroundTransparent
()
if
(
!
(
pFly
->
IsBackgroundTransparent
()
||
pFly
->
IsShadowTransparent
()
)
&&
||
pFly
->
IsShadowTransparent
()
)
&&
SURROUND_THROUGHT
==
rSur
.
GetSurround
()
&&
SURROUND_THROUGHT
==
rSur
.
GetSurround
()
&&
...
@@ -968,7 +962,7 @@ sal_Bool SwTxtFly::DrawTextOpaque( SwDrawTextInfo &rInf )
...
@@ -968,7 +962,7 @@ sal_Bool SwTxtFly::DrawTextOpaque( SwDrawTextInfo &rInf )
nCurrOrd
<
pTmpAnchoredObj
->
GetDrawObj
()
->
GetOrdNum
()
nCurrOrd
<
pTmpAnchoredObj
->
GetDrawObj
()
->
GetOrdNum
()
)
)
{
{
//
Ausser der Inhalt ist T
ransparent
//
Except for the content is t
ransparent
const
SwNoTxtFrm
*
pNoTxt
=
const
SwNoTxtFrm
*
pNoTxt
=
pFly
->
Lower
()
&&
pFly
->
Lower
()
->
IsNoTxtFrm
()
pFly
->
Lower
()
&&
pFly
->
Lower
()
->
IsNoTxtFrm
()
?
(
SwNoTxtFrm
*
)
pFly
->
Lower
()
?
(
SwNoTxtFrm
*
)
pFly
->
Lower
()
...
@@ -1000,7 +994,7 @@ sal_Bool SwTxtFly::DrawTextOpaque( SwDrawTextInfo &rInf )
...
@@ -1000,7 +994,7 @@ sal_Bool SwTxtFly::DrawTextOpaque( SwDrawTextInfo &rInf )
}
}
else
if
(
aRegion
.
Count
()
)
else
if
(
aRegion
.
Count
()
)
{
{
// W
as fuer ein Aufwand
...
// W
hat a huge effort
...
SwSaveClip
aClipVout
(
rInf
.
GetpOut
()
);
SwSaveClip
aClipVout
(
rInf
.
GetpOut
()
);
for
(
MSHORT
i
=
0
;
i
<
aRegion
.
Count
();
++
i
)
for
(
MSHORT
i
=
0
;
i
<
aRegion
.
Count
();
++
i
)
{
{
...
@@ -1020,10 +1014,10 @@ sal_Bool SwTxtFly::DrawTextOpaque( SwDrawTextInfo &rInf )
...
@@ -1020,10 +1014,10 @@ sal_Bool SwTxtFly::DrawTextOpaque( SwDrawTextInfo &rInf )
/*************************************************************************
/*************************************************************************
* SwTxtFly::DrawFlyRect()
* SwTxtFly::DrawFlyRect()
*
*
* IN: window
lok
al
* IN: window
-loc
al
*
Zwei Feinheiten gilt es zu beachten
:
*
We need to keep two subtelties in mind
:
* 1) DrawRect()
oberhalb des ClipRects sind erlaubt
!
* 1) DrawRect()
above the ClipRect are allowed
!
* 2) FlyToRect()
liefert groessere Werte als die Framedaten
!
* 2) FlyToRect()
returns larger values than the frame data
!
*************************************************************************/
*************************************************************************/
void
SwTxtFly
::
DrawFlyRect
(
OutputDevice
*
pOut
,
const
SwRect
&
rRect
,
void
SwTxtFly
::
DrawFlyRect
(
OutputDevice
*
pOut
,
const
SwRect
&
rRect
,
...
@@ -1151,7 +1145,7 @@ sal_Bool SwTxtFly::GetTop( const SwAnchoredObject* _pAnchoredObj,
...
@@ -1151,7 +1145,7 @@ sal_Bool SwTxtFly::GetTop( const SwAnchoredObject* _pAnchoredObj,
bEvade
=
sal_True
;
bEvade
=
sal_True
;
else
else
{
{
//
innerhalb von verketteten Flys wird nur Lowern ausgewichen
//
Within chained Flys we only avoid Lower
// #i68520#
// #i68520#
const
SwFmtChain
&
rChain
=
mpCurrAnchoredObj
->
GetFrmFmt
().
GetChain
();
const
SwFmtChain
&
rChain
=
mpCurrAnchoredObj
->
GetFrmFmt
().
GetChain
();
if
(
!
rChain
.
GetPrev
()
&&
!
rChain
.
GetNext
()
)
if
(
!
rChain
.
GetPrev
()
&&
!
rChain
.
GetNext
()
)
...
@@ -1180,11 +1174,11 @@ sal_Bool SwTxtFly::GetTop( const SwAnchoredObject* _pAnchoredObj,
...
@@ -1180,11 +1174,11 @@ sal_Bool SwTxtFly::GetTop( const SwAnchoredObject* _pAnchoredObj,
return
sal_False
;
return
sal_False
;
}
}
else
if
(
FLY_AT_PAGE
==
rCurrA
.
GetAnchorId
())
else
if
(
FLY_AT_PAGE
==
rCurrA
.
GetAnchorId
())
return
sal_False
;
//
Seitengebundene weichen nur seitengeb. au
s
return
sal_False
;
//
Page anchored ones only avoid page anchored one
s
else
if
(
FLY_AT_FLY
==
rNewA
.
GetAnchorId
())
else
if
(
FLY_AT_FLY
==
rNewA
.
GetAnchorId
())
bEvade
=
sal_True
;
// N
icht seitengeb. weichen Rahmengeb. au
s
bEvade
=
sal_True
;
// N
on-page anchored ones avoid frame anchored one
s
else
if
(
FLY_AT_FLY
==
rCurrA
.
GetAnchorId
()
)
else
if
(
FLY_AT_FLY
==
rCurrA
.
GetAnchorId
()
)
return
sal_False
;
//
Rahmengebundene weichen abs.geb. nicht au
s
return
sal_False
;
//
Frame anchored ones do not avoid paragraph anchored one
s
// #i57062#
// #i57062#
// In order to avoid loop situation, it's decided to adjust
// In order to avoid loop situation, it's decided to adjust
// the wrapping behaviour of content of at-paragraph/at-character
// the wrapping behaviour of content of at-paragraph/at-character
...
@@ -1196,9 +1190,7 @@ sal_Bool SwTxtFly::GetTop( const SwAnchoredObject* _pAnchoredObj,
...
@@ -1196,9 +1190,7 @@ sal_Bool SwTxtFly::GetTop( const SwAnchoredObject* _pAnchoredObj,
}
}
}
}
// aber: es wird niemals einem hierarchisch untergeordnetem
// But: we never avoid a subordinate one and additionally we only avoid when overlapping.
// ausgewichen und ausserdem braucht nur bei Ueberlappung
// ausgewichen werden.
// #i68520#
// #i68520#
bEvade
&=
(
mpCurrAnchoredObj
->
GetDrawObj
()
->
GetOrdNum
()
<
pNew
->
GetOrdNum
()
);
bEvade
&=
(
mpCurrAnchoredObj
->
GetDrawObj
()
->
GetOrdNum
()
<
pNew
->
GetOrdNum
()
);
if
(
bEvade
)
if
(
bEvade
)
...
@@ -1217,7 +1209,7 @@ sal_Bool SwTxtFly::GetTop( const SwAnchoredObject* _pAnchoredObj,
...
@@ -1217,7 +1209,7 @@ sal_Bool SwTxtFly::GetTop( const SwAnchoredObject* _pAnchoredObj,
OSL_ENSURE
(
FLY_AS_CHAR
!=
rNewA
.
GetAnchorId
(),
OSL_ENSURE
(
FLY_AS_CHAR
!=
rNewA
.
GetAnchorId
(),
"Don't call GetTop with a FlyInCntFrm"
);
"Don't call GetTop with a FlyInCntFrm"
);
if
(
FLY_AT_PAGE
==
rNewA
.
GetAnchorId
())
if
(
FLY_AT_PAGE
==
rNewA
.
GetAnchorId
())
return
sal_True
;
//
Seitengebundenen wird immer ausgewichen.
return
sal_True
;
//
We always avoid page anchored ones
// Wenn absatzgebundene Flys in einem FlyCnt gefangen sind, so
// Wenn absatzgebundene Flys in einem FlyCnt gefangen sind, so
// endet deren Einflussbereich an den Grenzen des FlyCnt!
// endet deren Einflussbereich an den Grenzen des FlyCnt!
...
@@ -2171,7 +2163,7 @@ SwSurround SwTxtFly::_GetSurroundForTextWrap( const SwAnchoredObject* pAnchoredO
...
@@ -2171,7 +2163,7 @@ SwSurround SwTxtFly::_GetSurroundForTextWrap( const SwAnchoredObject* pAnchoredO
/*************************************************************************
/*************************************************************************
* SwTxtFly::IsAnyFrm( SwRect )
* SwTxtFly::IsAnyFrm( SwRect )
*
*
* IN: do
kument
global
* IN: do
cument-
global
*
*
* dient zum Abschalten des SwTxtFly, wenn keine Objekte ueberlappen (Relax)
* dient zum Abschalten des SwTxtFly, wenn keine Objekte ueberlappen (Relax)
*
*
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment