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
a4df4e91
Kaydet (Commit)
a4df4e91
authored
Agu 25, 2012
tarafından
Peter Foley
Kaydeden (comit)
David Tardon
Eki 07, 2012
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
convert cli_ure/source/native to new syntax
Change-Id: I7dbb065c8b1b2fef85e6e7f42ef80991102785e0
üst
1eec5566
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
32 additions
and
36 deletions
+32
-36
Library_cli_cppuhelper_native.mk
cli_ure/Library_cli_cppuhelper_native.mk
+1
-1
assembly.cxx
cli_ure/source/native/assembly.cxx
+0
-2
native_bootstrap.cxx
cli_ure/source/native/native_bootstrap.cxx
+21
-21
native_share.h
cli_ure/source/native/native_share.h
+10
-12
No files found.
cli_ure/Library_cli_cppuhelper_native.mk
Dosyayı görüntüle @
a4df4e91
...
...
@@ -13,7 +13,7 @@ $(eval $(call gb_Library_Library,cli_cppuhelper_native))
# in CLR meta-data - use of this type may lead to a runtime exception":
$(eval $(call gb_Library_add_cxxflags,cli_cppuhelper_native,\
-AI $(gb_Helper_OUTDIRLIBDIR) \
-clr
:oldSyntax
\
-clr \
-wd4339 \
))
...
...
cli_ure/source/native/assembly.cxx
Dosyayı görüntüle @
a4df4e91
...
...
@@ -17,8 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#using <mscorlib.dll>
[
assembly
:
System
::
Reflection
::
AssemblyProduct
(
"CLI-UNO Language Binding"
)];
[
assembly
:
System
::
Reflection
::
AssemblyDescription
(
"CLI-UNO Helper Library"
)];
[
assembly
:
System
::
Reflection
::
AssemblyDelaySign
(
true
)];
...
...
cli_ure/source/native/native_bootstrap.cxx
Dosyayı görüntüle @
a4df4e91
...
...
@@ -315,7 +315,7 @@ namespace util
These contain a named value UREINSTALLLOCATION which holds a path to the URE
installation folder.
*/
public
__sealed
__gc
class
Bootstrap
public
ref
class
Bootstrap
sealed
{
inline
Bootstrap
()
{}
...
...
@@ -325,7 +325,7 @@ public:
@see cppuhelper/bootstrap.hxx:defaultBootstrap_InitialComponentContext()
*/
static
::
unoidl
::
com
::
sun
::
star
::
uno
::
XComponentContext
*
static
::
unoidl
::
com
::
sun
::
star
::
uno
::
XComponentContext
^
defaultBootstrap_InitialComponentContext
();
/** Bootstraps the initial component context from a native UNO installation.
...
...
@@ -338,37 +338,37 @@ public:
@see cppuhelper/bootstrap.hxx:defaultBootstrap_InitialComponentContext()
*/
static
::
unoidl
::
com
::
sun
::
star
::
uno
::
XComponentContext
*
static
::
unoidl
::
com
::
sun
::
star
::
uno
::
XComponentContext
^
defaultBootstrap_InitialComponentContext
(
::
System
::
String
*
ini_file
,
::
System
::
Collections
::
IDictionaryEnumerator
*
::
System
::
String
^
ini_file
,
::
System
::
Collections
::
IDictionaryEnumerator
^
bootstrap_parameters
);
/** Bootstraps the initial component context from a native UNO installation.
@see cppuhelper/bootstrap.hxx:bootstrap()
*/
static
::
unoidl
::
com
::
sun
::
star
::
uno
::
XComponentContext
*
static
::
unoidl
::
com
::
sun
::
star
::
uno
::
XComponentContext
^
bootstrap
();
};
//______________________________________________________________________________
::
unoidl
::
com
::
sun
::
star
::
uno
::
XComponentContext
*
::
unoidl
::
com
::
sun
::
star
::
uno
::
XComponentContext
^
Bootstrap
::
defaultBootstrap_InitialComponentContext
(
::
System
::
String
*
ini_file
,
::
System
::
Collections
::
IDictionaryEnumerator
*
bootstrap_parameters
)
::
System
::
String
^
ini_file
,
::
System
::
Collections
::
IDictionaryEnumerator
^
bootstrap_parameters
)
{
if
(
0
!=
bootstrap_parameters
)
if
(
nullptr
!=
bootstrap_parameters
)
{
bootstrap_parameters
->
Reset
();
while
(
bootstrap_parameters
->
MoveNext
())
{
OUString
key
(
String_to_ustring
(
__try_cast
<
::
System
::
String
*
>
(
bootstrap_parameters
->
get_Key
()
)
)
);
String_to_ustring
(
safe_cast
<
::
System
::
String
^
>
(
bootstrap_parameters
->
Key
)
)
);
OUString
value
(
String_to_ustring
(
__try_cast
<
::
System
::
String
*
>
(
bootstrap_parameters
->
get_Value
()
)
)
);
String_to_ustring
(
safe_cast
<
::
System
::
String
^
>
(
bootstrap_parameters
->
Value
)
)
);
::
rtl
::
Bootstrap
::
set
(
key
,
value
);
}
...
...
@@ -376,31 +376,31 @@ Bootstrap::defaultBootstrap_InitialComponentContext(
// bootstrap native uno
Reference
<
XComponentContext
>
xContext
;
if
(
0
==
ini_file
)
if
(
nullptr
==
ini_file
)
{
xContext
=
::
cppu
::
defaultBootstrap_InitialComponentContext
();
}
else
{
xContext
=
::
cppu
::
defaultBootstrap_InitialComponentContext
(
String_to_ustring
(
__try_cast
<
::
System
::
String
*
>
(
ini_file
)
)
);
String_to_ustring
(
safe_cast
<
::
System
::
String
^
>
(
ini_file
)
)
);
}
return
__try_cast
<
::
unoidl
::
com
::
sun
::
star
::
uno
::
XComponentContext
*
>
(
return
safe_cast
<
::
unoidl
::
com
::
sun
::
star
::
uno
::
XComponentContext
^
>
(
to_cli
(
xContext
)
);
}
//______________________________________________________________________________
::
unoidl
::
com
::
sun
::
star
::
uno
::
XComponentContext
*
::
unoidl
::
com
::
sun
::
star
::
uno
::
XComponentContext
^
Bootstrap
::
defaultBootstrap_InitialComponentContext
()
{
return
defaultBootstrap_InitialComponentContext
(
0
,
0
);
return
defaultBootstrap_InitialComponentContext
(
nullptr
,
nullptr
);
}
::
unoidl
::
com
::
sun
::
star
::
uno
::
XComponentContext
*
Bootstrap
::
bootstrap
()
::
unoidl
::
com
::
sun
::
star
::
uno
::
XComponentContext
^
Bootstrap
::
bootstrap
()
{
Reference
<
XComponentContext
>
xContext
=
::
cppu
::
bootstrap
();
return
__try_cast
<
::
unoidl
::
com
::
sun
::
star
::
uno
::
XComponentContext
*
>
(
return
safe_cast
<
::
unoidl
::
com
::
sun
::
star
::
uno
::
XComponentContext
^
>
(
to_cli
(
xContext
)
);
}
...
...
cli_ure/source/native/native_share.h
Dosyayı görüntüle @
a4df4e91
...
...
@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#using <mscorlib.dll>
#using "cli_ure.dll"
#using "cli_uretypes.dll"
...
...
@@ -35,20 +34,20 @@ namespace util
{
//------------------------------------------------------------------------------
inline
::
System
::
String
*
ustring_to_String
(
::
rtl
::
OUString
const
&
ustr
)
inline
::
System
::
String
^
ustring_to_String
(
::
rtl
::
OUString
const
&
ustr
)
{
return
new
::
System
::
String
(
ustr
.
getStr
(),
0
,
ustr
.
getLength
()
);
return
gc
new
::
System
::
String
(
ustr
.
getStr
(),
0
,
ustr
.
getLength
()
);
}
//------------------------------------------------------------------------------
inline
::
rtl
::
OUString
String_to_ustring
(
::
System
::
String
*
str
)
inline
::
rtl
::
OUString
String_to_ustring
(
::
System
::
String
^
str
)
{
OSL_ASSERT
(
sizeof
(
wchar_t
)
==
sizeof
(
sal_Unicode
)
);
wchar_t
const
__pin
*
chars
=
PtrToStringChars
(
str
);
return
::
rtl
::
OUString
(
chars
,
str
->
get_Length
()
);
pin_ptr
<
wchar_t
const
>
chars
=
PtrToStringChars
(
str
);
return
::
rtl
::
OUString
(
chars
,
str
->
Length
);
}
template
<
typename
T
>
inline
::
System
::
Object
*
to_cli
(
inline
::
System
::
Object
^
to_cli
(
::
com
::
sun
::
star
::
uno
::
Reference
<
T
>
const
&
x
)
{
::
com
::
sun
::
star
::
uno
::
Mapping
mapping
(
...
...
@@ -65,16 +64,15 @@ inline ::System::Object * to_cli(
intptr_t
intptr
=
reinterpret_cast
<
intptr_t
>
(
mapping
.
mapInterface
(
x
.
get
(),
::
getCppuType
(
&
x
)
)
);
::
System
::
Runtime
::
InteropServices
::
GCHandle
handle
(
::
System
::
Runtime
::
InteropServices
::
GCHandle
::
op_Explicit
(
intptr
)
);
::
System
::
Object
*
ret
=
handle
.
get_Target
();
handle
.
Free
();
::
System
::
Runtime
::
InteropServices
::
GCHandle
^
handle
=
(
::
System
::
Runtime
::
InteropServices
::
GCHandle
^
)(
gcnew
::
System
::
IntPtr
(
intptr
));
::
System
::
Object
^
ret
=
handle
->
Target
;
handle
->
Free
();
return
ret
;
}
template
<
typename
T
>
inline
void
to_uno
(
::
com
::
sun
::
star
::
uno
::
Reference
<
T
>
*
pRet
,
::
System
::
Object
*
x
)
::
com
::
sun
::
star
::
uno
::
Reference
<
T
>
*
pRet
,
::
System
::
Object
^
x
)
{
::
com
::
sun
::
star
::
uno
::
Mapping
mapping
(
OUSTR
(
UNO_LB_CLI
),
OUSTR
(
CPPU_CURRENT_LANGUAGE_BINDING_NAME
)
);
...
...
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