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
a3db321e
Kaydet (Commit)
a3db321e
authored
Kas 17, 2015
tarafından
Stephan Bergmann
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Don't assume sal_Unicode is unsigned short
Change-Id: I7a741130689721c69fd2879be6bda27fc6ec3646
üst
e625a440
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
22 additions
and
20 deletions
+22
-20
sft.hxx
vcl/inc/sft.hxx
+4
-4
ctfonts.cxx
vcl/quartz/ctfonts.cxx
+1
-1
ctlayout.cxx
vcl/quartz/ctlayout.cxx
+2
-2
utils.cxx
vcl/quartz/utils.cxx
+6
-5
sft.cxx
vcl/source/fontsubset/sft.cxx
+2
-2
xlat.cxx
vcl/source/fontsubset/xlat.cxx
+5
-5
syschild.cxx
vcl/source/window/syschild.cxx
+2
-1
No files found.
vcl/inc/sft.hxx
Dosyayı görüntüle @
a3db321e
...
@@ -180,9 +180,9 @@ namespace vcl
...
@@ -180,9 +180,9 @@ namespace vcl
typedef
struct
{
typedef
struct
{
char
*
family
;
/**< family name */
char
*
family
;
/**< family name */
sal_
uInt16
*
ufamily
;
/**< family name UCS2 */
sal_
Unicode
*
ufamily
;
/**< family name UCS2 */
char
*
subfamily
;
/**< subfamily name */
char
*
subfamily
;
/**< subfamily name */
sal_
uInt16
*
usubfamily
;
/**< subfamily name UCS2 */
sal_
Unicode
*
usubfamily
;
/**< subfamily name UCS2 */
char
*
psname
;
/**< PostScript name */
char
*
psname
;
/**< PostScript name */
sal_uInt16
macStyle
;
/**< macstyle bits from 'HEAD' table */
sal_uInt16
macStyle
;
/**< macstyle bits from 'HEAD' table */
int
weight
;
/**< value of WeightClass or 0 if can't be determined */
int
weight
;
/**< value of WeightClass or 0 if can't be determined */
...
@@ -527,9 +527,9 @@ namespace vcl
...
@@ -527,9 +527,9 @@ namespace vcl
char
*
psname
;
char
*
psname
;
char
*
family
;
char
*
family
;
sal_
uInt16
*
ufamily
;
sal_
Unicode
*
ufamily
;
char
*
subfamily
;
char
*
subfamily
;
sal_
uInt16
*
usubfamily
;
sal_
Unicode
*
usubfamily
;
sal_uInt32
ntables
;
sal_uInt32
ntables
;
sal_uInt32
*
goffsets
;
sal_uInt32
*
goffsets
;
...
...
vcl/quartz/ctfonts.cxx
Dosyayı görüntüle @
a3db321e
...
@@ -296,7 +296,7 @@ ImplDevFontAttributes DevFontFromCTFontDescriptor( CTFontDescriptorRef pFD, bool
...
@@ -296,7 +296,7 @@ ImplDevFontAttributes DevFontFromCTFontDescriptor( CTFontDescriptorRef pFD, bool
#ifdef MACOSX
#ifdef MACOSX
const
OUString
aUILang
=
Application
::
GetSettings
().
GetUILanguageTag
().
getLanguage
();
const
OUString
aUILang
=
Application
::
GetSettings
().
GetUILanguageTag
().
getLanguage
();
CFStringRef
pUILang
=
CFStringCreateWithCharacters
(
kCFAllocatorDefault
,
CFStringRef
pUILang
=
CFStringCreateWithCharacters
(
kCFAllocatorDefault
,
aUILang
.
getStr
(
),
aUILang
.
getLength
()
);
reinterpret_cast
<
UniChar
const
*>
(
aUILang
.
getStr
()
),
aUILang
.
getLength
()
);
CFStringRef
pLang
=
nullptr
;
CFStringRef
pLang
=
nullptr
;
CFStringRef
pFamilyName
=
static_cast
<
CFStringRef
>
(
CFStringRef
pFamilyName
=
static_cast
<
CFStringRef
>
(
CTFontDescriptorCopyLocalizedAttribute
(
pFD
,
kCTFontFamilyNameAttribute
,
&
pLang
));
CTFontDescriptorCopyLocalizedAttribute
(
pFD
,
kCTFontFamilyNameAttribute
,
&
pLang
));
...
...
vcl/quartz/ctlayout.cxx
Dosyayı görüntüle @
a3db321e
...
@@ -135,7 +135,7 @@ bool CTLayout::LayoutText( ImplLayoutArgs& rArgs )
...
@@ -135,7 +135,7 @@ bool CTLayout::LayoutText( ImplLayoutArgs& rArgs )
// create the CoreText line layout
// create the CoreText line layout
CFStringRef
aCFText
=
CFStringCreateWithCharactersNoCopy
(
nullptr
,
CFStringRef
aCFText
=
CFStringCreateWithCharactersNoCopy
(
nullptr
,
pStr
+
mnMinCharPos
,
reinterpret_cast
<
UniChar
const
*>
(
pStr
+
mnMinCharPos
)
,
mnCharCount
,
mnCharCount
,
kCFAllocatorNull
);
kCFAllocatorNull
);
// CFAttributedStringCreate copies the attribues parameter
// CFAttributedStringCreate copies the attribues parameter
...
@@ -213,7 +213,7 @@ void CTLayout::AdjustLayout( ImplLayoutArgs& rArgs )
...
@@ -213,7 +213,7 @@ void CTLayout::AdjustLayout( ImplLayoutArgs& rArgs )
CFRelease
(
mpCTLine
);
CFRelease
(
mpCTLine
);
const
sal_Unicode
*
pStr
=
rArgs
.
mrStr
.
getStr
();
const
sal_Unicode
*
pStr
=
rArgs
.
mrStr
.
getStr
();
CFStringRef
aCFText
=
CFStringCreateWithCharactersNoCopy
(
nullptr
,
CFStringRef
aCFText
=
CFStringCreateWithCharactersNoCopy
(
nullptr
,
pStr
+
mnMinCharPos
,
reinterpret_cast
<
UniChar
const
*>
(
pStr
+
mnMinCharPos
)
,
mnCharCount
-
mnTrailingSpaceCount
,
mnCharCount
-
mnTrailingSpaceCount
,
kCFAllocatorNull
);
kCFAllocatorNull
);
CFAttributedStringRef
pAttrStr
=
CFAttributedStringCreate
(
nullptr
,
CFAttributedStringRef
pAttrStr
=
CFAttributedStringCreate
(
nullptr
,
...
...
vcl/quartz/utils.cxx
Dosyayı görüntüle @
a3db321e
...
@@ -43,14 +43,14 @@ OUString GetOUString( CFStringRef rStr )
...
@@ -43,14 +43,14 @@ OUString GetOUString( CFStringRef rStr )
const
UniChar
*
pConstStr
=
CFStringGetCharactersPtr
(
rStr
);
const
UniChar
*
pConstStr
=
CFStringGetCharactersPtr
(
rStr
);
if
(
pConstStr
)
if
(
pConstStr
)
{
{
return
OUString
(
pConstStr
,
nLength
);
return
OUString
(
reinterpret_cast
<
sal_Unicode
const
*>
(
pConstStr
)
,
nLength
);
}
}
UniChar
*
pStr
=
static_cast
<
UniChar
*>
(
rtl_allocateMemory
(
sizeof
(
UniChar
)
*
nLength
)
);
UniChar
*
pStr
=
static_cast
<
UniChar
*>
(
rtl_allocateMemory
(
sizeof
(
UniChar
)
*
nLength
)
);
CFRange
aRange
=
{
0
,
nLength
};
CFRange
aRange
=
{
0
,
nLength
};
CFStringGetCharacters
(
rStr
,
aRange
,
pStr
);
CFStringGetCharacters
(
rStr
,
aRange
,
pStr
);
OUString
aRet
(
pStr
,
nLength
);
OUString
aRet
(
reinterpret_cast
<
sal_Unicode
*>
(
pStr
)
,
nLength
);
rtl_freeMemory
(
pStr
);
rtl_freeMemory
(
pStr
);
return
aRet
;
return
aRet
;
}
}
...
@@ -70,19 +70,20 @@ OUString GetOUString( NSString* pStr )
...
@@ -70,19 +70,20 @@ OUString GetOUString( NSString* pStr )
OUStringBuffer
aBuf
(
nLen
+
1
);
OUStringBuffer
aBuf
(
nLen
+
1
);
aBuf
.
setLength
(
nLen
);
aBuf
.
setLength
(
nLen
);
[
pStr
getCharacters
:
const_cast
<
sal_Unicode
*>
(
aBuf
.
getStr
())];
[
pStr
getCharacters
:
reinterpret_cast
<
unichar
*>
(
const_cast
<
sal_Unicode
*>
(
aBuf
.
getStr
()))];
return
aBuf
.
makeStringAndClear
();
return
aBuf
.
makeStringAndClear
();
}
}
CFStringRef
CreateCFString
(
const
OUString
&
rStr
)
CFStringRef
CreateCFString
(
const
OUString
&
rStr
)
{
{
return
CFStringCreateWithCharacters
(
kCFAllocatorDefault
,
r
Str
.
getStr
(
),
rStr
.
getLength
()
);
return
CFStringCreateWithCharacters
(
kCFAllocatorDefault
,
r
einterpret_cast
<
UniChar
const
*>
(
rStr
.
getStr
()
),
rStr
.
getLength
()
);
}
}
NSString
*
CreateNSString
(
const
OUString
&
rStr
)
NSString
*
CreateNSString
(
const
OUString
&
rStr
)
{
{
return
[[
NSString
alloc
]
initWithCharacters
:
r
Str
.
getStr
(
)
length
:
rStr
.
getLength
()];
return
[[
NSString
alloc
]
initWithCharacters
:
r
einterpret_cast
<
unichar
const
*>
(
rStr
.
getStr
()
)
length
:
rStr
.
getLength
()];
}
}
std
::
ostream
&
operator
<<
(
std
::
ostream
&
s
,
const
CGRect
&
rRect
)
std
::
ostream
&
operator
<<
(
std
::
ostream
&
s
,
const
CGRect
&
rRect
)
...
...
vcl/source/fontsubset/sft.cxx
Dosyayı görüntüle @
a3db321e
...
@@ -848,7 +848,7 @@ static int BSplineToPSPath(ControlPoint *srcA, int srcCount, PSPathElement **pat
...
@@ -848,7 +848,7 @@ static int BSplineToPSPath(ControlPoint *srcA, int srcCount, PSPathElement **pat
/*- Extracts a string from the name table and allocates memory for it -*/
/*- Extracts a string from the name table and allocates memory for it -*/
static
char
*
nameExtract
(
const
sal_uInt8
*
name
,
int
nTableSize
,
int
n
,
int
dbFlag
,
sal_
uInt16
**
ucs2result
)
static
char
*
nameExtract
(
const
sal_uInt8
*
name
,
int
nTableSize
,
int
n
,
int
dbFlag
,
sal_
Unicode
**
ucs2result
)
{
{
char
*
res
;
char
*
res
;
const
sal_uInt8
*
ptr
=
name
+
GetUInt16
(
name
,
4
,
1
)
+
GetUInt16
(
name
+
6
,
12
*
n
+
10
,
1
);
const
sal_uInt8
*
ptr
=
name
+
GetUInt16
(
name
,
4
,
1
)
+
GetUInt16
(
name
+
6
,
12
*
n
+
10
,
1
);
...
@@ -874,7 +874,7 @@ static char *nameExtract( const sal_uInt8* name, int nTableSize, int n, int dbFl
...
@@ -874,7 +874,7 @@ static char *nameExtract( const sal_uInt8* name, int nTableSize, int n, int dbFl
res
[
len
/
2
]
=
0
;
res
[
len
/
2
]
=
0
;
if
(
ucs2result
)
if
(
ucs2result
)
{
{
*
ucs2result
=
static_cast
<
sal_
uInt16
*>
(
malloc
(
len
+
2
));
*
ucs2result
=
static_cast
<
sal_
Unicode
*>
(
malloc
(
len
+
2
));
for
(
int
i
=
0
;
i
<
len
/
2
;
i
++
)
for
(
int
i
=
0
;
i
<
len
/
2
;
i
++
)
(
*
ucs2result
)[
i
]
=
GetUInt16
(
ptr
,
2
*
i
,
1
);
(
*
ucs2result
)[
i
]
=
GetUInt16
(
ptr
,
2
*
i
,
1
);
(
*
ucs2result
)[
len
/
2
]
=
0
;
(
*
ucs2result
)[
len
/
2
]
=
0
;
...
...
vcl/source/fontsubset/xlat.cxx
Dosyayı görüntüle @
a3db321e
...
@@ -171,27 +171,27 @@ sal_uInt16 TranslateChar16(sal_uInt16 src)
...
@@ -171,27 +171,27 @@ sal_uInt16 TranslateChar16(sal_uInt16 src)
void
TranslateString12
(
sal_uInt16
*
src
,
sal_uInt16
*
dst
,
sal_uInt32
n
)
void
TranslateString12
(
sal_uInt16
*
src
,
sal_uInt16
*
dst
,
sal_uInt32
n
)
{
{
aCC
.
convertStr
(
2
,
src
,
dst
,
n
);
aCC
.
convertStr
(
2
,
reinterpret_cast
<
sal_Unicode
*>
(
src
)
,
dst
,
n
);
}
}
void
TranslateString13
(
sal_uInt16
*
src
,
sal_uInt16
*
dst
,
sal_uInt32
n
)
void
TranslateString13
(
sal_uInt16
*
src
,
sal_uInt16
*
dst
,
sal_uInt32
n
)
{
{
aCC
.
convertStr
(
3
,
src
,
dst
,
n
);
aCC
.
convertStr
(
3
,
reinterpret_cast
<
sal_Unicode
*>
(
src
)
,
dst
,
n
);
}
}
void
TranslateString14
(
sal_uInt16
*
src
,
sal_uInt16
*
dst
,
sal_uInt32
n
)
void
TranslateString14
(
sal_uInt16
*
src
,
sal_uInt16
*
dst
,
sal_uInt32
n
)
{
{
aCC
.
convertStr
(
4
,
src
,
dst
,
n
);
aCC
.
convertStr
(
4
,
reinterpret_cast
<
sal_Unicode
*>
(
src
)
,
dst
,
n
);
}
}
void
TranslateString15
(
sal_uInt16
*
src
,
sal_uInt16
*
dst
,
sal_uInt32
n
)
void
TranslateString15
(
sal_uInt16
*
src
,
sal_uInt16
*
dst
,
sal_uInt32
n
)
{
{
aCC
.
convertStr
(
5
,
src
,
dst
,
n
);
aCC
.
convertStr
(
5
,
reinterpret_cast
<
sal_Unicode
*>
(
src
)
,
dst
,
n
);
}
}
void
TranslateString16
(
sal_uInt16
*
src
,
sal_uInt16
*
dst
,
sal_uInt32
n
)
void
TranslateString16
(
sal_uInt16
*
src
,
sal_uInt16
*
dst
,
sal_uInt32
n
)
{
{
aCC
.
convertStr
(
6
,
src
,
dst
,
n
);
aCC
.
convertStr
(
6
,
reinterpret_cast
<
sal_Unicode
*>
(
src
)
,
dst
,
n
);
}
}
}
// namespace vcl
}
// namespace vcl
...
...
vcl/source/window/syschild.cxx
Dosyayı görüntüle @
a3db321e
...
@@ -182,7 +182,8 @@ void SystemChildWindow::ImplTestJavaException( void* pEnv )
...
@@ -182,7 +182,8 @@ void SystemChildWindow::ImplTestJavaException( void* pEnv )
if
(
jsMessage
)
if
(
jsMessage
)
{
{
const
jchar
*
jcMessage
=
pJavaEnv
->
GetStringChars
(
jsMessage
,
nullptr
);
const
jchar
*
jcMessage
=
pJavaEnv
->
GetStringChars
(
jsMessage
,
nullptr
);
ouMessage
=
OUString
(
jcMessage
);
ouMessage
=
OUString
(
reinterpret_cast
<
sal_Unicode
const
*>
(
jcMessage
));
pJavaEnv
->
ReleaseStringChars
(
jsMessage
,
jcMessage
);
pJavaEnv
->
ReleaseStringChars
(
jsMessage
,
jcMessage
);
}
}
...
...
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