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
49e13aa4
Kaydet (Commit)
49e13aa4
authored
May 19, 2015
tarafından
Noel Grandin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
convert FONT_SUBSTITUTE constants to scoped enum
Change-Id: I8312f0117f33349218a09ccdfea946c66ceb1b3e
üst
456c379f
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
27 additions
and
17 deletions
+27
-17
outdev.hxx
include/vcl/outdev.hxx
+12
-4
fontsubstconfig.cxx
svtools/source/config/fontsubstconfig.cxx
+3
-3
outdev.h
vcl/inc/outdev.h
+6
-4
font.cxx
vcl/source/outdev/font.cxx
+6
-6
No files found.
include/vcl/outdev.hxx
Dosyayı görüntüle @
49e13aa4
...
...
@@ -266,9 +266,17 @@ namespace o3tl
template
<>
struct
typed_flags
<
AntialiasingFlags
>
:
is_typed_flags
<
AntialiasingFlags
,
0x07
>
{};
}
// AddFontSubstitute
#define FONT_SUBSTITUTE_ALWAYS ((sal_uInt16)0x0001)
#define FONT_SUBSTITUTE_SCREENONLY ((sal_uInt16)0x0002)
// AddFontSubstitute() flags
enum
class
AddFontSubstituteFlags
{
NONE
=
0x00
,
ALWAYS
=
0x01
,
ScreenOnly
=
0x02
,
};
namespace
o3tl
{
template
<>
struct
typed_flags
<
AddFontSubstituteFlags
>
:
is_typed_flags
<
AddFontSubstituteFlags
,
0x03
>
{};
}
#define DEFAULTFONT_FLAGS_ONLYONE ((sal_uLong)0x00000001)
...
...
@@ -1259,7 +1267,7 @@ public:
static
void
EndFontSubstitution
();
static
void
AddFontSubstitute
(
const
OUString
&
rFontName
,
const
OUString
&
rReplaceFontName
,
sal_uInt16
nFlags
=
0
);
AddFontSubstituteFlags
nFlags
=
AddFontSubstituteFlags
::
NONE
);
static
void
RemoveFontSubstitute
(
sal_uInt16
n
);
static
sal_uInt16
GetFontSubstituteCount
();
...
...
svtools/source/config/fontsubstconfig.cxx
Dosyayı görüntüle @
49e13aa4
...
...
@@ -178,12 +178,12 @@ void SvtFontSubstConfig::Apply()
for
(
sal_Int32
i
=
0
;
i
<
nCount
;
i
++
)
{
sal_uInt16
nFlags
=
0
;
AddFontSubstituteFlags
nFlags
=
AddFontSubstituteFlags
::
NONE
;
const
SubstitutionStruct
*
pSubs
=
GetSubstitution
(
i
);
if
(
pSubs
->
bReplaceAlways
)
nFlags
|=
FONT_SUBSTITUTE_
ALWAYS
;
nFlags
|=
AddFontSubstituteFlags
::
ALWAYS
;
if
(
pSubs
->
bReplaceOnScreenOnly
)
nFlags
|=
FONT_SUBSTITUTE_SCREENONLY
;
nFlags
|=
AddFontSubstituteFlags
::
ScreenOnly
;
OutputDevice
::
AddFontSubstitute
(
pSubs
->
sFont
,
pSubs
->
sReplaceBy
,
nFlags
);
}
...
...
vcl/inc/outdev.h
Dosyayı görüntüle @
49e13aa4
...
...
@@ -36,6 +36,8 @@ class VirtualDevice;
class
ImplGetDevFontList
;
class
GetDevSizeList
;
class
PhysicalFontCollection
;
enum
class
AddFontSubstituteFlags
;
// an ImplGetDevFontList is created by an PhysicalFontCollection
// it becomes invalid when original PhysicalFontCollection is modified
class
ImplGetDevFontList
...
...
@@ -90,9 +92,9 @@ struct ImplFontSubstEntry
OUString
maReplaceName
;
OUString
maSearchName
;
OUString
maSearchReplaceName
;
sal_uInt16
mnFlags
;
AddFontSubstituteFlags
mnFlags
;
ImplFontSubstEntry
(
const
OUString
&
rFontName
,
const
OUString
&
rSubstFontName
,
sal_uInt16
nSubstFlags
);
ImplFontSubstEntry
(
const
OUString
&
rFontName
,
const
OUString
&
rSubstFontName
,
AddFontSubstituteFlags
nSubstFlags
);
};
class
ImplDirectFontSubstitution
...
...
@@ -102,13 +104,13 @@ private:
typedef
std
::
list
<
ImplFontSubstEntry
>
FontSubstList
;
FontSubstList
maFontSubstList
;
public
:
void
AddFontSubstitute
(
const
OUString
&
rFontName
,
const
OUString
&
rSubstName
,
sal_uInt16
nFlags
);
void
AddFontSubstitute
(
const
OUString
&
rFontName
,
const
OUString
&
rSubstName
,
AddFontSubstituteFlags
nFlags
);
void
RemoveFontSubstitute
(
int
nIndex
);
int
GetFontSubstituteCount
()
const
{
return
maFontSubstList
.
size
();
};
bool
Empty
()
const
{
return
maFontSubstList
.
empty
();
}
void
Clear
()
{
maFontSubstList
.
clear
();
}
bool
FindFontSubstitute
(
OUString
&
rSubstName
,
const
OUString
&
rFontName
,
sal_uInt16
nFlags
)
const
;
bool
FindFontSubstitute
(
OUString
&
rSubstName
,
const
OUString
&
rFontName
,
AddFontSubstituteFlags
nFlags
)
const
;
};
// PreMatchFontSubstitution
...
...
vcl/source/outdev/font.cxx
Dosyayı görüntüle @
49e13aa4
...
...
@@ -687,7 +687,7 @@ void OutputDevice::EndFontSubstitution()
void
OutputDevice
::
AddFontSubstitute
(
const
OUString
&
rFontName
,
const
OUString
&
rReplaceFontName
,
sal_uInt16
nFlags
)
AddFontSubstituteFlags
nFlags
)
{
ImplDirectFontSubstitution
*&
rpSubst
=
ImplGetSVData
()
->
maGDIData
.
mpDirectFontSubst
;
if
(
!
rpSubst
)
...
...
@@ -697,13 +697,13 @@ void OutputDevice::AddFontSubstitute( const OUString& rFontName,
}
void
ImplDirectFontSubstitution
::
AddFontSubstitute
(
const
OUString
&
rFontName
,
const
OUString
&
rSubstFontName
,
sal_uInt16
nFlags
)
const
OUString
&
rSubstFontName
,
AddFontSubstituteFlags
nFlags
)
{
maFontSubstList
.
push_back
(
ImplFontSubstEntry
(
rFontName
,
rSubstFontName
,
nFlags
)
);
}
ImplFontSubstEntry
::
ImplFontSubstEntry
(
const
OUString
&
rFontName
,
const
OUString
&
rSubstFontName
,
sal_uInt16
nSubstFlags
)
const
OUString
&
rSubstFontName
,
AddFontSubstituteFlags
nSubstFlags
)
:
maName
(
rFontName
)
,
maReplaceName
(
rSubstFontName
)
,
mnFlags
(
nSubstFlags
)
...
...
@@ -737,14 +737,14 @@ sal_uInt16 OutputDevice::GetFontSubstituteCount()
}
bool
ImplDirectFontSubstitution
::
FindFontSubstitute
(
OUString
&
rSubstName
,
const
OUString
&
rSearchName
,
sal_uInt16
nFlags
)
const
const
OUString
&
rSearchName
,
AddFontSubstituteFlags
nFlags
)
const
{
// TODO: get rid of O(N) searches
FontSubstList
::
const_iterator
it
=
maFontSubstList
.
begin
();
for
(;
it
!=
maFontSubstList
.
end
();
++
it
)
{
const
ImplFontSubstEntry
&
rEntry
=
*
it
;
if
(
((
rEntry
.
mnFlags
&
nFlags
)
||
!
nFlags
)
if
(
((
rEntry
.
mnFlags
&
nFlags
)
||
nFlags
==
AddFontSubstituteFlags
::
NONE
)
&&
(
rEntry
.
maSearchName
==
rSearchName
)
)
{
rSubstName
=
rEntry
.
maSearchReplaceName
;
...
...
@@ -764,7 +764,7 @@ void ImplFontSubstitute( OUString& rFontName )
// apply user-configurable font replacement (eg, from the list in Tools->Options)
const
ImplDirectFontSubstitution
*
pSubst
=
ImplGetSVData
()
->
maGDIData
.
mpDirectFontSubst
;
if
(
pSubst
&&
pSubst
->
FindFontSubstitute
(
aSubstFontName
,
rFontName
,
FONT_SUBSTITUTE_
ALWAYS
)
)
if
(
pSubst
&&
pSubst
->
FindFontSubstitute
(
aSubstFontName
,
rFontName
,
AddFontSubstituteFlags
::
ALWAYS
)
)
{
rFontName
=
aSubstFontName
;
return
;
...
...
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