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
e68121b3
Kaydet (Commit)
e68121b3
authored
Kas 10, 2015
tarafından
Stephan Bergmann
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
loplugin:nullptr (automatic rewrite)
Change-Id: Ic3516d9069cbe935f5b82aec0afac3facdc814a5
üst
08e49fa3
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
63 additions
and
63 deletions
+63
-63
binaryany.cxx
binaryurp/source/binaryany.cxx
+6
-6
bridge.cxx
binaryurp/source/bridge.cxx
+13
-13
bridgefactory.cxx
binaryurp/source/bridgefactory.cxx
+2
-2
cache.hxx
binaryurp/source/cache.hxx
+1
-1
currentcontext.cxx
binaryurp/source/currentcontext.cxx
+2
-2
incomingrequest.cxx
binaryurp/source/incomingrequest.cxx
+8
-8
marshal.cxx
binaryurp/source/marshal.cxx
+5
-5
proxy.cxx
binaryurp/source/proxy.cxx
+12
-12
reader.cxx
binaryurp/source/reader.cxx
+3
-3
unmarshal.cxx
binaryurp/source/unmarshal.cxx
+9
-9
writer.cxx
binaryurp/source/writer.cxx
+2
-2
No files found.
binaryurp/source/binaryany.cxx
Dosyayı görüntüle @
e68121b3
...
...
@@ -30,18 +30,18 @@
namespace
binaryurp
{
BinaryAny
::
BinaryAny
()
throw
()
{
uno_any_construct
(
&
data_
,
0
,
0
,
0
);
uno_any_construct
(
&
data_
,
nullptr
,
nullptr
,
nullptr
);
}
BinaryAny
::
BinaryAny
(
css
::
uno
::
TypeDescription
const
&
type
,
void
*
value
)
throw
()
{
assert
(
type
.
is
());
uno_any_construct
(
&
data_
,
value
,
type
.
get
(),
0
);
uno_any_construct
(
&
data_
,
value
,
type
.
get
(),
nullptr
);
}
BinaryAny
::
BinaryAny
(
uno_Any
const
&
raw
)
throw
()
{
assert
(
raw
.
pType
!=
0
);
assert
(
raw
.
pType
!=
nullptr
);
data_
.
pType
=
raw
.
pType
;
typelib_typedescriptionreference_acquire
(
data_
.
pType
);
data_
.
pData
=
raw
.
pData
==
&
raw
.
pReserved
?
&
data_
.
pReserved
:
raw
.
pData
;
...
...
@@ -49,16 +49,16 @@ BinaryAny::BinaryAny(uno_Any const & raw) throw () {
}
BinaryAny
::
BinaryAny
(
BinaryAny
const
&
other
)
throw
()
{
uno_type_any_construct
(
&
data_
,
other
.
data_
.
pData
,
other
.
data_
.
pType
,
0
);
uno_type_any_construct
(
&
data_
,
other
.
data_
.
pData
,
other
.
data_
.
pType
,
nullptr
);
}
BinaryAny
::~
BinaryAny
()
throw
()
{
uno_any_destruct
(
&
data_
,
0
);
uno_any_destruct
(
&
data_
,
nullptr
);
}
BinaryAny
&
BinaryAny
::
operator
=
(
BinaryAny
const
&
other
)
throw
()
{
if
(
&
other
!=
this
)
{
uno_type_any_assign
(
&
data_
,
other
.
data_
.
pData
,
other
.
data_
.
pType
,
0
,
0
);
uno_type_any_assign
(
&
data_
,
other
.
data_
.
pData
,
other
.
data_
.
pType
,
nullptr
,
nullptr
);
}
return
*
this
;
}
...
...
binaryurp/source/bridge.cxx
Dosyayı görüntüle @
e68121b3
...
...
@@ -82,19 +82,19 @@ sal_Int32 random() {
OUString
toString
(
css
::
uno
::
TypeDescription
const
&
type
)
{
typelib_TypeDescription
*
d
=
type
.
get
();
assert
(
d
!=
0
&&
d
->
pTypeName
!=
0
);
assert
(
d
!=
nullptr
&&
d
->
pTypeName
!=
nullptr
);
return
OUString
(
d
->
pTypeName
);
}
extern
"C"
void
SAL_CALL
freeProxyCallback
(
SAL_UNUSED_PARAMETER
uno_ExtEnvironment
*
,
void
*
pProxy
)
{
assert
(
pProxy
!=
0
);
assert
(
pProxy
!=
nullptr
);
static_cast
<
Proxy
*
>
(
pProxy
)
->
do_free
();
}
bool
isThread
(
salhelper
::
Thread
*
thread
)
{
assert
(
thread
!=
0
);
assert
(
thread
!=
nullptr
);
return
osl
::
Thread
::
getCurrentIdentifier
()
==
thread
->
getIdentifier
();
}
...
...
@@ -115,7 +115,7 @@ private:
};
AttachThread
::
AttachThread
(
uno_ThreadPool
threadPool
)
:
threadPool_
(
threadPool
)
{
sal_Sequence
*
s
=
0
;
sal_Sequence
*
s
=
nullptr
;
uno_getIdOfCurrentThread
(
&
s
);
tid_
=
rtl
::
ByteSequence
(
s
,
rtl
::
BYTESEQ_NOACQUIRE
);
uno_threadpool_attach
(
threadPool_
);
...
...
@@ -190,7 +190,7 @@ Bridge::Bridge(
css
::
uno
::
Reference
<
css
::
bridge
::
XProtocolProperties
>
>::
get
()),
protPropRequest_
(
"com.sun.star.bridge.XProtocolProperties::requestChange"
),
protPropCommit_
(
"com.sun.star.bridge.XProtocolProperties::commitChange"
),
state_
(
STATE_INITIAL
),
threadPool_
(
0
),
currentContextMode_
(
false
),
state_
(
STATE_INITIAL
),
threadPool_
(
nullptr
),
currentContextMode_
(
false
),
proxies_
(
0
),
calls_
(
0
),
normalCall_
(
false
),
activeCalls_
(
0
),
mode_
(
MODE_REQUESTED
)
{
...
...
@@ -210,10 +210,10 @@ void Bridge::start() {
{
osl
::
MutexGuard
g
(
mutex_
);
assert
(
state_
==
STATE_INITIAL
&&
threadPool_
==
0
&&
!
writer_
.
is
()
&&
state_
==
STATE_INITIAL
&&
threadPool_
==
nullptr
&&
!
writer_
.
is
()
&&
!
reader_
.
is
());
threadPool_
=
uno_threadpool_create
();
assert
(
threadPool_
!=
0
);
assert
(
threadPool_
!=
nullptr
);
reader_
=
r
;
writer_
=
w
;
state_
=
STATE_STARTED
;
...
...
@@ -252,7 +252,7 @@ void Bridge::terminate(bool final) {
{
osl
::
MutexGuard
g2
(
mutex_
);
tp
=
threadPool_
;
threadPool_
=
0
;
threadPool_
=
nullptr
;
if
(
reader_
.
is
())
{
if
(
!
isThread
(
reader_
.
get
()))
{
r
=
reader_
;
...
...
@@ -273,7 +273,7 @@ void Bridge::terminate(bool final) {
}
else
if
(
w
.
is
())
{
w
->
join
();
}
if
(
tp
!=
0
)
{
if
(
tp
!=
nullptr
)
{
uno_threadpool_destroy
(
tp
);
}
}
...
...
@@ -306,7 +306,7 @@ void Bridge::terminate(bool final) {
if
(
joinW
)
{
w
->
join
();
}
assert
(
tp
!=
0
);
assert
(
tp
!=
nullptr
);
uno_threadpool_dispose
(
tp
);
Stubs
s
;
{
...
...
@@ -343,7 +343,7 @@ void Bridge::terminate(bool final) {
{
osl
::
MutexGuard
g
(
mutex_
);
if
(
final
)
{
threadPool_
=
0
;
threadPool_
=
nullptr
;
}
}
terminated_
.
set
();
...
...
@@ -366,7 +366,7 @@ BinaryAny Bridge::mapCppToBinaryAny(css::uno::Any const & cppAny) {
uno_ThreadPool
Bridge
::
getThreadPool
()
{
osl
::
MutexGuard
g
(
mutex_
);
checkDisposed
();
assert
(
threadPool_
!=
0
);
assert
(
threadPool_
!=
nullptr
);
return
threadPool_
;
}
...
...
@@ -608,7 +608,7 @@ bool Bridge::makeCall(
decrementActiveCalls
();
decrementCalls
();
}
if
(
resp
.
get
()
==
0
)
{
if
(
resp
.
get
()
==
nullptr
)
{
throw
css
::
lang
::
DisposedException
(
"Binary URP bridge disposed during call"
,
static_cast
<
cppu
::
OWeakObject
*
>
(
this
));
...
...
binaryurp/source/bridgefactory.cxx
Dosyayı görüntüle @
e68121b3
...
...
@@ -211,8 +211,8 @@ static cppu::ImplementationEntry const services[] = {
{
&
binaryurp
::
BridgeFactory
::
static_create
,
&
binaryurp
::
BridgeFactory
::
static_getImplementationName
,
&
binaryurp
::
BridgeFactory
::
static_getSupportedServiceNames
,
&
cppu
::
createOneInstanceComponentFactory
,
0
,
0
},
{
0
,
0
,
0
,
0
,
0
,
0
}
&
cppu
::
createOneInstanceComponentFactory
,
nullptr
,
0
},
{
nullptr
,
nullptr
,
nullptr
,
nullptr
,
nullptr
,
0
}
};
}
...
...
binaryurp/source/cache.hxx
Dosyayı görüntüle @
e68121b3
...
...
@@ -48,7 +48,7 @@ public:
}
IdxType
add
(
const
T
&
rContent
,
bool
*
pbFound
)
{
assert
(
pbFound
!=
NULL
);
assert
(
pbFound
!=
nullptr
);
if
(
!
size_
)
{
*
pbFound
=
false
;
return
cache
::
ignore
;
...
...
binaryurp/source/currentcontext.cxx
Dosyayı görüntüle @
e68121b3
...
...
@@ -38,7 +38,7 @@ css::uno::UnoInterfaceReference get() {
css
::
uno
::
UnoInterfaceReference
cc
;
if
(
!
uno_getCurrentContext
(
reinterpret_cast
<
void
**
>
(
&
cc
.
m_pUnoI
),
OUString
(
UNO_LB_UNO
).
pData
,
0
))
OUString
(
UNO_LB_UNO
).
pData
,
nullptr
))
{
throw
css
::
uno
::
RuntimeException
(
"uno_getCurrentContext failed"
);
}
...
...
@@ -49,7 +49,7 @@ void set(css::uno::UnoInterfaceReference const & value) {
css
::
uno
::
UnoInterfaceReference
cc
(
value
);
if
(
!
uno_setCurrentContext
(
cc
.
m_pUnoI
,
OUString
(
UNO_LB_UNO
).
pData
,
0
))
OUString
(
UNO_LB_UNO
).
pData
,
nullptr
))
{
throw
css
::
uno
::
RuntimeException
(
"uno_setCurrentContext failed"
);
}
...
...
binaryurp/source/incomingrequest.cxx
Dosyayı görüntüle @
e68121b3
...
...
@@ -123,10 +123,10 @@ bool IncomingRequest::execute_throw(
BinaryAny
*
returnValue
,
std
::
vector
<
BinaryAny
>
*
outArguments
)
const
{
OSL_ASSERT
(
returnValue
!=
0
&&
returnValue
!=
nullptr
&&
returnValue
->
getType
().
equals
(
css
::
uno
::
TypeDescription
(
cppu
::
UnoType
<
void
>::
get
()))
&&
outArguments
!=
0
&&
outArguments
->
empty
());
outArguments
!=
nullptr
&&
outArguments
->
empty
());
bool
isExc
=
false
;
switch
(
functionId_
)
{
case
SPECIAL_FUNCTION_ID_RESERVED
:
...
...
@@ -237,19 +237,19 @@ bool IncomingRequest::execute_throw(
uno_Any
exc
;
uno_Any
*
pexc
=
&
exc
;
(
*
object_
.
get
()
->
pDispatcher
)(
object_
.
get
(),
member_
.
get
(),
retBuf
.
empty
()
?
0
:
&
retBuf
[
0
],
args
.
empty
()
?
0
:
&
args
[
0
],
&
pexc
);
isExc
=
pexc
!=
0
;
object_
.
get
(),
member_
.
get
(),
retBuf
.
empty
()
?
nullptr
:
&
retBuf
[
0
],
args
.
empty
()
?
nullptr
:
&
args
[
0
],
&
pexc
);
isExc
=
pexc
!=
nullptr
;
if
(
isExc
)
{
*
returnValue
=
BinaryAny
(
css
::
uno
::
TypeDescription
(
cppu
::
UnoType
<
css
::
uno
::
Any
>::
get
()),
&
exc
);
uno_any_destruct
(
&
exc
,
0
);
uno_any_destruct
(
&
exc
,
nullptr
);
}
else
{
if
(
!
retBuf
.
empty
())
{
*
returnValue
=
BinaryAny
(
retType
,
&
retBuf
[
0
]);
uno_destructData
(
&
retBuf
[
0
],
retType
.
get
(),
0
);
uno_destructData
(
&
retBuf
[
0
],
retType
.
get
(),
nullptr
);
}
if
(
!
outArguments
->
empty
())
{
OSL_ASSERT
(
...
...
@@ -271,7 +271,7 @@ bool IncomingRequest::execute_throw(
}
if
(
!
mtd
->
pParams
[
k
].
bIn
)
{
uno_type_destructData
(
&
(
*
j
++
)[
0
],
mtd
->
pParams
[
k
].
pTypeRef
,
0
);
&
(
*
j
++
)[
0
],
mtd
->
pParams
[
k
].
pTypeRef
,
nullptr
);
}
}
OSL_ASSERT
(
i
==
outArguments
->
end
());
...
...
binaryurp/source/marshal.cxx
Dosyayı görüntüle @
e68121b3
...
...
@@ -72,7 +72,7 @@ void writeCompressed(std::vector< unsigned char > * buffer, sal_uInt32 value) {
void
writeString
(
std
::
vector
<
unsigned
char
>
*
buffer
,
OUString
const
&
value
)
{
assert
(
buffer
!=
0
);
assert
(
buffer
!=
nullptr
);
OString
v
;
if
(
!
value
.
convertToString
(
&
v
,
RTL_TEXTENCODING_UTF8
,
...
...
@@ -97,7 +97,7 @@ Marshal::Marshal(rtl::Reference< Bridge > const & bridge, WriterState & state):
Marshal
::~
Marshal
()
{}
void
Marshal
::
write8
(
std
::
vector
<
unsigned
char
>
*
buffer
,
sal_uInt8
value
)
{
assert
(
buffer
!=
0
);
assert
(
buffer
!=
nullptr
);
buffer
->
push_back
(
value
);
}
...
...
@@ -187,7 +187,7 @@ void Marshal::writeValue(
std
::
vector
<
unsigned
char
>
*
buffer
,
css
::
uno
::
TypeDescription
const
&
type
,
void
const
*
value
)
{
assert
(
buffer
!=
0
&&
type
.
is
());
assert
(
buffer
!=
nullptr
&&
type
.
is
());
type
.
makeComplete
();
switch
(
type
.
get
()
->
eTypeClass
)
{
case
typelib_TypeClass_VOID
:
...
...
@@ -279,11 +279,11 @@ void Marshal::writeMemberValues(
type
.
is
()
&&
(
type
.
get
()
->
eTypeClass
==
typelib_TypeClass_STRUCT
||
type
.
get
()
->
eTypeClass
==
typelib_TypeClass_EXCEPTION
)
&&
aggregateValue
!=
0
);
aggregateValue
!=
nullptr
);
type
.
makeComplete
();
typelib_CompoundTypeDescription
*
ctd
=
reinterpret_cast
<
typelib_CompoundTypeDescription
*
>
(
type
.
get
());
if
(
ctd
->
pBaseTypeDescription
!=
0
)
{
if
(
ctd
->
pBaseTypeDescription
!=
nullptr
)
{
writeMemberValues
(
buffer
,
css
::
uno
::
TypeDescription
(
&
ctd
->
pBaseTypeDescription
->
aBase
),
...
...
binaryurp/source/proxy.cxx
Dosyayı görüntüle @
e68121b3
...
...
@@ -42,12 +42,12 @@ namespace binaryurp {
namespace
{
extern
"C"
void
SAL_CALL
proxy_acquireInterface
(
uno_Interface
*
pInterface
)
{
assert
(
pInterface
!=
0
);
assert
(
pInterface
!=
nullptr
);
static_cast
<
Proxy
*
>
(
pInterface
)
->
do_acquire
();
}
extern
"C"
void
SAL_CALL
proxy_releaseInterface
(
uno_Interface
*
pInterface
)
{
assert
(
pInterface
!=
0
);
assert
(
pInterface
!=
nullptr
);
static_cast
<
Proxy
*
>
(
pInterface
)
->
do_release
();
}
...
...
@@ -55,7 +55,7 @@ extern "C" void SAL_CALL proxy_dispatchInterface(
uno_Interface
*
pUnoI
,
typelib_TypeDescription
const
*
pMemberType
,
void
*
pReturn
,
void
**
pArgs
,
uno_Any
**
ppException
)
{
assert
(
pUnoI
!=
0
);
assert
(
pUnoI
!=
nullptr
);
static_cast
<
Proxy
*
>
(
pUnoI
)
->
do_dispatch
(
pMemberType
,
pReturn
,
pArgs
,
ppException
);
}
...
...
@@ -132,12 +132,12 @@ void Proxy::do_dispatch_throw(
void
**
arguments
,
uno_Any
**
exception
)
const
{
//TODO: Optimize queryInterface:
assert
(
member
!=
0
);
assert
(
member
!=
nullptr
);
bool
bSetter
=
false
;
std
::
vector
<
BinaryAny
>
inArgs
;
switch
(
member
->
eTypeClass
)
{
case
typelib_TypeClass_INTERFACE_ATTRIBUTE
:
bSetter
=
returnValue
==
0
;
bSetter
=
returnValue
==
nullptr
;
if
(
bSetter
)
{
inArgs
.
push_back
(
BinaryAny
(
...
...
@@ -178,7 +178,7 @@ void Proxy::do_dispatch_throw(
{
assert
(
ret
.
getType
().
get
()
->
eTypeClass
==
typelib_TypeClass_EXCEPTION
);
uno_any_construct
(
*
exception
,
ret
.
getValue
(
ret
.
getType
()),
ret
.
getType
().
get
(),
0
);
*
exception
,
ret
.
getValue
(
ret
.
getType
()),
ret
.
getType
().
get
(),
nullptr
);
}
else
{
switch
(
member
->
eTypeClass
)
{
case
typelib_TypeClass_INTERFACE_ATTRIBUTE
:
...
...
@@ -188,7 +188,7 @@ void Proxy::do_dispatch_throw(
typelib_InterfaceAttributeTypeDescription
const
*
>
(
member
)
->
pAttributeTypeRef
);
uno_copyData
(
returnValue
,
ret
.
getValue
(
t
),
t
.
get
(),
0
);
uno_copyData
(
returnValue
,
ret
.
getValue
(
t
),
t
.
get
(),
nullptr
);
}
break
;
case
typelib_TypeClass_INTERFACE_METHOD
:
...
...
@@ -199,7 +199,7 @@ void Proxy::do_dispatch_throw(
member
);
css
::
uno
::
TypeDescription
t
(
mtd
->
pReturnTypeRef
);
if
(
t
.
get
()
->
eTypeClass
!=
typelib_TypeClass_VOID
)
{
uno_copyData
(
returnValue
,
ret
.
getValue
(
t
),
t
.
get
(),
0
);
uno_copyData
(
returnValue
,
ret
.
getValue
(
t
),
t
.
get
(),
nullptr
);
}
std
::
vector
<
BinaryAny
>::
iterator
i
(
outArgs
.
begin
());
for
(
sal_Int32
j
=
0
;
j
!=
mtd
->
nParams
;
++
j
)
{
...
...
@@ -208,10 +208,10 @@ void Proxy::do_dispatch_throw(
if
(
mtd
->
pParams
[
j
].
bIn
)
{
(
void
)
uno_assignData
(
arguments
[
j
],
pt
.
get
(),
i
++->
getValue
(
pt
),
pt
.
get
(),
0
,
0
,
0
);
pt
.
get
(),
nullptr
,
nullptr
,
nullptr
);
}
else
{
uno_copyData
(
arguments
[
j
],
i
++->
getValue
(
pt
),
pt
.
get
(),
0
);
arguments
[
j
],
i
++->
getValue
(
pt
),
pt
.
get
(),
nullptr
);
}
}
}
...
...
@@ -222,14 +222,14 @@ void Proxy::do_dispatch_throw(
assert
(
false
);
// this cannot happen
break
;
}
*
exception
=
0
;
*
exception
=
nullptr
;
}
}
bool
Proxy
::
isProxy
(
rtl
::
Reference
<
Bridge
>
const
&
bridge
,
OUString
*
oid
)
const
{
assert
(
oid
!=
0
);
assert
(
oid
!=
nullptr
);
if
(
bridge
==
bridge_
)
{
*
oid
=
oid_
;
return
true
;
...
...
binaryurp/source/reader.cxx
Dosyayı görüntüle @
e68121b3
...
...
@@ -79,7 +79,7 @@ css::uno::Sequence< sal_Int8 > read(
}
extern
"C"
void
SAL_CALL
request
(
void
*
pThreadSpecificData
)
{
assert
(
pThreadSpecificData
!=
0
);
assert
(
pThreadSpecificData
!=
nullptr
);
std
::
unique_ptr
<
IncomingRequest
>
(
static_cast
<
IncomingRequest
*
>
(
pThreadSpecificData
))
->
execute
();
...
...
@@ -359,7 +359,7 @@ void Reader::readReplyMessage(Unmarshal & unmarshal, sal_uInt8 flags1) {
ret
.
getType
().
get
()))
{
sal_Int32
n
=
0
;
typelib_TypeDescriptionReference
**
p
=
0
;
typelib_TypeDescriptionReference
**
p
=
nullptr
;
switch
(
req
.
member
.
get
()
->
eTypeClass
)
{
case
typelib_TypeClass_INTERFACE_ATTRIBUTE
:
{
...
...
@@ -443,7 +443,7 @@ void Reader::readReplyMessage(Unmarshal & unmarshal, sal_uInt8 flags1) {
std
::
unique_ptr
<
IncomingReply
>
resp
(
new
IncomingReply
(
exc
,
ret
,
outArgs
));
uno_threadpool_putJob
(
bridge_
->
getThreadPool
(),
tid
.
getHandle
(),
resp
.
get
(),
0
,
bridge_
->
getThreadPool
(),
tid
.
getHandle
(),
resp
.
get
(),
nullptr
,
false
);
resp
.
release
();
break
;
...
...
binaryurp/source/unmarshal.cxx
Dosyayı görüntüle @
e68121b3
...
...
@@ -56,7 +56,7 @@ namespace {
void
*
allocate
(
sal_Size
size
)
{
void
*
p
=
rtl_allocateMemory
(
size
);
if
(
p
==
0
)
{
if
(
p
==
nullptr
)
{
throw
std
::
bad_alloc
();
}
return
p
;
...
...
@@ -70,12 +70,12 @@ std::vector< BinaryAny >::iterator copyMemberValues(
type
.
is
()
&&
(
type
.
get
()
->
eTypeClass
==
typelib_TypeClass_STRUCT
||
type
.
get
()
->
eTypeClass
==
typelib_TypeClass_EXCEPTION
)
&&
buffer
!=
0
);
buffer
!=
nullptr
);
type
.
makeComplete
();
std
::
vector
<
BinaryAny
>::
iterator
i
(
it
);
typelib_CompoundTypeDescription
*
ctd
=
reinterpret_cast
<
typelib_CompoundTypeDescription
*
>
(
type
.
get
());
if
(
ctd
->
pBaseTypeDescription
!=
0
)
{
if
(
ctd
->
pBaseTypeDescription
!=
nullptr
)
{
i
=
copyMemberValues
(
css
::
uno
::
TypeDescription
(
&
ctd
->
pBaseTypeDescription
->
aBase
),
i
,
buffer
);
...
...
@@ -84,7 +84,7 @@ std::vector< BinaryAny >::iterator copyMemberValues(
uno_type_copyData
(
static_cast
<
char
*
>
(
buffer
)
+
ctd
->
pMemberOffsets
[
j
],
i
++->
getValue
(
css
::
uno
::
TypeDescription
(
ctd
->
ppTypeRefs
[
j
])),
ctd
->
ppTypeRefs
[
j
],
0
);
ctd
->
ppTypeRefs
[
j
],
nullptr
);
}
return
i
;
}
...
...
@@ -345,7 +345,7 @@ BinaryAny Unmarshal::readValue(css::uno::TypeDescription const & type) {
raw
.
pType
=
reinterpret_cast
<
typelib_TypeDescriptionReference
*
>
(
type
.
get
());
raw
.
pData
=
buf
;
raw
.
pReserved
=
0
;
raw
.
pReserved
=
nullptr
;
return
BinaryAny
(
raw
);
}
case
typelib_TypeClass_INTERFACE
:
...
...
@@ -427,7 +427,7 @@ BinaryAny Unmarshal::readSequence(css::uno::TypeDescription const & type) {
"binaryurp::Unmarshal: sequence size too large"
);
}
if
(
n
==
0
)
{
return
BinaryAny
(
type
,
0
);
return
BinaryAny
(
type
,
nullptr
);
}
css
::
uno
::
TypeDescription
ctd
(
reinterpret_cast
<
typelib_IndirectTypeDescription
*
>
(
...
...
@@ -461,7 +461,7 @@ BinaryAny Unmarshal::readSequence(css::uno::TypeDescription const & type) {
for
(
sal_uInt32
i
=
0
;
i
!=
n
;
++
i
)
{
uno_copyData
(
static_cast
<
sal_Sequence
*
>
(
buf
)
->
elements
+
i
*
ctd
.
get
()
->
nSize
,
as
[
i
].
getValue
(
ctd
),
ctd
.
get
(),
0
);
as
[
i
].
getValue
(
ctd
),
ctd
.
get
(),
nullptr
);
}
return
BinaryAny
(
type
,
&
buf
);
}
...
...
@@ -473,11 +473,11 @@ void Unmarshal::readMemberValues(
type
.
is
()
&&
(
type
.
get
()
->
eTypeClass
==
typelib_TypeClass_STRUCT
||
type
.
get
()
->
eTypeClass
==
typelib_TypeClass_EXCEPTION
)
&&
values
!=
0
);
values
!=
nullptr
);
type
.
makeComplete
();
typelib_CompoundTypeDescription
*
ctd
=
reinterpret_cast
<
typelib_CompoundTypeDescription
*
>
(
type
.
get
());
if
(
ctd
->
pBaseTypeDescription
!=
0
)
{
if
(
ctd
->
pBaseTypeDescription
!=
nullptr
)
{
readMemberValues
(
css
::
uno
::
TypeDescription
(
&
ctd
->
pBaseTypeDescription
->
aBase
),
values
);
...
...
binaryurp/source/writer.cxx
Dosyayı görüntüle @
e68121b3
...
...
@@ -204,7 +204,7 @@ void Writer::sendRequest(
typelib_InterfaceAttributeTypeDescription
*
atd
=
reinterpret_cast
<
typelib_InterfaceAttributeTypeDescription
*
>
(
member
.
get
());
OSL_ASSERT
(
atd
->
pInterface
!=
0
);
OSL_ASSERT
(
atd
->
pInterface
!=
nullptr
);
if
(
!
t
.
is
())
{
t
=
css
::
uno
::
TypeDescription
(
&
atd
->
pInterface
->
aBase
);
}
...
...
@@ -221,7 +221,7 @@ void Writer::sendRequest(
typelib_InterfaceMethodTypeDescription
*
mtd
=
reinterpret_cast
<
typelib_InterfaceMethodTypeDescription
*
>
(
member
.
get
());
assert
(
mtd
->
pInterface
!=
0
);
assert
(
mtd
->
pInterface
!=
nullptr
);
if
(
!
t
.
is
())
{
t
=
css
::
uno
::
TypeDescription
(
&
mtd
->
pInterface
->
aBase
);
}
...
...
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