loplugin:cstylecast: deal with remaining pointer casts

Change-Id: I6fa6ee6d9eaf98a00624ad353dc6d2c5687b0547
This commit is contained in:
Stephan Bergmann 2015-06-08 16:30:03 +02:00
parent e7b4225fc8
commit 689a4a6973
14 changed files with 28 additions and 28 deletions

View File

@ -3759,7 +3759,7 @@ Reference< uno::XInterface > SAL_CALL SchXMLExport_createInstance(const Referenc
{
// #110680#
// #103997# removed some flags from EXPORT_ALL
return (cppu::OWeakObject*)new SchXMLExport( comphelper::getComponentContext(rSMgr), SchXMLExport_getImplementationName(), SvXMLExportFlags::ALL ^ ( SvXMLExportFlags::SETTINGS | SvXMLExportFlags::MASTERSTYLES | SvXMLExportFlags::SCRIPTS ));
return static_cast<cppu::OWeakObject*>(new SchXMLExport( comphelper::getComponentContext(rSMgr), SchXMLExport_getImplementationName(), SvXMLExportFlags::ALL ^ ( SvXMLExportFlags::SETTINGS | SvXMLExportFlags::MASTERSTYLES | SvXMLExportFlags::SCRIPTS )));
}
// Oasis format
@ -3778,9 +3778,9 @@ OUString SAL_CALL SchXMLExport_Oasis_getImplementationName() throw()
Reference< uno::XInterface > SAL_CALL SchXMLExport_Oasis_createInstance(const Reference< lang::XMultiServiceFactory > & rSMgr) throw( uno::Exception )
{
// #103997# removed some flags from EXPORT_ALL
return (cppu::OWeakObject*)new SchXMLExport( comphelper::getComponentContext(rSMgr),
return static_cast<cppu::OWeakObject*>(new SchXMLExport( comphelper::getComponentContext(rSMgr),
SchXMLExport_Oasis_getImplementationName(),
(SvXMLExportFlags::ALL ^ ( SvXMLExportFlags::SETTINGS | SvXMLExportFlags::MASTERSTYLES | SvXMLExportFlags::SCRIPTS )) | SvXMLExportFlags::OASIS );
(SvXMLExportFlags::ALL ^ ( SvXMLExportFlags::SETTINGS | SvXMLExportFlags::MASTERSTYLES | SvXMLExportFlags::SCRIPTS )) | SvXMLExportFlags::OASIS ));
}
// multiple storage version: one for content / styles / meta
@ -3800,7 +3800,7 @@ OUString SAL_CALL SchXMLExport_Styles_getImplementationName() throw()
Reference< uno::XInterface > SAL_CALL SchXMLExport_Styles_createInstance(const Reference< lang::XMultiServiceFactory >& rSMgr) throw( uno::Exception )
{
// #110680#
return (cppu::OWeakObject*)new SchXMLExport( comphelper::getComponentContext(rSMgr), SchXMLExport_Styles_getImplementationName(), SvXMLExportFlags::STYLES );
return static_cast<cppu::OWeakObject*>(new SchXMLExport( comphelper::getComponentContext(rSMgr), SchXMLExport_Styles_getImplementationName(), SvXMLExportFlags::STYLES ));
}
// Oasis format
@ -3818,7 +3818,7 @@ OUString SAL_CALL SchXMLExport_Oasis_Styles_getImplementationName() throw()
Reference< uno::XInterface > SAL_CALL SchXMLExport_Oasis_Styles_createInstance(const Reference< lang::XMultiServiceFactory > & rSMgr) throw( uno::Exception )
{
return (cppu::OWeakObject*)new SchXMLExport( comphelper::getComponentContext(rSMgr), SchXMLExport_Oasis_Styles_getImplementationName(), SvXMLExportFlags::STYLES | SvXMLExportFlags::OASIS );
return static_cast<cppu::OWeakObject*>(new SchXMLExport( comphelper::getComponentContext(rSMgr), SchXMLExport_Oasis_Styles_getImplementationName(), SvXMLExportFlags::STYLES | SvXMLExportFlags::OASIS ));
}
Sequence< OUString > SAL_CALL SchXMLExport_Content_getSupportedServiceNames() throw()
@ -3836,7 +3836,7 @@ OUString SAL_CALL SchXMLExport_Content_getImplementationName() throw()
Reference< uno::XInterface > SAL_CALL SchXMLExport_Content_createInstance(const Reference< lang::XMultiServiceFactory > & rSMgr) throw( uno::Exception )
{
// #110680#
return (cppu::OWeakObject*)new SchXMLExport( comphelper::getComponentContext(rSMgr), SchXMLExport_Content_getImplementationName(), SvXMLExportFlags::AUTOSTYLES | SvXMLExportFlags::CONTENT | SvXMLExportFlags::FONTDECLS );
return static_cast<cppu::OWeakObject*>(new SchXMLExport( comphelper::getComponentContext(rSMgr), SchXMLExport_Content_getImplementationName(), SvXMLExportFlags::AUTOSTYLES | SvXMLExportFlags::CONTENT | SvXMLExportFlags::FONTDECLS ));
}
// Oasis format
@ -3854,7 +3854,7 @@ OUString SAL_CALL SchXMLExport_Oasis_Content_getImplementationName() throw()
Reference< uno::XInterface > SAL_CALL SchXMLExport_Oasis_Content_createInstance(const Reference< lang::XMultiServiceFactory > & rSMgr) throw( uno::Exception )
{
return (cppu::OWeakObject*)new SchXMLExport( comphelper::getComponentContext(rSMgr), SchXMLExport_Oasis_Content_getImplementationName(), SvXMLExportFlags::AUTOSTYLES | SvXMLExportFlags::CONTENT | SvXMLExportFlags::FONTDECLS | SvXMLExportFlags::OASIS );
return static_cast<cppu::OWeakObject*>(new SchXMLExport( comphelper::getComponentContext(rSMgr), SchXMLExport_Oasis_Content_getImplementationName(), SvXMLExportFlags::AUTOSTYLES | SvXMLExportFlags::CONTENT | SvXMLExportFlags::FONTDECLS | SvXMLExportFlags::OASIS ));
}
// Oasis format
@ -3872,7 +3872,7 @@ OUString SAL_CALL SchXMLExport_Oasis_Meta_getImplementationName() throw()
Reference< uno::XInterface > SAL_CALL SchXMLExport_Oasis_Meta_createInstance(const Reference< lang::XMultiServiceFactory > & rSMgr) throw( uno::Exception )
{
return (cppu::OWeakObject*)new SchXMLExport( comphelper::getComponentContext(rSMgr), SchXMLExport_Oasis_Meta_getImplementationName(), SvXMLExportFlags::META | SvXMLExportFlags::OASIS );
return static_cast<cppu::OWeakObject*>(new SchXMLExport( comphelper::getComponentContext(rSMgr), SchXMLExport_Oasis_Meta_getImplementationName(), SvXMLExportFlags::META | SvXMLExportFlags::OASIS ));
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */

View File

@ -681,7 +681,7 @@ OUString SAL_CALL SchXMLImport_getImplementationName() throw()
Reference< uno::XInterface > SAL_CALL SchXMLImport_createInstance(const Reference< lang::XMultiServiceFactory > & rSMgr) throw( uno::Exception )
{
// #110680#
return (cppu::OWeakObject*)new SchXMLImport( comphelper::getComponentContext(rSMgr), SchXMLImport_getImplementationName(), SvXMLImportFlags::ALL);
return static_cast<cppu::OWeakObject*>(new SchXMLImport( comphelper::getComponentContext(rSMgr), SchXMLImport_getImplementationName(), SvXMLImportFlags::ALL));
}
// multiple storage version: one for content / styles / meta
@ -701,7 +701,7 @@ OUString SAL_CALL SchXMLImport_Styles_getImplementationName() throw()
Reference< uno::XInterface > SAL_CALL SchXMLImport_Styles_createInstance(const Reference< lang::XMultiServiceFactory > & rSMgr) throw( uno::Exception )
{
// #110680#
return (cppu::OWeakObject*)new SchXMLImport( comphelper::getComponentContext(rSMgr), SchXMLImport_Styles_getImplementationName(), SvXMLImportFlags::STYLES );
return static_cast<cppu::OWeakObject*>(new SchXMLImport( comphelper::getComponentContext(rSMgr), SchXMLImport_Styles_getImplementationName(), SvXMLImportFlags::STYLES ));
}
Sequence< OUString > SAL_CALL SchXMLImport_Content_getSupportedServiceNames() throw()
@ -719,7 +719,7 @@ OUString SAL_CALL SchXMLImport_Content_getImplementationName() throw()
Reference< uno::XInterface > SAL_CALL SchXMLImport_Content_createInstance(const Reference< lang::XMultiServiceFactory > & rSMgr) throw( uno::Exception )
{
// #110680#
return (cppu::OWeakObject*)new SchXMLImport( comphelper::getComponentContext(rSMgr), SchXMLImport_Content_getImplementationName(), SvXMLImportFlags::CONTENT | SvXMLImportFlags::AUTOSTYLES | SvXMLImportFlags::FONTDECLS );
return static_cast<cppu::OWeakObject*>(new SchXMLImport( comphelper::getComponentContext(rSMgr), SchXMLImport_Content_getImplementationName(), SvXMLImportFlags::CONTENT | SvXMLImportFlags::AUTOSTYLES | SvXMLImportFlags::FONTDECLS ));
}
Sequence< OUString > SAL_CALL SchXMLImport_Meta_getSupportedServiceNames() throw()
@ -737,7 +737,7 @@ OUString SAL_CALL SchXMLImport_Meta_getImplementationName() throw()
Reference< uno::XInterface > SAL_CALL SchXMLImport_Meta_createInstance(const Reference< lang::XMultiServiceFactory > & rSMgr) throw( uno::Exception )
{
// #110680#
return (cppu::OWeakObject*)new SchXMLImport( comphelper::getComponentContext(rSMgr), SchXMLImport_Meta_getImplementationName(), SvXMLImportFlags::META );
return static_cast<cppu::OWeakObject*>(new SchXMLImport( comphelper::getComponentContext(rSMgr), SchXMLImport_Meta_getImplementationName(), SvXMLImportFlags::META ));
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */

View File

@ -403,7 +403,7 @@ void SvXMLExport::_InitCtor()
GetXMLToken(XML_NP_CSS3TEXT), GetXMLToken(XML_N_CSS3TEXT), XML_NAMESPACE_CSS3TEXT );
}
mxAttrList = (xml::sax::XAttributeList*)mpAttrList;
mxAttrList = static_cast<xml::sax::XAttributeList*>(mpAttrList);
msGraphicObjectProtocol = "vnd.sun.star.GraphicObject:";
msEmbeddedObjectProtocol = "vnd.sun.star.EmbeddedObject:";

View File

@ -1431,7 +1431,7 @@ void AnimationNodeContext::postProcessRootNode( SvXMLImport& /*rImport*/, const
Reference< XInterface > SAL_CALL AnimationsImport_createInstance(const Reference< XMultiServiceFactory > & rSMgr) throw( Exception )
{
return (cppu::OWeakObject*)new xmloff::AnimationsImport( comphelper::getComponentContext(rSMgr) );
return static_cast<cppu::OWeakObject*>(new xmloff::AnimationsImport( comphelper::getComponentContext(rSMgr) ));
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */

View File

@ -2752,7 +2752,7 @@ OUString SAL_CALL classname##_getImplementationName() throw()\
}\
uno::Reference< uno::XInterface > SAL_CALL classname##_createInstance(const uno::Reference< lang::XMultiServiceFactory > & rSMgr) throw( uno::Exception )\
{\
return (cppu::OWeakObject*)new SdXMLExport( comphelper::getComponentContext(rSMgr), implementationname, draw, flags ); \
return static_cast<cppu::OWeakObject*>(new SdXMLExport( comphelper::getComponentContext(rSMgr), implementationname, draw, flags )); \
}
SERVICE( XMLImpressExportOasis, "com.sun.star.comp.Impress.XMLOasisExporter", "XMLImpressExportOasis", false, SvXMLExportFlags::OASIS|SvXMLExportFlags::META|SvXMLExportFlags::STYLES|SvXMLExportFlags::MASTERSTYLES|SvXMLExportFlags::AUTOSTYLES|SvXMLExportFlags::CONTENT|SvXMLExportFlags::SCRIPTS|SvXMLExportFlags::SETTINGS|SvXMLExportFlags::FONTDECLS|SvXMLExportFlags::EMBEDDED );

View File

@ -264,7 +264,7 @@ OUString SAL_CALL classname##_getImplementationName() throw()\
}\
uno::Reference< uno::XInterface > SAL_CALL classname##_createInstance(const uno::Reference< lang::XMultiServiceFactory > & rSMgr) throw( uno::Exception )\
{\
return (cppu::OWeakObject*)new SdXMLImport( comphelper::getComponentContext(rSMgr), implementationname, draw, flags ); \
return static_cast<cppu::OWeakObject*>(new SdXMLImport( comphelper::getComponentContext(rSMgr), implementationname, draw, flags )); \
}
SERVICE( XMLImpressImportOasis, "com.sun.star.comp.Impress.XMLOasisImporter", "XMLImpressImportOasis", false, SvXMLImportFlags::ALL )

View File

@ -200,7 +200,7 @@ uno::Reference< uno::XInterface > SAL_CALL XMLMetaExportComponent_createInstance
const uno::Reference< lang::XMultiServiceFactory > & rSMgr)
throw( uno::Exception )
{
return (cppu::OWeakObject*)new XMLMetaExportComponent( comphelper::getComponentContext(rSMgr), XMLMetaExportComponent_getImplementationName(), SvXMLExportFlags::META|SvXMLExportFlags::OASIS);
return static_cast<cppu::OWeakObject*>(new XMLMetaExportComponent( comphelper::getComponentContext(rSMgr), XMLMetaExportComponent_getImplementationName(), SvXMLExportFlags::META|SvXMLExportFlags::OASIS));
}
uno::Sequence< OUString > SAL_CALL XMLMetaExportOOO_getSupportedServiceNames()
@ -221,7 +221,7 @@ uno::Reference< uno::XInterface > SAL_CALL XMLMetaExportOOO_createInstance(
const uno::Reference< lang::XMultiServiceFactory > & rSMgr)
throw( uno::Exception )
{
return (cppu::OWeakObject*)new XMLMetaExportComponent( comphelper::getComponentContext(rSMgr), XMLMetaExportOOO_getImplementationName(), SvXMLExportFlags::META);
return static_cast<cppu::OWeakObject*>(new XMLMetaExportComponent( comphelper::getComponentContext(rSMgr), XMLMetaExportOOO_getImplementationName(), SvXMLExportFlags::META));
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */

View File

@ -92,7 +92,7 @@ uno::Reference< uno::XInterface > SAL_CALL XMLMetaImportComponent_createInstance
throw( uno::Exception )
{
// #110680#
return (cppu::OWeakObject*)new XMLMetaImportComponent( comphelper::getComponentContext(rSMgr));
return static_cast<cppu::OWeakObject*>(new XMLMetaImportComponent( comphelper::getComponentContext(rSMgr)));
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */

View File

@ -226,7 +226,7 @@ Reference< XInterface > SAL_CALL XMLAutoTextEventExport_createInstance(
const Reference< XMultiServiceFactory > & rSMgr)
throw( Exception )
{
return (cppu::OWeakObject*)new XMLAutoTextEventExport( comphelper::getComponentContext(rSMgr), XMLAutoTextEventExport_getImplementationName(), SvXMLExportFlags::ALL|SvXMLExportFlags::OASIS);
return static_cast<cppu::OWeakObject*>(new XMLAutoTextEventExport( comphelper::getComponentContext(rSMgr), XMLAutoTextEventExport_getImplementationName(), SvXMLExportFlags::ALL|SvXMLExportFlags::OASIS));
}
// methods to support the component registration
@ -248,7 +248,7 @@ Reference< XInterface > SAL_CALL XMLAutoTextEventExportOOO_createInstance(
const Reference< XMultiServiceFactory > & rSMgr)
throw( Exception )
{
return (cppu::OWeakObject*)new XMLAutoTextEventExport( comphelper::getComponentContext(rSMgr), XMLAutoTextEventExportOOO_getImplementationName(), SvXMLExportFlags::ALL);
return static_cast<cppu::OWeakObject*>(new XMLAutoTextEventExport( comphelper::getComponentContext(rSMgr), XMLAutoTextEventExportOOO_getImplementationName(), SvXMLExportFlags::ALL));
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */

View File

@ -122,7 +122,7 @@ Reference< XInterface > SAL_CALL XMLAutoTextEventImport_createInstance(
const Reference< XMultiServiceFactory > & rSMgr)
throw( Exception )
{
return (cppu::OWeakObject*)new XMLAutoTextEventImport( comphelper::getComponentContext(rSMgr) );
return static_cast<cppu::OWeakObject*>(new XMLAutoTextEventImport( comphelper::getComponentContext(rSMgr) ));
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */

View File

@ -129,7 +129,7 @@ void XMLPropertyBackpatcher<A>::SetProperty(
{
// create backpatch list for this name
BackpatchListType* pTmp = new BackpatchListType() ;
aBackpatchListMap[sName] = (void*)pTmp;
aBackpatchListMap[sName] = static_cast<void*>(pTmp);
}
// insert footnote

View File

@ -1590,7 +1590,7 @@ OUString XMLTextImportHelper::SetStyleAndAttrs(
}
}
GetTextListHelper().SetListItem( (XMLTextListItemContext *)0 );
GetTextListHelper().SetListItem( nullptr );
}
else
{

View File

@ -2071,7 +2071,7 @@ Reference< XInterface > SAL_CALL OOo2OasisTransformer_createInstance(
const Reference< XMultiServiceFactory > & )
throw( Exception )
{
return (cppu::OWeakObject*)new OOo2OasisTransformer();
return static_cast<cppu::OWeakObject*>(new OOo2OasisTransformer());
}
#define OOO_IMPORTER( className, implName, subServiceName ) \
@ -2091,8 +2091,8 @@ Reference< XInterface > SAL_CALL className##_createInstance( \
const Reference< XMultiServiceFactory > & ) \
throw( Exception ) \
{ \
return (cppu::OWeakObject*)new OOo2OasisTransformer( implName, \
subServiceName ); \
return static_cast<cppu::OWeakObject*>(new OOo2OasisTransformer( implName, \
subServiceName )); \
}
OOO_IMPORTER( XMLWriterImportOOO,

View File

@ -2038,7 +2038,7 @@ Reference< XInterface > SAL_CALL Oasis2OOoTransformer_createInstance(
throw( Exception )
{
SAL_INFO("xmloff.transform", "Creating Oasis2OOoTransformer");
return (cppu::OWeakObject*)new Oasis2OOoTransformer;
return static_cast<cppu::OWeakObject*>(new Oasis2OOoTransformer);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */