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
de82b32c
Kaydet (Commit)
de82b32c
authored
Nis 10, 2017
tarafından
Stephan Bergmann
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Clean up uses of SAL_U/SAL_W: cli_ure
Change-Id: I198be4023710206d66135c33fe01e1d9bb859272
üst
c14ed11d
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
11 deletions
+19
-11
climaker_app.cxx
cli_ure/source/climaker/climaker_app.cxx
+2
-1
climaker_share.h
cli_ure/source/climaker/climaker_share.h
+3
-2
native_share.h
cli_ure/source/native/native_share.h
+3
-2
cli_data.cxx
cli_ure/source/uno_bridge/cli_data.cxx
+11
-6
No files found.
cli_ure/source/climaker/climaker_app.cxx
Dosyayı görüntüle @
de82b32c
...
...
@@ -471,7 +471,8 @@ SAL_IMPLEMENT_MAIN()
// setup assembly info: xxx todo set more? e.g. avoid strong versioning
AssemblyName
^
assembly_name
=
gcnew
AssemblyName
();
assembly_name
->
CodeBase
=
output_dir
;
assembly_name
->
Name
=
gcnew
::
System
::
String
(
SAL_W
(
name
.
getStr
()));
assembly_name
->
Name
=
gcnew
::
System
::
String
(
reinterpret_cast
<
wchar_t
const
*>
(
name
.
getStr
()));
if
(
kp
!=
nullptr
)
assembly_name
->
KeyPair
=
kp
;
...
...
cli_ure/source/climaker/climaker_share.h
Dosyayı görüntüle @
de82b32c
...
...
@@ -82,7 +82,8 @@ ref struct Constants
inline
::
System
::
String
^
ustring_to_String
(
OUString
const
&
ustr
)
{
return
gcnew
::
System
::
String
(
SAL_W
(
ustr
.
getStr
()),
0
,
ustr
.
getLength
()
);
return
gcnew
::
System
::
String
(
reinterpret_cast
<
wchar_t
const
*>
(
ustr
.
getStr
()),
0
,
ustr
.
getLength
());
}
...
...
@@ -90,7 +91,7 @@ inline OUString String_to_ustring( ::System::String ^ str )
{
OSL_ASSERT
(
sizeof
(
wchar_t
)
==
sizeof
(
sal_Unicode
)
);
pin_ptr
<
const
wchar_t
>
chars
=
PtrToStringChars
(
str
);
return
OUString
(
SAL_U
(
chars
),
str
->
Length
);
return
OUString
(
reinterpret_cast
<
sal_Unicode
const
*>
(
chars
),
str
->
Length
);
}
/* If the argument type is a typedef for an interface then the interface
...
...
cli_ure/source/native/native_share.h
Dosyayı görüntüle @
de82b32c
...
...
@@ -35,14 +35,15 @@ namespace util
inline
::
System
::
String
^
ustring_to_String
(
OUString
const
&
ustr
)
{
return
gcnew
::
System
::
String
(
SAL_W
(
ustr
.
getStr
()),
0
,
ustr
.
getLength
()
);
return
gcnew
::
System
::
String
(
reinterpret_cast
<
wchar_t
const
*>
(
ustr
.
getStr
()),
0
,
ustr
.
getLength
());
}
inline
OUString
String_to_ustring
(
::
System
::
String
^
str
)
{
OSL_ASSERT
(
sizeof
(
wchar_t
)
==
sizeof
(
sal_Unicode
)
);
pin_ptr
<
wchar_t
const
>
chars
=
PtrToStringChars
(
str
);
return
OUString
(
SAL_U
(
chars
),
str
->
Length
);
return
OUString
(
reinterpret_cast
<
sal_Unicode
const
*>
(
chars
),
str
->
Length
);
}
template
<
typename
T
>
...
...
cli_ure/source/uno_bridge/cli_data.cxx
Dosyayı görüntüle @
de82b32c
...
...
@@ -716,9 +716,11 @@ OUString mapCliString(System::String ^ data)
if
(
data
!=
nullptr
)
{
OSL_ASSERT
(
sizeof
(
wchar_t
)
==
sizeof
(
sal_Unicode
)
);
static_assert
(
sizeof
(
wchar_t
)
==
sizeof
(
sal_Unicode
),
"char mismatch"
);
pin_ptr
<
wchar_t
const
>
pdata
=
PtrToStringChars
(
data
);
return
OUString
(
SAL_U
(
pdata
),
const_cast
<
System
::
String
^>
(
data
)
->
Length
);
return
OUString
(
reinterpret_cast
<
sal_Unicode
const
*>
(
pdata
),
const_cast
<
System
::
String
^>
(
data
)
->
Length
);
}
else
{
...
...
@@ -818,8 +820,9 @@ void Bridge::map_to_uno(void * uno_data, System::Object^ cli_data,
{
System
::
String
^
s
=
safe_cast
<
System
::
String
^>
(
cli_data
);
pin_ptr
<
const
wchar_t
>
pdata
=
PtrToStringChars
(
s
);
rtl_uString_newFromStr_WithLength
(
(
rtl_uString
**
)
uno_data
,
SAL_U
(
pdata
),
s
->
Length
);
rtl_uString_newFromStr_WithLength
(
reinterpret_cast
<
rtl_uString
**>
(
uno_data
),
reinterpret_cast
<
sal_Unicode
const
*>
(
pdata
),
s
->
Length
);
}
break
;
}
...
...
@@ -1294,8 +1297,10 @@ void Bridge::map_to_uno(void * uno_data, System::Object^ cli_data,
rtl_uString
**
pStr
=
&
((
rtl_uString
**
)
&
((
uno_Sequence
*
)
seq
.
get
())
->
elements
)[
i
];
*
pStr
=
NULL
;
rtl_uString_newFromStr_WithLength
(
pStr
,
SAL_U
(
pdata
),
arStr
[
i
]
->
Length
);
rtl_uString_newFromStr_WithLength
(
pStr
,
reinterpret_cast
<
sal_Unicode
const
*>
(
pdata
),
arStr
[
i
]
->
Length
);
}
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