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
04740cb7
Kaydet (Commit)
04740cb7
authored
Eki 02, 2014
tarafından
Stephan Bergmann
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
cli_ure (Windows): std::auto_ptr -> std::unique_ptr
Change-Id: Ibe794daffa347d194ff8c66a44c7eec4bcc9b83d
üst
7c3f7016
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
12 deletions
+12
-12
cli_base.h
cli_ure/source/uno_bridge/cli_base.h
+3
-3
cli_data.cxx
cli_ure/source/uno_bridge/cli_data.cxx
+8
-8
cli_uno.cxx
cli_ure/source/uno_bridge/cli_uno.cxx
+1
-1
No files found.
cli_ure/source/uno_bridge/cli_base.h
Dosyayı görüntüle @
04740cb7
...
...
@@ -124,15 +124,15 @@ struct rtl_mem
inline
static
void
operator
delete
(
void
*
,
void
*
)
{}
static
inline
::
std
::
auto
_ptr
<
rtl_mem
>
allocate
(
::
std
::
size_t
bytes
);
static
inline
::
std
::
unique
_ptr
<
rtl_mem
>
allocate
(
::
std
::
size_t
bytes
);
};
inline
::
std
::
auto
_ptr
<
rtl_mem
>
rtl_mem
::
allocate
(
::
std
::
size_t
bytes
)
inline
::
std
::
unique
_ptr
<
rtl_mem
>
rtl_mem
::
allocate
(
::
std
::
size_t
bytes
)
{
void
*
p
=
rtl_allocateMemory
(
bytes
);
if
(
0
==
p
)
throw
BridgeRuntimeError
(
"out of memory!"
);
return
::
std
::
auto
_ptr
<
rtl_mem
>
(
(
rtl_mem
*
)
p
);
return
::
std
::
unique
_ptr
<
rtl_mem
>
(
(
rtl_mem
*
)
p
);
}
...
...
cli_ure/source/uno_bridge/cli_data.cxx
Dosyayı görüntüle @
04740cb7
...
...
@@ -49,9 +49,9 @@ OUString mapCliTypeName(System::String^ typeName);
System
::
String
^
mapCliPolymorphicName
(
System
::
String
^
unoName
);
System
::
String
^
mapPolymorphicName
(
System
::
String
^
unoName
,
bool
bCliToUno
);
inline
auto
_ptr
<
rtl_mem
>
seq_allocate
(
sal_Int32
nElements
,
sal_Int32
nSize
)
inline
unique
_ptr
<
rtl_mem
>
seq_allocate
(
sal_Int32
nElements
,
sal_Int32
nSize
)
{
auto
_ptr
<
rtl_mem
>
seq
(
unique
_ptr
<
rtl_mem
>
seq
(
rtl_mem
::
allocate
(
SAL_SEQUENCE_HEADER_SIZE
+
(
nElements
*
nSize
)
)
);
uno_Sequence
*
p
=
(
uno_Sequence
*
)
seq
.
get
();
p
->
nRefCount
=
1
;
...
...
@@ -897,7 +897,7 @@ void Bridge::map_to_uno(void * uno_data, System::Object^ cli_data,
}
else
{
auto
_ptr
<
rtl_mem
>
mem
(
rtl_mem
::
allocate
(
sizeof
(
sal_Int64
)
)
);
unique
_ptr
<
rtl_mem
>
mem
(
rtl_mem
::
allocate
(
sizeof
(
sal_Int64
)
)
);
*
(
sal_Int64
*
)
mem
.
get
()
=
*
safe_cast
<
System
::
Int64
^>
(
aAny
.
Value
);
pAny
->
pData
=
mem
.
release
();
}
...
...
@@ -910,7 +910,7 @@ void Bridge::map_to_uno(void * uno_data, System::Object^ cli_data,
}
else
{
auto
_ptr
<
rtl_mem
>
mem
(
rtl_mem
::
allocate
(
sizeof
(
sal_uInt64
)
)
);
unique
_ptr
<
rtl_mem
>
mem
(
rtl_mem
::
allocate
(
sizeof
(
sal_uInt64
)
)
);
*
(
sal_uInt64
*
)
mem
.
get
()
=
*
safe_cast
<
System
::
UInt64
^>
(
aAny
.
Value
);
pAny
->
pData
=
mem
.
release
();
}
...
...
@@ -923,7 +923,7 @@ void Bridge::map_to_uno(void * uno_data, System::Object^ cli_data,
}
else
{
auto
_ptr
<
rtl_mem
>
mem
(
rtl_mem
::
allocate
(
sizeof
(
float
)
)
);
unique
_ptr
<
rtl_mem
>
mem
(
rtl_mem
::
allocate
(
sizeof
(
float
)
)
);
*
(
float
*
)
mem
.
get
()
=
*
safe_cast
<
System
::
Single
^>
(
aAny
.
Value
);
pAny
->
pData
=
mem
.
release
();
}
...
...
@@ -936,7 +936,7 @@ void Bridge::map_to_uno(void * uno_data, System::Object^ cli_data,
}
else
{
auto
_ptr
<
rtl_mem
>
mem
(
rtl_mem
::
allocate
(
sizeof
(
double
)
)
);
unique
_ptr
<
rtl_mem
>
mem
(
rtl_mem
::
allocate
(
sizeof
(
double
)
)
);
*
(
double
*
)
mem
.
get
()
=
*
safe_cast
<
System
::
Double
^>
(
aAny
.
Value
);
pAny
->
pData
=
mem
.
release
();
}
...
...
@@ -965,7 +965,7 @@ void Bridge::map_to_uno(void * uno_data, System::Object^ cli_data,
css
::
uno
::
Type
anyType
(
value_td
);
typelib_TypeDescription
*
td
=
NULL
;
anyType
.
getDescription
(
&
td
);
auto
_ptr
<
rtl_mem
>
mem
(
rtl_mem
::
allocate
(
td
->
nSize
));
unique
_ptr
<
rtl_mem
>
mem
(
rtl_mem
::
allocate
(
td
->
nSize
));
typelib_typedescription_release
(
td
);
map_to_uno
(
mem
.
get
(),
aAny
.
Value
,
value_td
.
getTypeLibType
(),
...
...
@@ -1238,7 +1238,7 @@ void Bridge::map_to_uno(void * uno_data, System::Object^ cli_data,
typelib_TypeDescriptionReference
*
element_type
=
((
typelib_IndirectTypeDescription
*
)
td
.
get
())
->
pType
;
auto
_ptr
<
rtl_mem
>
seq
;
unique
_ptr
<
rtl_mem
>
seq
;
System
::
Array
^
ar
=
nullptr
;
if
(
cli_data
!=
nullptr
)
...
...
cli_ure/source/uno_bridge/cli_uno.cxx
Dosyayı görüntüle @
04740cb7
...
...
@@ -221,7 +221,7 @@ void Bridge::call_cli(
System
::
Exception
^
exc
=
e
->
InnerException
;
css
::
uno
::
TypeDescription
td
(
mapCliType
(
exc
->
GetType
()));
// memory for exception
std
::
auto
_ptr
<
rtl_mem
>
memExc
(
rtl_mem
::
allocate
(
td
.
get
()
->
nSize
));
std
::
unique
_ptr
<
rtl_mem
>
memExc
(
rtl_mem
::
allocate
(
td
.
get
()
->
nSize
));
map_to_uno
(
memExc
.
get
(),
exc
,
td
.
get
()
->
pWeakRef
,
false
);
(
*
uno_exc
)
->
pType
=
td
.
get
()
->
pWeakRef
;
(
*
uno_exc
)
->
pData
=
memExc
.
release
();
...
...
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