Simplify a bit
Change-Id: I618b0f8bcb2e8032ee12367c73e1136685f66b3e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176183 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
This commit is contained in:
parent
27f7770e3e
commit
56f3dbffdf
@ -1381,7 +1381,7 @@ void BasicManager::SetGlobalUNOConstant( const OUString& rName, const uno::Any&
|
|||||||
if ( pVariable )
|
if ( pVariable )
|
||||||
*pOldValue = sbxToUnoValue( pVariable );
|
*pOldValue = sbxToUnoValue( pVariable );
|
||||||
}
|
}
|
||||||
SbxObjectRef xUnoObj = GetSbUnoObject( _rValue.getValueType ().getTypeName () , _rValue );
|
SbxObjectRef xUnoObj = GetSbUnoObject( _rValue.getValueTypeName () , _rValue );
|
||||||
xUnoObj->SetName(rName);
|
xUnoObj->SetName(rName);
|
||||||
xUnoObj->SetFlag( SbxFlagBits::DontStore );
|
xUnoObj->SetFlag( SbxFlagBits::DontStore );
|
||||||
pStandardLib->Insert( xUnoObj.get() );
|
pStandardLib->Insert( xUnoObj.get() );
|
||||||
|
@ -423,7 +423,7 @@ void RTL_Impl_CreateUnoDialog( SbxArray& rPar )
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Any aAnyISP = pUnoObj->getUnoAny();
|
Any aAnyISP = pUnoObj->getUnoAny();
|
||||||
TypeClass eType = aAnyISP.getValueType().getTypeClass();
|
TypeClass eType = aAnyISP.getValueTypeClass();
|
||||||
|
|
||||||
if( eType != TypeClass_INTERFACE )
|
if( eType != TypeClass_INTERFACE )
|
||||||
{
|
{
|
||||||
|
@ -2302,7 +2302,7 @@ SbUnoObject::SbUnoObject( const OUString& aName_, const Any& aUnoObj_ )
|
|||||||
Remove( u"Parent"_ustr, SbxClassType::DontCare );
|
Remove( u"Parent"_ustr, SbxClassType::DontCare );
|
||||||
|
|
||||||
// check the type of the objects
|
// check the type of the objects
|
||||||
TypeClass eType = aUnoObj_.getValueType().getTypeClass();
|
TypeClass eType = aUnoObj_.getValueTypeClass();
|
||||||
Reference< XInterface > x;
|
Reference< XInterface > x;
|
||||||
if( eType == TypeClass_INTERFACE )
|
if( eType == TypeClass_INTERFACE )
|
||||||
{
|
{
|
||||||
@ -2353,7 +2353,7 @@ SbUnoObject::SbUnoObject( const OUString& aName_, const Any& aUnoObj_ )
|
|||||||
// insert the real name of the class
|
// insert the real name of the class
|
||||||
if( aName_.isEmpty() )
|
if( aName_.isEmpty() )
|
||||||
{
|
{
|
||||||
aClassName_ = aUnoObj_.getValueType().getTypeName();
|
aClassName_ = aUnoObj_.getValueTypeName();
|
||||||
bSetClassName = true;
|
bSetClassName = true;
|
||||||
}
|
}
|
||||||
StructRefInfo aThisStruct( maTmpUnoObj, maTmpUnoObj.getValueType(), 0 );
|
StructRefInfo aThisStruct( maTmpUnoObj, maTmpUnoObj.getValueType(), 0 );
|
||||||
@ -3127,7 +3127,7 @@ void RTL_Impl_IsUnoStruct( SbxArray& rPar )
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Any aAny = obj->getUnoAny();
|
Any aAny = obj->getUnoAny();
|
||||||
TypeClass eType = aAny.getValueType().getTypeClass();
|
TypeClass eType = aAny.getValueTypeClass();
|
||||||
if( eType == TypeClass_STRUCT )
|
if( eType == TypeClass_STRUCT )
|
||||||
{
|
{
|
||||||
refVar->PutBool( true );
|
refVar->PutBool( true );
|
||||||
@ -3160,7 +3160,7 @@ void RTL_Impl_EqualUnoObjects( SbxArray& rPar )
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Any aAny1 = obj1->getUnoAny();
|
Any aAny1 = obj1->getUnoAny();
|
||||||
TypeClass eType1 = aAny1.getValueType().getTypeClass();
|
TypeClass eType1 = aAny1.getValueTypeClass();
|
||||||
if( eType1 != TypeClass_INTERFACE )
|
if( eType1 != TypeClass_INTERFACE )
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
@ -3180,7 +3180,7 @@ void RTL_Impl_EqualUnoObjects( SbxArray& rPar )
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Any aAny2 = obj2->getUnoAny();
|
Any aAny2 = obj2->getUnoAny();
|
||||||
TypeClass eType2 = aAny2.getValueType().getTypeClass();
|
TypeClass eType2 = aAny2.getValueTypeClass();
|
||||||
if( eType2 != TypeClass_INTERFACE )
|
if( eType2 != TypeClass_INTERFACE )
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
@ -3377,7 +3377,7 @@ SbxVariable* SbUnoClass::Find( const OUString& rName, SbxClassType )
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
Any aValue = xHarryName->getByHierarchicalName( aNewName );
|
Any aValue = xHarryName->getByHierarchicalName( aNewName );
|
||||||
TypeClass eType = aValue.getValueType().getTypeClass();
|
TypeClass eType = aValue.getValueTypeClass();
|
||||||
|
|
||||||
// Interface located? Then it is a class
|
// Interface located? Then it is a class
|
||||||
if( eType == TypeClass_INTERFACE )
|
if( eType == TypeClass_INTERFACE )
|
||||||
|
@ -1642,7 +1642,7 @@ static bool checkUnoStructCopy( bool bVBA, SbxVariableRef const & refVal, SbxVar
|
|||||||
aAny = pUnoVal ? pUnoVal->getUnoAny() : pUnoStructVal->getUnoAny();
|
aAny = pUnoVal ? pUnoVal->getUnoAny() : pUnoStructVal->getUnoAny();
|
||||||
else
|
else
|
||||||
return false;
|
return false;
|
||||||
if ( aAny.getValueType().getTypeClass() != TypeClass_STRUCT )
|
if ( aAny.getValueTypeClass() != TypeClass_STRUCT )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
refVar->SetType( SbxOBJECT );
|
refVar->SetType( SbxOBJECT );
|
||||||
@ -3866,7 +3866,7 @@ void SbiRuntime::SetupArgs( SbxVariable* p, sal_uInt32 nOp1 )
|
|||||||
{
|
{
|
||||||
Any aAny = pUnoObj->getUnoAny();
|
Any aAny = pUnoObj->getUnoAny();
|
||||||
|
|
||||||
if( aAny.getValueType().getTypeClass() == TypeClass_INTERFACE )
|
if( aAny.getValueTypeClass() == TypeClass_INTERFACE )
|
||||||
{
|
{
|
||||||
Reference< XDefaultMethod > xDfltMethod( aAny, UNO_QUERY );
|
Reference< XDefaultMethod > xDfltMethod( aAny, UNO_QUERY );
|
||||||
|
|
||||||
@ -3995,7 +3995,7 @@ SbxVariable* SbiRuntime::CheckArray( SbxVariable* pElem )
|
|||||||
{
|
{
|
||||||
Any aAny = pUnoObj->getUnoAny();
|
Any aAny = pUnoObj->getUnoAny();
|
||||||
|
|
||||||
if( aAny.getValueType().getTypeClass() == TypeClass_INTERFACE )
|
if( aAny.getValueTypeClass() == TypeClass_INTERFACE )
|
||||||
{
|
{
|
||||||
Reference< XIndexAccess > xIndexAccess( aAny, UNO_QUERY );
|
Reference< XIndexAccess > xIndexAccess( aAny, UNO_QUERY );
|
||||||
if ( !bVBAEnabled )
|
if ( !bVBAEnabled )
|
||||||
@ -4061,7 +4061,7 @@ SbxVariable* SbiRuntime::CheckArray( SbxVariable* pElem )
|
|||||||
pUnoObj = pSbObj;
|
pUnoObj = pSbObj;
|
||||||
Any aUnoAny = pUnoObj->getUnoAny();
|
Any aUnoAny = pUnoObj->getUnoAny();
|
||||||
|
|
||||||
if( aUnoAny.getValueType().getTypeClass() == TypeClass_INTERFACE )
|
if( aUnoAny.getValueTypeClass() == TypeClass_INTERFACE )
|
||||||
x = aUnoAny;
|
x = aUnoAny;
|
||||||
pElem = pDflt;
|
pElem = pDflt;
|
||||||
}
|
}
|
||||||
|
@ -170,7 +170,7 @@ void SAL_CALL DataPoint::setFastPropertyValue_NoBroadcast(
|
|||||||
ModifyListenerHelper::removeListener( xBroadcaster, m_xModifyEventForwarder );
|
ModifyListenerHelper::removeListener( xBroadcaster, m_xModifyEventForwarder );
|
||||||
}
|
}
|
||||||
|
|
||||||
OSL_ASSERT( rValue.getValueType().getTypeClass() == uno::TypeClass_INTERFACE );
|
OSL_ASSERT( rValue.getValueTypeClass() == uno::TypeClass_INTERFACE );
|
||||||
if( rValue.hasValue() &&
|
if( rValue.hasValue() &&
|
||||||
(rValue >>= xBroadcaster) &&
|
(rValue >>= xBroadcaster) &&
|
||||||
xBroadcaster.is())
|
xBroadcaster.is())
|
||||||
|
@ -279,7 +279,7 @@ void SAL_CALL DataSeries::setFastPropertyValue_NoBroadcast(
|
|||||||
ModifyListenerHelper::removeListener( xBroadcaster, m_xModifyEventForwarder );
|
ModifyListenerHelper::removeListener( xBroadcaster, m_xModifyEventForwarder );
|
||||||
}
|
}
|
||||||
|
|
||||||
OSL_ASSERT( rValue.getValueType().getTypeClass() == uno::TypeClass_INTERFACE );
|
OSL_ASSERT( rValue.getValueTypeClass() == uno::TypeClass_INTERFACE );
|
||||||
if( rValue.hasValue() &&
|
if( rValue.hasValue() &&
|
||||||
(rValue >>= xBroadcaster) &&
|
(rValue >>= xBroadcaster) &&
|
||||||
xBroadcaster.is())
|
xBroadcaster.is())
|
||||||
|
@ -267,7 +267,7 @@ void SAL_CALL CandleStickChartType::setFastPropertyValue_NoBroadcast(
|
|||||||
ModifyListenerHelper::removeListener( xBroadcaster, m_xModifyEventForwarder );
|
ModifyListenerHelper::removeListener( xBroadcaster, m_xModifyEventForwarder );
|
||||||
}
|
}
|
||||||
|
|
||||||
OSL_ASSERT( rValue.getValueType().getTypeClass() == uno::TypeClass_INTERFACE );
|
OSL_ASSERT( rValue.getValueTypeClass() == uno::TypeClass_INTERFACE );
|
||||||
if( rValue.hasValue() &&
|
if( rValue.hasValue() &&
|
||||||
(rValue >>= xBroadcaster) &&
|
(rValue >>= xBroadcaster) &&
|
||||||
xBroadcaster.is())
|
xBroadcaster.is())
|
||||||
|
@ -66,7 +66,7 @@ OPropertySet::OPropertySet( const OPropertySet & rOther ) :
|
|||||||
for(auto& rProp : m_aProperties)
|
for(auto& rProp : m_aProperties)
|
||||||
{
|
{
|
||||||
if( rProp.second.hasValue() &&
|
if( rProp.second.hasValue() &&
|
||||||
rProp.second.getValueType().getTypeClass() == uno::TypeClass_INTERFACE )
|
rProp.second.getValueTypeClass() == uno::TypeClass_INTERFACE )
|
||||||
{
|
{
|
||||||
Reference< util::XCloneable > xCloneable;
|
Reference< util::XCloneable > xCloneable;
|
||||||
if( rProp.second >>= xCloneable )
|
if( rProp.second >>= xCloneable )
|
||||||
|
@ -86,7 +86,7 @@ static inline ::System::Object ^ to_cli_constant( Any const & value )
|
|||||||
default:
|
default:
|
||||||
throw RuntimeException(
|
throw RuntimeException(
|
||||||
"unexpected constant type " +
|
"unexpected constant type " +
|
||||||
value.getValueType().getTypeName() );
|
value.getValueTypeName() );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -52,7 +52,7 @@ void extract(
|
|||||||
if (! fromAny(seq[nArg], &v)) {
|
if (! fromAny(seq[nArg], &v)) {
|
||||||
throw ::com::sun::star::lang::IllegalArgumentException(
|
throw ::com::sun::star::lang::IllegalArgumentException(
|
||||||
"Cannot extract ANY { "
|
"Cannot extract ANY { "
|
||||||
+ seq[nArg].getValueType().getTypeName()
|
+ seq[nArg].getValueTypeName()
|
||||||
+ " } to " + ::cppu::UnoType<T>::get().getTypeName(),
|
+ " } to " + ::cppu::UnoType<T>::get().getTypeName(),
|
||||||
xErrorContext,
|
xErrorContext,
|
||||||
static_cast<sal_Int16>(nArg) );
|
static_cast<sal_Int16>(nArg) );
|
||||||
|
@ -194,7 +194,7 @@ void SAL_CALL AttacherAllListener_Impl::firing(const AllEventObject& Event)
|
|||||||
void AttacherAllListener_Impl::convertToEventReturn( Any & rRet, const Type & rRetType )
|
void AttacherAllListener_Impl::convertToEventReturn( Any & rRet, const Type & rRetType )
|
||||||
{
|
{
|
||||||
// no return value? Set to the specified values
|
// no return value? Set to the specified values
|
||||||
if( rRet.getValueType().getTypeClass() == TypeClass_VOID )
|
if( rRet.getValueTypeClass() == TypeClass_VOID )
|
||||||
{
|
{
|
||||||
switch( rRetType.getTypeClass() )
|
switch( rRetType.getTypeClass() )
|
||||||
{
|
{
|
||||||
@ -267,7 +267,7 @@ Any SAL_CALL AttacherAllListener_Impl::approveFiring( const AllEventObject& Even
|
|||||||
convertToEventReturn( aRet, aRetType );
|
convertToEventReturn( aRet, aRetType );
|
||||||
}
|
}
|
||||||
|
|
||||||
switch( aRet.getValueType().getTypeClass() )
|
switch( aRet.getValueTypeClass() )
|
||||||
{
|
{
|
||||||
case TypeClass_INTERFACE:
|
case TypeClass_INTERFACE:
|
||||||
{
|
{
|
||||||
|
@ -197,7 +197,7 @@ namespace comphelper
|
|||||||
throw IllegalArgumentException(
|
throw IllegalArgumentException(
|
||||||
"Invalid value type for '" + _rValueName
|
"Invalid value type for '" + _rValueName
|
||||||
+ "'.\nExpected: " + _rExpectedValueType.getTypeName()
|
+ "'.\nExpected: " + _rExpectedValueType.getTypeName()
|
||||||
+ "\nFound: " + pos->second.getValueType().getTypeName(),
|
+ "\nFound: " + pos->second.getValueTypeName(),
|
||||||
nullptr, 0 );
|
nullptr, 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -223,7 +223,7 @@ namespace comphelper
|
|||||||
throw IllegalArgumentException(
|
throw IllegalArgumentException(
|
||||||
OUString::Concat("Invalid value type for '") + _rValueName
|
OUString::Concat("Invalid value type for '") + _rValueName
|
||||||
+ "'.\nExpected: " + _rExpectedValueType.getTypeName()
|
+ "'.\nExpected: " + _rExpectedValueType.getTypeName()
|
||||||
+ "\nFound: " + rPropVal.Value.getValueType().getTypeName(),
|
+ "\nFound: " + rPropVal.Value.getValueTypeName(),
|
||||||
nullptr, 0 );
|
nullptr, 0 );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -199,7 +199,7 @@ namespace
|
|||||||
throw IllegalArgumentException(
|
throw IllegalArgumentException(
|
||||||
"The given value cannot be converted to the required property type."
|
"The given value cannot be converted to the required property type."
|
||||||
" (property name \"" + _rProperty.aProperty.Name
|
" (property name \"" + _rProperty.aProperty.Name
|
||||||
+ "\", found value type \"" + _rValue.getValueType().getTypeName()
|
+ "\", found value type \"" + _rValue.getValueTypeName()
|
||||||
+ "\", required property type \"" + _rProperty.aProperty.Type.getTypeName()
|
+ "\", required property type \"" + _rProperty.aProperty.Type.getTypeName()
|
||||||
+ "\")",
|
+ "\")",
|
||||||
nullptr, 4 );
|
nullptr, 4 );
|
||||||
|
@ -99,7 +99,7 @@ css::uno::Type const & mapType(Type type) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Type getDynamicType(css::uno::Any const & value) {
|
Type getDynamicType(css::uno::Any const & value) {
|
||||||
switch (value.getValueType().getTypeClass()) {
|
switch (value.getValueTypeClass()) {
|
||||||
case css::uno::TypeClass_VOID:
|
case css::uno::TypeClass_VOID:
|
||||||
return TYPE_NIL;
|
return TYPE_NIL;
|
||||||
case css::uno::TypeClass_BOOLEAN:
|
case css::uno::TypeClass_BOOLEAN:
|
||||||
@ -125,7 +125,7 @@ Type getDynamicType(css::uno::Any const & value) {
|
|||||||
return TYPE_STRING;
|
return TYPE_STRING;
|
||||||
case css::uno::TypeClass_SEQUENCE: //TODO
|
case css::uno::TypeClass_SEQUENCE: //TODO
|
||||||
{
|
{
|
||||||
OUString name(value.getValueType().getTypeName());
|
OUString name(value.getValueTypeName());
|
||||||
if ( name == "[]byte" ) {
|
if ( name == "[]byte" ) {
|
||||||
return TYPE_HEXBINARY;
|
return TYPE_HEXBINARY;
|
||||||
} else if (name == "[]boolean")
|
} else if (name == "[]boolean")
|
||||||
|
@ -62,7 +62,7 @@ OUString DBTypeConversion::toSQLString(sal_Int32 eType, const Any& _rVal,
|
|||||||
case DataType::BOOLEAN:
|
case DataType::BOOLEAN:
|
||||||
case DataType::TINYINT:
|
case DataType::TINYINT:
|
||||||
case DataType::SMALLINT:
|
case DataType::SMALLINT:
|
||||||
if (_rVal.getValueType().getTypeClass() == css::uno::TypeClass_BOOLEAN)
|
if (_rVal.getValueTypeClass() == css::uno::TypeClass_BOOLEAN)
|
||||||
{
|
{
|
||||||
if (::cppu::any2bool(_rVal))
|
if (::cppu::any2bool(_rVal))
|
||||||
aRet.append("1");
|
aRet.append("1");
|
||||||
@ -104,14 +104,14 @@ OUString DBTypeConversion::toSQLString(sal_Int32 eType, const Any& _rVal,
|
|||||||
{
|
{
|
||||||
DateTime aDateTime;
|
DateTime aDateTime;
|
||||||
bool bOk = false;
|
bool bOk = false;
|
||||||
if (_rVal.getValueType().getTypeClass() == css::uno::TypeClass_DOUBLE)
|
if (_rVal.getValueTypeClass() == css::uno::TypeClass_DOUBLE)
|
||||||
{
|
{
|
||||||
double nValue = 0.0;
|
double nValue = 0.0;
|
||||||
_rVal >>= nValue;
|
_rVal >>= nValue;
|
||||||
aDateTime = DBTypeConversion::toDateTime(nValue);
|
aDateTime = DBTypeConversion::toDateTime(nValue);
|
||||||
bOk = true;
|
bOk = true;
|
||||||
}
|
}
|
||||||
else if (_rVal.getValueType().getTypeClass() == css::uno::TypeClass_STRING)
|
else if (_rVal.getValueTypeClass() == css::uno::TypeClass_STRING)
|
||||||
{
|
{
|
||||||
OUString sValue;
|
OUString sValue;
|
||||||
_rVal >>= sValue;
|
_rVal >>= sValue;
|
||||||
@ -136,14 +136,14 @@ OUString DBTypeConversion::toSQLString(sal_Int32 eType, const Any& _rVal,
|
|||||||
{
|
{
|
||||||
Date aDate;
|
Date aDate;
|
||||||
bool bOk = false;
|
bool bOk = false;
|
||||||
if (_rVal.getValueType().getTypeClass() == css::uno::TypeClass_DOUBLE)
|
if (_rVal.getValueTypeClass() == css::uno::TypeClass_DOUBLE)
|
||||||
{
|
{
|
||||||
double nValue = 0.0;
|
double nValue = 0.0;
|
||||||
_rVal >>= nValue;
|
_rVal >>= nValue;
|
||||||
aDate = DBTypeConversion::toDate(nValue);
|
aDate = DBTypeConversion::toDate(nValue);
|
||||||
bOk = true;
|
bOk = true;
|
||||||
}
|
}
|
||||||
else if (_rVal.getValueType().getTypeClass() == css::uno::TypeClass_STRING)
|
else if (_rVal.getValueTypeClass() == css::uno::TypeClass_STRING)
|
||||||
{
|
{
|
||||||
OUString sValue;
|
OUString sValue;
|
||||||
_rVal >>= sValue;
|
_rVal >>= sValue;
|
||||||
@ -161,14 +161,14 @@ OUString DBTypeConversion::toSQLString(sal_Int32 eType, const Any& _rVal,
|
|||||||
{
|
{
|
||||||
css::util::Time aTime;
|
css::util::Time aTime;
|
||||||
bool bOk = false;
|
bool bOk = false;
|
||||||
if (_rVal.getValueType().getTypeClass() == css::uno::TypeClass_DOUBLE)
|
if (_rVal.getValueTypeClass() == css::uno::TypeClass_DOUBLE)
|
||||||
{
|
{
|
||||||
double nValue = 0.0;
|
double nValue = 0.0;
|
||||||
_rVal >>= nValue;
|
_rVal >>= nValue;
|
||||||
aTime = DBTypeConversion::toTime(nValue);
|
aTime = DBTypeConversion::toTime(nValue);
|
||||||
bOk = true;
|
bOk = true;
|
||||||
}
|
}
|
||||||
else if (_rVal.getValueType().getTypeClass() == css::uno::TypeClass_STRING)
|
else if (_rVal.getValueTypeClass() == css::uno::TypeClass_STRING)
|
||||||
{
|
{
|
||||||
OUString sValue;
|
OUString sValue;
|
||||||
_rVal >>= sValue;
|
_rVal >>= sValue;
|
||||||
|
@ -2299,7 +2299,7 @@ void ORowSetValue::impl_fill( const sal_Int32 _nType, bool _bNullable, const det
|
|||||||
|
|
||||||
void ORowSetValue::fill(const Any& _rValue)
|
void ORowSetValue::fill(const Any& _rValue)
|
||||||
{
|
{
|
||||||
switch (_rValue.getValueType().getTypeClass())
|
switch (_rValue.getValueTypeClass())
|
||||||
{
|
{
|
||||||
case TypeClass_VOID:
|
case TypeClass_VOID:
|
||||||
setNull(); break;
|
setNull(); break;
|
||||||
|
@ -1030,7 +1030,7 @@ try
|
|||||||
{ // Unlike the ValueMin the EffectiveMin can be void
|
{ // Unlike the ValueMin the EffectiveMin can be void
|
||||||
if (hasProperty(sPropValueMin, xNewProps))
|
if (hasProperty(sPropValueMin, xNewProps))
|
||||||
{
|
{
|
||||||
OSL_ENSURE(aEffectiveMin.getValueType().getTypeClass() == TypeClass_DOUBLE,
|
OSL_ENSURE(aEffectiveMin.getValueTypeClass() == TypeClass_DOUBLE,
|
||||||
"TransferFormComponentProperties : invalid property type !");
|
"TransferFormComponentProperties : invalid property type !");
|
||||||
xNewProps->setPropertyValue(sPropValueMin, aEffectiveMin);
|
xNewProps->setPropertyValue(sPropValueMin, aEffectiveMin);
|
||||||
}
|
}
|
||||||
@ -1040,7 +1040,7 @@ try
|
|||||||
{ // analog
|
{ // analog
|
||||||
if (hasProperty(sPropValueMax, xNewProps))
|
if (hasProperty(sPropValueMax, xNewProps))
|
||||||
{
|
{
|
||||||
OSL_ENSURE(aEffectiveMax.getValueType().getTypeClass() == TypeClass_DOUBLE,
|
OSL_ENSURE(aEffectiveMax.getValueTypeClass() == TypeClass_DOUBLE,
|
||||||
"TransferFormComponentProperties : invalid property type !");
|
"TransferFormComponentProperties : invalid property type !");
|
||||||
xNewProps->setPropertyValue(sPropValueMax, aEffectiveMax);
|
xNewProps->setPropertyValue(sPropValueMax, aEffectiveMax);
|
||||||
}
|
}
|
||||||
@ -1050,8 +1050,8 @@ try
|
|||||||
Any aEffectiveDefault( xOldProps->getPropertyValue(sPropEffectiveDefault) );
|
Any aEffectiveDefault( xOldProps->getPropertyValue(sPropEffectiveDefault) );
|
||||||
if (aEffectiveDefault.hasValue())
|
if (aEffectiveDefault.hasValue())
|
||||||
{
|
{
|
||||||
bool bIsString = aEffectiveDefault.getValueType().getTypeClass() == TypeClass_STRING;
|
bool bIsString = aEffectiveDefault.getValueTypeClass() == TypeClass_STRING;
|
||||||
OSL_ENSURE(bIsString || aEffectiveDefault.getValueType().getTypeClass() == TypeClass_DOUBLE,
|
OSL_ENSURE(bIsString || aEffectiveDefault.getValueTypeClass() == TypeClass_DOUBLE,
|
||||||
"TransferFormComponentProperties : invalid property type !");
|
"TransferFormComponentProperties : invalid property type !");
|
||||||
// The Effective-Properties should always be void or string or double...
|
// The Effective-Properties should always be void or string or double...
|
||||||
|
|
||||||
|
@ -439,7 +439,7 @@ void Connection::initialize( const Sequence< Any >& aArguments )
|
|||||||
{
|
{
|
||||||
throw IllegalArgumentException(
|
throw IllegalArgumentException(
|
||||||
"pq_driver: expected string as first argument, got "
|
"pq_driver: expected string as first argument, got "
|
||||||
+ aArguments[0].getValueType().getTypeName(),
|
+ aArguments[0].getValueTypeName(),
|
||||||
*this, 0 );
|
*this, 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -477,7 +477,7 @@ void Test::testPolyStruct() {
|
|||||||
u"test.codemaker.cppumaker.Struct<char,short>"_ustr,
|
u"test.codemaker.cppumaker.Struct<char,short>"_ustr,
|
||||||
(css::uno::Any(
|
(css::uno::Any(
|
||||||
test::codemaker::cppumaker::Struct< sal_Unicode, sal_Int16 >()).
|
test::codemaker::cppumaker::Struct< sal_Unicode, sal_Int16 >()).
|
||||||
getValueType().getTypeName()));
|
getValueTypeName()));
|
||||||
|
|
||||||
css::uno::Sequence< css::uno::Sequence< css::uno::Any > >
|
css::uno::Sequence< css::uno::Sequence< css::uno::Any > >
|
||||||
aEmptySequence;
|
aEmptySequence;
|
||||||
|
@ -2154,7 +2154,7 @@ void Test::testStruct() {
|
|||||||
void Test::testPoly() {
|
void Test::testPoly() {
|
||||||
css::uno::Any a;
|
css::uno::Any a;
|
||||||
a <<= Poly< css::uno::Sequence< ::sal_Unicode > >();
|
a <<= Poly< css::uno::Sequence< ::sal_Unicode > >();
|
||||||
CPPUNIT_ASSERT_EQUAL_MESSAGE( "type name", u"Poly<[]char>"_ustr, a.getValueType().getTypeName() );
|
CPPUNIT_ASSERT_EQUAL_MESSAGE( "type name", u"Poly<[]char>"_ustr, a.getValueTypeName() );
|
||||||
CPPUNIT_ASSERT_EQUAL_MESSAGE(
|
CPPUNIT_ASSERT_EQUAL_MESSAGE(
|
||||||
"constructor",
|
"constructor",
|
||||||
css::uno::Any(Poly< css::uno::Sequence< ::sal_Unicode > >()), a);
|
css::uno::Any(Poly< css::uno::Sequence< ::sal_Unicode > >()), a);
|
||||||
|
@ -1293,7 +1293,7 @@ void SAL_CALL SbaXFormAdapter::setFastPropertyValue(sal_Int32 nHandle, const Any
|
|||||||
|
|
||||||
if (m_nNamePropHandle == nHandle)
|
if (m_nNamePropHandle == nHandle)
|
||||||
{
|
{
|
||||||
if (aValue.getValueType().getTypeClass() != TypeClass_STRING)
|
if (aValue.getValueTypeClass() != TypeClass_STRING)
|
||||||
{
|
{
|
||||||
throw css::lang::IllegalArgumentException();
|
throw css::lang::IllegalArgumentException();
|
||||||
}
|
}
|
||||||
@ -1593,7 +1593,7 @@ void SAL_CALL SbaXFormAdapter::removeResetListener(const css::uno::Reference< cs
|
|||||||
void SbaXFormAdapter::implInsert(const Any& aElement, sal_Int32 nIndex, const OUString* pNewElName)
|
void SbaXFormAdapter::implInsert(const Any& aElement, sal_Int32 nIndex, const OUString* pNewElName)
|
||||||
{
|
{
|
||||||
// extract the form component
|
// extract the form component
|
||||||
if (aElement.getValueType().getTypeClass() != TypeClass_INTERFACE)
|
if (aElement.getValueTypeClass() != TypeClass_INTERFACE)
|
||||||
{
|
{
|
||||||
throw css::lang::IllegalArgumentException();
|
throw css::lang::IllegalArgumentException();
|
||||||
}
|
}
|
||||||
@ -1757,7 +1757,7 @@ void SAL_CALL SbaXFormAdapter::replaceByIndex(sal_Int32 _rIndex, const Any& Elem
|
|||||||
throw css::lang::IndexOutOfBoundsException();
|
throw css::lang::IndexOutOfBoundsException();
|
||||||
|
|
||||||
// extract the form component
|
// extract the form component
|
||||||
if (Element.getValueType().getTypeClass() != TypeClass_INTERFACE)
|
if (Element.getValueTypeClass() != TypeClass_INTERFACE)
|
||||||
{
|
{
|
||||||
throw css::lang::IllegalArgumentException();
|
throw css::lang::IllegalArgumentException();
|
||||||
}
|
}
|
||||||
|
@ -896,7 +896,7 @@ template<class T> static bool checkItemType(const SfxPoolItem* pItem){ return dy
|
|||||||
|
|
||||||
void ODbDataSourceAdministrationHelper::implTranslateProperty( SfxItemSet& _rSet, sal_Int32 _nId, const Any& _rValue )
|
void ODbDataSourceAdministrationHelper::implTranslateProperty( SfxItemSet& _rSet, sal_Int32 _nId, const Any& _rValue )
|
||||||
{
|
{
|
||||||
switch ( _rValue.getValueType().getTypeClass() )
|
switch ( _rValue.getValueTypeClass() )
|
||||||
{
|
{
|
||||||
case TypeClass_STRING:
|
case TypeClass_STRING:
|
||||||
if ( implCheckItemType( _rSet, _nId, checkItemType<SfxStringItem> ) )
|
if ( implCheckItemType( _rSet, _nId, checkItemType<SfxStringItem> ) )
|
||||||
|
@ -441,7 +441,7 @@ Reference<deployment::XPackageManager> PackageManagerImpl::create(
|
|||||||
Any exc( ::cppu::getCaughtException() );
|
Any exc( ::cppu::getCaughtException() );
|
||||||
throw lang::WrappedTargetRuntimeException(
|
throw lang::WrappedTargetRuntimeException(
|
||||||
("[context=\"" + context + "\"] caught unexpected "
|
("[context=\"" + context + "\"] caught unexpected "
|
||||||
+ exc.getValueType().getTypeName() + ": " + e.Message),
|
+ exc.getValueTypeName() + ": " + e.Message),
|
||||||
Reference<XInterface>(), exc );
|
Reference<XInterface>(), exc );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -663,7 +663,7 @@ void Package::processPackage_impl(
|
|||||||
(doRegisterPackage
|
(doRegisterPackage
|
||||||
? DpResId(RID_STR_ERROR_WHILE_REGISTERING)
|
? DpResId(RID_STR_ERROR_WHILE_REGISTERING)
|
||||||
: DpResId(RID_STR_ERROR_WHILE_REVOKING))
|
: DpResId(RID_STR_ERROR_WHILE_REVOKING))
|
||||||
+ getDisplayName() + ": " + exc.getValueType().getTypeName() + " \"" + e.Message
|
+ getDisplayName() + ": " + exc.getValueTypeName() + " \"" + e.Message
|
||||||
+ "\"",
|
+ "\"",
|
||||||
static_cast<OWeakObject *>(this), exc );
|
static_cast<OWeakObject *>(this), exc );
|
||||||
}
|
}
|
||||||
|
@ -296,7 +296,7 @@ void SAL_CALL EventAttacherImpl::initialize(const Sequence< Any >& Arguments)
|
|||||||
// get services from the argument list
|
// get services from the argument list
|
||||||
for( const Any& arg : Arguments )
|
for( const Any& arg : Arguments )
|
||||||
{
|
{
|
||||||
if( arg.getValueType().getTypeClass() != TypeClass_INTERFACE )
|
if( arg.getValueTypeClass() != TypeClass_INTERFACE )
|
||||||
throw IllegalArgumentException();
|
throw IllegalArgumentException();
|
||||||
|
|
||||||
// InvocationAdapter service ?
|
// InvocationAdapter service ?
|
||||||
@ -435,7 +435,7 @@ void SAL_CALL FilterAllListenerImpl::firing(const AllEventObject& Event)
|
|||||||
void FilterAllListenerImpl::convertToEventReturn( Any & rRet, const Type & rRetType )
|
void FilterAllListenerImpl::convertToEventReturn( Any & rRet, const Type & rRetType )
|
||||||
{
|
{
|
||||||
// no return value? Set to the specified values
|
// no return value? Set to the specified values
|
||||||
if( rRet.getValueType().getTypeClass() == TypeClass_VOID )
|
if( rRet.getValueTypeClass() == TypeClass_VOID )
|
||||||
{
|
{
|
||||||
switch( rRetType.getTypeClass() )
|
switch( rRetType.getTypeClass() )
|
||||||
{
|
{
|
||||||
|
@ -673,7 +673,7 @@ void UnoConversionUtilities<T>::anyToVariant(VARIANT* pVariant, const Any& rAny,
|
|||||||
throw BridgeRuntimeError(
|
throw BridgeRuntimeError(
|
||||||
"[automation bridge]UnoConversionUtilities<T>::anyToVariant \n"
|
"[automation bridge]UnoConversionUtilities<T>::anyToVariant \n"
|
||||||
"Conversion of any with " +
|
"Conversion of any with " +
|
||||||
rAny.getValueType().getTypeName() +
|
rAny.getValueTypeName() +
|
||||||
" to VARIANT with type: " + OUString::number(static_cast<sal_Int32>(type)) +
|
" to VARIANT with type: " + OUString::number(static_cast<sal_Int32>(type)) +
|
||||||
" failed! Error code: " + OUString::number(hr));
|
" failed! Error code: " + OUString::number(hr));
|
||||||
|
|
||||||
@ -1007,7 +1007,7 @@ void UnoConversionUtilities<T>::anyToVariant(VARIANT* pVariant, const Any& rAny)
|
|||||||
{
|
{
|
||||||
throw IllegalArgumentException(
|
throw IllegalArgumentException(
|
||||||
"[automation bridge]UnoConversionUtilities<T>::anyToVariant\n"
|
"[automation bridge]UnoConversionUtilities<T>::anyToVariant\n"
|
||||||
"The provided any of type\" " + rAny.getValueType().getTypeName() +
|
"The provided any of type\" " + rAny.getValueTypeName() +
|
||||||
"\" is unappropriate for conversion!", Reference<XInterface>(), -1);
|
"\" is unappropriate for conversion!", Reference<XInterface>(), -1);
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -1055,7 +1055,7 @@ SAFEARRAY* UnoConversionUtilities<T>::createUnoSequenceWrapper(const Any& rSeq,
|
|||||||
SAFEARRAY* pArray= nullptr;
|
SAFEARRAY* pArray= nullptr;
|
||||||
// Get the dimensions. This is done by examining the type name string
|
// Get the dimensions. This is done by examining the type name string
|
||||||
// The count of brackets determines the dimensions.
|
// The count of brackets determines the dimensions.
|
||||||
OUString sTypeName= rSeq.getValueType().getTypeName();
|
OUString sTypeName= rSeq.getValueTypeName();
|
||||||
sal_Int32 dims=0;
|
sal_Int32 dims=0;
|
||||||
for(sal_Int32 lastIndex=0;(lastIndex= sTypeName.indexOf( L'[', lastIndex)) != -1; lastIndex++,dims++);
|
for(sal_Int32 lastIndex=0;(lastIndex= sTypeName.indexOf( L'[', lastIndex)) != -1; lastIndex++,dims++);
|
||||||
|
|
||||||
|
@ -2035,7 +2035,7 @@ HRESULT InterfaceOleWrapper::doInvoke( DISPPARAMS * pdispparams, VARIANT * pvarR
|
|||||||
Exception excTarget;
|
Exception excTarget;
|
||||||
org >>= excTarget;
|
org >>= excTarget;
|
||||||
OUString message=
|
OUString message=
|
||||||
org.getValueType().getTypeName() + ": " + excTarget.Message;
|
org.getValueTypeName() + ": " + excTarget.Message;
|
||||||
writeExcepinfo(pexcepinfo, message);
|
writeExcepinfo(pexcepinfo, message);
|
||||||
ret = DISP_E_EXCEPTION;
|
ret = DISP_E_EXCEPTION;
|
||||||
}
|
}
|
||||||
@ -2126,7 +2126,7 @@ HRESULT InterfaceOleWrapper::doSetProperty( DISPPARAMS * /*pdispparams*/, VARIAN
|
|||||||
pexcepinfo->wCode = UNO_2_OLE_EXCEPTIONCODE;
|
pexcepinfo->wCode = UNO_2_OLE_EXCEPTIONCODE;
|
||||||
pexcepinfo->bstrSource = SysAllocString(L"any ONE component");
|
pexcepinfo->bstrSource = SysAllocString(L"any ONE component");
|
||||||
pexcepinfo->bstrDescription = SysAllocString(
|
pexcepinfo->bstrDescription = SysAllocString(
|
||||||
o3tl::toW(org.getValueType().getTypeName().getStr()));
|
o3tl::toW(org.getValueTypeName().getStr()));
|
||||||
}
|
}
|
||||||
ret = DISP_E_EXCEPTION;
|
ret = DISP_E_EXCEPTION;
|
||||||
}
|
}
|
||||||
|
@ -214,7 +214,7 @@ namespace pcr
|
|||||||
const Any& _rPropertyValue )
|
const Any& _rPropertyValue )
|
||||||
{
|
{
|
||||||
Reference< resource::XStringResourceResolver > xRet;
|
Reference< resource::XStringResourceResolver > xRet;
|
||||||
const TypeClass eType = _rPropertyValue.getValueType().getTypeClass();
|
const TypeClass eType = _rPropertyValue.getValueTypeClass();
|
||||||
if ( (eType == TypeClass_STRING || eType == TypeClass_SEQUENCE) &&
|
if ( (eType == TypeClass_STRING || eType == TypeClass_SEQUENCE) &&
|
||||||
lcl_isLanguageDependentProperty( _rPropertyName ) )
|
lcl_isLanguageDependentProperty( _rPropertyName ) )
|
||||||
{
|
{
|
||||||
@ -253,7 +253,7 @@ namespace pcr
|
|||||||
= lcl_getStringResourceResolverForProperty( m_xComponent, _rPropertyName, aPropertyValue );
|
= lcl_getStringResourceResolverForProperty( m_xComponent, _rPropertyName, aPropertyValue );
|
||||||
if( xStringResourceResolver.is() )
|
if( xStringResourceResolver.is() )
|
||||||
{
|
{
|
||||||
TypeClass eType = aPropertyValue.getValueType().getTypeClass();
|
TypeClass eType = aPropertyValue.getValueTypeClass();
|
||||||
if( eType == TypeClass_STRING )
|
if( eType == TypeClass_STRING )
|
||||||
{
|
{
|
||||||
OUString aPropStr;
|
OUString aPropStr;
|
||||||
@ -347,7 +347,7 @@ namespace pcr
|
|||||||
if( xStringResourceManager.is() )
|
if( xStringResourceManager.is() )
|
||||||
{
|
{
|
||||||
Any aPropertyValue( m_xComponent->getPropertyValue( _rPropertyName ) );
|
Any aPropertyValue( m_xComponent->getPropertyValue( _rPropertyName ) );
|
||||||
TypeClass eType = aPropertyValue.getValueType().getTypeClass();
|
TypeClass eType = aPropertyValue.getValueTypeClass();
|
||||||
if( eType == TypeClass_STRING )
|
if( eType == TypeClass_STRING )
|
||||||
{
|
{
|
||||||
OUString aPropStr;
|
OUString aPropStr;
|
||||||
|
@ -181,7 +181,7 @@ namespace pcr
|
|||||||
// nothing to do, type is already as desired
|
// nothing to do, type is already as desired
|
||||||
return aPropertyValue;
|
return aPropertyValue;
|
||||||
|
|
||||||
if ( _rControlValue.getValueType().getTypeClass() == TypeClass_STRING )
|
if ( _rControlValue.getValueTypeClass() == TypeClass_STRING )
|
||||||
{
|
{
|
||||||
OUString sControlValue;
|
OUString sControlValue;
|
||||||
_rControlValue >>= sControlValue;
|
_rControlValue >>= sControlValue;
|
||||||
|
@ -160,7 +160,7 @@ OUString SAL_CALL StringRepresentation::convertToControlValue(const uno::Any & P
|
|||||||
if ( sReturn.isEmpty() && PropertyValue.hasValue() )
|
if ( sReturn.isEmpty() && PropertyValue.hasValue() )
|
||||||
{
|
{
|
||||||
SAL_WARN( "extensions.propctrlr", "StringRepresentation::convertPropertyValueToStringRepresentation: cannot convert values of type '"
|
SAL_WARN( "extensions.propctrlr", "StringRepresentation::convertPropertyValueToStringRepresentation: cannot convert values of type '"
|
||||||
<< PropertyValue.getValueType().getTypeName()
|
<< PropertyValue.getValueTypeName()
|
||||||
<< "'!" );
|
<< "'!" );
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -413,7 +413,7 @@ void OGridColumn::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const Any
|
|||||||
switch (nHandle)
|
switch (nHandle)
|
||||||
{
|
{
|
||||||
case PROPERTY_ID_LABEL:
|
case PROPERTY_ID_LABEL:
|
||||||
DBG_ASSERT(rValue.getValueType().getTypeClass() == TypeClass_STRING, "invalid type" );
|
DBG_ASSERT(rValue.getValueTypeClass() == TypeClass_STRING, "invalid type" );
|
||||||
rValue >>= m_aLabel;
|
rValue >>= m_aLabel;
|
||||||
break;
|
break;
|
||||||
case PROPERTY_ID_WIDTH:
|
case PROPERTY_ID_WIDTH:
|
||||||
@ -477,7 +477,7 @@ void OGridColumn::write(const Reference<XObjectOutputStream>& _rxOutStream)
|
|||||||
_rxOutStream->writeShort(0x0002);
|
_rxOutStream->writeShort(0x0002);
|
||||||
|
|
||||||
sal_uInt16 nAnyMask = 0;
|
sal_uInt16 nAnyMask = 0;
|
||||||
if (m_aWidth.getValueType().getTypeClass() == TypeClass_LONG)
|
if (m_aWidth.getValueTypeClass() == TypeClass_LONG)
|
||||||
nAnyMask |= WIDTH;
|
nAnyMask |= WIDTH;
|
||||||
|
|
||||||
if (m_aAlign.getValueTypeClass() == TypeClass_SHORT)
|
if (m_aAlign.getValueTypeClass() == TypeClass_SHORT)
|
||||||
|
@ -203,7 +203,7 @@ void OComboBoxModel::setFastPropertyValue_NoBroadcast(sal_Int32 _nHandle, const
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case PROPERTY_ID_LISTSOURCE :
|
case PROPERTY_ID_LISTSOURCE :
|
||||||
DBG_ASSERT(_rValue.getValueType().getTypeClass() == TypeClass_STRING,
|
DBG_ASSERT(_rValue.getValueTypeClass() == TypeClass_STRING,
|
||||||
"OComboBoxModel::setFastPropertyValue_NoBroadcast : invalid type !" );
|
"OComboBoxModel::setFastPropertyValue_NoBroadcast : invalid type !" );
|
||||||
_rValue >>= m_aListSource;
|
_rValue >>= m_aListSource;
|
||||||
// The ListSource has changed -> reload
|
// The ListSource has changed -> reload
|
||||||
@ -217,13 +217,13 @@ void OComboBoxModel::setFastPropertyValue_NoBroadcast(sal_Int32 _nHandle, const
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case PROPERTY_ID_EMPTY_IS_NULL :
|
case PROPERTY_ID_EMPTY_IS_NULL :
|
||||||
DBG_ASSERT(_rValue.getValueType().getTypeClass() == TypeClass_BOOLEAN,
|
DBG_ASSERT(_rValue.getValueTypeClass() == TypeClass_BOOLEAN,
|
||||||
"OComboBoxModel::setFastPropertyValue_NoBroadcast : invalid type !" );
|
"OComboBoxModel::setFastPropertyValue_NoBroadcast : invalid type !" );
|
||||||
_rValue >>= m_bEmptyIsNull;
|
_rValue >>= m_bEmptyIsNull;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PROPERTY_ID_DEFAULT_TEXT :
|
case PROPERTY_ID_DEFAULT_TEXT :
|
||||||
DBG_ASSERT(_rValue.getValueType().getTypeClass() == TypeClass_STRING,
|
DBG_ASSERT(_rValue.getValueTypeClass() == TypeClass_STRING,
|
||||||
"OComboBoxModel::setFastPropertyValue_NoBroadcast : invalid type !" );
|
"OComboBoxModel::setFastPropertyValue_NoBroadcast : invalid type !" );
|
||||||
_rValue >>= m_aDefaultText;
|
_rValue >>= m_aDefaultText;
|
||||||
resetNoBroadcast();
|
resetNoBroadcast();
|
||||||
@ -339,7 +339,7 @@ void SAL_CALL OComboBoxModel::write(const Reference<css::io::XObjectOutputStream
|
|||||||
|
|
||||||
// Mask for Any
|
// Mask for Any
|
||||||
sal_uInt16 nAnyMask = 0;
|
sal_uInt16 nAnyMask = 0;
|
||||||
if (m_aBoundColumn.getValueType().getTypeClass() == TypeClass_SHORT)
|
if (m_aBoundColumn.getValueTypeClass() == TypeClass_SHORT)
|
||||||
nAnyMask |= BOUNDCOLUMN;
|
nAnyMask |= BOUNDCOLUMN;
|
||||||
_rxOutStream << nAnyMask;
|
_rxOutStream << nAnyMask;
|
||||||
|
|
||||||
|
@ -184,7 +184,7 @@ bool OCurrencyModel::commitControlValueToDbColumn( bool /*_bPostReset*/ )
|
|||||||
Any aControlValue( m_xAggregateFastSet->getFastPropertyValue( getValuePropertyAggHandle() ) );
|
Any aControlValue( m_xAggregateFastSet->getFastPropertyValue( getValuePropertyAggHandle() ) );
|
||||||
if ( aControlValue != m_aSaveValue )
|
if ( aControlValue != m_aSaveValue )
|
||||||
{
|
{
|
||||||
if ( aControlValue.getValueType().getTypeClass() == TypeClass_VOID )
|
if ( aControlValue.getValueTypeClass() == TypeClass_VOID )
|
||||||
m_xColumnUpdate->updateNull();
|
m_xColumnUpdate->updateNull();
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -216,7 +216,7 @@ Any OCurrencyModel::translateDbColumnToControlValue()
|
|||||||
Any OCurrencyModel::getDefaultForReset() const
|
Any OCurrencyModel::getDefaultForReset() const
|
||||||
{
|
{
|
||||||
Any aValue;
|
Any aValue;
|
||||||
if ( m_aDefault.getValueType().getTypeClass() == TypeClass_DOUBLE )
|
if ( m_aDefault.getValueTypeClass() == TypeClass_DOUBLE )
|
||||||
aValue = m_aDefault;
|
aValue = m_aDefault;
|
||||||
|
|
||||||
return aValue;
|
return aValue;
|
||||||
|
@ -622,7 +622,7 @@ void ODatabaseForm::AppendComponent(HtmlSuccessfulObjList& rList, const Referenc
|
|||||||
// Special treatment for multiline edit only if we have a control for it
|
// Special treatment for multiline edit only if we have a control for it
|
||||||
Any aTmp = xComponentSet->getPropertyValue( PROPERTY_MULTILINE );
|
Any aTmp = xComponentSet->getPropertyValue( PROPERTY_MULTILINE );
|
||||||
bool bMulti = rxSubmitButton.is()
|
bool bMulti = rxSubmitButton.is()
|
||||||
&& (aTmp.getValueType().getTypeClass() == TypeClass_BOOLEAN)
|
&& (aTmp.getValueTypeClass() == TypeClass_BOOLEAN)
|
||||||
&& getBOOL(aTmp);
|
&& getBOOL(aTmp);
|
||||||
OUString sText;
|
OUString sText;
|
||||||
if ( bMulti ) // For multiline edit, get the text at the control
|
if ( bMulti ) // For multiline edit, get the text at the control
|
||||||
@ -1398,7 +1398,7 @@ void ODatabaseForm::fire( sal_Int32* pnHandles, const Any* pNewValues, const Any
|
|||||||
if (pnHandles[nPos] == PROPERTY_ID_ISMODIFIED)
|
if (pnHandles[nPos] == PROPERTY_ID_ISMODIFIED)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if ((nPos < nCount) && (pNewValues[nPos].getValueType().getTypeClass() == TypeClass_BOOLEAN) && getBOOL(pNewValues[nPos]))
|
if ((nPos < nCount) && (pNewValues[nPos].getValueTypeClass() == TypeClass_BOOLEAN) && getBOOL(pNewValues[nPos]))
|
||||||
{ // yeah, we found it, and it changed to TRUE
|
{ // yeah, we found it, and it changed to TRUE
|
||||||
if (nPos == 0)
|
if (nPos == 0)
|
||||||
{ // just cut the first element
|
{ // just cut the first element
|
||||||
|
@ -541,7 +541,7 @@ void OEditModel::read(const Reference<XObjectInputStream>& _rxInStream)
|
|||||||
if (m_xAggregateSet.is())
|
if (m_xAggregateSet.is())
|
||||||
{
|
{
|
||||||
Any aDefaultControl = m_xAggregateSet->getPropertyValue(PROPERTY_DEFAULTCONTROL);
|
Any aDefaultControl = m_xAggregateSet->getPropertyValue(PROPERTY_DEFAULTCONTROL);
|
||||||
if ( (aDefaultControl.getValueType().getTypeClass() == TypeClass_STRING)
|
if ( (aDefaultControl.getValueTypeClass() == TypeClass_STRING)
|
||||||
&& (getString(aDefaultControl) == STARDIV_ONE_FORM_CONTROL_TEXTFIELD )
|
&& (getString(aDefaultControl) == STARDIV_ONE_FORM_CONTROL_TEXTFIELD )
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
@ -96,9 +96,9 @@ void OEditBaseModel::write(const Reference<XObjectOutputStream>& _rxOutStream)
|
|||||||
|
|
||||||
// Masking for any
|
// Masking for any
|
||||||
sal_uInt16 nAnyMask = 0;
|
sal_uInt16 nAnyMask = 0;
|
||||||
if (m_aDefault.getValueType().getTypeClass() == TypeClass_LONG)
|
if (m_aDefault.getValueTypeClass() == TypeClass_LONG)
|
||||||
nAnyMask |= DEFAULT_LONG;
|
nAnyMask |= DEFAULT_LONG;
|
||||||
else if (m_aDefault.getValueType().getTypeClass() == TypeClass_DOUBLE)
|
else if (m_aDefault.getValueTypeClass() == TypeClass_DOUBLE)
|
||||||
nAnyMask |= DEFAULT_DOUBLE;
|
nAnyMask |= DEFAULT_DOUBLE;
|
||||||
else if (m_aDefault.getValueType() == cppu::UnoType<util::Time>::get())
|
else if (m_aDefault.getValueType() == cppu::UnoType<util::Time>::get())
|
||||||
nAnyMask |= DEFAULT_TIME;
|
nAnyMask |= DEFAULT_TIME;
|
||||||
@ -322,16 +322,16 @@ void OEditBaseModel::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const
|
|||||||
switch (nHandle)
|
switch (nHandle)
|
||||||
{
|
{
|
||||||
case PROPERTY_ID_EMPTY_IS_NULL:
|
case PROPERTY_ID_EMPTY_IS_NULL:
|
||||||
DBG_ASSERT(rValue.getValueType().getTypeClass() == TypeClass_BOOLEAN, "invalid type" );
|
DBG_ASSERT(rValue.getValueTypeClass() == TypeClass_BOOLEAN, "invalid type" );
|
||||||
m_bEmptyIsNull = getBOOL(rValue);
|
m_bEmptyIsNull = getBOOL(rValue);
|
||||||
break;
|
break;
|
||||||
case PROPERTY_ID_FILTERPROPOSAL:
|
case PROPERTY_ID_FILTERPROPOSAL:
|
||||||
DBG_ASSERT(rValue.getValueType().getTypeClass() == TypeClass_BOOLEAN, "invalid type" );
|
DBG_ASSERT(rValue.getValueTypeClass() == TypeClass_BOOLEAN, "invalid type" );
|
||||||
m_bFilterProposal = getBOOL(rValue);
|
m_bFilterProposal = getBOOL(rValue);
|
||||||
break;
|
break;
|
||||||
// Changing the default values causes a reset
|
// Changing the default values causes a reset
|
||||||
case PROPERTY_ID_DEFAULT_TEXT:
|
case PROPERTY_ID_DEFAULT_TEXT:
|
||||||
DBG_ASSERT(rValue.getValueType().getTypeClass() == TypeClass_STRING, "invalid type" );
|
DBG_ASSERT(rValue.getValueTypeClass() == TypeClass_STRING, "invalid type" );
|
||||||
rValue >>= m_aDefaultText;
|
rValue >>= m_aDefaultText;
|
||||||
resetNoBroadcast();
|
resetNoBroadcast();
|
||||||
break;
|
break;
|
||||||
|
@ -151,7 +151,7 @@ void OFileControlModel::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle, cons
|
|||||||
switch (nHandle)
|
switch (nHandle)
|
||||||
{
|
{
|
||||||
case PROPERTY_ID_DEFAULT_TEXT :
|
case PROPERTY_ID_DEFAULT_TEXT :
|
||||||
DBG_ASSERT(rValue.getValueType().getTypeClass() == TypeClass_STRING, "OFileControlModel::setFastPropertyValue_NoBroadcast : invalid type !" );
|
DBG_ASSERT(rValue.getValueTypeClass() == TypeClass_STRING, "OFileControlModel::setFastPropertyValue_NoBroadcast : invalid type !" );
|
||||||
rValue >>= m_sDefaultValue;
|
rValue >>= m_sDefaultValue;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -420,7 +420,7 @@ void OFormattedModel::_propertyChanged( const css::beans::PropertyChangeEvent& e
|
|||||||
|
|
||||||
if ( evt.PropertyName == PROPERTY_FORMATKEY )
|
if ( evt.PropertyName == PROPERTY_FORMATKEY )
|
||||||
{
|
{
|
||||||
if ( evt.NewValue.getValueType().getTypeClass() == TypeClass_LONG )
|
if ( evt.NewValue.getValueTypeClass() == TypeClass_LONG )
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@ -634,7 +634,7 @@ void OFormattedModel::write(const Reference<XObjectOutputStream>& _rxOutStream)
|
|||||||
if (m_xAggregateSet.is())
|
if (m_xAggregateSet.is())
|
||||||
{
|
{
|
||||||
Any aSupplier = m_xAggregateSet->getPropertyValue(PROPERTY_FORMATSSUPPLIER);
|
Any aSupplier = m_xAggregateSet->getPropertyValue(PROPERTY_FORMATSSUPPLIER);
|
||||||
if (aSupplier.getValueType().getTypeClass() != TypeClass_VOID)
|
if (aSupplier.getValueTypeClass() != TypeClass_VOID)
|
||||||
{
|
{
|
||||||
OSL_VERIFY( aSupplier >>= xSupplier );
|
OSL_VERIFY( aSupplier >>= xSupplier );
|
||||||
}
|
}
|
||||||
@ -687,7 +687,7 @@ void OFormattedModel::write(const Reference<XObjectOutputStream>& _rxOutStream)
|
|||||||
}
|
}
|
||||||
{
|
{
|
||||||
OStreamSection aDownCompat2(_rxOutStream);
|
OStreamSection aDownCompat2(_rxOutStream);
|
||||||
switch (aEffectiveValue.getValueType().getTypeClass())
|
switch (aEffectiveValue.getValueTypeClass())
|
||||||
{
|
{
|
||||||
case TypeClass_STRING:
|
case TypeClass_STRING:
|
||||||
_rxOutStream->writeShort(0x0000);
|
_rxOutStream->writeShort(0x0000);
|
||||||
@ -809,7 +809,7 @@ bool OFormattedModel::commitControlValueToDbColumn( bool /*_bPostReset*/ )
|
|||||||
|
|
||||||
// empty string + EmptyIsNull = void
|
// empty string + EmptyIsNull = void
|
||||||
if ( !aControlValue.hasValue()
|
if ( !aControlValue.hasValue()
|
||||||
|| ( ( aControlValue.getValueType().getTypeClass() == TypeClass_STRING )
|
|| ( ( aControlValue.getValueTypeClass() == TypeClass_STRING )
|
||||||
&& getString( aControlValue ).isEmpty()
|
&& getString( aControlValue ).isEmpty()
|
||||||
&& m_bEmptyIsNull
|
&& m_bEmptyIsNull
|
||||||
)
|
)
|
||||||
@ -820,13 +820,13 @@ bool OFormattedModel::commitControlValueToDbColumn( bool /*_bPostReset*/ )
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
double f = 0.0;
|
double f = 0.0;
|
||||||
if ( aControlValue.getValueType().getTypeClass() == TypeClass_DOUBLE || (aControlValue >>= f)) // #i110323
|
if ( aControlValue.getValueTypeClass() == TypeClass_DOUBLE || (aControlValue >>= f)) // #i110323
|
||||||
{
|
{
|
||||||
DBTypeConversion::setValue( m_xColumnUpdate, m_aNullDate, getDouble( aControlValue ), m_nKeyType );
|
DBTypeConversion::setValue( m_xColumnUpdate, m_aNullDate, getDouble( aControlValue ), m_nKeyType );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
DBG_ASSERT( aControlValue.getValueType().getTypeClass() == TypeClass_STRING, "OFormattedModel::commitControlValueToDbColumn: invalid value type!" );
|
DBG_ASSERT( aControlValue.getValueTypeClass() == TypeClass_STRING, "OFormattedModel::commitControlValueToDbColumn: invalid value type!" );
|
||||||
m_xColumnUpdate->updateString( getString( aControlValue ) );
|
m_xColumnUpdate->updateString( getString( aControlValue ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -512,7 +512,7 @@ sal_Bool OGridControlModel::convertFastPropertyValue( Any& rConvertedValue, Any&
|
|||||||
case PROPERTY_ID_CURSORCOLOR:
|
case PROPERTY_ID_CURSORCOLOR:
|
||||||
if (!rValue.hasValue() || !m_aCursorColor.hasValue())
|
if (!rValue.hasValue() || !m_aCursorColor.hasValue())
|
||||||
{
|
{
|
||||||
if (rValue.hasValue() && (TypeClass_LONG != rValue.getValueType().getTypeClass()))
|
if (rValue.hasValue() && (TypeClass_LONG != rValue.getValueTypeClass()))
|
||||||
{
|
{
|
||||||
throw IllegalArgumentException();
|
throw IllegalArgumentException();
|
||||||
}
|
}
|
||||||
@ -790,15 +790,15 @@ void OGridControlModel::write(const Reference<XObjectOutputStream>& _rxOutStream
|
|||||||
// 4. Attributes
|
// 4. Attributes
|
||||||
// Masking for all 'any' types
|
// Masking for all 'any' types
|
||||||
sal_uInt16 nAnyMask = 0;
|
sal_uInt16 nAnyMask = 0;
|
||||||
if (m_aRowHeight.getValueType().getTypeClass() == TypeClass_LONG)
|
if (m_aRowHeight.getValueTypeClass() == TypeClass_LONG)
|
||||||
nAnyMask |= ROWHEIGHT;
|
nAnyMask |= ROWHEIGHT;
|
||||||
if ( getFont() != getDefaultFont() )
|
if ( getFont() != getDefaultFont() )
|
||||||
nAnyMask |= FONTATTRIBS | FONTSIZE | FONTTYPE | FONTDESCRIPTOR;
|
nAnyMask |= FONTATTRIBS | FONTSIZE | FONTTYPE | FONTDESCRIPTOR;
|
||||||
if (m_aTabStop.getValueType().getTypeClass() == TypeClass_BOOLEAN)
|
if (m_aTabStop.getValueTypeClass() == TypeClass_BOOLEAN)
|
||||||
nAnyMask |= TABSTOP;
|
nAnyMask |= TABSTOP;
|
||||||
if ( hasTextColor() )
|
if ( hasTextColor() )
|
||||||
nAnyMask |= TEXTCOLOR;
|
nAnyMask |= TEXTCOLOR;
|
||||||
if (m_aBackgroundColor.getValueType().getTypeClass() == TypeClass_LONG)
|
if (m_aBackgroundColor.getValueTypeClass() == TypeClass_LONG)
|
||||||
nAnyMask |= BACKGROUNDCOLOR;
|
nAnyMask |= BACKGROUNDCOLOR;
|
||||||
if (!m_bRecordMarker)
|
if (!m_bRecordMarker)
|
||||||
nAnyMask |= RECORDMARKER;
|
nAnyMask |= RECORDMARKER;
|
||||||
|
@ -81,7 +81,7 @@ void OHiddenModel::setFastPropertyValue_NoBroadcast(sal_Int32 _nHandle, const An
|
|||||||
switch (_nHandle)
|
switch (_nHandle)
|
||||||
{
|
{
|
||||||
case PROPERTY_ID_HIDDEN_VALUE :
|
case PROPERTY_ID_HIDDEN_VALUE :
|
||||||
DBG_ASSERT(_rValue.getValueType().getTypeClass() == TypeClass_STRING, "OHiddenModel::setFastPropertyValue_NoBroadcast : invalid type !" );
|
DBG_ASSERT(_rValue.getValueTypeClass() == TypeClass_STRING, "OHiddenModel::setFastPropertyValue_NoBroadcast : invalid type !" );
|
||||||
_rValue >>= m_sHiddenValue;
|
_rValue >>= m_sHiddenValue;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -248,7 +248,7 @@ void OImageControlModel::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle, con
|
|||||||
switch (nHandle)
|
switch (nHandle)
|
||||||
{
|
{
|
||||||
case PROPERTY_ID_READONLY :
|
case PROPERTY_ID_READONLY :
|
||||||
DBG_ASSERT(rValue.getValueType().getTypeClass() == TypeClass_BOOLEAN, "OImageControlModel::setFastPropertyValue_NoBroadcast : invalid type !" );
|
DBG_ASSERT(rValue.getValueTypeClass() == TypeClass_BOOLEAN, "OImageControlModel::setFastPropertyValue_NoBroadcast : invalid type !" );
|
||||||
m_bReadOnly = getBOOL(rValue);
|
m_bReadOnly = getBOOL(rValue);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -299,7 +299,7 @@ namespace frm
|
|||||||
switch (_nHandle)
|
switch (_nHandle)
|
||||||
{
|
{
|
||||||
case PROPERTY_ID_BOUNDCOLUMN :
|
case PROPERTY_ID_BOUNDCOLUMN :
|
||||||
DBG_ASSERT((_rValue.getValueType().getTypeClass() == TypeClass_SHORT) || (_rValue.getValueType().getTypeClass() == TypeClass_VOID),
|
DBG_ASSERT((_rValue.getValueTypeClass() == TypeClass_SHORT) || (_rValue.getValueTypeClass() == TypeClass_VOID),
|
||||||
"OListBoxModel::setFastPropertyValue_NoBroadcast : invalid type !" );
|
"OListBoxModel::setFastPropertyValue_NoBroadcast : invalid type !" );
|
||||||
m_aBoundColumn = _rValue;
|
m_aBoundColumn = _rValue;
|
||||||
break;
|
break;
|
||||||
@ -570,7 +570,7 @@ namespace frm
|
|||||||
|
|
||||||
// Masking for any
|
// Masking for any
|
||||||
sal_uInt16 nAnyMask = 0;
|
sal_uInt16 nAnyMask = 0;
|
||||||
if (m_aBoundColumn.getValueType().getTypeClass() != TypeClass_VOID)
|
if (m_aBoundColumn.getValueTypeClass() != TypeClass_VOID)
|
||||||
nAnyMask |= BOUNDCOLUMN;
|
nAnyMask |= BOUNDCOLUMN;
|
||||||
|
|
||||||
_rxOutStream << nAnyMask;
|
_rxOutStream << nAnyMask;
|
||||||
@ -745,7 +745,7 @@ namespace frm
|
|||||||
}
|
}
|
||||||
|
|
||||||
::std::optional< sal_Int16 > aBoundColumn(std::nullopt);
|
::std::optional< sal_Int16 > aBoundColumn(std::nullopt);
|
||||||
if ( m_aBoundColumn.getValueType().getTypeClass() == TypeClass_SHORT )
|
if ( m_aBoundColumn.getValueTypeClass() == TypeClass_SHORT )
|
||||||
{
|
{
|
||||||
sal_Int16 nBoundColumn( 0 );
|
sal_Int16 nBoundColumn( 0 );
|
||||||
m_aBoundColumn >>= nBoundColumn;
|
m_aBoundColumn >>= nBoundColumn;
|
||||||
|
@ -165,7 +165,7 @@ Any ONumericModel::translateDbColumnToControlValue()
|
|||||||
Any ONumericModel::getDefaultForReset() const
|
Any ONumericModel::getDefaultForReset() const
|
||||||
{
|
{
|
||||||
Any aValue;
|
Any aValue;
|
||||||
if (m_aDefault.getValueType().getTypeClass() == TypeClass_DOUBLE)
|
if (m_aDefault.getValueTypeClass() == TypeClass_DOUBLE)
|
||||||
aValue = m_aDefault;
|
aValue = m_aDefault;
|
||||||
|
|
||||||
return aValue;
|
return aValue;
|
||||||
|
@ -606,17 +606,17 @@ namespace frm
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case PROPERTY_ID_TARGET_URL :
|
case PROPERTY_ID_TARGET_URL :
|
||||||
DBG_ASSERT(rValue.getValueType().getTypeClass() == TypeClass_STRING, "OClickableImageBaseModel::setFastPropertyValue_NoBroadcast : invalid type !" );
|
DBG_ASSERT(rValue.getValueTypeClass() == TypeClass_STRING, "OClickableImageBaseModel::setFastPropertyValue_NoBroadcast : invalid type !" );
|
||||||
rValue >>= m_sTargetURL;
|
rValue >>= m_sTargetURL;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PROPERTY_ID_TARGET_FRAME :
|
case PROPERTY_ID_TARGET_FRAME :
|
||||||
DBG_ASSERT(rValue.getValueType().getTypeClass() == TypeClass_STRING, "OClickableImageBaseModel::setFastPropertyValue_NoBroadcast : invalid type !" );
|
DBG_ASSERT(rValue.getValueTypeClass() == TypeClass_STRING, "OClickableImageBaseModel::setFastPropertyValue_NoBroadcast : invalid type !" );
|
||||||
rValue >>= m_sTargetFrame;
|
rValue >>= m_sTargetFrame;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PROPERTY_ID_DISPATCHURLINTERNAL:
|
case PROPERTY_ID_DISPATCHURLINTERNAL:
|
||||||
DBG_ASSERT(rValue.getValueType().getTypeClass() == TypeClass_BOOLEAN, "OClickableImageBaseModel::setFastPropertyValue_NoBroadcast : invalid type !" );
|
DBG_ASSERT(rValue.getValueTypeClass() == TypeClass_BOOLEAN, "OClickableImageBaseModel::setFastPropertyValue_NoBroadcast : invalid type !" );
|
||||||
rValue >>= m_bDispatchUrlInternal;
|
rValue >>= m_bDispatchUrlInternal;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -1097,7 +1097,7 @@ void SAL_CALL OInterfaceContainer::replaceByName(const OUString& Name, const Any
|
|||||||
if (aPair.first == aPair.second)
|
if (aPair.first == aPair.second)
|
||||||
throw NoSuchElementException();
|
throw NoSuchElementException();
|
||||||
|
|
||||||
if (Element.getValueType().getTypeClass() != TypeClass_INTERFACE)
|
if (Element.getValueTypeClass() != TypeClass_INTERFACE)
|
||||||
throw IllegalArgumentException();
|
throw IllegalArgumentException();
|
||||||
|
|
||||||
Reference<XPropertySet> xSet;
|
Reference<XPropertySet> xSet;
|
||||||
|
@ -279,7 +279,7 @@ void DispatchRecorder::AppendToBuffer( const css::uno::Any& aValue, OUStringBuff
|
|||||||
|
|
||||||
if (aValue.getValueTypeClass() == css::uno::TypeClass_ENUM )
|
if (aValue.getValueTypeClass() == css::uno::TypeClass_ENUM )
|
||||||
{
|
{
|
||||||
OUString aName = aValue.getValueType().getTypeName();
|
OUString aName = aValue.getValueTypeName();
|
||||||
aArgumentBuffer.append( aName );
|
aArgumentBuffer.append( aName );
|
||||||
aArgumentBuffer.append(".");
|
aArgumentBuffer.append(".");
|
||||||
}
|
}
|
||||||
|
@ -82,7 +82,7 @@ namespace detail {
|
|||||||
{
|
{
|
||||||
OUString msg =
|
OUString msg =
|
||||||
"Cannot extract ANY { " +
|
"Cannot extract ANY { " +
|
||||||
seq[nArg].getValueType().getTypeName() +
|
seq[nArg].getValueTypeName() +
|
||||||
" } to " +
|
" } to " +
|
||||||
::cppu::UnoType<T>::get().getTypeName() +
|
::cppu::UnoType<T>::get().getTypeName() +
|
||||||
"!";
|
"!";
|
||||||
|
@ -45,7 +45,7 @@ void convertPropertyValue(bool & b, const css::uno::Any & a)
|
|||||||
if( a >>= b )
|
if( a >>= b )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
switch( a.getValueType().getTypeClass() ) {
|
switch( a.getValueTypeClass() ) {
|
||||||
case css::uno::TypeClass_BYTE:
|
case css::uno::TypeClass_BYTE:
|
||||||
b = a.get<sal_Int8>() != 0;
|
b = a.get<sal_Int8>() != 0;
|
||||||
break;
|
break;
|
||||||
@ -85,7 +85,7 @@ void convertPropertyValue(sal_Bool & target, css::uno::Any const & source) {
|
|||||||
inline void SAL_CALL convertPropertyValue( sal_Int64 & i , const css::uno::Any & a )
|
inline void SAL_CALL convertPropertyValue( sal_Int64 & i , const css::uno::Any & a )
|
||||||
{
|
{
|
||||||
if( !(a >>= i) ) {
|
if( !(a >>= i) ) {
|
||||||
switch( a.getValueType().getTypeClass() ) {
|
switch( a.getValueTypeClass() ) {
|
||||||
case css::uno::TypeClass_BOOLEAN:
|
case css::uno::TypeClass_BOOLEAN:
|
||||||
i = static_cast<sal_Int64>(a.get<bool>());
|
i = static_cast<sal_Int64>(a.get<bool>());
|
||||||
break;
|
break;
|
||||||
@ -106,7 +106,7 @@ inline void SAL_CALL convertPropertyValue( sal_Int64 & i , const css::uno::Any
|
|||||||
inline void SAL_CALL convertPropertyValue( sal_uInt64 & i , const css::uno::Any & a )
|
inline void SAL_CALL convertPropertyValue( sal_uInt64 & i , const css::uno::Any & a )
|
||||||
{
|
{
|
||||||
if( !(a >>= i) ) {
|
if( !(a >>= i) ) {
|
||||||
switch( a.getValueType().getTypeClass() ) {
|
switch( a.getValueTypeClass() ) {
|
||||||
case css::uno::TypeClass_BOOLEAN:
|
case css::uno::TypeClass_BOOLEAN:
|
||||||
i = static_cast<sal_uInt64>(a.get<bool>());
|
i = static_cast<sal_uInt64>(a.get<bool>());
|
||||||
break;
|
break;
|
||||||
@ -126,7 +126,7 @@ inline void SAL_CALL convertPropertyValue( sal_uInt64 & i , const css::uno::Any
|
|||||||
inline void SAL_CALL convertPropertyValue( sal_Int32 & i , const css::uno::Any & a )
|
inline void SAL_CALL convertPropertyValue( sal_Int32 & i , const css::uno::Any & a )
|
||||||
{
|
{
|
||||||
if( !(a >>= i) ) {
|
if( !(a >>= i) ) {
|
||||||
switch( a.getValueType().getTypeClass() ) {
|
switch( a.getValueTypeClass() ) {
|
||||||
case css::uno::TypeClass_BOOLEAN:
|
case css::uno::TypeClass_BOOLEAN:
|
||||||
i = static_cast<sal_Int32>(a.get<bool>());
|
i = static_cast<sal_Int32>(a.get<bool>());
|
||||||
break;
|
break;
|
||||||
@ -146,7 +146,7 @@ inline void SAL_CALL convertPropertyValue( sal_Int32 & i , const css::uno::Any
|
|||||||
inline void SAL_CALL convertPropertyValue( sal_uInt32 & i , const css::uno::Any & a )
|
inline void SAL_CALL convertPropertyValue( sal_uInt32 & i , const css::uno::Any & a )
|
||||||
{
|
{
|
||||||
if( !(a >>= i) ) {
|
if( !(a >>= i) ) {
|
||||||
switch( a.getValueType().getTypeClass() ) {
|
switch( a.getValueTypeClass() ) {
|
||||||
case css::uno::TypeClass_BOOLEAN:
|
case css::uno::TypeClass_BOOLEAN:
|
||||||
i = static_cast<sal_uInt32>(a.get<bool>());
|
i = static_cast<sal_uInt32>(a.get<bool>());
|
||||||
break;
|
break;
|
||||||
@ -166,7 +166,7 @@ inline void SAL_CALL convertPropertyValue( sal_uInt32 & i , const css::uno::Any
|
|||||||
inline void SAL_CALL convertPropertyValue( sal_Int16 & i , const css::uno::Any & a )
|
inline void SAL_CALL convertPropertyValue( sal_Int16 & i , const css::uno::Any & a )
|
||||||
{
|
{
|
||||||
if( !(a >>= i) ) {
|
if( !(a >>= i) ) {
|
||||||
switch( a.getValueType().getTypeClass() ) {
|
switch( a.getValueTypeClass() ) {
|
||||||
case css::uno::TypeClass_BOOLEAN:
|
case css::uno::TypeClass_BOOLEAN:
|
||||||
i = static_cast<sal_Int16>(a.get<bool>());
|
i = static_cast<sal_Int16>(a.get<bool>());
|
||||||
break;
|
break;
|
||||||
@ -186,7 +186,7 @@ inline void SAL_CALL convertPropertyValue( sal_Int16 & i , const css::uno::Any
|
|||||||
inline void SAL_CALL convertPropertyValue( sal_uInt16 & i , const css::uno::Any & a )
|
inline void SAL_CALL convertPropertyValue( sal_uInt16 & i , const css::uno::Any & a )
|
||||||
{
|
{
|
||||||
if( !(a >>= i) ) {
|
if( !(a >>= i) ) {
|
||||||
switch( a.getValueType().getTypeClass() ) {
|
switch( a.getValueTypeClass() ) {
|
||||||
case css::uno::TypeClass_BOOLEAN:
|
case css::uno::TypeClass_BOOLEAN:
|
||||||
i = static_cast<sal_uInt16>(a.get<bool>());
|
i = static_cast<sal_uInt16>(a.get<bool>());
|
||||||
break;
|
break;
|
||||||
@ -206,7 +206,7 @@ inline void SAL_CALL convertPropertyValue( sal_uInt16 & i , const css::uno::Any
|
|||||||
inline void SAL_CALL convertPropertyValue( sal_Int8 & i , const css::uno::Any & a )
|
inline void SAL_CALL convertPropertyValue( sal_Int8 & i , const css::uno::Any & a )
|
||||||
{
|
{
|
||||||
if( !(a >>= i) ) {
|
if( !(a >>= i) ) {
|
||||||
switch( a.getValueType().getTypeClass() ) {
|
switch( a.getValueTypeClass() ) {
|
||||||
case css::uno::TypeClass_BOOLEAN:
|
case css::uno::TypeClass_BOOLEAN:
|
||||||
i = static_cast<sal_Int8>(a.get<bool>());
|
i = static_cast<sal_Int8>(a.get<bool>());
|
||||||
break;
|
break;
|
||||||
@ -221,7 +221,7 @@ inline void SAL_CALL convertPropertyValue( float &f , const css::uno::Any &a )
|
|||||||
if( a >>= f )
|
if( a >>= f )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
switch( a.getValueType().getTypeClass() ) {
|
switch( a.getValueTypeClass() ) {
|
||||||
case css::uno::TypeClass_BOOLEAN:
|
case css::uno::TypeClass_BOOLEAN:
|
||||||
f = static_cast<float>(a.get<bool>());
|
f = static_cast<float>(a.get<bool>());
|
||||||
break;
|
break;
|
||||||
@ -257,7 +257,7 @@ inline void SAL_CALL convertPropertyValue( double &d , const css::uno::Any &a )
|
|||||||
if( a >>= d )
|
if( a >>= d )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
switch( a.getValueType().getTypeClass() ) {
|
switch( a.getValueTypeClass() ) {
|
||||||
case css::uno::TypeClass_BOOLEAN:
|
case css::uno::TypeClass_BOOLEAN:
|
||||||
d = static_cast<double>(a.get<bool>());
|
d = static_cast<double>(a.get<bool>());
|
||||||
break;
|
break;
|
||||||
|
@ -37,7 +37,7 @@ void raisePyExceptionWithAny( const css::uno::Any &anyExc )
|
|||||||
PyRef exc = runtime.any2PyObject( anyExc );
|
PyRef exc = runtime.any2PyObject( anyExc );
|
||||||
if( exc.is() )
|
if( exc.is() )
|
||||||
{
|
{
|
||||||
PyRef type( getClass( anyExc.getValueType().getTypeName(),runtime ) );
|
PyRef type( getClass( anyExc.getValueTypeName(),runtime ) );
|
||||||
PyErr_SetObject( type.get(), exc.get());
|
PyErr_SetObject( type.get(), exc.get());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -46,7 +46,7 @@ void raisePyExceptionWithAny( const css::uno::Any &anyExc )
|
|||||||
anyExc >>= e;
|
anyExc >>= e;
|
||||||
|
|
||||||
OUString buf = "Couldn't convert uno exception to a python exception (" +
|
OUString buf = "Couldn't convert uno exception to a python exception (" +
|
||||||
anyExc.getValueType().getTypeName() + ": " + e.Message + ")";
|
anyExc.getValueTypeName() + ": " + e.Message + ")";
|
||||||
PyErr_SetString(
|
PyErr_SetString(
|
||||||
PyExc_SystemError,
|
PyExc_SystemError,
|
||||||
OUStringToOString(buf,RTL_TEXTENCODING_ASCII_US).getStr() );
|
OUStringToOString(buf,RTL_TEXTENCODING_ASCII_US).getStr() );
|
||||||
|
@ -488,13 +488,13 @@ PyRef Runtime::any2PyObject (const Any &a ) const
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
throw RuntimeException( "Any carries enum " + a.getValueType().getTypeName() +
|
throw RuntimeException( "Any carries enum " + a.getValueTypeName() +
|
||||||
" with invalid value " + OUString::number(l) );
|
" with invalid value " + OUString::number(l) );
|
||||||
}
|
}
|
||||||
case css::uno::TypeClass_EXCEPTION:
|
case css::uno::TypeClass_EXCEPTION:
|
||||||
case css::uno::TypeClass_STRUCT:
|
case css::uno::TypeClass_STRUCT:
|
||||||
{
|
{
|
||||||
PyRef excClass = getClass( a.getValueType().getTypeName(), *this );
|
PyRef excClass = getClass( a.getValueTypeName(), *this );
|
||||||
PyRef value = PyUNOStruct_new( a, getImpl()->cargo->xInvocation );
|
PyRef value = PyUNOStruct_new( a, getImpl()->cargo->xInvocation );
|
||||||
PyRef argsTuple( PyTuple_New( 1 ) , SAL_NO_ACQUIRE, NOT_NULL );
|
PyRef argsTuple( PyTuple_New( 1 ) , SAL_NO_ACQUIRE, NOT_NULL );
|
||||||
PyTuple_SetItem( argsTuple.get() , 0 , value.getAcquired() );
|
PyTuple_SetItem( argsTuple.get() , 0 , value.getAcquired() );
|
||||||
@ -502,7 +502,7 @@ PyRef Runtime::any2PyObject (const Any &a ) const
|
|||||||
if( ! ret.is() )
|
if( ! ret.is() )
|
||||||
{
|
{
|
||||||
throw RuntimeException( "Couldn't instantiate python representation of structured UNO type " +
|
throw RuntimeException( "Couldn't instantiate python representation of structured UNO type " +
|
||||||
a.getValueType().getTypeName() );
|
a.getValueTypeName() );
|
||||||
}
|
}
|
||||||
|
|
||||||
if( auto e = o3tl::tryAccess<css::uno::Exception>(a) )
|
if( auto e = o3tl::tryAccess<css::uno::Exception>(a) )
|
||||||
|
@ -73,7 +73,7 @@ static PyObject *PyUNOStruct_repr( PyObject *self )
|
|||||||
PyUNO *me = reinterpret_cast<PyUNO*>( self );
|
PyUNO *me = reinterpret_cast<PyUNO*>( self );
|
||||||
PyObject *ret = nullptr;
|
PyObject *ret = nullptr;
|
||||||
|
|
||||||
if( me->members->wrappedObject.getValueType().getTypeClass()
|
if( me->members->wrappedObject.getValueTypeClass()
|
||||||
== css::uno::TypeClass_EXCEPTION )
|
== css::uno::TypeClass_EXCEPTION )
|
||||||
{
|
{
|
||||||
Reference< XMaterialHolder > rHolder(me->members->xInvocation,UNO_QUERY);
|
Reference< XMaterialHolder > rHolder(me->members->xInvocation,UNO_QUERY);
|
||||||
@ -134,7 +134,7 @@ static PyObject* PyUNOStruct_getattr( PyObject* self, char* name )
|
|||||||
if( strcmp( name, "__class__" ) == 0 )
|
if( strcmp( name, "__class__" ) == 0 )
|
||||||
{
|
{
|
||||||
return getClass(
|
return getClass(
|
||||||
me->members->wrappedObject.getValueType().getTypeName(), runtime ).getAcquired();
|
me->members->wrappedObject.getValueTypeName(), runtime ).getAcquired();
|
||||||
}
|
}
|
||||||
|
|
||||||
PyObject *pRet = PyObject_GenericGetAttr( self, PyUnicode_FromString( name ) );
|
PyObject *pRet = PyObject_GenericGetAttr( self, PyUnicode_FromString( name ) );
|
||||||
|
@ -967,7 +967,7 @@ uno::Any SAL_CALL GeometryHandler::convertToPropertyValue(const OUString & Prope
|
|||||||
// nothing to do, type is already as desired
|
// nothing to do, type is already as desired
|
||||||
return aPropertyValue;
|
return aPropertyValue;
|
||||||
|
|
||||||
if ( _rControlValue.getValueType().getTypeClass() == uno::TypeClass_STRING )
|
if ( _rControlValue.getValueTypeClass() == uno::TypeClass_STRING )
|
||||||
{
|
{
|
||||||
OUString sControlValue;
|
OUString sControlValue;
|
||||||
_rControlValue >>= sControlValue;
|
_rControlValue >>= sControlValue;
|
||||||
|
@ -277,7 +277,7 @@ namespace calc
|
|||||||
if ( aValue.hasValue() )
|
if ( aValue.hasValue() )
|
||||||
checkValueType( aGuard, aValue.getValueType() );
|
checkValueType( aGuard, aValue.getValueType() );
|
||||||
|
|
||||||
switch ( aValue.getValueType().getTypeClass() )
|
switch ( aValue.getValueTypeClass() )
|
||||||
{
|
{
|
||||||
case TypeClass_STRING:
|
case TypeClass_STRING:
|
||||||
{
|
{
|
||||||
|
@ -78,7 +78,7 @@ ScVbaWSFunction::invoke(const OUString& FunctionName, const uno::Sequence< uno::
|
|||||||
{
|
{
|
||||||
for( uno::Any & rArray : asNonConstRange(aParamTemp) )
|
for( uno::Any & rArray : asNonConstRange(aParamTemp) )
|
||||||
{
|
{
|
||||||
switch( rArray.getValueType().getTypeClass() )
|
switch( rArray.getValueTypeClass() )
|
||||||
{
|
{
|
||||||
case uno::TypeClass_BOOLEAN:
|
case uno::TypeClass_BOOLEAN:
|
||||||
lclConvertBooleanToDouble( rArray );
|
lclConvertBooleanToDouble( rArray );
|
||||||
|
@ -1096,7 +1096,7 @@ bool AnimationExporter::exportAnimProperty( SvStream& rStrm, const sal_uInt16 nP
|
|||||||
bool bRet = false;
|
bool bRet = false;
|
||||||
if ( rAny.hasValue() )
|
if ( rAny.hasValue() )
|
||||||
{
|
{
|
||||||
switch( rAny.getValueType().getTypeClass() )
|
switch( rAny.getValueTypeClass() )
|
||||||
{
|
{
|
||||||
case css::uno::TypeClass_UNSIGNED_SHORT :
|
case css::uno::TypeClass_UNSIGNED_SHORT :
|
||||||
case css::uno::TypeClass_SHORT :
|
case css::uno::TypeClass_SHORT :
|
||||||
|
@ -108,7 +108,7 @@ void WriteAnimationProperty(const FSHelperPtr& pFS, const Any& rAny, sal_Int32 n
|
|||||||
sal_Int32 nRgb = {}; // spurious -Werror=maybe-uninitialized
|
sal_Int32 nRgb = {}; // spurious -Werror=maybe-uninitialized
|
||||||
double fDouble = {}; // spurious -Werror=maybe-uninitialized
|
double fDouble = {}; // spurious -Werror=maybe-uninitialized
|
||||||
|
|
||||||
TypeClass aClass = rAny.getValueType().getTypeClass();
|
TypeClass aClass = rAny.getValueTypeClass();
|
||||||
bool bWriteToken
|
bool bWriteToken
|
||||||
= nToken
|
= nToken
|
||||||
&& (aClass == TypeClass_LONG || aClass == TypeClass_DOUBLE || aClass == TypeClass_STRING);
|
&& (aClass == TypeClass_LONG || aClass == TypeClass_DOUBLE || aClass == TypeClass_STRING);
|
||||||
@ -116,7 +116,7 @@ void WriteAnimationProperty(const FSHelperPtr& pFS, const Any& rAny, sal_Int32 n
|
|||||||
if (bWriteToken)
|
if (bWriteToken)
|
||||||
pFS->startElementNS(XML_p, nToken);
|
pFS->startElementNS(XML_p, nToken);
|
||||||
|
|
||||||
switch (rAny.getValueType().getTypeClass())
|
switch (rAny.getValueTypeClass())
|
||||||
{
|
{
|
||||||
case TypeClass_LONG:
|
case TypeClass_LONG:
|
||||||
if (!(rAny >>= nRgb))
|
if (!(rAny >>= nRgb))
|
||||||
|
@ -67,7 +67,7 @@ OUString enumValueToEnumName(uno::Any const& aValue,
|
|||||||
uno::UNO_QUERY);
|
uno::UNO_QUERY);
|
||||||
|
|
||||||
uno::Reference<reflection::XEnumTypeDescription> xTypeDescription;
|
uno::Reference<reflection::XEnumTypeDescription> xTypeDescription;
|
||||||
xTypeDescription.set(xManager->getByHierarchicalName(aValue.getValueType().getTypeName()),
|
xTypeDescription.set(xManager->getByHierarchicalName(aValue.getValueTypeName()),
|
||||||
uno::UNO_QUERY);
|
uno::UNO_QUERY);
|
||||||
|
|
||||||
const uno::Sequence<sal_Int32> aValues = xTypeDescription->getEnumValues();
|
const uno::Sequence<sal_Int32> aValues = xTypeDescription->getEnumValues();
|
||||||
@ -300,7 +300,7 @@ OUString convertAnyToShortenedString(const uno::Any& aValue,
|
|||||||
/** converts an any's type to a string (in a short form) */
|
/** converts an any's type to a string (in a short form) */
|
||||||
OUString getAnyType(const uno::Any& aValue)
|
OUString getAnyType(const uno::Any& aValue)
|
||||||
{
|
{
|
||||||
OUString aTypeName = aValue.getValueType().getTypeName();
|
OUString aTypeName = aValue.getValueTypeName();
|
||||||
return aTypeName.replaceAll("com.sun.star", "css");
|
return aTypeName.replaceAll("com.sun.star", "css");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -558,7 +558,7 @@ public:
|
|||||||
{
|
{
|
||||||
if (maAny.hasValue())
|
if (maAny.hasValue())
|
||||||
{
|
{
|
||||||
switch (maAny.getValueType().getTypeClass())
|
switch (maAny.getValueTypeClass())
|
||||||
{
|
{
|
||||||
case uno::TypeClass_INTERFACE:
|
case uno::TypeClass_INTERFACE:
|
||||||
{
|
{
|
||||||
@ -853,8 +853,7 @@ void GenericPropertiesNode::fillChildren(std::unique_ptr<weld::TreeView>& pTree,
|
|||||||
void StructNode::fillChildren(std::unique_ptr<weld::TreeView>& pTree, const weld::TreeIter* pParent)
|
void StructNode::fillChildren(std::unique_ptr<weld::TreeView>& pTree, const weld::TreeIter* pParent)
|
||||||
{
|
{
|
||||||
auto xReflection = reflection::theCoreReflection::get(mxContext);
|
auto xReflection = reflection::theCoreReflection::get(mxContext);
|
||||||
uno::Reference<reflection::XIdlClass> xClass
|
uno::Reference<reflection::XIdlClass> xClass = xReflection->forName(maAny.getValueTypeName());
|
||||||
= xReflection->forName(maAny.getValueType().getTypeName());
|
|
||||||
|
|
||||||
const auto xFields = xClass->getFields();
|
const auto xFields = xClass->getFields();
|
||||||
|
|
||||||
@ -875,7 +874,7 @@ ObjectInspectorNodeInterface* BasicValueNode::createNodeObjectForAny(OUString co
|
|||||||
const uno::Any& rAny,
|
const uno::Any& rAny,
|
||||||
OUString const& rInfo)
|
OUString const& rInfo)
|
||||||
{
|
{
|
||||||
switch (rAny.getValueType().getTypeClass())
|
switch (rAny.getValueTypeClass())
|
||||||
{
|
{
|
||||||
case uno::TypeClass_INTERFACE:
|
case uno::TypeClass_INTERFACE:
|
||||||
return new GenericPropertiesNode(rName, rAny, rInfo, mxContext);
|
return new GenericPropertiesNode(rName, rAny, rInfo, mxContext);
|
||||||
|
@ -329,7 +329,7 @@ EMSCRIPTEN_BINDINGS(PrimaryBindings)
|
|||||||
.constructor(&constructAny)
|
.constructor(&constructAny)
|
||||||
.function("getType", &css::uno::Any::getValueType)
|
.function("getType", &css::uno::Any::getValueType)
|
||||||
.function("get", +[](css::uno::Any const& self) {
|
.function("get", +[](css::uno::Any const& self) {
|
||||||
switch (self.getValueType().getTypeClass())
|
switch (self.getValueTypeClass())
|
||||||
{
|
{
|
||||||
case css::uno::TypeClass_VOID:
|
case css::uno::TypeClass_VOID:
|
||||||
return emscripten::val::undefined();
|
return emscripten::val::undefined();
|
||||||
|
@ -39,7 +39,7 @@ void ArrayIdlClassImpl::realloc( Any & rArray, sal_Int32 nLen )
|
|||||||
if (eTC != TypeClass_SEQUENCE)
|
if (eTC != TypeClass_SEQUENCE)
|
||||||
{
|
{
|
||||||
throw IllegalArgumentException(
|
throw IllegalArgumentException(
|
||||||
"expected sequence, but found " + rArray.getValueType().getTypeName(),
|
"expected sequence, but found " + rArray.getValueTypeName(),
|
||||||
getXWeak(), 0 );
|
getXWeak(), 0 );
|
||||||
}
|
}
|
||||||
if (nLen < 0)
|
if (nLen < 0)
|
||||||
@ -63,7 +63,7 @@ sal_Int32 ArrayIdlClassImpl::getLen( const Any & rArray )
|
|||||||
if (eTC != TypeClass_SEQUENCE)
|
if (eTC != TypeClass_SEQUENCE)
|
||||||
{
|
{
|
||||||
throw IllegalArgumentException(
|
throw IllegalArgumentException(
|
||||||
"expected sequence, but found " + rArray.getValueType().getTypeName(),
|
"expected sequence, but found " + rArray.getValueTypeName(),
|
||||||
getXWeak(), 0 );
|
getXWeak(), 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -76,7 +76,7 @@ Any ArrayIdlClassImpl::get( const Any & rArray, sal_Int32 nIndex )
|
|||||||
if (eTC != TypeClass_SEQUENCE)
|
if (eTC != TypeClass_SEQUENCE)
|
||||||
{
|
{
|
||||||
throw IllegalArgumentException(
|
throw IllegalArgumentException(
|
||||||
"expected sequence, but found " + rArray.getValueType().getTypeName(),
|
"expected sequence, but found " + rArray.getValueTypeName(),
|
||||||
getXWeak(), 0 );
|
getXWeak(), 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -106,7 +106,7 @@ void ArrayIdlClassImpl::set( Any & rArray, sal_Int32 nIndex, const Any & rNewVal
|
|||||||
if (eTC != TypeClass_SEQUENCE)
|
if (eTC != TypeClass_SEQUENCE)
|
||||||
{
|
{
|
||||||
throw IllegalArgumentException(
|
throw IllegalArgumentException(
|
||||||
"expected sequence, but found " + rArray.getValueType().getTypeName(),
|
"expected sequence, but found " + rArray.getValueTypeName(),
|
||||||
getXWeak(), 0 );
|
getXWeak(), 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -136,7 +136,7 @@ Any IdlCompFieldImpl::get( const Any & rObj )
|
|||||||
TYPELIB_DANGER_RELEASE( pObjTD );
|
TYPELIB_DANGER_RELEASE( pObjTD );
|
||||||
}
|
}
|
||||||
throw IllegalArgumentException(
|
throw IllegalArgumentException(
|
||||||
"expected struct or exception, got " + rObj.getValueType().getTypeName(),
|
"expected struct or exception, got " + rObj.getValueTypeName(),
|
||||||
getXWeak(), 0 );
|
getXWeak(), 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -168,7 +168,7 @@ void IdlCompFieldImpl::set( const Any & rObj, const Any & rValue )
|
|||||||
TYPELIB_DANGER_RELEASE( pObjTD );
|
TYPELIB_DANGER_RELEASE( pObjTD );
|
||||||
}
|
}
|
||||||
throw IllegalArgumentException(
|
throw IllegalArgumentException(
|
||||||
"expected struct or exception, got " + rObj.getValueType().getTypeName(),
|
"expected struct or exception, got " + rObj.getValueTypeName(),
|
||||||
getXWeak(), 0 );
|
getXWeak(), 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -201,7 +201,7 @@ void IdlCompFieldImpl::set( Any & rObj, const Any & rValue )
|
|||||||
TYPELIB_DANGER_RELEASE( pObjTD );
|
TYPELIB_DANGER_RELEASE( pObjTD );
|
||||||
}
|
}
|
||||||
throw IllegalArgumentException(
|
throw IllegalArgumentException(
|
||||||
"expected struct or exception, got " + rObj.getValueType().getTypeName(),
|
"expected struct or exception, got " + rObj.getValueTypeName(),
|
||||||
getXWeak(), 0 );
|
getXWeak(), 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -230,7 +230,7 @@ public:
|
|||||||
|
|
||||||
OUString SAL_CALL dumpAny(css::uno::Any const& value) override
|
OUString SAL_CALL dumpAny(css::uno::Any const& value) override
|
||||||
{
|
{
|
||||||
return "[" + value.getValueType().getTypeName() + ": " + dumpValue(value) + "]";
|
return "[" + value.getValueTypeName() + ": " + dumpValue(value) + "]";
|
||||||
}
|
}
|
||||||
|
|
||||||
OUString SAL_CALL dumpConstant(OUString const& constantsGroup,
|
OUString SAL_CALL dumpConstant(OUString const& constantsGroup,
|
||||||
|
@ -1054,8 +1054,8 @@ void SAL_CALL NestedRegistryImpl::initialize( const Sequence< Any >& aArguments
|
|||||||
{
|
{
|
||||||
Guard< Mutex > aGuard( m_mutex );
|
Guard< Mutex > aGuard( m_mutex );
|
||||||
if ( (aArguments.getLength() == 2) &&
|
if ( (aArguments.getLength() == 2) &&
|
||||||
(aArguments[0].getValueType().getTypeClass() == TypeClass_INTERFACE) &&
|
(aArguments[0].getValueTypeClass() == TypeClass_INTERFACE) &&
|
||||||
(aArguments[1].getValueType().getTypeClass() == TypeClass_INTERFACE) )
|
(aArguments[1].getValueTypeClass() == TypeClass_INTERFACE) )
|
||||||
{
|
{
|
||||||
aArguments[0] >>= m_localReg;
|
aArguments[0] >>= m_localReg;
|
||||||
aArguments[1] >>= m_defaultReg;
|
aArguments[1] >>= m_defaultReg;
|
||||||
|
@ -1142,7 +1142,7 @@ Reference< XSimpleRegistry > ImplementationRegistration::getRegistryFromServiceM
|
|||||||
|
|
||||||
Any aAny = xPropSet->getPropertyValue( Registry );
|
Any aAny = xPropSet->getPropertyValue( Registry );
|
||||||
|
|
||||||
if( aAny.getValueType().getTypeClass() == TypeClass_INTERFACE ) {
|
if( aAny.getValueTypeClass() == TypeClass_INTERFACE ) {
|
||||||
aAny >>= xRegistry;
|
aAny >>= xRegistry;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1173,7 +1173,7 @@ void ImplementationRegistration::initialize(
|
|||||||
Reference< XSimpleRegistry > rReg;
|
Reference< XSimpleRegistry > rReg;
|
||||||
|
|
||||||
// 1st argument : An instance of an implementation loader
|
// 1st argument : An instance of an implementation loader
|
||||||
if( aArgs[0].getValueType().getTypeClass() == TypeClass_INTERFACE ) {
|
if( aArgs[0].getValueTypeClass() == TypeClass_INTERFACE ) {
|
||||||
aArgs[0] >>= rLoader;
|
aArgs[0] >>= rLoader;
|
||||||
}
|
}
|
||||||
if( !rLoader.is()) {
|
if( !rLoader.is()) {
|
||||||
@ -1185,7 +1185,7 @@ void ImplementationRegistration::initialize(
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 2nd argument : The service name of the loader. This name is written into the registry
|
// 2nd argument : The service name of the loader. This name is written into the registry
|
||||||
if( aArgs[1].getValueType().getTypeClass() == TypeClass_STRING ) {
|
if( aArgs[1].getValueTypeClass() == TypeClass_STRING ) {
|
||||||
aArgs[1] >>= loaderServiceName;
|
aArgs[1] >>= loaderServiceName;
|
||||||
}
|
}
|
||||||
if( loaderServiceName.isEmpty() ) {
|
if( loaderServiceName.isEmpty() ) {
|
||||||
@ -1196,7 +1196,7 @@ void ImplementationRegistration::initialize(
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 3rd argument : The file name of the dll, that contains the loader
|
// 3rd argument : The file name of the dll, that contains the loader
|
||||||
if( aArgs[2].getValueType().getTypeClass() == TypeClass_STRING ) {
|
if( aArgs[2].getValueTypeClass() == TypeClass_STRING ) {
|
||||||
aArgs[2] >>= locationUrl;
|
aArgs[2] >>= locationUrl;
|
||||||
}
|
}
|
||||||
if( locationUrl.isEmpty() ) {
|
if( locationUrl.isEmpty() ) {
|
||||||
@ -1207,7 +1207,7 @@ void ImplementationRegistration::initialize(
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 4th argument : The registry, the service should be written to
|
// 4th argument : The registry, the service should be written to
|
||||||
if( aArgs[3].getValueType().getTypeClass() == TypeClass_INTERFACE ) {
|
if( aArgs[3].getValueTypeClass() == TypeClass_INTERFACE ) {
|
||||||
aArgs[3] >>= rReg;
|
aArgs[3] >>= rReg;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1342,7 +1342,7 @@ sal_Bool ImplementationRegistration::revokeImplementation(const OUString& locati
|
|||||||
try {
|
try {
|
||||||
Any aAny = xPropSet->getPropertyValue( Registry );
|
Any aAny = xPropSet->getPropertyValue( Registry );
|
||||||
|
|
||||||
if( aAny.getValueType().getTypeClass() == TypeClass_INTERFACE )
|
if( aAny.getValueTypeClass() == TypeClass_INTERFACE )
|
||||||
{
|
{
|
||||||
aAny >>= xRegistry;
|
aAny >>= xRegistry;
|
||||||
}
|
}
|
||||||
|
@ -364,7 +364,7 @@ void IntrospectionAccessStatic_Impl::setPropertyValueByIndex(const Any& obj, sal
|
|||||||
Reference<XInterface> xInterface;
|
Reference<XInterface> xInterface;
|
||||||
if( !(obj >>= xInterface) )
|
if( !(obj >>= xInterface) )
|
||||||
{
|
{
|
||||||
TypeClass eObjType = obj.getValueType().getTypeClass();
|
TypeClass eObjType = obj.getValueTypeClass();
|
||||||
if( nSequenceIndex >= mnPropCount)
|
if( nSequenceIndex >= mnPropCount)
|
||||||
throw IllegalArgumentException(
|
throw IllegalArgumentException(
|
||||||
"IntrospectionAccessStatic_Impl::setPropertyValueByIndex(), index > propertyCount, " +
|
"IntrospectionAccessStatic_Impl::setPropertyValueByIndex(), index > propertyCount, " +
|
||||||
@ -373,7 +373,7 @@ void IntrospectionAccessStatic_Impl::setPropertyValueByIndex(const Any& obj, sal
|
|||||||
if( eObjType != TypeClass_STRUCT && eObjType != TypeClass_EXCEPTION )
|
if( eObjType != TypeClass_STRUCT && eObjType != TypeClass_EXCEPTION )
|
||||||
throw IllegalArgumentException(
|
throw IllegalArgumentException(
|
||||||
"IntrospectionAccessStatic_Impl::setPropertyValueByIndex(), expected struct or exception, got" +
|
"IntrospectionAccessStatic_Impl::setPropertyValueByIndex(), expected struct or exception, got" +
|
||||||
obj.getValueType().getTypeName(), Reference<XInterface>(), 0);
|
obj.getValueTypeName(), Reference<XInterface>(), 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Test flags
|
// Test flags
|
||||||
@ -509,7 +509,7 @@ Any IntrospectionAccessStatic_Impl::getPropertyValueByIndex(const Any& obj, sal_
|
|||||||
Reference<XInterface> xInterface;
|
Reference<XInterface> xInterface;
|
||||||
if( !(obj >>= xInterface) )
|
if( !(obj >>= xInterface) )
|
||||||
{
|
{
|
||||||
TypeClass eObjType = obj.getValueType().getTypeClass();
|
TypeClass eObjType = obj.getValueTypeClass();
|
||||||
if( nSequenceIndex >= mnPropCount || ( eObjType != TypeClass_STRUCT && eObjType != TypeClass_EXCEPTION ) )
|
if( nSequenceIndex >= mnPropCount || ( eObjType != TypeClass_STRUCT && eObjType != TypeClass_EXCEPTION ) )
|
||||||
{
|
{
|
||||||
// throw IllegalArgumentException();
|
// throw IllegalArgumentException();
|
||||||
@ -1547,7 +1547,7 @@ css::uno::Reference<css::beans::XIntrospectionAccess> Implementation::inspect(
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Examine object
|
// Examine object
|
||||||
TypeClass eType = aToInspectObj.getValueType().getTypeClass();
|
TypeClass eType = aToInspectObj.getValueTypeClass();
|
||||||
if( eType != TypeClass_INTERFACE && eType != TypeClass_STRUCT && eType != TypeClass_EXCEPTION )
|
if( eType != TypeClass_INTERFACE && eType != TypeClass_STRUCT && eType != TypeClass_EXCEPTION )
|
||||||
return css::uno::Reference<css::beans::XIntrospectionAccess>();
|
return css::uno::Reference<css::beans::XIntrospectionAccess>();
|
||||||
|
|
||||||
|
@ -99,7 +99,7 @@ void DllComponentLoader::initialize( const css::uno::Sequence< css::uno::Any >&
|
|||||||
|
|
||||||
// Reference< XMultiServiceFactory > rServiceManager;
|
// Reference< XMultiServiceFactory > rServiceManager;
|
||||||
|
|
||||||
// if( aArgs.getConstArray()[0].getValueType().getTypeClass() == TypeClass_INTERFACE )
|
// if( aArgs.getConstArray()[0].getValueTypeClass() == TypeClass_INTERFACE )
|
||||||
// {
|
// {
|
||||||
// aArgs.getConstArray()[0] >>= rServiceManager;
|
// aArgs.getConstArray()[0] >>= rServiceManager;
|
||||||
// }
|
// }
|
||||||
|
@ -1005,7 +1005,7 @@ void OServiceManager::insert( const Any & Element )
|
|||||||
if( Element.getValueTypeClass() != TypeClass_INTERFACE )
|
if( Element.getValueTypeClass() != TypeClass_INTERFACE )
|
||||||
{
|
{
|
||||||
throw IllegalArgumentException(
|
throw IllegalArgumentException(
|
||||||
"exception interface, got " + Element.getValueType().getTypeName(),
|
"exception interface, got " + Element.getValueTypeName(),
|
||||||
Reference< XInterface >(), 0 );
|
Reference< XInterface >(), 0 );
|
||||||
}
|
}
|
||||||
Reference<XInterface > xEle( Element, UNO_QUERY_THROW );
|
Reference<XInterface > xEle( Element, UNO_QUERY_THROW );
|
||||||
@ -1077,7 +1077,7 @@ void OServiceManager::remove( const Any & Element )
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
throw IllegalArgumentException(
|
throw IllegalArgumentException(
|
||||||
"expected interface or string, got " + Element.getValueType().getTypeName(),
|
"expected interface or string, got " + Element.getValueTypeName(),
|
||||||
Reference< XInterface >(), 0 );
|
Reference< XInterface >(), 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -52,7 +52,7 @@ const double MAX_FLOAT = FLT_MAX;
|
|||||||
static void printValue( const Any & rVal )
|
static void printValue( const Any & rVal )
|
||||||
{
|
{
|
||||||
// print value
|
// print value
|
||||||
OString aStr( OUStringToOString( rVal.getValueType().getTypeName(), RTL_TEXTENCODING_ISO_8859_1 ) );
|
OString aStr( OUStringToOString( rVal.getValueTypeName(), RTL_TEXTENCODING_ISO_8859_1 ) );
|
||||||
printf( "(%s)", aStr.getStr() );
|
printf( "(%s)", aStr.getStr() );
|
||||||
|
|
||||||
switch (rVal.getValueTypeClass())
|
switch (rVal.getValueTypeClass())
|
||||||
@ -250,7 +250,7 @@ static sal_Bool convertTo( const Type & rDestType, const Any & rVal, sal_Bool bE
|
|||||||
printf( "# re-conversion of " );
|
printf( "# re-conversion of " );
|
||||||
printValue( aRet );
|
printValue( aRet );
|
||||||
printf( " to " );
|
printf( " to " );
|
||||||
printf( rVal.getValueType().getTypeName().getStr() );
|
printf( rVal.getValueTypeName().getStr() );
|
||||||
printf( " failed! [" );
|
printf( " failed! [" );
|
||||||
printf( aExcMsg.getStr() );
|
printf( aExcMsg.getStr() );
|
||||||
printf( "]\n" );
|
printf( "]\n" );
|
||||||
|
@ -944,7 +944,7 @@ static sal_Bool test_introsp( Reference< XMultiServiceFactory > xMgr,
|
|||||||
OSL_ENSURE( aValStr == aDemandedValStr, aErrorStr.getStr() );
|
OSL_ENSURE( aValStr == aDemandedValStr, aErrorStr.getStr() );
|
||||||
|
|
||||||
// check value and modify it according to its type
|
// check value and modify it according to its type
|
||||||
TypeClass eType = aPropVal.getValueType().getTypeClass();
|
TypeClass eType = aPropVal.getValueTypeClass();
|
||||||
Any aNewVal;
|
Any aNewVal;
|
||||||
sal_Bool bModify = sal_True;
|
sal_Bool bModify = sal_True;
|
||||||
switch( eType )
|
switch( eType )
|
||||||
|
@ -761,7 +761,7 @@ void FmGridHeader::PreExecuteColumnContextMenu(sal_uInt16 nColId, weld::Menu& rM
|
|||||||
xCurCol.set(xCols->getByIndex(i), css::uno::UNO_QUERY);
|
xCurCol.set(xCols->getByIndex(i), css::uno::UNO_QUERY);
|
||||||
DBG_ASSERT(xCurCol.is(), "FmGridHeader::PreExecuteColumnContextMenu : the Peer has invalid columns !");
|
DBG_ASSERT(xCurCol.is(), "FmGridHeader::PreExecuteColumnContextMenu : the Peer has invalid columns !");
|
||||||
aHidden = xCurCol->getPropertyValue(FM_PROP_HIDDEN);
|
aHidden = xCurCol->getPropertyValue(FM_PROP_HIDDEN);
|
||||||
DBG_ASSERT(aHidden.getValueType().getTypeClass() == TypeClass_BOOLEAN,
|
DBG_ASSERT(aHidden.getValueTypeClass() == TypeClass_BOOLEAN,
|
||||||
"FmGridHeader::PreExecuteColumnContextMenu : the property 'hidden' should be boolean !");
|
"FmGridHeader::PreExecuteColumnContextMenu : the property 'hidden' should be boolean !");
|
||||||
if (::comphelper::getBOOL(aHidden))
|
if (::comphelper::getBOOL(aHidden))
|
||||||
{
|
{
|
||||||
@ -1140,7 +1140,7 @@ void FmGridControl::SetDesignMode(bool bMode)
|
|||||||
{
|
{
|
||||||
Any aSelection = xSelSupplier->getSelection();
|
Any aSelection = xSelSupplier->getSelection();
|
||||||
Reference< css::beans::XPropertySet > xColumn;
|
Reference< css::beans::XPropertySet > xColumn;
|
||||||
if (aSelection.getValueType().getTypeClass() == TypeClass_INTERFACE)
|
if (aSelection.getValueTypeClass() == TypeClass_INTERFACE)
|
||||||
xColumn.set(aSelection, css::uno::UNO_QUERY);
|
xColumn.set(aSelection, css::uno::UNO_QUERY);
|
||||||
Reference< XInterface > xCurrent;
|
Reference< XInterface > xCurrent;
|
||||||
for (sal_Int32 i=0; i<xColumns->getCount(); ++i)
|
for (sal_Int32 i=0; i<xColumns->getCount(); ++i)
|
||||||
|
@ -1361,7 +1361,7 @@ void FmXGridPeer::propertyChange(const PropertyChangeEvent& evt)
|
|||||||
else if (evt.PropertyName == FM_PROP_WIDTH)
|
else if (evt.PropertyName == FM_PROP_WIDTH)
|
||||||
{
|
{
|
||||||
sal_Int32 nWidth = 0;
|
sal_Int32 nWidth = 0;
|
||||||
if (evt.NewValue.getValueType().getTypeClass() == TypeClass_VOID)
|
if (evt.NewValue.getValueTypeClass() == TypeClass_VOID)
|
||||||
nWidth = pGrid->GetDefaultColumnWidth(pGrid->GetColumnTitle(nId));
|
nWidth = pGrid->GetDefaultColumnWidth(pGrid->GetColumnTitle(nId));
|
||||||
// GetDefaultColumnWidth already considered the zoom factor
|
// GetDefaultColumnWidth already considered the zoom factor
|
||||||
else
|
else
|
||||||
@ -1386,7 +1386,7 @@ void FmXGridPeer::propertyChange(const PropertyChangeEvent& evt)
|
|||||||
}
|
}
|
||||||
else if (evt.PropertyName == FM_PROP_HIDDEN)
|
else if (evt.PropertyName == FM_PROP_HIDDEN)
|
||||||
{
|
{
|
||||||
DBG_ASSERT(evt.NewValue.getValueType().getTypeClass() == TypeClass_BOOLEAN,
|
DBG_ASSERT(evt.NewValue.getValueTypeClass() == TypeClass_BOOLEAN,
|
||||||
"FmXGridPeer::propertyChange : the property 'hidden' should be of type boolean !");
|
"FmXGridPeer::propertyChange : the property 'hidden' should be of type boolean !");
|
||||||
if (::comphelper::getBOOL(evt.NewValue))
|
if (::comphelper::getBOOL(evt.NewValue))
|
||||||
pGrid->HideColumn(nId);
|
pGrid->HideColumn(nId);
|
||||||
@ -2245,7 +2245,7 @@ void FmXGridPeer::selectionChanged(const EventObject& evt)
|
|||||||
|
|
||||||
Reference< css::view::XSelectionSupplier > xSelSupplier(evt.Source, UNO_QUERY);
|
Reference< css::view::XSelectionSupplier > xSelSupplier(evt.Source, UNO_QUERY);
|
||||||
Any aSelection = xSelSupplier->getSelection();
|
Any aSelection = xSelSupplier->getSelection();
|
||||||
DBG_ASSERT(aSelection.getValueType().getTypeClass() == TypeClass_INTERFACE, "FmXGridPeer::selectionChanged : invalid selection !");
|
DBG_ASSERT(aSelection.getValueTypeClass() == TypeClass_INTERFACE, "FmXGridPeer::selectionChanged : invalid selection !");
|
||||||
Reference< XPropertySet > xSelection;
|
Reference< XPropertySet > xSelection;
|
||||||
aSelection >>= xSelection;
|
aSelection >>= xSelection;
|
||||||
if (xSelection.is())
|
if (xSelection.is())
|
||||||
|
@ -1281,7 +1281,7 @@ void DbFormattedField::Init( BrowserDataWin& rParent, const Reference< XRowSet >
|
|||||||
Any aFmtKey( xUnoModel->getPropertyValue(FM_PROP_FORMATKEY));
|
Any aFmtKey( xUnoModel->getPropertyValue(FM_PROP_FORMATKEY));
|
||||||
if (aFmtKey.hasValue())
|
if (aFmtKey.hasValue())
|
||||||
{
|
{
|
||||||
DBG_ASSERT(aFmtKey.getValueType().getTypeClass() == TypeClass_LONG, "DbFormattedField::Init : invalid format key property (no sal_Int32) !");
|
DBG_ASSERT(aFmtKey.getValueTypeClass() == TypeClass_LONG, "DbFormattedField::Init : invalid format key property (no sal_Int32) !");
|
||||||
nFormatKey = ::comphelper::getINT32(aFmtKey);
|
nFormatKey = ::comphelper::getINT32(aFmtKey);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -1348,9 +1348,9 @@ void DbFormattedField::Init( BrowserDataWin& rParent, const Reference< XRowSet >
|
|||||||
if (::comphelper::hasProperty(FM_PROP_EFFECTIVE_MIN, xUnoModel))
|
if (::comphelper::hasProperty(FM_PROP_EFFECTIVE_MIN, xUnoModel))
|
||||||
{
|
{
|
||||||
Any aMin( xUnoModel->getPropertyValue(FM_PROP_EFFECTIVE_MIN));
|
Any aMin( xUnoModel->getPropertyValue(FM_PROP_EFFECTIVE_MIN));
|
||||||
if (aMin.getValueType().getTypeClass() != TypeClass_VOID)
|
if (aMin.getValueTypeClass() != TypeClass_VOID)
|
||||||
{
|
{
|
||||||
DBG_ASSERT(aMin.getValueType().getTypeClass() == TypeClass_DOUBLE, "DbFormattedField::Init : the model has an invalid min value !");
|
DBG_ASSERT(aMin.getValueTypeClass() == TypeClass_DOUBLE, "DbFormattedField::Init : the model has an invalid min value !");
|
||||||
double dMin = ::comphelper::getDouble(aMin);
|
double dMin = ::comphelper::getDouble(aMin);
|
||||||
rControlFormatter.SetMinValue(dMin);
|
rControlFormatter.SetMinValue(dMin);
|
||||||
rPainterFormatter.SetMinValue(dMin);
|
rPainterFormatter.SetMinValue(dMin);
|
||||||
@ -1366,9 +1366,9 @@ void DbFormattedField::Init( BrowserDataWin& rParent, const Reference< XRowSet >
|
|||||||
if (::comphelper::hasProperty(FM_PROP_EFFECTIVE_MAX, xUnoModel))
|
if (::comphelper::hasProperty(FM_PROP_EFFECTIVE_MAX, xUnoModel))
|
||||||
{
|
{
|
||||||
Any aMax(xUnoModel->getPropertyValue(FM_PROP_EFFECTIVE_MAX));
|
Any aMax(xUnoModel->getPropertyValue(FM_PROP_EFFECTIVE_MAX));
|
||||||
if (aMax.getValueType().getTypeClass() != TypeClass_VOID)
|
if (aMax.getValueTypeClass() != TypeClass_VOID)
|
||||||
{
|
{
|
||||||
DBG_ASSERT(aMax.getValueType().getTypeClass() == TypeClass_DOUBLE, "DbFormattedField::Init : the model has an invalid max value !");
|
DBG_ASSERT(aMax.getValueTypeClass() == TypeClass_DOUBLE, "DbFormattedField::Init : the model has an invalid max value !");
|
||||||
double dMax = ::comphelper::getDouble(aMax);
|
double dMax = ::comphelper::getDouble(aMax);
|
||||||
rControlFormatter.SetMaxValue(dMax);
|
rControlFormatter.SetMaxValue(dMax);
|
||||||
rPainterFormatter.SetMaxValue(dMax);
|
rPainterFormatter.SetMaxValue(dMax);
|
||||||
@ -1386,7 +1386,7 @@ void DbFormattedField::Init( BrowserDataWin& rParent, const Reference< XRowSet >
|
|||||||
Any aDefault( xUnoModel->getPropertyValue(FM_PROP_EFFECTIVE_DEFAULT));
|
Any aDefault( xUnoModel->getPropertyValue(FM_PROP_EFFECTIVE_DEFAULT));
|
||||||
if (aDefault.hasValue())
|
if (aDefault.hasValue())
|
||||||
{ // the thing can be a double or a string
|
{ // the thing can be a double or a string
|
||||||
switch (aDefault.getValueType().getTypeClass())
|
switch (aDefault.getValueTypeClass())
|
||||||
{
|
{
|
||||||
case TypeClass_DOUBLE:
|
case TypeClass_DOUBLE:
|
||||||
if (m_rColumn.IsNumeric())
|
if (m_rColumn.IsNumeric())
|
||||||
@ -2258,7 +2258,7 @@ void DbDateField::implAdjustGenericFieldSetting( const Reference< XPropertySet >
|
|||||||
weld::DateFormatter& rPainterFormatter = static_cast<weld::DateFormatter&>(pPainter->get_formatter());
|
weld::DateFormatter& rPainterFormatter = static_cast<weld::DateFormatter&>(pPainter->get_formatter());
|
||||||
|
|
||||||
Any aCentury = _rxModel->getPropertyValue( FM_PROP_DATE_SHOW_CENTURY );
|
Any aCentury = _rxModel->getPropertyValue( FM_PROP_DATE_SHOW_CENTURY );
|
||||||
if ( aCentury.getValueType().getTypeClass() != TypeClass_VOID )
|
if ( aCentury.getValueTypeClass() != TypeClass_VOID )
|
||||||
{
|
{
|
||||||
bool bShowDateCentury = getBOOL( aCentury );
|
bool bShowDateCentury = getBOOL( aCentury );
|
||||||
|
|
||||||
|
@ -362,7 +362,7 @@ namespace svx
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
switch ( _rUnoState.getValueType().getTypeClass() )
|
switch ( _rUnoState.getValueTypeClass() )
|
||||||
{
|
{
|
||||||
case TypeClass_BOOLEAN:
|
case TypeClass_BOOLEAN:
|
||||||
{
|
{
|
||||||
|
@ -1040,7 +1040,7 @@ void SwXStyleFamily::insertByName(const OUString& rName, const uno::Any& rElemen
|
|||||||
SfxStyleSheetBase* pBase = m_pBasePool->Find(sStyleName, m_rEntry.family());
|
SfxStyleSheetBase* pBase = m_pBasePool->Find(sStyleName, m_rEntry.family());
|
||||||
if (pBase)
|
if (pBase)
|
||||||
throw container::ElementExistException();
|
throw container::ElementExistException();
|
||||||
if(rElement.getValueType().getTypeClass() != uno::TypeClass_INTERFACE)
|
if(rElement.getValueTypeClass() != uno::TypeClass_INTERFACE)
|
||||||
throw lang::IllegalArgumentException();
|
throw lang::IllegalArgumentException();
|
||||||
if (SwGetPoolIdFromName::CellStyle == m_rEntry.poolId())
|
if (SwGetPoolIdFromName::CellStyle == m_rEntry.poolId())
|
||||||
{
|
{
|
||||||
|
@ -972,7 +972,7 @@ Sequence< beans::PropertyValue > SwXTextDocument::getPagePrintSettings()
|
|||||||
static sal_uInt32 lcl_Any_To_ULONG(const Any& rValue, bool& bException)
|
static sal_uInt32 lcl_Any_To_ULONG(const Any& rValue, bool& bException)
|
||||||
{
|
{
|
||||||
bException = false;
|
bException = false;
|
||||||
TypeClass eType = rValue.getValueType().getTypeClass();
|
TypeClass eType = rValue.getValueTypeClass();
|
||||||
|
|
||||||
sal_uInt32 nRet = 0;
|
sal_uInt32 nRet = 0;
|
||||||
if( eType == TypeClass_UNSIGNED_LONG )
|
if( eType == TypeClass_UNSIGNED_LONG )
|
||||||
|
@ -232,20 +232,20 @@ bool testAny(
|
|||||||
fprintf(
|
fprintf(
|
||||||
stderr, "any is different after roundtrip: in %s, out %s\n",
|
stderr, "any is different after roundtrip: in %s, out %s\n",
|
||||||
OUStringToOString(
|
OUStringToOString(
|
||||||
any.getValueType().getTypeName(),
|
any.getValueTypeName(),
|
||||||
RTL_TEXTENCODING_ASCII_US).getStr(),
|
RTL_TEXTENCODING_ASCII_US).getStr(),
|
||||||
OUStringToOString(
|
OUStringToOString(
|
||||||
any2.getValueType().getTypeName(),
|
any2.getValueTypeName(),
|
||||||
RTL_TEXTENCODING_ASCII_US).getStr());
|
RTL_TEXTENCODING_ASCII_US).getStr());
|
||||||
success = false;
|
success = false;
|
||||||
}
|
}
|
||||||
if (typeName != nullptr
|
if (typeName != nullptr
|
||||||
&& !any2.getValueType().getTypeName().equalsAscii(typeName))
|
&& !any2.getValueTypeName().equalsAscii(typeName))
|
||||||
{
|
{
|
||||||
fprintf(
|
fprintf(
|
||||||
stderr, "any has wrong type after roundtrip: %s instead of %s\n",
|
stderr, "any has wrong type after roundtrip: %s instead of %s\n",
|
||||||
OUStringToOString(
|
OUStringToOString(
|
||||||
any2.getValueType().getTypeName(),
|
any2.getValueTypeName(),
|
||||||
RTL_TEXTENCODING_ASCII_US).getStr(),
|
RTL_TEXTENCODING_ASCII_US).getStr(),
|
||||||
typeName);
|
typeName);
|
||||||
success = false;
|
success = false;
|
||||||
|
@ -126,7 +126,7 @@ void VCLXContainer::setTabOrder( const css::uno::Sequence< css::uno::Reference<
|
|||||||
|
|
||||||
WinBits nStyle = pWin->GetStyle();
|
WinBits nStyle = pWin->GetStyle();
|
||||||
nStyle &= ~(WB_TABSTOP|WB_NOTABSTOP|WB_GROUP);
|
nStyle &= ~(WB_TABSTOP|WB_NOTABSTOP|WB_GROUP);
|
||||||
if ( pTabs[n].getValueType().getTypeClass() == css::uno::TypeClass_BOOLEAN )
|
if ( pTabs[n].getValueTypeClass() == css::uno::TypeClass_BOOLEAN )
|
||||||
{
|
{
|
||||||
bool bTab = false;
|
bool bTab = false;
|
||||||
pTabs[n] >>= bTab;
|
pTabs[n] >>= bTab;
|
||||||
|
@ -1403,7 +1403,7 @@ void VCLXWindow::setProperty( const OUString& PropertyName, const css::uno::Any&
|
|||||||
if ( !pWindow )
|
if ( !pWindow )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
bool bVoid = Value.getValueType().getTypeClass() == css::uno::TypeClass_VOID;
|
bool bVoid = Value.getValueTypeClass() == css::uno::TypeClass_VOID;
|
||||||
|
|
||||||
WindowType eWinType = pWindow->GetType();
|
WindowType eWinType = pWindow->GetType();
|
||||||
sal_uInt16 nPropType = GetPropertyId( PropertyName );
|
sal_uInt16 nPropType = GetPropertyId( PropertyName );
|
||||||
|
@ -1865,7 +1865,7 @@ void VCLXListBox::setProperty( const OUString& PropertyName, const css::uno::Any
|
|||||||
case BASEPROPERTY_HIGHLIGHT_COLOR:
|
case BASEPROPERTY_HIGHLIGHT_COLOR:
|
||||||
{
|
{
|
||||||
Color nColor = 0;
|
Color nColor = 0;
|
||||||
bool bVoid = Value.getValueType().getTypeClass() == css::uno::TypeClass_VOID;
|
bool bVoid = Value.getValueTypeClass() == css::uno::TypeClass_VOID;
|
||||||
if (bVoid)
|
if (bVoid)
|
||||||
{
|
{
|
||||||
nColor = Application::GetSettings().GetStyleSettings().GetHighlightColor();
|
nColor = Application::GetSettings().GetStyleSettings().GetHighlightColor();
|
||||||
@ -1881,7 +1881,7 @@ void VCLXListBox::setProperty( const OUString& PropertyName, const css::uno::Any
|
|||||||
case BASEPROPERTY_HIGHLIGHT_TEXT_COLOR:
|
case BASEPROPERTY_HIGHLIGHT_TEXT_COLOR:
|
||||||
{
|
{
|
||||||
Color nColor = 0;
|
Color nColor = 0;
|
||||||
bool bVoid = Value.getValueType().getTypeClass() == css::uno::TypeClass_VOID;
|
bool bVoid = Value.getValueTypeClass() == css::uno::TypeClass_VOID;
|
||||||
if (bVoid)
|
if (bVoid)
|
||||||
{
|
{
|
||||||
nColor = Application::GetSettings().GetStyleSettings().GetHighlightTextColor();
|
nColor = Application::GetSettings().GetStyleSettings().GetHighlightTextColor();
|
||||||
@ -2335,7 +2335,7 @@ void SAL_CALL VCLXDialog::setProperty(
|
|||||||
if ( !pDialog )
|
if ( !pDialog )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
bool bVoid = Value.getValueType().getTypeClass() == css::uno::TypeClass_VOID;
|
bool bVoid = Value.getValueTypeClass() == css::uno::TypeClass_VOID;
|
||||||
|
|
||||||
sal_uInt16 nPropType = GetPropertyId( PropertyName );
|
sal_uInt16 nPropType = GetPropertyId( PropertyName );
|
||||||
switch ( nPropType )
|
switch ( nPropType )
|
||||||
@ -2459,7 +2459,7 @@ void SAL_CALL VCLXMultiPage::setProperty(
|
|||||||
if ( !pTabControl )
|
if ( !pTabControl )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
bool bVoid = Value.getValueType().getTypeClass() == css::uno::TypeClass_VOID;
|
bool bVoid = Value.getValueTypeClass() == css::uno::TypeClass_VOID;
|
||||||
|
|
||||||
sal_uInt16 nPropType = GetPropertyId( PropertyName );
|
sal_uInt16 nPropType = GetPropertyId( PropertyName );
|
||||||
switch ( nPropType )
|
switch ( nPropType )
|
||||||
@ -2680,7 +2680,7 @@ void SAL_CALL VCLXTabPage::setProperty(
|
|||||||
if ( !pTabPage )
|
if ( !pTabPage )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
bool bVoid = Value.getValueType().getTypeClass() == css::uno::TypeClass_VOID;
|
bool bVoid = Value.getValueTypeClass() == css::uno::TypeClass_VOID;
|
||||||
|
|
||||||
sal_uInt16 nPropType = GetPropertyId( PropertyName );
|
sal_uInt16 nPropType = GetPropertyId( PropertyName );
|
||||||
switch ( nPropType )
|
switch ( nPropType )
|
||||||
@ -3344,7 +3344,7 @@ void VCLXScrollBar::setProperty( const OUString& PropertyName, const css::uno::A
|
|||||||
if ( !pScrollBar )
|
if ( !pScrollBar )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
bool bVoid = Value.getValueType().getTypeClass() == css::uno::TypeClass_VOID;
|
bool bVoid = Value.getValueTypeClass() == css::uno::TypeClass_VOID;
|
||||||
|
|
||||||
sal_uInt16 nPropType = GetPropertyId( PropertyName );
|
sal_uInt16 nPropType = GetPropertyId( PropertyName );
|
||||||
switch ( nPropType )
|
switch ( nPropType )
|
||||||
@ -4141,7 +4141,7 @@ void VCLXComboBox::setProperty( const OUString& PropertyName, const css::uno::An
|
|||||||
if ( !pComboBox )
|
if ( !pComboBox )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
bool bVoid = Value.getValueType().getTypeClass() == css::uno::TypeClass_VOID;
|
bool bVoid = Value.getValueTypeClass() == css::uno::TypeClass_VOID;
|
||||||
sal_uInt16 nPropType = GetPropertyId( PropertyName );
|
sal_uInt16 nPropType = GetPropertyId( PropertyName );
|
||||||
switch ( nPropType )
|
switch ( nPropType )
|
||||||
{
|
{
|
||||||
@ -4639,7 +4639,7 @@ void VCLXDateField::setProperty( const OUString& PropertyName, const css::uno::A
|
|||||||
if ( !(GetWindow()) )
|
if ( !(GetWindow()) )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
bool bVoid = Value.getValueType().getTypeClass() == css::uno::TypeClass_VOID;
|
bool bVoid = Value.getValueTypeClass() == css::uno::TypeClass_VOID;
|
||||||
|
|
||||||
sal_uInt16 nPropType = GetPropertyId( PropertyName );
|
sal_uInt16 nPropType = GetPropertyId( PropertyName );
|
||||||
switch ( nPropType )
|
switch ( nPropType )
|
||||||
@ -5109,7 +5109,7 @@ void VCLXTimeField::setProperty( const OUString& PropertyName, const css::uno::A
|
|||||||
if ( !(GetWindow()) )
|
if ( !(GetWindow()) )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
bool bVoid = Value.getValueType().getTypeClass() == css::uno::TypeClass_VOID;
|
bool bVoid = Value.getValueTypeClass() == css::uno::TypeClass_VOID;
|
||||||
|
|
||||||
sal_uInt16 nPropType = GetPropertyId( PropertyName );
|
sal_uInt16 nPropType = GetPropertyId( PropertyName );
|
||||||
switch ( nPropType )
|
switch ( nPropType )
|
||||||
@ -5425,7 +5425,7 @@ void VCLXNumericField::setProperty( const OUString& PropertyName, const css::uno
|
|||||||
if ( !(GetWindow()) )
|
if ( !(GetWindow()) )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
bool bVoid = Value.getValueType().getTypeClass() == css::uno::TypeClass_VOID;
|
bool bVoid = Value.getValueTypeClass() == css::uno::TypeClass_VOID;
|
||||||
|
|
||||||
sal_uInt16 nPropType = GetPropertyId( PropertyName );
|
sal_uInt16 nPropType = GetPropertyId( PropertyName );
|
||||||
switch ( nPropType )
|
switch ( nPropType )
|
||||||
@ -6183,7 +6183,7 @@ void VCLXProgressBar::setProperty( const OUString& PropertyName, const css::uno:
|
|||||||
VclPtr<vcl::Window> pWindow = GetWindow();
|
VclPtr<vcl::Window> pWindow = GetWindow();
|
||||||
if ( pWindow )
|
if ( pWindow )
|
||||||
{
|
{
|
||||||
bool bVoid = Value.getValueType().getTypeClass() == css::uno::TypeClass_VOID;
|
bool bVoid = Value.getValueTypeClass() == css::uno::TypeClass_VOID;
|
||||||
|
|
||||||
if ( bVoid )
|
if ( bVoid )
|
||||||
{
|
{
|
||||||
@ -6596,7 +6596,7 @@ void SVTXFormattedField::setProperty( const OUString& PropertyName, const css::u
|
|||||||
case BASEPROPERTY_EFFECTIVE_VALUE:
|
case BASEPROPERTY_EFFECTIVE_VALUE:
|
||||||
case BASEPROPERTY_VALUE_DOUBLE:
|
case BASEPROPERTY_VALUE_DOUBLE:
|
||||||
{
|
{
|
||||||
const css::uno::TypeClass rTC = Value.getValueType().getTypeClass();
|
const css::uno::TypeClass rTC = Value.getValueTypeClass();
|
||||||
if (rTC != css::uno::TypeClass_STRING)
|
if (rTC != css::uno::TypeClass_STRING)
|
||||||
// no string
|
// no string
|
||||||
if (rTC != css::uno::TypeClass_DOUBLE)
|
if (rTC != css::uno::TypeClass_DOUBLE)
|
||||||
@ -6733,7 +6733,7 @@ css::uno::Any SVTXFormattedField::convertEffectiveValue(const css::uno::Any& rVa
|
|||||||
return aReturn;
|
return aReturn;
|
||||||
|
|
||||||
Formatter& rFieldFormatter = pField->GetFormatter();
|
Formatter& rFieldFormatter = pField->GetFormatter();
|
||||||
switch (rValue.getValueType().getTypeClass())
|
switch (rValue.getValueTypeClass())
|
||||||
{
|
{
|
||||||
case css::uno::TypeClass_DOUBLE:
|
case css::uno::TypeClass_DOUBLE:
|
||||||
if (rFieldFormatter.TreatingAsNumber())
|
if (rFieldFormatter.TreatingAsNumber())
|
||||||
@ -6791,7 +6791,7 @@ void SVTXFormattedField::SetMinValue(const css::uno::Any& rValue)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
Formatter& rFormatter = pField->GetFormatter();
|
Formatter& rFormatter = pField->GetFormatter();
|
||||||
switch (rValue.getValueType().getTypeClass())
|
switch (rValue.getValueTypeClass())
|
||||||
|
|
||||||
{
|
{
|
||||||
case css::uno::TypeClass_DOUBLE:
|
case css::uno::TypeClass_DOUBLE:
|
||||||
@ -6802,8 +6802,8 @@ void SVTXFormattedField::SetMinValue(const css::uno::Any& rValue)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
DBG_ASSERT(rValue.getValueType().getTypeClass() == css::uno::TypeClass_VOID, "SVTXFormattedField::SetMinValue : invalid argument (an exception will be thrown) !");
|
DBG_ASSERT(rValue.getValueTypeClass() == css::uno::TypeClass_VOID, "SVTXFormattedField::SetMinValue : invalid argument (an exception will be thrown) !");
|
||||||
if ( rValue.getValueType().getTypeClass() != css::uno::TypeClass_VOID )
|
if ( rValue.getValueTypeClass() != css::uno::TypeClass_VOID )
|
||||||
|
|
||||||
{
|
{
|
||||||
throw css::lang::IllegalArgumentException();
|
throw css::lang::IllegalArgumentException();
|
||||||
@ -6834,7 +6834,7 @@ void SVTXFormattedField::SetMaxValue(const css::uno::Any& rValue)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
Formatter& rFormatter = pField->GetFormatter();
|
Formatter& rFormatter = pField->GetFormatter();
|
||||||
switch (rValue.getValueType().getTypeClass())
|
switch (rValue.getValueTypeClass())
|
||||||
{
|
{
|
||||||
case css::uno::TypeClass_DOUBLE:
|
case css::uno::TypeClass_DOUBLE:
|
||||||
{
|
{
|
||||||
@ -6844,7 +6844,7 @@ void SVTXFormattedField::SetMaxValue(const css::uno::Any& rValue)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
if (rValue.getValueType().getTypeClass() != css::uno::TypeClass_VOID)
|
if (rValue.getValueTypeClass() != css::uno::TypeClass_VOID)
|
||||||
|
|
||||||
{
|
{
|
||||||
throw css::lang::IllegalArgumentException();
|
throw css::lang::IllegalArgumentException();
|
||||||
@ -6877,7 +6877,7 @@ void SVTXFormattedField::SetDefaultValue(const css::uno::Any& rValue)
|
|||||||
css::uno::Any aConverted = convertEffectiveValue(rValue);
|
css::uno::Any aConverted = convertEffectiveValue(rValue);
|
||||||
|
|
||||||
Formatter& rFormatter = pField->GetFormatter();
|
Formatter& rFormatter = pField->GetFormatter();
|
||||||
switch (aConverted.getValueType().getTypeClass())
|
switch (aConverted.getValueTypeClass())
|
||||||
{
|
{
|
||||||
case css::uno::TypeClass_DOUBLE:
|
case css::uno::TypeClass_DOUBLE:
|
||||||
{
|
{
|
||||||
@ -6968,7 +6968,7 @@ void SVTXFormattedField::SetValue(const css::uno::Any& rValue)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
Formatter& rFormatter = pField->GetFormatter();
|
Formatter& rFormatter = pField->GetFormatter();
|
||||||
if (rValue.getValueType().getTypeClass() == css::uno::TypeClass_DOUBLE )
|
if (rValue.getValueTypeClass() == css::uno::TypeClass_DOUBLE )
|
||||||
{
|
{
|
||||||
double d = 0.0;
|
double d = 0.0;
|
||||||
rValue >>= d;
|
rValue >>= d;
|
||||||
@ -6976,7 +6976,7 @@ void SVTXFormattedField::SetValue(const css::uno::Any& rValue)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
DBG_ASSERT(rValue.getValueType().getTypeClass() == css::uno::TypeClass_STRING, "SVTXFormattedField::SetValue : invalid argument !");
|
DBG_ASSERT(rValue.getValueTypeClass() == css::uno::TypeClass_STRING, "SVTXFormattedField::SetValue : invalid argument !");
|
||||||
|
|
||||||
OUString sText;
|
OUString sText;
|
||||||
rValue >>= sText;
|
rValue >>= sText;
|
||||||
|
@ -549,7 +549,7 @@ void UnoControlModel::write( const css::uno::Reference< css::io::XObjectOutputSt
|
|||||||
const css::uno::Any* pProp = &(maData[rProp]);
|
const css::uno::Any* pProp = &(maData[rProp]);
|
||||||
OutStream->writeShort( rProp );
|
OutStream->writeShort( rProp );
|
||||||
|
|
||||||
bool bVoid = pProp->getValueType().getTypeClass() == css::uno::TypeClass_VOID;
|
bool bVoid = pProp->getValueTypeClass() == css::uno::TypeClass_VOID;
|
||||||
|
|
||||||
OutStream->writeBoolean( bVoid );
|
OutStream->writeBoolean( bVoid );
|
||||||
|
|
||||||
@ -1030,7 +1030,7 @@ css::uno::Sequence< OUString > UnoControlModel::getSupportedServiceNames( )
|
|||||||
|
|
||||||
bool UnoControlModel::convertFastPropertyValue( std::unique_lock<std::mutex>& rGuard, Any & rConvertedValue, Any & rOldValue, sal_Int32 nPropId, const Any& rValue )
|
bool UnoControlModel::convertFastPropertyValue( std::unique_lock<std::mutex>& rGuard, Any & rConvertedValue, Any & rOldValue, sal_Int32 nPropId, const Any& rValue )
|
||||||
{
|
{
|
||||||
bool bVoid = rValue.getValueType().getTypeClass() == css::uno::TypeClass_VOID;
|
bool bVoid = rValue.getValueTypeClass() == css::uno::TypeClass_VOID;
|
||||||
if ( bVoid )
|
if ( bVoid )
|
||||||
{
|
{
|
||||||
rConvertedValue.clear();
|
rConvertedValue.clear();
|
||||||
@ -1105,7 +1105,7 @@ bool UnoControlModel::convertFastPropertyValue( std::unique_lock<std::mutex>& rG
|
|||||||
break;
|
break;
|
||||||
case TypeClass_INTERFACE:
|
case TypeClass_INTERFACE:
|
||||||
{
|
{
|
||||||
if ( rValue.getValueType().getTypeClass() == TypeClass_INTERFACE )
|
if ( rValue.getValueTypeClass() == TypeClass_INTERFACE )
|
||||||
{
|
{
|
||||||
Reference< XInterface > xPure( rValue, UNO_QUERY );
|
Reference< XInterface > xPure( rValue, UNO_QUERY );
|
||||||
if ( xPure.is() )
|
if ( xPure.is() )
|
||||||
@ -1133,7 +1133,7 @@ bool UnoControlModel::convertFastPropertyValue( std::unique_lock<std::mutex>& rG
|
|||||||
"Unable to convert the given value for the property "
|
"Unable to convert the given value for the property "
|
||||||
+ GetPropertyName( static_cast<sal_uInt16>(nPropId) )
|
+ GetPropertyName( static_cast<sal_uInt16>(nPropId) )
|
||||||
+ ".\nExpected type: " + pDestType->getTypeName()
|
+ ".\nExpected type: " + pDestType->getTypeName()
|
||||||
+ "\nFound type: " + rValue.getValueType().getTypeName(),
|
+ "\nFound type: " + rValue.getValueTypeName(),
|
||||||
static_cast< css::beans::XPropertySet* >(this),
|
static_cast< css::beans::XPropertySet* >(this),
|
||||||
1);
|
1);
|
||||||
}
|
}
|
||||||
@ -1154,7 +1154,7 @@ void UnoControlModel::setFastPropertyValue_NoBroadcast( std::unique_lock<std::mu
|
|||||||
const css::uno::Any* pProp = it == maData.end() ? nullptr : &(it->second);
|
const css::uno::Any* pProp = it == maData.end() ? nullptr : &(it->second);
|
||||||
ENSURE_OR_RETURN_VOID( pProp, "UnoControlModel::setFastPropertyValue_NoBroadcast: invalid property id!" );
|
ENSURE_OR_RETURN_VOID( pProp, "UnoControlModel::setFastPropertyValue_NoBroadcast: invalid property id!" );
|
||||||
|
|
||||||
DBG_ASSERT( ( rValue.getValueType().getTypeClass() != css::uno::TypeClass_VOID ) || ( GetPropertyAttribs( static_cast<sal_uInt16>(nPropId) ) & css::beans::PropertyAttribute::MAYBEVOID ), "Property should not be VOID!" );
|
DBG_ASSERT( ( rValue.getValueTypeClass() != css::uno::TypeClass_VOID ) || ( GetPropertyAttribs( static_cast<sal_uInt16>(nPropId) ) & css::beans::PropertyAttribute::MAYBEVOID ), "Property should not be VOID!" );
|
||||||
maData[ nPropId ] = rValue;
|
maData[ nPropId ] = rValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -444,7 +444,7 @@ void WaitUntilPreviewIsClosed( SfxViewFrame* pViewFrame )
|
|||||||
|
|
||||||
bool extractBoolFromAny( const uno::Any& rAny )
|
bool extractBoolFromAny( const uno::Any& rAny )
|
||||||
{
|
{
|
||||||
switch( rAny.getValueType().getTypeClass() )
|
switch( rAny.getValueTypeClass() )
|
||||||
{
|
{
|
||||||
case uno::TypeClass_BOOLEAN:
|
case uno::TypeClass_BOOLEAN:
|
||||||
return rAny.get< bool >();
|
return rAny.get< bool >();
|
||||||
@ -465,7 +465,7 @@ bool extractBoolFromAny( const uno::Any& rAny )
|
|||||||
|
|
||||||
OUString extractStringFromAny( const uno::Any& rAny, bool bUppercaseBool )
|
OUString extractStringFromAny( const uno::Any& rAny, bool bUppercaseBool )
|
||||||
{
|
{
|
||||||
switch( rAny.getValueType().getTypeClass() )
|
switch( rAny.getValueTypeClass() )
|
||||||
{
|
{
|
||||||
case uno::TypeClass_STRING:
|
case uno::TypeClass_STRING:
|
||||||
return rAny.get< OUString >();
|
return rAny.get< OUString >();
|
||||||
|
@ -100,7 +100,7 @@ DtransX11ConfigItem::DtransX11ConfigItem() :
|
|||||||
#if OSL_DEBUG_LEVEL > 1
|
#if OSL_DEBUG_LEVEL > 1
|
||||||
else
|
else
|
||||||
SAL_INFO("vcl.unx.dtrans", "found SelectionTimeout of type \""
|
SAL_INFO("vcl.unx.dtrans", "found SelectionTimeout of type \""
|
||||||
<< value.getValueType().getTypeName() << "\".");
|
<< value.getValueTypeName() << "\".");
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -141,7 +141,7 @@ namespace xmloff
|
|||||||
|
|
||||||
// the type attribute
|
// the type attribute
|
||||||
|
|
||||||
bool bIsEmptyValue = TypeClass_VOID == aValue.getValueType().getTypeClass();
|
bool bIsEmptyValue = TypeClass_VOID == aValue.getValueTypeClass();
|
||||||
if ( bIsEmptyValue )
|
if ( bIsEmptyValue )
|
||||||
{
|
{
|
||||||
css::beans::Property aPropDesc = m_xPropertyInfo->getPropertyByName( rProperty );
|
css::beans::Property aPropDesc = m_xPropertyInfo->getPropertyByName( rProperty );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user