summaryrefslogtreecommitdiffstats
path: root/basic
diff options
context:
space:
mode:
Diffstat (limited to 'basic')
-rw-r--r--basic/source/runtime/dllmgr-x64.cxx18
-rw-r--r--basic/source/runtime/dllmgr-x86.cxx18
2 files changed, 24 insertions, 12 deletions
diff --git a/basic/source/runtime/dllmgr-x64.cxx b/basic/source/runtime/dllmgr-x64.cxx
index 4c5973fdc919..a56aeee2726a 100644
--- a/basic/source/runtime/dllmgr-x64.cxx
+++ b/basic/source/runtime/dllmgr-x64.cxx
@@ -159,8 +159,9 @@ std::size_t alignment(SbxVariable const * variable) {
case SbxOBJECT:
{
std::size_t n = 1;
- SbxArray * props = dynamic_cast<SbxObject*>( variable->GetObject() )->
- GetProperties();
+ SbxObject* pobj = dynamic_cast<SbxObject*>(variable->GetObject());
+ assert(pobj);
+ SbxArray* props = pobj->GetProperties();
for (sal_uInt16 i = 0; i < props->Count(); ++i) {
n = std::max(n, alignment(props->Get(i)));
}
@@ -175,6 +176,7 @@ std::size_t alignment(SbxVariable const * variable) {
}
} else {
SbxDimArray * arr = dynamic_cast<SbxDimArray*>( variable->GetObject() );
+ assert(arr);
int dims = arr->GetDims();
std::vector< sal_Int32 > low(dims);
for (int i = 0; i < dims; ++i) {
@@ -210,8 +212,9 @@ ErrCode marshalStruct(
MarshalData & data)
{
OSL_ASSERT(variable != nullptr);
- SbxArray * props = dynamic_cast<SbxObject*>( variable->GetObject() )->
- GetProperties();
+ SbxObject* pobj = dynamic_cast<SbxObject*>(variable->GetObject());
+ assert(pobj);
+ SbxArray* props = pobj->GetProperties();
for (sal_uInt16 i = 0; i < props->Count(); ++i) {
ErrCode e = marshal(false, props->Get(i), false, blob, offset, data);
if (e != ERRCODE_NONE) {
@@ -227,6 +230,7 @@ ErrCode marshalArray(
{
OSL_ASSERT(variable != nullptr);
SbxDimArray * arr = dynamic_cast<SbxDimArray*>( variable->GetObject() );
+ assert(arr);
int dims = arr->GetDims();
std::vector< sal_Int32 > low(dims);
std::vector< sal_Int32 > up(dims);
@@ -402,8 +406,9 @@ void const * unmarshal(SbxVariable * variable, void const * data) {
align(
reinterpret_cast< sal_uIntPtr >(data),
alignment(variable)));
- SbxArray * props = dynamic_cast<SbxObject*>( variable->GetObject() )->
- GetProperties();
+ SbxObject* pobj = dynamic_cast<SbxObject*>(variable->GetObject());
+ assert(pobj);
+ SbxArray* props = pobj->GetProperties();
for (sal_uInt16 i = 0; i < props->Count(); ++i) {
data = unmarshal(props->Get(i), data);
}
@@ -421,6 +426,7 @@ void const * unmarshal(SbxVariable * variable, void const * data) {
}
} else {
SbxDimArray * arr = dynamic_cast<SbxDimArray*>( variable->GetObject() );
+ assert(arr);
int dims = arr->GetDims();
std::vector< sal_Int32 > low(dims);
std::vector< sal_Int32 > up(dims);
diff --git a/basic/source/runtime/dllmgr-x86.cxx b/basic/source/runtime/dllmgr-x86.cxx
index 347f9ad4067d..74b470da2e04 100644
--- a/basic/source/runtime/dllmgr-x86.cxx
+++ b/basic/source/runtime/dllmgr-x86.cxx
@@ -166,8 +166,9 @@ std::size_t alignment(SbxVariable * variable) {
case SbxOBJECT:
{
std::size_t n = 1;
- SbxArray * props = dynamic_cast<SbxObject*>( variable->GetObject() )->
- GetProperties();
+ SbxObject* pobj = dynamic_cast<SbxObject*>(variable->GetObject());
+ assert(pobj);
+ SbxArray* props = pobj->GetProperties();
for (sal_uInt16 i = 0; i < props->Count(); ++i) {
n = std::max(n, alignment(props->Get(i)));
}
@@ -182,6 +183,7 @@ std::size_t alignment(SbxVariable * variable) {
}
} else {
SbxDimArray * arr = dynamic_cast<SbxDimArray*>( variable->GetObject() );
+ assert(arr);
int dims = arr->GetDims();
std::vector< sal_Int32 > low(dims);
for (int i = 0; i < dims; ++i) {
@@ -218,8 +220,9 @@ ErrCode marshalStruct(
MarshalData & data)
{
OSL_ASSERT(variable != 0);
- SbxArray * props = dynamic_cast<SbxObject*>( variable->GetObject() )->
- GetProperties();
+ SbxObject* pobj = dynamic_cast<SbxObject*>(variable->GetObject());
+ assert(pobj);
+ SbxArray* props = pobj->GetProperties();
for (sal_uInt16 i = 0; i < props->Count(); ++i) {
ErrCode e = marshal(false, props->Get(i), false, blob, offset, data);
if (e != ERRCODE_NONE) {
@@ -235,6 +238,7 @@ ErrCode marshalArray(
{
OSL_ASSERT(variable != 0);
SbxDimArray * arr = dynamic_cast<SbxDimArray*>( variable->GetObject() );
+ assert(arr);
int dims = arr->GetDims();
std::vector< sal_Int32 > low(dims);
std::vector< sal_Int32 > up(dims);
@@ -410,8 +414,9 @@ void const * unmarshal(SbxVariable * variable, void const * data) {
align(
reinterpret_cast< sal_uIntPtr >(data),
alignment(variable)));
- SbxArray * props = dynamic_cast<SbxObject*>( variable->GetObject() )->
- GetProperties();
+ SbxObject* pobj = dynamic_cast<SbxObject*>(variable->GetObject());
+ assert(pobj);
+ SbxArray* props = pobj->GetProperties();
for (sal_uInt16 i = 0; i < props->Count(); ++i) {
data = unmarshal(props->Get(i), data);
}
@@ -429,6 +434,7 @@ void const * unmarshal(SbxVariable * variable, void const * data) {
}
} else {
SbxDimArray * arr = dynamic_cast<SbxDimArray*>( variable->GetObject() );
+ assert(arr);
int dims = arr->GetDims();
std::vector< sal_Int32 > low(dims);
std::vector< sal_Int32 > up(dims);