Prefer cppu::UnoType<T>::get() to ::getCppuType((T*)0) part3

Change-Id: Ibabd6d2d5e84fe007364bd1a4182a01ea2352b7a
This commit is contained in:
Julien Nabet
2014-05-06 22:51:07 +02:00
parent 3ed4078ad2
commit db3b1dd86e
8 changed files with 64 additions and 64 deletions

View File

@@ -1627,7 +1627,7 @@ bool ChartController::requestQuickHelp(
if ( rSelection.hasValue() ) if ( rSelection.hasValue() )
{ {
const uno::Type& rType = rSelection.getValueType(); const uno::Type& rType = rSelection.getValueType();
if ( rType == ::getCppuType( static_cast< const OUString* >( 0 ) ) ) if ( rType == cppu::UnoType< OUString >::get() )
{ {
OUString aNewCID; OUString aNewCID;
if ( ( rSelection >>= aNewCID ) && m_aSelection.setSelection( aNewCID ) ) if ( ( rSelection >>= aNewCID ) && m_aSelection.setSelection( aNewCID ) )
@@ -1635,7 +1635,7 @@ bool ChartController::requestQuickHelp(
bSuccess = true; bSuccess = true;
} }
} }
else if ( rType == ::getCppuType( static_cast< const uno::Reference< drawing::XShape >* >( 0 ) ) ) else if ( rType == cppu::UnoType< uno::Reference< drawing::XShape > >::get() )
{ {
uno::Reference< drawing::XShape > xShape; uno::Reference< drawing::XShape > xShape;
if ( ( rSelection >>= xShape ) && m_aSelection.setSelection( xShape ) ) if ( ( rSelection >>= xShape ) && m_aSelection.setSelection( xShape ) )
@@ -1701,7 +1701,7 @@ bool ChartController::requestQuickHelp(
return; //behave passive if already disposed or suspended return; //behave passive if already disposed or suspended
//--add listener //--add listener
m_aLifeTimeManager.m_aListenerContainer.addInterface( ::getCppuType((const uno::Reference< view::XSelectionChangeListener >*)0), xListener ); m_aLifeTimeManager.m_aListenerContainer.addInterface( cppu::UnoType< uno::Reference< view::XSelectionChangeListener > >::get(), xListener );
} }
void SAL_CALL ChartController void SAL_CALL ChartController
@@ -1714,14 +1714,14 @@ bool ChartController::requestQuickHelp(
return; //behave passive if already disposed or suspended return; //behave passive if already disposed or suspended
//--remove listener //--remove listener
m_aLifeTimeManager.m_aListenerContainer.removeInterface( ::getCppuType((const uno::Reference< view::XSelectionChangeListener >*)0), xListener ); m_aLifeTimeManager.m_aListenerContainer.removeInterface( cppu::UnoType< uno::Reference< view::XSelectionChangeListener > >::get(), xListener );
} }
void ChartController void ChartController
::impl_notifySelectionChangeListeners() ::impl_notifySelectionChangeListeners()
{ {
::cppu::OInterfaceContainerHelper* pIC = m_aLifeTimeManager.m_aListenerContainer ::cppu::OInterfaceContainerHelper* pIC = m_aLifeTimeManager.m_aListenerContainer
.getContainer( ::getCppuType((const uno::Reference< view::XSelectionChangeListener >*)0) ); .getContainer( cppu::UnoType< uno::Reference< view::XSelectionChangeListener > >::get() );
if( pIC ) if( pIC )
{ {
uno::Reference< view::XSelectionSupplier > xSelectionSupplier(this); uno::Reference< view::XSelectionSupplier > xSelectionSupplier(this);

View File

@@ -1005,23 +1005,23 @@ Any OFormattedModel::translateDbColumnToControlValue()
Sequence< Type > OFormattedModel::getSupportedBindingTypes() Sequence< Type > OFormattedModel::getSupportedBindingTypes()
{ {
::std::list< Type > aTypes; ::std::list< Type > aTypes;
aTypes.push_back( ::getCppuType( static_cast< double* >( NULL ) ) ); aTypes.push_back( cppu::UnoType< double >::get() );
switch ( m_nKeyType & ~NumberFormat::DEFINED ) switch ( m_nKeyType & ~NumberFormat::DEFINED )
{ {
case NumberFormat::DATE: case NumberFormat::DATE:
aTypes.push_front(::getCppuType( static_cast< UNODate* >( NULL ) ) ); aTypes.push_front(cppu::UnoType< UNODate >::get() );
break; break;
case NumberFormat::TIME: case NumberFormat::TIME:
aTypes.push_front(::getCppuType( static_cast< UNOTime* >( NULL ) ) ); aTypes.push_front(cppu::UnoType< UNOTime >::get() );
break; break;
case NumberFormat::DATETIME: case NumberFormat::DATETIME:
aTypes.push_front(::getCppuType( static_cast< UNODateTime* >( NULL ) ) ); aTypes.push_front(cppu::UnoType< UNODateTime >::get() );
break; break;
case NumberFormat::TEXT: case NumberFormat::TEXT:
aTypes.push_front(::getCppuType( static_cast< OUString* >( NULL ) ) ); aTypes.push_front(cppu::UnoType< OUString >::get() );
break; break;
case NumberFormat::LOGICAL: case NumberFormat::LOGICAL:
aTypes.push_front(::getCppuType( static_cast< sal_Bool* >( NULL ) ) ); aTypes.push_front(cppu::UnoType< sal_Bool >::get() );
break; break;
} }
Sequence< Type > aTypesRet( aTypes.size() ); Sequence< Type > aTypesRet( aTypes.size() );

View File

@@ -170,43 +170,43 @@ throw( RuntimeException, std::exception )
eState = SFX_ITEM_AVAILABLE; eState = SFX_ITEM_AVAILABLE;
::com::sun::star::uno::Type pType = rEvent.State.getValueType(); ::com::sun::star::uno::Type pType = rEvent.State.getValueType();
if ( pType == ::getVoidCppuType() ) if ( pType == ::cppu::UnoType< ::cppu::UnoVoidType >::get() )
{ {
pItem = new SfxVoidItem( m_nSlotID ); pItem = new SfxVoidItem( m_nSlotID );
eState = SFX_ITEM_UNKNOWN; eState = SFX_ITEM_UNKNOWN;
} }
else if ( pType == ::getBooleanCppuType() ) else if ( pType == cppu::UnoType< bool >::get() )
{ {
bool bTemp = false; bool bTemp = false;
rEvent.State >>= bTemp ; rEvent.State >>= bTemp ;
pItem = new SfxBoolItem( m_nSlotID, bTemp ); pItem = new SfxBoolItem( m_nSlotID, bTemp );
} }
else if ( pType == ::getCppuType((const sal_uInt16*)0) ) else if ( pType == cppu::UnoType< ::cppu::UnoUnsignedShortType >::get() )
{ {
sal_uInt16 nTemp = 0; sal_uInt16 nTemp = 0;
rEvent.State >>= nTemp ; rEvent.State >>= nTemp ;
pItem = new SfxUInt16Item( m_nSlotID, nTemp ); pItem = new SfxUInt16Item( m_nSlotID, nTemp );
} }
else if ( pType == ::getCppuType((const sal_uInt32*)0) ) else if ( pType == cppu::UnoType<sal_uInt32>::get() )
{ {
sal_uInt32 nTemp = 0; sal_uInt32 nTemp = 0;
rEvent.State >>= nTemp ; rEvent.State >>= nTemp ;
pItem = new SfxUInt32Item( m_nSlotID, nTemp ); pItem = new SfxUInt32Item( m_nSlotID, nTemp );
} }
else if ( pType == ::getCppuType((const OUString*)0) ) else if ( pType == cppu::UnoType<OUString>::get() )
{ {
OUString sTemp ; OUString sTemp ;
rEvent.State >>= sTemp ; rEvent.State >>= sTemp ;
pItem = new SfxStringItem( m_nSlotID, sTemp ); pItem = new SfxStringItem( m_nSlotID, sTemp );
} }
else if ( pType == ::getCppuType((const ::com::sun::star::frame::status::ItemStatus*)0) ) else if ( pType == cppu::UnoType< ::com::sun::star::frame::status::ItemStatus >::get() )
{ {
ItemStatus aItemStatus; ItemStatus aItemStatus;
rEvent.State >>= aItemStatus; rEvent.State >>= aItemStatus;
eState = aItemStatus.State; eState = aItemStatus.State;
pItem = new SfxVoidItem( m_nSlotID ); pItem = new SfxVoidItem( m_nSlotID );
} }
else if ( pType == ::getCppuType((const ::com::sun::star::frame::status::Visibility*)0) ) else if ( pType == cppu::UnoType< ::com::sun::star::frame::status::Visibility >::get() )
{ {
Visibility aVisibilityStatus; Visibility aVisibilityStatus;
rEvent.State >>= aVisibilityStatus; rEvent.State >>= aVisibilityStatus;

View File

@@ -96,7 +96,7 @@ void SAL_CALL BindDispatch_Impl::statusChanged( const ::com::sun::star::frame::
::com::sun::star::uno::Any aAny = aStatus.State; ::com::sun::star::uno::Any aAny = aStatus.State;
::com::sun::star::uno::Type pType = aAny.getValueType(); ::com::sun::star::uno::Type pType = aAny.getValueType();
if ( pType == ::getBooleanCppuType() ) if ( pType == cppu::UnoType< bool >::get() )
{ {
bool bTemp = false; bool bTemp = false;
aAny >>= bTemp ; aAny >>= bTemp ;

View File

@@ -219,7 +219,7 @@ bool SvxXMLXTableExportComponent::save(
INetURLObject aURLObj( rURL ); INetURLObject aURLObj( rURL );
bool bToStorage = aURLObj.GetProtocol() == INET_PROT_NOT_VALID; // a relative path bool bToStorage = aURLObj.GetProtocol() == INET_PROT_NOT_VALID; // a relative path
bool bSaveAsStorage = xTable->getElementType() == ::getCppuType((const OUString*)0); bool bSaveAsStorage = xTable->getElementType() == cppu::UnoType<OUString>::get();
if( pOptName ) if( pOptName )
*pOptName = rURL; *pOptName = rURL;
@@ -357,32 +357,32 @@ bool SvxXMLXTableExportComponent::exportTable() throw()
Type aExportType = mxTable->getElementType(); Type aExportType = mxTable->getElementType();
SvxXMLTableEntryExporter* pExporter = NULL; SvxXMLTableEntryExporter* pExporter = NULL;
if( aExportType == ::getCppuType((const sal_Int32*)0) ) if( aExportType == cppu::UnoType<sal_Int32>::get() )
{ {
pExporter = new SvxXMLColorEntryExporter(*this); pExporter = new SvxXMLColorEntryExporter(*this);
pEleName = "color-table"; pEleName = "color-table";
} }
else if( aExportType == ::getCppuType((const drawing::PolyPolygonBezierCoords*)0) ) else if( aExportType == cppu::UnoType< drawing::PolyPolygonBezierCoords >::get() )
{ {
pExporter = new SvxXMLLineEndEntryExporter(*this); pExporter = new SvxXMLLineEndEntryExporter(*this);
pEleName = "marker-table"; pEleName = "marker-table";
} }
else if( aExportType == ::getCppuType((const drawing::LineDash*)0) ) else if( aExportType == cppu::UnoType< drawing::LineDash >::get() )
{ {
pExporter = new SvxXMLDashEntryExporter(*this); pExporter = new SvxXMLDashEntryExporter(*this);
pEleName = "dash-table"; pEleName = "dash-table";
} }
else if( aExportType == ::getCppuType((const drawing::Hatch*)0) ) else if( aExportType == cppu::UnoType< drawing::Hatch >::get() )
{ {
pExporter = new SvxXMLHatchEntryExporter(*this); pExporter = new SvxXMLHatchEntryExporter(*this);
pEleName = "hatch-table"; pEleName = "hatch-table";
} }
else if( aExportType == ::getCppuType((const awt::Gradient*)0)) else if( aExportType == cppu::UnoType< awt::Gradient >::get() )
{ {
pExporter = new SvxXMLGradientEntryExporter(*this); pExporter = new SvxXMLGradientEntryExporter(*this);
pEleName = "gradient-table"; pEleName = "gradient-table";
} }
else if( aExportType == ::getCppuType((const OUString*)0)) else if( aExportType == cppu::UnoType<OUString>::get())
{ {
pExporter = new SvxXMLBitmapEntryExporter(*this); pExporter = new SvxXMLBitmapEntryExporter(*this);
pEleName = "bitmap-table"; pEleName = "bitmap-table";

View File

@@ -851,17 +851,17 @@ uno::Any SwAccessibleTable::queryInterface( const uno::Type& rType )
throw (uno::RuntimeException, std::exception) throw (uno::RuntimeException, std::exception)
{ {
uno::Any aRet; uno::Any aRet;
if ( rType == ::getCppuType( static_cast< uno::Reference< XAccessibleTable > * >( 0 ) ) ) if ( rType == cppu::UnoType< uno::Reference< XAccessibleTable > >::get() )
{ {
uno::Reference<XAccessibleTable> xThis( this ); uno::Reference<XAccessibleTable> xThis( this );
aRet <<= xThis; aRet <<= xThis;
} }
else if ( rType == ::getCppuType( static_cast< uno::Reference< XAccessibleSelection > * >( 0 ) ) ) else if ( rType == cppu::UnoType< uno::Reference< XAccessibleSelection > >::get() )
{ {
uno::Reference<XAccessibleSelection> xSelection( this ); uno::Reference<XAccessibleSelection> xSelection( this );
aRet <<= xSelection; aRet <<= xSelection;
} }
else if ( rType == ::getCppuType((uno::Reference<XAccessibleTableSelection> *)0) ) else if ( rType == cppu::UnoType< uno::Reference<XAccessibleTableSelection> >::get() )
{ {
uno::Reference<XAccessibleTableSelection> xTableExtent( this ); uno::Reference<XAccessibleTableSelection> xTableExtent( this );
aRet <<= xTableExtent; aRet <<= xTableExtent;
@@ -884,8 +884,8 @@ uno::Sequence< uno::Type > SAL_CALL SwAccessibleTable::getTypes()
aTypes.realloc( nIndex + 2 ); aTypes.realloc( nIndex + 2 );
uno::Type* pTypes = aTypes.getArray(); uno::Type* pTypes = aTypes.getArray();
pTypes[nIndex++] = ::getCppuType( static_cast< uno::Reference< XAccessibleSelection > * >( 0 ) ); pTypes[nIndex++] = cppu::UnoType< uno::Reference< XAccessibleSelection > >::get();
pTypes[nIndex++] = ::getCppuType( static_cast< uno::Reference< XAccessibleTable > * >( 0 ) ); pTypes[nIndex++] = cppu::UnoType< uno::Reference< XAccessibleTable > >::get();
return aTypes; return aTypes;
} }

View File

@@ -564,49 +564,49 @@ void UnoControlModel::write( const ::com::sun::star::uno::Reference< ::com::sun:
const ::com::sun::star::uno::Any& rValue = *pProp; const ::com::sun::star::uno::Any& rValue = *pProp;
const ::com::sun::star::uno::Type& rType = rValue.getValueType(); const ::com::sun::star::uno::Type& rType = rValue.getValueType();
if ( rType == ::getBooleanCppuType() ) if ( rType == cppu::UnoType< bool >::get() )
{ {
bool b = false; bool b = false;
rValue >>= b; rValue >>= b;
OutStream->writeBoolean( b ); OutStream->writeBoolean( b );
} }
else if ( rType == ::getCppuType((const OUString*)0) ) else if ( rType == ::cppu::UnoType< OUString >::get() )
{ {
OUString aUString; OUString aUString;
rValue >>= aUString; rValue >>= aUString;
OutStream->writeUTF( aUString ); OutStream->writeUTF( aUString );
} }
else if ( rType == ::getCppuType((const sal_uInt16*)0) ) else if ( rType == ::cppu::UnoType< ::cppu::UnoUnsignedShortType >::get() )
{ {
sal_uInt16 n = 0; sal_uInt16 n = 0;
rValue >>= n; rValue >>= n;
OutStream->writeShort( n ); OutStream->writeShort( n );
} }
else if ( rType == ::getCppuType((const sal_Int16*)0) ) else if ( rType == cppu::UnoType<sal_Int16>::get() )
{ {
sal_Int16 n = 0; sal_Int16 n = 0;
rValue >>= n; rValue >>= n;
OutStream->writeShort( n ); OutStream->writeShort( n );
} }
else if ( rType == ::getCppuType((const sal_uInt32*)0) ) else if ( rType == cppu::UnoType<sal_uInt32>::get() )
{ {
sal_uInt32 n = 0; sal_uInt32 n = 0;
rValue >>= n; rValue >>= n;
OutStream->writeLong( n ); OutStream->writeLong( n );
} }
else if ( rType == ::getCppuType((const sal_Int32*)0) ) else if ( rType == cppu::UnoType<sal_Int32>::get() )
{ {
sal_Int32 n = 0; sal_Int32 n = 0;
rValue >>= n; rValue >>= n;
OutStream->writeLong( n ); OutStream->writeLong( n );
} }
else if ( rType == ::getCppuType((const double*)0) ) else if ( rType == cppu::UnoType<double>::get() )
{ {
double n = 0; double n = 0;
rValue >>= n; rValue >>= n;
OutStream->writeDouble( n ); OutStream->writeDouble( n );
} }
else if ( rType == ::getCppuType((const ::com::sun::star::awt::FontDescriptor*)0) ) else if ( rType == cppu::UnoType< ::com::sun::star::awt::FontDescriptor >::get() )
{ {
::com::sun::star::awt::FontDescriptor aFD; ::com::sun::star::awt::FontDescriptor aFD;
rValue >>= aFD; rValue >>= aFD;
@@ -643,7 +643,7 @@ void UnoControlModel::write( const ::com::sun::star::uno::Reference< ::com::sun:
t.NanoSeconds / 1000000 + 100 * t.Seconds t.NanoSeconds / 1000000 + 100 * t.Seconds
+ 10000 * t.Minutes + 1000000 * t.Hours); // HHMMSShh + 10000 * t.Minutes + 1000000 * t.Hours); // HHMMSShh
} }
else if ( rType == ::getCppuType((const ::com::sun::star::uno::Sequence< OUString>*)0 ) ) else if ( rType == cppu::UnoType< ::com::sun::star::uno::Sequence< OUString> >::get() )
{ {
::com::sun::star::uno::Sequence< OUString> aSeq; ::com::sun::star::uno::Sequence< OUString> aSeq;
rValue >>= aSeq; rValue >>= aSeq;
@@ -652,7 +652,7 @@ void UnoControlModel::write( const ::com::sun::star::uno::Reference< ::com::sun:
for ( long n = 0; n < nEntries; n++ ) for ( long n = 0; n < nEntries; n++ )
OutStream->writeUTF( aSeq.getConstArray()[n] ); OutStream->writeUTF( aSeq.getConstArray()[n] );
} }
else if ( rType == ::getCppuType((const ::com::sun::star::uno::Sequence<sal_uInt16>*)0 ) ) else if ( rType == cppu::UnoType< ::com::sun::star::uno::Sequence< ::cppu::UnoUnsignedShortType > >::get() )
{ {
::com::sun::star::uno::Sequence<sal_uInt16> aSeq; ::com::sun::star::uno::Sequence<sal_uInt16> aSeq;
rValue >>= aSeq; rValue >>= aSeq;
@@ -661,7 +661,7 @@ void UnoControlModel::write( const ::com::sun::star::uno::Reference< ::com::sun:
for ( long n = 0; n < nEntries; n++ ) for ( long n = 0; n < nEntries; n++ )
OutStream->writeShort( aSeq.getConstArray()[n] ); OutStream->writeShort( aSeq.getConstArray()[n] );
} }
else if ( rType == ::getCppuType((const ::com::sun::star::uno::Sequence<sal_Int16>*)0 ) ) else if ( rType == cppu::UnoType< ::com::sun::star::uno::Sequence<sal_Int16> >::get() )
{ {
::com::sun::star::uno::Sequence<sal_Int16> aSeq; ::com::sun::star::uno::Sequence<sal_Int16> aSeq;
rValue >>= aSeq; rValue >>= aSeq;
@@ -794,37 +794,37 @@ void UnoControlModel::read( const ::com::sun::star::uno::Reference< ::com::sun::
bool b = InStream->readBoolean(); bool b = InStream->readBoolean();
aValue <<= b; aValue <<= b;
} }
else if ( *pType == ::getCppuType((const OUString*)0) ) else if ( *pType == cppu::UnoType<OUString>::get() )
{ {
OUString aUTF = InStream->readUTF(); OUString aUTF = InStream->readUTF();
aValue <<= aUTF; aValue <<= aUTF;
} }
else if ( *pType == ::getCppuType((const sal_uInt16*)0) ) else if ( *pType == ::cppu::UnoType< ::cppu::UnoUnsignedShortType >::get() )
{ {
sal_uInt16 n = InStream->readShort(); sal_uInt16 n = InStream->readShort();
aValue <<= n; aValue <<= n;
} }
else if ( *pType == ::getCppuType((const sal_Int16*)0) ) else if ( *pType == cppu::UnoType<sal_Int16>::get() )
{ {
sal_Int16 n = InStream->readShort(); sal_Int16 n = InStream->readShort();
aValue <<= n; aValue <<= n;
} }
else if ( *pType == ::getCppuType((const sal_uInt32*)0) ) else if ( *pType == cppu::UnoType<sal_uInt32>::get() )
{ {
sal_uInt32 n = InStream->readLong(); sal_uInt32 n = InStream->readLong();
aValue <<= n; aValue <<= n;
} }
else if ( *pType == ::getCppuType((const sal_Int32*)0) ) else if ( *pType == cppu::UnoType<sal_Int32>::get() )
{ {
sal_Int32 n = InStream->readLong(); sal_Int32 n = InStream->readLong();
aValue <<= n; aValue <<= n;
} }
else if ( *pType == ::getCppuType((const double*)0) ) else if ( *pType == cppu::UnoType<double>::get() )
{ {
double n = InStream->readDouble(); double n = InStream->readDouble();
aValue <<= n; aValue <<= n;
} }
else if ( *pType == ::getCppuType((const ::com::sun::star::awt::FontDescriptor*)0) ) else if ( *pType == cppu::UnoType< ::com::sun::star::awt::FontDescriptor >::get() )
{ {
::com::sun::star::awt::FontDescriptor aFD; ::com::sun::star::awt::FontDescriptor aFD;
aFD.Name = InStream->readUTF(); aFD.Name = InStream->readUTF();
@@ -858,7 +858,7 @@ void UnoControlModel::read( const ::com::sun::star::uno::Reference< ::com::sun::
(n % 100) * 1000000, (n / 100) % 100, (n / 10000) % 100, (n % 100) * 1000000, (n / 100) % 100, (n / 10000) % 100,
n / 1000000, false); n / 1000000, false);
} }
else if ( *pType == ::getCppuType((const ::com::sun::star::uno::Sequence< OUString>*)0 ) ) else if ( *pType == cppu::UnoType< ::com::sun::star::uno::Sequence< OUString> >::get() )
{ {
long nEntries = InStream->readLong(); long nEntries = InStream->readLong();
::com::sun::star::uno::Sequence< OUString> aSeq( nEntries ); ::com::sun::star::uno::Sequence< OUString> aSeq( nEntries );
@@ -867,7 +867,7 @@ void UnoControlModel::read( const ::com::sun::star::uno::Reference< ::com::sun::
aValue <<= aSeq; aValue <<= aSeq;
} }
else if ( *pType == ::getCppuType((const ::com::sun::star::uno::Sequence<sal_uInt16>*)0 ) ) else if ( *pType == cppu::UnoType< ::com::sun::star::uno::Sequence< ::cppu::UnoUnsignedShortType > >::get() )
{ {
long nEntries = InStream->readLong(); long nEntries = InStream->readLong();
@@ -876,7 +876,7 @@ void UnoControlModel::read( const ::com::sun::star::uno::Reference< ::com::sun::
aSeq.getArray()[n] = (sal_uInt16)InStream->readShort(); aSeq.getArray()[n] = (sal_uInt16)InStream->readShort();
aValue <<= aSeq; aValue <<= aSeq;
} }
else if ( *pType == ::getCppuType((const ::com::sun::star::uno::Sequence<sal_Int16>*)0 ) ) else if ( *pType == cppu::UnoType< ::com::sun::star::uno::Sequence<sal_Int16> >::get() )
{ {
long nEntries = InStream->readLong(); long nEntries = InStream->readLong();
::com::sun::star::uno::Sequence<sal_Int16> aSeq( nEntries ); ::com::sun::star::uno::Sequence<sal_Int16> aSeq( nEntries );

View File

@@ -1453,7 +1453,7 @@ void AnimationsExporterImpl::convertValue( XMLTokenEnum eAttributeName, OUString
if( !rValue.hasValue() ) if( !rValue.hasValue() )
return; return;
if( rValue.getValueType() == ::getCppuType((const ValuePair*)0) ) if( rValue.getValueType() == cppu::UnoType<ValuePair>::get() )
{ {
const ValuePair* pValuePair = static_cast< const ValuePair* >( rValue.getValue() ); const ValuePair* pValuePair = static_cast< const ValuePair* >( rValue.getValue() );
OUStringBuffer sTmp2; OUStringBuffer sTmp2;
@@ -1462,7 +1462,7 @@ void AnimationsExporterImpl::convertValue( XMLTokenEnum eAttributeName, OUString
convertValue( eAttributeName, sTmp2, pValuePair->Second ); convertValue( eAttributeName, sTmp2, pValuePair->Second );
sTmp.append( sTmp2.makeStringAndClear() ); sTmp.append( sTmp2.makeStringAndClear() );
} }
else if( rValue.getValueType() == ::getCppuType((Sequence<Any>*)0) ) else if( rValue.getValueType() == cppu::UnoType< Sequence<Any> >::get() )
{ {
const Sequence<Any>* pSequence = static_cast< const Sequence<Any>* >( rValue.getValue() ); const Sequence<Any>* pSequence = static_cast< const Sequence<Any>* >( rValue.getValue() );
const sal_Int32 nLength = pSequence->getLength(); const sal_Int32 nLength = pSequence->getLength();
@@ -1497,7 +1497,7 @@ void AnimationsExporterImpl::convertValue( XMLTokenEnum eAttributeName, OUString
{ {
sTmp.append( aString ); sTmp.append( aString );
} }
else if( rValue.getValueType() == ::getCppuType((const double*)0) ) else if( rValue.getValueType() == cppu::UnoType<double>::get() )
{ {
sTmp.append( *(static_cast< const double* >( rValue.getValue() )) ); sTmp.append( *(static_cast< const double* >( rValue.getValue() )) );
} }
@@ -1544,7 +1544,7 @@ void AnimationsExporterImpl::convertTiming( OUStringBuffer& sTmp, const Any& rVa
if( !rValue.hasValue() ) if( !rValue.hasValue() )
return; return;
if( rValue.getValueType() == ::getCppuType((Sequence<Any>*)0) ) if( rValue.getValueType() == cppu::UnoType< Sequence<Any> >::get() )
{ {
const Sequence<Any>* pSequence = static_cast< const Sequence<Any>* >( rValue.getValue() ); const Sequence<Any>* pSequence = static_cast< const Sequence<Any>* >( rValue.getValue() );
const sal_Int32 nLength = pSequence->getLength(); const sal_Int32 nLength = pSequence->getLength();
@@ -1561,17 +1561,17 @@ void AnimationsExporterImpl::convertTiming( OUStringBuffer& sTmp, const Any& rVa
sTmp.append( sTmp2.makeStringAndClear() ); sTmp.append( sTmp2.makeStringAndClear() );
} }
} }
else if( rValue.getValueType() == ::getCppuType((const double*)0) ) else if( rValue.getValueType() == cppu::UnoType<double>::get() )
{ {
sTmp.append( *(static_cast< const double* >( rValue.getValue() )) ); sTmp.append( *(static_cast< const double* >( rValue.getValue() )) );
sTmp.append( 's'); sTmp.append( 's');
} }
else if( rValue.getValueType() == ::getCppuType((const Timing*)0) ) else if( rValue.getValueType() == cppu::UnoType<Timing>::get() )
{ {
const Timing* pTiming = static_cast< const Timing* >( rValue.getValue() ); const Timing* pTiming = static_cast< const Timing* >( rValue.getValue() );
sTmp.append( GetXMLToken( (*pTiming == Timing_MEDIA) ? XML_MEDIA : XML_INDEFINITE ) ); sTmp.append( GetXMLToken( (*pTiming == Timing_MEDIA) ? XML_MEDIA : XML_INDEFINITE ) );
} }
else if( rValue.getValueType() == ::getCppuType((const Event*)0) ) else if( rValue.getValueType() == cppu::UnoType<Event>::get() )
{ {
OUStringBuffer sTmp2; OUStringBuffer sTmp2;
@@ -1622,7 +1622,7 @@ void AnimationsExporterImpl::convertTarget( OUStringBuffer& sTmp, const Any& rTa
{ {
rTarget >>= xRef; rTarget >>= xRef;
} }
else if( rTarget.getValueType() == ::getCppuType((const ParagraphTarget*)0) ) else if( rTarget.getValueType() == cppu::UnoType<ParagraphTarget>::get() )
{ {
xRef = getParagraphTarget( static_cast< const ParagraphTarget* >( rTarget.getValue() ) ); xRef = getParagraphTarget( static_cast< const ParagraphTarget* >( rTarget.getValue() ) );
} }
@@ -1641,13 +1641,13 @@ void AnimationsExporterImpl::prepareValue( const Any& rValue )
if( !rValue.hasValue() ) if( !rValue.hasValue() )
return; return;
if( rValue.getValueType() == ::getCppuType((const ValuePair*)0) ) if( rValue.getValueType() == cppu::UnoType<ValuePair>::get() )
{ {
const ValuePair* pValuePair = static_cast< const ValuePair* >( rValue.getValue() ); const ValuePair* pValuePair = static_cast< const ValuePair* >( rValue.getValue() );
prepareValue( pValuePair->First ); prepareValue( pValuePair->First );
prepareValue( pValuePair->Second ); prepareValue( pValuePair->Second );
} }
else if( rValue.getValueType() == ::getCppuType((Sequence<Any>*)0) ) else if( rValue.getValueType() == cppu::UnoType< Sequence<Any> >::get() )
{ {
const Sequence<Any>* pSequence = static_cast< const Sequence<Any>* >( rValue.getValue() ); const Sequence<Any>* pSequence = static_cast< const Sequence<Any>* >( rValue.getValue() );
const sal_Int32 nLength = pSequence->getLength(); const sal_Int32 nLength = pSequence->getLength();
@@ -1663,13 +1663,13 @@ void AnimationsExporterImpl::prepareValue( const Any& rValue )
if( xRef.is() ) if( xRef.is() )
mrExport.getInterfaceToIdentifierMapper().registerReference( xRef ); mrExport.getInterfaceToIdentifierMapper().registerReference( xRef );
} }
else if( rValue.getValueType() == ::getCppuType((const ParagraphTarget*)0) ) else if( rValue.getValueType() == cppu::UnoType<ParagraphTarget>::get() )
{ {
Reference< XInterface> xRef( getParagraphTarget( static_cast< const ParagraphTarget* >( rValue.getValue() ) ) ); Reference< XInterface> xRef( getParagraphTarget( static_cast< const ParagraphTarget* >( rValue.getValue() ) ) );
if( xRef.is() ) if( xRef.is() )
mrExport.getInterfaceToIdentifierMapper().registerReference( xRef ); mrExport.getInterfaceToIdentifierMapper().registerReference( xRef );
} }
else if( rValue.getValueType() == ::getCppuType((const Event*)0) ) else if( rValue.getValueType() == cppu::UnoType<Event>::get() )
{ {
const Event* pEvent = static_cast< const Event* >( rValue.getValue() ); const Event* pEvent = static_cast< const Event* >( rValue.getValue() );
prepareValue( pEvent->Source ); prepareValue( pEvent->Source );