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
ee5456af
Kaydet (Commit)
ee5456af
authored
May 09, 2018
tarafından
Michael Stahl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
sw_redlinehide: trivial conversions in itrpaint.cxx
Change-Id: I12cdc805c3e07840b5b914397026a48a589785ea
üst
405daebf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
14 deletions
+15
-14
itrpaint.cxx
sw/source/core/text/itrpaint.cxx
+15
-14
No files found.
sw/source/core/text/itrpaint.cxx
Dosyayı görüntüle @
ee5456af
...
@@ -317,7 +317,7 @@ void SwTextPainter::DrawTextLine( const SwRect &rPaint, SwSaveClip &rClip,
...
@@ -317,7 +317,7 @@ void SwTextPainter::DrawTextLine( const SwRect &rPaint, SwSaveClip &rClip,
SeekAndChgBefore
(
GetInfo
()
);
SeekAndChgBefore
(
GetInfo
()
);
else
if
(
pPor
->
IsQuoVadisPortion
()
)
else
if
(
pPor
->
IsQuoVadisPortion
()
)
{
{
sal_Int32
nOffset
=
GetInfo
().
GetIdx
();
TextFrameIndex
nOffset
=
GetInfo
().
GetIdx
();
SeekStartAndChg
(
GetInfo
(),
true
);
SeekStartAndChg
(
GetInfo
(),
true
);
if
(
GetRedln
()
&&
m_pCurr
->
HasRedline
()
)
if
(
GetRedln
()
&&
m_pCurr
->
HasRedline
()
)
GetRedln
()
->
Seek
(
*
m_pFont
,
nOffset
,
0
);
GetRedln
()
->
Seek
(
*
m_pFont
,
nOffset
,
0
);
...
@@ -428,7 +428,7 @@ void SwTextPainter::DrawTextLine( const SwRect &rPaint, SwSaveClip &rClip,
...
@@ -428,7 +428,7 @@ void SwTextPainter::DrawTextLine( const SwRect &rPaint, SwSaveClip &rClip,
if
(
!
GetNextLine
()
&&
if
(
!
GetNextLine
()
&&
GetInfo
().
GetVsh
()
&&
!
GetInfo
().
GetVsh
()
->
IsPreview
()
&&
GetInfo
().
GetVsh
()
&&
!
GetInfo
().
GetVsh
()
->
IsPreview
()
&&
GetInfo
().
GetOpt
().
IsParagraph
()
&&
!
GetTextFrame
()
->
GetFollow
()
&&
GetInfo
().
GetOpt
().
IsParagraph
()
&&
!
GetTextFrame
()
->
GetFollow
()
&&
GetInfo
().
GetIdx
()
>=
GetInfo
().
GetText
().
getLength
()
)
GetInfo
().
GetIdx
()
>=
TextFrameIndex
(
GetInfo
().
GetText
().
getLength
())
)
{
{
const
SwTmpEndPortion
aEnd
(
*
pEndTempl
);
const
SwTmpEndPortion
aEnd
(
*
pEndTempl
);
GetFnt
()
->
ChgPhysFnt
(
GetInfo
().
GetVsh
(),
*
pOut
);
GetFnt
()
->
ChgPhysFnt
(
GetInfo
().
GetVsh
(),
*
pOut
);
...
@@ -460,7 +460,7 @@ void SwTextPainter::DrawTextLine( const SwRect &rPaint, SwSaveClip &rClip,
...
@@ -460,7 +460,7 @@ void SwTextPainter::DrawTextLine( const SwRect &rPaint, SwSaveClip &rClip,
// GetInfo().Y() must be current baseline
// GetInfo().Y() must be current baseline
SwTwips
nDiff
=
GetInfo
().
Y
()
+
nTmpHeight
-
nTmpAscent
-
GetTextFrame
()
->
getFrameArea
().
Bottom
();
SwTwips
nDiff
=
GetInfo
().
Y
()
+
nTmpHeight
-
nTmpAscent
-
GetTextFrame
()
->
getFrameArea
().
Bottom
();
if
(
(
nDiff
>
0
&&
if
(
(
nDiff
>
0
&&
(
GetEnd
()
<
GetInfo
().
GetText
().
getLength
(
)
||
(
GetEnd
()
<
TextFrameIndex
(
GetInfo
().
GetText
().
getLength
()
)
||
(
nDiff
>
nTmpHeight
/
2
&&
GetPrevLine
()
)
)
)
||
(
nDiff
>
nTmpHeight
/
2
&&
GetPrevLine
()
)
)
)
||
(
nDiff
>=
0
&&
bNextUndersized
)
)
(
nDiff
>=
0
&&
bNextUndersized
)
)
...
@@ -490,7 +490,8 @@ void SwTextPainter::CheckSpecialUnderline( const SwLinePortion* pPor,
...
@@ -490,7 +490,8 @@ void SwTextPainter::CheckSpecialUnderline( const SwLinePortion* pPor,
return
;
return
;
}
}
// Reuse calculated underline font as much as possible.
// Reuse calculated underline font as much as possible.
if
(
GetInfo
().
GetUnderFnt
()
&&
GetInfo
().
GetIdx
()
+
pPor
->
GetLen
()
<=
GetInfo
().
GetUnderFnt
()
->
GetEnd
()
+
1
)
if
(
GetInfo
().
GetUnderFnt
()
&&
GetInfo
().
GetIdx
()
+
pPor
->
GetLen
()
<=
GetInfo
().
GetUnderFnt
()
->
GetEnd
()
+
TextFrameIndex
(
1
))
{
{
SwFont
&
rFont
=
GetInfo
().
GetUnderFnt
()
->
GetFont
();
SwFont
&
rFont
=
GetInfo
().
GetUnderFnt
()
->
GetFont
();
const
Color
aColor
=
GetUnderColor
(
GetInfo
().
GetFont
()
);
const
Color
aColor
=
GetUnderColor
(
GetInfo
().
GetFont
()
);
...
@@ -536,47 +537,47 @@ void SwTextPainter::CheckSpecialUnderline( const SwLinePortion* pPor,
...
@@ -536,47 +537,47 @@ void SwTextPainter::CheckSpecialUnderline( const SwLinePortion* pPor,
}
}
}
}
const
sal_Int32
nIndx
=
GetInfo
().
GetIdx
();
const
TextFrameIndex
nIndx
=
GetInfo
().
GetIdx
();
long
nUnderEnd
=
0
;
TextFrameIndex
nUnderEnd
(
0
)
;
const
size_t
nCnt
=
aUnderMulti
.
GetRangeCount
();
const
size_t
nCnt
=
aUnderMulti
.
GetRangeCount
();
// find the underline range the current portion is contained in
// find the underline range the current portion is contained in
for
(
size_t
i
=
0
;
i
<
nCnt
;
++
i
)
for
(
size_t
i
=
0
;
i
<
nCnt
;
++
i
)
{
{
const
Range
&
rRange
=
aUnderMulti
.
GetRange
(
i
);
const
Range
&
rRange
=
aUnderMulti
.
GetRange
(
i
);
if
(
nUnderEnd
==
rRange
.
Min
()
)
if
(
nUnderEnd
==
TextFrameIndex
(
rRange
.
Min
())
)
nUnderEnd
=
rRange
.
Max
(
);
nUnderEnd
=
TextFrameIndex
(
rRange
.
Max
()
);
else
if
(
nIndx
>=
rRange
.
Min
()
)
else
if
(
nIndx
>=
TextFrameIndex
(
rRange
.
Min
())
)
{
{
nUnderEnd
=
rRange
.
Max
(
);
nUnderEnd
=
TextFrameIndex
(
rRange
.
Max
()
);
}
}
else
else
break
;
break
;
}
}
if
(
GetEnd
()
&&
GetEnd
()
<=
nUnderEnd
)
if
(
GetEnd
()
&&
GetEnd
()
<=
nUnderEnd
)
nUnderEnd
=
GetEnd
()
-
1
;
nUnderEnd
=
GetEnd
()
-
TextFrameIndex
(
1
)
;
// calculate the new common underline font
// calculate the new common underline font
SwFont
*
pUnderlineFnt
=
nullptr
;
SwFont
*
pUnderlineFnt
=
nullptr
;
Point
aCommonBaseLine
;
Point
aCommonBaseLine
;
// check, if underlining is not isolated
// check, if underlining is not isolated
if
(
nIndx
+
GetInfo
().
GetLen
()
<
nUnderEnd
+
1
)
if
(
nIndx
+
GetInfo
().
GetLen
()
<
nUnderEnd
+
TextFrameIndex
(
1
)
)
{
{
// here starts the algorithm for calculating the underline font
// here starts the algorithm for calculating the underline font
SwScriptInfo
&
rScriptInfo
=
GetInfo
().
GetParaPortion
()
->
GetScriptInfo
();
SwScriptInfo
&
rScriptInfo
=
GetInfo
().
GetParaPortion
()
->
GetScriptInfo
();
SwAttrIter
aIter
(
*
GetInfo
().
GetTextFrame
()
->
GetTextNode
(),
SwAttrIter
aIter
(
*
GetInfo
().
GetTextFrame
()
->
GetTextNode
(),
rScriptInfo
);
rScriptInfo
);
sal_Int32
nTmpIdx
=
nIndx
;
TextFrameIndex
nTmpIdx
=
nIndx
;
sal_uLong
nSumWidth
=
0
;
sal_uLong
nSumWidth
=
0
;
sal_uLong
nSumHeight
=
0
;
sal_uLong
nSumHeight
=
0
;
sal_uLong
nBold
=
0
;
sal_uLong
nBold
=
0
;
sal_uInt16
nMaxBaseLineOfst
=
0
;
sal_uInt16
nMaxBaseLineOfst
=
0
;
int
nNumberOfPortions
=
0
;
int
nNumberOfPortions
=
0
;
while
(
sal
::
static_int_cast
<
long
>
(
nTmpIdx
)
<=
nUnderEnd
&&
pPor
)
while
(
nTmpIdx
<=
nUnderEnd
&&
pPor
)
{
{
if
(
pPor
->
IsFlyPortion
()
||
pPor
->
IsFlyCntPortion
()
||
if
(
pPor
->
IsFlyPortion
()
||
pPor
->
IsFlyCntPortion
()
||
pPor
->
IsBreakPortion
()
||
pPor
->
IsMarginPortion
()
||
pPor
->
IsBreakPortion
()
||
pPor
->
IsMarginPortion
()
||
...
...
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