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
78706545
Kaydet (Commit)
78706545
authored
May 04, 2015
tarafından
Noel Grandin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
convert FONTTOSUBSFONT constants to scoped enum
Change-Id: I994bfc76d709d01406404991dbfbd49b15bd03f4
üst
60e659ae
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
32 additions
and
18 deletions
+32
-18
editobj.cxx
editeng/source/editeng/editobj.cxx
+4
-4
numitem.cxx
editeng/source/items/numitem.cxx
+1
-1
fontcvt.hxx
include/unotools/fontcvt.hxx
+13
-4
fontcvt.cxx
unotools/source/misc/fontcvt.cxx
+12
-7
xmlimp.cxx
xmloff/source/core/xmlimp.cxx
+2
-2
No files found.
editeng/source/editeng/editobj.cxx
Dosyayı görüntüle @
78706545
...
@@ -1160,7 +1160,7 @@ void EditTextObjectImpl::StoreData( SvStream& rOStream ) const
...
@@ -1160,7 +1160,7 @@ void EditTextObjectImpl::StoreData( SvStream& rOStream ) const
}
}
// Convert StarSymbol back to StarBats
// Convert StarSymbol back to StarBats
FontToSubsFontConverter
hConv
=
CreateFontToSubsFontConverter
(
rFontItem
.
GetFamilyName
(),
F
ONTTOSUBSFONT_EXPORT
|
FONTTOSUBSFONT_
ONLYOLDSOSYMBOLFONTS
);
FontToSubsFontConverter
hConv
=
CreateFontToSubsFontConverter
(
rFontItem
.
GetFamilyName
(),
F
ontToSubsFontFlags
::
EXPORT
|
FontToSubsFontFlags
::
ONLYOLDSOSYMBOLFONTS
);
if
(
hConv
)
if
(
hConv
)
{
{
// Don't create a new Attrib with StarBats font, MBR changed the
// Don't create a new Attrib with StarBats font, MBR changed the
...
@@ -1184,7 +1184,7 @@ void EditTextObjectImpl::StoreData( SvStream& rOStream ) const
...
@@ -1184,7 +1184,7 @@ void EditTextObjectImpl::StoreData( SvStream& rOStream ) const
FontToSubsFontConverter
hConv
=
NULL
;
FontToSubsFontConverter
hConv
=
NULL
;
if
(
rC
.
GetParaAttribs
().
GetItemState
(
EE_CHAR_FONTINFO
)
==
SfxItemState
::
SET
)
if
(
rC
.
GetParaAttribs
().
GetItemState
(
EE_CHAR_FONTINFO
)
==
SfxItemState
::
SET
)
{
{
hConv
=
CreateFontToSubsFontConverter
(
static_cast
<
const
SvxFontItem
&>
(
rC
.
GetParaAttribs
().
Get
(
EE_CHAR_FONTINFO
)).
GetFamilyName
(),
F
ONTTOSUBSFONT_EXPORT
|
FONTTOSUBSFONT_
ONLYOLDSOSYMBOLFONTS
);
hConv
=
CreateFontToSubsFontConverter
(
static_cast
<
const
SvxFontItem
&>
(
rC
.
GetParaAttribs
().
Get
(
EE_CHAR_FONTINFO
)).
GetFamilyName
(),
F
ontToSubsFontFlags
::
EXPORT
|
FontToSubsFontFlags
::
ONLYOLDSOSYMBOLFONTS
);
}
}
if
(
hConv
)
if
(
hConv
)
{
{
...
@@ -1411,7 +1411,7 @@ void EditTextObjectImpl::CreateData( SvStream& rIStream )
...
@@ -1411,7 +1411,7 @@ void EditTextObjectImpl::CreateData( SvStream& rIStream )
}
}
// Convert StarMath and StarBats to StarSymbol
// Convert StarMath and StarBats to StarSymbol
FontToSubsFontConverter
hConv
=
CreateFontToSubsFontConverter
(
rFontItem
.
GetFamilyName
(),
F
ONTTOSUBSFONT_IMPORT
|
FONTTOSUBSFONT_
ONLYOLDSOSYMBOLFONTS
);
FontToSubsFontConverter
hConv
=
CreateFontToSubsFontConverter
(
rFontItem
.
GetFamilyName
(),
F
ontToSubsFontFlags
::
IMPORT
|
FontToSubsFontFlags
::
ONLYOLDSOSYMBOLFONTS
);
if
(
hConv
)
if
(
hConv
)
{
{
SvxFontItem
aNewFontItem
(
rFontItem
);
SvxFontItem
aNewFontItem
(
rFontItem
);
...
@@ -1444,7 +1444,7 @@ void EditTextObjectImpl::CreateData( SvStream& rIStream )
...
@@ -1444,7 +1444,7 @@ void EditTextObjectImpl::CreateData( SvStream& rIStream )
if
(
pC
->
GetParaAttribs
().
GetItemState
(
EE_CHAR_FONTINFO
)
==
SfxItemState
::
SET
)
if
(
pC
->
GetParaAttribs
().
GetItemState
(
EE_CHAR_FONTINFO
)
==
SfxItemState
::
SET
)
{
{
const
SvxFontItem
&
rFontItem
=
static_cast
<
const
SvxFontItem
&>
(
pC
->
GetParaAttribs
().
Get
(
EE_CHAR_FONTINFO
));
const
SvxFontItem
&
rFontItem
=
static_cast
<
const
SvxFontItem
&>
(
pC
->
GetParaAttribs
().
Get
(
EE_CHAR_FONTINFO
));
FontToSubsFontConverter
hConv
=
CreateFontToSubsFontConverter
(
rFontItem
.
GetFamilyName
(),
F
ONTTOSUBSFONT_IMPORT
|
FONTTOSUBSFONT_
ONLYOLDSOSYMBOLFONTS
);
FontToSubsFontConverter
hConv
=
CreateFontToSubsFontConverter
(
rFontItem
.
GetFamilyName
(),
F
ontToSubsFontFlags
::
IMPORT
|
FontToSubsFontFlags
::
ONLYOLDSOSYMBOLFONTS
);
if
(
hConv
)
if
(
hConv
)
{
{
SvxFontItem
aNewFontItem
(
rFontItem
);
SvxFontItem
aNewFontItem
(
rFontItem
);
...
...
editeng/source/items/numitem.cxx
Dosyayı görüntüle @
78706545
...
@@ -697,7 +697,7 @@ SvStream& SvxNumRule::Store( SvStream &rStream )
...
@@ -697,7 +697,7 @@ SvStream& SvxNumRule::Store( SvStream &rStream )
if
(
!
pConverter
)
if
(
!
pConverter
)
pConverter
=
pConverter
=
CreateFontToSubsFontConverter
(
aFmts
[
i
]
->
GetBulletFont
()
->
GetName
(),
CreateFontToSubsFontConverter
(
aFmts
[
i
]
->
GetBulletFont
()
->
GetName
(),
F
ONTTOSUBSFONT_EXPORT
|
FONTTOSUBSFONT_
ONLYOLDSOSYMBOLFONTS
);
F
ontToSubsFontFlags
::
EXPORT
|
FontToSubsFontFlags
::
ONLYOLDSOSYMBOLFONTS
);
}
}
aFmts
[
i
]
->
Store
(
rStream
,
pConverter
);
aFmts
[
i
]
->
Store
(
rStream
,
pConverter
);
}
}
...
...
include/unotools/fontcvt.hxx
Dosyayı görüntüle @
78706545
...
@@ -23,15 +23,23 @@
...
@@ -23,15 +23,23 @@
#include <unotools/unotoolsdllapi.h>
#include <unotools/unotoolsdllapi.h>
#include <rtl/ustring.hxx>
#include <rtl/ustring.hxx>
#include <tools/solar.h>
#include <tools/solar.h>
#include <o3tl/typed_flags_set.hxx>
// - FontToSubsFont -
// - FontToSubsFont -
#define FONTTOSUBSFONT_IMPORT ((sal_uLong)0x00000001)
enum
class
FontToSubsFontFlags
#define FONTTOSUBSFONT_EXPORT ((sal_uLong)0x00000002)
{
#define FONTTOSUBSFONT_ONLYOLDSOSYMBOLFONTS ((sal_uLong)0x00000004)
IMPORT
=
0x01
,
EXPORT
=
0x02
,
ONLYOLDSOSYMBOLFONTS
=
0x04
,
};
namespace
o3tl
{
template
<>
struct
typed_flags
<
FontToSubsFontFlags
>
:
is_typed_flags
<
FontToSubsFontFlags
,
0x07
>
{};
}
typedef
void
*
FontToSubsFontConverter
;
typedef
void
*
FontToSubsFontConverter
;
UNOTOOLS_DLLPUBLIC
FontToSubsFontConverter
CreateFontToSubsFontConverter
(
const
OUString
&
rFontName
,
sal_uLong
nFlags
);
UNOTOOLS_DLLPUBLIC
FontToSubsFontConverter
CreateFontToSubsFontConverter
(
const
OUString
&
rFontName
,
FontToSubsFontFlags
nFlags
);
UNOTOOLS_DLLPUBLIC
void
DestroyFontToSubsFontConverter
(
FontToSubsFontConverter
hConverter
);
UNOTOOLS_DLLPUBLIC
void
DestroyFontToSubsFontConverter
(
FontToSubsFontConverter
hConverter
);
UNOTOOLS_DLLPUBLIC
sal_Unicode
ConvertFontToSubsFontChar
(
FontToSubsFontConverter
hConverter
,
sal_Unicode
c
);
UNOTOOLS_DLLPUBLIC
sal_Unicode
ConvertFontToSubsFontChar
(
FontToSubsFontConverter
hConverter
,
sal_Unicode
c
);
UNOTOOLS_DLLPUBLIC
OUString
GetFontToSubsFontName
(
FontToSubsFontConverter
hConverter
);
UNOTOOLS_DLLPUBLIC
OUString
GetFontToSubsFontName
(
FontToSubsFontConverter
hConverter
);
...
@@ -65,6 +73,7 @@ public:
...
@@ -65,6 +73,7 @@ public:
//The users of this might want to make a distinction between failed characters
//The users of this might want to make a distinction between failed characters
//which were inside and those outside the unicode private area.
//which were inside and those outside the unicode private area.
UNOTOOLS_DLLPUBLIC
StarSymbolToMSMultiFont
*
CreateStarSymbolToMSMultiFont
(
bool
bPerfectOnly
=
false
);
UNOTOOLS_DLLPUBLIC
StarSymbolToMSMultiFont
*
CreateStarSymbolToMSMultiFont
(
bool
bPerfectOnly
=
false
);
#endif // INCLUDED_UNOTOOLS_FONTCVT_HXX
#endif // INCLUDED_UNOTOOLS_FONTCVT_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
unotools/source/misc/fontcvt.cxx
Dosyayı görüntüle @
78706545
...
@@ -1455,29 +1455,34 @@ const ConvertChar* ConvertChar::GetRecodeData( const OUString& rOrgFontName, con
...
@@ -1455,29 +1455,34 @@ const ConvertChar* ConvertChar::GetRecodeData( const OUString& rOrgFontName, con
return
pCvt
;
return
pCvt
;
}
}
FontToSubsFontConverter
CreateFontToSubsFontConverter
(
const
OUString
&
rOrgName
,
sal_uLong
nFlags
)
FontToSubsFontConverter
CreateFontToSubsFontConverter
(
const
OUString
&
rOrgName
,
FontToSubsFontFlags
nFlags
)
{
{
const
ConvertChar
*
pCvt
=
NULL
;
const
ConvertChar
*
pCvt
=
NULL
;
OUString
aName
=
GetEnglishSearchFontName
(
rOrgName
);
OUString
aName
=
GetEnglishSearchFontName
(
rOrgName
);
if
(
nFlags
&
F
ONTTOSUBSFONT_
IMPORT
)
if
(
nFlags
&
F
ontToSubsFontFlags
::
IMPORT
)
{
{
int
nEntries
=
SAL_N_ELEMENTS
(
aStarSymbolRecodeTable
);
int
nEntries
=
SAL_N_ELEMENTS
(
aStarSymbolRecodeTable
);
if
(
nFlags
&
F
ONTTOSUBSFONT_
ONLYOLDSOSYMBOLFONTS
)
// only StarMath+StarBats
if
(
nFlags
&
F
ontToSubsFontFlags
::
ONLYOLDSOSYMBOLFONTS
)
// only StarMath+StarBats
nEntries
=
2
;
nEntries
=
2
;
for
(
int
i
=
0
;
i
<
nEntries
;
++
i
)
for
(
int
i
=
0
;
i
<
nEntries
;
++
i
)
{
{
const
RecodeTable
&
r
=
aStarSymbolRecodeTable
[
i
];
const
RecodeTable
&
r
=
aStarSymbolRecodeTable
[
i
];
if
(
aName
.
equalsAscii
(
r
.
pOrgName
)
)
if
(
aName
.
equalsAscii
(
r
.
pOrgName
)
)
{
pCvt
=
&
r
.
aCvt
;
break
;
}
{
pCvt
=
&
r
.
aCvt
;
break
;
}
}
}
}
}
else
else
{
{
// TODO: FONTTOSUBSFONT_ONLYOLDSOSYMBOLFONTS
// TODO: FontToSubsFontFlags::ONLYOLDSOSYMBOLFONTS
if
(
aName
==
"starsymbol"
)
pCvt
=
&
aImplStarSymbolCvt
;
if
(
aName
==
"starsymbol"
)
else
if
(
aName
==
"opensymbol"
)
pCvt
=
&
aImplStarSymbolCvt
;
pCvt
=
&
aImplStarSymbolCvt
;
else
if
(
aName
==
"opensymbol"
)
pCvt
=
&
aImplStarSymbolCvt
;
}
}
return
(
FontToSubsFontConverter
)
pCvt
;
return
(
FontToSubsFontConverter
)
pCvt
;
...
...
xmloff/source/core/xmlimp.cxx
Dosyayı görüntüle @
78706545
...
@@ -1739,7 +1739,7 @@ sal_Unicode SvXMLImport::ConvStarBatsCharToStarSymbol( sal_Unicode c )
...
@@ -1739,7 +1739,7 @@ sal_Unicode SvXMLImport::ConvStarBatsCharToStarSymbol( sal_Unicode c )
{
{
OUString
sStarBats
(
"StarBats"
);
OUString
sStarBats
(
"StarBats"
);
mpImpl
->
hBatsFontConv
=
CreateFontToSubsFontConverter
(
sStarBats
,
mpImpl
->
hBatsFontConv
=
CreateFontToSubsFontConverter
(
sStarBats
,
F
ONTTOSUBSFONT_IMPORT
|
FONTTOSUBSFONT_
ONLYOLDSOSYMBOLFONTS
);
F
ontToSubsFontFlags
::
IMPORT
|
FontToSubsFontFlags
::
ONLYOLDSOSYMBOLFONTS
);
SAL_WARN_IF
(
!
mpImpl
->
hBatsFontConv
,
"xmloff.core"
,
"Got no symbol font converter"
);
SAL_WARN_IF
(
!
mpImpl
->
hBatsFontConv
,
"xmloff.core"
,
"Got no symbol font converter"
);
}
}
if
(
mpImpl
->
hBatsFontConv
)
if
(
mpImpl
->
hBatsFontConv
)
...
@@ -1757,7 +1757,7 @@ sal_Unicode SvXMLImport::ConvStarMathCharToStarSymbol( sal_Unicode c )
...
@@ -1757,7 +1757,7 @@ sal_Unicode SvXMLImport::ConvStarMathCharToStarSymbol( sal_Unicode c )
{
{
OUString
sStarMath
(
"StarMath"
);
OUString
sStarMath
(
"StarMath"
);
mpImpl
->
hMathFontConv
=
CreateFontToSubsFontConverter
(
sStarMath
,
mpImpl
->
hMathFontConv
=
CreateFontToSubsFontConverter
(
sStarMath
,
F
ONTTOSUBSFONT_IMPORT
|
FONTTOSUBSFONT_
ONLYOLDSOSYMBOLFONTS
);
F
ontToSubsFontFlags
::
IMPORT
|
FontToSubsFontFlags
::
ONLYOLDSOSYMBOLFONTS
);
SAL_WARN_IF
(
!
mpImpl
->
hMathFontConv
,
"xmloff.core"
,
"Got no symbol font converter"
);
SAL_WARN_IF
(
!
mpImpl
->
hMathFontConv
,
"xmloff.core"
,
"Got no symbol font converter"
);
}
}
if
(
mpImpl
->
hMathFontConv
)
if
(
mpImpl
->
hMathFontConv
)
...
...
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