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
17714047
Kaydet (Commit)
17714047
authored
May 22, 2002
tarafından
Frank Meies
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
#99282# CTL - Replaced GetGlyphBoundRect by GetTextBoundRect for drop caps
üst
46862b54
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
51 deletions
+9
-51
txtdrop.cxx
sw/source/core/text/txtdrop.cxx
+9
-51
No files found.
sw/source/core/text/txtdrop.cxx
Dosyayı görüntüle @
17714047
...
@@ -2,9 +2,9 @@
...
@@ -2,9 +2,9 @@
*
*
* $RCSfile: txtdrop.cxx,v $
* $RCSfile: txtdrop.cxx,v $
*
*
* $Revision: 1.1
0
$
* $Revision: 1.1
1
$
*
*
* last change: $Author:
os $ $Date: 2002-04-25 13:57:3
8 $
* last change: $Author:
fme $ $Date: 2002-05-22 07:40:4
8 $
*
*
* The Contents of this file are made available subject to the terms of
* The Contents of this file are made available subject to the terms of
* either of the following licenses
* either of the following licenses
...
@@ -853,12 +853,10 @@ void SwDropCapCache::CalcFontSize( SwDropPortion* pDrop, SwTxtFormatInfo &rInf )
...
@@ -853,12 +853,10 @@ void SwDropCapCache::CalcFontSize( SwDropPortion* pDrop, SwTxtFormatInfo &rInf )
pCurrPart
=
pDrop
->
GetPart
();
pCurrPart
=
pDrop
->
GetPart
();
sal_Bool
bFirstGlyphRect
=
sal_True
;
sal_Bool
bFirstGlyphRect
=
sal_True
;
sal_Bool
bHaveGlyphRect
=
sal_False
;
sal_Bool
bHaveGlyphRect
=
sal_False
;
Rectangle
aCommonRect
,
a
Tmp
,
a
Rect
;
Rectangle
aCommonRect
,
aRect
;
while
(
pCurrPart
)
while
(
pCurrPart
)
{
{
XubString
aTmpStr
(
rInf
.
GetTxt
(),
nIdx
,
pCurrPart
->
GetLen
()
);
// current font
// current font
SwFont
&
rFnt
=
pCurrPart
->
GetFont
();
SwFont
&
rFnt
=
pCurrPart
->
GetFont
();
...
@@ -878,21 +876,9 @@ void SwDropCapCache::CalcFontSize( SwDropPortion* pDrop, SwTxtFormatInfo &rInf )
...
@@ -878,21 +876,9 @@ void SwDropCapCache::CalcFontSize( SwDropPortion* pDrop, SwTxtFormatInfo &rInf )
rFnt
.
GetLeading
(
rInf
.
GetVsh
(),
pOut
);
rFnt
.
GetLeading
(
rInf
.
GetVsh
(),
pOut
);
// Wir besorgen uns das alle Buchstaben umfassende Rechteck:
// Wir besorgen uns das alle Buchstaben umfassende Rechteck:
bHaveGlyphRect
=
sal_False
;
bHaveGlyphRect
=
pOut
->
GetTextBoundRect
(
aRect
,
rInf
.
GetTxt
(),
0
,
for
(
xub_StrLen
i
=
0
;
i
<
pCurrPart
->
GetLen
();
i
++
)
nIdx
,
pCurrPart
->
GetLen
()
)
&&
{
!
aRect
.
IsEmpty
();
if
(
pOut
->
GetGlyphBoundRect
(
aTmpStr
.
GetChar
(
i
),
aTmp
,
sal_False
)
&&
!
aTmp
.
IsEmpty
()
)
{
if
(
bHaveGlyphRect
)
aRect
.
Union
(
aTmp
);
else
{
aRect
=
aTmp
;
bHaveGlyphRect
=
sal_True
;
}
}
}
if
(
!
bHaveGlyphRect
)
if
(
!
bHaveGlyphRect
)
{
{
...
@@ -909,20 +895,9 @@ void SwDropCapCache::CalcFontSize( SwDropPortion* pDrop, SwTxtFormatInfo &rInf )
...
@@ -909,20 +895,9 @@ void SwDropCapCache::CalcFontSize( SwDropPortion* pDrop, SwTxtFormatInfo &rInf )
}
}
pWin
->
SetFont
(
rFnt
.
GetActualFont
()
);
pWin
->
SetFont
(
rFnt
.
GetActualFont
()
);
for
(
xub_StrLen
i
=
0
;
i
<
pCurrPart
->
GetLen
();
i
++
)
bHaveGlyphRect
=
pWin
->
GetTextBoundRect
(
aRect
,
rInf
.
GetTxt
(),
0
,
{
nIdx
,
pCurrPart
->
GetLen
()
)
&&
if
(
pWin
->
GetGlyphBoundRect
(
aTmpStr
.
GetChar
(
i
),
aTmp
,
sal_False
)
!
aRect
.
IsEmpty
();
&&
!
aTmp
.
IsEmpty
()
)
{
if
(
bHaveGlyphRect
)
aRect
.
Union
(
aTmp
);
else
{
aRect
=
aTmp
;
bHaveGlyphRect
=
sal_True
;
}
}
}
}
}
if
(
bHaveGlyphRect
)
if
(
bHaveGlyphRect
)
{
{
...
@@ -943,23 +918,6 @@ void SwDropCapCache::CalcFontSize( SwDropPortion* pDrop, SwTxtFormatInfo &rInf )
...
@@ -943,23 +918,6 @@ void SwDropCapCache::CalcFontSize( SwDropPortion* pDrop, SwTxtFormatInfo &rInf )
rFnt
.
SetSize
(
aOldSize
,
rFnt
.
GetActual
()
);
rFnt
.
SetSize
(
aOldSize
,
rFnt
.
GetActual
()
);
rFnt
.
SetProportion
(
nOldProp
);
rFnt
.
SetProportion
(
nOldProp
);
// shift aRect to have baseline 0
#ifdef VERTICAL_LAYOUT
if
(
rInf
.
GetTxtFrm
()
->
IsVertical
()
)
{
aRect
.
Right
()
+=
nAscent
;
aRect
.
Left
()
+=
nAscent
;
}
else
{
aRect
.
Top
()
-=
nAscent
;
aRect
.
Bottom
()
-=
nAscent
;
}
#else
aRect
.
Top
()
-=
nAscent
;
aRect
.
Bottom
()
-=
nAscent
;
#endif
if
(
bFirstGlyphRect
)
if
(
bFirstGlyphRect
)
{
{
aCommonRect
=
aRect
;
aCommonRect
=
aRect
;
...
...
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