diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-11-10 10:29:15 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-11-10 10:32:01 +0100 |
commit | 51b45df6bba163dec7ba91c700de695ad517e5dd (patch) | |
tree | 566633496f4048112c75edbbe250b0f01d86a8dd /xmloff/source/core | |
parent | 87bae0e188aa3ce3c31d1aa91707c0fad6b81b65 (diff) |
loplugin:nullptr (automatic rewrite)
Change-Id: I8690de2cb68dcfedc9f2239ce66cea06fd94bc16
Diffstat (limited to 'xmloff/source/core')
-rw-r--r-- | xmloff/source/core/DocumentSettingsContext.cxx | 12 | ||||
-rw-r--r-- | xmloff/source/core/DomBuilderContext.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/core/RDFaExportHelper.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/core/RDFaImportHelper.cxx | 4 | ||||
-rw-r--r-- | xmloff/source/core/SettingsExportHelper.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/core/XMLEmbeddedObjectImportContext.cxx | 4 | ||||
-rw-r--r-- | xmloff/source/core/attrlist.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/core/facreg.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/core/nmspmap.cxx | 4 | ||||
-rw-r--r-- | xmloff/source/core/unoatrcn.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/core/xmlerror.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/core/xmlexp.cxx | 66 | ||||
-rw-r--r-- | xmloff/source/core/xmlictxt.cxx | 6 | ||||
-rw-r--r-- | xmloff/source/core/xmlimp.cxx | 42 | ||||
-rw-r--r-- | xmloff/source/core/xmltoken.cxx | 6 | ||||
-rw-r--r-- | xmloff/source/core/xmluconv.cxx | 2 |
16 files changed, 80 insertions, 80 deletions
diff --git a/xmloff/source/core/DocumentSettingsContext.cxx b/xmloff/source/core/DocumentSettingsContext.cxx index 1800cdf47a9c..ead1ffdbd319 100644 --- a/xmloff/source/core/DocumentSettingsContext.cxx +++ b/xmloff/source/core/DocumentSettingsContext.cxx @@ -228,7 +228,7 @@ SvXMLImportContext *CreateSettingsContext(SvXMLImport& rImport, sal_uInt16 p_nPr const uno::Reference<xml::sax::XAttributeList>& xAttrList, beans::PropertyValue& rProp, XMLConfigBaseContext* pBaseContext) { - SvXMLImportContext *pContext = 0; + SvXMLImportContext *pContext = nullptr; rProp.Name.clear(); sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0; @@ -305,7 +305,7 @@ SvXMLImportContext *XMLDocumentSettingsContext::CreateChildContext( sal_uInt16 p const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ) { - SvXMLImportContext *pContext = 0; + SvXMLImportContext *pContext = nullptr; OUString sName; sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0; @@ -338,12 +338,12 @@ SvXMLImportContext *XMLDocumentSettingsContext::CreateChildContext( sal_uInt16 p if (IsXMLToken(aLocalConfigName, XML_VIEW_SETTINGS)) pContext = new XMLConfigItemSetContext(GetImport(), p_nPrefix, rLocalName, xAttrList, - m_pData->aViewProps, NULL); + m_pData->aViewProps, nullptr); else if (IsXMLToken(aLocalConfigName, XML_CONFIGURATION_SETTINGS)) pContext = new XMLConfigItemSetContext(GetImport(), p_nPrefix, rLocalName, xAttrList, - m_pData->aConfigProps, NULL); + m_pData->aConfigProps, nullptr); else { m_pData->aDocSpecificSettings.push_back( SettingsGroup( aLocalConfigName, uno::Any() ) ); @@ -353,7 +353,7 @@ SvXMLImportContext *XMLDocumentSettingsContext::CreateChildContext( sal_uInt16 p pContext = new XMLConfigItemSetContext(GetImport(), p_nPrefix, rLocalName, xAttrList, - settingsPos->aSettings, NULL); + settingsPos->aSettings, nullptr); } } } @@ -602,7 +602,7 @@ void XMLConfigItemContext::EndElement() else if (IsXMLToken(msType, XML_DATETIME)) { util::DateTime aDateTime; - ::sax::Converter::parseDateTime(aDateTime, 0, msValue); + ::sax::Converter::parseDateTime(aDateTime, nullptr, msValue); mrAny <<= aDateTime; } else if (IsXMLToken(msType, XML_BASE64BINARY)) diff --git a/xmloff/source/core/DomBuilderContext.cxx b/xmloff/source/core/DomBuilderContext.cxx index 77dfda09a611..75131e6c12a4 100644 --- a/xmloff/source/core/DomBuilderContext.cxx +++ b/xmloff/source/core/DomBuilderContext.cxx @@ -126,7 +126,7 @@ void DomBuilderContext::StartElement( OUString sNamespace; sal_uInt16 nNamespaceKey = GetImport().GetNamespaceMap()._GetKeyByAttrName( - rName, NULL, NULL, &sNamespace ); + rName, nullptr, nullptr, &sNamespace ); // create attribute node and set value Reference<XElement> xElement( mxNode, UNO_QUERY_THROW ); diff --git a/xmloff/source/core/RDFaExportHelper.cxx b/xmloff/source/core/RDFaExportHelper.cxx index bfce90499f81..42a25f024191 100644 --- a/xmloff/source/core/RDFaExportHelper.cxx +++ b/xmloff/source/core/RDFaExportHelper.cxx @@ -95,7 +95,7 @@ getRelativeReference(SvXMLExport const& rExport, OUString const& rURI) } RDFaExportHelper::RDFaExportHelper(SvXMLExport & i_rExport) - : m_rExport(i_rExport), m_xRepository(0), m_Counter(0) + : m_rExport(i_rExport), m_xRepository(nullptr), m_Counter(0) { const uno::Reference<rdf::XRepositorySupplier> xRS( m_rExport.GetModel(), uno::UNO_QUERY); diff --git a/xmloff/source/core/RDFaImportHelper.cxx b/xmloff/source/core/RDFaImportHelper.cxx index d2705e557260..96d784deb850 100644 --- a/xmloff/source/core/RDFaImportHelper.cxx +++ b/xmloff/source/core/RDFaImportHelper.cxx @@ -275,7 +275,7 @@ RDFaInserter::MakeURI( OUString const & i_rURI) const if (i_rURI.startsWith("_:")) // blank node { SAL_INFO("xmloff.core", "MakeURI: cannot create URI for blank node"); - return 0; + return nullptr; } else { @@ -286,7 +286,7 @@ RDFaInserter::MakeURI( OUString const & i_rURI) const catch (uno::Exception &) { SAL_WARN("xmloff.core", "MakeURI: cannot create URI"); - return 0; + return nullptr; } } } diff --git a/xmloff/source/core/SettingsExportHelper.cxx b/xmloff/source/core/SettingsExportHelper.cxx index 5bba8272628c..8b775aa8dd53 100644 --- a/xmloff/source/core/SettingsExportHelper.cxx +++ b/xmloff/source/core/SettingsExportHelper.cxx @@ -267,7 +267,7 @@ void XMLSettingsExportHelper::exportDateTime(const util::DateTime& aValue, const m_rContext.AddAttribute( XML_NAME, rName ); m_rContext.AddAttribute( XML_TYPE, XML_DATETIME ); OUStringBuffer sBuffer; - ::sax::Converter::convertDateTime(sBuffer, aValue, 0); + ::sax::Converter::convertDateTime(sBuffer, aValue, nullptr); m_rContext.StartElement( XML_CONFIG_ITEM, true ); m_rContext.Characters( sBuffer.makeStringAndClear() ); m_rContext.EndElement( false ); diff --git a/xmloff/source/core/XMLEmbeddedObjectImportContext.cxx b/xmloff/source/core/XMLEmbeddedObjectImportContext.cxx index 8b597d5bfa3b..f17c59146951 100644 --- a/xmloff/source/core/XMLEmbeddedObjectImportContext.cxx +++ b/xmloff/source/core/XMLEmbeddedObjectImportContext.cxx @@ -65,7 +65,7 @@ const XMLServiceMapEntry_Impl aServiceMap[] = SERVICE_MAP_ENTRY( GRAPHICS, DRAW ), SERVICE_MAP_ENTRY( PRESENTATION, IMPRESS ), SERVICE_MAP_ENTRY( CHART, CHART ), - { XML_TOKEN_INVALID, 0, 0 } + { XML_TOKEN_INVALID, nullptr, 0 } }; class XMLEmbeddedObjectImportContext_Impl : public SvXMLImportContext @@ -213,7 +213,7 @@ XMLEmbeddedObjectImportContext::XMLEmbeddedObjectImportContext( "application/x-vnd.oasis.openoffice.", "application/vnd.oasis.opendocument.", "application/x-vnd.oasis.opendocument.", - NULL + nullptr }; for (int k=0; aTmp[k]; k++) { diff --git a/xmloff/source/core/attrlist.cxx b/xmloff/source/core/attrlist.cxx index 148b23e99cb4..f28a75c04fca 100644 --- a/xmloff/source/core/attrlist.cxx +++ b/xmloff/source/core/attrlist.cxx @@ -259,7 +259,7 @@ SvXMLAttributeList* SvXMLAttributeList::getImplementation( uno::Reference< uno:: xUT->getSomething( SvXMLAttributeList::getUnoTunnelId()))); } else - return NULL; + return nullptr; } // XUnoTunnel diff --git a/xmloff/source/core/facreg.cxx b/xmloff/source/core/facreg.cxx index be929c2f78a2..c9dbf27ddc57 100644 --- a/xmloff/source/core/facreg.cxx +++ b/xmloff/source/core/facreg.cxx @@ -49,7 +49,7 @@ extern "C" XMLOFF_DLLPUBLIC void * SAL_CALL xo_component_getFactory( const sal_Char * pImplName, void * pServiceManager, void * /*pRegistryKey*/ ) { - void * pRet = 0; + void * pRet = nullptr; if( pServiceManager ) { uno::Reference< lang::XMultiServiceFactory > xMSF( static_cast< lang::XMultiServiceFactory * >( pServiceManager ) ); diff --git a/xmloff/source/core/nmspmap.cxx b/xmloff/source/core/nmspmap.cxx index 77fe129e1587..c5bfce108572 100644 --- a/xmloff/source/core/nmspmap.cxx +++ b/xmloff/source/core/nmspmap.cxx @@ -274,7 +274,7 @@ sal_uInt16 SvXMLNamespaceMap::_GetKeyByAttrName( OUString *pLocalName, bool bCache) const { - return _GetKeyByAttrName( rAttrName, 0, pLocalName, 0, bCache ); + return _GetKeyByAttrName( rAttrName, nullptr, pLocalName, nullptr, bCache ); } sal_uInt16 SvXMLNamespaceMap::_GetKeyByAttrName( const OUString& rAttrName, @@ -430,7 +430,7 @@ sal_uInt16 SvXMLNamespaceMap::GetKeyByAttrName( OUString *pLocalName, sal_uInt16 /*nIdxGuess*/) const { - return _GetKeyByAttrName( rAttrName, 0, pLocalName ); + return _GetKeyByAttrName( rAttrName, nullptr, pLocalName ); } sal_uInt16 SvXMLNamespaceMap::GetKeyByAttrName( const OUString& rAttrName, diff --git a/xmloff/source/core/unoatrcn.cxx b/xmloff/source/core/unoatrcn.cxx index 5c2bc39c8a53..b196291cc725 100644 --- a/xmloff/source/core/unoatrcn.cxx +++ b/xmloff/source/core/unoatrcn.cxx @@ -40,7 +40,7 @@ uno::Reference< uno::XInterface > SvUnoAttributeContainer_CreateInstance() SvUnoAttributeContainer::SvUnoAttributeContainer( SvXMLAttrContainerData* pContainer) : mpContainer( pContainer ) { - if( mpContainer == NULL ) + if( mpContainer == nullptr ) mpContainer = new SvXMLAttrContainerData; } diff --git a/xmloff/source/core/xmlerror.cxx b/xmloff/source/core/xmlerror.cxx index e5900b857772..738e1ac0d2c2 100644 --- a/xmloff/source/core/xmlerror.cxx +++ b/xmloff/source/core/xmlerror.cxx @@ -216,7 +216,7 @@ void XMLErrors::ThrowErrorAsSAXException(sal_Int32 nIdMask) Any aAny; aAny <<= rErr.aParams; throw SAXParseException( - rErr.sExceptionMessage, NULL, aAny, + rErr.sExceptionMessage, nullptr, aAny, rErr.sPublicId, rErr.sSystemId, rErr.nRow, rErr.nColumn ); } } diff --git a/xmloff/source/core/xmlexp.cxx b/xmloff/source/core/xmlexp.cxx index 70d392db1678..a2b8ee1b40de 100644 --- a/xmloff/source/core/xmlexp.cxx +++ b/xmloff/source/core/xmlexp.cxx @@ -139,7 +139,7 @@ const XMLServiceMapEntry_Impl aServiceMap[] = SERVICE_MAP_ENTRY( DRAW ), // it must appear before Draw SERVICE_MAP_ENTRY( MATH ), SERVICE_MAP_ENTRY( CHART ), - { 0, 0, 0, 0 } + { nullptr, 0, nullptr, 0 } }; class SettingsExportFacade : public ::xmloff::XMLSettingsExportContext @@ -236,7 +236,7 @@ void SAL_CALL SvXMLExportEventListener::disposing( const lang::EventObject& ) if (pExport) { pExport->DisposingModel(); - pExport = NULL; + pExport = nullptr; } } @@ -448,11 +448,11 @@ SvXMLExport::SvXMLExport( mpNamespaceMap( new SvXMLNamespaceMap ), mpUnitConv( new SvXMLUnitConverter( xContext, util::MeasureUnit::MM_100TH, eDefaultMeasureUnit) ), - mpNumExport(0L), - mpProgressBarHelper( NULL ), - mpEventExport( NULL ), - mpImageMapExport( NULL ), - mpXMLErrors( NULL ), + mpNumExport(nullptr), + mpProgressBarHelper( nullptr ), + mpEventExport( nullptr ), + mpImageMapExport( nullptr ), + mpXMLErrors( nullptr ), mbExtended( false ), meClass( eClass ), mnExportFlags( nExportFlags ), @@ -479,11 +479,11 @@ SvXMLExport::SvXMLExport( mpNamespaceMap( new SvXMLNamespaceMap ), mpUnitConv( new SvXMLUnitConverter( xContext, util::MeasureUnit::MM_100TH, eDefaultMeasureUnit) ), - mpNumExport(0L), - mpProgressBarHelper( NULL ), - mpEventExport( NULL ), - mpImageMapExport( NULL ), - mpXMLErrors( NULL ), + mpNumExport(nullptr), + mpProgressBarHelper( nullptr ), + mpEventExport( nullptr ), + mpImageMapExport( nullptr ), + mpXMLErrors( nullptr ), mbExtended( false ), meClass( XML_TOKEN_INVALID ), mnExportFlags( SvXMLExportFlags::NONE ), @@ -518,11 +518,11 @@ SvXMLExport::SvXMLExport( mpUnitConv( new SvXMLUnitConverter( xContext, util::MeasureUnit::MM_100TH, SvXMLUnitConverter::GetMeasureUnit(eDefaultFieldUnit)) ), - mpNumExport(0L), - mpProgressBarHelper( NULL ), - mpEventExport( NULL ), - mpImageMapExport( NULL ), - mpXMLErrors( NULL ), + mpNumExport(nullptr), + mpProgressBarHelper( nullptr ), + mpEventExport( nullptr ), + mpImageMapExport( nullptr ), + mpXMLErrors( nullptr ), mbExtended( false ), meClass( XML_TOKEN_INVALID ), mnExportFlags( SvXMLExportFlags::NONE ), @@ -724,7 +724,7 @@ void SAL_CALL SvXMLExport::initialize( const uno::Sequence< uno::Any >& aArgumen mxHandler = xTmpDocHandler; *pAny >>= mxExtHandler; - if (mxNumberFormatsSupplier.is() && mpNumExport == NULL) + if (mxNumberFormatsSupplier.is() && mpNumExport == nullptr) mpNumExport = new SvXMLNumFmtExport(*this, mxNumberFormatsSupplier); } @@ -861,7 +861,7 @@ sal_Bool SAL_CALL SvXMLExport::filter( const uno::Sequence< beans::PropertyValue css::uno::Any ex(cppu::getCaughtException()); SetError( XMLERROR_FLAG_ERROR | XMLERROR_FLAG_SEVERE | XMLERROR_API, Sequence<OUString>(), - ex.getValueTypeName() + ": \"" + e.Message + "\"", NULL ); + ex.getValueTypeName() + ": \"" + e.Message + "\"", nullptr ); } // return true only if no error occurred @@ -1421,7 +1421,7 @@ sal_uInt32 SvXMLExport::exportDoc( enum ::xmloff::token::XMLTokenEnum eClass ) // office:version = ... if( !mbExtended ) { - const sal_Char* pVersion = 0; + const sal_Char* pVersion = nullptr; switch( getDefaultVersion() ) { case SvtSaveOptions::ODFVER_LATEST: pVersion = sXML_1_2; break; @@ -1943,7 +1943,7 @@ void SvXMLExport::exportAnnotationMeta(const uno::Reference<drawing::XShape>&) sal_Int32 SvXMLExport::dataStyleForceSystemLanguage(sal_Int32 nFormat) const { - return ( mpNumExport != NULL ) + return ( mpNumExport != nullptr ) ? mpNumExport->ForceSystemLanguage( nFormat ) : nFormat; } @@ -2086,10 +2086,10 @@ ProgressBarHelper* SvXMLExport::GetProgressBarHelper() XMLEventExport& SvXMLExport::GetEventExport() { - if( NULL == mpEventExport) + if( nullptr == mpEventExport) { // create EventExport on demand - mpEventExport = new XMLEventExport(*this, NULL); + mpEventExport = new XMLEventExport(*this, nullptr); // and register standard handlers + names OUString sStarBasic("StarBasic"); @@ -2105,7 +2105,7 @@ XMLEventExport& SvXMLExport::GetEventExport() XMLImageMapExport& SvXMLExport::GetImageMapExport() { // image map export, create on-demand - if( NULL == mpImageMapExport ) + if( nullptr == mpImageMapExport ) { mpImageMapExport = new XMLImageMapExport(*this); } @@ -2135,7 +2135,7 @@ SvXMLExport* SvXMLExport::getImplementation( uno::Reference< uno::XInterface > x xUT->getSomething( SvXMLExport::getUnoTunnelId()))); } else - return NULL; + return nullptr; } // XUnoTunnel @@ -2257,14 +2257,14 @@ void SvXMLExport::StartElement(const OUString& rName, { Sequence<OUString> aPars(1); aPars[0] = rName; - SetError( XMLERROR_SAX|XMLERROR_FLAG_WARNING, aPars, e.Message, NULL ); + SetError( XMLERROR_SAX|XMLERROR_FLAG_WARNING, aPars, e.Message, nullptr ); } catch (const SAXException& e) { Sequence<OUString> aPars(1); aPars[0] = rName; SetError( XMLERROR_SAX|XMLERROR_FLAG_ERROR|XMLERROR_FLAG_SEVERE, - aPars, e.Message, NULL ); + aPars, e.Message, nullptr ); } } ClearAttrList(); @@ -2283,14 +2283,14 @@ void SvXMLExport::Characters(const OUString& rChars) { Sequence<OUString> aPars(1); aPars[0] = rChars; - SetError( XMLERROR_SAX|XMLERROR_FLAG_WARNING, aPars, e.Message, NULL ); + SetError( XMLERROR_SAX|XMLERROR_FLAG_WARNING, aPars, e.Message, nullptr ); } catch (const SAXException& e) { Sequence<OUString> aPars(1); aPars[0] = rChars; SetError( XMLERROR_SAX|XMLERROR_FLAG_ERROR|XMLERROR_FLAG_SEVERE, - aPars, e.Message, NULL ); + aPars, e.Message, nullptr ); } } } @@ -2331,7 +2331,7 @@ void SvXMLExport::EndElement(const OUString& rName, Sequence<OUString> aPars(1); aPars[0] = rName; SetError( XMLERROR_SAX|XMLERROR_FLAG_ERROR|XMLERROR_FLAG_SEVERE, - aPars, e.Message, NULL ); + aPars, e.Message, nullptr ); } } } @@ -2351,7 +2351,7 @@ void SvXMLExport::IgnorableWhitespace() { Sequence<OUString> aPars(0); SetError( XMLERROR_SAX|XMLERROR_FLAG_ERROR|XMLERROR_FLAG_SEVERE, - aPars, e.Message, NULL ); + aPars, e.Message, nullptr ); } } } @@ -2375,7 +2375,7 @@ void SvXMLExport::SetError( mnErrorFlags |= SvXMLErrorFlags::DO_NOTHING; // create error list on demand - if ( mpXMLErrors == NULL ) + if ( mpXMLErrors == nullptr ) mpXMLErrors = new XMLErrors(); // save error information @@ -2386,7 +2386,7 @@ void SvXMLExport::SetError( sal_Int32 nId, const Sequence<OUString>& rMsgParams) { - SetError( nId, rMsgParams, "", NULL ); + SetError( nId, rMsgParams, "", nullptr ); } void SvXMLExport::DisposingModel() diff --git a/xmloff/source/core/xmlictxt.cxx b/xmloff/source/core/xmlictxt.cxx index ca897d080576..dafd6af90696 100644 --- a/xmloff/source/core/xmlictxt.cxx +++ b/xmloff/source/core/xmlictxt.cxx @@ -35,14 +35,14 @@ SvXMLImportContext::SvXMLImportContext( SvXMLImport& rImp, sal_uInt16 nPrfx, mrImport( rImp ), mnPrefix( nPrfx ), maLocalName( rLName ), - mpRewindMap( 0 ) + mpRewindMap( nullptr ) { } SvXMLImportContext::SvXMLImportContext( SvXMLImport& rImp ) : mrImport( rImp ), mnPrefix ( 0 ), - mpRewindMap( 0 ) + mpRewindMap( nullptr ) { } @@ -102,7 +102,7 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL SvXMLImportContext::cre (const OUString &, const OUString &, const uno::Reference< xml::sax::XFastAttributeList > &) throw (uno::RuntimeException, xml::sax::SAXException, std::exception) { - return 0; + return nullptr; } void SAL_CALL SvXMLImportContext::characters(const OUString &) diff --git a/xmloff/source/core/xmlimp.cxx b/xmloff/source/core/xmlimp.cxx index 7998494d18f5..5d3c9fa84d4a 100644 --- a/xmloff/source/core/xmlimp.cxx +++ b/xmloff/source/core/xmlimp.cxx @@ -135,7 +135,7 @@ void SAL_CALL SvXMLImportEventListener::disposing( const lang::EventObject& ) if (pImport) { pImport->DisposingModel(); - pImport = NULL; + pImport = nullptr; } } @@ -301,8 +301,8 @@ public: SvXMLImport_Impl( const uno::Reference< uno::XComponentContext >& rxContext, OUString const & theImplementationName) - : hBatsFontConv( 0 ) - , hMathFontConv( 0 ) + : hBatsFontConv( nullptr ) + , hMathFontConv( nullptr ) , mbOwnGraphicResolver( false ) , mbOwnEmbeddedResolver( false ) , mbIsOOoXML(false) @@ -422,11 +422,11 @@ SvXMLImport::SvXMLImport( mpContexts( new SvXMLImportContexts_Impl ), mpFastContexts( new FastSvXMLImportContexts_Impl ), - mpNumImport( NULL ), - mpProgressBarHelper( NULL ), - mpEventImportHelper( NULL ), - mpXMLErrors( NULL ), - mpStyleMap(0), + mpNumImport( nullptr ), + mpProgressBarHelper( nullptr ), + mpEventImportHelper( nullptr ), + mpXMLErrors( nullptr ), + mpStyleMap(nullptr), mnImportFlags( nImportFlags ), mnErrorFlags(SvXMLErrorFlags::NO), mbIsFormsSupported( true ), @@ -553,7 +553,7 @@ void SAL_CALL SvXMLImport::endDocument() if (mpNumImport) { delete mpNumImport; - mpNumImport = NULL; + mpNumImport = nullptr; } if (mxImportInfo.is()) { @@ -606,7 +606,7 @@ void SAL_CALL SvXMLImport::endDocument() // The shape import helper does the z-order sorting in the dtor, // so it must be deleted here, too. - mxShapeImport = NULL; + mxShapeImport = nullptr; if( mpImpl->mbOwnGraphicResolver ) { @@ -622,10 +622,10 @@ void SAL_CALL SvXMLImport::endDocument() if( mpStyleMap ) { mpStyleMap->release(); - mpStyleMap = 0; + mpStyleMap = nullptr; } - if ( mpXMLErrors != NULL ) + if ( mpXMLErrors != nullptr ) { mpXMLErrors->ThrowErrorAsSAXException( XMLERROR_FLAG_SEVERE ); } @@ -635,7 +635,7 @@ void SAL_CALL SvXMLImport::startElement( const OUString& rName, const uno::Reference< xml::sax::XAttributeList >& xAttrList ) throw(xml::sax::SAXException, uno::RuntimeException, std::exception) { - SvXMLNamespaceMap *pRewindMap = 0; + SvXMLNamespaceMap *pRewindMap = nullptr; // SAL_INFO("svg", "startElement " << rName); // Process namespace attributes. This must happen before creating the // context, because namespace decaration apply to the element name itself. @@ -769,7 +769,7 @@ rName // Delete the current context. pContext->ReleaseRef(); - pContext = 0; + pContext = nullptr; // Rewind a namespace map. if( pRewindMap ) @@ -851,7 +851,7 @@ void SAL_CALL SvXMLImport::endFastElement (sal_Int32 Element) uno::Reference< XFastContextHandler > xContext = mpFastContexts->back(); mpFastContexts->pop_back(); xContext->endFastElement( Element ); - xContext = 0; + xContext = nullptr; } } @@ -942,7 +942,7 @@ void SAL_CALL SvXMLImport::setTargetDocument( const uno::Reference< lang::XCompo if( mpNumImport ) { delete mpNumImport; - mpNumImport = 0; + mpNumImport = nullptr; } } @@ -1723,7 +1723,7 @@ void SvXMLImport::_CreateNumberFormatsSupplier() void SvXMLImport::_CreateDataStylesImport() { - SAL_WARN_IF( mpNumImport != NULL, "xmloff.core", "data styles import already exists!" ); + SAL_WARN_IF( mpNumImport != nullptr, "xmloff.core", "data styles import already exists!" ); uno::Reference<util::XNumberFormatsSupplier> xNum = GetNumberFormatsSupplier(); if ( xNum.is() ) @@ -1781,7 +1781,7 @@ void SvXMLImport::SetError( mnErrorFlags |= SvXMLErrorFlags::DO_NOTHING; // create error list on demand - if ( mpXMLErrors == NULL ) + if ( mpXMLErrors == nullptr ) mpXMLErrors = new XMLErrors(); // save error information @@ -1794,7 +1794,7 @@ void SvXMLImport::SetError( sal_Int32 nId, const Sequence<OUString>& rMsgParams) { - SetError( nId, rMsgParams, "", NULL ); + SetError( nId, rMsgParams, "", nullptr ); } void SvXMLImport::SetError( @@ -1837,8 +1837,8 @@ void SvXMLImport::DisposingModel() if( mxMasterStyles.Is() ) static_cast<SvXMLStylesContext *>(&mxMasterStyles)->Clear(); - mxModel.set(0); - mxEventListener.set(NULL); + mxModel.set(nullptr); + mxEventListener.set(nullptr); } ::comphelper::UnoInterfaceToUniqueIdentifierMapper& SvXMLImport::getInterfaceToIdentifierMapper() diff --git a/xmloff/source/core/xmltoken.cxx b/xmloff/source/core/xmltoken.cxx index 97809c6887f3..3f46062204be 100644 --- a/xmloff/source/core/xmltoken.cxx +++ b/xmloff/source/core/xmltoken.cxx @@ -43,7 +43,7 @@ namespace xmloff { namespace token { #if OSL_DEBUG_LEVEL > 0 - #define TOKEN( s, e ) { sizeof(s)-1, s, NULL, e } + #define TOKEN( s, e ) { sizeof(s)-1, s, nullptr, e } #else #define TOKEN( s, e ) { sizeof(s)-1, s, NULL } #endif @@ -51,7 +51,7 @@ namespace xmloff { namespace token { struct XMLTokenEntry aTokenList[] = { #if OSL_DEBUG_LEVEL > 0 - { 0, NULL, NULL, XML_TOKEN_START }, + { 0, nullptr, nullptr, XML_TOKEN_START }, #else { 0, NULL, NULL }, // XML_TOKEN_START #endif @@ -3253,7 +3253,7 @@ namespace xmloff { namespace token { TOKEN( "min-decimal-places", XML_MIN_DECIMAL_PLACES ), #if OSL_DEBUG_LEVEL > 0 - { 0, NULL, NULL, XML_TOKEN_END } + { 0, nullptr, nullptr, XML_TOKEN_END } #else { 0, NULL, NULL /* XML_TOKEN_END */ } #endif diff --git a/xmloff/source/core/xmluconv.cxx b/xmloff/source/core/xmluconv.cxx index e0652bbdbb12..9d0fc3cad9b4 100644 --- a/xmloff/source/core/xmluconv.cxx +++ b/xmloff/source/core/xmluconv.cxx @@ -433,7 +433,7 @@ bool SvXMLUnitConverter::convertDateTime( double& fDateTime, const OUString& rString, const com::sun::star::util::Date& aTempNullDate) { com::sun::star::util::DateTime aDateTime; - bool bSuccess = ::sax::Converter::parseDateTime(aDateTime, 0, rString); + bool bSuccess = ::sax::Converter::parseDateTime(aDateTime, nullptr, rString); if (bSuccess) { |