Kaydet (Commit) 6de82da0 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

loplugin:nullptr (automatic rewrite)

Change-Id: Ie91fbfc9369fe9f2de1cf12c746598a80c2233c1
üst 1e661634
......@@ -49,7 +49,7 @@ struct XMLSCRIPT_DLLPUBLIC LibDescriptorArray
LibDescriptor* mpLibs;
sal_Int32 mnLibCount;
LibDescriptorArray() { mpLibs = NULL; mnLibCount = 0; }
LibDescriptorArray() { mpLibs = nullptr; mnLibCount = 0; }
LibDescriptorArray( sal_Int32 nLibCount );
~LibDescriptorArray();
......
......@@ -30,29 +30,29 @@ namespace xmlscript
{
create_DocumentHandlerImpl, getImplementationName_DocumentHandlerImpl,
getSupportedServiceNames_DocumentHandlerImpl, ::cppu::createSingleComponentFactory,
0, 0
nullptr, 0
},
{
create_XMLBasicExporter, getImplementationName_XMLBasicExporter,
getSupportedServiceNames_XMLBasicExporter, ::cppu::createSingleComponentFactory,
0, 0
nullptr, 0
},
{
create_XMLOasisBasicExporter, getImplementationName_XMLOasisBasicExporter,
getSupportedServiceNames_XMLOasisBasicExporter, ::cppu::createSingleComponentFactory,
0, 0
nullptr, 0
},
{
create_XMLBasicImporter, getImplementationName_XMLBasicImporter,
getSupportedServiceNames_XMLBasicImporter, ::cppu::createSingleComponentFactory,
0, 0
nullptr, 0
},
{
create_XMLOasisBasicImporter, getImplementationName_XMLOasisBasicImporter,
getSupportedServiceNames_XMLOasisBasicImporter, ::cppu::createSingleComponentFactory,
0, 0
nullptr, 0
},
{ 0, 0, 0, 0, 0, 0 }
{ nullptr, nullptr, nullptr, nullptr, nullptr, 0 }
};
}
......
......@@ -193,7 +193,7 @@ DocumentHandlerImpl::DocumentHandlerImpl(
m_nLastPrefix_lookup( UID_UNKNOWN ),
m_aLastPrefix_lookup( "<<< unknown URI >>>" ),
m_nSkipElements( 0 ),
m_pMutex( 0 )
m_pMutex( nullptr )
{
m_elements.reserve( 10 );
......@@ -203,7 +203,7 @@ DocumentHandlerImpl::DocumentHandlerImpl(
DocumentHandlerImpl::~DocumentHandlerImpl() throw ()
{
if (m_pMutex != 0)
if (m_pMutex != nullptr)
{
delete m_pMutex;
#if OSL_DEBUG_LEVEL == 0
......
......@@ -1053,7 +1053,7 @@ void ElementDescriptor::readBullitinBoard( StyleBag * all_styles )
Sequence< OUString > aElements( xDialogModel->getElementNames() );
OUString const * pElements = aElements.getConstArray();
ElementDescriptor * pRadioGroup = 0;
ElementDescriptor * pRadioGroup = nullptr;
sal_Int32 nPos;
for ( nPos = 0; nPos < aElements.getLength(); ++nPos )
......@@ -1072,7 +1072,7 @@ void ElementDescriptor::readBullitinBoard( StyleBag * all_styles )
if (! xServiceInfo.is())
continue;
ElementDescriptor * pElem = 0;
ElementDescriptor * pElem = nullptr;
// group up radio buttons
if ( xServiceInfo->supportsService( "com.sun.star.awt.UnoControlRadioButtonModel" ) )
......@@ -1089,7 +1089,7 @@ void ElementDescriptor::readBullitinBoard( StyleBag * all_styles )
}
else // no radio
{
pRadioGroup = 0; // close radiogroup
pRadioGroup = nullptr; // close radiogroup
if (xServiceInfo->supportsService( "com.sun.star.awt.UnoControlButtonModel" ) )
{
......
......@@ -1444,7 +1444,7 @@ static StringTriple const s_aEventTranslations[] =
{ "com.sun.star.form.XDatabaseParameterListener", "approveParameter", "on-supplyparameter" },
{ "com.sun.star.sdb.XSQLErrorListener", "errorOccured", "on-error" },
{ "com.sun.star.awt.XAdjustmentListener", "adjustmentValueChanged", "on-adjustmentvaluechange" },
{ 0, 0, 0 }
{ nullptr, nullptr, nullptr }
};
extern StringTriple const * const g_pEventTranslations;
StringTriple const * const g_pEventTranslations = s_aEventTranslations;
......@@ -1769,7 +1769,7 @@ Reference< xml::input::XElement > DialogImport::startRootElement(
// window
else if ( rLocalName == "window" )
{
return new WindowElement( rLocalName, xAttributes, 0, this );
return new WindowElement( rLocalName, xAttributes, nullptr, this );
}
else
{
......@@ -1817,7 +1817,7 @@ Reference< xml::input::XElement > DialogImport::getStyle(
return (*_pStyles)[ nPos ];
}
}
return 0;
return nullptr;
}
Reference< xml::sax::XDocumentHandler > SAL_CALL importDialogModel(
......
......@@ -486,7 +486,7 @@ void BasicImport::setDocumentLocator( const Reference< xml::sax::XLocator >& /*x
if ( xLibContainer.is() )
{
xElement.set( new BasicLibrariesElement( rLocalName, xAttributes, 0, this, xLibContainer ) );
xElement.set( new BasicLibrariesElement( rLocalName, xAttributes, nullptr, this, xLibContainer ) );
}
}
else
......
......@@ -116,7 +116,7 @@ struct LibraryImport
public:
explicit LibraryImport( LibDescriptorArray* pLibArray )
: mpLibArray(pLibArray)
, mpLibDesc(NULL)
, mpLibDesc(nullptr)
, XMLNS_LIBRARY_UID(0)
, XMLNS_XLINK_UID(0)
{
......@@ -124,7 +124,7 @@ public:
// Single library mode
explicit LibraryImport(LibDescriptor* pLibDesc)
: mpLibArray(NULL)
: mpLibArray(nullptr)
, mpLibDesc(pLibDesc)
, XMLNS_LIBRARY_UID(0)
, XMLNS_XLINK_UID(0)
......
......@@ -154,7 +154,7 @@ Reference< xml::input::XElement > LibraryImport::startRootElement(
}
else if ( mpLibArray && rLocalName == "libraries" )
{
return new LibrariesElement( rLocalName, xAttributes, 0, this );
return new LibrariesElement( rLocalName, xAttributes, nullptr, this );
}
else if ( mpLibDesc && rLocalName == "library" )
{
......@@ -166,7 +166,7 @@ Reference< xml::input::XElement > LibraryImport::startRootElement(
getBoolAttr( &aDesc.bPasswordProtected, "passwordprotected", xAttributes, XMLNS_LIBRARY_UID );
getBoolAttr( &aDesc.bPreload, "preload", xAttributes, XMLNS_LIBRARY_UID );
return new LibraryElement( rLocalName, xAttributes, 0, this );
return new LibraryElement( rLocalName, xAttributes, nullptr, this );
}
else
{
......
......@@ -161,7 +161,7 @@ Reference< xml::input::XElement > ModuleImport::startRootElement(
mrModuleDesc.aLanguage = xAttributes->getValueByUidName( XMLNS_SCRIPT_UID, "language" );
mrModuleDesc.aModuleType = xAttributes->getValueByUidName( XMLNS_SCRIPT_UID, "moduleType" );
return new ModuleElement( rLocalName, xAttributes, 0, this );
return new ModuleElement( rLocalName, xAttributes, nullptr, this );
}
else
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment