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
6b3b0b85
Kaydet (Commit)
6b3b0b85
authored
May 06, 2017
tarafından
Chris Sherlock
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
tdf#43157: convert basic module away from OSL_ASSERT to assert
Change-Id: Idfd05d410ad3d76c3699492d98e1284a21f5f7d6
üst
0bb166a2
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
31 additions
and
31 deletions
+31
-31
sbunoobj.cxx
basic/source/classes/sbunoobj.cxx
+4
-4
dllmgr-x64.cxx
basic/source/runtime/dllmgr-x64.cxx
+13
-13
dllmgr-x86.cxx
basic/source/runtime/dllmgr-x86.cxx
+13
-13
dlgcont.cxx
basic/source/uno/dlgcont.cxx
+1
-1
No files found.
basic/source/classes/sbunoobj.cxx
Dosyayı görüntüle @
6b3b0b85
...
...
@@ -754,7 +754,7 @@ void unoToSbxValue( SbxVariable* pVar, const Any& aValue )
typelib_TypeDescription
*
pTD
=
nullptr
;
aType
.
getDescription
(
&
pTD
);
OSL_ASSERT
(
pTD
&&
pTD
->
eTypeClass
==
typelib_TypeClass_SEQUENCE
);
assert
(
pTD
&&
pTD
->
eTypeClass
==
typelib_TypeClass_SEQUENCE
);
Type
aElementType
(
reinterpret_cast
<
typelib_IndirectTypeDescription
*>
(
pTD
)
->
pType
);
::
typelib_typedescription_release
(
pTD
);
...
...
@@ -1321,7 +1321,7 @@ Any sbxToUnoValue( const SbxValue* pVar, const Type& rType, Property* pUnoProper
OUString
aClassName
=
xIdlTargetClass
->
getName
();
typelib_TypeDescription
*
pSeqTD
=
nullptr
;
typelib_typedescription_getByName
(
&
pSeqTD
,
aClassName
.
pData
);
OSL_ASSERT
(
pSeqTD
);
assert
(
pSeqTD
);
Type
aElemType
(
reinterpret_cast
<
typelib_IndirectTypeDescription
*>
(
pSeqTD
)
->
pType
);
// convert all array member and register them
...
...
@@ -1362,7 +1362,7 @@ Any sbxToUnoValue( const SbxValue* pVar, const Type& rType, Property* pUnoProper
{
OUString
aTypeName
=
aCurType
.
getTypeName
();
typelib_typedescription_getByName
(
&
pSeqTD
,
aTypeName
.
pData
);
OSL_ASSERT
(
pSeqTD
);
assert
(
pSeqTD
);
if
(
pSeqTD
->
eTypeClass
==
typelib_TypeClass_SEQUENCE
)
{
aCurType
=
Type
(
reinterpret_cast
<
typelib_IndirectTypeDescription
*>
(
pSeqTD
)
->
pType
);
...
...
@@ -4605,7 +4605,7 @@ bool SbModule::createCOMWrapperForIface( Any& o_rRetAny, SbClassModuleObject* pP
}
while
(
pParentBasic
==
nullptr
&&
pCurObject
!=
nullptr
);
OSL_ASSERT
(
pParentBasic
!=
nullptr
);
assert
(
pParentBasic
!=
nullptr
);
registerComponentToBeDisposedForBasic
(
xComponent
,
pParentBasic
);
}
...
...
basic/source/runtime/dllmgr-x64.cxx
Dosyayı görüntüle @
6b3b0b85
...
...
@@ -50,7 +50,7 @@ using namespace css;
Missing support for functions returning structs (see TODO in call()).
Missing support for additional data types (64 bit integers, Any, ...; would
trigger
OSL_ASSERT
(false) in various switches).
trigger
assert
(false) in various switches).
It is assumed that the variables passed into SbiDllMgr::Call to represent
the arguments and return value have types that exactly match the Declare
...
...
@@ -143,7 +143,7 @@ template< typename T > void add(
}
std
::
size_t
alignment
(
SbxVariable
*
variable
)
{
OSL_ASSERT
(
variable
!=
nullptr
);
assert
(
variable
!=
nullptr
);
if
((
variable
->
GetType
()
&
SbxARRAY
)
==
0
)
{
switch
(
variable
->
GetType
())
{
case
SbxINTEGER
:
...
...
@@ -168,7 +168,7 @@ std::size_t alignment(SbxVariable * variable) {
case
SbxBYTE
:
return
1
;
default
:
OSL_ASSERT
(
false
);
assert
(
false
);
return
1
;
}
}
else
{
...
...
@@ -190,7 +190,7 @@ SbError marshal(
SbError
marshalString
(
SbxVariable
*
variable
,
bool
special
,
MarshalData
&
data
,
void
**
buffer
)
{
OSL_ASSERT
(
variable
!=
nullptr
&&
buffer
!=
nullptr
);
assert
(
variable
!=
nullptr
&&
buffer
!=
nullptr
);
OString
str
;
SbError
e
=
convert
(
variable
->
GetOUString
(),
&
str
);
if
(
e
!=
ERRCODE_NONE
)
{
...
...
@@ -207,7 +207,7 @@ SbError marshalStruct(
SbxVariable
*
variable
,
std
::
vector
<
char
>
&
blob
,
std
::
size_t
offset
,
MarshalData
&
data
)
{
OSL_ASSERT
(
variable
!=
nullptr
);
assert
(
variable
!=
nullptr
);
SbxArray
*
props
=
dynamic_cast
<
SbxObject
*>
(
variable
->
GetObject
()
)
->
GetProperties
();
for
(
sal_uInt16
i
=
0
;
i
<
props
->
Count
();
++
i
)
{
...
...
@@ -223,7 +223,7 @@ SbError marshalArray(
SbxVariable
*
variable
,
std
::
vector
<
char
>
&
blob
,
std
::
size_t
offset
,
MarshalData
&
data
)
{
OSL_ASSERT
(
variable
!=
nullptr
);
assert
(
variable
!=
nullptr
);
SbxDimArray
*
arr
=
dynamic_cast
<
SbxDimArray
*>
(
variable
->
GetObject
()
);
int
dims
=
arr
->
GetDims
();
std
::
vector
<
sal_Int32
>
low
(
dims
);
...
...
@@ -255,7 +255,7 @@ SbError marshal(
bool
outer
,
SbxVariable
*
variable
,
bool
special
,
std
::
vector
<
char
>
&
blob
,
std
::
size_t
offset
,
MarshalData
&
data
)
{
OSL_ASSERT
(
variable
!=
nullptr
);
assert
(
variable
!=
nullptr
);
if
(
!
(
variable
->
GetFlags
()
&
SbxFlagBits
::
Reference
))
{
if
((
variable
->
GetType
()
&
SbxARRAY
)
==
0
)
{
switch
(
variable
->
GetType
())
{
...
...
@@ -297,7 +297,7 @@ SbError marshal(
add
(
blob
,
variable
->
GetByte
(),
outer
?
8
:
1
,
offset
);
break
;
default:
OSL_ASSERT
(
false
);
assert
(
false
);
break
;
}
}
else
{
...
...
@@ -344,7 +344,7 @@ SbError marshal(
break
;
}
default:
OSL_ASSERT
(
false
);
assert
(
false
);
break
;
}
}
else
{
...
...
@@ -370,7 +370,7 @@ template< typename T > T read(void const ** pointer) {
}
void
const
*
unmarshal
(
SbxVariable
*
variable
,
void
const
*
data
)
{
OSL_ASSERT
(
variable
!=
nullptr
);
assert
(
variable
!=
nullptr
);
if
((
variable
->
GetType
()
&
SbxARRAY
)
==
0
)
{
switch
(
variable
->
GetType
())
{
case
SbxINTEGER
:
...
...
@@ -408,7 +408,7 @@ void const * unmarshal(SbxVariable * variable, void const * data) {
variable
->
PutByte
(
read
<
sal_uInt8
>
(
&
data
));
break
;
default
:
OSL_ASSERT
(
false
);
assert
(
false
);
break
;
}
}
else
{
...
...
@@ -596,7 +596,7 @@ SbError call(
result
.
PutByte
(
static_cast
<
sal_uInt8
>
(
iRetVal
));
break
;
default:
OSL_ASSERT
(
false
);
assert
(
false
);
break
;
}
for
(
int
i
=
1
;
i
<
(
arguments
==
nullptr
?
0
:
arguments
->
Count
());
++
i
)
{
...
...
@@ -621,7 +621,7 @@ SbError call(
SbError
getProcData
(
HMODULE
handle
,
OUString
const
&
name
,
ProcData
*
proc
)
{
OSL_ASSERT
(
proc
!=
nullptr
);
assert
(
proc
!=
nullptr
);
if
(
name
.
getLength
()
!=
0
&&
name
[
0
]
==
'@'
)
{
//TODO: "@" vs. "#"???
sal_Int32
n
=
name
.
copy
(
1
).
toInt32
();
//TODO: handle bad input
if
(
n
<=
0
||
n
>
0xFFFF
)
{
...
...
basic/source/runtime/dllmgr-x86.cxx
Dosyayı görüntüle @
6b3b0b85
...
...
@@ -51,7 +51,7 @@ using namespace css::uno;
Missing support for functions returning structs (see TODO in call()).
Missing support for additional data types (64 bit integers, Any, ...; would
trigger
OSL_ASSERT
(false) in various switches).
trigger
assert
(false) in various switches).
It is assumed that the variables passed into SbiDllMgr::Call to represent
the arguments and return value have types that exactly match the Declare
...
...
@@ -151,7 +151,7 @@ template< typename T > void add(
}
std
::
size_t
alignment
(
SbxVariable
*
variable
)
{
OSL_ASSERT
(
variable
!=
0
);
assert
(
variable
!=
0
);
if
((
variable
->
GetType
()
&
SbxARRAY
)
==
0
)
{
switch
(
variable
->
GetType
())
{
case
SbxINTEGER
:
...
...
@@ -176,7 +176,7 @@ std::size_t alignment(SbxVariable * variable) {
case
SbxBYTE
:
return
1
;
default
:
OSL_ASSERT
(
false
);
assert
(
false
);
return
1
;
}
}
else
{
...
...
@@ -198,7 +198,7 @@ SbError marshal(
SbError
marshalString
(
SbxVariable
*
variable
,
bool
special
,
MarshalData
&
data
,
void
**
buffer
)
{
OSL_ASSERT
(
variable
!=
0
&&
buffer
!=
0
);
assert
(
variable
!=
0
&&
buffer
!=
0
);
OString
str
;
SbError
e
=
convert
(
variable
->
GetOUString
(),
&
str
);
if
(
e
!=
ERRCODE_NONE
)
{
...
...
@@ -216,7 +216,7 @@ SbError marshalStruct(
SbxVariable
*
variable
,
std
::
vector
<
char
>
&
blob
,
std
::
size_t
offset
,
MarshalData
&
data
)
{
OSL_ASSERT
(
variable
!=
0
);
assert
(
variable
!=
0
);
SbxArray
*
props
=
dynamic_cast
<
SbxObject
*>
(
variable
->
GetObject
()
)
->
GetProperties
();
for
(
sal_uInt16
i
=
0
;
i
<
props
->
Count
();
++
i
)
{
...
...
@@ -232,7 +232,7 @@ SbError marshalArray(
SbxVariable
*
variable
,
std
::
vector
<
char
>
&
blob
,
std
::
size_t
offset
,
MarshalData
&
data
)
{
OSL_ASSERT
(
variable
!=
0
);
assert
(
variable
!=
0
);
SbxDimArray
*
arr
=
dynamic_cast
<
SbxDimArray
*>
(
variable
->
GetObject
()
);
int
dims
=
arr
->
GetDims
();
std
::
vector
<
sal_Int32
>
low
(
dims
);
...
...
@@ -264,7 +264,7 @@ SbError marshal(
bool
outer
,
SbxVariable
*
variable
,
bool
special
,
std
::
vector
<
char
>
&
blob
,
std
::
size_t
offset
,
MarshalData
&
data
)
{
OSL_ASSERT
(
variable
!=
0
);
assert
(
variable
!=
0
);
SbxDataType
eVarType
=
variable
->
GetType
();
bool
bByVal
=
!
(
variable
->
GetFlags
()
&
SbxFlagBits
::
Reference
);
...
...
@@ -312,7 +312,7 @@ SbError marshal(
add
(
blob
,
variable
->
GetByte
(),
outer
?
4
:
1
,
offset
);
break
;
default:
OSL_ASSERT
(
false
);
assert
(
false
);
break
;
}
}
else
{
...
...
@@ -359,7 +359,7 @@ SbError marshal(
break
;
}
default:
OSL_ASSERT
(
false
);
assert
(
false
);
break
;
}
}
else
{
...
...
@@ -385,7 +385,7 @@ template< typename T > T read(void const ** pointer) {
}
void
const
*
unmarshal
(
SbxVariable
*
variable
,
void
const
*
data
)
{
OSL_ASSERT
(
variable
!=
0
);
assert
(
variable
!=
0
);
if
((
variable
->
GetType
()
&
SbxARRAY
)
==
0
)
{
switch
(
variable
->
GetType
())
{
case
SbxINTEGER
:
...
...
@@ -423,7 +423,7 @@ void const * unmarshal(SbxVariable * variable, void const * data) {
variable
->
PutByte
(
read
<
sal_uInt8
>
(
&
data
));
break
;
default
:
OSL_ASSERT
(
false
);
assert
(
false
);
break
;
}
}
else
{
...
...
@@ -550,7 +550,7 @@ SbError call(
DllMgr_call32
(
proc
.
proc
,
address
(
stack
),
stack
.
size
())));
break
;
default:
OSL_ASSERT
(
false
);
assert
(
false
);
break
;
}
for
(
sal_uInt16
i
=
1
;
i
<
(
arguments
==
0
?
0
:
arguments
->
Count
());
++
i
)
{
...
...
@@ -575,7 +575,7 @@ SbError call(
SbError
getProcData
(
HMODULE
handle
,
OUString
const
&
name
,
ProcData
*
proc
)
{
OSL_ASSERT
(
proc
!=
0
);
assert
(
proc
!=
0
);
if
(
!
name
.
isEmpty
()
&&
name
[
0
]
==
'@'
)
{
//TODO: "@" vs. "#"???
sal_Int32
n
=
name
.
copy
(
1
).
toInt32
();
//TODO: handle bad input
if
(
n
<=
0
||
n
>
0xFFFF
)
{
...
...
basic/source/uno/dlgcont.cxx
Dosyayı görüntüle @
6b3b0b85
...
...
@@ -206,7 +206,7 @@ void SfxDialogLibraryContainer::storeLibrariesToStorage( const uno::Reference< e
{
// if we cannot get the version then the
// Oasis2OOoTransformer will not be used
OSL_ASSERT
(
false
);
assert
(
false
);
}
}
...
...
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