summaryrefslogtreecommitdiff
path: root/filter
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2014-05-23 22:11:27 +0200
committerJulien Nabet <serval2412@yahoo.fr>2014-05-23 22:11:52 +0200
commitac76cc7e605b1bc9c0ff8e24d0b9995a8247074e (patch)
tree797df8cc9387fa70a0c09e574f49714ce4dc6710 /filter
parent3191d7d1302dbde2445b9f300b3eb853120ede65 (diff)
Prefer cppu::UnoType<T>::get() to ::getCppuType((T*)0) part20
Change-Id: If87cdfb2c605254f6d69baa4ca5aec09091caa68
Diffstat (limited to 'filter')
-rw-r--r--filter/source/graphicfilter/icgm/actimpr.cxx20
-rw-r--r--filter/source/msfilter/escherex.cxx6
-rw-r--r--filter/source/msfilter/msocximex.cxx2
-rw-r--r--filter/source/msfilter/svdfppt.cxx3
-rw-r--r--filter/source/xmlfilteradaptor/XmlFilterAdaptor.cxx4
-rw-r--r--filter/source/xsltdialog/xmlfilterdialogcomponent.cxx24
6 files changed, 29 insertions, 30 deletions
diff --git a/filter/source/graphicfilter/icgm/actimpr.cxx b/filter/source/graphicfilter/icgm/actimpr.cxx
index 8db2cc36cda1..80f2d9c3054b 100644
--- a/filter/source/graphicfilter/icgm/actimpr.cxx
+++ b/filter/source/graphicfilter/icgm/actimpr.cxx
@@ -567,7 +567,7 @@ void CGMImpressOutAct::DrawEllipticalArc( FloatPoint& rCenter, FloatPoint& rSize
{
ImplSetLineBundle();
drawing::FillStyle eFillStyle = drawing::FillStyle_NONE;
- aAny.setValue( &eFillStyle, ::getCppuType((const drawing::FillStyle*)0) );
+ aAny.setValue( &eFillStyle, cppu::UnoType<drawing::FillStyle>::get());
maXPropSet->setPropertyValue( "FillStyle", aAny );
}
}
@@ -826,7 +826,7 @@ void CGMImpressOutAct::DrawText( awt::Point& rTextPos, awt::Size& rTextSize, cha
if ( nWidth == -1 )
{
sal_Bool bTrue( sal_True );
- aAny.setValue( &bTrue, ::getCppuType((const sal_Bool*)0 ));
+ aAny.setValue( &bTrue, cppu::UnoType<sal_Bool>::get());
maXPropSet->setPropertyValue( "TextAutoGrowWidth", aAny );
drawing::TextAdjust eTextAdjust;
@@ -850,11 +850,11 @@ void CGMImpressOutAct::DrawText( awt::Point& rTextPos, awt::Size& rTextSize, cha
if ( nHeight == -1 )
{
sal_Bool bTrue = sal_True;
- aAny.setValue( &bTrue, ::getCppuType((const sal_Bool*)0) );
+ aAny.setValue( &bTrue, cppu::UnoType<sal_Bool>::get());
maXPropSet->setPropertyValue( "TextAutoGrowHeight", aAny );
}
uno::Reference< text::XText > xText;
- uno::Any aFirstQuery( maXShape->queryInterface( ::getCppuType((const uno::Reference< text::XText >*)0) ));
+ uno::Any aFirstQuery( maXShape->queryInterface( cppu::UnoType<text::XText>::get()));
if( aFirstQuery >>= xText )
{
OUString aStr( OUString::createFromAscii( pString ) );
@@ -863,12 +863,12 @@ void CGMImpressOutAct::DrawText( awt::Point& rTextPos, awt::Size& rTextSize, cha
{
aXTextCursor->gotoEnd( sal_False );
uno::Reference< text::XTextRange > aCursorText;
- uno::Any aSecondQuery( aXTextCursor->queryInterface( ::getCppuType((const uno::Reference< text::XTextRange >*)0) ));
+ uno::Any aSecondQuery( aXTextCursor->queryInterface( cppu::UnoType<text::XTextRange>::get()));
if ( aSecondQuery >>= aCursorText )
{
uno::Reference< beans::XPropertySet > aCursorPropSet;
- uno::Any aQuery( aCursorText->queryInterface( ::getCppuType((const uno::Reference< beans::XPropertySet >*)0) ));
+ uno::Any aQuery( aCursorText->queryInterface( cppu::UnoType<beans::XPropertySet>::get()));
if( aQuery >>= aCursorPropSet )
{
if ( nWidth != -1 ) // paragraph adjusting in a valid textbox ?
@@ -892,7 +892,7 @@ void CGMImpressOutAct::DrawText( awt::Point& rTextPos, awt::Size& rTextSize, cha
if ( nWidth > 0 && nHeight > 0 ) // restricted text
{
sal_Bool bTrue = sal_True;
- aAny.setValue( &bTrue, ::getCppuType((const sal_Bool*)0));
+ aAny.setValue( &bTrue, cppu::UnoType<sal_Bool>::get());
maXPropSet->setPropertyValue( "TextFitToSize", aAny );
}
aCursorText->setString( aStr );
@@ -919,7 +919,7 @@ void CGMImpressOutAct::AppendText( char* pString, sal_uInt32 /*nSize*/, FinalFla
if ( aShape.is() )
{
uno::Reference< text::XText > xText;
- uno::Any aFirstQuery( aShape->queryInterface( ::getCppuType((const uno::Reference< text::XText >*)0)) );
+ uno::Any aFirstQuery( aShape->queryInterface( cppu::UnoType<text::XText>::get()) );
if( aFirstQuery >>= xText )
{
OUString aStr( OUString::createFromAscii( pString ) );
@@ -929,11 +929,11 @@ void CGMImpressOutAct::AppendText( char* pString, sal_uInt32 /*nSize*/, FinalFla
{
aXTextCursor->gotoEnd( sal_False );
uno::Reference< text::XTextRange > aCursorText;
- uno::Any aSecondQuery(aXTextCursor->queryInterface( ::getCppuType((const uno::Reference< text::XTextRange >*)0) ));
+ uno::Any aSecondQuery(aXTextCursor->queryInterface( cppu::UnoType<text::XTextRange>::get()));
if ( aSecondQuery >>= aCursorText )
{
uno::Reference< beans::XPropertySet > aPropSet;
- uno::Any aQuery(aCursorText->queryInterface( ::getCppuType((const uno::Reference< beans::XPropertySet >*)0) ));
+ uno::Any aQuery(aCursorText->queryInterface( cppu::UnoType<beans::XPropertySet>::get()));
if( aQuery >>= aPropSet )
{
aCursorText->setString( aStr );
diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx
index 7217ec10a9d3..d7ce53b4d4e9 100644
--- a/filter/source/msfilter/escherex.cxx
+++ b/filter/source/msfilter/escherex.cxx
@@ -1779,7 +1779,7 @@ PolyPolygon EscherPropertyContainer::GetPolyPolygon( const ::com::sun::star::uno
PolyPolygon aRetPolyPoly;
::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > aXPropSet;
::com::sun::star::uno::Any aAny( rXShape->queryInterface(
- ::getCppuType( (const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >*) 0 ) ));
+ cppu::UnoType<com::sun::star::beans::XPropertySet>::get()));
OUString sPolyPolygonBezier ( "PolyPolygonBezier" );
OUString sPolyPolygon ( "PolyPolygon" );
@@ -1808,7 +1808,7 @@ PolyPolygon EscherPropertyContainer::GetPolyPolygon( const ::com::sun::star::uno
Polygon aPolygon;
PolyPolygon aPolyPolygon;
- if ( rAny.getValueType() == ::getCppuType( ( const ::com::sun::star::drawing::PolyPolygonBezierCoords* ) 0 ) )
+ if ( rAny.getValueType() == cppu::UnoType<com::sun::star::drawing::PolyPolygonBezierCoords>::get())
{
::com::sun::star::drawing::PolyPolygonBezierCoords* pSourcePolyPolygon
= (::com::sun::star::drawing::PolyPolygonBezierCoords*)rAny.getValue();
@@ -2329,7 +2329,7 @@ bool EscherPropertyContainer::CreateConnectorProperties(
::com::sun::star::awt::Point aStartPoint, aEndPoint;
::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > aXPropSet;
::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > aShapeA, aShapeB;
- ::com::sun::star::uno::Any aAny( rXShape->queryInterface( ::getCppuType( (const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >*) 0 ) ));
+ ::com::sun::star::uno::Any aAny( rXShape->queryInterface( cppu::UnoType<com::sun::star::beans::XPropertySet>::get()));
if ( aAny >>= aXPropSet )
{
if ( EscherPropertyValueHelper::GetPropertyValue( aAny, aXPropSet, sEdgeKind, true ) )
diff --git a/filter/source/msfilter/msocximex.cxx b/filter/source/msfilter/msocximex.cxx
index fbb419d415a5..d037611cce20 100644
--- a/filter/source/msfilter/msocximex.cxx
+++ b/filter/source/msfilter/msocximex.cxx
@@ -137,7 +137,7 @@ const uno::Reference< container::XIndexContainer >&
OSL_ENSURE( xForms.is(), "XForms not available" );
aTmp.setValue( &xForm,
- ::getCppuType((uno::Reference < form::XForm >*)0));
+ cppu::UnoType<form::XForm>::get());
xForms->insertByIndex( xForms->getCount(), aTmp );
xFormComps = uno::Reference< container::XIndexContainer >
diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx
index 74588730498e..20acbda79dc9 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -1659,8 +1659,7 @@ bool PPTConvertOCXControls::InsertControl(
const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer > & rFormComps =
GetFormComps();
- ::com::sun::star::uno::Any aTmp( &rFComp, ::getCppuType((const ::com::sun::star::uno::Reference<
- com::sun::star::form::XFormComponent >*)0) );
+ ::com::sun::star::uno::Any aTmp( &rFComp, cppu::UnoType<com::sun::star::form::XFormComponent>::get() );
rFormComps->insertByIndex( rFormComps->getCount(), aTmp );
diff --git a/filter/source/xmlfilteradaptor/XmlFilterAdaptor.cxx b/filter/source/xmlfilteradaptor/XmlFilterAdaptor.cxx
index 7703264eab13..32274e908f5e 100644
--- a/filter/source/xmlfilteradaptor/XmlFilterAdaptor.cxx
+++ b/filter/source/xmlfilteradaptor/XmlFilterAdaptor.cxx
@@ -254,8 +254,8 @@ bool SAL_CALL XmlFilterAdaptor::exportImpl( const Sequence< ::com::sun::star::be
// create an XProperty set to configure the exporter for pretty printing
PropertyMapEntry aImportInfoMap[] =
{
- { OUString("UsePrettyPrinting"), 0, ::getCppuType((const sal_Bool*)0), PropertyAttribute::MAYBEVOID, 0},
- { OUString("ExportTextNumberElement"), 0, ::getCppuType((const sal_Bool*)0), PropertyAttribute::MAYBEVOID, 0},
+ { OUString("UsePrettyPrinting"), 0, cppu::UnoType<sal_Bool>::get(), PropertyAttribute::MAYBEVOID, 0},
+ { OUString("ExportTextNumberElement"), 0, cppu::UnoType<sal_Bool>::get(), PropertyAttribute::MAYBEVOID, 0},
{ OUString("BaseURI"), 0, ::cppu::UnoType<OUString>::get(), PropertyAttribute::MAYBEVOID, 0},
{ OUString(), 0, css::uno::Type(), 0, 0 }
};
diff --git a/filter/source/xsltdialog/xmlfilterdialogcomponent.cxx b/filter/source/xsltdialog/xmlfilterdialogcomponent.cxx
index df9ab44262a4..0f643f1d2932 100644
--- a/filter/source/xsltdialog/xmlfilterdialogcomponent.cxx
+++ b/filter/source/xsltdialog/xmlfilterdialogcomponent.cxx
@@ -151,22 +151,22 @@ Any SAL_CALL XMLFilterDialogComponent::queryInterface( const Type& aType ) throw
Any SAL_CALL XMLFilterDialogComponent::queryAggregation( Type const & rType ) throw (RuntimeException, std::exception)
{
- if (rType == ::getCppuType( (Reference< ::com::sun::star::ui::dialogs::XExecutableDialog > const *)0 ))
+ if (rType == cppu::UnoType<com::sun::star::ui::dialogs::XExecutableDialog>::get())
{
void * p = static_cast< ::com::sun::star::ui::dialogs::XExecutableDialog * >( this );
return Any( &p, rType );
}
- else if (rType == ::getCppuType( (Reference< XServiceInfo > const *)0 ))
+ else if (rType == cppu::UnoType<XServiceInfo>::get())
{
void * p = static_cast< XServiceInfo * >( this );
return Any( &p, rType );
}
- else if (rType == ::getCppuType( (Reference< XInitialization > const *)0 ))
+ else if (rType == cppu::UnoType<XInitialization>::get())
{
void * p = static_cast< XInitialization * >( this );
return Any( &p, rType );
}
- else if (rType == ::getCppuType( (Reference< XTerminateListener > const *)0 ))
+ else if (rType == cppu::UnoType<XTerminateListener>::get())
{
void * p = static_cast< XTerminateListener * >( this );
return Any( &p, rType );
@@ -230,14 +230,14 @@ namespace
public:
DialogComponentTypes() :
m_aTypes(
- ::getCppuType( (const Reference< XComponent > *)0 ),
- ::getCppuType( (const Reference< XTypeProvider > *)0 ),
- ::getCppuType( (const Reference< XAggregation > *)0 ),
- ::getCppuType( (const Reference< XWeak > *)0 ),
- ::getCppuType( (const Reference< XServiceInfo > *)0 ),
- ::getCppuType( (const Reference< XInitialization > *)0 ),
- ::getCppuType( (const Reference< XTerminateListener > *)0 ),
- ::getCppuType( (const Reference< ::com::sun::star::ui::dialogs::XExecutableDialog > *)0 ))
+ cppu::UnoType<XComponent>::get(),
+ cppu::UnoType<XTypeProvider>::get(),
+ cppu::UnoType<XAggregation>::get(),
+ cppu::UnoType<XWeak>::get(),
+ cppu::UnoType<XServiceInfo>::get(),
+ cppu::UnoType<XInitialization>::get(),
+ cppu::UnoType<XTerminateListener>::get(),
+ cppu::UnoType<com::sun::star::ui::dialogs::XExecutableDialog>::get())
{
}
OTypeCollection& getTypeCollection() { return m_aTypes; }