diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-11-10 10:20:17 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-11-10 10:31:32 +0100 |
commit | 8d12f43bb3668f4fdfcef0bd149d8b023e312e18 (patch) | |
tree | 989292510ee579777678940fcb5c93d75c3925dd /oox | |
parent | 1ddbbfdda834965c861a67e275ab58ff4d1f0bf9 (diff) |
loplugin:nullptr (automatic rewrite)
Change-Id: I62a20b440064aca6f102e61cb3984bb95e739a4f
Diffstat (limited to 'oox')
100 files changed, 514 insertions, 514 deletions
diff --git a/oox/source/core/binarycodec.cxx b/oox/source/core/binarycodec.cxx index 49fa30325075..3855bf5442c5 100644 --- a/oox/source/core/binarycodec.cxx +++ b/oox/source/core/binarycodec.cxx @@ -257,10 +257,10 @@ bool BinaryCodec_XOR::skip( sal_Int32 nBytes ) BinaryCodec_RCF::BinaryCodec_RCF() { mhCipher = rtl_cipher_create( rtl_Cipher_AlgorithmARCFOUR, rtl_Cipher_ModeStream ); - OSL_ENSURE( mhCipher != 0, "BinaryCodec_RCF::BinaryCodec_RCF - cannot create cipher" ); + OSL_ENSURE( mhCipher != nullptr, "BinaryCodec_RCF::BinaryCodec_RCF - cannot create cipher" ); mhDigest = rtl_digest_create( rtl_Digest_AlgorithmMD5 ); - OSL_ENSURE( mhDigest != 0, "BinaryCodec_RCF::BinaryCodec_RCF - cannot create digest" ); + OSL_ENSURE( mhDigest != nullptr, "BinaryCodec_RCF::BinaryCodec_RCF - cannot create digest" ); (void)memset( mpnDigestValue, 0, sizeof( mpnDigestValue ) ); (void)memset (mpnUnique, 0, sizeof(mpnUnique)); @@ -376,7 +376,7 @@ bool BinaryCodec_RCF::startBlock( sal_Int32 nCounter ) // initialize cipher with key data (for decoding) rtlCipherError eResult = - rtl_cipher_init( mhCipher, rtl_Cipher_DirectionDecode, pnKeyData, RTL_DIGEST_LENGTH_MD5, 0, 0 ); + rtl_cipher_init( mhCipher, rtl_Cipher_DirectionDecode, pnKeyData, RTL_DIGEST_LENGTH_MD5, nullptr, 0 ); // erase key data array and leave rtl_secureZeroMemory (pnKeyData, sizeof(pnKeyData)); diff --git a/oox/source/core/contexthandler.cxx b/oox/source/core/contexthandler.cxx index e60506bae70c..5527d9f58907 100644 --- a/oox/source/core/contexthandler.cxx +++ b/oox/source/core/contexthandler.cxx @@ -102,12 +102,12 @@ void ContextHandler::endUnknownElement( const OUString&, const OUString& ) throw Reference< XFastContextHandler > ContextHandler::createFastChildContext( sal_Int32, const Reference< XFastAttributeList >& ) throw( SAXException, RuntimeException, std::exception ) { - return 0; + return nullptr; } Reference< XFastContextHandler > ContextHandler::createUnknownChildContext( const OUString&, const OUString&, const Reference< XFastAttributeList >& ) throw( SAXException, RuntimeException, std::exception ) { - return 0; + return nullptr; } void ContextHandler::characters( const OUString& ) throw( SAXException, RuntimeException, std::exception ) @@ -118,7 +118,7 @@ void ContextHandler::characters( const OUString& ) throw( SAXException, RuntimeE ContextHandlerRef ContextHandler::createRecordContext( sal_Int32, SequenceInputStream& ) { - return 0; + return nullptr; } void ContextHandler::startRecord( sal_Int32, SequenceInputStream& ) diff --git a/oox/source/core/contexthandler2.cxx b/oox/source/core/contexthandler2.cxx index 5e6b739ddf9b..b238a4a984a8 100644 --- a/oox/source/core/contexthandler2.cxx +++ b/oox/source/core/contexthandler2.cxx @@ -227,7 +227,7 @@ void ContextHandler2::endRecord( sal_Int32 nRecId ) ContextHandlerRef ContextHandler2::onCreateContext( sal_Int32, const AttributeList& ) { - return 0; + return nullptr; } void ContextHandler2::onStartElement( const AttributeList& ) @@ -244,7 +244,7 @@ void ContextHandler2::onEndElement() ContextHandlerRef ContextHandler2::onCreateRecordContext( sal_Int32, SequenceInputStream& ) { - return 0; + return nullptr; } void ContextHandler2::onStartRecord( SequenceInputStream& ) diff --git a/oox/source/core/fastparser.cxx b/oox/source/core/fastparser.cxx index b1e24304f97f..6290eb7e7ffa 100644 --- a/oox/source/core/fastparser.cxx +++ b/oox/source/core/fastparser.cxx @@ -65,7 +65,7 @@ InputStreamCloseGuard::~InputStreamCloseGuard() FastParser::FastParser( const Reference< XComponentContext >& rxContext ) throw( RuntimeException ) : mrNamespaceMap( StaticNamespaceMap::get() ), - mpParser(NULL) + mpParser(nullptr) { // create a fast parser instance mxParser = css::xml::sax::FastParser::create(rxContext); diff --git a/oox/source/core/fragmenthandler.cxx b/oox/source/core/fragmenthandler.cxx index ca4a38cb102c..653b2719445f 100644 --- a/oox/source/core/fragmenthandler.cxx +++ b/oox/source/core/fragmenthandler.cxx @@ -84,12 +84,12 @@ void FragmentHandler::endUnknownElement( const OUString&, const OUString& ) thro Reference< XFastContextHandler > FragmentHandler::createFastChildContext( sal_Int32, const Reference< XFastAttributeList >& ) throw( SAXException, RuntimeException, std::exception ) { - return 0; + return nullptr; } Reference< XFastContextHandler > FragmentHandler::createUnknownChildContext( const OUString&, const OUString&, const Reference< XFastAttributeList >& ) throw( SAXException, RuntimeException, std::exception ) { - return 0; + return nullptr; } void FragmentHandler::characters( const OUString& ) throw( SAXException, RuntimeException, std::exception ) @@ -108,7 +108,7 @@ Reference< XInputStream > FragmentHandler::openFragmentStream() const const RecordInfo* FragmentHandler::getRecordInfos() const { // default: no support for binary records - return 0; + return nullptr; } } // namespace core diff --git a/oox/source/core/fragmenthandler2.cxx b/oox/source/core/fragmenthandler2.cxx index 2057eb6b367d..f9040697d204 100644 --- a/oox/source/core/fragmenthandler2.cxx +++ b/oox/source/core/fragmenthandler2.cxx @@ -111,7 +111,7 @@ Reference< XFastContextHandler > SAL_CALL FragmentHandler2::createFastChildConte { if( prepareMceContext( nElement, AttributeList( rxAttribs ) ) ) return getFastContextHandler(); - return NULL; + return nullptr; } return implCreateChildContext( nElement, rxAttribs ); } @@ -161,7 +161,7 @@ void FragmentHandler2::endRecord( sal_Int32 nRecId ) ContextHandlerRef FragmentHandler2::onCreateContext( sal_Int32, const AttributeList& ) { - return 0; + return nullptr; } void FragmentHandler2::onStartElement( const AttributeList& ) @@ -178,7 +178,7 @@ void FragmentHandler2::onEndElement() ContextHandlerRef FragmentHandler2::onCreateRecordContext( sal_Int32, SequenceInputStream& ) { - return 0; + return nullptr; } void FragmentHandler2::onStartRecord( SequenceInputStream& ) diff --git a/oox/source/core/recordparser.cxx b/oox/source/core/recordparser.cxx index 534f01255846..1ced83c47fa6 100644 --- a/oox/source/core/recordparser.cxx +++ b/oox/source/core/recordparser.cxx @@ -57,7 +57,7 @@ private: void Locator::dispose() { - mpParser = 0; + mpParser = nullptr; } void Locator::checkDispose() throw( RuntimeException ) @@ -219,7 +219,7 @@ void RecordParser::setFragmentHandler( const ::rtl::Reference< FragmentHandler > // build record infos maStartMap.clear(); maEndMap.clear(); - const RecordInfo* pRecs = mxHandler.is() ? mxHandler->getRecordInfos() : 0; + const RecordInfo* pRecs = mxHandler.is() ? mxHandler->getRecordInfos() : nullptr; OSL_ENSURE( pRecs, "RecordInfoProvider::RecordInfoProvider - missing record list" ); for( ; pRecs && pRecs->mnStartRecId >= 0; ++pRecs ) { @@ -312,13 +312,13 @@ void RecordParser::parseStream( const RecordInputSource& rInputSource ) throw( S const RecordInfo* RecordParser::getStartRecordInfo( sal_Int32 nRecId ) const { RecordInfoMap::const_iterator aIt = maStartMap.find( nRecId ); - return (aIt == maStartMap.end()) ? 0 : &aIt->second; + return (aIt == maStartMap.end()) ? nullptr : &aIt->second; } const RecordInfo* RecordParser::getEndRecordInfo( sal_Int32 nRecId ) const { RecordInfoMap::const_iterator aIt = maEndMap.find( nRecId ); - return (aIt == maEndMap.end()) ? 0 : &aIt->second; + return (aIt == maEndMap.end()) ? nullptr : &aIt->second; } } // namespace core diff --git a/oox/source/core/relations.cxx b/oox/source/core/relations.cxx index 1b44f9e590d3..c8d343847f0a 100644 --- a/oox/source/core/relations.cxx +++ b/oox/source/core/relations.cxx @@ -59,7 +59,7 @@ Relations::Relations( const OUString& rFragmentPath ) const Relation* Relations::getRelationFromRelId( const OUString& rId ) const { ::std::map< OUString, Relation >::const_iterator aIt = maMap.find( rId ); - return (aIt == maMap.end()) ? 0 : &aIt->second; + return (aIt == maMap.end()) ? nullptr : &aIt->second; } const Relation* Relations::getRelationFromFirstType( const OUString& rType ) const @@ -67,7 +67,7 @@ const Relation* Relations::getRelationFromFirstType( const OUString& rType ) con for( ::std::map< OUString, Relation >::const_iterator aIt = maMap.begin(), aEnd = maMap.end(); aIt != aEnd; ++aIt ) if( aIt->second.maType.equalsIgnoreAsciiCase( rType ) ) return &aIt->second; - return 0; + return nullptr; } RelationsRef Relations::getRelationsFromTypeFromOfficeDoc( const OUString& rType ) const diff --git a/oox/source/core/services.cxx b/oox/source/core/services.cxx index 0b8fee074f14..9c9bcc3cea5a 100644 --- a/oox/source/core/services.cxx +++ b/oox/source/core/services.cxx @@ -26,7 +26,7 @@ using namespace ::com::sun::star::uno; namespace { #define IMPLEMENTATION_ENTRY( className ) \ - { &className##_createInstance, &className##_getImplementationName, &className##_getSupportedServiceNames, ::cppu::createSingleComponentFactory, 0, 0 } + { &className##_createInstance, &className##_getImplementationName, &className##_getSupportedServiceNames, ::cppu::createSingleComponentFactory, nullptr, 0 } //TODO: QuickDiagrammingImport and QuickDiagrammingLayout are not listed in // oox/util/oox.component (and not directly referenced from anywhere in the code @@ -42,7 +42,7 @@ static ::cppu::ImplementationEntry const spServices[] = IMPLEMENTATION_ENTRY( ::oox::ppt::QuickDiagrammingImport ), IMPLEMENTATION_ENTRY( ::oox::ppt::QuickDiagrammingLayout ), IMPLEMENTATION_ENTRY( ::oox::shape::ShapeContextHandler ), - { 0, 0, 0, 0, 0, 0 } + { nullptr, nullptr, nullptr, nullptr, nullptr, 0 } }; #undef IMPLEMENTATION_ENTRY diff --git a/oox/source/core/xmlfilterbase.cxx b/oox/source/core/xmlfilterbase.cxx index 9f01e3469313..f140d1da3bda 100644 --- a/oox/source/core/xmlfilterbase.cxx +++ b/oox/source/core/xmlfilterbase.cxx @@ -204,7 +204,7 @@ XmlFilterBase::~XmlFilterBase() // the following implicit destruction chain of ~XmlFilterBaseImpl, but in that // case it's member RelationsMap maRelationsMap will be destroyed, but maybe // still be used by ~FragmentHandler -> crash. - mxImpl->maFastParser.setDocumentHandler( 0 ); + mxImpl->maFastParser.setDocumentHandler( nullptr ); } void XmlFilterBase::checkDocumentProperties(Reference<XDocumentProperties> xDocProps) diff --git a/oox/source/crypto/CryptTools.cxx b/oox/source/crypto/CryptTools.cxx index f5b0769adb19..6b58d715c83e 100644 --- a/oox/source/crypto/CryptTools.cxx +++ b/oox/source/crypto/CryptTools.cxx @@ -19,14 +19,14 @@ using namespace std; Crypto::Crypto(CryptoType type) : mType(type) #if USE_TLS_NSS - , mContext(NULL) - , mSecParam(NULL) - , mSymKey(NULL) + , mContext(nullptr) + , mSecParam(nullptr) + , mSymKey(nullptr) #endif { #if USE_TLS_NSS // Initialize NSS, database functions are not needed - NSS_NoDB_Init(NULL); + NSS_NoDB_Init(nullptr); #endif // USE_TLS_NSS } @@ -68,12 +68,12 @@ void Crypto::setupContext(vector<sal_uInt8>& key, vector<sal_uInt8>& iv, CryptoT SECItem ivItem; ivItem.type = siBuffer; if(iv.empty()) - ivItem.data = NULL; + ivItem.data = nullptr; else ivItem.data = &iv[0]; ivItem.len = iv.size(); - SECItem* pIvItem = NULL; + SECItem* pIvItem = nullptr; switch(type) { @@ -92,7 +92,7 @@ void Crypto::setupContext(vector<sal_uInt8>& key, vector<sal_uInt8>& iv, CryptoT break; } - PK11SlotInfo* pSlot( PK11_GetBestSlot( mechanism, NULL ) ); + PK11SlotInfo* pSlot( PK11_GetBestSlot( mechanism, nullptr ) ); if (!pSlot) throw css::uno::RuntimeException("NSS Slot failure", css::uno::Reference<css::uno::XInterface>()); @@ -102,7 +102,7 @@ void Crypto::setupContext(vector<sal_uInt8>& key, vector<sal_uInt8>& iv, CryptoT keyItem.data = &key[0]; keyItem.len = key.size(); - mSymKey = PK11_ImportSymKey( pSlot, mechanism, PK11_OriginUnwrap, CKA_ENCRYPT, &keyItem, NULL ); + mSymKey = PK11_ImportSymKey( pSlot, mechanism, PK11_OriginUnwrap, CKA_ENCRYPT, &keyItem, nullptr ); mSecParam = PK11_ParamFromIV( mechanism, pIvItem ); mContext = PK11_CreateContextBySymKey( mechanism, operation, mSymKey, mSecParam ); } @@ -252,7 +252,7 @@ Digest::Digest(DigestType eType) : #endif #if USE_TLS_NSS - NSS_NoDB_Init(NULL); + NSS_NoDB_Init(nullptr); mpContext = HASH_Create(lclNSSgetHashType(eType)); HASH_Begin(mpContext); #endif diff --git a/oox/source/crypto/DocumentDecryption.cxx b/oox/source/crypto/DocumentDecryption.cxx index 3d8d8c27bf5f..8dcf4cadaa44 100644 --- a/oox/source/crypto/DocumentDecryption.cxx +++ b/oox/source/crypto/DocumentDecryption.cxx @@ -172,7 +172,7 @@ public: Reference< XFastContextHandler > SAL_CALL createFastChildContext( sal_Int32 /*aElement*/, const Reference< XFastAttributeList >& /*aAttribs*/ ) throw (RuntimeException, SAXException, std::exception) override { - return NULL; + return nullptr; } Reference< XFastContextHandler > SAL_CALL createUnknownChildContext( const OUString& /*aNamespace*/, const OUString& /*aName*/, const Reference< XFastAttributeList >& /*aAttribs*/ ) diff --git a/oox/source/drawingml/ThemeOverrideFragmentHandler.cxx b/oox/source/drawingml/ThemeOverrideFragmentHandler.cxx index 8d710955db6e..ba106e12adda 100644 --- a/oox/source/drawingml/ThemeOverrideFragmentHandler.cxx +++ b/oox/source/drawingml/ThemeOverrideFragmentHandler.cxx @@ -39,7 +39,7 @@ ContextHandlerRef ThemeOverrideFragmentHandler::onCreateContext( sal_Int32 nElem } break; } - return 0; + return nullptr; } } // namespace drawingml diff --git a/oox/source/drawingml/chart/axiscontext.cxx b/oox/source/drawingml/chart/axiscontext.cxx index e735ac82fd45..f9a32794ef1a 100644 --- a/oox/source/drawingml/chart/axiscontext.cxx +++ b/oox/source/drawingml/chart/axiscontext.cxx @@ -49,10 +49,10 @@ ContextHandlerRef AxisDispUnitsContext::onCreateContext( sal_Int32 nElement, con { case C_TOKEN( builtInUnit ): mrModel.mnBuiltInUnit = rAttribs.getString( XML_val, "thousands" ); - return 0; + return nullptr; case C_TOKEN( custUnit ): mrModel.mfCustomUnit = rAttribs.getDouble( XML_val, 0.0 ); - return 0; + return nullptr; case C_TOKEN( dispUnitsLbl ): return this; } @@ -72,7 +72,7 @@ ContextHandlerRef AxisDispUnitsContext::onCreateContext( sal_Int32 nElement, con } break; } - return 0; + return nullptr; } AxisContextBase::AxisContextBase( ContextHandler2Helper& rParent, AxisModel& rModel ) : @@ -97,42 +97,42 @@ ContextHandlerRef AxisContextBase::onCreateContext( sal_Int32 nElement, const At { case C_TOKEN( axId ): mrModel.mnAxisId = rAttribs.getInteger( XML_val, -1 ); - return 0; + return nullptr; case C_TOKEN( crossAx ): mrModel.mnCrossAxisId = rAttribs.getInteger( XML_val, -1 ); - return 0; + return nullptr; case C_TOKEN( crosses ): mrModel.mnCrossMode = rAttribs.getToken( XML_val, XML_autoZero ); - return 0; + return nullptr; case C_TOKEN( crossesAt ): mrModel.mofCrossesAt = rAttribs.getDouble( XML_val, 0.0 ); - return 0; + return nullptr; case C_TOKEN( delete ): mrModel.mbDeleted = rAttribs.getBool( XML_val, !bMSO2007Doc ); - return 0; + return nullptr; case C_TOKEN( majorGridlines ): return new ShapePrWrapperContext( *this, mrModel.mxMajorGridLines.create() ); case C_TOKEN( majorTickMark ): mrModel.mnMajorTickMark = rAttribs.getToken( XML_val, bMSO2007Doc ? XML_out : XML_cross ); - return 0; + return nullptr; case C_TOKEN(axPos): mrModel.mnAxisPos = rAttribs.getToken( XML_val, XML_TOKEN_INVALID ); - return 0; + return nullptr; case C_TOKEN( minorGridlines ): return new ShapePrWrapperContext( *this, mrModel.mxMinorGridLines.create() ); case C_TOKEN( minorTickMark ): mrModel.mnMinorTickMark = rAttribs.getToken( XML_val, bMSO2007Doc ? XML_none : XML_cross ); - return 0; + return nullptr; case C_TOKEN( numFmt ): mrModel.maNumberFormat.setAttributes( rAttribs ); - return 0; + return nullptr; case C_TOKEN( scaling ): return this; case C_TOKEN( spPr ): return new ShapePropertiesContext( *this, mrModel.mxShapeProp.create() ); case C_TOKEN( tickLblPos ): mrModel.mnTickLabelPos = rAttribs.getToken( XML_val, XML_nextTo ); - return 0; + return nullptr; case C_TOKEN( title ): { bool bVerticalDefault = mrModel.mnAxisPos == XML_l || mrModel.mnAxisPos == XML_r; @@ -149,20 +149,20 @@ ContextHandlerRef AxisContextBase::onCreateContext( sal_Int32 nElement, const At { case C_TOKEN( logBase ): mrModel.mofLogBase = rAttribs.getDouble( XML_val, 0.0 ); - return 0; + return nullptr; case C_TOKEN( max ): mrModel.mofMax = rAttribs.getDouble( XML_val, 0.0 ); - return 0; + return nullptr; case C_TOKEN( min ): mrModel.mofMin = rAttribs.getDouble( XML_val, 0.0 ); - return 0; + return nullptr; case C_TOKEN( orientation ): mrModel.mnOrientation = rAttribs.getToken( XML_val, XML_minMax ); - return 0; + return nullptr; } break; } - return 0; + return nullptr; } CatAxisContext::CatAxisContext( ContextHandler2Helper& rParent, AxisModel& rModel ) : @@ -181,22 +181,22 @@ ContextHandlerRef CatAxisContext::onCreateContext( sal_Int32 nElement, const Att { case C_TOKEN( auto ): mrModel.mbAuto = rAttribs.getBool( XML_val, !bMSO2007Doc ); - return 0; + return nullptr; case C_TOKEN( lblAlgn ): mrModel.mnLabelAlign = rAttribs.getToken( XML_val, XML_ctr ); - return 0; + return nullptr; case C_TOKEN( lblOffset ): mrModel.mnLabelOffset = rAttribs.getInteger( XML_val, 100 ); - return 0; + return nullptr; case C_TOKEN( noMultiLvlLbl ): mrModel.mbNoMultiLevel = rAttribs.getBool( XML_val, !bMSO2007Doc ); - return 0; + return nullptr; case C_TOKEN( tickLblSkip ): mrModel.mnTickLabelSkip = rAttribs.getInteger( XML_val, 0 ); - return 0; + return nullptr; case C_TOKEN( tickMarkSkip ): mrModel.mnTickMarkSkip = rAttribs.getInteger( XML_val, 0 ); - return 0; + return nullptr; } return AxisContextBase::onCreateContext( nElement, rAttribs ); } @@ -217,25 +217,25 @@ ContextHandlerRef DateAxisContext::onCreateContext( sal_Int32 nElement, const At { case C_TOKEN( auto ): mrModel.mbAuto = rAttribs.getBool( XML_val, !bMSO2007Doc ); - return 0; + return nullptr; case C_TOKEN( baseTimeUnit ): mrModel.monBaseTimeUnit = rAttribs.getToken( XML_val, XML_days ); - return 0; + return nullptr; case C_TOKEN( lblOffset ): mrModel.mnLabelOffset = rAttribs.getInteger( XML_val, 100 ); - return 0; + return nullptr; case C_TOKEN( majorTimeUnit ): mrModel.mnMajorTimeUnit = rAttribs.getToken( XML_val, XML_days ); - return 0; + return nullptr; case C_TOKEN( majorUnit ): mrModel.mofMajorUnit = rAttribs.getDouble( XML_val, 0.0 ); - return 0; + return nullptr; case C_TOKEN( minorTimeUnit ): mrModel.mnMinorTimeUnit = rAttribs.getToken( XML_val, XML_days ); - return 0; + return nullptr; case C_TOKEN( minorUnit ): mrModel.mofMinorUnit = rAttribs.getDouble( XML_val, 0.0 ); - return 0; + return nullptr; } return AxisContextBase::onCreateContext( nElement, rAttribs ); } @@ -255,10 +255,10 @@ ContextHandlerRef SerAxisContext::onCreateContext( sal_Int32 nElement, const Att { case C_TOKEN( tickLblSkip ): mrModel.mnTickLabelSkip = rAttribs.getInteger( XML_val, 0 ); - return 0; + return nullptr; case C_TOKEN( tickMarkSkip ): mrModel.mnTickMarkSkip = rAttribs.getInteger( XML_val, 0 ); - return 0; + return nullptr; } return AxisContextBase::onCreateContext( nElement, rAttribs ); } @@ -278,15 +278,15 @@ ContextHandlerRef ValAxisContext::onCreateContext( sal_Int32 nElement, const Att { case C_TOKEN( crossBetween ): mrModel.mnCrossBetween = rAttribs.getToken( XML_val, XML_between ); - return 0; + return nullptr; case C_TOKEN( dispUnits ): return new AxisDispUnitsContext( *this, mrModel.mxDispUnits.create() ); case C_TOKEN( majorUnit ): mrModel.mofMajorUnit = rAttribs.getDouble( XML_val, 0.0 ); - return 0; + return nullptr; case C_TOKEN( minorUnit ): mrModel.mofMinorUnit = rAttribs.getDouble( XML_val, 0.0 ); - return 0; + return nullptr; } return AxisContextBase::onCreateContext( nElement, rAttribs ); } diff --git a/oox/source/drawingml/chart/chartcontextbase.cxx b/oox/source/drawingml/chart/chartcontextbase.cxx index 74bc6c112dd2..676a9c4b94d6 100644 --- a/oox/source/drawingml/chart/chartcontextbase.cxx +++ b/oox/source/drawingml/chart/chartcontextbase.cxx @@ -40,7 +40,7 @@ ShapePrWrapperContext::~ShapePrWrapperContext() ContextHandlerRef ShapePrWrapperContext::onCreateContext( sal_Int32 nElement, const AttributeList& ) { - return (isRootElement() && (nElement == C_TOKEN( spPr ))) ? new ShapePropertiesContext( *this, mrModel ) : 0; + return (isRootElement() && (nElement == C_TOKEN( spPr ))) ? new ShapePropertiesContext( *this, mrModel ) : nullptr; } LayoutContext::LayoutContext( ContextHandler2Helper& rParent, LayoutModel& rModel ) : @@ -70,35 +70,35 @@ ContextHandlerRef LayoutContext::onCreateContext( sal_Int32 nElement, const Attr { case C_TOKEN( x ): mrModel.mfX = rAttribs.getDouble( XML_val, 0.0 ); - return 0; + return nullptr; case C_TOKEN( y ): mrModel.mfY = rAttribs.getDouble( XML_val, 0.0 ); - return 0; + return nullptr; case C_TOKEN( w ): mrModel.mfW = rAttribs.getDouble( XML_val, 0.0 ); - return 0; + return nullptr; case C_TOKEN( h ): mrModel.mfH = rAttribs.getDouble( XML_val, 0.0 ); - return 0; + return nullptr; case C_TOKEN( xMode ): mrModel.mnXMode = rAttribs.getToken( XML_val, XML_factor ); - return 0; + return nullptr; case C_TOKEN( yMode ): mrModel.mnYMode = rAttribs.getToken( XML_val, XML_factor ); - return 0; + return nullptr; case C_TOKEN( wMode ): mrModel.mnWMode = rAttribs.getToken( XML_val, XML_factor ); - return 0; + return nullptr; case C_TOKEN( hMode ): mrModel.mnHMode = rAttribs.getToken( XML_val, XML_factor ); - return 0; + return nullptr; case C_TOKEN( layoutTarget ): mrModel.mnTarget = rAttribs.getToken( XML_val, XML_outer ); - return 0; + return nullptr; } break; } - return 0; + return nullptr; } } // namespace chart diff --git a/oox/source/drawingml/chart/chartconverter.cxx b/oox/source/drawingml/chart/chartconverter.cxx index 89f59c5c9628..0f9bd9dc4078 100644 --- a/oox/source/drawingml/chart/chartconverter.cxx +++ b/oox/source/drawingml/chart/chartconverter.cxx @@ -153,7 +153,7 @@ Reference< XDataSequence > ChartConverter::createDataSequence( } } - return 0; + return nullptr; } } // namespace chart diff --git a/oox/source/drawingml/chart/chartdrawingfragment.cxx b/oox/source/drawingml/chart/chartdrawingfragment.cxx index 5a7035b46bdf..4e86209951d1 100644 --- a/oox/source/drawingml/chart/chartdrawingfragment.cxx +++ b/oox/source/drawingml/chart/chartdrawingfragment.cxx @@ -50,7 +50,7 @@ void ShapeAnchor::importExt( const AttributeList& rAttribs ) void ShapeAnchor::setPos( sal_Int32 nElement, sal_Int32 nParentContext, const OUString& rValue ) { - AnchorPosModel* pAnchorPos = 0; + AnchorPosModel* pAnchorPos = nullptr; switch( nParentContext ) { case CDR_TOKEN( from ): @@ -160,7 +160,7 @@ ContextHandlerRef ChartDrawingFragment::onCreateContext( sal_Int32 nElement, con return new GraphicShapeContext( *this, ShapePtr(), mxShape ); case CDR_TOKEN( graphicFrame ): if( !mbOleSupport ) - return 0; + return nullptr; mxShape.reset( new Shape( "com.sun.star.drawing.GraphicObjectShape" ) ); return new GraphicalObjectFrameContext( *this, ShapePtr(), mxShape, true ); case CDR_TOKEN( grpSp ): @@ -173,7 +173,7 @@ ContextHandlerRef ChartDrawingFragment::onCreateContext( sal_Int32 nElement, con case CDR_TOKEN( ext ): if( mxAnchor.get() ) mxAnchor->importExt( rAttribs ); - return 0; + return nullptr; } break; @@ -187,7 +187,7 @@ ContextHandlerRef ChartDrawingFragment::onCreateContext( sal_Int32 nElement, con } break; } - return 0; + return nullptr; } void ChartDrawingFragment::onCharacters( const OUString& rChars ) diff --git a/oox/source/drawingml/chart/chartspacefragment.cxx b/oox/source/drawingml/chart/chartspacefragment.cxx index b3587515222a..b55ce0d223cb 100644 --- a/oox/source/drawingml/chart/chartspacefragment.cxx +++ b/oox/source/drawingml/chart/chartspacefragment.cxx @@ -63,18 +63,18 @@ ContextHandlerRef ChartSpaceFragment::onCreateContext( sal_Int32 nElement, const return new ShapePropertiesContext( *this, mrModel.mxShapeProp.create() ); case C_TOKEN( style ): mrModel.mnStyle = rAttribs.getInteger( XML_val, 2 ); - return 0; + return nullptr; case C_TOKEN( txPr ): return new TextBodyContext( *this, mrModel.mxTextProp.create() ); case C_TOKEN( userShapes ): mrModel.maDrawingPath = getFragmentPathFromRelId( rAttribs.getString( R_TOKEN( id ), OUString() ) ); - return 0; + return nullptr; case C_TOKEN( pivotSource ): mrModel.mbPivotChart = true; - return 0; + return nullptr; case C_TOKEN (externalData): mrModel.maSheetPath = getFragmentPathFromRelId(rAttribs.getString(R_TOKEN(id),OUString())); - return 0; + return nullptr; } break; @@ -85,7 +85,7 @@ ContextHandlerRef ChartSpaceFragment::onCreateContext( sal_Int32 nElement, const { mrModel.mbAutoTitleDel = rAttribs.getBool( XML_val, !bMSO2007Document ); - return 0; + return nullptr; } case C_TOKEN( backWall ): return new WallFloorContext( *this, mrModel.mxBackWall.create() ); @@ -93,7 +93,7 @@ ContextHandlerRef ChartSpaceFragment::onCreateContext( sal_Int32 nElement, const { // default value is XML_gap for MSO 2007 and XML_zero in OOXML mrModel.mnDispBlanksAs = rAttribs.getToken( XML_val, bMSO2007Document ? XML_gap : XML_zero ); - return 0; + return nullptr; } case C_TOKEN( floor ): return new WallFloorContext( *this, mrModel.mxFloor.create() ); @@ -103,10 +103,10 @@ ContextHandlerRef ChartSpaceFragment::onCreateContext( sal_Int32 nElement, const return new PlotAreaContext( *this, mrModel.mxPlotArea.create() ); case C_TOKEN( plotVisOnly ): mrModel.mbPlotVisOnly = rAttribs.getBool( XML_val, !bMSO2007Document ); - return 0; + return nullptr; case C_TOKEN( showDLblsOverMax ): mrModel.mbShowLabelsOverMax = rAttribs.getBool( XML_val, !bMSO2007Document ); - return 0; + return nullptr; case C_TOKEN( sideWall ): return new WallFloorContext( *this, mrModel.mxSideWall.create() ); case C_TOKEN( title ): @@ -116,7 +116,7 @@ ContextHandlerRef ChartSpaceFragment::onCreateContext( sal_Int32 nElement, const } break; } - return 0; + return nullptr; } } // namespace chart diff --git a/oox/source/drawingml/chart/converterbase.cxx b/oox/source/drawingml/chart/converterbase.cxx index 950550bf9de4..4f66eb0043d8 100644 --- a/oox/source/drawingml/chart/converterbase.cxx +++ b/oox/source/drawingml/chart/converterbase.cxx @@ -71,7 +71,7 @@ struct TitleLayoutInfo ModelRef< LayoutModel > mxLayout; /// The layout model, if existing. GetShapeFunc mpGetShape; /// Helper function to receive the title shape. - inline explicit TitleLayoutInfo() : mpGetShape( 0 ) {} + inline explicit TitleLayoutInfo() : mpGetShape( nullptr ) {} void convertTitlePos( ConverterRoot& rRoot, diff --git a/oox/source/drawingml/chart/datasourcecontext.cxx b/oox/source/drawingml/chart/datasourcecontext.cxx index 10ac7c652015..ea754a917281 100644 --- a/oox/source/drawingml/chart/datasourcecontext.cxx +++ b/oox/source/drawingml/chart/datasourcecontext.cxx @@ -38,13 +38,13 @@ using namespace ::com::sun::star; DoubleSequenceContext::DoubleSequenceContext( ContextHandler2Helper& rParent, DataSequenceModel& rModel ) : DataSequenceContextBase( rParent, rModel ), mnPtIndex( -1 ), - mpNumberFormatter( NULL ) + mpNumberFormatter( nullptr ) { } DoubleSequenceContext::~DoubleSequenceContext() { - if( mpNumberFormatter != NULL ) + if( mpNumberFormatter != nullptr ) { delete mpNumberFormatter; } @@ -71,7 +71,7 @@ ContextHandlerRef DoubleSequenceContext::onCreateContext( sal_Int32 nElement, co return this; case C_TOKEN( ptCount ): mrModel.mnPointCount = rAttribs.getInteger( XML_val, -1 ); - return 0; + return nullptr; case C_TOKEN( pt ): mnPtIndex = rAttribs.getInteger( XML_idx, -1 ); return this; @@ -86,7 +86,7 @@ ContextHandlerRef DoubleSequenceContext::onCreateContext( sal_Int32 nElement, co } break; } - return 0; + return nullptr; } void DoubleSequenceContext::onCharacters( const OUString& rChars ) @@ -130,7 +130,7 @@ void DoubleSequenceContext::onCharacters( const OUString& rChars ) else { double fValue = rChars.toDouble(); - Color* pColor = NULL; + Color* pColor = nullptr; OUString aFormattedValue; pNumFrmt->GetOutputString( fValue, nKey, aFormattedValue, &pColor ); mrModel.maData[ mnPtIndex ] <<= aFormattedValue; @@ -153,7 +153,7 @@ void DoubleSequenceContext::onCharacters( const OUString& rChars ) SvNumberFormatter* DoubleSequenceContext::getNumberFormatter() { - if( mpNumberFormatter == NULL ) + if( mpNumberFormatter == nullptr ) { uno::Reference<uno::XComponentContext> rContext = this->getFilter().getComponentContext(); @@ -201,7 +201,7 @@ ContextHandlerRef StringSequenceContext::onCreateContext( sal_Int32 nElement, co { case C_TOKEN( ptCount ): mrModel.mnPointCount = rAttribs.getInteger( XML_val, -1 ); - return 0; + return nullptr; case C_TOKEN( pt ): mnPtIndex = rAttribs.getInteger( XML_idx, -1 ); return this; @@ -216,7 +216,7 @@ ContextHandlerRef StringSequenceContext::onCreateContext( sal_Int32 nElement, co } break; } - return 0; + return nullptr; } void StringSequenceContext::onCharacters( const OUString& rChars ) @@ -277,7 +277,7 @@ ContextHandlerRef DataSourceContext::onCreateContext( sal_Int32 nElement, const } break; } - return 0; + return nullptr; } } // namespace chart diff --git a/oox/source/drawingml/chart/objectformatter.cxx b/oox/source/drawingml/chart/objectformatter.cxx index 4ab75cbc52e8..6661ea2e177b 100644 --- a/oox/source/drawingml/chart/objectformatter.cxx +++ b/oox/source/drawingml/chart/objectformatter.cxx @@ -129,10 +129,10 @@ struct AutoFormatEntry }; #define AUTOFORMAT_COLOR( first, last, themed_style, color_token ) \ - { first, last, themed_style, color_token, XML_TOKEN_INVALID, 0, 100, 0, false } + { first, last, themed_style, color_token, XML_TOKEN_INVALID, 0, 100, nullptr, false } #define AUTOFORMAT_COLORMOD( first, last, themed_style, color_token, mod_token, mod_value ) \ - { first, last, themed_style, color_token, mod_token, mod_value, 100, 0, false } + { first, last, themed_style, color_token, mod_token, mod_value, 100, nullptr, false } #define AUTOFORMAT_ACCENTSMOD( first, themed_style, mod_token, mod_value ) \ AUTOFORMAT_COLORMOD( first, first, themed_style, XML_accent1, mod_token, mod_value ), \ @@ -146,7 +146,7 @@ struct AutoFormatEntry { first, last, themed_style, XML_TOKEN_INVALID, XML_TOKEN_INVALID, 0, line_width, pattern, false } #define AUTOFORMAT_FADED( first, last, themed_style, color_token, line_width ) \ - { first, last, themed_style, color_token, XML_TOKEN_INVALID, 0, line_width, 0, true } + { first, last, themed_style, color_token, XML_TOKEN_INVALID, 0, line_width, nullptr, true } #define AUTOFORMAT_FADEDACCENTS( first, themed_style, line_width ) \ AUTOFORMAT_FADED( first, first, themed_style, XML_accent1, line_width ), \ @@ -411,7 +411,7 @@ const AutoFormatEntry* lclGetAutoFormatEntry( const AutoFormatEntry* pEntries, s for( ; pEntries && (pEntries->mnFirstStyleIdx >= 0); ++pEntries ) if( (pEntries->mnFirstStyleIdx <= nStyle) && (nStyle <= pEntries->mnLastStyleIdx) ) return pEntries; - return 0; + return nullptr; } struct AutoTextEntry @@ -460,7 +460,7 @@ const AutoTextEntry* lclGetAutoTextEntry( const AutoTextEntry* pEntries, sal_Int for( ; pEntries && (pEntries->mnFirstStyleIdx >= 0); ++pEntries ) if( (pEntries->mnFirstStyleIdx <= nStyle) && (nStyle <= pEntries->mnLastStyleIdx) ) return pEntries; - return 0; + return nullptr; } // These PropIds arrays will be indexed into using a ShapePropertyId enum (include/oox/drawingml/shapepropertymap.hxx) @@ -541,36 +541,36 @@ struct ObjectTypeFormatEntry { obj_type, prop_type, auto_lines, auto_fills, auto_effects, auto_texts, true } #define TYPEFORMAT_LINE( obj_type, prop_type, auto_texts, auto_lines ) \ - { obj_type, prop_type, auto_lines, 0, 0, auto_texts, false } + { obj_type, prop_type, auto_lines, nullptr, nullptr, auto_texts, false } static const ObjectTypeFormatEntry spObjTypeFormatEntries[] = { // object type property info auto text auto line auto fill auto effect - TYPEFORMAT_FRAME( OBJECTTYPE_CHARTSPACE, &saCommonPropInfo, 0, spNoFormats, spChartSpaceFill, 0 /* eq to Ch2 */ ), - TYPEFORMAT_FRAME( OBJECTTYPE_CHARTTITLE, &saCommonPropInfo, spChartTitleTexts, 0 /* eq to Ch2 */, 0 /* eq to Ch2 */, 0 /* eq to Ch2 */ ), - TYPEFORMAT_FRAME( OBJECTTYPE_LEGEND, &saCommonPropInfo, spOtherTexts, spNoFormats, spNoFormats, 0 /* eq to Ch2 */ ), - TYPEFORMAT_FRAME( OBJECTTYPE_PLOTAREA2D, &saCommonPropInfo, 0, 0 /* eq to Ch2 */, spPlotArea2dFills, 0 /* eq to Ch2 */ ), - TYPEFORMAT_FRAME( OBJECTTYPE_PLOTAREA3D, &saCommonPropInfo, 0, 0 /* eq to Ch2 */, 0 /* eq to Ch2 */, 0 /* eq to Ch2 */ ), - TYPEFORMAT_FRAME( OBJECTTYPE_WALL, &saCommonPropInfo, 0, spWallFloorLines, spWallFloorFills, 0 /* eq to Ch2 */ ), - TYPEFORMAT_FRAME( OBJECTTYPE_FLOOR, &saCommonPropInfo, 0, spWallFloorLines, spWallFloorFills, 0 /* eq to Ch2 */ ), + TYPEFORMAT_FRAME( OBJECTTYPE_CHARTSPACE, &saCommonPropInfo, nullptr, spNoFormats, spChartSpaceFill, nullptr /* eq to Ch2 */ ), + TYPEFORMAT_FRAME( OBJECTTYPE_CHARTTITLE, &saCommonPropInfo, spChartTitleTexts, nullptr /* eq to Ch2 */, nullptr /* eq to Ch2 */, nullptr /* eq to Ch2 */ ), + TYPEFORMAT_FRAME( OBJECTTYPE_LEGEND, &saCommonPropInfo, spOtherTexts, spNoFormats, spNoFormats, nullptr /* eq to Ch2 */ ), + TYPEFORMAT_FRAME( OBJECTTYPE_PLOTAREA2D, &saCommonPropInfo, nullptr, nullptr /* eq to Ch2 */, spPlotArea2dFills, nullptr /* eq to Ch2 */ ), + TYPEFORMAT_FRAME( OBJECTTYPE_PLOTAREA3D, &saCommonPropInfo, nullptr, nullptr /* eq to Ch2 */, nullptr /* eq to Ch2 */, nullptr /* eq to Ch2 */ ), + TYPEFORMAT_FRAME( OBJECTTYPE_WALL, &saCommonPropInfo, nullptr, spWallFloorLines, spWallFloorFills, nullptr /* eq to Ch2 */ ), + TYPEFORMAT_FRAME( OBJECTTYPE_FLOOR, &saCommonPropInfo, nullptr, spWallFloorLines, spWallFloorFills, nullptr /* eq to Ch2 */ ), TYPEFORMAT_LINE( OBJECTTYPE_AXIS, &saCommonPropInfo, spOtherTexts, spAxisLines ), - TYPEFORMAT_FRAME( OBJECTTYPE_AXISTITLE, &saCommonPropInfo, spAxisTitleTexts, 0 /* eq to Ch2 */, 0 /* eq to Ch2 */, 0 /* eq to Ch2 */ ), - TYPEFORMAT_FRAME( OBJECTTYPE_AXISUNIT, &saCommonPropInfo, spAxisTitleTexts, 0 /* eq in Ch2 */, 0 /* eq in Ch2 */, 0 /* eq in Ch2 */ ), - TYPEFORMAT_LINE( OBJECTTYPE_MAJORGRIDLINE, &saCommonPropInfo, 0, spMajorGridLines ), - TYPEFORMAT_LINE( OBJECTTYPE_MINORGRIDLINE, &saCommonPropInfo, 0, spMinorGridLines ), - TYPEFORMAT_LINE( OBJECTTYPE_LINEARSERIES2D, &saLinearPropInfo, 0, spLinearSeriesLines ), - TYPEFORMAT_FRAME( OBJECTTYPE_FILLEDSERIES2D, &saFilledPropInfo, 0, spFilledSeriesLines, spFilledSeries2dFills, spFilledSeriesEffects ), - TYPEFORMAT_FRAME( OBJECTTYPE_FILLEDSERIES3D, &saFilledPropInfo, 0, spFilledSeriesLines, spFilledSeries3dFills, spFilledSeriesEffects ), - TYPEFORMAT_FRAME( OBJECTTYPE_DATALABEL, &saCommonPropInfo, spOtherTexts, 0 /* eq to Ch2 */, 0 /* eq to Ch2 */, 0 /* eq to Ch2 */ ), - TYPEFORMAT_LINE( OBJECTTYPE_TRENDLINE, &saCommonPropInfo, 0, spOtherLines ), - TYPEFORMAT_FRAME( OBJECTTYPE_TRENDLINELABEL, &saCommonPropInfo, spOtherTexts, 0 /* eq to Ch2 */, 0 /* eq to Ch2 */, 0 /* eq to Ch2 */ ), - TYPEFORMAT_LINE( OBJECTTYPE_ERRORBAR, &saCommonPropInfo, 0, spOtherLines ), - TYPEFORMAT_LINE( OBJECTTYPE_SERLINE, &saCommonPropInfo, 0, spOtherLines ), - TYPEFORMAT_LINE( OBJECTTYPE_LEADERLINE, &saCommonPropInfo, 0, spOtherLines ), - TYPEFORMAT_LINE( OBJECTTYPE_DROPLINE, &saCommonPropInfo, 0, spOtherLines ), - TYPEFORMAT_LINE( OBJECTTYPE_HILOLINE, &saLinearPropInfo, 0, spOtherLines ), - TYPEFORMAT_FRAME( OBJECTTYPE_UPBAR, &saCommonPropInfo, 0, spUpDownBarLines, spUpBarFills, spUpDownBarEffects ), - TYPEFORMAT_FRAME( OBJECTTYPE_DOWNBAR, &saCommonPropInfo, 0, spUpDownBarLines, spDownBarFills, spUpDownBarEffects ), + TYPEFORMAT_FRAME( OBJECTTYPE_AXISTITLE, &saCommonPropInfo, spAxisTitleTexts, nullptr /* eq to Ch2 */, nullptr /* eq to Ch2 */, nullptr /* eq to Ch2 */ ), + TYPEFORMAT_FRAME( OBJECTTYPE_AXISUNIT, &saCommonPropInfo, spAxisTitleTexts, nullptr /* eq in Ch2 */, nullptr /* eq in Ch2 */, nullptr /* eq in Ch2 */ ), + TYPEFORMAT_LINE( OBJECTTYPE_MAJORGRIDLINE, &saCommonPropInfo, nullptr, spMajorGridLines ), + TYPEFORMAT_LINE( OBJECTTYPE_MINORGRIDLINE, &saCommonPropInfo, nullptr, spMinorGridLines ), + TYPEFORMAT_LINE( OBJECTTYPE_LINEARSERIES2D, &saLinearPropInfo, nullptr, spLinearSeriesLines ), + TYPEFORMAT_FRAME( OBJECTTYPE_FILLEDSERIES2D, &saFilledPropInfo, nullptr, spFilledSeriesLines, spFilledSeries2dFills, spFilledSeriesEffects ), + TYPEFORMAT_FRAME( OBJECTTYPE_FILLEDSERIES3D, &saFilledPropInfo, nullptr, spFilledSeriesLines, spFilledSeries3dFills, spFilledSeriesEffects ), + TYPEFORMAT_FRAME( OBJECTTYPE_DATALABEL, &saCommonPropInfo, spOtherTexts, nullptr /* eq to Ch2 */, nullptr /* eq to Ch2 */, nullptr /* eq to Ch2 */ ), + TYPEFORMAT_LINE( OBJECTTYPE_TRENDLINE, &saCommonPropInfo, nullptr, spOtherLines ), + TYPEFORMAT_FRAME( OBJECTTYPE_TRENDLINELABEL, &saCommonPropInfo, spOtherTexts, nullptr /* eq to Ch2 */, nullptr /* eq to Ch2 */, nullptr /* eq to Ch2 */ ), + TYPEFORMAT_LINE( OBJECTTYPE_ERRORBAR, &saCommonPropInfo, nullptr, spOtherLines ), + TYPEFORMAT_LINE( OBJECTTYPE_SERLINE, &saCommonPropInfo, nullptr, spOtherLines ), + TYPEFORMAT_LINE( OBJECTTYPE_LEADERLINE, &saCommonPropInfo, nullptr, spOtherLines ), + TYPEFORMAT_LINE( OBJECTTYPE_DROPLINE, &saCommonPropInfo, nullptr, spOtherLines ), + TYPEFORMAT_LINE( OBJECTTYPE_HILOLINE, &saLinearPropInfo, nullptr, spOtherLines ), + TYPEFORMAT_FRAME( OBJECTTYPE_UPBAR, &saCommonPropInfo, nullptr, spUpDownBarLines, spUpBarFills, spUpDownBarEffects ), + TYPEFORMAT_FRAME( OBJECTTYPE_DOWNBAR, &saCommonPropInfo, nullptr, spUpDownBarLines, spDownBarFills, spUpDownBarEffects ), TYPEFORMAT_LINE( OBJECTTYPE_DATATABLE, &saCommonPropInfo, spOtherTexts, spDataTableLines ) }; @@ -904,7 +904,7 @@ namespace { const TextCharacterProperties* lclGetTextProperties( const ModelRef< TextBody >& rxTextProp ) { return (rxTextProp.is() && !rxTextProp->getParagraphs().empty()) ? - &rxTextProp->getParagraphs().front()->getProperties().getTextCharacterProperties() : 0; + &rxTextProp->getParagraphs().front()->getProperties().getTextCharacterProperties() : nullptr; } } // namespace @@ -974,7 +974,7 @@ void ObjectTypeFormatter::convertTextFormatting( PropertySet& rPropSet, const Mo void ObjectTypeFormatter::convertFormatting( PropertySet& rPropSet, const ModelRef< Shape >& rxShapeProp, const ModelRef< TextBody >& rxTextProp ) { - convertFrameFormatting( rPropSet, rxShapeProp, 0, -1 ); + convertFrameFormatting( rPropSet, rxShapeProp, nullptr, -1 ); convertTextFormatting( rPropSet, rxTextProp ); } @@ -987,7 +987,7 @@ void ObjectTypeFormatter::convertAutomaticFill( PropertySet& rPropSet, sal_Int32 { ShapePropertyMap aPropMap( mrModelObjHelper, *mrEntry.mpPropInfo ); ModelRef< Shape > xShapeProp; - maFillFormatter.convertFormatting( aPropMap, xShapeProp, 0, nSeriesIdx ); + maFillFormatter.convertFormatting( aPropMap, xShapeProp, nullptr, nSeriesIdx ); rPropSet.setProperties( aPropMap ); } @@ -1041,7 +1041,7 @@ sal_Int32 ObjectFormatter::getMaxSeriesIndex() const void ObjectFormatter::convertFrameFormatting( PropertySet& rPropSet, const ModelRef< Shape >& rxShapeProp, ObjectType eObjType, sal_Int32 nSeriesIdx ) { if( ObjectTypeFormatter* pFormat = mxData->getTypeFormatter( eObjType ) ) - pFormat->convertFrameFormatting( rPropSet, rxShapeProp, 0, nSeriesIdx ); + pFormat->convertFrameFormatting( rPropSet, rxShapeProp, nullptr, nSeriesIdx ); } void ObjectFormatter::convertFrameFormatting( PropertySet& rPropSet, const ModelRef< Shape >& rxShapeProp, const PictureOptionsModel& rPicOptions, ObjectType eObjType, sal_Int32 nSeriesIdx ) diff --git a/oox/source/drawingml/chart/plotareacontext.cxx b/oox/source/drawingml/chart/plotareacontext.cxx index f19adbd309a5..f821755d50a1 100644 --- a/oox/source/drawingml/chart/plotareacontext.cxx +++ b/oox/source/drawingml/chart/plotareacontext.cxx @@ -52,28 +52,28 @@ ContextHandlerRef View3DContext::onCreateContext( sal_Int32 nElement, const Attr { case C_TOKEN( depthPercent ): mrModel.mnDepthPercent = rAttribs.getInteger( XML_val, 100 ); - return 0; + return nullptr; case C_TOKEN( hPercent ): mrModel.monHeightPercent = rAttribs.getInteger( XML_val, 100 ); - return 0; + return nullptr; case C_TOKEN( perspective ): mrModel.mnPerspective = rAttribs.getInteger( XML_val, 30 ); - return 0; + return nullptr; case C_TOKEN( rAngAx ): mrModel.mbRightAngled = rAttribs.getBool( XML_val, !bMSO2007Doc ); - return 0; + return nullptr; case C_TOKEN( rotX ): // default value dependent on chart type mrModel.monRotationX = rAttribs.getInteger( XML_val ); - return 0; + return nullptr; case C_TOKEN( rotY ): // default value dependent on chart type mrModel.monRotationY = rAttribs.getInteger( XML_val ); - return 0; + return nullptr; } break; } - return 0; + return nullptr; } WallFloorContext::WallFloorContext( ContextHandler2Helper& rParent, WallFloorModel& rModel ) : @@ -102,7 +102,7 @@ ContextHandlerRef WallFloorContext::onCreateContext( sal_Int32 nElement, const A } break; } - return 0; + return nullptr; } DataTableContext::DataTableContext( ContextHandler2Helper& rParent, DataTableModel& rModel ) : @@ -133,7 +133,7 @@ ContextHandlerRef DataTableContext::onCreateContext( sal_Int32 nElement, const A } break; } - return 0; + return nullptr; } PlotAreaContext::PlotAreaContext( ContextHandler2Helper& rParent, PlotAreaModel& rModel ) : @@ -196,7 +196,7 @@ ContextHandlerRef PlotAreaContext::onCreateContext( sal_Int32 nElement, const At } break; } - return 0; + return nullptr; } } // namespace chart diff --git a/oox/source/drawingml/chart/plotareaconverter.cxx b/oox/source/drawingml/chart/plotareaconverter.cxx index 54771b80bf7a..ea16e1b0c697 100644 --- a/oox/source/drawingml/chart/plotareaconverter.cxx +++ b/oox/source/drawingml/chart/plotareaconverter.cxx @@ -173,7 +173,7 @@ void AxesSetConverter::convertFromModel( const Reference< XDiagram >& rxDiagram, { ModelRef< AxisModel > xZAxis = lclGetOrCreateAxis( mrModel.maAxes, API_Z_AXIS, C_TOKEN( serAx ), bMSO2007Doc ); AxisConverter aZAxisConv( *this, *xZAxis ); - aZAxisConv.convertFromModel( xCoordSystem, aTypeGroups, 0, nAxesSetIdx, API_Z_AXIS ); + aZAxisConv.convertFromModel( xCoordSystem, aTypeGroups, nullptr, nAxesSetIdx, API_Z_AXIS ); } // convert all chart type groups, this converts all series data and formatting @@ -356,7 +356,7 @@ void PlotAreaConverter::convertFromModel( View3DModel& rView3DModel ) if( !xTypeGroup->maSeries.empty() ) { // try to find a compatible axes set for the type group - AxesSetModel* pAxesSet = 0; + AxesSetModel* pAxesSet = nullptr; for( AxesSetVector::iterator aASIt = aAxesSets.begin(), aASEnd = aAxesSets.end(); !pAxesSet && (aASIt != aASEnd); ++aASIt ) if( (*aASIt)->maTypeGroups.front()->maAxisIds == xTypeGroup->maAxisIds ) pAxesSet = aASIt->get(); diff --git a/oox/source/drawingml/chart/seriescontext.cxx b/oox/source/drawingml/chart/seriescontext.cxx index 9306e6371089..c0016ba0e2d9 100644 --- a/oox/source/drawingml/chart/seriescontext.cxx +++ b/oox/source/drawingml/chart/seriescontext.cxx @@ -42,31 +42,31 @@ ContextHandlerRef lclDataLabelSharedCreateContext( ContextHandler2& rContext, { case C_TOKEN( delete ): orModel.mbDeleted = rAttribs.getBool( XML_val, !bMSO2007 ); - return 0; + return nullptr; case C_TOKEN( dLblPos ): orModel.monLabelPos = rAttribs.getToken( XML_val, XML_TOKEN_INVALID ); - return 0; + return nullptr; case C_TOKEN( numFmt ): orModel.maNumberFormat.setAttributes( rAttribs ); - return 0; + return nullptr; case C_TOKEN( showBubbleSize ): orModel.mobShowBubbleSize = rAttribs.getBool( XML_val ); - return 0; + return nullptr; case C_TOKEN( showCatName ): orModel.mobShowCatName = rAttribs.getBool( XML_val ); - return 0; + return nullptr; case C_TOKEN( showLegendKey ): orModel.mobShowLegendKey = rAttribs.getBool( XML_val ); - return 0; + return nullptr; case C_TOKEN( showPercent ): orModel.mobShowPercent = rAttribs.getBool( XML_val ); - return 0; + return nullptr; case C_TOKEN( showSerName ): orModel.mobShowSerName = rAttribs.getBool( XML_val ); - return 0; + return nullptr; case C_TOKEN( showVal ): orModel.mobShowVal = rAttribs.getBool( XML_val ); - return 0; + return nullptr; case C_TOKEN( separator ): // collect separator text in onCharacters() return &rContext; @@ -75,7 +75,7 @@ ContextHandlerRef lclDataLabelSharedCreateContext( ContextHandler2& rContext, case C_TOKEN( txPr ): return new TextBodyContext( rContext, orModel.mxTextProp.create() ); } - return 0; + return nullptr; } void lclDataLabelSharedCharacters( ContextHandler2& rContext, const OUString& rChars, DataLabelModelBase& orModel ) @@ -102,7 +102,7 @@ ContextHandlerRef DataLabelContext::onCreateContext( sal_Int32 nElement, const A { case C_TOKEN( idx ): mrModel.mnIndex = rAttribs.getInteger( XML_val, -1 ); - return 0; + return nullptr; case C_TOKEN( layout ): return new LayoutContext( *this, mrModel.mxLayout.create() ); case C_TOKEN( tx ): @@ -138,7 +138,7 @@ ContextHandlerRef DataLabelsContext::onCreateContext( sal_Int32 nElement, const return new ShapePrWrapperContext( *this, mrModel.mxLeaderLines.create() ); case C_TOKEN( showLeaderLines ): mrModel.mbShowLeaderLines = rAttribs.getBool( XML_val, !bMSO2007Doc ); - return 0; + return nullptr; } return lclDataLabelSharedCreateContext( *this, nElement, rAttribs, mrModel, bMSO2007Doc ); } @@ -164,21 +164,21 @@ ContextHandlerRef PictureOptionsContext::onCreateContext( sal_Int32 nElement, co { case C_TOKEN( applyToEnd ): mrModel.mbApplyToEnd = rAttribs.getBool( XML_val, !bMSO2007Doc ); - return 0; + return nullptr; case C_TOKEN( applyToFront ): mrModel.mbApplyToFront = rAttribs.getBool( XML_val, !bMSO2007Doc ); - return 0; + return nullptr; case C_TOKEN( applyToSides ): mrModel.mbApplyToSides = rAttribs.getBool( XML_val, !bMSO2007Doc ); - return 0; + return nullptr; case C_TOKEN( pictureFormat ): mrModel.mnPictureFormat = rAttribs.getToken( XML_val, XML_stretch ); - return 0; + return nullptr; case C_TOKEN( pictureStackUnit ): mrModel.mfStackUnit = rAttribs.getDouble( XML_val, 1.0 ); - return 0; + return nullptr; } - return 0; + return nullptr; } ErrorBarContext::ErrorBarContext( ContextHandler2Helper& rParent, ErrorBarModel& rModel ) : @@ -197,27 +197,27 @@ ContextHandlerRef ErrorBarContext::onCreateContext( sal_Int32 nElement, const At { case C_TOKEN( errBarType ): mrModel.mnTypeId = rAttribs.getToken( XML_val, XML_both ); - return 0; + return nullptr; case C_TOKEN( errDir ): mrModel.mnDirection = rAttribs.getToken( XML_val, XML_TOKEN_INVALID ); - return 0; + return nullptr; case C_TOKEN( errValType ): mrModel.mnValueType = rAttribs.getToken( XML_val, XML_fixedVal ); - return 0; + return nullptr; case C_TOKEN( minus ): return new DataSourceContext( *this, mrModel.maSources.create( ErrorBarModel::MINUS ) ); case C_TOKEN( noEndCap ): mrModel.mbNoEndCap = rAttribs.getBool( XML_val, !bMSO2007Doc ); - return 0; + return nullptr; case C_TOKEN( plus ): return new DataSourceContext( *this, mrModel.maSources.create( ErrorBarModel::PLUS ) ); case C_TOKEN( spPr ): return new ShapePropertiesContext( *this, mrModel.mxShapeProp.create() ); case C_TOKEN( val ): mrModel.mfValue = rAttribs.getDouble( XML_val, 0.0 ); - return 0; + return nullptr; } - return 0; + return nullptr; } TrendlineLabelContext::TrendlineLabelContext( ContextHandler2Helper& rParent, TrendlineLabelModel& rModel ) : @@ -237,7 +237,7 @@ ContextHandlerRef TrendlineLabelContext::onCreateContext( sal_Int32 nElement, co return new LayoutContext( *this, mrModel.mxLayout.create() ); case C_TOKEN( numFmt ): mrModel.maNumberFormat.setAttributes( rAttribs ); - return 0; + return nullptr; case C_TOKEN( spPr ): return new ShapePropertiesContext( *this, mrModel.mxShapeProp.create() ); case C_TOKEN( tx ): @@ -245,7 +245,7 @@ ContextHandlerRef TrendlineLabelContext::onCreateContext( sal_Int32 nElement, co case C_TOKEN( txPr ): return new TextBodyContext( *this, mrModel.mxTextProp.create() ); } - return 0; + return nullptr; } TrendlineContext::TrendlineContext( ContextHandler2Helper& rParent, TrendlineModel& rModel ) : @@ -264,36 +264,36 @@ ContextHandlerRef TrendlineContext::onCreateContext( sal_Int32 nElement, const A { case C_TOKEN( backward ): mrModel.mfBackward = rAttribs.getDouble( XML_val, 0.0 ); - return 0; + return nullptr; case C_TOKEN( dispEq ): mrModel.mbDispEquation = rAttribs.getBool( XML_val, !bMSO2007Doc ); - return 0; + return nullptr; case C_TOKEN( dispRSqr ): mrModel.mbDispRSquared = rAttribs.getBool( XML_val, !bMSO2007Doc ); - return 0; + return nullptr; case C_TOKEN( forward ): mrModel.mfForward = rAttribs.getDouble( XML_val, 0.0 ); - return 0; + return nullptr; case C_TOKEN( intercept ): mrModel.mfIntercept = rAttribs.getDouble( XML_val, 0.0 ); - return 0; + return nullptr; case C_TOKEN( name ): return this; // collect name in onCharacters() case C_TOKEN( order ): mrModel.mnOrder = rAttribs.getInteger( XML_val, 2 ); - return 0; + return nullptr; case C_TOKEN( period ): mrModel.mnPeriod = rAttribs.getInteger( XML_val, 2 ); - return 0; + return nullptr; case C_TOKEN( spPr ): return new ShapePropertiesContext( *this, mrModel.mxShapeProp.create() ); case C_TOKEN( trendlineLbl ): return new TrendlineLabelContext( *this, mrModel.mxLabel.create() ); case C_TOKEN( trendlineType ): mrModel.mnTypeId = rAttribs.getToken( XML_val, XML_linear ); - return 0; + return nullptr; } - return 0; + return nullptr; } void TrendlineContext::onCharacters( const OUString& rChars ) @@ -321,17 +321,17 @@ ContextHandlerRef DataPointContext::onCreateContext( sal_Int32 nElement, const A { case C_TOKEN( bubble3D ): mrModel.mobBubble3d = rAttribs.getBool( XML_val ); - return 0; + return nullptr; case C_TOKEN( explosion ): // if the 'val' attribute is missing, series explosion remains unchanged mrModel.monExplosion = rAttribs.getInteger( XML_val ); - return 0; + return nullptr; case C_TOKEN( idx ): mrModel.mnIndex = rAttribs.getInteger( XML_val, -1 ); - return 0; + return nullptr; case C_TOKEN( invertIfNegative ): mrModel.mbInvertNeg = rAttribs.getBool( XML_val, !bMSO2007Doc ); - return 0; + return nullptr; case C_TOKEN( marker ): return this; case C_TOKEN( pictureOptions ): @@ -346,16 +346,16 @@ ContextHandlerRef DataPointContext::onCreateContext( sal_Int32 nElement, const A { case C_TOKEN( size ): mrModel.monMarkerSize = rAttribs.getInteger( XML_val, 5 ); - return 0; + return nullptr; case C_TOKEN( spPr ): return new ShapePropertiesContext( *this, mrModel.mxMarkerProp.create() ); case C_TOKEN( symbol ): mrModel.monMarkerSymbol = rAttribs.getToken( XML_val, XML_none ); - return 0; + return nullptr; } break; } - return 0; + return nullptr; } SeriesContextBase::SeriesContextBase( ContextHandler2Helper& rParent, SeriesModel& rModel ) : @@ -376,10 +376,10 @@ ContextHandlerRef SeriesContextBase::onCreateContext( sal_Int32 nElement, const { case C_TOKEN( idx ): mrModel.mnIndex = rAttribs.getInteger( XML_val, -1 ); - return 0; + return nullptr; case C_TOKEN( order ): mrModel.mnOrder = rAttribs.getInteger( XML_val, -1 ); - return 0; + return nullptr; case C_TOKEN( spPr ): return new ShapePropertiesContext( *this, mrModel.mxShapeProp.create() ); case C_TOKEN( tx ): @@ -392,16 +392,16 @@ ContextHandlerRef SeriesContextBase::onCreateContext( sal_Int32 nElement, const { case C_TOKEN( size ): mrModel.mnMarkerSize = rAttribs.getInteger( XML_val, 5 ); - return 0; + return nullptr; case C_TOKEN( spPr ): return new ShapePropertiesContext( *this, mrModel.mxMarkerProp.create() ); case C_TOKEN( symbol ): mrModel.mnMarkerSymbol = rAttribs.getToken( XML_val, XML_none ); - return 0; + return nullptr; } break; } - return 0; + return nullptr; } AreaSeriesContext::AreaSeriesContext( ContextHandler2Helper& rParent, SeriesModel& rModel ) : @@ -466,12 +466,12 @@ ContextHandlerRef BarSeriesContext::onCreateContext( sal_Int32 nElement, const A return new ErrorBarContext( *this, mrModel.maErrorBars.create(bMSO2007Doc) ); case C_TOKEN( invertIfNegative ): mrModel.mbInvertNeg = rAttribs.getBool( XML_val, !bMSO2007Doc ); - return 0; + return nullptr; case C_TOKEN( pictureOptions ): return new PictureOptionsContext( *this, mrModel.mxPicOptions.create(bMSO2007Doc) ); case C_TOKEN( shape ): mrModel.monShape = rAttribs.getToken( bMSO2007Doc ? XML_val : XML_box ); - return 0; + return nullptr; case C_TOKEN( trendline ): return new TrendlineContext( *this, mrModel.maTrendlines.create(bMSO2007Doc) ); case C_TOKEN( val ): @@ -501,7 +501,7 @@ ContextHandlerRef BubbleSeriesContext::onCreateContext( sal_Int32 nElement, cons { case C_TOKEN( bubble3D ): mrModel.mbBubble3d = rAttribs.getBool( XML_val, !bMSO2007Doc ); - return 0; + return nullptr; case C_TOKEN( bubbleSize ): return new DataSourceContext( *this, mrModel.maSources.create( SeriesModel::POINTS ) ); case C_TOKEN( dLbls ): @@ -512,7 +512,7 @@ ContextHandlerRef BubbleSeriesContext::onCreateContext( sal_Int32 nElement, cons return new ErrorBarContext( *this, mrModel.maErrorBars.create(bMSO2007Doc) ); case C_TOKEN( invertIfNegative ): mrModel.mbInvertNeg = rAttribs.getBool( XML_val, !bMSO2007Doc ); - return 0; + return nullptr; case C_TOKEN( trendline ): return new TrendlineContext( *this, mrModel.maTrendlines.create(bMSO2007Doc) ); case C_TOKEN( xVal ): @@ -554,7 +554,7 @@ ContextHandlerRef LineSeriesContext::onCreateContext( sal_Int32 nElement, const return this; case C_TOKEN( smooth ): mrModel.mbSmooth = rAttribs.getBool( XML_val, !bMSO2007Doc ); - return 0; + return nullptr; case C_TOKEN( trendline ): return new TrendlineContext( *this, mrModel.maTrendlines.create(bMSO2007Doc) ); case C_TOKEN( val ): @@ -590,7 +590,7 @@ ContextHandlerRef PieSeriesContext::onCreateContext( sal_Int32 nElement, const A return new DataPointContext( *this, mrModel.maPoints.create(bMSO2007Doc) ); case C_TOKEN( explosion ): mrModel.mnExplosion = rAttribs.getInteger( XML_val, 0 ); - return 0; + return nullptr; case C_TOKEN( val ): return new DataSourceContext( *this, mrModel.maSources.create( SeriesModel::VALUES ) ); } @@ -626,7 +626,7 @@ ContextHandlerRef RadarSeriesContext::onCreateContext( sal_Int32 nElement, const return this; case C_TOKEN( smooth ): mrModel.mbSmooth = rAttribs.getBool( XML_val, bMSO2007Doc ); - return 0; + return nullptr; case C_TOKEN( val ): return new DataSourceContext( *this, mrModel.maSources.create( SeriesModel::VALUES ) ); } @@ -662,7 +662,7 @@ ContextHandlerRef ScatterSeriesContext::onCreateContext( sal_Int32 nElement, con return this; case C_TOKEN( smooth ): mrModel.mbSmooth = rAttribs.getBool( XML_val, !bMSO2007Doc ); - return 0; + return nullptr; case C_TOKEN( trendline ): return new TrendlineContext( *this, mrModel.maTrendlines.create(bMSO2007Doc) ); case C_TOKEN( xVal ): diff --git a/oox/source/drawingml/chart/seriesconverter.cxx b/oox/source/drawingml/chart/seriesconverter.cxx index 7f10324c0dc2..db5de738dd13 100644 --- a/oox/source/drawingml/chart/seriesconverter.cxx +++ b/oox/source/drawingml/chart/seriesconverter.cxx @@ -61,7 +61,7 @@ int lclSgn( double nVal ) Reference< XLabeledDataSequence > lclCreateLabeledDataSequence( const ConverterRoot& rParent, DataSourceModel* pValues, const OUString& rRole, - TextModel* pTitle = 0 ) + TextModel* pTitle = nullptr ) { // create data sequence for values Reference< XDataSequence > xValueSeq; @@ -703,7 +703,7 @@ Reference< XLabeledDataSequence > SeriesConverter::createLabeledDataSequence( SeriesModel::SourceType eSourceType, const OUString& rRole, bool bUseTextLabel ) { DataSourceModel* pValues = mrModel.maSources.get( eSourceType ).get(); - TextModel* pTitle = bUseTextLabel ? mrModel.mxText.get() : 0; + TextModel* pTitle = bUseTextLabel ? mrModel.mxText.get() : nullptr; return lclCreateLabeledDataSequence( *this, pValues, rRole, pTitle ); } diff --git a/oox/source/drawingml/chart/titlecontext.cxx b/oox/source/drawingml/chart/titlecontext.cxx index 4e9f4a395215..06ae7cc13149 100644 --- a/oox/source/drawingml/chart/titlecontext.cxx +++ b/oox/source/drawingml/chart/titlecontext.cxx @@ -60,7 +60,7 @@ ContextHandlerRef TextContext::onCreateContext( sal_Int32 nElement, const Attrib OSL_ENSURE( !mrModel.mxDataSeq, "TextContext::onCreateContext - multiple data sequences" ); return this; // collect value in onCharacters() } - return 0; + return nullptr; } void TextContext::onCharacters( const OUString& rChars ) @@ -97,7 +97,7 @@ ContextHandlerRef TitleContext::onCreateContext( sal_Int32 nElement, const Attri case C_TOKEN( overlay ): mrModel.mbOverlay = rAttribs.getBool( XML_val, !bMSO2007Doc ); - return 0; + return nullptr; case C_TOKEN( spPr ): return new ShapePropertiesContext( *this, mrModel.mxShapeProp.create() ); @@ -108,7 +108,7 @@ ContextHandlerRef TitleContext::onCreateContext( sal_Int32 nElement, const Attri case C_TOKEN( txPr ): return new TextBodyContext( *this, mrModel.mxTextProp.create() ); } - return 0; + return nullptr; } LegendContext::LegendContext( ContextHandler2Helper& rParent, LegendModel& rModel ) : @@ -131,11 +131,11 @@ ContextHandlerRef LegendContext::onCreateContext( sal_Int32 nElement, const Attr case C_TOKEN( legendPos ): mrModel.mnPosition = rAttribs.getToken( XML_val, XML_r ); - return 0; + return nullptr; case C_TOKEN( overlay ): mrModel.mbOverlay = rAttribs.getBool( XML_val, !bMSO2007Doc ); - return 0; + return nullptr; case C_TOKEN( spPr ): return new ShapePropertiesContext( *this, mrModel.mxShapeProp.create() ); @@ -143,7 +143,7 @@ ContextHandlerRef LegendContext::onCreateContext( sal_Int32 nElement, const Attr case C_TOKEN( txPr ): return new TextBodyContext( *this, mrModel.mxTextProp.create() ); } - return 0; + return nullptr; } } // namespace chart diff --git a/oox/source/drawingml/chart/typegroupcontext.cxx b/oox/source/drawingml/chart/typegroupcontext.cxx index 2dc3d35e30d4..56d76c83603f 100644 --- a/oox/source/drawingml/chart/typegroupcontext.cxx +++ b/oox/source/drawingml/chart/typegroupcontext.cxx @@ -49,13 +49,13 @@ ContextHandlerRef UpDownBarsContext::onCreateContext( sal_Int32 nElement, const return new ShapePrWrapperContext( *this, mrModel.mxDownBars.create() ); case C_TOKEN( gapWidth ): mrModel.mnGapWidth = rAttribs.getInteger( XML_val, 150 ); - return 0; + return nullptr; case C_TOKEN( upBars ): return new ShapePrWrapperContext( *this, mrModel.mxUpBars.create() ); } break; } - return 0; + return nullptr; } AreaTypeGroupContext::AreaTypeGroupContext( ContextHandler2Helper& rParent, TypeGroupModel& rModel ) : @@ -74,24 +74,24 @@ ContextHandlerRef AreaTypeGroupContext::onCreateContext( sal_Int32 nElement, con { case C_TOKEN( axId ): mrModel.maAxisIds.push_back( rAttribs.getInteger( XML_val, -1 ) ); - return 0; + return nullptr; case C_TOKEN( dLbls ): return new DataLabelsContext( *this, mrModel.mxLabels.create(bMSO2007Doc) ); case C_TOKEN( dropLines ): return new ShapePrWrapperContext( *this, mrModel.mxDropLines.create() ); case C_TOKEN( gapDepth ): mrModel.mnGapDepth = rAttribs.getInteger( XML_val, 150 ); - return 0; + return nullptr; case C_TOKEN( grouping ): mrModel.mnGrouping = rAttribs.getToken( XML_val, bMSO2007Doc ? XML_standard : XML_clustered ); - return 0; + return nullptr; case C_TOKEN( ser ): return new AreaSeriesContext( *this, mrModel.maSeries.create(bMSO2007Doc) ); case C_TOKEN( varyColors ): mrModel.mbVaryColors = rAttribs.getBool( XML_val, !bMSO2007Doc ); - return 0; + return nullptr; } - return 0; + return nullptr; } BarTypeGroupContext::BarTypeGroupContext( ContextHandler2Helper& rParent, TypeGroupModel& rModel ) : @@ -110,36 +110,36 @@ ContextHandlerRef BarTypeGroupContext::onCreateContext( sal_Int32 nElement, cons { case C_TOKEN( axId ): mrModel.maAxisIds.push_back( rAttribs.getInteger( XML_val, -1 ) ); - return 0; + return nullptr; case C_TOKEN( barDir ): mrModel.mnBarDir = rAttribs.getToken( XML_val, XML_col ); - return 0; + return nullptr; case C_TOKEN( dLbls ): return new DataLabelsContext( *this, mrModel.mxLabels.create(bMSO2007Doc) ); case C_TOKEN( gapDepth ): mrModel.mnGapDepth = rAttribs.getInteger( XML_val, 150 ); - return 0; + return nullptr; case C_TOKEN( gapWidth ): mrModel.mnGapWidth = rAttribs.getInteger( XML_val, 150 ); - return 0; + return nullptr; case C_TOKEN( grouping ): mrModel.mnGrouping = rAttribs.getToken( XML_val, bMSO2007Doc ? XML_standard : XML_clustered ); - return 0; + return nullptr; case C_TOKEN( overlap ): mrModel.mnOverlap = rAttribs.getInteger( XML_val, 0 ); - return 0; + return nullptr; case C_TOKEN( ser ): return new BarSeriesContext( *this, mrModel.maSeries.create(bMSO2007Doc) ); case C_TOKEN( serLines ): return new ShapePrWrapperContext( *this, mrModel.mxSerLines.create() ); case C_TOKEN( shape ): mrModel.mnShape = rAttribs.getToken( XML_val, XML_box ); - return 0; + return nullptr; case C_TOKEN( varyColors ): mrModel.mbVaryColors = rAttribs.getBool( XML_val, !bMSO2007Doc ); - return 0; + return nullptr; } - return 0; + return nullptr; } BubbleTypeGroupContext::BubbleTypeGroupContext( ContextHandler2Helper& rParent, TypeGroupModel& rModel ) : @@ -158,28 +158,28 @@ ContextHandlerRef BubbleTypeGroupContext::onCreateContext( sal_Int32 nElement, c { case C_TOKEN( axId ): mrModel.maAxisIds.push_back( rAttribs.getInteger( XML_val, -1 ) ); - return 0; + return nullptr; case C_TOKEN( bubble3D ): mrModel.mbBubble3d = rAttribs.getBool( XML_val, !bMSO2007Doc ); - return 0; + return nullptr; case C_TOKEN( bubbleScale ): mrModel.mnBubbleScale = rAttribs.getInteger( XML_val, 100 ); - return 0; + return nullptr; case C_TOKEN( dLbls ): return new DataLabelsContext( *this, mrModel.mxLabels.create(bMSO2007Doc) ); case C_TOKEN( ser ): return new BubbleSeriesContext( *this, mrModel.maSeries.create(bMSO2007Doc) ); case C_TOKEN( showNegBubbles ): mrModel.mbShowNegBubbles = rAttribs.getBool( XML_val, !bMSO2007Doc ); - return 0; + return nullptr; case C_TOKEN( sizeRepresents ): mrModel.mnSizeRepresents = rAttribs.getToken( XML_val, XML_area ); - return 0; + return nullptr; case C_TOKEN( varyColors ): mrModel.mbVaryColors = rAttribs.getBool( XML_val, !bMSO2007Doc ); - return 0; + return nullptr; } - return 0; + return nullptr; } LineTypeGroupContext::LineTypeGroupContext( ContextHandler2Helper& rParent, TypeGroupModel& rModel ) : @@ -198,34 +198,34 @@ ContextHandlerRef LineTypeGroupContext::onCreateContext( sal_Int32 nElement, con { case C_TOKEN( axId ): mrModel.maAxisIds.push_back( rAttribs.getInteger( XML_val, -1 ) ); - return 0; + return nullptr; case C_TOKEN( dLbls ): return new DataLabelsContext( *this, mrModel.mxLabels.create(bMSO2007Doc) ); case C_TOKEN( dropLines ): return new ShapePrWrapperContext( *this, mrModel.mxDropLines.create() ); case C_TOKEN( gapDepth ): mrModel.mnGapDepth = rAttribs.getInteger( XML_val, 150 ); - return 0; + return nullptr; case C_TOKEN( grouping ): mrModel.mnGrouping = rAttribs.getToken( XML_val, bMSO2007Doc ? XML_standard : XML_clustered ); - return 0; + return nullptr; case C_TOKEN( hiLowLines ): return new ShapePrWrapperContext( *this, mrModel.mxHiLowLines.create() ); case C_TOKEN( marker ): mrModel.mbShowMarker = rAttribs.getBool( XML_val, !bMSO2007Doc ); - return 0; + return nullptr; case C_TOKEN( ser ): return new LineSeriesContext( *this, mrModel.maSeries.create(bMSO2007Doc) ); case C_TOKEN( smooth ): mrModel.mbSmooth = rAttribs.getBool( XML_val, !bMSO2007Doc ); - return 0; + return nullptr; case C_TOKEN( upDownBars ): return new UpDownBarsContext( *this, mrModel.mxUpDownBars.create() ); case C_TOKEN( varyColors ): mrModel.mbVaryColors = rAttribs.getBool( XML_val, !bMSO2007Doc ); - return 0; + return nullptr; } - return 0; + return nullptr; } PieTypeGroupContext::PieTypeGroupContext( ContextHandler2Helper& rParent, TypeGroupModel& rModel ) : @@ -246,34 +246,34 @@ ContextHandlerRef PieTypeGroupContext::onCreateContext( sal_Int32 nElement, cons return new DataLabelsContext( *this, mrModel.mxLabels.create(bMSO2007Doc) ); case C_TOKEN( firstSliceAng ): mrModel.mnFirstAngle = rAttribs.getInteger( XML_val, 0 ); - return 0; + return nullptr; case C_TOKEN( gapWidth ): mrModel.mnGapWidth = rAttribs.getInteger( XML_val, 150 ); - return 0; + return nullptr; case C_TOKEN( holeSize ): mrModel.mnHoleSize = rAttribs.getInteger( XML_val, 10 ); - return 0; + return nullptr; case C_TOKEN( ofPieType ): mrModel.mnOfPieType = rAttribs.getToken( XML_val, XML_pie ); - return 0; + return nullptr; case C_TOKEN( secondPieSize ): mrModel.mnSecondPieSize = rAttribs.getInteger( XML_val, 75 ); - return 0; + return nullptr; case C_TOKEN( ser ): return new PieSeriesContext( *this, mrModel.maSeries.create(bMSO2007Doc) ); case C_TOKEN( serLines ): return new ShapePrWrapperContext( *this, mrModel.mxSerLines.create() ); case C_TOKEN( splitPos ): mrModel.mfSplitPos = rAttribs.getDouble( XML_val, 0.0 ); - return 0; + return nullptr; case C_TOKEN( splitType ): mrModel.mnSplitType = rAttribs.getToken( XML_val, XML_auto ); - return 0; + return nullptr; case C_TOKEN( varyColors ): mrModel.mbVaryColors = rAttribs.getBool( XML_val, !bMSO2007Doc ); - return 0; + return nullptr; } - return 0; + return nullptr; } RadarTypeGroupContext::RadarTypeGroupContext( ContextHandler2Helper& rParent, TypeGroupModel& rModel ) : @@ -292,19 +292,19 @@ ContextHandlerRef RadarTypeGroupContext::onCreateContext( sal_Int32 nElement, co { case C_TOKEN( axId ): mrModel.maAxisIds.push_back( rAttribs.getInteger( XML_val, -1 ) ); - return 0; + return nullptr; case C_TOKEN( dLbls ): return new DataLabelsContext( *this, mrModel.mxLabels.create(bMSO2007Doc) ); case C_TOKEN( radarStyle ): mrModel.mnRadarStyle = rAttribs.getToken( XML_val, XML_standard ); - return 0; + return nullptr; case C_TOKEN( ser ): return new RadarSeriesContext( *this, mrModel.maSeries.create(bMSO2007Doc) ); case C_TOKEN( varyColors ): mrModel.mbVaryColors = rAttribs.getBool( XML_val, !bMSO2007Doc ); - return 0; + return nullptr; } - return 0; + return nullptr; } ScatterTypeGroupContext::ScatterTypeGroupContext( ContextHandler2Helper& rParent, TypeGroupModel& rModel ) : @@ -323,19 +323,19 @@ ContextHandlerRef ScatterTypeGroupContext::onCreateContext( sal_Int32 nElement, { case C_TOKEN( axId ): mrModel.maAxisIds.push_back( rAttribs.getInteger( XML_val, -1 ) ); - return 0; + return nullptr; case C_TOKEN( dLbls ): return new DataLabelsContext( *this, mrModel.mxLabels.create(bMSO2007Doc) ); case C_TOKEN( scatterStyle ): mrModel.mnScatterStyle = rAttribs.getInteger( XML_val, XML_marker ); - return 0; + return nullptr; case C_TOKEN( ser ): return new ScatterSeriesContext( *this, mrModel.maSeries.create(bMSO2007Doc) ); case C_TOKEN( varyColors ): mrModel.mbVaryColors = rAttribs.getBool( XML_val, !bMSO2007Doc ); - return 0; + return nullptr; } - return 0; + return nullptr; } SurfaceTypeGroupContext::SurfaceTypeGroupContext( ContextHandler2Helper& rParent, TypeGroupModel& rModel ) : @@ -354,14 +354,14 @@ ContextHandlerRef SurfaceTypeGroupContext::onCreateContext( sal_Int32 nElement, { case C_TOKEN( axId ): mrModel.maAxisIds.push_back( rAttribs.getInteger( XML_val, -1 ) ); - return 0; + return nullptr; case C_TOKEN( ser ): return new SurfaceSeriesContext( *this, mrModel.maSeries.create(bMSO2007Doc) ); case C_TOKEN( wireframe ): mrModel.mbWireframe = rAttribs.getBool( XML_val, !bMSO2007Doc ); - return 0; + return nullptr; } - return 0; + return nullptr; } } // namespace chart diff --git a/oox/source/drawingml/clrschemecontext.cxx b/oox/source/drawingml/clrschemecontext.cxx index d16a14f5992a..9037232dcdeb 100644 --- a/oox/source/drawingml/clrschemecontext.cxx +++ b/oox/source/drawingml/clrschemecontext.cxx @@ -91,7 +91,7 @@ ContextHandlerRef clrSchemeContext::onCreateContext( case A_TOKEN( folHlink ): return new clrSchemeColorContext( *this, mrClrScheme, getBaseToken( nElement ) ); } - return 0; + return nullptr; } } } diff --git a/oox/source/drawingml/colorchoicecontext.cxx b/oox/source/drawingml/colorchoicecontext.cxx index 3236c5adafb1..7a198c29c1c8 100644 --- a/oox/source/drawingml/colorchoicecontext.cxx +++ b/oox/source/drawingml/colorchoicecontext.cxx @@ -129,7 +129,7 @@ void ColorValueContext::onStartElement( const AttributeList& rAttribs ) mrColor.addTransformation( nElement ); break; } - return 0; + return nullptr; } ColorContext::ColorContext( ContextHandler2Helper& rParent, Color& rColor ) : @@ -151,7 +151,7 @@ ColorContext::ColorContext( ContextHandler2Helper& rParent, Color& rColor ) : case A_TOKEN( prstClr ): return new ColorValueContext( *this, mrColor ); } - return 0; + return nullptr; } } // namespace drawingml diff --git a/oox/source/drawingml/customshapegeometry.cxx b/oox/source/drawingml/customshapegeometry.cxx index 9eabc38637f1..88aa8a72961f 100644 --- a/oox/source/drawingml/customshapegeometry.cxx +++ b/oox/source/drawingml/customshapegeometry.cxx @@ -663,7 +663,7 @@ ContextHandlerRef XYAdjustHandleContext::onCreateContext( sal_Int32 aElementToke { if ( aElementToken == A_TOKEN( pos ) ) return new AdjPoint2DContext( *this, rAttribs, mrCustomShapeProperties, mrAdjustHandle.pos ); // CT_AdjPoint2D - return 0; + return nullptr; } // CT_PolarAdjustHandle @@ -714,7 +714,7 @@ ContextHandlerRef PolarAdjustHandleContext::onCreateContext( sal_Int32 aElementT { if ( aElementToken == A_TOKEN( pos ) ) return new AdjPoint2DContext( *this, rAttribs, mrCustomShapeProperties, mrAdjustHandle.pos ); // CT_AdjPoint2D - return 0; + return nullptr; } // CT_AdjustHandleList @@ -750,7 +750,7 @@ ContextHandlerRef AdjustHandleListContext::onCreateContext( sal_Int32 aElementTo mrAdjustHandleList.push_back( aAdjustHandle ); return new PolarAdjustHandleContext( *this, rAttribs, mrCustomShapeProperties, mrAdjustHandleList.back() ); } - return 0; + return nullptr; } // CT_ConnectionSite @@ -777,7 +777,7 @@ ContextHandlerRef ConnectionSiteContext::onCreateContext( sal_Int32 aElementToke { if ( aElementToken == A_TOKEN( pos ) ) return new AdjPoint2DContext( *this, rAttribs, mrCustomShapeProperties, mrConnectionSite.pos ); // CT_AdjPoint2D - return 0; + return nullptr; } // CT_Path2DMoveTo @@ -803,7 +803,7 @@ ContextHandlerRef Path2DMoveToContext::onCreateContext( sal_Int32 aElementToken, { if ( aElementToken == A_TOKEN( pt ) ) return new AdjPoint2DContext( *this, rAttribs, mrCustomShapeProperties, mrAdjPoint2D ); // CT_AdjPoint2D - return 0; + return nullptr; } // CT_Path2DLineTo @@ -829,7 +829,7 @@ ContextHandlerRef Path2DLineToContext::onCreateContext( sal_Int32 aElementToken, { if ( aElementToken == A_TOKEN( pt ) ) return new AdjPoint2DContext( *this, rAttribs, mrCustomShapeProperties, mrAdjPoint2D ); // CT_AdjPoint2D - return 0; + return nullptr; } // CT_Path2DQuadBezierTo @@ -862,7 +862,7 @@ ContextHandlerRef Path2DQuadBezierToContext::onCreateContext( sal_Int32 aElement { if ( aElementToken == A_TOKEN( pt ) ) return new AdjPoint2DContext( *this, rAttribs, mrCustomShapeProperties, nCount++ ? mrPt2 : mrPt1 ); // CT_AdjPoint2D - return 0; + return nullptr; } // CT_Path2DCubicBezierTo @@ -899,7 +899,7 @@ ContextHandlerRef Path2DCubicBezierToContext::onCreateContext( sal_Int32 aElemen if ( aElementToken == A_TOKEN( pt ) ) return new AdjPoint2DContext( *this, rAttribs, mrCustomShapeProperties, nCount++ ? nCount == 2 ? mrControlPt2 : mrEndPt : mrControlPt1 ); // CT_AdjPoint2D - return 0; + return nullptr; } // CT_Path2DContext @@ -1097,7 +1097,7 @@ ContextHandlerRef Path2DContext::onCreateContext( sal_Int32 aElementToken, } break; } - return 0; + return nullptr; } // CT_Path2DList @@ -1133,7 +1133,7 @@ ContextHandlerRef Path2DListContext::onCreateContext( sal_Int32 aElementToken, c mrPath2DList.push_back( aPath2D ); return new Path2DContext( *this, rAttribs, mrCustomShapeProperties, mrSegments, mrPath2DList.back() ); } - return 0; + return nullptr; } // CT_CustomGeometry2D @@ -1176,7 +1176,7 @@ ContextHandlerRef CustomShapeGeometryContext::onCreateContext( sal_Int32 aElemen return new ConnectionSiteContext( *this, rAttribs, mrCustomShapeProperties, mrCustomShapeProperties.getConnectionSiteList().back() ); } } - return 0; + return nullptr; } // CT_PresetGeometry2D diff --git a/oox/source/drawingml/diagram/datamodelcontext.cxx b/oox/source/drawingml/diagram/datamodelcontext.cxx index 9006c1265f42..c818d8b69990 100644 --- a/oox/source/drawingml/diagram/datamodelcontext.cxx +++ b/oox/source/drawingml/diagram/datamodelcontext.cxx @@ -65,7 +65,7 @@ public: rConnection.mnDestOrder = rAttribs.getInteger( XML_destOrd, 0 ); // skip CT_extLst - return 0; + return nullptr; } default: break; @@ -183,7 +183,7 @@ public: return new PresLayoutVarsContext( *this, mrPoint ); case DGM_TOKEN( style ): // skip CT_shapeStyle - return 0; + return nullptr; default: break; } @@ -223,7 +223,7 @@ public: switch( aElementToken ) { case DGM_TOKEN( extLst ): - return 0; + return nullptr; case DGM_TOKEN( prSet ): OSL_TRACE( "diagram property set for point"); return new PropertiesContext( *this, mrPoint, rAttribs ); @@ -355,7 +355,7 @@ DataModelContext::onCreateContext( ::sal_Int32 aElement, case DGM_TOKEN( whole ): // CT_WholeE2oFormatting // TODO - return 0; + return nullptr; case DGM_TOKEN( extLst ): case A_TOKEN( ext ): break; diff --git a/oox/source/drawingml/diagram/diagramdefinitioncontext.cxx b/oox/source/drawingml/diagram/diagramdefinitioncontext.cxx index f3868f1c9b0f..92f6e4e1883f 100644 --- a/oox/source/drawingml/diagram/diagramdefinitioncontext.cxx +++ b/oox/source/drawingml/diagram/diagramdefinitioncontext.cxx @@ -76,7 +76,7 @@ DiagramDefinitionContext::onCreateContext( ::sal_Int32 aElement, } case DGM_TOKEN( clrData ): // TODO, does not matter for the UI. skip. - return 0; + return nullptr; case DGM_TOKEN( sampData ): mpLayout->getSampData().reset( new DiagramData ); return new DataModelContext( *this, mpLayout->getSampData() ); diff --git a/oox/source/drawingml/diagram/diagramfragmenthandler.cxx b/oox/source/drawingml/diagram/diagramfragmenthandler.cxx index 9105e9e6d61c..1ceb8dce9094 100644 --- a/oox/source/drawingml/diagram/diagramfragmenthandler.cxx +++ b/oox/source/drawingml/diagram/diagramfragmenthandler.cxx @@ -128,11 +128,11 @@ DiagramQStylesFragmentHandler::DiagramQStylesFragmentHandler( XmlFilterBase& rFi switch( getCurrentElement() ) { case XML_ROOT_CONTEXT: - return nElement == DGM_TOKEN(styleDef) ? this : NULL; + return nElement == DGM_TOKEN(styleDef) ? this : nullptr; case DGM_TOKEN(styleDef): - return nElement == DGM_TOKEN(styleLbl) ? this : NULL; + return nElement == DGM_TOKEN(styleLbl) ? this : nullptr; case DGM_TOKEN(styleLbl): - return nElement == DGM_TOKEN(style) ? this : NULL; + return nElement == DGM_TOKEN(style) ? this : nullptr; case DGM_TOKEN(style): { switch( nElement ) @@ -150,11 +150,11 @@ DiagramQStylesFragmentHandler::DiagramQStylesFragmentHandler( XmlFilterBase& rFi return createStyleMatrixContext(nElement,rAttribs, maStyleEntry.maTextStyle); } - return 0; + return nullptr; } } - return 0; + return nullptr; } void DiagramQStylesFragmentHandler::onStartElement( const AttributeList& rAttribs ) @@ -190,9 +190,9 @@ ColorFragmentHandler::ColorFragmentHandler( ::oox::core::XmlFilterBase& rFilter, switch( getCurrentElement() ) { case XML_ROOT_CONTEXT: - return nElement == DGM_TOKEN(colorsDef) ? this : NULL; + return nElement == DGM_TOKEN(colorsDef) ? this : nullptr; case DGM_TOKEN(colorsDef): - return nElement == DGM_TOKEN(styleLbl) ? this : NULL; + return nElement == DGM_TOKEN(styleLbl) ? this : nullptr; case DGM_TOKEN(styleLbl): { switch( nElement ) @@ -219,7 +219,7 @@ ColorFragmentHandler::ColorFragmentHandler( ::oox::core::XmlFilterBase& rFilter, } } - return 0; + return nullptr; } void ColorFragmentHandler::onStartElement( const AttributeList& rAttribs ) diff --git a/oox/source/drawingml/diagram/layoutnodecontext.cxx b/oox/source/drawingml/diagram/layoutnodecontext.cxx index 93080691f310..1075c69c8493 100644 --- a/oox/source/drawingml/diagram/layoutnodecontext.cxx +++ b/oox/source/drawingml/diagram/layoutnodecontext.cxx @@ -276,7 +276,7 @@ LayoutNodeContext::onCreateContext( ::sal_Int32 aElement, break; } case DGM_TOKEN( extLst ): - return 0; + return nullptr; case DGM_TOKEN( alg ): { // CT_Algorithm diff --git a/oox/source/drawingml/drawingmltypes.cxx b/oox/source/drawingml/drawingmltypes.cxx index 31529ed68be7..b25b94fd6705 100644 --- a/oox/source/drawingml/drawingmltypes.cxx +++ b/oox/source/drawingml/drawingmltypes.cxx @@ -204,7 +204,7 @@ TextVerticalAdjust GetTextVerticalAdjust( sal_Int32 nToken ) const char* GetTextVerticalAdjust( TextVerticalAdjust eAdjust ) { - const char* sVerticalAdjust = 0; + const char* sVerticalAdjust = nullptr; switch( eAdjust ) { case TextVerticalAdjust_BOTTOM: @@ -248,7 +248,7 @@ TabAlign GetTabAlign( sal_Int32 aToken ) const char* GetHatchPattern( const drawing::Hatch& rHatch ) { - const char* sPattern = 0; + const char* sPattern = nullptr; const sal_Int32 nAngle = rHatch.Angle > 1800 ? rHatch.Angle - 1800 : rHatch.Angle; // Angle ~ 0° (horizontal) if( (nAngle >= 0 && nAngle < 225) || nAngle >= 1575 ) diff --git a/oox/source/drawingml/effectpropertiescontext.cxx b/oox/source/drawingml/effectpropertiescontext.cxx index 3f79cb7a93a3..041595382f1d 100644 --- a/oox/source/drawingml/effectpropertiescontext.cxx +++ b/oox/source/drawingml/effectpropertiescontext.cxx @@ -116,7 +116,7 @@ ContextHandlerRef EffectPropertiesContext::onCreateContext( sal_Int32 nElement, } mrEffectProperties.m_Effects.pop_back(); - return 0; + return nullptr; } } } diff --git a/oox/source/drawingml/fillpropertiesgroupcontext.cxx b/oox/source/drawingml/fillpropertiesgroupcontext.cxx index a45dd787670d..c212ba7e5de7 100644 --- a/oox/source/drawingml/fillpropertiesgroupcontext.cxx +++ b/oox/source/drawingml/fillpropertiesgroupcontext.cxx @@ -84,7 +84,7 @@ ContextHandlerRef GradientFillContext::onCreateContext( mrGradientProps.moTileRect = GetRelativeRect( rAttribs.getFastAttributeList() ); break; } - return 0; + return nullptr; } PatternFillContext::PatternFillContext( ContextHandler2Helper& rParent, @@ -105,7 +105,7 @@ ContextHandlerRef PatternFillContext::onCreateContext( case A_TOKEN( fgClr ): return new ColorContext( *this, mrPatternProps.maPattFgColor ); } - return 0; + return nullptr; } ColorChangeContext::ColorChangeContext( ContextHandler2Helper& rParent, @@ -134,7 +134,7 @@ ContextHandlerRef ColorChangeContext::onCreateContext( case A_TOKEN( clrTo ): return new ColorContext( *this, mrBlipProps.maColorChangeTo ); } - return 0; + return nullptr; } BlipContext::BlipContext( ContextHandler2Helper& rParent, @@ -190,7 +190,7 @@ ContextHandlerRef BlipContext::onCreateContext( mrBlipProps.moContrast = rAttribs.getInteger( XML_contrast ); break; } - return 0; + return nullptr; } DuotoneContext::DuotoneContext( ContextHandler2Helper& rParent, @@ -212,7 +212,7 @@ DuotoneContext::~DuotoneContext() { if( mnColorIndex < 2 ) return new ColorValueContext( *this, mrBlipProps.maDuotoneColors[mnColorIndex++] ); - return 0; + return nullptr; } BlipFillContext::BlipFillContext( ContextHandler2Helper& rParent, @@ -253,7 +253,7 @@ ContextHandlerRef BlipFillContext::onCreateContext( mrBlipProps.moFillRect = GetRelativeRect( rAttribs.getFastAttributeList() ); break; } - return 0; + return nullptr; } FillPropertiesContext::FillPropertiesContext( ContextHandler2Helper& rParent, FillProperties& rFillProps ) : @@ -274,14 +274,14 @@ ContextHandlerRef FillPropertiesContext::createFillContext( { switch( nElement ) { - case A_TOKEN( noFill ): { rFillProps.moFillType = getBaseToken( nElement ); return 0; }; + case A_TOKEN( noFill ): { rFillProps.moFillType = getBaseToken( nElement ); return nullptr; }; case A_TOKEN( solidFill ): { rFillProps.moFillType = getBaseToken( nElement ); return new SolidFillContext( rParent, rAttribs, rFillProps ); }; case A_TOKEN( gradFill ): { rFillProps.moFillType = getBaseToken( nElement ); return new GradientFillContext( rParent, rAttribs, rFillProps.maGradientProps ); }; case A_TOKEN( pattFill ): { rFillProps.moFillType = getBaseToken( nElement ); return new PatternFillContext( rParent, rAttribs, rFillProps.maPatternProps ); }; case A_TOKEN( blipFill ): { rFillProps.moFillType = getBaseToken( nElement ); return new BlipFillContext( rParent, rAttribs, rFillProps.maBlipProps ); }; - case A_TOKEN( grpFill ): { rFillProps.moFillType = getBaseToken( nElement ); return 0; }; // TODO + case A_TOKEN( grpFill ): { rFillProps.moFillType = getBaseToken( nElement ); return nullptr; }; // TODO } - return 0; + return nullptr; } SimpleFillPropertiesContext::SimpleFillPropertiesContext( ContextHandler2Helper& rParent, Color& rColor ) : @@ -316,7 +316,7 @@ ContextHandlerRef BlipExtensionContext::onCreateContext( case OOX_TOKEN( a14, imgProps ): return new ArtisticEffectContext( *this, mrBlipProps.maEffect ); } - return 0; + return nullptr; } ArtisticEffectContext::ArtisticEffectContext( ContextHandler2Helper& rParent, ArtisticEffectProperties& rEffect ) : @@ -352,7 +352,7 @@ ContextHandlerRef ArtisticEffectContext::onCreateContext( // effects maEffect.msName = ArtisticEffectProperties::getEffectString( nElement ); if( maEffect.isEmpty() ) - return 0; + return nullptr; // effect attributes sal_Int32 aAttribs[19] = { @@ -371,7 +371,7 @@ ContextHandlerRef ArtisticEffectContext::onCreateContext( } } - return 0; + return nullptr; } } // namespace drawingml diff --git a/oox/source/drawingml/graphicshapecontext.cxx b/oox/source/drawingml/graphicshapecontext.cxx index 7c82395f822d..116f793d22d6 100644 --- a/oox/source/drawingml/graphicshapecontext.cxx +++ b/oox/source/drawingml/graphicshapecontext.cxx @@ -156,7 +156,7 @@ ContextHandlerRef GraphicalObjectFrameContext::onCreateContext( sal_Int32 aEleme else { SAL_WARN("oox", "OOX: Ignore graphicsData of :" << sUri ); - return 0; + return nullptr; } } break; @@ -232,7 +232,7 @@ ContextHandlerRef OleObjectGraphicDataContext::onCreateContext( sal_Int32 nEleme return new GraphicShapeContext( *this, mpMasterShapePtr, mpShapePtr ); break; } - return 0; + return nullptr; } DiagramGraphicDataContext::DiagramGraphicDataContext( ContextHandler2Helper& rParent, ShapePtr pShapePtr ) @@ -290,7 +290,7 @@ ContextHandlerRef ChartGraphicDataContext::onCreateContext( ::sal_Int32 nElement { mrChartShapeInfo.maFragmentPath = getFragmentPathFromRelId( rAttribs.getString( R_TOKEN( id ), OUString() ) ); } - return 0; + return nullptr; } } // namespace drawingml diff --git a/oox/source/drawingml/hyperlinkcontext.cxx b/oox/source/drawingml/hyperlinkcontext.cxx index dc4f79cb13a7..a00c0843d10e 100644 --- a/oox/source/drawingml/hyperlinkcontext.cxx +++ b/oox/source/drawingml/hyperlinkcontext.cxx @@ -156,7 +156,7 @@ ContextHandlerRef HyperLinkContext::onCreateContext( switch( aElement ) { case A_TOKEN( extLst ): - return 0; + return nullptr; case A_TOKEN( snd ): // TODO use getEmbeddedWAVAudioFile() here break; diff --git a/oox/source/drawingml/linepropertiescontext.cxx b/oox/source/drawingml/linepropertiescontext.cxx index bc5395dab4d7..8376df069822 100644 --- a/oox/source/drawingml/linepropertiescontext.cxx +++ b/oox/source/drawingml/linepropertiescontext.cxx @@ -129,7 +129,7 @@ ContextHandlerRef LinePropertiesContext::onCreateContext( sal_Int32 nElement, co } break; } - return 0; + return nullptr; } } } diff --git a/oox/source/drawingml/objectdefaultcontext.cxx b/oox/source/drawingml/objectdefaultcontext.cxx index 0b1024152990..a1d19b2842b1 100644 --- a/oox/source/drawingml/objectdefaultcontext.cxx +++ b/oox/source/drawingml/objectdefaultcontext.cxx @@ -44,7 +44,7 @@ ContextHandlerRef objectDefaultContext::onCreateContext( sal_Int32 aElementToken case A_TOKEN( txDef ): return new spDefContext( *this, mrTheme.getTxDef() ); } - return 0; + return nullptr; } } } diff --git a/oox/source/drawingml/scene3dcontext.cxx b/oox/source/drawingml/scene3dcontext.cxx index 2514d8f348b6..5af3b83a93dd 100644 --- a/oox/source/drawingml/scene3dcontext.cxx +++ b/oox/source/drawingml/scene3dcontext.cxx @@ -63,9 +63,9 @@ ContextHandlerRef Scene3DPropertiesContext::onCreateContext( sal_Int32 aElementT case A_TOKEN( backdrop ): case A_TOKEN( extLst ): - return 0; // TODO: later (backdrop is not supported by core anyway) + return nullptr; // TODO: later (backdrop is not supported by core anyway) } - return 0; + return nullptr; } Shape3DPropertiesContext::Shape3DPropertiesContext( ContextHandler2Helper& rParent, const AttributeList& rAttribs, Shape3DProperties& r3DProperties ) throw() @@ -110,7 +110,7 @@ ContextHandlerRef Shape3DPropertiesContext::onCreateContext( sal_Int32 aElementT case A_TOKEN( contourClr ): return new ColorContext( *this, mr3DProperties.maContourColor ); } - return 0; + return nullptr; } Scene3DRotationPropertiesContext::Scene3DRotationPropertiesContext( ContextHandler2Helper& rParent, RotationProperties& rRotationProperties ) throw() @@ -129,7 +129,7 @@ ContextHandlerRef Scene3DRotationPropertiesContext::onCreateContext( sal_Int32 a mrRotationProperties.mnRevolution = rAttribs.getInteger( XML_rev, 0 ); break; } - return 0; + return nullptr; } } } diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx index d39d3ddf1574..7d329b23ecd1 100644 --- a/oox/source/drawingml/shape.cxx +++ b/oox/source/drawingml/shape.cxx @@ -228,7 +228,7 @@ void Shape::setServiceName( const sal_Char* pServiceName ) const ShapeStyleRef* Shape::getShapeStyleRef( sal_Int32 nRefType ) const { ShapeStyleRefMap::const_iterator aIt = maShapeStyleRefs.find( nRefType ); - return (aIt == maShapeStyleRefs.end()) ? 0 : &aIt->second; + return (aIt == maShapeStyleRefs.end()) ? nullptr : &aIt->second; } void Shape::addShape( @@ -300,7 +300,7 @@ void Shape::applyShapeReference( const Shape& rReferencedShape, bool bUseText ) mpShapeRefLinePropPtr = LinePropertiesPtr( new LineProperties( *rReferencedShape.mpLinePropertiesPtr.get() ) ); mpShapeRefFillPropPtr = FillPropertiesPtr( new FillProperties( *rReferencedShape.mpFillPropertiesPtr.get() ) ); mpCustomShapePropertiesPtr = CustomShapePropertiesPtr( new CustomShapeProperties( *rReferencedShape.mpCustomShapePropertiesPtr.get() ) ); - mpTablePropertiesPtr = table::TablePropertiesPtr( rReferencedShape.mpTablePropertiesPtr.get() ? new table::TableProperties( *rReferencedShape.mpTablePropertiesPtr.get() ) : NULL ); + mpTablePropertiesPtr = table::TablePropertiesPtr( rReferencedShape.mpTablePropertiesPtr.get() ? new table::TableProperties( *rReferencedShape.mpTablePropertiesPtr.get() ) : nullptr ); mpShapeRefEffectPropPtr = EffectPropertiesPtr( new EffectProperties( *rReferencedShape.mpEffectPropertiesPtr.get() ) ); mpMasterTextListStyle = TextListStylePtr( new TextListStyle( *rReferencedShape.mpMasterTextListStyle.get() ) ); maShapeStyleRefs = rReferencedShape.maShapeStyleRefs; @@ -389,7 +389,7 @@ void Shape::addChildren( std::vector< ShapePtr >::iterator aIter( rMaster.maChildren.begin() ); while( aIter != rMaster.maChildren.end() ) { (*aIter)->setMasterTextListStyle( mpMasterTextListStyle ); - (*aIter++)->addShape( rFilterBase, pTheme, rxShapes, aChildTransformation, getFillProperties(), NULL, pShapeMap ); + (*aIter++)->addShape( rFilterBase, pTheme, rxShapes, aChildTransformation, getFillProperties(), nullptr, pShapeMap ); } } @@ -1192,7 +1192,7 @@ Reference < XShape > Shape::renderDiagramToGraphic( XmlFilterBase& rFilterBase ) Graphic aGraphic; GraphicFilter aFilter( false ); - if ( aFilter.ImportGraphic( aGraphic, "", mpTempStream, GRFILTER_FORMAT_NOTFOUND, NULL, GraphicFilterImportFlags::NONE, static_cast < Sequence < PropertyValue >* > ( NULL ) ) != GRFILTER_OK ) + if ( aFilter.ImportGraphic( aGraphic, "", mpTempStream, GRFILTER_FORMAT_NOTFOUND, nullptr, GraphicFilterImportFlags::NONE, static_cast < Sequence < PropertyValue >* > ( nullptr ) ) != GRFILTER_OK ) { SAL_WARN( "oox.drawingml", OSL_THIS_FUNC << "Unable to import rendered stream into graphic object" ); diff --git a/oox/source/drawingml/shapecontext.cxx b/oox/source/drawingml/shapecontext.cxx index 5bb38a4f9581..b0a609c36307 100644 --- a/oox/source/drawingml/shapecontext.cxx +++ b/oox/source/drawingml/shapecontext.cxx @@ -99,7 +99,7 @@ ContextHandlerRef ShapeContext::onCreateContext( sal_Int32 aElementToken, const case XML_txXfrm: { mpShapePtr->getTextBody()->getTextProperties().moRotation = rAttribs.getInteger( XML_rot ); - return 0; + return nullptr; } case XML_cNvSpPr: break; diff --git a/oox/source/drawingml/shapegroupcontext.cxx b/oox/source/drawingml/shapegroupcontext.cxx index a1ae52d367c1..77e3704f7418 100644 --- a/oox/source/drawingml/shapegroupcontext.cxx +++ b/oox/source/drawingml/shapegroupcontext.cxx @@ -77,7 +77,7 @@ ContextHandlerRef ShapeGroupContext::onCreateContext( sal_Int32 aElementToken, c case XML_grpSpPr: return new ShapePropertiesContext( *this, *mpGroupShapePtr ); case XML_nvGrpSpPr: - return 0; + return nullptr; case XML_spPr: return new ShapePropertiesContext( *this, *mpGroupShapePtr ); /* diff --git a/oox/source/drawingml/shapestylecontext.cxx b/oox/source/drawingml/shapestylecontext.cxx index 1f805f8bd46a..6074f34ed6ee 100644 --- a/oox/source/drawingml/shapestylecontext.cxx +++ b/oox/source/drawingml/shapestylecontext.cxx @@ -60,7 +60,7 @@ ContextHandlerRef ShapeStyleContext::onCreateContext( sal_Int32 aElementToken, c return new ColorContext( *this, rStyleRef.maPhClr ); } } - return 0; + return nullptr; } } } diff --git a/oox/source/drawingml/table/tableproperties.cxx b/oox/source/drawingml/table/tableproperties.cxx index fc8e8a95cf6a..d639c7c4de66 100644 --- a/oox/source/drawingml/table/tableproperties.cxx +++ b/oox/source/drawingml/table/tableproperties.cxx @@ -143,7 +143,7 @@ static void SetTableStyleProperties(TableStyle* &pTableStyle , const sal_Int32& TableStyle* CreateTableStyle(const OUString& styleId) { - TableStyle* pTableStyle = NULL; + TableStyle* pTableStyle = nullptr; if(styleId == "{5C22544A-7EE6-4342-B048-85BDC9FD1C3A}") { //Medium Style 2 Accent 1 pTableStyle = new TableStyle(); //first row style @@ -223,7 +223,7 @@ const TableStyle& TableProperties::getUsedTableStyle( const ::oox::core::XmlFilt { ::oox::core::XmlFilterBase& rBase( const_cast< ::oox::core::XmlFilterBase& >( rFilterBase ) ); - TableStyle* pTableStyle = NULL; + TableStyle* pTableStyle = nullptr; if ( mpTableStyle ) pTableStyle = &*mpTableStyle; else if ( rBase.getTableStyles() ) @@ -263,7 +263,7 @@ void TableProperties::pushToPropSet( const ::oox::core::XmlFilterBase& rFilterBa CreateTableColumns( xColumnRowRange->getColumns(), mvTableGrid ); CreateTableRows( xColumnRowRange->getRows(), mvTableRows ); - TableStyle* pTableStyleToDelete = NULL; + TableStyle* pTableStyleToDelete = nullptr; const TableStyle& rTableStyle( getUsedTableStyle( rFilterBase, pTableStyleToDelete ) ); sal_Int32 nRow = 0; const std::vector< TableRow >::const_iterator aTableRowEnd( mvTableRows.end() ); diff --git a/oox/source/drawingml/table/tablestyletextstylecontext.cxx b/oox/source/drawingml/table/tablestyletextstylecontext.cxx index f1e64ff76e13..9153360602c3 100644 --- a/oox/source/drawingml/table/tablestyletextstylecontext.cxx +++ b/oox/source/drawingml/table/tablestyletextstylecontext.cxx @@ -67,16 +67,16 @@ TableStyleTextStyleContext::onCreateContext( ::sal_Int32 aElementToken, const At return this; case A_TOKEN( ea ): // CT_TextFont mrTableStylePart.getAsianFont().setAttributes( rAttribs ); - return 0; + return nullptr; case A_TOKEN( cs ): // CT_TextFont mrTableStylePart.getComplexFont().setAttributes( rAttribs ); - return 0; + return nullptr; case A_TOKEN( sym ): // CT_TextFont mrTableStylePart.getSymbolFont().setAttributes( rAttribs ); - return 0; + return nullptr; case A_TOKEN( latin ): // CT_TextFont mrTableStylePart.getLatinFont().setAttributes( rAttribs ); - return 0; + return nullptr; case A_TOKEN( fontRef ): // CT_FontReference { diff --git a/oox/source/drawingml/textbodycontext.cxx b/oox/source/drawingml/textbodycontext.cxx index c0a198ea435a..20d3b2683d2d 100644 --- a/oox/source/drawingml/textbodycontext.cxx +++ b/oox/source/drawingml/textbodycontext.cxx @@ -94,7 +94,7 @@ ContextHandlerRef TextParagraphContext::onCreateContext( sal_Int32 aElementToken SAL_WARN("oox", "TextParagraphContext::onCreateContext: unhandled element: " << getBaseToken(aElementToken)); } - return 0; + return nullptr; } RegularTextRunContext::RegularTextRunContext( ContextHandler2Helper& rParent, TextRunPtr pRunPtr ) @@ -177,7 +177,7 @@ ContextHandlerRef TextBodyContext::onCreateContext( sal_Int32 aElementToken, con SAL_WARN("oox", "TextBodyContext::onCreateContext: unhandled element: " << getBaseToken(aElementToken)); } - return 0; + return nullptr; } } } diff --git a/oox/source/drawingml/textbodypropertiescontext.cxx b/oox/source/drawingml/textbodypropertiescontext.cxx index cc274377c466..52aa309b97eb 100644 --- a/oox/source/drawingml/textbodypropertiescontext.cxx +++ b/oox/source/drawingml/textbodypropertiescontext.cxx @@ -142,7 +142,7 @@ ContextHandlerRef TextBodyPropertiesContext::onCreateContext( sal_Int32 aElement break; } - return 0; + return nullptr; } } } diff --git a/oox/source/drawingml/texteffectscontext.cxx b/oox/source/drawingml/texteffectscontext.cxx index 28a4b98ff646..1badb7322917 100644 --- a/oox/source/drawingml/texteffectscontext.cxx +++ b/oox/source/drawingml/texteffectscontext.cxx @@ -283,7 +283,7 @@ void TextEffectsContext::processAttributes(const AttributeList& rAttribs) void TextEffectsContext::onStartElement(const oox::AttributeList& rAttribs) { - if(mpGrabBagStack.get() == NULL) + if(mpGrabBagStack.get() == nullptr) { OUString aGrabBagName = lclGetGrabBagName(mnCurrentElement); mpGrabBagStack.reset(new GrabBagStack(aGrabBagName)); diff --git a/oox/source/drawingml/textfield.cxx b/oox/source/drawingml/textfield.cxx index b001728750f5..135ef3140bf7 100644 --- a/oox/source/drawingml/textfield.cxx +++ b/oox/source/drawingml/textfield.cxx @@ -143,7 +143,7 @@ sal_Int32 TextField::insertAt( Reference< XPropertySet > xProps( xAt, UNO_QUERY); PropertySet aPropSet( xProps ); - maTextParagraphProperties.pushToPropSet( &rFilterBase, xProps, aioBulletList, NULL, true, 18 ); + maTextParagraphProperties.pushToPropSet( &rFilterBase, xProps, aioBulletList, nullptr, true, 18 ); TextCharacterProperties aTextCharacterProps( rTextCharacterStyle ); aTextCharacterProps.assignUsed( maTextParagraphProperties.getTextCharacterProperties() ); diff --git a/oox/source/drawingml/textparagraphproperties.cxx b/oox/source/drawingml/textparagraphproperties.cxx index f66d2e03c301..397cabd2650d 100644 --- a/oox/source/drawingml/textparagraphproperties.cxx +++ b/oox/source/drawingml/textparagraphproperties.cxx @@ -517,7 +517,7 @@ void TextParagraphProperties::dump() const Reference< css::text::XTextRange > xRange( xStart, UNO_QUERY ); xStart->gotoEnd( sal_True ); Reference< XPropertySet > xPropSet( xRange, UNO_QUERY ); - pushToPropSet( NULL, xPropSet, emptyMap, NULL, false, 0 ); + pushToPropSet( nullptr, xPropSet, emptyMap, nullptr, false, 0 ); PropertySet pSet( xPropSet ); pSet.dump(); } diff --git a/oox/source/drawingml/textparagraphpropertiescontext.cxx b/oox/source/drawingml/textparagraphpropertiescontext.cxx index f811cdb60f5c..c152a99eb679 100644 --- a/oox/source/drawingml/textparagraphpropertiescontext.cxx +++ b/oox/source/drawingml/textparagraphpropertiescontext.cxx @@ -142,7 +142,7 @@ TextParagraphPropertiesContext::~TextParagraphPropertiesContext() { Sequence< TabStop > aSeq( nTabCount ); TabStop * aArray = aSeq.getArray(); - OSL_ENSURE( aArray != NULL, "sequence array is NULL" ); + OSL_ENSURE( aArray != nullptr, "sequence array is NULL" ); ::std::copy( maTabList.begin(), maTabList.end(), aArray ); rPropertyMap.setProperty( PROP_ParaTabStops, aSeq); } diff --git a/oox/source/drawingml/theme.cxx b/oox/source/drawingml/theme.cxx index 8f4b7bcd410e..e2cca699d1c4 100644 --- a/oox/source/drawingml/theme.cxx +++ b/oox/source/drawingml/theme.cxx @@ -67,7 +67,7 @@ const TextCharacterProperties* Theme::getFontStyle( sal_Int32 nSchemeType ) cons const TextFont* Theme::resolveFont( const OUString& rName ) const { - const TextCharacterProperties* pCharProps = 0; + const TextCharacterProperties* pCharProps = nullptr; /* Resolves the following names: +mj-lt, +mj-ea, +mj-cs -- major Latin, Asian, Complex font +mn-lt, +mn-ea, +mn-cs -- minor Latin, Asian, Complex font @@ -103,7 +103,7 @@ const TextFont* Theme::resolveFont( const OUString& rName ) const else if (rName == "minorEastAsia" || rName == "majorEastAsia") return &pCharProps->maAsianFont; } - return 0; + return nullptr; } } // namespace drawingml diff --git a/oox/source/drawingml/themeelementscontext.cxx b/oox/source/drawingml/themeelementscontext.cxx index a65ce7c1419d..ea9208a1c2ec 100644 --- a/oox/source/drawingml/themeelementscontext.cxx +++ b/oox/source/drawingml/themeelementscontext.cxx @@ -65,7 +65,7 @@ ContextHandlerRef FillStyleListContext::onCreateContext( sal_Int32 nElement, con mrFillStyleList.push_back( FillPropertiesPtr( new FillProperties ) ); return FillPropertiesContext::createFillContext( *this, nElement, rAttribs, *mrFillStyleList.back() ); } - return 0; + return nullptr; } class LineStyleListContext : public ContextHandler2 @@ -92,7 +92,7 @@ ContextHandlerRef LineStyleListContext::onCreateContext( sal_Int32 nElement, con mrLineStyleList.push_back( LinePropertiesPtr( new LineProperties ) ); return new LinePropertiesContext( *this, rAttribs, *mrLineStyleList.back() ); } - return 0; + return nullptr; } class EffectStyleListContext : public ContextHandler2 @@ -124,7 +124,7 @@ ContextHandlerRef EffectStyleListContext::onCreateContext( sal_Int32 nElement, c return new EffectPropertiesContext( *this, *mrEffectStyleList.back() ); break; } - return 0; + return nullptr; } class FontSchemeContext : public ContextHandler2 @@ -171,7 +171,7 @@ ContextHandlerRef FontSchemeContext::onCreateContext( sal_Int32 nElement, const mxCharProps->maComplexFont.setAttributes( rAttribs ); break; } - return 0; + return nullptr; } void FontSchemeContext::onEndElement() @@ -214,7 +214,7 @@ ContextHandlerRef ThemeElementsContext::onCreateContext( sal_Int32 nElement, con case A_TOKEN( bgFillStyleLst ): // CT_BackgroundFillStyleList return new FillStyleListContext( *this, mrTheme.getBgFillStyleList() ); } - return 0; + return nullptr; } } // namespace drawingml diff --git a/oox/source/drawingml/themefragmenthandler.cxx b/oox/source/drawingml/themefragmenthandler.cxx index edb044bbd823..dc142f7c3269 100644 --- a/oox/source/drawingml/themefragmenthandler.cxx +++ b/oox/source/drawingml/themefragmenthandler.cxx @@ -58,15 +58,15 @@ ContextHandlerRef ThemeFragmentHandler::onCreateContext( sal_Int32 nElement, con case A_TOKEN( objectDefaults ): // CT_ObjectStyleDefaults return new objectDefaultContext( *this, mrTheme ); case A_TOKEN( extraClrSchemeLst ): // CT_ColorSchemeList - return 0; + return nullptr; case A_TOKEN( custClrLst ): // CustomColorList - return 0; + return nullptr; case A_TOKEN( ext ): // CT_OfficeArtExtension - return 0; + return nullptr; } break; } - return 0; + return nullptr; } } // namespace drawingml diff --git a/oox/source/drawingml/transform2dcontext.cxx b/oox/source/drawingml/transform2dcontext.cxx index 3f4b35f33639..e7f47f78b380 100644 --- a/oox/source/drawingml/transform2dcontext.cxx +++ b/oox/source/drawingml/transform2dcontext.cxx @@ -95,7 +95,7 @@ ContextHandlerRef Transform2DContext::onCreateContext( sal_Int32 aElementToken, break; } } - return 0; + return nullptr; } switch( aElementToken ) @@ -114,7 +114,7 @@ ContextHandlerRef Transform2DContext::onCreateContext( sal_Int32 aElementToken, break; } - return 0; + return nullptr; } } // namespace drawingml diff --git a/oox/source/dump/dumperbase.cxx b/oox/source/dump/dumperbase.cxx index 0c297a2a824c..4a4c7e134140 100644 --- a/oox/source/dump/dumperbase.cxx +++ b/oox/source/dump/dumperbase.cxx @@ -913,7 +913,7 @@ void NameListBase::insertRawName( sal_Int64 nKey, const OUString& rName ) const OUString* NameListBase::findRawName( sal_Int64 nKey ) const { const_iterator aIt = maMap.find( nKey ); - return (aIt == end()) ? 0 : &aIt->second; + return (aIt == end()) ? nullptr : &aIt->second; } void NameListBase::include( const OUString& rListKeys ) @@ -1284,7 +1284,7 @@ void SharedConfigData::setOption( const OUString& rKey, const OUString& rData ) const OUString* SharedConfigData::getOption( const OUString& rKey ) const { ConfigDataMap::const_iterator aIt = maConfigData.find( rKey ); - return (aIt == maConfigData.end()) ? 0 : &aIt->second; + return (aIt == maConfigData.end()) ? nullptr : &aIt->second; } void SharedConfigData::setNameList( const OUString& rListName, const NameListRef& rxList ) @@ -1667,7 +1667,7 @@ void Output::writeString( const OUString& rStr ) void Output::writeArray( const sal_uInt8* pnData, sal_Size nSize, sal_Unicode cSep ) { - const sal_uInt8* pnEnd = pnData ? (pnData + nSize) : 0; + const sal_uInt8* pnEnd = pnData ? (pnData + nSize) : nullptr; for( const sal_uInt8* pnByte = pnData; pnByte < pnEnd; ++pnByte ) { if( pnByte > pnData ) @@ -2078,8 +2078,8 @@ void InputObjectBase::dumpRawBinary( sal_Int64 nBytes, bool bShowOffset, bool bS if( nReadSize > 0 ) { - const sal_uInt8* pnByte = 0; - const sal_uInt8* pnEnd = 0; + const sal_uInt8* pnByte = nullptr; + const sal_uInt8* pnEnd = nullptr; for( pnByte = pnLineData, pnEnd = pnLineData + nReadSize; pnByte != pnEnd; ++pnByte ) { if( (pnByte - pnLineData) == (OOX_DUMP_BYTESPERLINE / 2) ) mxOut->tab(); diff --git a/oox/source/dump/oledumper.cxx b/oox/source/dump/oledumper.cxx index 100b9b1af0ed..1361ab01b721 100644 --- a/oox/source/dump/oledumper.cxx +++ b/oox/source/dump/oledumper.cxx @@ -1487,7 +1487,7 @@ void FormControlStreamObject::implDump() void FormControlStreamObject::constructFormCtrlStrmObj( const OUString* pProgId ) { - mbReadGuid = pProgId == 0; + mbReadGuid = pProgId == nullptr; if( pProgId ) maProgId = *pProgId; } diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx index 3b4967bd2520..19ff7806428b 100644 --- a/oox/source/export/chartexport.cxx +++ b/oox/source/export/chartexport.cxx @@ -557,8 +557,8 @@ ChartExport& ChartExport::WriteChartObj( const Reference< XShape >& xShape, sal_ XML_uri, "http://schemas.openxmlformats.org/drawingml/2006/chart", FSEND ); OUString sId; - const char* sFullPath = NULL; - const char* sRelativePath = NULL; + const char* sFullPath = nullptr; + const char* sRelativePath = nullptr; switch( GetDocumentType() ) { case DOCUMENT_DOCX: @@ -933,7 +933,7 @@ void ChartExport::exportMissingValueTreatment(uno::Reference<beans::XPropertySet if (!(aAny >>= nVal)) return; - const char* pVal = NULL; + const char* pVal = nullptr; switch (nVal) { case cssc::MissingValueTreatment::LEAVE_GAP: @@ -977,7 +977,7 @@ void ChartExport::exportLegend( Reference< css::chart::XChartDocument > xChartDo SAL_WARN("oox", "Property Align not found in ChartLegend"); } - const char* strPos = NULL; + const char* strPos = nullptr; switch( aLegendPos ) { case css::chart::ChartLegendPosition_LEFT: @@ -998,7 +998,7 @@ void ChartExport::exportLegend( Reference< css::chart::XChartDocument > xChartDo break; } - if( strPos != NULL ) + if( strPos != nullptr ) { pFS->singleElement( FSNS( XML_c, XML_legendPos ), XML_val, strPos, @@ -1034,7 +1034,7 @@ void ChartExport::exportLegend( Reference< css::chart::XChartDocument > xChartDo pFS->endElement(FSNS(XML_c, XML_layout)); } - if (strPos != NULL) + if (strPos != nullptr) { pFS->singleElement( FSNS( XML_c, XML_overlay ), XML_val, "0", @@ -1091,7 +1091,7 @@ void ChartExport::exportTitle( Reference< XShape > xShape ) FSEND ); // TODO: bodyPr - const char* sWritingMode = NULL; + const char* sWritingMode = nullptr; bool bVertical = false; xPropSet->getPropertyValue("StackedText") >>= bVertical; if( bVertical ) @@ -1583,7 +1583,7 @@ void ChartExport::exportBarChart( Reference< chart2::XChartType > xChartType ) sal_Int32 nGeom3d = cssc::ChartSolidType::RECTANGULAR_SOLID; if( xPropSet.is() && GetProperty( xPropSet, "SolidType") ) mAny >>= nGeom3d; - const char* sShapeType = NULL; + const char* sShapeType = nullptr; switch( nGeom3d ) { case cssc::ChartSolidType::RECTANGULAR_SOLID: @@ -1791,7 +1791,7 @@ void ChartExport::exportRadarChart( Reference< chart2::XChartType > xChartType) // radarStyle sal_Int32 eChartType = getChartType( ); - const char* radarStyle = NULL; + const char* radarStyle = nullptr; if( eChartType == chart::TYPEID_RADARAREA ) radarStyle = "filled"; else @@ -2189,9 +2189,9 @@ void ChartExport::exportCandleStickSeries( xSource->getDataSequences()); Reference< chart2::XChartDocument > xNewDoc( getModel(), uno::UNO_QUERY ); - const char* sSeries[] = {"values-first","values-max","values-min","values-last",0}; + const char* sSeries[] = {"values-first","values-max","values-min","values-last",nullptr}; - for( sal_Int32 idx = 0; sSeries[idx] != 0 ; idx++ ) + for( sal_Int32 idx = 0; sSeries[idx] != nullptr ; idx++ ) { Reference< chart2::data::XLabeledDataSequence > xLabeledSeq( lcl_getDataSequenceByRole( aSeqCnt, OUString::createFromAscii(sSeries[idx]) ) ); if( xLabeledSeq.is()) @@ -2495,7 +2495,7 @@ void ChartExport::exportAxis(const AxisIdPair& rAxisIdPair) Reference< beans::XPropertySet > xMajorGrid; Reference< beans::XPropertySet > xMinorGrid; sal_Int32 nAxisType = XML_catAx; - const char* sAxPos = NULL; + const char* sAxPos = nullptr; switch( rAxisIdPair.nAxisType ) { @@ -2734,7 +2734,7 @@ void ChartExport::_exportAxis( mAny >>= nValue; bool bInner = nValue & css::chart::ChartAxisMarks::INNER; bool bOuter = nValue & css::chart::ChartAxisMarks::OUTER; - const char* majorTickMark = NULL; + const char* majorTickMark = nullptr; if( bInner && bOuter ) majorTickMark = "cross"; else if( bInner ) @@ -2753,7 +2753,7 @@ void ChartExport::_exportAxis( mAny >>= nValue; bool bInner = nValue & css::chart::ChartAxisMarks::INNER; bool bOuter = nValue & css::chart::ChartAxisMarks::OUTER; - const char* minorTickMark = NULL; + const char* minorTickMark = nullptr; if( bInner && bOuter ) minorTickMark = "cross"; else if( bInner ) @@ -2767,7 +2767,7 @@ void ChartExport::_exportAxis( FSEND ); } // tickLblPos - const char* sTickLblPos = NULL; + const char* sTickLblPos = nullptr; bool bDisplayLabel = true; if(GetProperty( xAxisProp, "DisplayLabels" ) ) mAny >>= bDisplayLabel; @@ -2811,7 +2811,7 @@ void ChartExport::_exportAxis( // crosses & crossesAt bool bCrossesValue = false; - const char* sCrosses = NULL; + const char* sCrosses = nullptr; if(GetProperty( xAxisProp, "CrossoverPosition" ) ) { css::chart::ChartAxisPosition ePosition( css::chart::ChartAxisPosition_ZERO ); @@ -3230,7 +3230,7 @@ void ChartExport::exportGrouping( bool isBar ) if( GetProperty( xPropSet, "Percent" ) ) mAny >>= mbPercent; - const char* grouping = NULL; + const char* grouping = nullptr; if (mbStacked) grouping = "stacked"; else if (mbPercent) @@ -3417,7 +3417,7 @@ void ChartExport::exportMarker(Reference< chart2::XDataSeries > xSeries) sal_Int32 nSymbol = aSymbol.StandardSymbol; // TODO: more properties support for marker - const char* pSymbolType = NULL; + const char* pSymbolType = nullptr; switch( nSymbol ) { case 0: @@ -3533,7 +3533,7 @@ const char* getErrorBarStyle(sal_Int32 nErrorBarStyle) switch(nErrorBarStyle) { case cssc::ErrorBarStyle::NONE: - return NULL; + return nullptr; case cssc::ErrorBarStyle::VARIANCE: break; case cssc::ErrorBarStyle::STANDARD_DEVIATION: @@ -3551,7 +3551,7 @@ const char* getErrorBarStyle(sal_Int32 nErrorBarStyle) default: assert(false && "can't happen"); } - return NULL; + return nullptr; } Reference< chart2::data::XDataSequence> getLabeledSequence( diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx index 1fdd49d9165e..ea875f559834 100644 --- a/oox/source/export/drawingml.cxx +++ b/oox/source/export/drawingml.cxx @@ -562,7 +562,7 @@ void DrawingML::WriteOutline( Reference<XPropertySet> rXPropSet ) sal_uInt32 nLineWidth = 0; sal_uInt32 nColor = 0; bool bColorSet = false; - const char* cap = NULL; + const char* cap = nullptr; drawing::LineDash aLineDash; bool bDashSet = false; bool bNoFill = false; @@ -646,7 +646,7 @@ void DrawingML::WriteOutline( Reference<XPropertySet> rXPropSet ) mpFS->startElementNS( XML_a, XML_ln, XML_cap, cap, XML_w, nLineWidth > 1 && nStyleLineWidth != nLineWidth ? - I64S( oox::drawingml::convertHmmToEmu( nLineWidth ) ) :NULL, + I64S( oox::drawingml::convertHmmToEmu( nLineWidth ) ) :nullptr, FSEND ); if( bColorSet ) @@ -971,8 +971,8 @@ OUString DrawingML::WriteBlip( Reference< XPropertySet > rXPropSet, const OUStri if( nBright || nContrast ) { mpFS->singleElementNS( XML_a, XML_lum, - XML_bright, nBright ? I32S( nBright*1000 ) : NULL, - XML_contrast, nContrast ? I32S( nContrast*1000 ) : NULL, + XML_bright, nBright ? I32S( nBright*1000 ) : nullptr, + XML_contrast, nContrast ? I32S( nContrast*1000 ) : nullptr, FSEND ); } WriteArtisticEffect( rXPropSet ); @@ -1142,9 +1142,9 @@ void DrawingML::WriteTransformation( const Rectangle& rRect, sal_Int32 nXmlNamespace, bool bFlipH, bool bFlipV, sal_Int32 nRotation ) { mpFS->startElementNS( nXmlNamespace, XML_xfrm, - XML_flipH, bFlipH ? "1" : NULL, - XML_flipV, bFlipV ? "1" : NULL, - XML_rot, (nRotation % 21600000) ? I32S( nRotation ) : NULL, + XML_flipH, bFlipH ? "1" : nullptr, + XML_flipV, bFlipV ? "1" : nullptr, + XML_rot, (nRotation % 21600000) ? I32S( nRotation ) : nullptr, FSEND ); sal_Int32 nLeft = rRect.Left(); @@ -1210,10 +1210,10 @@ void DrawingML::WriteRunProperties( Reference< XPropertySet > rRun, bool bIsFiel SvtScriptType nScriptType = SvtLanguageOptions::GetScriptTypeOfLanguage( Application::GetSettings().GetLanguageTag().getLanguageType() ); bool bComplex = ( nScriptType == SvtScriptType::COMPLEX ); const char* bold = "0"; - const char* italic = NULL; - const char* underline = NULL; - const char* strikeout = NULL; - const char* cap = NULL; + const char* italic = nullptr; + const char* underline = nullptr; + const char* strikeout = nullptr; + const char* cap = nullptr; sal_Int32 nSize = 1800; sal_Int32 nCharEscapement = 0; sal_Int32 nCharKerning = 0; @@ -1366,13 +1366,13 @@ void DrawingML::WriteRunProperties( Reference< XPropertySet > rRun, bool bIsFiel mpFS->startElementNS( XML_a, nElement, XML_b, bold, XML_i, italic, - XML_lang, usLanguage.isEmpty() ? NULL : USS( usLanguage ), + XML_lang, usLanguage.isEmpty() ? nullptr : USS( usLanguage ), XML_sz, IS( nSize ), // For Condensed character spacing spc value is negative. - XML_spc, nCharKerning ? IS(nCharKerning) : NULL, + XML_spc, nCharKerning ? IS(nCharKerning) : nullptr, XML_strike, strikeout, XML_u, underline, - XML_baseline, nCharEscapement == 0 ? NULL : IS( nCharEscapement*1000 ), + XML_baseline, nCharEscapement == 0 ? nullptr : IS( nCharEscapement*1000 ), XML_cap, cap, FSEND ); @@ -1404,8 +1404,8 @@ void DrawingML::WriteRunProperties( Reference< XPropertySet > rRun, bool bIsFiel if( GETA( CharFontName ) ) { - const char* pitch = NULL; - const char* charset = NULL; + const char* pitch = nullptr; + const char* charset = nullptr; OUString usTypeface; mAny >>= usTypeface; @@ -1420,8 +1420,8 @@ void DrawingML::WriteRunProperties( Reference< XPropertySet > rRun, bool bIsFiel if( ( bComplex && GETAD( CharFontNameComplex ) ) || ( !bComplex && GETAD( CharFontNameAsian ) ) ) { - const char* pitch = NULL; - const char* charset = NULL; + const char* pitch = nullptr; + const char* charset = nullptr; OUString usTypeface; mAny >>= usTypeface; @@ -1504,7 +1504,7 @@ OUString DrawingML::GetFieldValue( css::uno::Reference< css::text::XTextRange > OString DrawingML::GetUUID() { sal_uInt8 aSeq[16]; - rtl_createUuid(aSeq, 0, true); + rtl_createUuid(aSeq, nullptr, true); char str[39]; sprintf(str, "{%02X%02X%02X%02X-%02X%02X-%02X%02X-%02X%02X-%02X%02X%02X%02X%02X%02X}", @@ -1761,7 +1761,7 @@ void DrawingML::WriteParagraphNumbering( Reference< XPropertySet > rXPropSet, sa aBulletChar = SubstituteBullet( aBulletChar, aFontDesc ); mpFS->singleElementNS( XML_a, XML_buFont, XML_typeface, aFontDesc.Name.toUtf8().getStr(), - XML_charset, (aFontDesc.CharSet == awt::CharSet::SYMBOL) ? "2" : NULL, + XML_charset, (aFontDesc.CharSet == awt::CharSet::SYMBOL) ? "2" : nullptr, FSEND ); } @@ -1771,7 +1771,7 @@ void DrawingML::WriteParagraphNumbering( Reference< XPropertySet > rXPropSet, sa { mpFS->singleElementNS(XML_a, XML_buAutoNum, XML_type, OUStringToOString(pAutoNumType, RTL_TEXTENCODING_UTF8).getStr(), - XML_startAt, nStartWith > 1 ? IS(nStartWith) : NULL, + XML_startAt, nStartWith > 1 ? IS(nStartWith) : nullptr, FSEND); } else @@ -1820,7 +1820,7 @@ sal_Int32 DrawingML::getBulletMarginIndentation (Reference< XPropertySet > rXPro const char* DrawingML::GetAlignment( sal_Int32 nAlignment ) { - const char* sAlignment = NULL; + const char* sAlignment = nullptr; switch( nAlignment ) { @@ -1901,19 +1901,19 @@ void DrawingML::WriteParagraphProperties( Reference< XTextContent > rParagraph ) { if (nParaLeftMargin) // For Paraghraph mpFS->startElementNS( XML_a, XML_pPr, - XML_lvl, nLevel > 0 ? I32S( nLevel ) : NULL, - XML_marL, nParaLeftMargin > 0 ? I32S( oox::drawingml::convertHmmToEmu( nParaLeftMargin ) ) : NULL, - XML_indent, nParaFirstLineIndent ? I32S( oox::drawingml::convertHmmToEmu( nParaFirstLineIndent ) ) : NULL, + XML_lvl, nLevel > 0 ? I32S( nLevel ) : nullptr, + XML_marL, nParaLeftMargin > 0 ? I32S( oox::drawingml::convertHmmToEmu( nParaLeftMargin ) ) : nullptr, + XML_indent, nParaFirstLineIndent ? I32S( oox::drawingml::convertHmmToEmu( nParaFirstLineIndent ) ) : nullptr, XML_algn, GetAlignment( nAlignment ), - XML_rtl, bRtl ? BS(bRtl) : NULL, + XML_rtl, bRtl ? BS(bRtl) : nullptr, FSEND ); else mpFS->startElementNS( XML_a, XML_pPr, - XML_lvl, nLevel > 0 ? I32S( nLevel ) : NULL, - XML_marL, nLeftMargin > 0 ? I32S( oox::drawingml::convertHmmToEmu( nLeftMargin ) ) : NULL, - XML_indent, nLineIndentation ? I32S( oox::drawingml::convertHmmToEmu( nLineIndentation ) ) : NULL, + XML_lvl, nLevel > 0 ? I32S( nLevel ) : nullptr, + XML_marL, nLeftMargin > 0 ? I32S( oox::drawingml::convertHmmToEmu( nLeftMargin ) ) : nullptr, + XML_indent, nLineIndentation ? I32S( oox::drawingml::convertHmmToEmu( nLineIndentation ) ) : nullptr, XML_algn, GetAlignment( nAlignment ), - XML_rtl, bRtl ? BS(bRtl) : NULL, + XML_rtl, bRtl ? BS(bRtl) : nullptr, FSEND ); @@ -1988,12 +1988,12 @@ void DrawingML::WriteText( Reference< XInterface > rXIface, const OUString& pres GET( nBottom, TextLowerDistance ); TextVerticalAdjust eVerticalAlignment( TextVerticalAdjust_TOP ); - const char* sVerticalAlignment = NULL; + const char* sVerticalAlignment = nullptr; GET( eVerticalAlignment, TextVerticalAdjust ); if( eVerticalAlignment != TextVerticalAdjust_TOP ) sVerticalAlignment = GetTextVerticalAdjust(eVerticalAlignment); - const char* sWritingMode = NULL; + const char* sWritingMode = nullptr; bool bVertical = false; if( GETA( TextWritingMode ) ) { @@ -2051,7 +2051,7 @@ void DrawingML::WriteText( Reference< XInterface > rXIface, const OUString& pres if (bBodyPr) { - const char* pWrap = bHasWrap && !bWrap ? "none" : NULL; + const char* pWrap = bHasWrap && !bWrap ? "none" : nullptr; if (GetDocumentType() == DOCUMENT_DOCX) { // In case of DOCX, if we want to have the same effect as @@ -2063,15 +2063,15 @@ void DrawingML::WriteText( Reference< XInterface > rXIface, const OUString& pres } mpFS->startElementNS( (nXmlNamespace ? nXmlNamespace : XML_a), XML_bodyPr, XML_wrap, pWrap, - XML_lIns, (nLeft != DEFLRINS) ? IS( oox::drawingml::convertHmmToEmu( nLeft ) ) : NULL, - XML_rIns, (nRight != DEFLRINS) ? IS( oox::drawingml::convertHmmToEmu( nRight ) ) : NULL, - XML_tIns, (nTop != DEFTBINS) ? IS( oox::drawingml::convertHmmToEmu( nTop ) ) : NULL, - XML_bIns, (nBottom != DEFTBINS) ? IS( oox::drawingml::convertHmmToEmu( nBottom ) ) : NULL, + XML_lIns, (nLeft != DEFLRINS) ? IS( oox::drawingml::convertHmmToEmu( nLeft ) ) : nullptr, + XML_rIns, (nRight != DEFLRINS) ? IS( oox::drawingml::convertHmmToEmu( nRight ) ) : nullptr, + XML_tIns, (nTop != DEFTBINS) ? IS( oox::drawingml::convertHmmToEmu( nTop ) ) : nullptr, + XML_bIns, (nBottom != DEFTBINS) ? IS( oox::drawingml::convertHmmToEmu( nBottom ) ) : nullptr, XML_anchor, sVerticalAlignment, - XML_anchorCtr, bHorizontalCenter ? "1" : NULL, + XML_anchorCtr, bHorizontalCenter ? "1" : nullptr, XML_vert, sWritingMode, FSEND ); - if( presetWarp != NULL && !presetWarp.isEmpty()) + if( presetWarp != nullptr && !presetWarp.isEmpty()) { mpFS->singleElementNS(XML_a, XML_prstTxWarp, XML_prst, presetWarp.toUtf8().getStr(), FSEND ); @@ -2094,11 +2094,11 @@ void DrawingML::WriteText( Reference< XInterface > rXIface, const OUString& pres return; uno::Reference<drawing::XShape> xShape(rXIface, uno::UNO_QUERY); - SdrObject* pSdrObject = xShape.is() ? GetSdrObjectFromXShape(xShape) : 0; + SdrObject* pSdrObject = xShape.is() ? GetSdrObjectFromXShape(xShape) : nullptr; const SdrTextObj* pTxtObj = dynamic_cast<SdrTextObj*>( pSdrObject ); if (pTxtObj && mpTextExport) { - const OutlinerParaObject* pParaObj = 0; + const OutlinerParaObject* pParaObj = nullptr; bool bOwnParaObj = false; /* @@ -3099,7 +3099,7 @@ void DrawingML::WriteShape3DEffects( Reference< XPropertySet > xPropSet ) if ( aBevelProps.getLength() == 0 ) continue; - sax_fastparser::FastAttributeList *aBevelAttrList = NULL; + sax_fastparser::FastAttributeList *aBevelAttrList = nullptr; if( aShape3DProps[i].Name == "bevelT" ) { bBevelTPresent = true; diff --git a/oox/source/export/shapes.cxx b/oox/source/export/shapes.cxx index 215183934b4e..0958986f7467 100644 --- a/oox/source/export/shapes.cxx +++ b/oox/source/export/shapes.cxx @@ -456,7 +456,7 @@ ShapeExport& ShapeExport::WriteCustomShape( Reference< XShape > xShape ) pFS->startElementNS( mnXmlNamespace, XML_cNvPr, XML_id, I32S( GetNewShapeID( xShape ) ), XML_name, IDS( CustomShape ), - XML_hidden, isVisible ? NULL : "1", + XML_hidden, isVisible ? nullptr : "1", FSEND ); if( GETA( URL ) ) @@ -653,7 +653,7 @@ void ShapeExport::WriteGraphicObjectShapePart( Reference< XShape > xShape, const pFS->singleElementNS( mnXmlNamespace, XML_cNvPr, XML_id, I32S( GetNewShapeID( xShape ) ), XML_name, bHaveName ? USS( sName ) : OString( "Picture " + OString::number( mnPictureIdMax++ )).getStr(), - XML_descr, bHaveDesc ? USS( sDescr ) : NULL, + XML_descr, bHaveDesc ? USS( sDescr ) : nullptr, FSEND ); // OOXTODO: //cNvPr children: XML_extLst, XML_hlinkClick, XML_hlinkHover @@ -1212,8 +1212,8 @@ void ShapeExport::WriteTableCellProperties(Reference< XPropertySet> xCellPropSet aRightMargin >>= nRightMargin; mpFS->startElementNS( XML_a, XML_tcPr, - XML_marL, nLeftMargin > 0 ? I32S( oox::drawingml::convertHmmToEmu( nLeftMargin ) ) : NULL, - XML_marR, nRightMargin > 0 ? I32S( oox::drawingml::convertHmmToEmu( nRightMargin ) ): NULL, + XML_marL, nLeftMargin > 0 ? I32S( oox::drawingml::convertHmmToEmu( nLeftMargin ) ) : nullptr, + XML_marR, nRightMargin > 0 ? I32S( oox::drawingml::convertHmmToEmu( nRightMargin ) ): nullptr, FSEND ); // Write background fill for table cell. diff --git a/oox/source/export/vmlexport.cxx b/oox/source/export/vmlexport.cxx index 6fad39092bc4..9e94102beafa 100644 --- a/oox/source/export/vmlexport.cxx +++ b/oox/source/export/vmlexport.cxx @@ -49,16 +49,16 @@ static const sal_Int32 Tag_Container = 44444; static const sal_Int32 Tag_Commit = 44445; VMLExport::VMLExport( ::sax_fastparser::FSHelperPtr pSerializer, VMLTextExport* pTextExport ) - : EscherEx( EscherExGlobalRef(new EscherExGlobal(0)), 0, /*bOOXML=*/true ) + : EscherEx( EscherExGlobalRef(new EscherExGlobal(0)), nullptr, /*bOOXML=*/true ) , m_pSerializer( pSerializer ) , m_pTextExport( pTextExport ) , m_eHOri( 0 ) , m_eVOri( 0 ) , m_eHRel( 0 ) , m_eVRel( 0 ) - , m_pNdTopLeft( 0 ) - , m_pSdrObject( 0 ) - , m_pShapeAttrList( NULL ) + , m_pNdTopLeft( nullptr ) + , m_pSdrObject( nullptr ) + , m_pShapeAttrList( nullptr ) , m_nShapeType( ESCHER_ShpInst_Nil ) , m_nShapeFlags(0) , m_pShapeStyle( new OStringBuffer( 200 ) ) @@ -75,9 +75,9 @@ void VMLExport::SetFS( ::sax_fastparser::FSHelperPtr pSerializer ) VMLExport::~VMLExport() { - delete mpOutStrm, mpOutStrm = NULL; - delete m_pShapeStyle, m_pShapeStyle = NULL; - delete[] m_pShapeTypeWritten, m_pShapeTypeWritten = NULL; + delete mpOutStrm, mpOutStrm = nullptr; + delete m_pShapeStyle, m_pShapeStyle = nullptr; + delete[] m_pShapeTypeWritten, m_pShapeTypeWritten = nullptr; } void VMLExport::OpenContainer( sal_uInt16 nEscherContainer, int nRecInstance ) @@ -118,7 +118,7 @@ void VMLExport::CloseContainer() // cleanup m_nShapeType = ESCHER_ShpInst_Nil; - m_pShapeAttrList = NULL; + m_pShapeAttrList = nullptr; } EscherEx::CloseContainer(); @@ -211,7 +211,7 @@ static void impl_AddArrowHead( sax_fastparser::FastAttributeList *pAttrList, sal if ( !pAttrList ) return; - const char *pArrowHead = NULL; + const char *pArrowHead = nullptr; switch ( nValue ) { case ESCHER_LineNoEnd: pArrowHead = "none"; break; @@ -231,7 +231,7 @@ static void impl_AddArrowLength( sax_fastparser::FastAttributeList *pAttrList, s if ( !pAttrList ) return; - const char *pArrowLength = NULL; + const char *pArrowLength = nullptr; switch ( nValue ) { case ESCHER_LineShortArrow: pArrowLength = "short"; break; @@ -248,7 +248,7 @@ static void impl_AddArrowWidth( sax_fastparser::FastAttributeList *pAttrList, sa if ( !pAttrList ) return; - const char *pArrowWidth = NULL; + const char *pArrowWidth = nullptr; switch ( nValue ) { case ESCHER_LineNarrowArrow: pArrowWidth = "narrow"; break; @@ -280,7 +280,7 @@ static void impl_AddColor( sax_fastparser::FastAttributeList *pAttrList, sal_Int nColor = ( ( nColor & 0xFF ) << 16 ) + ( nColor & 0xFF00 ) + ( ( nColor & 0xFF0000 ) >> 16 ); - const char *pColor = NULL; + const char *pColor = nullptr; char pRgbColor[10]; switch ( nColor ) { @@ -383,7 +383,7 @@ void VMLExport::Commit( EscherPropertyContainer& rProps, const Rectangle& rRect { case ESCHER_Prop_WrapText: // 133 { - const char *pWrapType = NULL; + const char *pWrapType = nullptr; switch ( it->nPropValue ) { case ESCHER_WrapSquare: @@ -607,7 +607,7 @@ void VMLExport::Commit( EscherPropertyContainer& rProps, const Rectangle& rRect { if ( rProps.GetOpt( ESCHER_Prop_fillType, nValue ) ) { - const char *pFillType = NULL; + const char *pFillType = nullptr; switch ( nValue ) { case ESCHER_FillSolid: pFillType = "solid"; break; @@ -677,7 +677,7 @@ void VMLExport::Commit( EscherPropertyContainer& rProps, const Rectangle& rRect if ( rProps.GetOpt( ESCHER_Prop_lineDashing, nValue ) ) { - const char *pDashStyle = NULL; + const char *pDashStyle = nullptr; switch ( nValue ) { case ESCHER_LineSolid: pDashStyle = "solid"; break; @@ -716,7 +716,7 @@ void VMLExport::Commit( EscherPropertyContainer& rProps, const Rectangle& rRect if ( rProps.GetOpt( ESCHER_Prop_lineJoinStyle, nValue ) ) { - const char *pJoinStyle = NULL; + const char *pJoinStyle = nullptr; switch ( nValue ) { case ESCHER_LineJoinBevel: pJoinStyle = "bevel"; break; @@ -729,7 +729,7 @@ void VMLExport::Commit( EscherPropertyContainer& rProps, const Rectangle& rRect if ( rProps.GetOpt( ESCHER_Prop_lineEndCapStyle, nValue ) ) { - const char *pEndCap = NULL; + const char *pEndCap = nullptr; switch ( nValue ) { case ESCHER_LineEndCapRound: pEndCap = "round"; break; @@ -1144,7 +1144,7 @@ sal_Int32 VMLExport::StartShape() const SdrTextObj* pTxtObj = dynamic_cast<const SdrTextObj*>( m_pSdrObject ); if (pTxtObj && m_pTextExport && msfilter::util::HasTextBoxContent(m_nShapeType) && !IsWaterMarkShape(m_pSdrObject->GetName()) && !lcl_isTextBox(m_pSdrObject)) { - const OutlinerParaObject* pParaObj = 0; + const OutlinerParaObject* pParaObj = nullptr; bool bOwnParaObj = false; /* @@ -1192,7 +1192,7 @@ void VMLExport::EndShape( sal_Int32 nShapeElement ) pTextboxAttrList->add(XML_style, "mso-layout-flow-alt:bottom-to-top"); } sax_fastparser::XFastAttributeListRef xTextboxAttrList(pTextboxAttrList); - pTextboxAttrList = 0; + pTextboxAttrList = nullptr; m_pSerializer->startElementNS(XML_v, XML_textbox, xTextboxAttrList); m_pTextExport->WriteVMLTextBox(uno::Reference<drawing::XShape>(xPropertySet, uno::UNO_QUERY_THROW)); diff --git a/oox/source/helper/attributelist.cxx b/oox/source/helper/attributelist.cxx index 160e3a935bd6..70abbc1e521f 100644 --- a/oox/source/helper/attributelist.cxx +++ b/oox/source/helper/attributelist.cxx @@ -107,16 +107,16 @@ sal_Int32 AttributeConversion::decodeIntegerHex( const OUString& rValue ) AttributeList::AttributeList( const Reference< XFastAttributeList >& rxAttribs ) : mxAttribs( rxAttribs ), - mpAttribList( NULL ) + mpAttribList( nullptr ) { OSL_ENSURE( mxAttribs.is(), "AttributeList::AttributeList - missing attribute list interface" ); } sax_fastparser::FastAttributeList *AttributeList::getAttribList() const { - if( mpAttribList == NULL ) + if( mpAttribList == nullptr ) { - assert( dynamic_cast< sax_fastparser::FastAttributeList *>( mxAttribs.get() ) != NULL ); + assert( dynamic_cast< sax_fastparser::FastAttributeList *>( mxAttribs.get() ) != nullptr ); mpAttribList = static_cast< sax_fastparser::FastAttributeList *>( mxAttribs.get() ); } return mpAttribList; @@ -263,10 +263,10 @@ OUString AttributeList::getXString( sal_Int32 nAttrToken, const OUString& rDefau const char* AttributeList::getChar( sal_Int32 nAttrToken ) const { - const char* p = NULL; + const char* p = nullptr; bool bValid = getAttribList()->getAsChar(nAttrToken, p); if (!bValid) - p = NULL; + p = nullptr; return p; } diff --git a/oox/source/helper/binaryinputstream.cxx b/oox/source/helper/binaryinputstream.cxx index 61677a1d1725..a8e06835a6ae 100644 --- a/oox/source/helper/binaryinputstream.cxx +++ b/oox/source/helper/binaryinputstream.cxx @@ -279,7 +279,7 @@ void RelativeInputStream::seek( sal_Int64 nPos ) void RelativeInputStream::close() { - mpInStrm = 0; + mpInStrm = nullptr; mbEof = true; } diff --git a/oox/source/helper/binarystreambase.cxx b/oox/source/helper/binarystreambase.cxx index 929fb6069b52..cd1f25dc8fb4 100644 --- a/oox/source/helper/binarystreambase.cxx +++ b/oox/source/helper/binarystreambase.cxx @@ -136,7 +136,7 @@ void SequenceSeekableStream::seek( sal_Int64 nPos ) void SequenceSeekableStream::close() { - mpData = 0; + mpData = nullptr; mbEof = true; } diff --git a/oox/source/helper/textinputstream.cxx b/oox/source/helper/textinputstream.cxx index 2d0e31493ca5..0e363b16baa2 100644 --- a/oox/source/helper/textinputstream.cxx +++ b/oox/source/helper/textinputstream.cxx @@ -97,7 +97,7 @@ void SAL_CALL UnoBinaryInputStream::closeInput() throw (NotConnectedException, I { ensureConnected(); mpInStrm->close(); - mpInStrm = 0; + mpInStrm = nullptr; } void UnoBinaryInputStream::ensureConnected() const throw (NotConnectedException) diff --git a/oox/source/mathml/importutils.cxx b/oox/source/mathml/importutils.cxx index a759c3f0ed95..463372a4b9e2 100644 --- a/oox/source/mathml/importutils.cxx +++ b/oox/source/mathml/importutils.cxx @@ -41,7 +41,7 @@ public: AttributeListBuilder::AttributeListBuilder( const uno::Reference< xml::sax::XFastAttributeList >& a ) { - if( a.get() == NULL ) + if( a.get() == nullptr ) return; uno::Sequence< xml::FastAttribute > aFastAttrSeq = a->getFastAttributes(); const xml::FastAttribute* pFastAttr = aFastAttrSeq.getConstArray(); diff --git a/oox/source/ole/axbinaryreader.cxx b/oox/source/ole/axbinaryreader.cxx index 62835ee713a3..362a155cc5a7 100644 --- a/oox/source/ole/axbinaryreader.cxx +++ b/oox/source/ole/axbinaryreader.cxx @@ -61,7 +61,7 @@ void AxAlignedInputStream::seek( sal_Int64 nPos ) void AxAlignedInputStream::close() { - mpInStrm = 0; + mpInStrm = nullptr; mbEof = true; } diff --git a/oox/source/ole/axbinarywriter.cxx b/oox/source/ole/axbinarywriter.cxx index 03d9e8684948..05ab3634e44e 100644 --- a/oox/source/ole/axbinarywriter.cxx +++ b/oox/source/ole/axbinarywriter.cxx @@ -51,7 +51,7 @@ void AxAlignedOutputStream::seek( sal_Int64 nPos ) void AxAlignedOutputStream::close() { - mpOutStrm = 0; + mpOutStrm = nullptr; mbEof = true; } diff --git a/oox/source/ole/axcontrol.cxx b/oox/source/ole/axcontrol.cxx index 3abbef228239..f883cd61ee56 100644 --- a/oox/source/ole/axcontrol.cxx +++ b/oox/source/ole/axcontrol.cxx @@ -2636,7 +2636,7 @@ ControlModelBase* EmbeddedControl::createModelFromGuid( const OUString& rClassId if( aClassId.equalsIgnoreAsciiCase( HTML_GUID_TEXTBOX ) ) return &createModel< HtmlTextBoxModel >(); mxModel.reset(); - return 0; + return nullptr; } OUString EmbeddedControl::getServiceName() const diff --git a/oox/source/ole/axcontrolfragment.cxx b/oox/source/ole/axcontrolfragment.cxx index 0f6604c3e0d1..f538da8d28a3 100644 --- a/oox/source/ole/axcontrolfragment.cxx +++ b/oox/source/ole/axcontrolfragment.cxx @@ -57,7 +57,7 @@ ContextHandlerRef AxControlPropertyContext::onCreateContext( sal_Int32 nElement, switch( mnPropId ) { case XML_TOKEN_INVALID: - return 0; + return nullptr; case XML_Picture: case XML_MouseIcon: return this; // import picture path from ax:picture child element @@ -79,7 +79,7 @@ ContextHandlerRef AxControlPropertyContext::onCreateContext( sal_Int32 nElement, } break; } - return 0; + return nullptr; } AxControlFragment::AxControlFragment( XmlFilterBase& rFilter, const OUString& rFragmentPath, EmbeddedControl& rControl ) : @@ -138,7 +138,7 @@ ContextHandlerRef AxControlFragment::onCreateContext( sal_Int32 nElement, const break; } } - return 0; + return nullptr; } } // namespace ole diff --git a/oox/source/ole/olehelper.cxx b/oox/source/ole/olehelper.cxx index cf9bbed1fcfa..ed13efd1fb2f 100644 --- a/oox/source/ole/olehelper.cxx +++ b/oox/source/ole/olehelper.cxx @@ -333,7 +333,7 @@ Reference< css::frame::XFrame > lcl_getFrame( const Reference< css::frame::XMod if ( rxModel.is() ) { Reference< css::frame::XController > xController = rxModel->getCurrentController(); - xFrame = xController.is() ? xController->getFrame() : NULL; + xFrame = xController.is() ? xController->getFrame() : nullptr; } return xFrame; } @@ -362,12 +362,12 @@ public: } OUString getFullName() { return maFullName; } OUString getTypeName() { return maTypeName; } - bool isValid() { return mpModel != NULL; } + bool isValid() { return mpModel != nullptr; } void exportName( const Reference< XOutputStream >& rxOut ); void exportCompObj( const Reference< XOutputStream >& rxOut ); void exportControl( const Reference< XOutputStream >& rxOut, const css::awt::Size& rSize ); }; -OleFormCtrlExportHelper::OleFormCtrlExportHelper( const Reference< XComponentContext >& rxCtx, const Reference< XModel >& rxDocModel, const Reference< XControlModel >& xCntrlModel ) : maControl( "Unknown" ), mpModel( NULL ), maGrfHelper( rxCtx, lcl_getFrame( rxDocModel ), StorageRef() ), mxDocModel( rxDocModel ), mxControlModel( xCntrlModel ) +OleFormCtrlExportHelper::OleFormCtrlExportHelper( const Reference< XComponentContext >& rxCtx, const Reference< XModel >& rxDocModel, const Reference< XControlModel >& xCntrlModel ) : maControl( "Unknown" ), mpModel( nullptr ), maGrfHelper( rxCtx, lcl_getFrame( rxDocModel ), StorageRef() ), mxDocModel( rxDocModel ), mxControlModel( xCntrlModel ) { // try to get the guid Reference< css::beans::XPropertySet > xProps( xCntrlModel, UNO_QUERY ); diff --git a/oox/source/ole/olestorage.cxx b/oox/source/ole/olestorage.cxx index 9bba20551b7e..68935f944e6e 100644 --- a/oox/source/ole/olestorage.cxx +++ b/oox/source/ole/olestorage.cxx @@ -166,7 +166,7 @@ OleStorage::OleStorage( const Reference< XComponentContext >& rxContext, const Reference< XInputStream >& rxInStream, bool bBaseStreamAccess ) : StorageBase( rxInStream, bBaseStreamAccess ), mxContext( rxContext ), - mpParentStorage( 0 ) + mpParentStorage( nullptr ) { OSL_ENSURE( mxContext.is(), "OleStorage::OleStorage - missing component context" ); initStorage( rxInStream ); @@ -176,7 +176,7 @@ OleStorage::OleStorage( const Reference< XComponentContext >& rxContext, const Reference< XStream >& rxOutStream, bool bBaseStreamAccess ) : StorageBase( rxOutStream, bBaseStreamAccess ), mxContext( rxContext ), - mpParentStorage( 0 ) + mpParentStorage( nullptr ) { OSL_ENSURE( mxContext.is(), "OleStorage::OleStorage - missing component context" ); initStorage( rxOutStream ); diff --git a/oox/source/ole/vbacontrol.cxx b/oox/source/ole/vbacontrol.cxx index 82bc27d9606f..caeb02057a1b 100644 --- a/oox/source/ole/vbacontrol.cxx +++ b/oox/source/ole/vbacontrol.cxx @@ -282,7 +282,7 @@ ControlModelRef VbaSiteModel::createControlModel( const AxClassTable& rClassTabl xCtrlModel->setAwtModelMode(); // check that container model matches container flag in site data - bool bModelIsContainer = dynamic_cast< const AxContainerModelBase* >( xCtrlModel.get() ) != 0; + bool bModelIsContainer = dynamic_cast< const AxContainerModelBase* >( xCtrlModel.get() ) != nullptr; bool bTypeMatch = bModelIsContainer == isContainer(); OSL_ENSURE( bTypeMatch, "VbaSiteModel::createControlModel - container type does not match container flag" ); if( !bTypeMatch ) @@ -667,7 +667,7 @@ void VbaFormControl::finalizeEmbeddedControls() rLastGroup.insert( rLastGroup.end(), xControl->maControls.begin(), xControl->maControls.end() ); xControl->maControls.clear(); // check if last control of the group box is an option button - bLastWasOptionButton = dynamic_cast< const AxOptionButtonModel* >( rLastGroup.back()->mxCtrlModel.get() ) != 0; + bLastWasOptionButton = dynamic_cast< const AxOptionButtonModel* >( rLastGroup.back()->mxCtrlModel.get() ) != nullptr; } } } diff --git a/oox/source/ole/vbaexport.cxx b/oox/source/ole/vbaexport.cxx index a30c32c3113d..2cb2fea90133 100644 --- a/oox/source/ole/vbaexport.cxx +++ b/oox/source/ole/vbaexport.cxx @@ -104,7 +104,7 @@ OUString createGuidStringFromInt(sal_uInt8 nGuid[16]) OUString generateGUIDString() { sal_uInt8 nGuid[16]; - rtl_createUuid(nGuid, NULL, true); + rtl_createUuid(nGuid, nullptr, true); return createGuidStringFromInt(nGuid); } @@ -113,7 +113,7 @@ OUString generateGUIDString() VBACompressionChunk::VBACompressionChunk(SvStream& rCompressedStream, const sal_uInt8* pData, sal_Size nChunkSize) : mrCompressedStream(rCompressedStream) , mpUncompressedData(pData) - , mpCompressedChunkStream(0) + , mpCompressedChunkStream(nullptr) , mnChunkSize(nChunkSize) , mnCompressedCurrent(0) , mnCompressedEnd(0) @@ -895,7 +895,7 @@ void exportPROJECTStream(SvStream& rStrm, css::uno::Reference<css::container::XN aProtectedStream.WriteUInt32(0x00000000); const sal_uInt8* pData = static_cast<const sal_uInt8*>(aProtectedStream.GetData()); sal_uInt8 nProjKey = VBAEncryption::calculateProjKey(aProjectID); - VBAEncryption aProtectionState(pData, 4, rStrm, NULL, nProjKey); + VBAEncryption aProtectionState(pData, 4, rStrm, nullptr, nProjKey); aProtectionState.write(); exportString(rStrm, "\"\r\n"); #else @@ -908,7 +908,7 @@ void exportPROJECTStream(SvStream& rStrm, css::uno::Reference<css::container::XN aProtectedStream.Seek(0); aProtectedStream.WriteUInt8(0x00); pData = static_cast<const sal_uInt8*>(aProtectedStream.GetData()); - VBAEncryption aProjectPassword(pData, 1, rStrm, NULL, nProjKey); + VBAEncryption aProjectPassword(pData, 1, rStrm, nullptr, nProjKey); aProjectPassword.write(); exportString(rStrm, "\"\r\n"); #else @@ -921,7 +921,7 @@ void exportPROJECTStream(SvStream& rStrm, css::uno::Reference<css::container::XN aProtectedStream.Seek(0); aProtectedStream.WriteUInt8(0xFF); pData = static_cast<const sal_uInt8*>(aProtectedStream.GetData()); - VBAEncryption aVisibilityState(pData, 1, rStrm, NULL, nProjKey); + VBAEncryption aVisibilityState(pData, 1, rStrm, nullptr, nProjKey); aVisibilityState.write(); exportString(rStrm, "\"\r\n\r\n"); #else diff --git a/oox/source/ole/vbainputstream.cxx b/oox/source/ole/vbainputstream.cxx index 06c1035604a4..65eb91c12e37 100644 --- a/oox/source/ole/vbainputstream.cxx +++ b/oox/source/ole/vbainputstream.cxx @@ -62,7 +62,7 @@ void VbaInputStream::seek( sal_Int64 ) void VbaInputStream::close() { - mpInStrm = 0; + mpInStrm = nullptr; mbEof = true; } diff --git a/oox/source/ole/vbaproject.cxx b/oox/source/ole/vbaproject.cxx index b492b7a12cdb..be65689b0d26 100644 --- a/oox/source/ole/vbaproject.cxx +++ b/oox/source/ole/vbaproject.cxx @@ -155,7 +155,7 @@ bool VbaProject::importVbaProject( StorageBase& rVbaPrjStrg ) if ( mxDocModel.is() ) { Reference< css::frame::XController > xController = mxDocModel->getCurrentController(); - xFrame = xController.is() ? xController->getFrame() : NULL; + xFrame = xController.is() ? xController->getFrame() : nullptr; } StorageRef noStorage; // if the GraphicHelper tries to use noStorage it will of course crash diff --git a/oox/source/ppt/commonbehaviorcontext.cxx b/oox/source/ppt/commonbehaviorcontext.cxx index 32ac8f0bd640..3fad584397e3 100644 --- a/oox/source/ppt/commonbehaviorcontext.cxx +++ b/oox/source/ppt/commonbehaviorcontext.cxx @@ -84,7 +84,7 @@ namespace oox { namespace ppt { if( mbIsInAttrName ) { const ImplAttributeNameConversion *attrConv = getAttributeConversionList(); - while( attrConv->mpMSName != NULL ) + while( attrConv->mpMSName != nullptr ) { if(msCurrentAttribute.equalsAscii( attrConv->mpMSName ) ) { diff --git a/oox/source/ppt/commontimenodecontext.cxx b/oox/source/ppt/commontimenodecontext.cxx index 22a40ea8ef60..83a3af8acabe 100644 --- a/oox/source/ppt/commontimenodecontext.cxx +++ b/oox/source/ppt/commontimenodecontext.cxx @@ -76,7 +76,7 @@ const convert_subtype* convert_subtype::getList() { 272, "in-slightly" }, { 288, "out-slightly" }, { 528, "in-from-screen-center" }, - { 0, 0 } + { 0, nullptr } }; return aList; @@ -288,7 +288,7 @@ const preset_maping* preset_maping::getList() { css::presentation::EffectPresetClass::MOTIONPATH, 39 ,"ooo-motionpath-s-curve-2" }, { css::presentation::EffectPresetClass::MOTIONPATH, 45 ,"ooo-motionpath-heartbeat" }, - { 0,0,0 } + { 0,0,nullptr } }; return aList; @@ -296,7 +296,7 @@ const preset_maping* preset_maping::getList() OUString getConvertedSubType( sal_Int16 nPresetClass, sal_Int32 nPresetId, sal_Int32 nPresetSubType ) { - const sal_Char* pStr = 0; + const sal_Char* pStr = nullptr; if( (nPresetClass == EffectPresetClass::ENTRANCE) || (nPresetClass == EffectPresetClass::EXIT) ) { @@ -330,7 +330,7 @@ OUString getConvertedSubType( sal_Int16 nPresetClass, sal_Int32 nPresetId, sal_I } } - if( pStr == 0 ) + if( pStr == nullptr ) { const convert_subtype* p = convert_subtype::getList(); diff --git a/oox/source/ppt/dgmimport.cxx b/oox/source/ppt/dgmimport.cxx index 0a3f3d8a71b2..e841d3cdb10b 100644 --- a/oox/source/ppt/dgmimport.cxx +++ b/oox/source/ppt/dgmimport.cxx @@ -93,7 +93,7 @@ bool QuickDiagrammingImport::exportDocument() throw() const ::oox::drawingml::Theme* QuickDiagrammingImport::getCurrentTheme() const { // TODO - return 0; + return nullptr; } const oox::drawingml::table::TableStyleListPtr QuickDiagrammingImport::getTableStyles() @@ -103,12 +103,12 @@ const oox::drawingml::table::TableStyleListPtr QuickDiagrammingImport::getTableS oox::vml::Drawing* QuickDiagrammingImport::getVmlDrawing() { - return 0; + return nullptr; } oox::drawingml::chart::ChartConverter* QuickDiagrammingImport::getChartConverter() { - return 0; + return nullptr; } OUString QuickDiagrammingImport::getImplementationName() throw (css::uno::RuntimeException, std::exception) @@ -118,7 +118,7 @@ OUString QuickDiagrammingImport::getImplementationName() throw (css::uno::Runtim ::oox::ole::VbaProject* QuickDiagrammingImport::implCreateVbaProject() const { - return 0; + return nullptr; } }} diff --git a/oox/source/ppt/dgmlayout.cxx b/oox/source/ppt/dgmlayout.cxx index 493d161b4b2f..acf79794d4f7 100644 --- a/oox/source/ppt/dgmlayout.cxx +++ b/oox/source/ppt/dgmlayout.cxx @@ -155,12 +155,12 @@ const oox::drawingml::table::TableStyleListPtr QuickDiagrammingLayout::getTableS ::oox::vml::Drawing* QuickDiagrammingLayout::getVmlDrawing() { - return 0; + return nullptr; } ::oox::drawingml::chart::ChartConverter* QuickDiagrammingLayout::getChartConverter() { - return 0; + return nullptr; } OUString QuickDiagrammingLayout::getImplementationName() throw (css::uno::RuntimeException, std::exception) @@ -170,7 +170,7 @@ OUString QuickDiagrammingLayout::getImplementationName() throw (css::uno::Runtim ::oox::ole::VbaProject* QuickDiagrammingLayout::implCreateVbaProject() const { - return 0; + return nullptr; } }} diff --git a/oox/source/ppt/pptfilterhelpers.cxx b/oox/source/ppt/pptfilterhelpers.cxx index 4979f5b1eea9..6496e9153e60 100644 --- a/oox/source/ppt/pptfilterhelpers.cxx +++ b/oox/source/ppt/pptfilterhelpers.cxx @@ -49,7 +49,7 @@ namespace oox { namespace ppt { { MS_STYLEFONTSTYLE, "style.fontStyle", "CharPosture" }, { MS_STYLEVISIBILITY, "style.visibility", "Visibility" }, { MS_STYLEOPACITY, "style.opacity", "Opacity" }, - { MS_UNKNOWN, NULL, NULL } + { MS_UNKNOWN, nullptr, nullptr } }; return aList; @@ -98,7 +98,7 @@ namespace oox { namespace ppt { { "slide(fromBottom)", css::animations::TransitionType::SLIDEWIPE, css::animations::TransitionSubType::FROMBOTTOM, true }, { "dissolve", css::animations::TransitionType::DISSOLVE, css::animations::TransitionSubType::DEFAULT, true }, { "image", css::animations::TransitionType::DISSOLVE, css::animations::TransitionSubType::DEFAULT, true }, // TODO - { NULL, 0, 0, false } + { nullptr, 0, 0, false } }; return aList; @@ -116,7 +116,7 @@ namespace oox { namespace ppt { p++; } - return NULL; + return nullptr; } } } diff --git a/oox/source/ppt/pptimport.cxx b/oox/source/ppt/pptimport.cxx index 46ddb48987ee..a059d6710718 100644 --- a/oox/source/ppt/pptimport.cxx +++ b/oox/source/ppt/pptimport.cxx @@ -60,7 +60,7 @@ uno::Reference< uno::XInterface > SAL_CALL PowerPointImport_createInstance( cons } #if OSL_DEBUG_LEVEL > 0 -XmlFilterBase* PowerPointImport::mpDebugFilterBase = NULL; +XmlFilterBase* PowerPointImport::mpDebugFilterBase = nullptr; #endif PowerPointImport::PowerPointImport( const Reference< XComponentContext >& rxContext ) throw( RuntimeException ) : @@ -139,7 +139,7 @@ sal_Int32 PowerPointImport::getSchemeColor( sal_Int32 nToken ) const const ::oox::drawingml::Theme* PowerPointImport::getCurrentTheme() const { - return mpActualSlidePersist ? mpActualSlidePersist->getTheme().get() : 0; + return mpActualSlidePersist ? mpActualSlidePersist->getTheme().get() : nullptr; } sal_Bool SAL_CALL PowerPointImport::filter( const Sequence< PropertyValue >& rDescriptor ) throw( RuntimeException, std::exception ) @@ -167,7 +167,7 @@ sal_Bool SAL_CALL PowerPointImport::filter( const Sequence< PropertyValue >& rDe ::oox::vml::Drawing* PowerPointImport::getVmlDrawing() { - return mpActualSlidePersist ? mpActualSlidePersist->getDrawing() : 0; + return mpActualSlidePersist ? mpActualSlidePersist->getDrawing() : nullptr; } const oox::drawingml::table::TableStyleListPtr PowerPointImport::getTableStyles() diff --git a/oox/source/ppt/pptshape.cxx b/oox/source/ppt/pptshape.cxx index cf61562ae6ad..869d0c41f59e 100644 --- a/oox/source/ppt/pptshape.cxx +++ b/oox/source/ppt/pptshape.cxx @@ -277,7 +277,7 @@ void PPTShape::addShape( } if( pPPTPlaceholder && pPPTPlaceholder->mpPlaceholder.get() ) { SAL_INFO("oox.ppt","placeholder has parent placeholder: " << pPPTPlaceholder->mpPlaceholder->getId() << " type: " << lclDebugSubType( pPPTPlaceholder->mpPlaceholder->getSubType() ) << " index: " << pPPTPlaceholder->mpPlaceholder->getSubTypeIndex().get() ); - SAL_INFO("oox.ppt","has textbody " << (pPPTPlaceholder->mpPlaceholder->getTextBody() != 0) ); + SAL_INFO("oox.ppt","has textbody " << (pPPTPlaceholder->mpPlaceholder->getTextBody() != nullptr) ); TextListStylePtr pPlaceholderStyle = getSubTypeTextListStyle( rSlidePersist, pPPTPlaceholder->mpPlaceholder->getSubType() ); if( pPPTPlaceholder->mpPlaceholder->getTextBody() ) pNewTextListStyle->apply( pPPTPlaceholder->mpPlaceholder->getTextBody()->getTextListStyle() ); @@ -324,7 +324,7 @@ void PPTShape::addShape( } else setMasterTextListStyle( aMasterTextListStyle ); - Reference< XShape > xShape( createAndInsert( rFilterBase, sServiceName, pTheme, rxShapes, pShapeRect, bClearText, mpPlaceholder.get() != NULL, aTransformation, getFillProperties() ) ); + Reference< XShape > xShape( createAndInsert( rFilterBase, sServiceName, pTheme, rxShapes, pShapeRect, bClearText, mpPlaceholder.get() != nullptr, aTransformation, getFillProperties() ) ); if ( !rSlidePersist.isMasterPage() && rSlidePersist.getPage().is() && ( (sal_Int32)mnSubType == XML_title ) ) { try diff --git a/oox/source/ppt/slidefragmenthandler.cxx b/oox/source/ppt/slidefragmenthandler.cxx index 5a27ea34a114..2d75afc529fb 100644 --- a/oox/source/ppt/slidefragmenthandler.cxx +++ b/oox/source/ppt/slidefragmenthandler.cxx @@ -162,7 +162,7 @@ SlideFragmentHandler::~SlideFragmentHandler() case PPT_TOKEN( bgRef ): // a:CT_StyleMatrixReference { - const FillProperties *pFillProperties = NULL; + const FillProperties *pFillProperties = nullptr; if( mpSlidePersistPtr->getTheme() ) pFillProperties = mpSlidePersistPtr->getTheme()->getFillStyle( rAttribs.getInteger( XML_idx, -1 ) ); FillPropertiesPtr pFillPropertiesPtr( pFillProperties ? new FillProperties( *pFillProperties ) : new FillProperties() ); diff --git a/oox/source/ppt/slidepersist.cxx b/oox/source/ppt/slidepersist.cxx index 59026cf1f923..d6e3f9929232 100644 --- a/oox/source/ppt/slidepersist.cxx +++ b/oox/source/ppt/slidepersist.cxx @@ -141,9 +141,9 @@ void SlidePersist::createXShapes( XmlFilterBase& rFilterBase ) PPTShape* pPPTShape = dynamic_cast< PPTShape* >( (*aChildIter).get() ); basegfx::B2DHomMatrix aTransformation; if ( pPPTShape ) - pPPTShape->addShape( rFilterBase, *this, getTheme().get(), xShapes, aTransformation, 0, &getShapeMap() ); + pPPTShape->addShape( rFilterBase, *this, getTheme().get(), xShapes, aTransformation, nullptr, &getShapeMap() ); else - (*aChildIter)->addShape( rFilterBase, getTheme().get(), xShapes, aTransformation, maShapesPtr->getFillProperties(), 0, &getShapeMap() ); + (*aChildIter)->addShape( rFilterBase, getTheme().get(), xShapes, aTransformation, maShapesPtr->getFillProperties(), nullptr, &getShapeMap() ); } } @@ -179,7 +179,7 @@ void setTextStyle( Reference< beans::XPropertySet >& rxPropSet, const XmlFilterB oox::drawingml::TextListStylePtr& pTextListStylePtr, int nLevel ) { ::oox::drawingml::TextParagraphPropertiesPtr pTextParagraphPropertiesPtr( pTextListStylePtr->getListStyle()[ nLevel ] ); - if( pTextParagraphPropertiesPtr == 0 ) + if( pTextParagraphPropertiesPtr == nullptr ) { // no properties. return return; diff --git a/oox/source/ppt/timenodelistcontext.cxx b/oox/source/ppt/timenodelistcontext.cxx index 0a6035d8ccf6..c5ddf7654396 100644 --- a/oox/source/ppt/timenodelistcontext.cxx +++ b/oox/source/ppt/timenodelistcontext.cxx @@ -892,7 +892,7 @@ namespace oox { namespace ppt { const Reference< XFastAttributeList >& xAttribs, const TimeNodePtr & pNode ) { - TimeNodeContext *pCtx = NULL; + TimeNodeContext *pCtx = nullptr; switch( aElement ) { case PPT_TOKEN( animClr ): diff --git a/oox/source/shape/LockedCanvasContext.cxx b/oox/source/shape/LockedCanvasContext.cxx index 31b7dc1693b5..61728b248b16 100644 --- a/oox/source/shape/LockedCanvasContext.cxx +++ b/oox/source/shape/LockedCanvasContext.cxx @@ -54,7 +54,7 @@ LockedCanvasContext::~LockedCanvasContext() SAL_WARN("oox", "LockedCanvasContext::createFastChildContext: unhandled element:" << getBaseToken(aElementToken)); break; } - return 0; + return nullptr; } } diff --git a/oox/source/shape/ShapeContextHandler.cxx b/oox/source/shape/ShapeContextHandler.cxx index 6b288fda9755..35f64b9d34d1 100644 --- a/oox/source/shape/ShapeContextHandler.cxx +++ b/oox/source/shape/ShapeContextHandler.cxx @@ -532,7 +532,7 @@ ShapeContextHandler::getShape() throw (uno::RuntimeException, std::exception) mxWpgContext.clear(); } } - else if (mpShape.get() != NULL) + else if (mpShape.get() != nullptr) { basegfx::B2DHomMatrix aTransformation; mpShape->addShape(*mxFilterBase, mpThemePtr.get(), xShapes, aTransformation, mpShape->getFillProperties() ); diff --git a/oox/source/shape/ShapeFilterBase.cxx b/oox/source/shape/ShapeFilterBase.cxx index 3a69807ef08d..9071715cb24a 100644 --- a/oox/source/shape/ShapeFilterBase.cxx +++ b/oox/source/shape/ShapeFilterBase.cxx @@ -49,7 +49,7 @@ void ShapeFilterBase::setCurrentTheme(::oox::drawingml::ThemePtr pTheme) ::oox::vml::Drawing* ShapeFilterBase::getVmlDrawing() { - return 0; + return nullptr; } const ::oox::drawingml::table::TableStyleListPtr ShapeFilterBase::getTableStyles() diff --git a/oox/source/shape/WpgContext.cxx b/oox/source/shape/WpgContext.cxx index 4cbf200f8ce2..e343bd5cb8db 100644 --- a/oox/source/shape/WpgContext.cxx +++ b/oox/source/shape/WpgContext.cxx @@ -64,7 +64,7 @@ oox::core::ContextHandlerRef WpgContext::onCreateContext(sal_Int32 nElementToken SAL_WARN("oox", "WpgContext::createFastChildContext: unhandled element: " << getBaseToken(nElementToken)); break; } - return 0; + return nullptr; } } diff --git a/oox/source/shape/WpsContext.cxx b/oox/source/shape/WpsContext.cxx index 0cf558c63cb5..894e504f7617 100644 --- a/oox/source/shape/WpsContext.cxx +++ b/oox/source/shape/WpsContext.cxx @@ -222,7 +222,7 @@ oox::core::ContextHandlerRef WpsContext::onCreateContext(sal_Int32 nElementToken SAL_WARN("oox", "WpsContext::createFastChildContext: unhandled element: " << getBaseToken(nElementToken)); break; } - return 0; + return nullptr; } } diff --git a/oox/source/vml/vmldrawingfragment.cxx b/oox/source/vml/vmldrawingfragment.cxx index 4ba82addae71..17dcd9c77a58 100644 --- a/oox/source/vml/vmldrawingfragment.cxx +++ b/oox/source/vml/vmldrawingfragment.cxx @@ -66,7 +66,7 @@ ContextHandlerRef DrawingFragment::onCreateContext( sal_Int32 nElement, const At } break; } - return 0; + return nullptr; } void DrawingFragment::finalizeImport() diff --git a/oox/source/vml/vmlshape.cxx b/oox/source/vml/vmlshape.cxx index daeca3fbaf17..5090a29ad161 100644 --- a/oox/source/vml/vmlshape.cxx +++ b/oox/source/vml/vmlshape.cxx @@ -285,12 +285,12 @@ OUString ShapeBase::getShapeName() const const ShapeType* ShapeBase::getChildTypeById( const OUString& ) const { - return 0; + return nullptr; } const ShapeBase* ShapeBase::getChildById( const OUString& ) const { - return 0; + return nullptr; } Reference< XShape > ShapeBase::convertAndInsert( const Reference< XShapes >& rxShapes, const ShapeParentAnchor* pParentAnchor ) const @@ -432,7 +432,7 @@ Reference< XShape > ShapeBase::convertAndInsert( const Reference< XShapes >& rxS /* Notify the drawing that a new shape has been inserted. For convenience, pass the rectangle that contains position and size of the shape. */ - bool bGroupChild = pParentAnchor != 0; + bool bGroupChild = pParentAnchor != nullptr; mrDrawing.notifyXShapeInserted( xShape, aShapeRect, *this, bGroupChild ); } } diff --git a/oox/source/vml/vmlshapecontainer.cxx b/oox/source/vml/vmlshapecontainer.cxx index a7fbb785ab20..055365202d5d 100644 --- a/oox/source/vml/vmlshapecontainer.cxx +++ b/oox/source/vml/vmlshapecontainer.cxx @@ -87,7 +87,7 @@ const ShapeType* ShapeContainer::getShapeTypeById( const OUString& rShapeId, boo for( ShapeVector::const_iterator aVIt = maShapes.begin(), aVEnd = maShapes.end(); aVIt != aVEnd; ++aVIt ) if( const ShapeType* pType = (*aVIt)->getChildTypeById( rShapeId ) ) return pType; - return 0; + return nullptr; } const ShapeBase* ShapeContainer::getShapeById( const OUString& rShapeId, bool bDeep ) const @@ -100,7 +100,7 @@ const ShapeBase* ShapeContainer::getShapeById( const OUString& rShapeId, bool bD for( ShapeVector::const_iterator aVIt = maShapes.begin(), aVEnd = maShapes.end(); aVIt != aVEnd; ++aVIt ) if( const ShapeBase* pShape = (*aVIt)->getChildById( rShapeId ) ) return pShape; - return 0; + return nullptr; } std::shared_ptr< ShapeBase > ShapeContainer::takeLastShape() diff --git a/oox/source/vml/vmlshapecontext.cxx b/oox/source/vml/vmlshapecontext.cxx index 4ea10e87bd98..de0423c03689 100644 --- a/oox/source/vml/vmlshapecontext.cxx +++ b/oox/source/vml/vmlshapecontext.cxx @@ -155,7 +155,7 @@ ContextHandlerRef ShapeLayoutContext::onCreateContext( sal_Int32 nElement, const } break; } - return 0; + return nullptr; } ClientDataContext::ClientDataContext( ContextHandler2Helper& rParent, @@ -173,7 +173,7 @@ ContextHandlerRef ClientDataContext::onCreateContext( sal_Int32 /*nElement*/, co maElementText.clear(); return this; } - return 0; + return nullptr; } void ClientDataContext::onCharacters( const OUString& rChars ) @@ -259,7 +259,7 @@ ContextHandlerRef ShapeContextBase::createShapeContext( ContextHandler2Helper& r case VML_TOKEN( image ): return new ShapeContext( rParent, rShapes.createShape< ComplexShape >(), rAttribs ); } - return 0; + return nullptr; } ShapeTypeContext::ShapeTypeContext( ContextHandler2Helper& rParent, ShapeType& rShapeType, const AttributeList& rAttribs ) : @@ -368,7 +368,7 @@ ContextHandlerRef ShapeTypeContext::onCreateContext( sal_Int32 nElement, const A mrTypeModel.maTextpathModel.moString.assignIfUsed(rAttribs.getString(XML_string)); break; } - return 0; + return nullptr; } OptValue< OUString > ShapeTypeContext::decodeFragmentPath( const AttributeList& rAttribs, sal_Int32 nToken ) const diff --git a/oox/source/vml/vmltextbox.cxx b/oox/source/vml/vmltextbox.cxx index fbd821727883..4b9f363136ba 100644 --- a/oox/source/vml/vmltextbox.cxx +++ b/oox/source/vml/vmltextbox.cxx @@ -61,7 +61,7 @@ void TextBox::appendPortion( const TextParagraphModel& rParagraph, const TextFon const TextFontModel* TextBox::getFirstFont() const { - return maPortions.empty() ? 0 : &maPortions.front().maFont; + return maPortions.empty() ? nullptr : &maPortions.front().maFont; } OUString TextBox::getText() const diff --git a/oox/source/vml/vmltextboxcontext.cxx b/oox/source/vml/vmltextboxcontext.cxx index d1a8b1256d74..662fdb49695e 100644 --- a/oox/source/vml/vmltextboxcontext.cxx +++ b/oox/source/vml/vmltextboxcontext.cxx @@ -250,7 +250,7 @@ ContextHandlerRef TextBoxContext::onCreateContext( sal_Int32 nElement, const Att SAL_INFO("oox", "unhandled 0x" << std::hex << getCurrentElement()); break; } - return 0; + return nullptr; } void TextBoxContext::onStartElement(const AttributeList& rAttribs) |