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
9a8ebc85
Kaydet (Commit)
9a8ebc85
authored
Mar 01, 2017
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
fix indent
Change-Id: Ib5679684c899a7362b71ab8688fd37d276176fef
üst
9a39b4c9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
46 additions
and
50 deletions
+46
-50
document.cxx
starmath/source/document.cxx
+46
-50
No files found.
starmath/source/document.cxx
Dosyayı görüntüle @
9a8ebc85
...
...
@@ -287,61 +287,57 @@ void SmDocShell::ArrangeFormula()
maAccText
.
clear
();
}
void
SetEditEngineDefaultFonts
(
SfxItemPool
&
rEditEngineItemPool
)
{
// set fonts to be used
SvtLinguOptions
aOpt
;
SvtLinguConfig
().
GetOptions
(
aOpt
);
struct
FontDta
{
sal_Int16
nFallbackLang
;
sal_Int16
nLang
;
DefaultFontType
nFontType
;
sal_uInt16
nFontInfoId
;
}
aTable
[
3
]
=
{
// info to get western font to be used
{
LANGUAGE_ENGLISH_US
,
LANGUAGE_NONE
,
DefaultFontType
::
FIXED
,
EE_CHAR_FONTINFO
},
// info to get CJK font to be used
{
LANGUAGE_JAPANESE
,
LANGUAGE_NONE
,
DefaultFontType
::
CJK_TEXT
,
EE_CHAR_FONTINFO_CJK
},
// info to get CTL font to be used
{
LANGUAGE_ARABIC_SAUDI_ARABIA
,
LANGUAGE_NONE
,
DefaultFontType
::
CTL_TEXT
,
EE_CHAR_FONTINFO_CTL
}
};
aTable
[
0
].
nLang
=
aOpt
.
nDefaultLanguage
;
aTable
[
1
].
nLang
=
aOpt
.
nDefaultLanguage_CJK
;
aTable
[
2
].
nLang
=
aOpt
.
nDefaultLanguage_CTL
;
for
(
FontDta
&
rFntDta
:
aTable
)
{
LanguageType
nLang
=
(
LANGUAGE_NONE
==
rFntDta
.
nLang
)
?
rFntDta
.
nFallbackLang
:
rFntDta
.
nLang
;
vcl
::
Font
aFont
=
OutputDevice
::
GetDefaultFont
(
rFntDta
.
nFontType
,
nLang
,
GetDefaultFontFlags
::
OnlyOne
);
rEditEngineItemPool
.
SetPoolDefaultItem
(
SvxFontItem
(
aFont
.
GetFamilyType
(),
aFont
.
GetFamilyName
(),
aFont
.
GetStyleName
(),
aFont
.
GetPitch
(),
aFont
.
GetCharSet
(),
rFntDta
.
nFontInfoId
)
);
}
// set fonts to be used
SvtLinguOptions
aOpt
;
SvtLinguConfig
().
GetOptions
(
aOpt
);
struct
FontDta
{
sal_Int16
nFallbackLang
;
sal_Int16
nLang
;
DefaultFontType
nFontType
;
sal_uInt16
nFontInfoId
;
}
aTable
[
3
]
=
{
// info to get western font to be used
{
LANGUAGE_ENGLISH_US
,
LANGUAGE_NONE
,
DefaultFontType
::
FIXED
,
EE_CHAR_FONTINFO
},
// info to get CJK font to be used
{
LANGUAGE_JAPANESE
,
LANGUAGE_NONE
,
DefaultFontType
::
CJK_TEXT
,
EE_CHAR_FONTINFO_CJK
},
// info to get CTL font to be used
{
LANGUAGE_ARABIC_SAUDI_ARABIA
,
LANGUAGE_NONE
,
DefaultFontType
::
CTL_TEXT
,
EE_CHAR_FONTINFO_CTL
}
};
aTable
[
0
].
nLang
=
aOpt
.
nDefaultLanguage
;
aTable
[
1
].
nLang
=
aOpt
.
nDefaultLanguage_CJK
;
aTable
[
2
].
nLang
=
aOpt
.
nDefaultLanguage_CTL
;
for
(
FontDta
&
rFntDta
:
aTable
)
{
LanguageType
nLang
=
(
LANGUAGE_NONE
==
rFntDta
.
nLang
)
?
rFntDta
.
nFallbackLang
:
rFntDta
.
nLang
;
vcl
::
Font
aFont
=
OutputDevice
::
GetDefaultFont
(
rFntDta
.
nFontType
,
nLang
,
GetDefaultFontFlags
::
OnlyOne
);
rEditEngineItemPool
.
SetPoolDefaultItem
(
SvxFontItem
(
aFont
.
GetFamilyType
(),
aFont
.
GetFamilyName
(),
aFont
.
GetStyleName
(),
aFont
.
GetPitch
(),
aFont
.
GetCharSet
(),
rFntDta
.
nFontInfoId
)
);
}
// set font heights
SvxFontHeightItem
aFontHeigt
(
Application
::
GetDefaultDevice
()
->
LogicToPixel
(
Size
(
0
,
11
),
MapMode
(
MapUnit
::
MapPoint
)
).
Height
(),
100
,
EE_CHAR_FONTHEIGHT
);
rEditEngineItemPool
.
SetPoolDefaultItem
(
aFontHeigt
);
aFontHeigt
.
SetWhich
(
EE_CHAR_FONTHEIGHT_CJK
);
rEditEngineItemPool
.
SetPoolDefaultItem
(
aFontHeigt
);
aFontHeigt
.
SetWhich
(
EE_CHAR_FONTHEIGHT_CTL
);
rEditEngineItemPool
.
SetPoolDefaultItem
(
aFontHeigt
);
// set font heights
SvxFontHeightItem
aFontHeigt
(
Application
::
GetDefaultDevice
()
->
LogicToPixel
(
Size
(
0
,
11
),
MapMode
(
MapUnit
::
MapPoint
)
).
Height
(),
100
,
EE_CHAR_FONTHEIGHT
);
rEditEngineItemPool
.
SetPoolDefaultItem
(
aFontHeigt
);
aFontHeigt
.
SetWhich
(
EE_CHAR_FONTHEIGHT_CJK
);
rEditEngineItemPool
.
SetPoolDefaultItem
(
aFontHeigt
);
aFontHeigt
.
SetWhich
(
EE_CHAR_FONTHEIGHT_CTL
);
rEditEngineItemPool
.
SetPoolDefaultItem
(
aFontHeigt
);
}
EditEngine
&
SmDocShell
::
GetEditEngine
()
{
if
(
!
mpEditEngine
)
...
...
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