const_cast: convert some C-style casts and remove some redundant ones
Change-Id: I17a03b41555a6c9fd7fab90c2c47ac910219f3a6
This commit is contained in:
parent
6f3c52bb37
commit
b627a4d98f
@ -180,7 +180,7 @@ void VCLXPrinterPropertySet::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle
|
|||||||
|
|
||||||
void VCLXPrinterPropertySet::getFastPropertyValue( ::com::sun::star::uno::Any& rValue, sal_Int32 nHandle ) const
|
void VCLXPrinterPropertySet::getFastPropertyValue( ::com::sun::star::uno::Any& rValue, sal_Int32 nHandle ) const
|
||||||
{
|
{
|
||||||
::osl::MutexGuard aGuard( ((VCLXPrinterPropertySet*)this)->Mutex );
|
::osl::MutexGuard aGuard( const_cast<VCLXPrinterPropertySet*>(this)->Mutex );
|
||||||
|
|
||||||
switch( nHandle )
|
switch( nHandle )
|
||||||
{
|
{
|
||||||
|
@ -252,7 +252,7 @@ bool UnoControlModel::ImplHasProperty( sal_uInt16 nPropId ) const
|
|||||||
case BASEPROPERTY_SPINVALUE_MIN: aDefault <<= (sal_Int32) 0; break;
|
case BASEPROPERTY_SPINVALUE_MIN: aDefault <<= (sal_Int32) 0; break;
|
||||||
case BASEPROPERTY_SPINVALUE_MAX: aDefault <<= (sal_Int32) 100; break;
|
case BASEPROPERTY_SPINVALUE_MAX: aDefault <<= (sal_Int32) 100; break;
|
||||||
case BASEPROPERTY_REPEAT_DELAY: aDefault <<= (sal_Int32) 50; break; // 50 milliseconds
|
case BASEPROPERTY_REPEAT_DELAY: aDefault <<= (sal_Int32) 50; break; // 50 milliseconds
|
||||||
case BASEPROPERTY_DEFAULTCONTROL: aDefault <<= ((UnoControlModel*)this)->getServiceName(); break;
|
case BASEPROPERTY_DEFAULTCONTROL: aDefault <<= const_cast<UnoControlModel*>(this)->getServiceName(); break;
|
||||||
|
|
||||||
case BASEPROPERTY_AUTOHSCROLL:
|
case BASEPROPERTY_AUTOHSCROLL:
|
||||||
case BASEPROPERTY_AUTOVSCROLL:
|
case BASEPROPERTY_AUTOVSCROLL:
|
||||||
@ -1180,7 +1180,7 @@ void UnoControlModel::setFastPropertyValue_NoBroadcast( sal_Int32 nPropId, const
|
|||||||
|
|
||||||
void UnoControlModel::getFastPropertyValue( ::com::sun::star::uno::Any& rValue, sal_Int32 nPropId ) const
|
void UnoControlModel::getFastPropertyValue( ::com::sun::star::uno::Any& rValue, sal_Int32 nPropId ) const
|
||||||
{
|
{
|
||||||
::osl::Guard< ::osl::Mutex > aGuard( ((UnoControlModel*)this)->GetMutex() );
|
::osl::Guard< ::osl::Mutex > aGuard( const_cast<UnoControlModel*>(this)->GetMutex() );
|
||||||
|
|
||||||
ImplPropertyTable::const_iterator it = maData.find( nPropId );
|
ImplPropertyTable::const_iterator it = maData.find( nPropId );
|
||||||
const ::com::sun::star::uno::Any* pProp = it == maData.end() ? NULL : &(it->second);
|
const ::com::sun::star::uno::Any* pProp = it == maData.end() ? NULL : &(it->second);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user