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
9b37c217
Kaydet (Commit)
9b37c217
authored
May 04, 2015
tarafından
Noel Grandin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
convert SUBSFONT_ to scoped enum
Change-Id: Ic66191ac4cdfa753dc784e7bd1a6dd20f50def6b
üst
78706545
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
24 additions
and
16 deletions
+24
-16
fontdefs.hxx
include/unotools/fontdefs.hxx
+13
-5
drawingml.cxx
oox/source/export/drawingml.cxx
+2
-2
xltools.cxx
sc/source/filter/excel/xltools.cxx
+1
-1
pptx-text.cxx
sd/source/filter/eppt/pptx-text.cxx
+1
-1
writerwordglue.cxx
sw/source/filter/ww8/writerwordglue.cxx
+1
-1
fontdefs.cxx
unotools/source/misc/fontdefs.cxx
+6
-6
No files found.
include/unotools/fontdefs.hxx
Dosyayı görüntüle @
9b37c217
...
@@ -24,6 +24,7 @@
...
@@ -24,6 +24,7 @@
#include <tools/solar.h>
#include <tools/solar.h>
#include <rtl/ustring.hxx>
#include <rtl/ustring.hxx>
#include <rtl/ustrbuf.hxx>
#include <rtl/ustrbuf.hxx>
#include <o3tl/typed_flags_set.hxx>
namespace
utl
{
namespace
utl
{
class
FontSubstConfiguration
;
class
FontSubstConfiguration
;
...
@@ -32,12 +33,19 @@ namespace utl {
...
@@ -32,12 +33,19 @@ namespace utl {
// - SubsFontName -
// - SubsFontName -
#define SUBSFONT_ONLYONE ((sal_uLong)0x00000001)
enum
class
SubsFontFlags
#define SUBSFONT_MS ((sal_uLong)0x00000002)
{
#define SUBSFONT_PS ((sal_uLong)0x00000004)
ONLYONE
=
0x01
,
#define SUBSFONT_HTML ((sal_uLong)0x00000008)
MS
=
0x02
,
PS
=
0x04
,
HTML
=
0x08
,
};
namespace
o3tl
{
template
<>
struct
typed_flags
<
SubsFontFlags
>
:
is_typed_flags
<
SubsFontFlags
,
0x0f
>
{};
}
UNOTOOLS_DLLPUBLIC
OUString
GetSubsFontName
(
const
OUString
&
rName
,
sal_uLong
nFlags
);
UNOTOOLS_DLLPUBLIC
OUString
GetSubsFontName
(
const
OUString
&
rName
,
SubsFontFlags
nFlags
);
UNOTOOLS_DLLPUBLIC
void
AddTokenFontName
(
OUString
&
rName
,
const
OUString
&
rNewToken
);
UNOTOOLS_DLLPUBLIC
void
AddTokenFontName
(
OUString
&
rName
,
const
OUString
&
rNewToken
);
...
...
oox/source/export/drawingml.cxx
Dosyayı görüntüle @
9b37c217
...
@@ -1368,7 +1368,7 @@ void DrawingML::WriteRunProperties( Reference< XPropertySet > rRun, bool bIsFiel
...
@@ -1368,7 +1368,7 @@ void DrawingML::WriteRunProperties( Reference< XPropertySet > rRun, bool bIsFiel
OUString
usTypeface
;
OUString
usTypeface
;
mAny
>>=
usTypeface
;
mAny
>>=
usTypeface
;
OUString
aSubstName
(
GetSubsFontName
(
usTypeface
,
S
UBSFONT_ONLYONE
|
SUBSFONT_
MS
)
);
OUString
aSubstName
(
GetSubsFontName
(
usTypeface
,
S
ubsFontFlags
::
ONLYONE
|
SubsFontFlags
::
MS
)
);
mpFS
->
singleElementNS
(
XML_a
,
XML_latin
,
mpFS
->
singleElementNS
(
XML_a
,
XML_latin
,
XML_typeface
,
USS
(
aSubstName
.
getLength
()
?
aSubstName
:
usTypeface
),
XML_typeface
,
USS
(
aSubstName
.
getLength
()
?
aSubstName
:
usTypeface
),
...
@@ -1384,7 +1384,7 @@ void DrawingML::WriteRunProperties( Reference< XPropertySet > rRun, bool bIsFiel
...
@@ -1384,7 +1384,7 @@ void DrawingML::WriteRunProperties( Reference< XPropertySet > rRun, bool bIsFiel
OUString
usTypeface
;
OUString
usTypeface
;
mAny
>>=
usTypeface
;
mAny
>>=
usTypeface
;
OUString
aSubstName
(
GetSubsFontName
(
usTypeface
,
S
UBSFONT_ONLYONE
|
SUBSFONT_
MS
)
);
OUString
aSubstName
(
GetSubsFontName
(
usTypeface
,
S
ubsFontFlags
::
ONLYONE
|
SubsFontFlags
::
MS
)
);
mpFS
->
singleElementNS
(
XML_a
,
bComplex
?
XML_cs
:
XML_ea
,
mpFS
->
singleElementNS
(
XML_a
,
bComplex
?
XML_cs
:
XML_ea
,
XML_typeface
,
USS
(
aSubstName
.
getLength
()
?
aSubstName
:
usTypeface
),
XML_typeface
,
USS
(
aSubstName
.
getLength
()
?
aSubstName
:
usTypeface
),
...
...
sc/source/filter/excel/xltools.cxx
Dosyayı görüntüle @
9b37c217
...
@@ -444,7 +444,7 @@ sal_uInt16 XclTools::GetXclCodePage( rtl_TextEncoding eTextEnc )
...
@@ -444,7 +444,7 @@ sal_uInt16 XclTools::GetXclCodePage( rtl_TextEncoding eTextEnc )
OUString
XclTools
::
GetXclFontName
(
const
OUString
&
rFontName
)
OUString
XclTools
::
GetXclFontName
(
const
OUString
&
rFontName
)
{
{
// substitute with MS fonts
// substitute with MS fonts
OUString
aNewName
=
GetSubsFontName
(
rFontName
,
S
UBSFONT_ONLYONE
|
SUBSFONT_
MS
);
OUString
aNewName
=
GetSubsFontName
(
rFontName
,
S
ubsFontFlags
::
ONLYONE
|
SubsFontFlags
::
MS
);
return
aNewName
.
isEmpty
()
?
rFontName
:
aNewName
;
return
aNewName
.
isEmpty
()
?
rFontName
:
aNewName
;
}
}
...
...
sd/source/filter/eppt/pptx-text.cxx
Dosyayı görüntüle @
9b37c217
...
@@ -1381,7 +1381,7 @@ FontCollectionEntry::~FontCollectionEntry()
...
@@ -1381,7 +1381,7 @@ FontCollectionEntry::~FontCollectionEntry()
void
FontCollectionEntry
::
ImplInit
(
const
OUString
&
rName
)
void
FontCollectionEntry
::
ImplInit
(
const
OUString
&
rName
)
{
{
OUString
aSubstName
(
GetSubsFontName
(
rName
,
S
UBSFONT_ONLYONE
|
SUBSFONT_
MS
)
);
OUString
aSubstName
(
GetSubsFontName
(
rName
,
S
ubsFontFlags
::
ONLYONE
|
SubsFontFlags
::
MS
)
);
if
(
!
aSubstName
.
isEmpty
()
)
if
(
!
aSubstName
.
isEmpty
()
)
{
{
Name
=
aSubstName
;
Name
=
aSubstName
;
...
...
sw/source/filter/ww8/writerwordglue.cxx
Dosyayı görüntüle @
9b37c217
...
@@ -317,7 +317,7 @@ namespace myImplHelpers
...
@@ -317,7 +317,7 @@ namespace myImplHelpers
{
{
if
(
IsStarSymbol
(
rFont
))
if
(
IsStarSymbol
(
rFont
))
return
OUString
(
"Arial Unicode MS"
);
return
OUString
(
"Arial Unicode MS"
);
return
GetSubsFontName
(
rFont
,
S
UBSFONT_ONLYONE
|
SUBSFONT_
MS
);
return
GetSubsFontName
(
rFont
,
S
ubsFontFlags
::
ONLYONE
|
SubsFontFlags
::
MS
);
}
}
//Utility to remove entries before a given starting position
//Utility to remove entries before a given starting position
...
...
unotools/source/misc/fontdefs.cxx
Dosyayı görüntüle @
9b37c217
...
@@ -512,7 +512,7 @@ void AddTokenFontName( OUString& rName, const OUString& rNewToken )
...
@@ -512,7 +512,7 @@ void AddTokenFontName( OUString& rName, const OUString& rNewToken )
ImplAppendFontToken
(
rName
,
rNewToken
);
ImplAppendFontToken
(
rName
,
rNewToken
);
}
}
OUString
GetSubsFontName
(
const
OUString
&
rName
,
sal_uLong
nFlags
)
OUString
GetSubsFontName
(
const
OUString
&
rName
,
SubsFontFlags
nFlags
)
{
{
OUString
aName
;
OUString
aName
;
...
@@ -521,7 +521,7 @@ OUString GetSubsFontName( const OUString& rName, sal_uLong nFlags )
...
@@ -521,7 +521,7 @@ OUString GetSubsFontName( const OUString& rName, sal_uLong nFlags )
GetNextFontToken
(
rName
,
nIndex
)
);
GetNextFontToken
(
rName
,
nIndex
)
);
// #93662# do not try to replace StarSymbol with MS only font
// #93662# do not try to replace StarSymbol with MS only font
if
(
nFlags
==
(
S
UBSFONT_MS
|
SUBSFONT_
ONLYONE
)
if
(
nFlags
==
(
S
ubsFontFlags
::
MS
|
SubsFontFlags
::
ONLYONE
)
&&
(
aOrgName
==
"starsymbol"
&&
(
aOrgName
==
"starsymbol"
||
aOrgName
==
"opensymbol"
)
)
||
aOrgName
==
"opensymbol"
)
)
return
aName
;
return
aName
;
...
@@ -535,15 +535,15 @@ OUString GetSubsFontName( const OUString& rName, sal_uLong nFlags )
...
@@ -535,15 +535,15 @@ OUString GetSubsFontName( const OUString& rName, sal_uLong nFlags )
switch
(
i
)
switch
(
i
)
{
{
case
0
:
case
0
:
if
(
nFlags
&
S
UBSFONT_
MS
&&
pAttr
->
MSSubstitutions
.
size
()
)
if
(
nFlags
&
S
ubsFontFlags
::
MS
&&
pAttr
->
MSSubstitutions
.
size
()
)
pVector
=
&
pAttr
->
MSSubstitutions
;
pVector
=
&
pAttr
->
MSSubstitutions
;
break
;
break
;
case
1
:
case
1
:
if
(
nFlags
&
S
UBSFONT_
PS
&&
pAttr
->
PSSubstitutions
.
size
()
)
if
(
nFlags
&
S
ubsFontFlags
::
PS
&&
pAttr
->
PSSubstitutions
.
size
()
)
pVector
=
&
pAttr
->
PSSubstitutions
;
pVector
=
&
pAttr
->
PSSubstitutions
;
break
;
break
;
case
2
:
case
2
:
if
(
nFlags
&
S
UBSFONT_
HTML
&&
pAttr
->
HTMLSubstitutions
.
size
()
)
if
(
nFlags
&
S
ubsFontFlags
::
HTML
&&
pAttr
->
HTMLSubstitutions
.
size
()
)
pVector
=
&
pAttr
->
HTMLSubstitutions
;
pVector
=
&
pAttr
->
HTMLSubstitutions
;
break
;
break
;
}
}
...
@@ -553,7 +553,7 @@ OUString GetSubsFontName( const OUString& rName, sal_uLong nFlags )
...
@@ -553,7 +553,7 @@ OUString GetSubsFontName( const OUString& rName, sal_uLong nFlags )
if
(
!
ImplIsFontToken
(
rName
,
*
it
)
)
if
(
!
ImplIsFontToken
(
rName
,
*
it
)
)
{
{
ImplAppendFontToken
(
aName
,
*
it
);
ImplAppendFontToken
(
aName
,
*
it
);
if
(
nFlags
&
S
UBSFONT_
ONLYONE
)
if
(
nFlags
&
S
ubsFontFlags
::
ONLYONE
)
{
{
i
=
4
;
i
=
4
;
break
;
break
;
...
...
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