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
cf6c32b7
Kaydet (Commit)
cf6c32b7
authored
Haz 05, 2012
tarafından
Philipp Weissenbacher
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Translate German comments, actualize some English ones
Change-Id: I460be3ddef4a5f2f71682895a5819923eb1d149e
üst
561aeedf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
34 deletions
+32
-34
porlay.cxx
sw/source/core/text/porlay.cxx
+32
-34
No files found.
sw/source/core/text/porlay.cxx
Dosyayı görüntüle @
cf6c32b7
...
@@ -142,13 +142,11 @@ sal_Bool lcl_ConnectToPrev( xub_Unicode cCh, xub_Unicode cPrevCh )
...
@@ -142,13 +142,11 @@ sal_Bool lcl_ConnectToPrev( xub_Unicode cCh, xub_Unicode cPrevCh )
/*************************************************************************
/*************************************************************************
* SwLineLayout::~SwLineLayout()
* SwLineLayout::~SwLineLayout()
*
*
* class SwLineLayout: Das Layout einer einzelnen Zeile. Dazu
* class SwLineLayout: This is the layout of a single line, which is made
* gehoeren vor allen Dingen die Dimension, die Anzahl der
* up of it's dimension, the character count and the word spacing in the
* Character und der Wortzwischenraeume in der Zeile.
* line.
* Zeilenobjekte werden in einem eigenen Pool verwaltet, um zu
* Line objects are managed in an own pool, in order to store them continuously
* erreichen, dass sie im Speicher moeglichst beeinander liegen
* in memory so that they are paged out together and don't fragment memory.
* (d.h. zusammen gepaged werden und den Speicher nicht
* fragmentieren).
*************************************************************************/
*************************************************************************/
SwLineLayout
::~
SwLineLayout
()
SwLineLayout
::~
SwLineLayout
()
...
@@ -163,8 +161,8 @@ SwLineLayout::~SwLineLayout()
...
@@ -163,8 +161,8 @@ SwLineLayout::~SwLineLayout()
SwLinePortion
*
SwLineLayout
::
Insert
(
SwLinePortion
*
pIns
)
SwLinePortion
*
SwLineLayout
::
Insert
(
SwLinePortion
*
pIns
)
{
{
// Erster Attributwechsel, Masse und Laengen
// First attribute change: copy mass and length from *pIns into the first
// aus *pCurr in die erste Textportion kopieren.
// text portion
if
(
!
pPortion
)
if
(
!
pPortion
)
{
{
if
(
GetLen
()
)
if
(
GetLen
()
)
...
@@ -182,21 +180,21 @@ SwLinePortion *SwLineLayout::Insert( SwLinePortion *pIns )
...
@@ -182,21 +180,21 @@ SwLinePortion *SwLineLayout::Insert( SwLinePortion *pIns )
return
pIns
;
return
pIns
;
}
}
}
}
//
mit Skope aufrufen, sonst Rekursion
!
//
Call with scope or we'll end up with recursion
!
return
pPortion
->
SwLinePortion
::
Insert
(
pIns
);
return
pPortion
->
SwLinePortion
::
Insert
(
pIns
);
}
}
SwLinePortion
*
SwLineLayout
::
Append
(
SwLinePortion
*
pIns
)
SwLinePortion
*
SwLineLayout
::
Append
(
SwLinePortion
*
pIns
)
{
{
//
Erster Attributwechsel, Masse und Laengen
//
First attribute change: copy mass and length from *pIns into the first
//
aus *pCurr in die erste Textportion kopieren.
//
text portion
if
(
!
pPortion
)
if
(
!
pPortion
)
pPortion
=
new
SwTxtPortion
(
*
(
SwLinePortion
*
)
this
);
pPortion
=
new
SwTxtPortion
(
*
(
SwLinePortion
*
)
this
);
//
mit Skope aufrufen, sonst Rekursion
!
//
Call with scope or we'll end up with recursion
!
return
pPortion
->
SwLinePortion
::
Append
(
pIns
);
return
pPortion
->
SwLinePortion
::
Append
(
pIns
);
}
}
//
fuer die Sonderbehandlung bei leeren Zeilen
//
For special treatment of empty lines
sal_Bool
SwLineLayout
::
Format
(
SwTxtFormatInfo
&
rInf
)
sal_Bool
SwLineLayout
::
Format
(
SwTxtFormatInfo
&
rInf
)
{
{
...
@@ -212,7 +210,8 @@ sal_Bool SwLineLayout::Format( SwTxtFormatInfo &rInf )
...
@@ -212,7 +210,8 @@ sal_Bool SwLineLayout::Format( SwTxtFormatInfo &rInf )
/*************************************************************************
/*************************************************************************
* SwLineLayout::CalcLeftMargin()
* SwLineLayout::CalcLeftMargin()
*
*
* Wir sammeln alle FlyPortions am Anfang der Zeile zu einer MarginPortion.
* We collect all FlyPortions at the beginning of the line and make that a
* MarginPortion.
*************************************************************************/
*************************************************************************/
SwMarginPortion
*
SwLineLayout
::
CalcLeftMargin
()
SwMarginPortion
*
SwLineLayout
::
CalcLeftMargin
()
...
@@ -242,7 +241,7 @@ SwMarginPortion *SwLineLayout::CalcLeftMargin()
...
@@ -242,7 +241,7 @@ SwMarginPortion *SwLineLayout::CalcLeftMargin()
{
{
if
(
pPos
->
IsFlyPortion
()
)
if
(
pPos
->
IsFlyPortion
()
)
{
{
//
Die FlyPortion wird ausgesogen
...
//
The FlyPortion get's sucked out
...
pLeft
->
Join
(
(
SwGluePortion
*
)
pPos
);
pLeft
->
Join
(
(
SwGluePortion
*
)
pPos
);
pPos
=
pLeft
->
GetPortion
();
pPos
=
pLeft
->
GetPortion
();
if
(
GetpKanaComp
()
&&
!
GetKanaComp
().
empty
()
)
if
(
GetpKanaComp
()
&&
!
GetKanaComp
().
empty
()
)
...
@@ -291,7 +290,7 @@ bool lcl_HasOnlyBlanks( const XubString& rTxt, xub_StrLen nStt, xub_StrLen nEnd
...
@@ -291,7 +290,7 @@ bool lcl_HasOnlyBlanks( const XubString& rTxt, xub_StrLen nStt, xub_StrLen nEnd
/*************************************************************************
/*************************************************************************
* SwLineLayout::CalcLine()
* SwLineLayout::CalcLine()
*
*
*
Aus FormatLine() ausgelagert.
*
Swapped out from FormatLine()
*************************************************************************/
*************************************************************************/
void
SwLineLayout
::
CalcLine
(
SwTxtFormatter
&
rLine
,
SwTxtFormatInfo
&
rInf
)
void
SwLineLayout
::
CalcLine
(
SwTxtFormatter
&
rLine
,
SwTxtFormatInfo
&
rInf
)
...
@@ -336,20 +335,19 @@ void SwLineLayout::CalcLine( SwTxtFormatter &rLine, SwTxtFormatInfo &rInf )
...
@@ -336,20 +335,19 @@ void SwLineLayout::CalcLine( SwTxtFormatter &rLine, SwTxtFormatInfo &rInf )
SwLinePortion
*
pLast
=
this
;
SwLinePortion
*
pLast
=
this
;
KSHORT
nMaxDescent
=
0
;
KSHORT
nMaxDescent
=
0
;
// Eine Gruppe ist ein Abschnitt in der Portion-Kette von
// A group is a segment in the portion chain of pCurr or a fixed
// pCurr oder einer Fix-Portion bis zum Ende bzw. zur naechsten
// portion spanning to the end or the next fixed portion
// Fix-Portion.
while
(
pPos
)
while
(
pPos
)
{
{
OSL_ENSURE
(
POR_LIN
!=
pPos
->
GetWhichPor
(),
OSL_ENSURE
(
POR_LIN
!=
pPos
->
GetWhichPor
(),
"SwLineLayout::CalcLine: don't use SwLinePortions !"
);
"SwLineLayout::CalcLine: don't use SwLinePortions !"
);
// Null
-Portions werden eliminiert. Sie koennen entstehen,
// Null
portions are eliminated. They can form if two FlyFrms
//
wenn zwei FlyFrms ueberlappen
.
//
overlap
.
if
(
!
pPos
->
Compress
()
)
if
(
!
pPos
->
Compress
()
)
{
{
//
8110: Hoehe und Ascent nur uebernehmen, wenn sonst in der
//
Only take over Height and Ascent if the rest of the line
//
Zeile nichts mehr los ist
.
//
is empty
.
if
(
!
pPos
->
GetPortion
()
)
if
(
!
pPos
->
GetPortion
()
)
{
{
if
(
!
Height
()
)
if
(
!
Height
()
)
...
@@ -382,8 +380,7 @@ void SwLineLayout::CalcLine( SwTxtFormatter &rLine, SwTxtFormatInfo &rInf )
...
@@ -382,8 +380,7 @@ void SwLineLayout::CalcLine( SwTxtFormatter &rLine, SwTxtFormatInfo &rInf )
bHasOnlyBlankPortions
=
false
;
bHasOnlyBlankPortions
=
false
;
// Es gab Attributwechsel: Laengen und Masse aufaddieren;
// We had an attribute change: Sum up/build maxima of length and mass
// bzw.Maxima bilden.
KSHORT
nPosHeight
=
pPos
->
Height
();
KSHORT
nPosHeight
=
pPos
->
Height
();
KSHORT
nPosAscent
=
pPos
->
GetAscent
();
KSHORT
nPosAscent
=
pPos
->
GetAscent
();
...
@@ -397,8 +394,9 @@ void SwLineLayout::CalcLine( SwTxtFormatter &rLine, SwTxtFormatInfo &rInf )
...
@@ -397,8 +394,9 @@ void SwLineLayout::CalcLine( SwTxtFormatter &rLine, SwTxtFormatInfo &rInf )
rInf
.
GetParaPortion
()
->
SetMargin
(
sal_True
);
rInf
.
GetParaPortion
()
->
SetMargin
(
sal_True
);
}
}
// Damit ein Paragraphende-Zeichen nicht durch ein Descent zu einer
// To prevent that a paragraph-end-character does not change
// geaenderten Zeilenhoehe und zum Umformatieren fuehrt.
// the line height through a Descent and thus causing the line
// to reformat.
if
(
!
pPos
->
IsBreakPortion
()
||
!
Height
()
)
if
(
!
pPos
->
IsBreakPortion
()
||
!
Height
()
)
{
{
bOnlyPostIts
&=
pPos
->
IsPostItsPortion
();
bOnlyPostIts
&=
pPos
->
IsPostItsPortion
();
...
@@ -1580,7 +1578,7 @@ sal_uInt8 SwScriptInfo::CompType( const xub_StrLen nPos ) const
...
@@ -1580,7 +1578,7 @@ sal_uInt8 SwScriptInfo::CompType( const xub_StrLen nPos ) const
/*************************************************************************
/*************************************************************************
* SwScriptInfo::HasKana()
* SwScriptInfo::HasKana()
* returns, if there are compressable kanas or specials
* returns, if there are compressable kanas or specials
* betwe
n
n nStart and nEnd
* betwe
e
n nStart and nEnd
*************************************************************************/
*************************************************************************/
sal_uInt16
SwScriptInfo
::
HasKana
(
xub_StrLen
nStart
,
const
xub_StrLen
nLen
)
const
sal_uInt16
SwScriptInfo
::
HasKana
(
xub_StrLen
nStart
,
const
xub_StrLen
nLen
)
const
...
@@ -1735,7 +1733,7 @@ sal_uInt16 SwScriptInfo::KashidaJustify( sal_Int32* pKernArray,
...
@@ -1735,7 +1733,7 @@ sal_uInt16 SwScriptInfo::KashidaJustify( sal_Int32* pKernArray,
if
(
!
IsKashidaLine
(
nStt
))
if
(
!
IsKashidaLine
(
nStt
))
return
STRING_LEN
;
return
STRING_LEN
;
// evaluate kashida informatin in collected in SwScriptInfo
// evaluate kashida informati
o
n in collected in SwScriptInfo
sal_uInt16
nCntKash
=
0
;
sal_uInt16
nCntKash
=
0
;
while
(
nCntKash
<
CountKashida
()
)
while
(
nCntKash
<
CountKashida
()
)
...
@@ -1996,7 +1994,7 @@ void SwScriptInfo::ClearNoKashidaLine ( xub_StrLen nStt, xub_StrLen nLen )
...
@@ -1996,7 +1994,7 @@ void SwScriptInfo::ClearNoKashidaLine ( xub_StrLen nStt, xub_StrLen nLen )
}
}
/*************************************************************************
/*************************************************************************
*
SwScriptInfo::MarkKashidasInvalid()
* SwScriptInfo::MarkKashidasInvalid()
*
*
* mark the given character indices as invalid kashida positions
* mark the given character indices as invalid kashida positions
************************************************************************/
************************************************************************/
...
@@ -2139,7 +2137,7 @@ void SwLineLayout::Init( SwLinePortion* pNextPortion )
...
@@ -2139,7 +2137,7 @@ void SwLineLayout::Init( SwLinePortion* pNextPortion )
* HangingMargin()
* HangingMargin()
* looks for hanging punctuation portions in the paragraph
* looks for hanging punctuation portions in the paragraph
* and return the maximum right offset of them.
* and return the maximum right offset of them.
* If no such portion is found, the Margin/Hanging-flags will be
atualiz
ed.
* If no such portion is found, the Margin/Hanging-flags will be
updat
ed.
* --------------------------------------------------*/
* --------------------------------------------------*/
SwTwips
SwLineLayout
::
_GetHangingMargin
()
const
SwTwips
SwLineLayout
::
_GetHangingMargin
()
const
...
@@ -2161,7 +2159,7 @@ SwTwips SwLineLayout::_GetHangingMargin() const
...
@@ -2161,7 +2159,7 @@ SwTwips SwLineLayout::_GetHangingMargin() const
pPor
=
pPor
->
GetPortion
();
pPor
=
pPor
->
GetPortion
();
}
}
if
(
!
bFound
)
//
actualiz
e the hanging-flag
if
(
!
bFound
)
//
updat
e the hanging-flag
((
SwLineLayout
*
)
this
)
->
SetHanging
(
sal_False
);
((
SwLineLayout
*
)
this
)
->
SetHanging
(
sal_False
);
return
nDiff
;
return
nDiff
;
}
}
...
@@ -2180,7 +2178,7 @@ SwTwips SwTxtFrm::HangingMargin() const
...
@@ -2180,7 +2178,7 @@ SwTwips SwTxtFrm::HangingMargin() const
nRet
=
nDiff
;
nRet
=
nDiff
;
pLine
=
pLine
->
GetNext
();
pLine
=
pLine
->
GetNext
();
}
while
(
pLine
);
}
while
(
pLine
);
if
(
!
nRet
)
//
actualiz
e the margin-flag
if
(
!
nRet
)
//
updat
e the margin-flag
((
SwParaPortion
*
)
GetPara
())
->
SetMargin
(
sal_False
);
((
SwParaPortion
*
)
GetPara
())
->
SetMargin
(
sal_False
);
return
nRet
;
return
nRet
;
}
}
...
...
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