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
a827957f
Kaydet (Commit)
a827957f
authored
Eki 28, 2015
tarafından
Miklos Vajna
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
sw: prefix members of SwSubFont
Change-Id: Ifc4ec214ad7034ecf694c690c3a04e995c64fbe9
üst
495f4ca3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
103 additions
and
103 deletions
+103
-103
swfont.hxx
sw/source/core/inc/swfont.hxx
+56
-56
fntcap.cxx
sw/source/core/txtnode/fntcap.cxx
+1
-1
swfont.cxx
sw/source/core/txtnode/swfont.cxx
+46
-46
No files found.
sw/source/core/inc/swfont.hxx
Dosyayı görüntüle @
a827957f
...
@@ -49,15 +49,15 @@ sal_uInt16 UnMapDirection( sal_uInt16 nDir, const bool bVertFormat );
...
@@ -49,15 +49,15 @@ sal_uInt16 UnMapDirection( sal_uInt16 nDir, const bool bVertFormat );
class
SwSubFont
:
public
SvxFont
class
SwSubFont
:
public
SvxFont
{
{
friend
class
SwFont
;
friend
class
SwFont
;
const
void
*
pMagic
;
// "MagicNumber" within the font cache
const
void
*
m_
pMagic
;
// "MagicNumber" within the font cache
Size
aSize
;
// foreigners only see this size
Size
m_
aSize
;
// foreigners only see this size
sal_uInt16
nF
ntIndex
;
// index in the font cache
sal_uInt16
m_nFo
ntIndex
;
// index in the font cache
sal_uInt16
nOrgHeight
;
// height including escapement/proportion
sal_uInt16
m_
nOrgHeight
;
// height including escapement/proportion
sal_uInt16
nOrgAscent
;
// ascent including escapement/proportion
sal_uInt16
m_
nOrgAscent
;
// ascent including escapement/proportion
sal_uInt16
nProp
Width
;
// proportional width
sal_uInt16
m_nProportional
Width
;
// proportional width
bool
s
mallCapsPercentage66
;
bool
m_bS
mallCapsPercentage66
;
inline
SwSubFont
()
:
aSize
(
0
,
0
)
inline
SwSubFont
()
:
m_
aSize
(
0
,
0
)
{
pMagic
=
NULL
;
nFntIndex
=
nOrgHeight
=
nOrgAscent
=
0
;
nPropWidth
=
100
;
s
mallCapsPercentage66
=
false
;
}
{
m_pMagic
=
NULL
;
m_nFontIndex
=
m_nOrgHeight
=
m_nOrgAscent
=
0
;
m_nProportionalWidth
=
100
;
m_bS
mallCapsPercentage66
=
false
;
}
sal_uInt16
CalcEscAscent
(
const
sal_uInt16
nOldAscent
)
const
;
sal_uInt16
CalcEscAscent
(
const
sal_uInt16
nOldAscent
)
const
;
sal_uInt16
CalcEscHeight
(
const
sal_uInt16
nOldHeight
,
sal_uInt16
CalcEscHeight
(
const
sal_uInt16
nOldHeight
,
...
@@ -112,9 +112,9 @@ class SwSubFont : public SvxFont
...
@@ -112,9 +112,9 @@ class SwSubFont : public SvxFont
inline
short
CheckKerning
()
inline
short
CheckKerning
()
{
return
GetFixKerning
()
>=
0
?
GetFixKerning
()
:
_CheckKerning
(
);
}
{
return
GetFixKerning
()
>=
0
?
GetFixKerning
()
:
_CheckKerning
(
);
}
inline
void
SetPropWidth
(
const
sal_uInt16
nNew
)
inline
void
SetPropWidth
(
const
sal_uInt16
nNew
)
{
pMagic
=
0
;
nProp
Width
=
nNew
;
}
{
m_pMagic
=
0
;
m_nProportional
Width
=
nNew
;
}
public
:
public
:
sal_uInt16
GetPropWidth
()
const
{
return
nProp
Width
;
}
sal_uInt16
GetPropWidth
()
const
{
return
m_nProportional
Width
;
}
};
};
#define SW_LATIN 0
#define SW_LATIN 0
...
@@ -191,17 +191,17 @@ public:
...
@@ -191,17 +191,17 @@ public:
const
Color
&
GetHighlightColor
()
const
{
return
m_aHighlightColor
;
}
const
Color
&
GetHighlightColor
()
const
{
return
m_aHighlightColor
;
}
inline
void
ChkMagic
(
SwViewShell
*
pSh
,
sal_uInt8
nWhich
)
inline
void
ChkMagic
(
SwViewShell
*
pSh
,
sal_uInt8
nWhich
)
{
if
(
!
m_aSub
[
nWhich
].
pMagic
)
GoMagic
(
pSh
,
nWhich
);
}
{
if
(
!
m_aSub
[
nWhich
].
m_
pMagic
)
GoMagic
(
pSh
,
nWhich
);
}
inline
void
GetMagic
(
const
void
*
&
rMagic
,
sal_uInt16
&
rIdx
,
sal_uInt8
nWhich
)
inline
void
GetMagic
(
const
void
*
&
rMagic
,
sal_uInt16
&
rIdx
,
sal_uInt8
nWhich
)
{
rMagic
=
m_aSub
[
nWhich
].
pMagic
;
rIdx
=
m_aSub
[
nWhich
].
nF
ntIndex
;
}
{
rMagic
=
m_aSub
[
nWhich
].
m_pMagic
;
rIdx
=
m_aSub
[
nWhich
].
m_nFo
ntIndex
;
}
inline
void
SetMagic
(
const
void
*
pNew
,
const
sal_uInt16
nIdx
,
sal_uInt8
nWhich
)
inline
void
SetMagic
(
const
void
*
pNew
,
const
sal_uInt16
nIdx
,
sal_uInt8
nWhich
)
{
m_aSub
[
nWhich
].
pMagic
=
pNew
;
m_aSub
[
nWhich
].
nF
ntIndex
=
nIdx
;
}
{
m_aSub
[
nWhich
].
m_pMagic
=
pNew
;
m_aSub
[
nWhich
].
m_nFo
ntIndex
=
nIdx
;
}
inline
bool
DifferentMagic
(
const
SwFont
*
pFnt
,
sal_uInt8
nWhich
)
inline
bool
DifferentMagic
(
const
SwFont
*
pFnt
,
sal_uInt8
nWhich
)
{
return
m_aSub
[
nWhich
].
pMagic
!=
pFnt
->
m_aSub
[
nWhich
].
pMagic
||
{
return
m_aSub
[
nWhich
].
m_pMagic
!=
pFnt
->
m_aSub
[
nWhich
].
m_
pMagic
||
!
m_aSub
[
nWhich
].
pMagic
||
!
pFnt
->
m_aSub
[
nWhich
].
pMagic
;
}
!
m_aSub
[
nWhich
].
m_pMagic
||
!
pFnt
->
m_aSub
[
nWhich
].
m_
pMagic
;
}
inline
const
Size
&
GetSize
(
sal_uInt8
nWhich
)
const
inline
const
Size
&
GetSize
(
sal_uInt8
nWhich
)
const
{
return
m_aSub
[
nWhich
].
aSize
;
}
{
return
m_aSub
[
nWhich
].
m_
aSize
;
}
inline
bool
IsFntChg
()
const
{
return
m_bFontChg
;
}
inline
bool
IsFntChg
()
const
{
return
m_bFontChg
;
}
inline
void
SetFntChg
(
const
bool
bNew
)
{
m_bFontChg
=
bNew
;
}
inline
void
SetFntChg
(
const
bool
bNew
)
{
m_bFontChg
=
bNew
;
}
...
@@ -413,14 +413,14 @@ inline void SwFont::SetColor( const Color& rColor )
...
@@ -413,14 +413,14 @@ inline void SwFont::SetColor( const Color& rColor )
// encapsulated SV-Font-method
// encapsulated SV-Font-method
inline
void
SwSubFont
::
SetColor
(
const
Color
&
rColor
)
inline
void
SwSubFont
::
SetColor
(
const
Color
&
rColor
)
{
{
pMagic
=
0
;
m_
pMagic
=
0
;
Font
::
SetColor
(
rColor
);
Font
::
SetColor
(
rColor
);
}
}
// encapsulated SV-Font-method
// encapsulated SV-Font-method
inline
void
SwSubFont
::
SetFillColor
(
const
Color
&
rColor
)
inline
void
SwSubFont
::
SetFillColor
(
const
Color
&
rColor
)
{
{
pMagic
=
0
;
m_
pMagic
=
0
;
Font
::
SetFillColor
(
rColor
);
Font
::
SetFillColor
(
rColor
);
}
}
...
@@ -435,7 +435,7 @@ inline void SwFont::SetFillColor( const Color& rColor )
...
@@ -435,7 +435,7 @@ inline void SwFont::SetFillColor( const Color& rColor )
// encapsulated SV-Font-method
// encapsulated SV-Font-method
inline
void
SwSubFont
::
SetFamily
(
const
FontFamily
eFamily
)
inline
void
SwSubFont
::
SetFamily
(
const
FontFamily
eFamily
)
{
{
pMagic
=
0
;
m_
pMagic
=
0
;
Font
::
SetFamily
(
eFamily
);
Font
::
SetFamily
(
eFamily
);
}
}
...
@@ -448,7 +448,7 @@ inline void SwFont::SetFamily( const FontFamily eFamily, const sal_uInt8 nWhich
...
@@ -448,7 +448,7 @@ inline void SwFont::SetFamily( const FontFamily eFamily, const sal_uInt8 nWhich
// encapsulated SV-Font-method
// encapsulated SV-Font-method
inline
void
SwSubFont
::
SetName
(
const
OUString
&
rName
)
inline
void
SwSubFont
::
SetName
(
const
OUString
&
rName
)
{
{
pMagic
=
0
;
m_
pMagic
=
0
;
Font
::
SetName
(
rName
);
Font
::
SetName
(
rName
);
}
}
...
@@ -461,7 +461,7 @@ inline void SwFont::SetName( const OUString& rName, const sal_uInt8 nWhich )
...
@@ -461,7 +461,7 @@ inline void SwFont::SetName( const OUString& rName, const sal_uInt8 nWhich )
// encapsulated SV-Font-method
// encapsulated SV-Font-method
inline
void
SwSubFont
::
SetStyleName
(
const
OUString
&
rStyleName
)
inline
void
SwSubFont
::
SetStyleName
(
const
OUString
&
rStyleName
)
{
{
pMagic
=
0
;
m_
pMagic
=
0
;
Font
::
SetStyleName
(
rStyleName
);
Font
::
SetStyleName
(
rStyleName
);
}
}
...
@@ -474,7 +474,7 @@ inline void SwFont::SetStyleName( const OUString& rStyle, const sal_uInt8 nWhich
...
@@ -474,7 +474,7 @@ inline void SwFont::SetStyleName( const OUString& rStyle, const sal_uInt8 nWhich
// encapsulated SV-Font-method
// encapsulated SV-Font-method
inline
void
SwSubFont
::
SetCharSet
(
const
rtl_TextEncoding
eCharSet
)
inline
void
SwSubFont
::
SetCharSet
(
const
rtl_TextEncoding
eCharSet
)
{
{
pMagic
=
0
;
m_
pMagic
=
0
;
Font
::
SetCharSet
(
eCharSet
);
Font
::
SetCharSet
(
eCharSet
);
}
}
...
@@ -487,7 +487,7 @@ inline void SwFont::SetCharSet( const rtl_TextEncoding eCharSet, const sal_uInt8
...
@@ -487,7 +487,7 @@ inline void SwFont::SetCharSet( const rtl_TextEncoding eCharSet, const sal_uInt8
// encapsulated SV-Font-method
// encapsulated SV-Font-method
inline
void
SwSubFont
::
SetPitch
(
const
FontPitch
ePitch
)
inline
void
SwSubFont
::
SetPitch
(
const
FontPitch
ePitch
)
{
{
pMagic
=
0
;
m_
pMagic
=
0
;
Font
::
SetPitch
(
ePitch
);
Font
::
SetPitch
(
ePitch
);
}
}
...
@@ -501,7 +501,7 @@ inline void SwFont::SetPitch( const FontPitch ePitch, const sal_uInt8 nWhich )
...
@@ -501,7 +501,7 @@ inline void SwFont::SetPitch( const FontPitch ePitch, const sal_uInt8 nWhich )
// encapsulated SV-Font-method
// encapsulated SV-Font-method
inline
void
SwSubFont
::
SetAlign
(
const
FontAlign
eAlign
)
inline
void
SwSubFont
::
SetAlign
(
const
FontAlign
eAlign
)
{
{
pMagic
=
0
;
m_
pMagic
=
0
;
Font
::
SetAlign
(
eAlign
);
Font
::
SetAlign
(
eAlign
);
}
}
...
@@ -516,7 +516,7 @@ inline void SwFont::SetAlign( const FontAlign eAlign )
...
@@ -516,7 +516,7 @@ inline void SwFont::SetAlign( const FontAlign eAlign )
// encapsulated SV-Font-method
// encapsulated SV-Font-method
inline
void
SwSubFont
::
SetWeight
(
const
FontWeight
eWeight
)
inline
void
SwSubFont
::
SetWeight
(
const
FontWeight
eWeight
)
{
{
pMagic
=
0
;
m_
pMagic
=
0
;
Font
::
SetWeight
(
eWeight
);
Font
::
SetWeight
(
eWeight
);
}
}
...
@@ -529,7 +529,7 @@ inline void SwFont::SetWeight( const FontWeight eWeight, const sal_uInt8 nWhich
...
@@ -529,7 +529,7 @@ inline void SwFont::SetWeight( const FontWeight eWeight, const sal_uInt8 nWhich
// encapsulated SV-Font-method
// encapsulated SV-Font-method
inline
void
SwSubFont
::
SetUnderline
(
const
FontUnderline
eUnderline
)
inline
void
SwSubFont
::
SetUnderline
(
const
FontUnderline
eUnderline
)
{
{
pMagic
=
0
;
m_
pMagic
=
0
;
Font
::
SetUnderline
(
eUnderline
);
Font
::
SetUnderline
(
eUnderline
);
}
}
...
@@ -544,7 +544,7 @@ inline void SwFont::SetUnderline( const FontUnderline eUnderline )
...
@@ -544,7 +544,7 @@ inline void SwFont::SetUnderline( const FontUnderline eUnderline )
// encapsulated SV-Font-method
// encapsulated SV-Font-method
inline
void
SwSubFont
::
SetOverline
(
const
FontUnderline
eOverline
)
inline
void
SwSubFont
::
SetOverline
(
const
FontUnderline
eOverline
)
{
{
pMagic
=
0
;
m_
pMagic
=
0
;
Font
::
SetOverline
(
eOverline
);
Font
::
SetOverline
(
eOverline
);
}
}
...
@@ -559,7 +559,7 @@ inline void SwFont::SetOverline( const FontUnderline eOverline )
...
@@ -559,7 +559,7 @@ inline void SwFont::SetOverline( const FontUnderline eOverline )
// encapsulated SV-Font-method
// encapsulated SV-Font-method
inline
void
SwSubFont
::
SetStrikeout
(
const
FontStrikeout
eStrikeout
)
inline
void
SwSubFont
::
SetStrikeout
(
const
FontStrikeout
eStrikeout
)
{
{
pMagic
=
0
;
m_
pMagic
=
0
;
Font
::
SetStrikeout
(
eStrikeout
);
Font
::
SetStrikeout
(
eStrikeout
);
}
}
...
@@ -574,7 +574,7 @@ inline void SwFont::SetStrikeout( const FontStrikeout eStrikeout )
...
@@ -574,7 +574,7 @@ inline void SwFont::SetStrikeout( const FontStrikeout eStrikeout )
// encapsulated SV-Font-method
// encapsulated SV-Font-method
inline
void
SwSubFont
::
SetItalic
(
const
FontItalic
eItalic
)
inline
void
SwSubFont
::
SetItalic
(
const
FontItalic
eItalic
)
{
{
pMagic
=
0
;
m_
pMagic
=
0
;
Font
::
SetItalic
(
eItalic
);
Font
::
SetItalic
(
eItalic
);
}
}
...
@@ -587,7 +587,7 @@ inline void SwFont::SetItalic( const FontItalic eItalic, const sal_uInt8 nWhich
...
@@ -587,7 +587,7 @@ inline void SwFont::SetItalic( const FontItalic eItalic, const sal_uInt8 nWhich
// encapsulated SV-Font-method
// encapsulated SV-Font-method
inline
void
SwSubFont
::
SetOutline
(
const
bool
bOutline
)
inline
void
SwSubFont
::
SetOutline
(
const
bool
bOutline
)
{
{
pMagic
=
0
;
m_
pMagic
=
0
;
Font
::
SetOutline
(
bOutline
);
Font
::
SetOutline
(
bOutline
);
}
}
...
@@ -602,7 +602,7 @@ inline void SwFont::SetOutline( const bool bOutline )
...
@@ -602,7 +602,7 @@ inline void SwFont::SetOutline( const bool bOutline )
// encapsulated SV-Font-method
// encapsulated SV-Font-method
inline
void
SwSubFont
::
SetShadow
(
const
bool
bShadow
)
inline
void
SwSubFont
::
SetShadow
(
const
bool
bShadow
)
{
{
pMagic
=
0
;
m_
pMagic
=
0
;
Font
::
SetShadow
(
bShadow
);
Font
::
SetShadow
(
bShadow
);
}
}
...
@@ -617,7 +617,7 @@ inline void SwFont::SetShadow( const bool bShadow )
...
@@ -617,7 +617,7 @@ inline void SwFont::SetShadow( const bool bShadow )
// encapsulated SV-Font-method
// encapsulated SV-Font-method
inline
void
SwSubFont
::
SetAutoKern
(
FontKerning
nAutoKern
)
inline
void
SwSubFont
::
SetAutoKern
(
FontKerning
nAutoKern
)
{
{
pMagic
=
0
;
m_
pMagic
=
0
;
Font
::
SetKerning
(
nAutoKern
);
Font
::
SetKerning
(
nAutoKern
);
}
}
...
@@ -655,7 +655,7 @@ inline void SwFont::SetCaseMap( const SvxCaseMap eNew )
...
@@ -655,7 +655,7 @@ inline void SwFont::SetCaseMap( const SvxCaseMap eNew )
// encapsulated SV-Font-method
// encapsulated SV-Font-method
inline
void
SwSubFont
::
SetWordLineMode
(
const
bool
bWordLineMode
)
inline
void
SwSubFont
::
SetWordLineMode
(
const
bool
bWordLineMode
)
{
{
pMagic
=
0
;
m_
pMagic
=
0
;
Font
::
SetWordLineMode
(
bWordLineMode
);
Font
::
SetWordLineMode
(
bWordLineMode
);
}
}
...
@@ -669,7 +669,7 @@ inline void SwFont::SetWordLineMode( const bool bWordLineMode )
...
@@ -669,7 +669,7 @@ inline void SwFont::SetWordLineMode( const bool bWordLineMode )
// encapsulated SV-Font-method
// encapsulated SV-Font-method
inline
void
SwSubFont
::
SetEmphasisMark
(
const
FontEmphasisMark
eValue
)
inline
void
SwSubFont
::
SetEmphasisMark
(
const
FontEmphasisMark
eValue
)
{
{
pMagic
=
0
;
m_
pMagic
=
0
;
Font
::
SetEmphasisMark
(
eValue
);
Font
::
SetEmphasisMark
(
eValue
);
}
}
...
@@ -695,7 +695,7 @@ inline void SwFont::SetPropWidth( const sal_uInt16 nNew )
...
@@ -695,7 +695,7 @@ inline void SwFont::SetPropWidth( const sal_uInt16 nNew )
// encapsulated SV-Font-method
// encapsulated SV-Font-method
inline
void
SwSubFont
::
SetRelief
(
const
FontRelief
eNew
)
inline
void
SwSubFont
::
SetRelief
(
const
FontRelief
eNew
)
{
{
pMagic
=
0
;
m_
pMagic
=
0
;
Font
::
SetRelief
(
eNew
);
Font
::
SetRelief
(
eNew
);
}
}
...
@@ -713,21 +713,21 @@ inline void SwFont::SetRelief( const FontRelief eNew )
...
@@ -713,21 +713,21 @@ inline void SwFont::SetRelief( const FontRelief eNew )
// overloaded font-method
// overloaded font-method
inline
void
SwSubFont
::
SetSize
(
const
Size
&
rSize
)
inline
void
SwSubFont
::
SetSize
(
const
Size
&
rSize
)
{
{
aSize
=
rSize
;
m_
aSize
=
rSize
;
if
(
GetPropr
()
==
100
)
if
(
GetPropr
()
==
100
)
Font
::
SetSize
(
aSize
);
Font
::
SetSize
(
m_
aSize
);
else
else
{
{
Font
::
SetSize
(
Size
(
Font
::
SetSize
(
Size
(
(
long
)
aSize
.
Width
()
*
GetPropr
()
/
100L
,
(
long
)
m_
aSize
.
Width
()
*
GetPropr
()
/
100L
,
(
long
)
aSize
.
Height
()
*
GetPropr
()
/
100L
)
);
(
long
)
m_
aSize
.
Height
()
*
GetPropr
()
/
100L
)
);
}
}
pMagic
=
0
;
m_
pMagic
=
0
;
}
}
inline
void
SwFont
::
SetSize
(
const
Size
&
rSize
,
const
sal_uInt8
nWhich
)
inline
void
SwFont
::
SetSize
(
const
Size
&
rSize
,
const
sal_uInt8
nWhich
)
{
{
if
(
m_aSub
[
nWhich
].
aSize
!=
rSize
)
if
(
m_aSub
[
nWhich
].
m_
aSize
!=
rSize
)
{
{
m_aSub
[
nWhich
].
SetSize
(
rSize
);
m_aSub
[
nWhich
].
SetSize
(
rSize
);
m_bFontChg
=
true
;
m_bFontChg
=
true
;
...
@@ -747,9 +747,9 @@ inline void SwFont::SetActual( sal_uInt8 nNew )
...
@@ -747,9 +747,9 @@ inline void SwFont::SetActual( sal_uInt8 nNew )
inline
void
SwSubFont
::
SetProportion
(
const
sal_uInt8
nNewPropr
)
inline
void
SwSubFont
::
SetProportion
(
const
sal_uInt8
nNewPropr
)
{
{
pMagic
=
0
;
m_
pMagic
=
0
;
Font
::
SetSize
(
Size
(
(
long
)
aSize
.
Width
()
*
nNewPropr
/
100L
,
Font
::
SetSize
(
Size
(
(
long
)
m_
aSize
.
Width
()
*
nNewPropr
/
100L
,
(
long
)
aSize
.
Height
()
*
nNewPropr
/
100L
)
);
(
long
)
m_
aSize
.
Height
()
*
nNewPropr
/
100L
)
);
SvxFont
::
SetPropr
(
nNewPropr
);
SvxFont
::
SetPropr
(
nNewPropr
);
}
}
...
@@ -768,7 +768,7 @@ inline void SwFont::SetProportion( const sal_uInt8 nNewPropr )
...
@@ -768,7 +768,7 @@ inline void SwFont::SetProportion( const sal_uInt8 nNewPropr )
inline
void
SwSubFont
::
SetEscapement
(
const
short
nNewEsc
)
inline
void
SwSubFont
::
SetEscapement
(
const
short
nNewEsc
)
{
{
pMagic
=
0
;
m_
pMagic
=
0
;
SvxFont
::
SetEscapement
(
nNewEsc
);
SvxFont
::
SetEscapement
(
nNewEsc
);
}
}
...
@@ -789,7 +789,7 @@ inline void SwFont::SetEscapement( const short nNewEsc )
...
@@ -789,7 +789,7 @@ inline void SwFont::SetEscapement( const short nNewEsc )
inline
void
SwSubFont
::
SetLanguage
(
LanguageType
eNewLang
)
inline
void
SwSubFont
::
SetLanguage
(
LanguageType
eNewLang
)
{
{
pMagic
=
0
;
m_
pMagic
=
0
;
if
(
eNewLang
==
LANGUAGE_SYSTEM
)
if
(
eNewLang
==
LANGUAGE_SYSTEM
)
eNewLang
=
(
LanguageType
)
GetAppLanguage
();
eNewLang
=
(
LanguageType
)
GetAppLanguage
();
SvxFont
::
SetLanguage
(
eNewLang
);
SvxFont
::
SetLanguage
(
eNewLang
);
...
@@ -828,7 +828,7 @@ inline void SwFont::SetNoCol( const bool bNew )
...
@@ -828,7 +828,7 @@ inline void SwFont::SetNoCol( const bool bNew )
inline
void
SwSubFont
::
SetVertical
(
const
sal_uInt16
nDir
,
const
bool
bVertFormat
)
inline
void
SwSubFont
::
SetVertical
(
const
sal_uInt16
nDir
,
const
bool
bVertFormat
)
{
{
pMagic
=
0
;
m_
pMagic
=
0
;
Font
::
SetVertical
(
bVertFormat
);
Font
::
SetVertical
(
bVertFormat
);
Font
::
SetOrientation
(
nDir
);
Font
::
SetOrientation
(
nDir
);
}
}
...
@@ -837,28 +837,28 @@ inline void SwFont::SetTopBorderDist( const sal_uInt16 nTopDist )
...
@@ -837,28 +837,28 @@ inline void SwFont::SetTopBorderDist( const sal_uInt16 nTopDist )
{
{
m_nTopBorderDist
=
nTopDist
;
m_nTopBorderDist
=
nTopDist
;
m_bFontChg
=
true
;
m_bFontChg
=
true
;
m_aSub
[
SW_LATIN
].
pMagic
=
m_aSub
[
SW_CJK
].
pMagic
=
m_aSub
[
SW_CTL
].
pMagic
=
0
;
m_aSub
[
SW_LATIN
].
m_pMagic
=
m_aSub
[
SW_CJK
].
m_pMagic
=
m_aSub
[
SW_CTL
].
m_
pMagic
=
0
;
}
}
inline
void
SwFont
::
SetBottomBorderDist
(
const
sal_uInt16
nBottomDist
)
inline
void
SwFont
::
SetBottomBorderDist
(
const
sal_uInt16
nBottomDist
)
{
{
m_nBottomBorderDist
=
nBottomDist
;
m_nBottomBorderDist
=
nBottomDist
;
m_bFontChg
=
true
;
m_bFontChg
=
true
;
m_aSub
[
SW_LATIN
].
pMagic
=
m_aSub
[
SW_CJK
].
pMagic
=
m_aSub
[
SW_CTL
].
pMagic
=
0
;
m_aSub
[
SW_LATIN
].
m_pMagic
=
m_aSub
[
SW_CJK
].
m_pMagic
=
m_aSub
[
SW_CTL
].
m_
pMagic
=
0
;
}
}
inline
void
SwFont
::
SetRightBorderDist
(
const
sal_uInt16
nRightDist
)
inline
void
SwFont
::
SetRightBorderDist
(
const
sal_uInt16
nRightDist
)
{
{
m_nRightBorderDist
=
nRightDist
;
m_nRightBorderDist
=
nRightDist
;
m_bFontChg
=
true
;
m_bFontChg
=
true
;
m_aSub
[
SW_LATIN
].
pMagic
=
m_aSub
[
SW_CJK
].
pMagic
=
m_aSub
[
SW_CTL
].
pMagic
=
0
;
m_aSub
[
SW_LATIN
].
m_pMagic
=
m_aSub
[
SW_CJK
].
m_pMagic
=
m_aSub
[
SW_CTL
].
m_
pMagic
=
0
;
}
}
inline
void
SwFont
::
SetLeftBorderDist
(
const
sal_uInt16
nLeftDist
)
inline
void
SwFont
::
SetLeftBorderDist
(
const
sal_uInt16
nLeftDist
)
{
{
m_nLeftBorderDist
=
nLeftDist
;
m_nLeftBorderDist
=
nLeftDist
;
m_bFontChg
=
true
;
m_bFontChg
=
true
;
m_aSub
[
SW_LATIN
].
pMagic
=
m_aSub
[
SW_CJK
].
pMagic
=
m_aSub
[
SW_CTL
].
pMagic
=
0
;
m_aSub
[
SW_LATIN
].
m_pMagic
=
m_aSub
[
SW_CJK
].
m_pMagic
=
m_aSub
[
SW_CTL
].
m_
pMagic
=
0
;
}
}
inline
sal_uInt16
SwFont
::
GetTopBorderSpace
()
const
inline
sal_uInt16
SwFont
::
GetTopBorderSpace
()
const
...
@@ -930,28 +930,28 @@ inline void SwFont::SetShadowColor( const Color& rColor )
...
@@ -930,28 +930,28 @@ inline void SwFont::SetShadowColor( const Color& rColor )
{
{
m_aShadowColor
=
rColor
;
m_aShadowColor
=
rColor
;
m_bFontChg
=
true
;
m_bFontChg
=
true
;
m_aSub
[
SW_LATIN
].
pMagic
=
m_aSub
[
SW_CJK
].
pMagic
=
m_aSub
[
SW_CTL
].
pMagic
=
0
;
m_aSub
[
SW_LATIN
].
m_pMagic
=
m_aSub
[
SW_CJK
].
m_pMagic
=
m_aSub
[
SW_CTL
].
m_
pMagic
=
0
;
}
}
inline
void
SwFont
::
SetShadowWidth
(
const
sal_uInt16
nWidth
)
inline
void
SwFont
::
SetShadowWidth
(
const
sal_uInt16
nWidth
)
{
{
m_nShadowWidth
=
nWidth
;
m_nShadowWidth
=
nWidth
;
m_bFontChg
=
true
;
m_bFontChg
=
true
;
m_aSub
[
SW_LATIN
].
pMagic
=
m_aSub
[
SW_CJK
].
pMagic
=
m_aSub
[
SW_CTL
].
pMagic
=
0
;
m_aSub
[
SW_LATIN
].
m_pMagic
=
m_aSub
[
SW_CJK
].
m_pMagic
=
m_aSub
[
SW_CTL
].
m_
pMagic
=
0
;
}
}
inline
void
SwFont
::
SetShadowLocation
(
const
SvxShadowLocation
aLocation
)
inline
void
SwFont
::
SetShadowLocation
(
const
SvxShadowLocation
aLocation
)
{
{
m_aShadowLocation
=
aLocation
;
m_aShadowLocation
=
aLocation
;
m_bFontChg
=
true
;
m_bFontChg
=
true
;
m_aSub
[
SW_LATIN
].
pMagic
=
m_aSub
[
SW_CJK
].
pMagic
=
m_aSub
[
SW_CTL
].
pMagic
=
0
;
m_aSub
[
SW_LATIN
].
m_pMagic
=
m_aSub
[
SW_CJK
].
m_pMagic
=
m_aSub
[
SW_CTL
].
m_
pMagic
=
0
;
}
}
inline
void
SwFont
::
SetHighlightColor
(
const
Color
&
aNewColor
)
inline
void
SwFont
::
SetHighlightColor
(
const
Color
&
aNewColor
)
{
{
m_aHighlightColor
=
aNewColor
;
m_aHighlightColor
=
aNewColor
;
m_bFontChg
=
true
;
m_bFontChg
=
true
;
m_aSub
[
SW_LATIN
].
pMagic
=
m_aSub
[
SW_CJK
].
pMagic
=
m_aSub
[
SW_CTL
].
pMagic
=
0
;
m_aSub
[
SW_LATIN
].
m_pMagic
=
m_aSub
[
SW_CJK
].
m_pMagic
=
m_aSub
[
SW_CTL
].
m_
pMagic
=
0
;
}
}
// Used for the "continuous underline" feature.
// Used for the "continuous underline" feature.
...
...
sw/source/core/txtnode/fntcap.cxx
Dosyayı görüntüle @
a827957f
...
@@ -536,7 +536,7 @@ void SwSubFont::DoOnCapitals( SwDoCapitals &rDo )
...
@@ -536,7 +536,7 @@ void SwSubFont::DoOnCapitals( SwDoCapitals &rDo )
// NOTE: There are more uses of SMALL_CAPS_PERCENTAGE in editeng, but it seems they
// NOTE: There are more uses of SMALL_CAPS_PERCENTAGE in editeng, but it seems they
// do not matter for Writer (and if they did it'd be pretty ugly to propagate
// do not matter for Writer (and if they did it'd be pretty ugly to propagate
// the option there).
// the option there).
int
smallCapsPercentage
=
s
mallCapsPercentage66
?
66
:
SMALL_CAPS_PERCENTAGE
;
int
smallCapsPercentage
=
m_bS
mallCapsPercentage66
?
66
:
SMALL_CAPS_PERCENTAGE
;
aFont
.
SetProportion
(
(
aFont
.
GetPropr
()
*
smallCapsPercentage
)
/
100
);
aFont
.
SetProportion
(
(
aFont
.
GetPropr
()
*
smallCapsPercentage
)
/
100
);
pMagic2
=
NULL
;
pMagic2
=
NULL
;
nIndex2
=
0
;
nIndex2
=
0
;
...
...
sw/source/core/txtnode/swfont.cxx
Dosyayı görüntüle @
a827957f
...
@@ -72,7 +72,7 @@ void SwFont::SetBackColor( Color* pNewColor )
...
@@ -72,7 +72,7 @@ void SwFont::SetBackColor( Color* pNewColor )
delete
m_pBackColor
;
delete
m_pBackColor
;
m_pBackColor
=
pNewColor
;
m_pBackColor
=
pNewColor
;
m_bFontChg
=
true
;
m_bFontChg
=
true
;
m_aSub
[
SW_LATIN
].
pMagic
=
m_aSub
[
SW_CJK
].
pMagic
=
m_aSub
[
SW_CTL
].
pMagic
=
0
;
m_aSub
[
SW_LATIN
].
m_pMagic
=
m_aSub
[
SW_CJK
].
m_pMagic
=
m_aSub
[
SW_CTL
].
m_
pMagic
=
0
;
}
}
void
SwFont
::
SetTopBorder
(
const
editeng
::
SvxBorderLine
*
pTopBorder
)
void
SwFont
::
SetTopBorder
(
const
editeng
::
SvxBorderLine
*
pTopBorder
)
...
@@ -85,7 +85,7 @@ void SwFont::SetTopBorder( const editeng::SvxBorderLine* pTopBorder )
...
@@ -85,7 +85,7 @@ void SwFont::SetTopBorder( const editeng::SvxBorderLine* pTopBorder )
m_nTopBorderDist
=
0
;
m_nTopBorderDist
=
0
;
}
}
m_bFontChg
=
true
;
m_bFontChg
=
true
;
m_aSub
[
SW_LATIN
].
pMagic
=
m_aSub
[
SW_CJK
].
pMagic
=
m_aSub
[
SW_CTL
].
pMagic
=
0
;
m_aSub
[
SW_LATIN
].
m_pMagic
=
m_aSub
[
SW_CJK
].
m_pMagic
=
m_aSub
[
SW_CTL
].
m_
pMagic
=
0
;
}
}
void
SwFont
::
SetBottomBorder
(
const
editeng
::
SvxBorderLine
*
pBottomBorder
)
void
SwFont
::
SetBottomBorder
(
const
editeng
::
SvxBorderLine
*
pBottomBorder
)
...
@@ -98,7 +98,7 @@ void SwFont::SetBottomBorder( const editeng::SvxBorderLine* pBottomBorder )
...
@@ -98,7 +98,7 @@ void SwFont::SetBottomBorder( const editeng::SvxBorderLine* pBottomBorder )
m_nBottomBorderDist
=
0
;
m_nBottomBorderDist
=
0
;
}
}
m_bFontChg
=
true
;
m_bFontChg
=
true
;
m_aSub
[
SW_LATIN
].
pMagic
=
m_aSub
[
SW_CJK
].
pMagic
=
m_aSub
[
SW_CTL
].
pMagic
=
0
;
m_aSub
[
SW_LATIN
].
m_pMagic
=
m_aSub
[
SW_CJK
].
m_pMagic
=
m_aSub
[
SW_CTL
].
m_
pMagic
=
0
;
}
}
void
SwFont
::
SetRightBorder
(
const
editeng
::
SvxBorderLine
*
pRightBorder
)
void
SwFont
::
SetRightBorder
(
const
editeng
::
SvxBorderLine
*
pRightBorder
)
...
@@ -111,7 +111,7 @@ void SwFont::SetRightBorder( const editeng::SvxBorderLine* pRightBorder )
...
@@ -111,7 +111,7 @@ void SwFont::SetRightBorder( const editeng::SvxBorderLine* pRightBorder )
m_nRightBorderDist
=
0
;
m_nRightBorderDist
=
0
;
}
}
m_bFontChg
=
true
;
m_bFontChg
=
true
;
m_aSub
[
SW_LATIN
].
pMagic
=
m_aSub
[
SW_CJK
].
pMagic
=
m_aSub
[
SW_CTL
].
pMagic
=
0
;
m_aSub
[
SW_LATIN
].
m_pMagic
=
m_aSub
[
SW_CJK
].
m_pMagic
=
m_aSub
[
SW_CTL
].
m_
pMagic
=
0
;
}
}
void
SwFont
::
SetLeftBorder
(
const
editeng
::
SvxBorderLine
*
pLeftBorder
)
void
SwFont
::
SetLeftBorder
(
const
editeng
::
SvxBorderLine
*
pLeftBorder
)
...
@@ -124,7 +124,7 @@ void SwFont::SetLeftBorder( const editeng::SvxBorderLine* pLeftBorder )
...
@@ -124,7 +124,7 @@ void SwFont::SetLeftBorder( const editeng::SvxBorderLine* pLeftBorder )
m_nLeftBorderDist
=
0
;
m_nLeftBorderDist
=
0
;
}
}
m_bFontChg
=
true
;
m_bFontChg
=
true
;
m_aSub
[
SW_LATIN
].
pMagic
=
m_aSub
[
SW_CJK
].
pMagic
=
m_aSub
[
SW_CTL
].
pMagic
=
0
;
m_aSub
[
SW_LATIN
].
m_pMagic
=
m_aSub
[
SW_CJK
].
m_pMagic
=
m_aSub
[
SW_CTL
].
m_
pMagic
=
0
;
}
}
const
boost
::
optional
<
editeng
::
SvxBorderLine
>&
const
boost
::
optional
<
editeng
::
SvxBorderLine
>&
...
@@ -471,11 +471,11 @@ sal_uInt16 SwSubFont::CalcEscAscent( const sal_uInt16 nOldAscent ) const
...
@@ -471,11 +471,11 @@ sal_uInt16 SwSubFont::CalcEscAscent( const sal_uInt16 nOldAscent ) const
DFLT_ESC_AUTO_SUB
!=
GetEscapement
()
)
DFLT_ESC_AUTO_SUB
!=
GetEscapement
()
)
{
{
const
long
nAscent
=
nOldAscent
+
const
long
nAscent
=
nOldAscent
+
(
(
long
)
nOrgHeight
*
GetEscapement
()
)
/
100L
;
(
(
long
)
m_
nOrgHeight
*
GetEscapement
()
)
/
100L
;
if
(
nAscent
>
0
)
if
(
nAscent
>
0
)
return
std
::
max
<
sal_uInt16
>
(
nAscent
,
nOrgAscent
);
return
std
::
max
<
sal_uInt16
>
(
nAscent
,
m_
nOrgAscent
);
}
}
return
nOrgAscent
;
return
m_
nOrgAscent
;
}
}
void
SwFont
::
SetDiffFnt
(
const
SfxItemSet
*
pAttrSet
,
void
SwFont
::
SetDiffFnt
(
const
SfxItemSet
*
pAttrSet
,
...
@@ -502,8 +502,8 @@ void SwFont::SetDiffFnt( const SfxItemSet *pAttrSet,
...
@@ -502,8 +502,8 @@ void SwFont::SetDiffFnt( const SfxItemSet *pAttrSet,
{
{
const
SvxFontHeightItem
*
pHeight
=
static_cast
<
const
SvxFontHeightItem
*>
(
pItem
);
const
SvxFontHeightItem
*
pHeight
=
static_cast
<
const
SvxFontHeightItem
*>
(
pItem
);
m_aSub
[
SW_LATIN
].
SvxFont
::
SetPropr
(
100
);
m_aSub
[
SW_LATIN
].
SvxFont
::
SetPropr
(
100
);
m_aSub
[
SW_LATIN
].
aSize
=
m_aSub
[
SW_LATIN
].
Font
::
GetSize
();
m_aSub
[
SW_LATIN
].
m_
aSize
=
m_aSub
[
SW_LATIN
].
Font
::
GetSize
();
Size
aTmpSize
=
m_aSub
[
SW_LATIN
].
aSize
;
Size
aTmpSize
=
m_aSub
[
SW_LATIN
].
m_
aSize
;
aTmpSize
.
Height
()
=
pHeight
->
GetHeight
();
aTmpSize
.
Height
()
=
pHeight
->
GetHeight
();
m_aSub
[
SW_LATIN
].
SetSize
(
aTmpSize
);
m_aSub
[
SW_LATIN
].
SetSize
(
aTmpSize
);
}
}
...
@@ -532,8 +532,8 @@ void SwFont::SetDiffFnt( const SfxItemSet *pAttrSet,
...
@@ -532,8 +532,8 @@ void SwFont::SetDiffFnt( const SfxItemSet *pAttrSet,
{
{
const
SvxFontHeightItem
*
pHeight
=
static_cast
<
const
SvxFontHeightItem
*>
(
pItem
);
const
SvxFontHeightItem
*
pHeight
=
static_cast
<
const
SvxFontHeightItem
*>
(
pItem
);
m_aSub
[
SW_CJK
].
SvxFont
::
SetPropr
(
100
);
m_aSub
[
SW_CJK
].
SvxFont
::
SetPropr
(
100
);
m_aSub
[
SW_CJK
].
aSize
=
m_aSub
[
SW_CJK
].
Font
::
GetSize
();
m_aSub
[
SW_CJK
].
m_
aSize
=
m_aSub
[
SW_CJK
].
Font
::
GetSize
();
Size
aTmpSize
=
m_aSub
[
SW_CJK
].
aSize
;
Size
aTmpSize
=
m_aSub
[
SW_CJK
].
m_
aSize
;
aTmpSize
.
Height
()
=
pHeight
->
GetHeight
();
aTmpSize
.
Height
()
=
pHeight
->
GetHeight
();
m_aSub
[
SW_CJK
].
SetSize
(
aTmpSize
);
m_aSub
[
SW_CJK
].
SetSize
(
aTmpSize
);
}
}
...
@@ -568,8 +568,8 @@ void SwFont::SetDiffFnt( const SfxItemSet *pAttrSet,
...
@@ -568,8 +568,8 @@ void SwFont::SetDiffFnt( const SfxItemSet *pAttrSet,
{
{
const
SvxFontHeightItem
*
pHeight
=
static_cast
<
const
SvxFontHeightItem
*>
(
pItem
);
const
SvxFontHeightItem
*
pHeight
=
static_cast
<
const
SvxFontHeightItem
*>
(
pItem
);
m_aSub
[
SW_CTL
].
SvxFont
::
SetPropr
(
100
);
m_aSub
[
SW_CTL
].
SvxFont
::
SetPropr
(
100
);
m_aSub
[
SW_CTL
].
aSize
=
m_aSub
[
SW_CTL
].
Font
::
GetSize
();
m_aSub
[
SW_CTL
].
m_
aSize
=
m_aSub
[
SW_CTL
].
Font
::
GetSize
();
Size
aTmpSize
=
m_aSub
[
SW_CTL
].
aSize
;
Size
aTmpSize
=
m_aSub
[
SW_CTL
].
m_
aSize
;
aTmpSize
.
Height
()
=
pHeight
->
GetHeight
();
aTmpSize
.
Height
()
=
pHeight
->
GetHeight
();
m_aSub
[
SW_CTL
].
SetSize
(
aTmpSize
);
m_aSub
[
SW_CTL
].
SetSize
(
aTmpSize
);
}
}
...
@@ -763,7 +763,7 @@ SwFont::SwFont( const SwAttrSet* pAttrSet,
...
@@ -763,7 +763,7 @@ SwFont::SwFont( const SwAttrSet* pAttrSet,
m_aSub
[
SW_LATIN
].
SetPitch
(
rFont
.
GetPitch
()
);
m_aSub
[
SW_LATIN
].
SetPitch
(
rFont
.
GetPitch
()
);
m_aSub
[
SW_LATIN
].
SetCharSet
(
rFont
.
GetCharSet
()
);
m_aSub
[
SW_LATIN
].
SetCharSet
(
rFont
.
GetCharSet
()
);
m_aSub
[
SW_LATIN
].
SvxFont
::
SetPropr
(
100
);
// 100% der FontSize
m_aSub
[
SW_LATIN
].
SvxFont
::
SetPropr
(
100
);
// 100% der FontSize
Size
aTmpSize
=
m_aSub
[
SW_LATIN
].
aSize
;
Size
aTmpSize
=
m_aSub
[
SW_LATIN
].
m_
aSize
;
aTmpSize
.
Height
()
=
pAttrSet
->
GetSize
().
GetHeight
();
aTmpSize
.
Height
()
=
pAttrSet
->
GetSize
().
GetHeight
();
m_aSub
[
SW_LATIN
].
SetSize
(
aTmpSize
);
m_aSub
[
SW_LATIN
].
SetSize
(
aTmpSize
);
m_aSub
[
SW_LATIN
].
SetItalic
(
pAttrSet
->
GetPosture
().
GetPosture
()
);
m_aSub
[
SW_LATIN
].
SetItalic
(
pAttrSet
->
GetPosture
().
GetPosture
()
);
...
@@ -779,7 +779,7 @@ SwFont::SwFont( const SwAttrSet* pAttrSet,
...
@@ -779,7 +779,7 @@ SwFont::SwFont( const SwAttrSet* pAttrSet,
m_aSub
[
SW_CJK
].
SetPitch
(
rFont
.
GetPitch
()
);
m_aSub
[
SW_CJK
].
SetPitch
(
rFont
.
GetPitch
()
);
m_aSub
[
SW_CJK
].
SetCharSet
(
rFont
.
GetCharSet
()
);
m_aSub
[
SW_CJK
].
SetCharSet
(
rFont
.
GetCharSet
()
);
m_aSub
[
SW_CJK
].
SvxFont
::
SetPropr
(
100
);
// 100% der FontSize
m_aSub
[
SW_CJK
].
SvxFont
::
SetPropr
(
100
);
// 100% der FontSize
Size
aTmpSize
=
m_aSub
[
SW_CJK
].
aSize
;
Size
aTmpSize
=
m_aSub
[
SW_CJK
].
m_
aSize
;
aTmpSize
.
Height
()
=
pAttrSet
->
GetCJKSize
().
GetHeight
();
aTmpSize
.
Height
()
=
pAttrSet
->
GetCJKSize
().
GetHeight
();
m_aSub
[
SW_CJK
].
SetSize
(
aTmpSize
);
m_aSub
[
SW_CJK
].
SetSize
(
aTmpSize
);
m_aSub
[
SW_CJK
].
SetItalic
(
pAttrSet
->
GetCJKPosture
().
GetPosture
()
);
m_aSub
[
SW_CJK
].
SetItalic
(
pAttrSet
->
GetCJKPosture
().
GetPosture
()
);
...
@@ -799,7 +799,7 @@ SwFont::SwFont( const SwAttrSet* pAttrSet,
...
@@ -799,7 +799,7 @@ SwFont::SwFont( const SwAttrSet* pAttrSet,
m_aSub
[
SW_CTL
].
SetPitch
(
rFont
.
GetPitch
()
);
m_aSub
[
SW_CTL
].
SetPitch
(
rFont
.
GetPitch
()
);
m_aSub
[
SW_CTL
].
SetCharSet
(
rFont
.
GetCharSet
()
);
m_aSub
[
SW_CTL
].
SetCharSet
(
rFont
.
GetCharSet
()
);
m_aSub
[
SW_CTL
].
SvxFont
::
SetPropr
(
100
);
// 100% der FontSize
m_aSub
[
SW_CTL
].
SvxFont
::
SetPropr
(
100
);
// 100% der FontSize
Size
aTmpSize
=
m_aSub
[
SW_CTL
].
aSize
;
Size
aTmpSize
=
m_aSub
[
SW_CTL
].
m_
aSize
;
aTmpSize
.
Height
()
=
pAttrSet
->
GetCTLSize
().
GetHeight
();
aTmpSize
.
Height
()
=
pAttrSet
->
GetCTLSize
().
GetHeight
();
m_aSub
[
SW_CTL
].
SetSize
(
aTmpSize
);
m_aSub
[
SW_CTL
].
SetSize
(
aTmpSize
);
m_aSub
[
SW_CTL
].
SetItalic
(
pAttrSet
->
GetCTLPosture
().
GetPosture
()
);
m_aSub
[
SW_CTL
].
SetItalic
(
pAttrSet
->
GetCTLPosture
().
GetPosture
()
);
...
@@ -896,9 +896,9 @@ SwFont::SwFont( const SwAttrSet* pAttrSet,
...
@@ -896,9 +896,9 @@ SwFont::SwFont( const SwAttrSet* pAttrSet,
SetVertical
(
0
);
SetVertical
(
0
);
if
(
pIDocumentSettingAccess
&&
pIDocumentSettingAccess
->
get
(
DocumentSettingId
::
SMALL_CAPS_PERCENTAGE_66
))
if
(
pIDocumentSettingAccess
&&
pIDocumentSettingAccess
->
get
(
DocumentSettingId
::
SMALL_CAPS_PERCENTAGE_66
))
{
{
m_aSub
[
SW_LATIN
].
s
mallCapsPercentage66
=
true
;
m_aSub
[
SW_LATIN
].
m_bS
mallCapsPercentage66
=
true
;
m_aSub
[
SW_CJK
].
s
mallCapsPercentage66
=
true
;
m_aSub
[
SW_CJK
].
m_bS
mallCapsPercentage66
=
true
;
m_aSub
[
SW_CTL
].
s
mallCapsPercentage66
=
true
;
m_aSub
[
SW_CTL
].
m_bS
mallCapsPercentage66
=
true
;
}
}
}
}
...
@@ -910,13 +910,13 @@ SwFont::~SwFont()
...
@@ -910,13 +910,13 @@ SwFont::~SwFont()
SwSubFont
&
SwSubFont
::
operator
=
(
const
SwSubFont
&
rFont
)
SwSubFont
&
SwSubFont
::
operator
=
(
const
SwSubFont
&
rFont
)
{
{
SvxFont
::
operator
=
(
rFont
);
SvxFont
::
operator
=
(
rFont
);
pMagic
=
rFont
.
pMagic
;
m_pMagic
=
rFont
.
m_
pMagic
;
nFntIndex
=
rFont
.
nF
ntIndex
;
m_nFontIndex
=
rFont
.
m_nFo
ntIndex
;
nOrgHeight
=
rFont
.
nOrgHeight
;
m_nOrgHeight
=
rFont
.
m_
nOrgHeight
;
nOrgAscent
=
rFont
.
nOrgAscent
;
m_nOrgAscent
=
rFont
.
m_
nOrgAscent
;
nPropWidth
=
rFont
.
nProp
Width
;
m_nProportionalWidth
=
rFont
.
m_nProportional
Width
;
aSize
=
rFont
.
aSize
;
m_aSize
=
rFont
.
m_
aSize
;
smallCapsPercentage66
=
rFont
.
s
mallCapsPercentage66
;
m_bSmallCapsPercentage66
=
rFont
.
m_bS
mallCapsPercentage66
;
return
*
this
;
return
*
this
;
}
}
...
@@ -960,13 +960,13 @@ SwFont& SwFont::operator=( const SwFont &rFont )
...
@@ -960,13 +960,13 @@ SwFont& SwFont::operator=( const SwFont &rFont )
void
SwFont
::
GoMagic
(
SwViewShell
*
pSh
,
sal_uInt8
nWhich
)
void
SwFont
::
GoMagic
(
SwViewShell
*
pSh
,
sal_uInt8
nWhich
)
{
{
SwFntAccess
aFntAccess
(
m_aSub
[
nWhich
].
pMagic
,
m_aSub
[
nWhich
].
nF
ntIndex
,
SwFntAccess
aFntAccess
(
m_aSub
[
nWhich
].
m_pMagic
,
m_aSub
[
nWhich
].
m_nFo
ntIndex
,
&
m_aSub
[
nWhich
],
pSh
,
true
);
&
m_aSub
[
nWhich
],
pSh
,
true
);
}
}
bool
SwSubFont
::
IsSymbol
(
SwViewShell
*
pSh
)
bool
SwSubFont
::
IsSymbol
(
SwViewShell
*
pSh
)
{
{
SwFntAccess
aFntAccess
(
pMagic
,
nF
ntIndex
,
this
,
pSh
,
false
);
SwFntAccess
aFntAccess
(
m_pMagic
,
m_nFo
ntIndex
,
this
,
pSh
,
false
);
return
aFntAccess
.
Get
()
->
IsSymbol
();
return
aFntAccess
.
Get
()
->
IsSymbol
();
}
}
...
@@ -974,7 +974,7 @@ bool SwSubFont::ChgFnt( SwViewShell const *pSh, OutputDevice& rOut )
...
@@ -974,7 +974,7 @@ bool SwSubFont::ChgFnt( SwViewShell const *pSh, OutputDevice& rOut )
{
{
if
(
pLastFont
)
if
(
pLastFont
)
pLastFont
->
Unlock
();
pLastFont
->
Unlock
();
SwFntAccess
aFntAccess
(
pMagic
,
nF
ntIndex
,
this
,
pSh
,
true
);
SwFntAccess
aFntAccess
(
m_pMagic
,
m_nFo
ntIndex
,
this
,
pSh
,
true
);
SV_STAT
(
nChangeFont
);
SV_STAT
(
nChangeFont
);
pLastFont
=
aFntAccess
.
Get
();
pLastFont
=
aFntAccess
.
Get
();
...
@@ -994,10 +994,10 @@ void SwFont::ChgPhysFnt( SwViewShell *pSh, OutputDevice& rOut )
...
@@ -994,10 +994,10 @@ void SwFont::ChgPhysFnt( SwViewShell *pSh, OutputDevice& rOut )
const
sal_uInt8
nOldProp
=
m_aSub
[
m_nActual
].
GetPropr
();
const
sal_uInt8
nOldProp
=
m_aSub
[
m_nActual
].
GetPropr
();
SetProportion
(
100
);
SetProportion
(
100
);
ChgFnt
(
pSh
,
rOut
);
ChgFnt
(
pSh
,
rOut
);
SwFntAccess
aFntAccess
(
m_aSub
[
m_nActual
].
pMagic
,
m_aSub
[
m_nActual
].
nF
ntIndex
,
SwFntAccess
aFntAccess
(
m_aSub
[
m_nActual
].
m_pMagic
,
m_aSub
[
m_nActual
].
m_nFo
ntIndex
,
&
m_aSub
[
m_nActual
],
pSh
);
&
m_aSub
[
m_nActual
],
pSh
);
m_aSub
[
m_nActual
].
nOrgHeight
=
aFntAccess
.
Get
()
->
GetFontHeight
(
pSh
,
rOut
);
m_aSub
[
m_nActual
].
m_
nOrgHeight
=
aFntAccess
.
Get
()
->
GetFontHeight
(
pSh
,
rOut
);
m_aSub
[
m_nActual
].
nOrgAscent
=
aFntAccess
.
Get
()
->
GetFontAscent
(
pSh
,
rOut
);
m_aSub
[
m_nActual
].
m_
nOrgAscent
=
aFntAccess
.
Get
()
->
GetFontAscent
(
pSh
,
rOut
);
SetProportion
(
nOldProp
);
SetProportion
(
nOldProp
);
m_bOrgChg
=
false
;
m_bOrgChg
=
false
;
}
}
...
@@ -1024,13 +1024,13 @@ sal_uInt16 SwSubFont::CalcEscHeight( const sal_uInt16 nOldHeight,
...
@@ -1024,13 +1024,13 @@ sal_uInt16 SwSubFont::CalcEscHeight( const sal_uInt16 nOldHeight,
DFLT_ESC_AUTO_SUB
!=
GetEscapement
()
)
DFLT_ESC_AUTO_SUB
!=
GetEscapement
()
)
{
{
long
nDescent
=
nOldHeight
-
nOldAscent
-
long
nDescent
=
nOldHeight
-
nOldAscent
-
(
(
long
)
nOrgHeight
*
GetEscapement
()
)
/
100L
;
(
(
long
)
m_
nOrgHeight
*
GetEscapement
()
)
/
100L
;
const
sal_uInt16
nDesc
=
nDescent
>
0
const
sal_uInt16
nDesc
=
nDescent
>
0
?
std
::
max
<
sal_uInt16
>
(
nDescent
,
nOrgHeight
-
nOrgAscent
)
?
std
::
max
<
sal_uInt16
>
(
nDescent
,
m_nOrgHeight
-
m_
nOrgAscent
)
:
nOrgHeight
-
nOrgAscent
;
:
m_nOrgHeight
-
m_
nOrgAscent
;
return
(
nDesc
+
CalcEscAscent
(
nOldAscent
)
);
return
(
nDesc
+
CalcEscAscent
(
nOldAscent
)
);
}
}
return
nOrgHeight
;
return
m_
nOrgHeight
;
}
}
short
SwSubFont
::
_CheckKerning
(
)
short
SwSubFont
::
_CheckKerning
(
)
...
@@ -1044,7 +1044,7 @@ short SwSubFont::_CheckKerning( )
...
@@ -1044,7 +1044,7 @@ short SwSubFont::_CheckKerning( )
sal_uInt16
SwSubFont
::
GetAscent
(
SwViewShell
*
pSh
,
const
OutputDevice
&
rOut
)
sal_uInt16
SwSubFont
::
GetAscent
(
SwViewShell
*
pSh
,
const
OutputDevice
&
rOut
)
{
{
SwFntAccess
aFntAccess
(
pMagic
,
nF
ntIndex
,
this
,
pSh
);
SwFntAccess
aFntAccess
(
m_pMagic
,
m_nFo
ntIndex
,
this
,
pSh
);
const
sal_uInt16
nAscent
=
aFntAccess
.
Get
()
->
GetFontAscent
(
pSh
,
rOut
);
const
sal_uInt16
nAscent
=
aFntAccess
.
Get
()
->
GetFontAscent
(
pSh
,
rOut
);
return
GetEscapement
()
?
CalcEscAscent
(
nAscent
)
:
nAscent
;
return
GetEscapement
()
?
CalcEscAscent
(
nAscent
)
:
nAscent
;
}
}
...
@@ -1052,7 +1052,7 @@ sal_uInt16 SwSubFont::GetAscent( SwViewShell *pSh, const OutputDevice& rOut )
...
@@ -1052,7 +1052,7 @@ sal_uInt16 SwSubFont::GetAscent( SwViewShell *pSh, const OutputDevice& rOut )
sal_uInt16
SwSubFont
::
GetHeight
(
SwViewShell
*
pSh
,
const
OutputDevice
&
rOut
)
sal_uInt16
SwSubFont
::
GetHeight
(
SwViewShell
*
pSh
,
const
OutputDevice
&
rOut
)
{
{
SV_STAT
(
nGetTextSize
);
SV_STAT
(
nGetTextSize
);
SwFntAccess
aFntAccess
(
pMagic
,
nF
ntIndex
,
this
,
pSh
);
SwFntAccess
aFntAccess
(
m_pMagic
,
m_nFo
ntIndex
,
this
,
pSh
);
const
sal_uInt16
nHeight
=
aFntAccess
.
Get
()
->
GetFontHeight
(
pSh
,
rOut
);
const
sal_uInt16
nHeight
=
aFntAccess
.
Get
()
->
GetFontHeight
(
pSh
,
rOut
);
if
(
GetEscapement
()
)
if
(
GetEscapement
()
)
{
{
...
@@ -1066,7 +1066,7 @@ Size SwSubFont::_GetTextSize( SwDrawTextInfo& rInf )
...
@@ -1066,7 +1066,7 @@ Size SwSubFont::_GetTextSize( SwDrawTextInfo& rInf )
{
{
// Robust: Eigentlich sollte der Font bereits eingestellt sein, aber
// Robust: Eigentlich sollte der Font bereits eingestellt sein, aber
// sicher ist sicher ...
// sicher ist sicher ...
if
(
!
pLastFont
||
pLastFont
->
GetOwner
()
!=
pMagic
||
if
(
!
pLastFont
||
pLastFont
->
GetOwner
()
!=
m_
pMagic
||
!
IsSameInstance
(
rInf
.
GetpOut
()
->
GetFont
()
)
)
!
IsSameInstance
(
rInf
.
GetpOut
()
->
GetFont
()
)
)
ChgFnt
(
rInf
.
GetShell
(),
rInf
.
GetOut
()
);
ChgFnt
(
rInf
.
GetShell
(),
rInf
.
GetOut
()
);
...
@@ -1179,7 +1179,7 @@ void SwSubFont::_DrawText( SwDrawTextInfo &rInf, const bool bGrey )
...
@@ -1179,7 +1179,7 @@ void SwSubFont::_DrawText( SwDrawTextInfo &rInf, const bool bGrey )
pUnderFnt
=
rInf
.
GetUnderFnt
();
pUnderFnt
=
rInf
.
GetUnderFnt
();
}
}
if
(
!
pLastFont
||
pLastFont
->
GetOwner
()
!=
pMagic
)
if
(
!
pLastFont
||
pLastFont
->
GetOwner
()
!=
m_
pMagic
)
ChgFnt
(
rInf
.
GetShell
(),
rInf
.
GetOut
()
);
ChgFnt
(
rInf
.
GetShell
(),
rInf
.
GetOut
()
);
SwDigitModeModifier
aDigitModeModifier
(
rInf
.
GetOut
(),
rInf
.
GetFont
()
->
GetLanguage
()
);
SwDigitModeModifier
aDigitModeModifier
(
rInf
.
GetOut
(),
rInf
.
GetFont
()
->
GetLanguage
()
);
...
@@ -1306,7 +1306,7 @@ void SwSubFont::_DrawStretchText( SwDrawTextInfo &rInf )
...
@@ -1306,7 +1306,7 @@ void SwSubFont::_DrawStretchText( SwDrawTextInfo &rInf )
pUnderFnt
=
rInf
.
GetUnderFnt
();
pUnderFnt
=
rInf
.
GetUnderFnt
();
}
}
if
(
!
pLastFont
||
pLastFont
->
GetOwner
()
!=
pMagic
)
if
(
!
pLastFont
||
pLastFont
->
GetOwner
()
!=
m_
pMagic
)
ChgFnt
(
rInf
.
GetShell
(),
rInf
.
GetOut
()
);
ChgFnt
(
rInf
.
GetShell
(),
rInf
.
GetOut
()
);
SwDigitModeModifier
aDigitModeModifier
(
rInf
.
GetOut
(),
rInf
.
GetFont
()
->
GetLanguage
()
);
SwDigitModeModifier
aDigitModeModifier
(
rInf
.
GetOut
(),
rInf
.
GetFont
()
->
GetLanguage
()
);
...
@@ -1375,7 +1375,7 @@ void SwSubFont::_DrawStretchText( SwDrawTextInfo &rInf )
...
@@ -1375,7 +1375,7 @@ void SwSubFont::_DrawStretchText( SwDrawTextInfo &rInf )
sal_Int32
SwSubFont
::
_GetCrsrOfst
(
SwDrawTextInfo
&
rInf
)
sal_Int32
SwSubFont
::
_GetCrsrOfst
(
SwDrawTextInfo
&
rInf
)
{
{
if
(
!
pLastFont
||
pLastFont
->
GetOwner
()
!=
pMagic
)
if
(
!
pLastFont
||
pLastFont
->
GetOwner
()
!=
m_
pMagic
)
ChgFnt
(
rInf
.
GetShell
(),
rInf
.
GetOut
()
);
ChgFnt
(
rInf
.
GetShell
(),
rInf
.
GetOut
()
);
SwDigitModeModifier
aDigitModeModifier
(
rInf
.
GetOut
(),
rInf
.
GetFont
()
->
GetLanguage
()
);
SwDigitModeModifier
aDigitModeModifier
(
rInf
.
GetOut
(),
rInf
.
GetFont
()
->
GetLanguage
()
);
...
@@ -1416,7 +1416,7 @@ void SwSubFont::CalcEsc( SwDrawTextInfo& rInf, Point& rPos )
...
@@ -1416,7 +1416,7 @@ void SwSubFont::CalcEsc( SwDrawTextInfo& rInf, Point& rPos )
switch
(
GetEscapement
()
)
switch
(
GetEscapement
()
)
{
{
case
DFLT_ESC_AUTO_SUB
:
case
DFLT_ESC_AUTO_SUB
:
nOfst
=
nOrgHeight
-
nOrgAscent
-
nOfst
=
m_nOrgHeight
-
m_
nOrgAscent
-
pLastFont
->
GetFontHeight
(
rInf
.
GetShell
(),
rInf
.
GetOut
()
)
+
pLastFont
->
GetFontHeight
(
rInf
.
GetShell
(),
rInf
.
GetOut
()
)
+
pLastFont
->
GetFontAscent
(
rInf
.
GetShell
(),
rInf
.
GetOut
()
);
pLastFont
->
GetFontAscent
(
rInf
.
GetShell
(),
rInf
.
GetOut
()
);
...
@@ -1436,7 +1436,7 @@ void SwSubFont::CalcEsc( SwDrawTextInfo& rInf, Point& rPos )
...
@@ -1436,7 +1436,7 @@ void SwSubFont::CalcEsc( SwDrawTextInfo& rInf, Point& rPos )
break
;
break
;
case
DFLT_ESC_AUTO_SUPER
:
case
DFLT_ESC_AUTO_SUPER
:
nOfst
=
pLastFont
->
GetFontAscent
(
rInf
.
GetShell
(),
rInf
.
GetOut
()
)
-
nOfst
=
pLastFont
->
GetFontAscent
(
rInf
.
GetShell
(),
rInf
.
GetOut
()
)
-
nOrgAscent
;
m_
nOrgAscent
;
switch
(
nDir
)
switch
(
nDir
)
{
{
...
@@ -1453,7 +1453,7 @@ void SwSubFont::CalcEsc( SwDrawTextInfo& rInf, Point& rPos )
...
@@ -1453,7 +1453,7 @@ void SwSubFont::CalcEsc( SwDrawTextInfo& rInf, Point& rPos )
break
;
break
;
default
:
default
:
nOfst
=
((
long
)
nOrgHeight
*
GetEscapement
())
/
100L
;
nOfst
=
((
long
)
m_
nOrgHeight
*
GetEscapement
())
/
100L
;
switch
(
nDir
)
switch
(
nDir
)
{
{
...
...
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