diff options
Diffstat (limited to 'filter/source/msfilter')
-rw-r--r-- | filter/source/msfilter/escherex.cxx | 36 | ||||
-rw-r--r-- | filter/source/msfilter/eschesdo.cxx | 28 | ||||
-rw-r--r-- | filter/source/msfilter/eschesdo.hxx | 2 | ||||
-rw-r--r-- | filter/source/msfilter/mscodec.cxx | 6 | ||||
-rw-r--r-- | filter/source/msfilter/msdffimp.cxx | 106 | ||||
-rw-r--r-- | filter/source/msfilter/msoleexp.cxx | 4 | ||||
-rw-r--r-- | filter/source/msfilter/mstoolbar.cxx | 2 | ||||
-rw-r--r-- | filter/source/msfilter/msvbahelper.cxx | 10 | ||||
-rw-r--r-- | filter/source/msfilter/rtfutil.cxx | 4 | ||||
-rw-r--r-- | filter/source/msfilter/services.cxx | 4 | ||||
-rw-r--r-- | filter/source/msfilter/svdfppt.cxx | 138 | ||||
-rw-r--r-- | filter/source/msfilter/svxmsbas2.cxx | 2 | ||||
-rw-r--r-- | filter/source/msfilter/util.cxx | 4 | ||||
-rw-r--r-- | filter/source/msfilter/viscache.hxx | 6 |
14 files changed, 176 insertions, 176 deletions
diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx index eb8e2134cd26..fee5ad8d7981 100644 --- a/filter/source/msfilter/escherex.cxx +++ b/filter/source/msfilter/escherex.cxx @@ -176,7 +176,7 @@ EscherPropertyContainer::~EscherPropertyContainer() void EscherPropertyContainer::AddOpt( sal_uInt16 nPropID, sal_uInt32 nPropValue, bool bBlib ) { - AddOpt( nPropID, bBlib, nPropValue, NULL, 0 ); + AddOpt( nPropID, bBlib, nPropValue, nullptr, 0 ); } void EscherPropertyContainer::AddOpt( sal_uInt16 nPropID, const OUString& rString ) @@ -423,7 +423,7 @@ void EscherPropertyContainer::CreateGradientProperties( const css::uno::Reference< css::beans::XPropertySet > & rXPropSet , bool bTransparentGradient) { css::uno::Any aAny; - css::awt::Gradient const * pGradient = NULL; + css::awt::Gradient const * pGradient = nullptr; sal_uInt32 nFillType = ESCHER_FillShadeScale; sal_Int32 nAngle = 0; @@ -1264,7 +1264,7 @@ bool EscherPropertyContainer::CreateOLEGraphicProperties( if ( rXShape.is() ) { SdrObject* pSdrOLE2( GetSdrObjectFromXShape( rXShape ) ); // SJ: leaving unoapi, because currently there is - if ( pSdrOLE2 && 0 != dynamic_cast<const SdrOle2Obj* > (pSdrOLE2) ) // no access to the native graphic object + if ( pSdrOLE2 && nullptr != dynamic_cast<const SdrOle2Obj* > (pSdrOLE2) ) // no access to the native graphic object { const Graphic* pGraphic = static_cast<SdrOle2Obj*>(pSdrOLE2)->GetGraphic(); if ( pGraphic ) @@ -1706,7 +1706,7 @@ bool EscherPropertyContainer::CreateGraphicProperties( if ( pGraphicProvider && pPicOutStrm && pShapeBoundRect ) { Rectangle aRect( Point( 0, 0 ), pShapeBoundRect->GetSize() ); - const sal_uInt32 nBlibId(pGraphicProvider->GetBlibID(*pPicOutStrm, aUniqueId, aRect, NULL, pGraphicAttr.get())); + const sal_uInt32 nBlibId(pGraphicProvider->GetBlibID(*pPicOutStrm, aUniqueId, aRect, nullptr, pGraphicAttr.get())); if(nBlibId) { @@ -1729,7 +1729,7 @@ bool EscherPropertyContainer::CreateGraphicProperties( SvMemoryStream aMemStrm; Rectangle aRect; - if ( aProvider.GetBlibID( aMemStrm, aUniqueId, aRect, NULL, pGraphicAttr.get(), bOOxmlExport ) ) + if ( aProvider.GetBlibID( aMemStrm, aUniqueId, aRect, nullptr, pGraphicAttr.get(), bOOxmlExport ) ) { // grab BLIP from stream and insert directly as complex property // ownership of stream memory goes to complex property @@ -1849,7 +1849,7 @@ tools::PolyPolygon EscherPropertyContainer::GetPolyPolygon( const css::uno::Any& // get pointer to inner sequences css::drawing::PointSequence const * pOuterSequence = pSourcePolyPolygon->getConstArray(); - bNoError = pOuterSequence != NULL; + bNoError = pOuterSequence != nullptr; if ( bNoError ) { sal_uInt16 a, b, nInnerSequenceCount; @@ -1858,13 +1858,13 @@ tools::PolyPolygon EscherPropertyContainer::GetPolyPolygon( const css::uno::Any& for( a = 0; a < nOuterSequenceCount; a++ ) { css::drawing::PointSequence const * pInnerSequence = pOuterSequence++; - bNoError = pInnerSequence != NULL; + bNoError = pInnerSequence != nullptr; if ( bNoError ) { // get pointer to arrays css::awt::Point const * pArray = pInnerSequence->getConstArray(); - if ( pArray != NULL ) + if ( pArray != nullptr ) { nInnerSequenceCount = (sal_uInt16)pInnerSequence->getLength(); aPolygon = tools::Polygon( nInnerSequenceCount ); @@ -1884,14 +1884,14 @@ tools::PolyPolygon EscherPropertyContainer::GetPolyPolygon( const css::uno::Any& css::drawing::PointSequence const * pInnerSequence = static_cast<css::drawing::PointSequence const *>(rAny.getValue()); - bNoError = pInnerSequence != NULL; + bNoError = pInnerSequence != nullptr; if ( bNoError ) { sal_uInt16 a, nInnerSequenceCount; // get pointer to arrays css::awt::Point const * pArray = pInnerSequence->getConstArray(); - if ( pArray != NULL ) + if ( pArray != nullptr ) { nInnerSequenceCount = (sal_uInt16)pInnerSequence->getLength(); aPolygon = tools::Polygon( nInnerSequenceCount ); @@ -2488,7 +2488,7 @@ void ConvertEnhancedCustomShapeEquation( SdrObjCustomShape* pCustoShape, { std::shared_ptr< EnhancedCustomShape::ExpressionNode > aExpressNode( EnhancedCustomShape::FunctionParser::parseFunction( sEquationSource[ i ], aCustoShape2d ) ); - css::drawing::EnhancedCustomShapeParameter aPara( aExpressNode->fillNode( rEquations, NULL, 0 ) ); + css::drawing::EnhancedCustomShapeParameter aPara( aExpressNode->fillNode( rEquations, nullptr, 0 ) ); if ( aPara.Type != css::drawing::EnhancedCustomShapeParameterType::EQUATION ) { EnhancedCustomShapeEquation aEquation; @@ -3998,7 +3998,7 @@ EscherBlibEntry::EscherBlibEntry( sal_uInt32 nPictureOffset, const GraphicObject maPrefMapMode ( rObject.GetPrefMapMode() ), mbIsEmpty ( true ) { - mbIsNativeGraphicPossible = ( pGraphicAttr == NULL ); + mbIsNativeGraphicPossible = ( pGraphicAttr == nullptr ); meBlibType = UNKNOWN; mnSize = 0; @@ -4099,7 +4099,7 @@ bool EscherBlibEntry::operator==( const EscherBlibEntry& rEscherBlibEntry ) cons EscherGraphicProvider::EscherGraphicProvider( sal_uInt32 nFlags ) : mnFlags ( nFlags ), - mpBlibEntrys ( NULL ), + mpBlibEntrys ( nullptr ), mnBlibBufSize ( 0 ), mnBlibEntrys ( 0 ) { @@ -4252,7 +4252,7 @@ sal_uInt32 EscherGraphicProvider::GetBlibID( SvStream& rPicOutStrm, const OStrin GfxLink aGraphicLink; SvMemoryStream aStream; - const sal_uInt8* pGraphicAry = NULL; + const sal_uInt8* pGraphicAry = nullptr; if ( p_EscherBlibEntry->mbIsNativeGraphicPossible && aGraphic.IsLink() ) { @@ -4464,7 +4464,7 @@ sal_uInt32 EscherGraphicProvider::GetBlibID( SvStream& rPicOutStrm, const OStrin rPicOutStrm.WriteUInt32( nPos - nAtomSize ); rPicOutStrm.Seek( nPos ); } - nBlibId = ImplInsertBlib( p_EscherBlibEntry ), p_EscherBlibEntry = NULL; + nBlibId = ImplInsertBlib( p_EscherBlibEntry ), p_EscherBlibEntry = nullptr; } } delete p_EscherBlibEntry; @@ -4828,7 +4828,7 @@ void EscherSolverContainer::WriteSolver( SvStream& rStrm ) EscherExGlobal::EscherExGlobal( sal_uInt32 nGraphicProvFlags ) : EscherGraphicProvider( nGraphicProvFlags ), - mpPicStrm( 0 ), + mpPicStrm( nullptr ), mbHasDggCont( false ), mbPicStrmQueried( false ) { @@ -4947,7 +4947,7 @@ SvStream* EscherExGlobal::QueryPictureStream() SvStream* EscherExGlobal::ImplQueryPictureStream() { - return 0; + return nullptr; } // Implementation of an empty stream that silently succeeds, but does nothing. @@ -5272,7 +5272,7 @@ void EscherEx::AddClientAnchor( const Rectangle& rRect ) EscherExHostAppData* EscherEx::EnterAdditionalTextGroup() { - return NULL; + return nullptr; } sal_uInt32 EscherEx::EnterGroup( const OUString& rShapeName, const Rectangle* pBoundRect ) diff --git a/filter/source/msfilter/eschesdo.cxx b/filter/source/msfilter/eschesdo.cxx index 8388e52c2b78..16ea2f18063b 100644 --- a/filter/source/msfilter/eschesdo.cxx +++ b/filter/source/msfilter/eschesdo.cxx @@ -65,8 +65,8 @@ ImplEESdrWriter::ImplEESdrWriter( EscherEx& rEx ) , maMapModeSrc(MAP_100TH_MM) // PowerPoint: 576 dpi, WinWord: 1440 dpi, Excel: 1440 dpi , maMapModeDest( MAP_INCH, Point(), Fraction( 1, EES_MAP_FRACTION ), Fraction( 1, EES_MAP_FRACTION ) ) - , mpPicStrm(NULL) - , mpHostAppData(NULL) + , mpPicStrm(nullptr) + , mpHostAppData(nullptr) , mnPagesWritten(0) , mnShapeMasterTitle(0) , mnShapeMasterBody(0) @@ -167,7 +167,7 @@ sal_uInt32 ImplEESdrWriter::ImplWriteShape( ImplEESdrObject& rObj, sal_uInt32 nGrpShapeID = 0; do { - mpHostAppData = mpEscherEx->StartShape( rObj.GetShapeRef(), (mpEscherEx->GetGroupLevel() > 1) ? &rObj.GetRect() : 0 ); + mpHostAppData = mpEscherEx->StartShape( rObj.GetShapeRef(), (mpEscherEx->GetGroupLevel() > 1) ? &rObj.GetRect() : nullptr ); if ( mpHostAppData && mpHostAppData->DontWriteShape() ) break; @@ -246,7 +246,7 @@ sal_uInt32 ImplEESdrWriter::ImplWriteShape( ImplEESdrObject& rObj, // #i51348# shape name if (!aShapeName.isEmpty()) aPropOpt.AddOpt( ESCHER_Prop_wzName, aShapeName ); - if ( InteractionInfo* pInteraction = mpHostAppData ? mpHostAppData->GetInteractionInfo():NULL ) + if ( InteractionInfo* pInteraction = mpHostAppData ? mpHostAppData->GetInteractionInfo():nullptr ) { const std::unique_ptr< SvMemoryStream >& pMemStrm = pInteraction->getHyperlinkRecord(); if ( pMemStrm.get() ) @@ -710,7 +710,7 @@ void ImplEESdrWriter::ImplWriteAdditionalText( ImplEESdrObject& rObj, sal_uInt16 nShapeType = 0; do { - mpHostAppData = mpEscherEx->StartShape( rObj.GetShapeRef(), (mpEscherEx->GetGroupLevel() > 1) ? &rObj.GetRect() : 0 ); + mpHostAppData = mpEscherEx->StartShape( rObj.GetShapeRef(), (mpEscherEx->GetGroupLevel() > 1) ? &rObj.GetRect() : nullptr ); if ( mpHostAppData && mpHostAppData->DontWriteShape() ) break; @@ -857,8 +857,8 @@ void ImplEESdrWriter::ImplWritePage( ImplEscherExSdr::ImplEscherExSdr( EscherEx& rEx ) : ImplEESdrWriter( rEx ), - mpSdrPage( NULL ), - mpSolverContainer( NULL ) + mpSdrPage( nullptr ), + mpSolverContainer( nullptr ) { } @@ -880,7 +880,7 @@ bool ImplEscherExSdr::ImplInitPage( const SdrPage& rPage ) // eventually write SolverContainer of current page, deletes the Solver ImplFlushSolverContainer(); - mpSdrPage = NULL; + mpSdrPage = nullptr; mXDrawPage = pSvxDrawPage = new SvxFmDrawPage( const_cast<SdrPage*>(&rPage) ); mXShapes.set( mXDrawPage, UNO_QUERY ); if ( !mXShapes.is() ) @@ -894,7 +894,7 @@ bool ImplEscherExSdr::ImplInitPage( const SdrPage& rPage ) else pSvxDrawPage = SvxDrawPage::getImplementation(mXDrawPage); - return pSvxDrawPage != 0; + return pSvxDrawPage != nullptr; } while ( false ); return false; @@ -908,7 +908,7 @@ bool ImplEscherExSdr::ImplInitUnoShapes( const Reference< XShapes >& rxShapes ) if( !rxShapes.is() ) return false; - mpSdrPage = 0; + mpSdrPage = nullptr; mXDrawPage.clear(); mXShapes = rxShapes; @@ -926,7 +926,7 @@ void ImplEscherExSdr::ImplExitPage() mpEscherEx->LeaveGroup(); ImplFlushSolverContainer(); - mpSdrPage = NULL; // reset page for next init + mpSdrPage = nullptr; // reset page for next init } @@ -936,7 +936,7 @@ void ImplEscherExSdr::ImplFlushSolverContainer() { mpSolverContainer->WriteSolver( mpEscherEx->GetStream() ); delete mpSolverContainer; - mpSolverContainer = NULL; + mpSolverContainer = nullptr; } } @@ -981,7 +981,7 @@ void EscherEx::EndSdrObjectPage() EscherExHostAppData* EscherEx::StartShape( const Reference< XShape >& /* rShape */, const Rectangle* /*pChildAnchor*/ ) { - return NULL; + return nullptr; } void EscherEx::EndShape( sal_uInt16 /* nShapeType */, sal_uInt32 /* nShapeID */ ) @@ -1007,7 +1007,7 @@ sal_uInt32 EscherEx::AddDummyShape() // static const SdrObject* EscherEx::GetSdrObject( const Reference< XShape >& rShape ) { - const SdrObject* pRet = 0; + const SdrObject* pRet = nullptr; const SvxShape* pSvxShape = SvxShape::getImplementation( rShape ); DBG_ASSERT( pSvxShape, "EscherEx::GetSdrObject: no SvxShape" ); if( pSvxShape ) diff --git a/filter/source/msfilter/eschesdo.hxx b/filter/source/msfilter/eschesdo.hxx index 4e97311998f6..3acb304189d4 100644 --- a/filter/source/msfilter/eschesdo.hxx +++ b/filter/source/msfilter/eschesdo.hxx @@ -159,7 +159,7 @@ protected: const Point& rTextRefPoint ); sal_uInt32 ImplEnterAdditionalTextGroup( const css::uno::Reference< css::drawing::XShape >& rShape, - const Rectangle* pBoundRect = NULL ); + const Rectangle* pBoundRect = nullptr ); public: diff --git a/filter/source/msfilter/mscodec.cxx b/filter/source/msfilter/mscodec.cxx index dc1c211add59..87dbf70af132 100644 --- a/filter/source/msfilter/mscodec.cxx +++ b/filter/source/msfilter/mscodec.cxx @@ -253,11 +253,11 @@ MSCodec_Std97::MSCodec_Std97 () { m_hCipher = rtl_cipher_create ( rtl_Cipher_AlgorithmARCFOUR, rtl_Cipher_ModeStream); - OSL_ASSERT(m_hCipher != 0); + OSL_ASSERT(m_hCipher != nullptr); m_hDigest = rtl_digest_create ( rtl_Digest_AlgorithmMD5); - OSL_ASSERT(m_hDigest != 0); + OSL_ASSERT(m_hDigest != nullptr); (void)memset (m_pDigestValue, 0, sizeof(m_pDigestValue)); (void)memset (m_pDocId, 0, sizeof(m_pDocId)); @@ -409,7 +409,7 @@ bool MSCodec_Std97::InitCipher (sal_uInt32 nCounter) // Initialize Cipher with KeyData (for decoding). result = rtl_cipher_init ( m_hCipher, rtl_Cipher_DirectionBoth, - pKeyData, RTL_DIGEST_LENGTH_MD5, 0, 0); + pKeyData, RTL_DIGEST_LENGTH_MD5, nullptr, 0); // Erase KeyData array and leave. rtl_secureZeroMemory (pKeyData, sizeof(pKeyData)); diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx index 2a682fed6628..f637f668aff7 100644 --- a/filter/source/msfilter/msdffimp.cxx +++ b/filter/source/msfilter/msdffimp.cxx @@ -213,7 +213,7 @@ void Impl_OlePres::Write( SvStream & rStm ) DffPropertyReader::DffPropertyReader( const SvxMSDffManager& rMan ) : rManager(rMan) - , pDefaultPropSet(NULL) + , pDefaultPropSet(nullptr) , mnFix16Angle(0) , mbRotateGranientFillWithAngle(false) { @@ -1229,7 +1229,7 @@ void ApplyRectangularGradientAsBitmap( const SvxMSDffManager& rManager, SvStream { const_cast< SvxMSDffManager& >( rManager ).maShapeRecords.Current()->SeekToBegOfRecord( rIn ); DffPropertyReader aSecPropSet( rManager ); - aSecPropSet.ReadPropSet( rIn, NULL ); + aSecPropSet.ReadPropSet( rIn, nullptr ); sal_Int32 nSecFillProperties = aSecPropSet.GetPropertyValue( DFF_Prop_fNoFillHitTest, 0x200020 ); bRotateWithShape = ( nSecFillProperties & 0x0020 ); } @@ -2906,7 +2906,7 @@ DffRecordList::DffRecordList( DffRecordList* pList ) : nCount ( 0 ), nCurrent ( 0 ), pPrev ( pList ), - pNext ( NULL ) + pNext ( nullptr ) { if ( pList ) pList->pNext = this; @@ -2918,13 +2918,13 @@ DffRecordList::~DffRecordList() } DffRecordManager::DffRecordManager() : - DffRecordList ( NULL ), + DffRecordList ( nullptr ), pCList ( static_cast<DffRecordList*>(this) ) { } DffRecordManager::DffRecordManager( SvStream& rIn ) : - DffRecordList ( NULL ), + DffRecordList ( nullptr ), pCList ( static_cast<DffRecordList*>(this) ) { Consume( rIn ); @@ -2964,14 +2964,14 @@ void DffRecordManager::Consume( SvStream& rIn, bool bAppend, sal_uInt32 nStOfs ) void DffRecordManager::Clear() { pCList = static_cast<DffRecordList*>(this); - delete pNext, pNext = NULL; + delete pNext, pNext = nullptr; nCurrent = 0; nCount = 0; } DffRecordHeader* DffRecordManager::Current() { - DffRecordHeader* pRet = NULL; + DffRecordHeader* pRet = nullptr; if ( pCList->nCurrent < pCList->nCount ) pRet = &pCList->mHd[ pCList->nCurrent ]; return pRet; @@ -2979,7 +2979,7 @@ DffRecordHeader* DffRecordManager::Current() DffRecordHeader* DffRecordManager::First() { - DffRecordHeader* pRet = NULL; + DffRecordHeader* pRet = nullptr; pCList = static_cast<DffRecordList*>(this); if ( pCList->nCount ) { @@ -2991,7 +2991,7 @@ DffRecordHeader* DffRecordManager::First() DffRecordHeader* DffRecordManager::Next() { - DffRecordHeader* pRet = NULL; + DffRecordHeader* pRet = nullptr; sal_uInt32 nC = pCList->nCurrent + 1; if ( nC < pCList->nCount ) { @@ -3009,7 +3009,7 @@ DffRecordHeader* DffRecordManager::Next() DffRecordHeader* DffRecordManager::Prev() { - DffRecordHeader* pRet = NULL; + DffRecordHeader* pRet = nullptr; sal_uInt32 nCur = pCList->nCurrent; if ( !nCur && pCList->pPrev ) { @@ -3026,7 +3026,7 @@ DffRecordHeader* DffRecordManager::Prev() DffRecordHeader* DffRecordManager::Last() { - DffRecordHeader* pRet = NULL; + DffRecordHeader* pRet = nullptr; while ( pCList->pNext ) pCList = pCList->pNext; sal_uInt32 nCnt = pCList->nCount; @@ -3080,7 +3080,7 @@ DffRecordHeader* DffRecordManager::GetRecordHeader( sal_uInt16 nRecId, DffSeekTo pHd = Next(); } if ( pHd->nRecType != nRecId ) - pHd = NULL; + pHd = nullptr; } } if ( !pHd ) @@ -3191,7 +3191,7 @@ void SvxMSDffManager::SetModel(SdrModel* pModel, long nApplicationScale) } else { - pModel = 0; + pModel = nullptr; nMapMul = nMapDiv = nMapXOfs = nMapYOfs = nEmuMul = nEmuDiv = nPntMul = nPntDiv = 0; bNeedMap = false; } @@ -3263,7 +3263,7 @@ bool SvxMSDffManager::SeekToRec( SvStream& rSt, sal_uInt16 nRecId, sal_uLong nMa else { bRet = true; - if ( pRecHd != NULL ) + if ( pRecHd != nullptr ) *pRecHd = aHd; else { @@ -3775,7 +3775,7 @@ static void lcl_ApplyCropping( const DffPropSet& rPropSet, SfxItemSet* pSet, Gra SdrObject* SvxMSDffManager::ImportGraphic( SvStream& rSt, SfxItemSet& rSet, const DffObjData& rObjData ) { - SdrObject* pRet = NULL; + SdrObject* pRet = nullptr; OUString aFileName; OUString aLinkFileName, aLinkFilterName; Rectangle aVisArea; @@ -3826,7 +3826,7 @@ SdrObject* SvxMSDffManager::ImportGraphic( SvStream& rSt, SfxItemSet& rSet, cons // the writer is doing its own cropping, so this part affects only impress and calc, // unless we're inside a group, in which case writer doesn't crop either if (( GetSvxMSDffSettings() & SVXMSDFF_SETTINGS_CROP_BITMAPS ) || rObjData.nCalledByGroup != 0 ) - lcl_ApplyCropping( *this, ( rObjData.nSpFlags & SP_FOLESHAPE ) == 0 ? &rSet : NULL, aGraf ); + lcl_ApplyCropping( *this, ( rObjData.nSpFlags & SP_FOLESHAPE ) == 0 ? &rSet : nullptr, aGraf ); if ( IsProperty( DFF_Prop_pictureTransparent ) ) { @@ -4028,7 +4028,7 @@ SdrObject* SvxMSDffManager::ImportGraphic( SvStream& rSt, SfxItemSet& rSet, cons SdrObject* SvxMSDffManager::ImportObj( SvStream& rSt, void* pClientData, Rectangle& rClientRect, const Rectangle& rGlobalChildRect, int nCalledByGroup, sal_Int32* pShapeId ) { - SdrObject* pRet = NULL; + SdrObject* pRet = nullptr; DffRecordHeader aObjHd; bool bOk = ReadDffRecordHeader(rSt, aObjHd); if (bOk && aObjHd.nRecType == DFF_msofbtSpgrContainer) @@ -4047,7 +4047,7 @@ SdrObject* SvxMSDffManager::ImportGroup( const DffRecordHeader& rHd, SvStream& r Rectangle& rClientRect, const Rectangle& rGlobalChildRect, int nCalledByGroup, sal_Int32* pShapeId ) { - SdrObject* pRet = NULL; + SdrObject* pRet = nullptr; if( pShapeId ) *pShapeId = 0; @@ -4158,7 +4158,7 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r Rectangle& rClientRect, const Rectangle& rGlobalChildRect, int nCalledByGroup, sal_Int32* pShapeId ) { - SdrObject* pRet = NULL; + SdrObject* pRet = nullptr; if( pShapeId ) *pShapeId = 0; @@ -4231,7 +4231,7 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r maShapeRecords.Current()->SeekToBegOfRecord( rSt ); delete pSecPropSet; pSecPropSet = new DffPropertyReader( *this ); - pSecPropSet->ReadPropSet( rSt, NULL ); + pSecPropSet->ReadPropSet( rSt, nullptr ); } aObjData.bChildAnchor = maShapeRecords.SeekToContent( rSt, DFF_msofbtChildAnchor, SEEK_FROM_CURRENT_AND_RESTART ); @@ -4697,8 +4697,8 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r // connectors MSO_ConnectorStyle eConnectorStyle = (MSO_ConnectorStyle)GetPropertyValue( DFF_Prop_cxstyle, mso_cxstyleStraight ); - static_cast<SdrEdgeObj*>(pRet)->ConnectToNode(true, NULL); - static_cast<SdrEdgeObj*>(pRet)->ConnectToNode(false, NULL); + static_cast<SdrEdgeObj*>(pRet)->ConnectToNode(true, nullptr); + static_cast<SdrEdgeObj*>(pRet)->ConnectToNode(false, nullptr); Point aPoint1( aObjData.aBoundRect.TopLeft() ); Point aPoint2( aObjData.aBoundRect.BottomRight() ); @@ -5060,7 +5060,7 @@ SdrObject* SvxMSDffManager::ProcessObj(SvStream& rSt, // text frame, also Title or Outline SdrObject* pOrgObj = pObj; - SdrRectObj* pTextObj = 0; + SdrRectObj* pTextObj = nullptr; sal_uInt32 nTextId = GetPropertyValue( DFF_Prop_lTxid, 0 ); if( nTextId ) { @@ -5090,7 +5090,7 @@ SdrObject* SvxMSDffManager::ProcessObj(SvStream& rSt, if (bTextFrame) { SdrObject::Free( pObj ); - pObj = pOrgObj = 0; + pObj = pOrgObj = nullptr; } // Distance of Textbox to it's surrounding Customshape @@ -5358,7 +5358,7 @@ SdrObject* SvxMSDffManager::ProcessObj(SvStream& rSt, SfxItemSet aSet( pSdrModel->GetItemPool() ); ApplyAttributes( rSt, aSet, rObjData ); - const SfxPoolItem* pPoolItem=NULL; + const SfxPoolItem* pPoolItem=nullptr; SfxItemState eState = aSet.GetItemState( XATTR_FILLCOLOR, false, &pPoolItem ); if( SfxItemState::DEFAULT == eState ) @@ -5398,7 +5398,7 @@ SdrObject* SvxMSDffManager::ProcessObj(SvStream& rSt, if (SeekToContent(DFF_Prop_pWrapPolygonVertices, rSt)) { delete pTextImpRec->pWrapPolygon; - pTextImpRec->pWrapPolygon = NULL; + pTextImpRec->pWrapPolygon = nullptr; sal_uInt16 nNumElemVert(0), nNumElemMemVert(0), nElemSizeVert(0); rSt.ReadUInt16( nNumElemVert ).ReadUInt16( nNumElemMemVert ).ReadUInt16( nElemSizeVert ); bool bOk = false; @@ -5547,8 +5547,8 @@ void SvxMSDffManager::RemoveFromShapeOrder( SdrObject* pObject ) const if( rOrder.pObj == pObject ) { - rOrder.pObj = 0; - rOrder.pFly = 0; + rOrder.pObj = nullptr; + rOrder.pFly = nullptr; rOrder.nTxBxComp = 0; } } @@ -5567,7 +5567,7 @@ SvxMSDffManager::SvxMSDffManager(SvStream& rStCtrl_, SvStream* pStData2_, bool bSkipImages ) :DffPropertyReader( *this ), - pFormModel( NULL ), + pFormModel( nullptr ), m_pBLIPInfos( new SvxMSDffBLIPInfos ), m_xShapeInfosByTxBxComp( new SvxMSDffShapeInfos_ByTxBxComp ), m_pShapeOrders( new SvxMSDffShapeOrders ), @@ -5584,7 +5584,7 @@ SvxMSDffManager::SvxMSDffManager(SvStream& rStCtrl_, pStData2( pStData2_ ), nSvxMSDffSettings( 0 ), nSvxMSDffOLEConvFlags( 0 ), - pSecPropSet( NULL ), + pSecPropSet( nullptr ), mnDefaultColor( mnDefaultColor_), mbTracing( false ), mbSkipImages (bSkipImages) @@ -5616,7 +5616,7 @@ SvxMSDffManager::SvxMSDffManager(SvStream& rStCtrl_, SvxMSDffManager::SvxMSDffManager( SvStream& rStCtrl_, const OUString& rBaseURL ) :DffPropertyReader( *this ), - pFormModel( NULL ), + pFormModel( nullptr ), m_pBLIPInfos( new SvxMSDffBLIPInfos ), m_xShapeInfosByTxBxComp( new SvxMSDffShapeInfos_ByTxBxComp ), m_pShapeOrders( new SvxMSDffShapeOrders ), @@ -5628,16 +5628,16 @@ SvxMSDffManager::SvxMSDffManager( SvStream& rStCtrl_, const OUString& rBaseURL ) mnDrawingsSaved(0), mnIdClusters(0), rStCtrl( rStCtrl_ ), - pStData( 0 ), - pStData2( 0 ), + pStData( nullptr ), + pStData2( nullptr ), nSvxMSDffSettings( 0 ), nSvxMSDffOLEConvFlags( 0 ), - pSecPropSet( NULL ), + pSecPropSet( nullptr ), mnDefaultColor( COL_DEFAULT ), mbTracing( false ), mbSkipImages(false) { - SetModel( NULL, 0 ); + SetModel( nullptr, 0 ); } SvxMSDffManager::~SvxMSDffManager() @@ -6221,7 +6221,7 @@ bool SvxMSDffManager::GetShape(sal_uLong nId, SdrObject*& rpShape, rStCtrl.Seek( nOldPosCtrl ); if( &rStCtrl != pStData && pStData ) pStData->Seek( nOldPosData ); - return ( 0 != rpShape ); + return ( nullptr != rpShape ); } return false; } @@ -6550,7 +6550,7 @@ SdrObject* SvxMSDffManager::ImportOLE( long nOLEId, const int /* _nCalledByGroup */, sal_Int64 nAspect ) const { - SdrObject* pRet = 0; + SdrObject* pRet = nullptr; OUString sStorageName; tools::SvRef<SotStorage> xSrcStg; ErrCode nError = ERRCODE_NONE; @@ -6825,7 +6825,7 @@ const char* GetInternalServerName_Impl( const SvGlobalName& aGlobName ) else if ( aGlobName == SvGlobalName( SO3_SCH_OLE_EMBED_CLASSID_60 ) || aGlobName == SvGlobalName( SO3_SCH_OLE_EMBED_CLASSID_8 ) ) return "schart"; - return 0; + return nullptr; } OUString GetFilterNameFromClassID_Impl( const SvGlobalName& aGlobName ) @@ -6916,7 +6916,7 @@ css::uno::Reference < css::embed::XEmbeddedObject > SvxMSDffManager::CheckForCo { OLE_POWERPOINT_2_STARIMPRESS, "simpress", // PowerPoint slide 0x64818d11L, 0x4f9b, 0x11cf, 0x86,0xea,0x00,0xaa,0x00,0xb9,0x29,0xe8 }, - { 0, 0, + { 0, nullptr, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }; @@ -6941,7 +6941,7 @@ css::uno::Reference < css::embed::XEmbeddedObject > SvxMSDffManager::CheckForCo if ( sStarName.getLength() ) { //TODO/MBA: check if (and when) storage and stream will be destroyed! - const SfxFilter* pFilter = 0; + const SfxFilter* pFilter = nullptr; std::unique_ptr<SvMemoryStream> xMemStream (new SvMemoryStream); if ( pName ) { @@ -7072,7 +7072,7 @@ SdrOle2Obj* SvxMSDffManager::CreateSdrOLEFromStorage( sal_Int64 nRecommendedAspect ) { sal_Int64 nAspect = nRecommendedAspect; - SdrOle2Obj* pRet = 0; + SdrOle2Obj* pRet = nullptr; if( rSrcStorage.Is() && xDestStorage.is() && rStorageName.getLength() ) { comphelper::EmbeddedObjectContainer aCnt( xDestStorage ); @@ -7267,16 +7267,16 @@ bool SvxMSDffManager::SetPropValue( const uno::Any& rAny, const uno::Reference< } SvxMSDffImportRec::SvxMSDffImportRec() - : pObj( 0 ), - pWrapPolygon(0), - pClientAnchorBuffer( 0 ), + : pObj( nullptr ), + pWrapPolygon(nullptr), + pClientAnchorBuffer( nullptr ), nClientAnchorLen( 0 ), - pClientDataBuffer( 0 ), + pClientDataBuffer( nullptr ), nClientDataLen( 0 ), nXAlign( 0 ), // position n cm from left - pXRelTo( NULL ), // relative to column + pXRelTo( nullptr ), // relative to column nYAlign( 0 ), // position n cm below - pYRelTo( NULL ), // relative to paragraph + pYRelTo( nullptr ), // relative to paragraph nLayoutInTableCell( 0 ), // element is laid out in table cell nFlags( 0 ), nTextRotationAngle( 0 ), @@ -7313,9 +7313,9 @@ SvxMSDffImportRec::SvxMSDffImportRec() SvxMSDffImportRec::SvxMSDffImportRec(const SvxMSDffImportRec& rCopy) : pObj( rCopy.pObj ), nXAlign( rCopy.nXAlign ), - pXRelTo( NULL ), + pXRelTo( nullptr ), nYAlign( rCopy.nYAlign ), - pYRelTo( NULL ), + pYRelTo( nullptr ), nLayoutInTableCell( rCopy.nLayoutInTableCell ), nFlags( rCopy.nFlags ), nTextRotationAngle( rCopy.nTextRotationAngle ), @@ -7365,7 +7365,7 @@ SvxMSDffImportRec::SvxMSDffImportRec(const SvxMSDffImportRec& rCopy) nClientAnchorLen ); } else - pClientAnchorBuffer = 0; + pClientAnchorBuffer = nullptr; nClientDataLen = rCopy.nClientDataLen; if( rCopy.nClientDataLen ) @@ -7376,12 +7376,12 @@ SvxMSDffImportRec::SvxMSDffImportRec(const SvxMSDffImportRec& rCopy) nClientDataLen ); } else - pClientDataBuffer = 0; + pClientDataBuffer = nullptr; if (rCopy.pWrapPolygon) pWrapPolygon = new tools::Polygon(*rCopy.pWrapPolygon); else - pWrapPolygon = 0; + pWrapPolygon = nullptr; } SvxMSDffImportRec::~SvxMSDffImportRec() @@ -7416,7 +7416,7 @@ void SvxMSDffManager::removeShapeId( SdrObject* pShape ) SdrObject* SvxMSDffManager::getShapeForId( sal_Int32 nShapeId ) { SvxMSDffShapeIdContainer::iterator aIter( maShapeIdContainer.find(nShapeId) ); - return aIter != maShapeIdContainer.end() ? (*aIter).second : 0; + return aIter != maShapeIdContainer.end() ? (*aIter).second : nullptr; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/filter/source/msfilter/msoleexp.cxx b/filter/source/msfilter/msoleexp.cxx index cae2d6ee6e8f..240849ca63f7 100644 --- a/filter/source/msfilter/msoleexp.cxx +++ b/filter/source/msfilter/msoleexp.cxx @@ -122,7 +122,7 @@ void SvxMSExportOLEObjects::ExportOLEObject( svt::EmbeddedObjectRef& rObj, SotSt { SvGlobalName aOwnGlobalName; SvGlobalName aObjName( rObj->getClassID() ); - const SfxFilter* pExpFilter = NULL; + const SfxFilter* pExpFilter = nullptr; { static struct _ObjExpType { sal_uInt32 nFlag; @@ -154,7 +154,7 @@ void SvxMSExportOLEObjects::ExportOLEObject( svt::EmbeddedObjectRef& rObj, SotSt {{SO3_SDRAW_CLASSID_60}, {SO3_SDRAW_CLASSID_50}, // SJ: !!!! SO3_SDRAW_CLASSID is only available up from {SO3_SDRAW_CLASSID_60}, {SO3_SDRAW_CLASSID_50 }}}, // ver 5.0, it is purpose to have double entrys here. - { 0xffff,0, + { 0xffff,nullptr, {{SO3_SDRAW_CLASSID_60}, {SO3_SDRAW_CLASSID_50}, {SO3_SDRAW_CLASSID_60}, {SO3_SDRAW_CLASSID_50}}} }; diff --git a/filter/source/msfilter/mstoolbar.cxx b/filter/source/msfilter/mstoolbar.cxx index e0e45bbeb136..be74c017f0cf 100644 --- a/filter/source/msfilter/mstoolbar.cxx +++ b/filter/source/msfilter/mstoolbar.cxx @@ -62,7 +62,7 @@ void CustomToolBarImportHelper::applyIcons() sal_uInt16 nColor = ui::ImageType::COLOR_NORMAL; vcl::Window* topwin = Application::GetActiveTopWindow(); - if ( topwin != NULL && topwin->GetDisplayBackground().GetColor().IsDark() ) + if ( topwin != nullptr && topwin->GetDisplayBackground().GetColor().IsDark() ) nColor = css::ui::ImageType::COLOR_HIGHCONTRAST; ScaleImage( images[ 0 ], 16 ); diff --git a/filter/source/msfilter/msvbahelper.cxx b/filter/source/msfilter/msvbahelper.cxx index 8667270e2f61..b55eadd69029 100644 --- a/filter/source/msfilter/msvbahelper.cxx +++ b/filter/source/msfilter/msvbahelper.cxx @@ -76,7 +76,7 @@ OUString trimMacroName( const OUString& rMacroName ) SfxObjectShell* findShellForUrl( const OUString& sMacroURLOrPath ) { - SfxObjectShell* pFoundShell=NULL; + SfxObjectShell* pFoundShell=nullptr; SfxObjectShell* pShell = SfxObjectShell::GetFirst(); INetURLObject aObj; aObj.SetURL( sMacroURLOrPath ); @@ -234,7 +234,7 @@ bool hasMacro( SfxObjectShell* pShell, const OUString& sLibrary, OUString& sMod, OUString getDefaultProjectName( SfxObjectShell* pShell ) { OUString aPrjName; - if( BasicManager* pBasicMgr = pShell ? pShell->GetBasicManager() : 0 ) + if( BasicManager* pBasicMgr = pShell ? pShell->GetBasicManager() : nullptr ) { aPrjName = pBasicMgr->GetName(); if( aPrjName.isEmpty() ) @@ -310,7 +310,7 @@ MacroResolvedInfo resolveVBAMacro( SfxObjectShell* pShell, const OUString& Macro OUString sDocUrlOrPath = aMacroName.copy( 0, nDocSepIndex ); aMacroName = aMacroName.copy( nDocSepIndex + 1 ); SAL_INFO("filter.ms", "doc search, current shell is " << pShell); - SfxObjectShell* pFoundShell = 0; + SfxObjectShell* pFoundShell = nullptr; if( bSearchGlobalTemplates ) { SvtPathOptions aPathOpt; @@ -527,7 +527,7 @@ uno::Reference< uno::XInterface > SAL_CALL VBAMacroResolver_createInstance( cons VBAMacroResolver::VBAMacroResolver() : - mpObjShell( 0 ) + mpObjShell( nullptr ) { } @@ -753,7 +753,7 @@ void applyShortCutKeyBinding ( const uno::Reference< frame::XModel >& rxModel, c OUString aMacroName = MacroName.trim(); if( aMacroName.startsWith("!") ) MacroName = aMacroName.copy(1).trim(); - SfxObjectShell* pShell = NULL; + SfxObjectShell* pShell = nullptr; if ( rxModel.is() ) { uno::Reference< lang::XUnoTunnel > xObjShellTunnel( rxModel, uno::UNO_QUERY_THROW ); diff --git a/filter/source/msfilter/rtfutil.cxx b/filter/source/msfilter/rtfutil.cxx index f833fb13e288..e5c07e364e33 100644 --- a/filter/source/msfilter/rtfutil.cxx +++ b/filter/source/msfilter/rtfutil.cxx @@ -42,7 +42,7 @@ OString OutChar(sal_Unicode c, int* pUCMode, rtl_TextEncoding eDestEnc, bool* pS if (pSuccess) *pSuccess = true; OStringBuffer aBuf; - const sal_Char* pStr = 0; + const sal_Char* pStr = nullptr; // 0x0b instead of \n, etc because of the replacements in SwWW8AttrIter::GetSnippet() switch (c) { @@ -127,7 +127,7 @@ OString OutString(const OUString& rStr, rtl_TextEncoding eDestEnc, bool bUnicode OStringBuffer aBuf; int nUCMode = 1; for (sal_Int32 n = 0; n < rStr.getLength(); ++n) - aBuf.append(OutChar(rStr[n], &nUCMode, eDestEnc, 0, bUnicode)); + aBuf.append(OutChar(rStr[n], &nUCMode, eDestEnc, nullptr, bUnicode)); if (nUCMode != 1) { aBuf.append(OOO_STRING_SVTOOLS_RTF_UC); diff --git a/filter/source/msfilter/services.cxx b/filter/source/msfilter/services.cxx index ec63f5089ba9..9ef19e882e23 100644 --- a/filter/source/msfilter/services.cxx +++ b/filter/source/msfilter/services.cxx @@ -25,12 +25,12 @@ 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 } static ::cppu::ImplementationEntry const spServices[] = { IMPLEMENTATION_ENTRY( ::ooo::vba::VBAMacroResolver ), - { 0, 0, 0, 0, 0, 0 } + { nullptr, nullptr, nullptr, nullptr, nullptr, 0 } }; #undef IMPLEMENTATION_ENTRY diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx index 19c333f684cc..4ceacdbe19e6 100644 --- a/filter/source/msfilter/svdfppt.cxx +++ b/filter/source/msfilter/svdfppt.cxx @@ -489,15 +489,15 @@ SvStream& ReadPptOEPlaceholderAtom( SvStream& rIn, PptOEPlaceholderAtom& rAtom ) } PptSlidePersistEntry::PptSlidePersistEntry() : - pStyleSheet ( NULL ), - pHeaderFooterEntry ( NULL ), - pSolverContainer ( NULL ), + pStyleSheet ( nullptr ), + pHeaderFooterEntry ( nullptr ), + pSolverContainer ( nullptr ), nSlidePersistStartOffset( 0 ), nSlidePersistEndOffset ( 0 ), nBackgroundOffset ( 0 ), nDrawingDgId ( 0xffffffff ), - pPresentationObjects ( NULL ), - pBObj ( NULL ), + pPresentationObjects ( nullptr ), + pBObj ( nullptr ), bBObjIsTemporary ( true ), ePageKind ( PPT_MASTERPAGE ), bNotesMaster ( false ), @@ -542,7 +542,7 @@ SdrEscherImport::~SdrEscherImport() const PptSlideLayoutAtom* SdrEscherImport::GetSlideLayoutAtom() const { - return NULL; + return nullptr; } bool SdrEscherImport::ReadString( OUString& rStr ) const @@ -579,7 +579,7 @@ bool SdrEscherImport::SeekToShape( SvStream& /*rSt*/, void* /*pClientData*/, sal PptFontEntityAtom* SdrEscherImport::GetFontEnityAtom( sal_uInt32 nNum ) const { - PptFontEntityAtom* pRetValue = NULL; + PptFontEntityAtom* pRetValue = nullptr; if (m_pFonts && (nNum < m_pFonts->size())) pRetValue = (*m_pFonts)[ nNum ].get(); return pRetValue; @@ -840,7 +840,7 @@ SdrObject* SdrEscherImport::ProcessObj( SvStream& rSt, DffObjData& rObjData, voi aTextObj.SetVertical( bVerticalText ); if ( pRet ) { - bool bDeleteSource = aTextObj.GetOEPlaceHolderAtom() != 0; + bool bDeleteSource = aTextObj.GetOEPlaceHolderAtom() != nullptr; if ( bDeleteSource && dynamic_cast<const SdrGrafObj* >(pRet) == nullptr // we are not allowed to get && dynamic_cast<const SdrObjGroup* >(pRet) == nullptr // grouped placeholder objects && dynamic_cast<const SdrOle2Obj* >(pRet) == nullptr ) @@ -1041,7 +1041,7 @@ SdrObject* SdrEscherImport::ProcessObj( SvStream& rSt, DffObjData& rObjData, voi eTextKind = OBJ_RECT; } } - SdrObject* pTObj = NULL; + SdrObject* pTObj = nullptr; bool bWordWrap = (MSO_WrapMode)GetPropertyValue( DFF_Prop_WrapText, mso_wrapSquare ) != mso_wrapNone; bool bFitShapeToText = ( GetPropertyValue( DFF_Prop_FitTextToShape, 0 ) & 2 ) != 0; @@ -1053,14 +1053,14 @@ SdrObject* SdrEscherImport::ProcessObj( SvStream& rSt, DffObjData& rObjData, voi else bAutoGrowWidth = true; pTObj = pRet; - pRet = NULL; + pRet = nullptr; } else { if ( dynamic_cast<const SdrObjCustomShape* >(pRet) != nullptr ) { SdrObject::Free( pRet ); - pRet = NULL; + pRet = nullptr; } pTObj = new SdrRectObj( eTextKind != OBJ_RECT ? eTextKind : OBJ_TEXT ); pTObj->SetModel( pSdrModel ); @@ -1303,9 +1303,9 @@ SdrObject* SdrEscherImport::ProcessObj( SvStream& rSt, DffObjData& rObjData, voi SdrPowerPointImport::SdrPowerPointImport( PowerPointImportParam& rParam, const OUString& rBaseURL ) : SdrEscherImport ( rParam, rBaseURL ), bOk ( rStCtrl.GetErrorCode() == SVSTREAM_OK ), - pPersistPtr ( NULL ), + pPersistPtr ( nullptr ), nPersistPtrAnz ( 0 ), - pDefaultSheet ( NULL ), + pDefaultSheet ( nullptr ), m_pMasterPages ( nullptr ), m_pSlidePages ( nullptr ), m_pNotePages ( nullptr ), @@ -1507,7 +1507,7 @@ SdrPowerPointImport::SdrPowerPointImport( PowerPointImportParam& rParam, const O m_pMasterPages->insert(m_pMasterPages->begin(), std::move(pE)); DffRecordHeader* pSlideListWithTextHd = aDocRecManager.GetRecordHeader( PPT_PST_SlideListWithText ); - PptSlidePersistEntry* pPreviousPersist = NULL; + PptSlidePersistEntry* pPreviousPersist = nullptr; for (sal_uInt16 nPageListNum = 0; pSlideListWithTextHd && nPageListNum < 3; ++nPageListNum) { @@ -1643,7 +1643,7 @@ SdrPowerPointImport::SdrPowerPointImport( PowerPointImportParam& rParam, const O } } } - if ( ( rStCtrl.GetError() != 0 ) || ( pDefaultSheet == NULL ) ) + if ( ( rStCtrl.GetError() != 0 ) || ( pDefaultSheet == nullptr ) ) bOk = false; pPPTStyleSheet = pDefaultSheet; rStCtrl.Seek( 0 ); @@ -1788,7 +1788,7 @@ SdrObject* SdrPowerPointImport::ImportOLE( long nOLEId, const int /*_nCalledByGroup*/, sal_Int64 /*nAspect*/ ) const { - SdrObject* pRet = NULL; + SdrObject* pRet = nullptr; sal_uInt32 nOldPos = rStCtrl.Tell(); @@ -1847,7 +1847,7 @@ SdrObject* SdrPowerPointImport::ImportOLE( long nOLEId, if ( bSuccess ) { std::unique_ptr<SvStream> pDest(::utl::UcbStreamHelper::CreateStream( aTmpFile.GetURL(), StreamMode::READ )); - Storage* pObjStor = pDest ? new Storage( *pDest, true ) : NULL; + Storage* pObjStor = pDest ? new Storage( *pDest, true ) : nullptr; if ( pObjStor ) { tools::SvRef<SotStorage> xObjStor( new SotStorage( pObjStor ) ); @@ -1960,7 +1960,7 @@ SdrObject* SdrPowerPointImport::ImportOLE( long nOLEId, SvMemoryStream* SdrPowerPointImport::ImportExOleObjStg( sal_uInt32 nPersistPtr, sal_uInt32& nOleId ) const { - SvMemoryStream* pRet = NULL; + SvMemoryStream* pRet = nullptr; if ( nPersistPtr && ( nPersistPtr < nPersistPtrAnz ) ) { sal_uInt32 nOldPos, nOfs = pPersistPtr[ nPersistPtr ]; @@ -1979,7 +1979,7 @@ SvMemoryStream* SdrPowerPointImport::ImportExOleObjStg( sal_uInt32 nPersistPtr, aZCodec.BeginCompression(); aZCodec.Decompress( rStCtrl, *pRet ); if ( !aZCodec.EndCompression() ) - delete pRet, pRet = NULL; + delete pRet, pRet = nullptr; } } rStCtrl.Seek( nOldPos ); @@ -2090,7 +2090,7 @@ void SdrPowerPointImport::SeekOle( SfxObjectShell* pShell, sal_uInt32 nFilterOpt pHd = aDocRecManager.GetRecordHeader( PPT_PST_ExObjList ); if ( pHd ) { - DffRecordHeader* pExEmbed = NULL; + DffRecordHeader* pExEmbed = nullptr; pHd->SeekToBegOfRecord( rStCtrl ); std::unique_ptr<DffRecordManager> pExObjListManager(new DffRecordManager( rStCtrl )); @@ -2192,13 +2192,13 @@ PptSlidePersistList* SdrPowerPointImport::GetPageList(PptPageKind ePageKind) con return m_pSlidePages; if ( ePageKind == PPT_NOTEPAGE ) return m_pNotePages; - return NULL; + return nullptr; } SdrOutliner* SdrPowerPointImport::GetDrawOutliner( SdrTextObj* pSdrText ) { if ( !pSdrText ) - return NULL; + return nullptr; else return &pSdrText->ImpGetDrawOutliner(); } @@ -2209,8 +2209,8 @@ SdrObject* SdrPowerPointImport::ReadObjText( PPTTextObj* pTextObj, SdrObject* pS SdrTextObj* pText = dynamic_cast<SdrTextObj*>( pSdrObj ); if ( pText ) { - if ( !ApplyTextObj( pTextObj, pText, pPage, NULL, NULL ) ) - pSdrObj = NULL; + if ( !ApplyTextObj( pTextObj, pText, pPage, nullptr, nullptr ) ) + pSdrObj = nullptr; } return pSdrObj; } @@ -2235,7 +2235,7 @@ SdrObject* SdrPowerPointImport::ApplyTextObj( PPTTextObj* pTextObj, SdrTextObj* rOutliner.SetStyleSheet( 0, pSheet ); } rOutliner.SetVertical( pTextObj->GetVertical() ); - const PPTParagraphObj* pPreviousParagraph = NULL; + const PPTParagraphObj* pPreviousParagraph = nullptr; for ( PPTParagraphObj* pPara = pTextObj->First(); pPara; pPara = pTextObj->Next() ) { sal_uInt32 nTextSize = pPara->GetTextSize(); @@ -2457,7 +2457,7 @@ void SdrPowerPointImport::SetPageNum( sal_uInt16 nPageNum, PptPageKind eKind ) eAktPageKind = eKind; nAktPageNum = nPageNum; - pPPTStyleSheet = NULL; + pPPTStyleSheet = nullptr; bool bHasMasterPage = true; sal_uInt16 nMasterIndex = 0; @@ -2477,7 +2477,7 @@ void SdrPowerPointImport::SetPageNum( sal_uInt16 nPageNum, PptPageKind eKind ) if ( pPageList && nMasterIndex < pPageList->size() ) { PptSlidePersistEntry* pMasterPersist = &(*pPageList)[ nMasterIndex ]; - if ( ( pMasterPersist->pStyleSheet == NULL ) && pMasterPersist->aSlideAtom.nMasterId ) + if ( ( pMasterPersist->pStyleSheet == nullptr ) && pMasterPersist->aSlideAtom.nMasterId ) { nMasterIndex = m_pMasterPages->FindPage( pMasterPersist->aSlideAtom.nMasterId ); if ( nMasterIndex != PPTSLIDEPERSIST_ENTRY_NOTFOUND ) @@ -2539,7 +2539,7 @@ bool SdrPowerPointImport::GetColorFromPalette( sal_uInt16 nNum, Color& rColor ) PptSlidePersistList* pPageList2 = GetPageList( PPT_MASTERPAGE ); if ( pPageList2 ) { - PptSlidePersistEntry* pMasterPersist = NULL; + PptSlidePersistEntry* pMasterPersist = nullptr; if ( eAktPageKind == PPT_MASTERPAGE ) pMasterPersist = &(*pPageList2)[ nAktPageNum ]; else @@ -2605,7 +2605,7 @@ bool SdrPowerPointImport::SeekToShape( SvStream& rSt, void* pClientData, sal_uIn if ( const_cast<SdrPowerPointImport*>(this)->maShapeRecords.SeekToContent( rSt, DFF_msofbtClientData, SEEK_FROM_CURRENT_AND_RESTART ) ) { sal_uInt32 nStreamPos = rSt.Tell(); - PPTTextObj aTextObj( rSt, (SdrPowerPointImport&)*this, rPersistEntry, NULL ); + PPTTextObj aTextObj( rSt, (SdrPowerPointImport&)*this, rPersistEntry, nullptr ); if ( aTextObj.Count() || aTextObj.GetOEPlaceHolderAtom() ) { sal_uInt32 nShapePos = 0; @@ -2870,7 +2870,7 @@ void SdrPowerPointImport::ImportPage( SdrPage* pRet, const PptSlidePersistEntry* Rectangle aEmpty; aShapeHd.SeekToBegOfRecord( rStCtrl ); sal_Int32 nShapeId; - aProcessData.pTableRowProperties = NULL; + aProcessData.pTableRowProperties = nullptr; SdrObject* pObj = ImportObj( rStCtrl, static_cast<void*>(&aProcessData), aEmpty, aEmpty, 0, &nShapeId ); if ( pObj ) { @@ -2927,7 +2927,7 @@ const PptSlideLayoutAtom* SdrPowerPointImport::GetSlideLayoutAtom() const assert( !pPageList->is_null( nAktPageNum ) ); return &(*pPageList)[ nAktPageNum ].aSlideAtom.aLayout; } - return NULL; + return nullptr; } bool SdrPowerPointImport::IsNoteOrHandout( sal_uInt16 nPageNum, PptPageKind /*ePageKind*/) const @@ -2980,7 +2980,7 @@ sal_uInt16 SdrPowerPointImport::GetMasterPageIndex( sal_uInt16 nPageNum, PptPage SdrObject* SdrPowerPointImport::ImportPageBackgroundObject( const SdrPage& rPage, sal_uInt32& nBgFileOffset, bool bForce ) { - SdrObject* pRet = NULL; + SdrObject* pRet = nullptr; bool bCreateObj = bForce; std::unique_ptr<SfxItemSet> pSet; sal_uLong nFPosMerk = rStCtrl.Tell(); // remember FilePos for restoring it later @@ -3161,7 +3161,7 @@ SvStream& ReadPPTExtParaLevel( SvStream& rIn, PPTExtParaLevel& rLevel ) bool PPTExtParaProv::GetGraphic( sal_uInt32 nInstance, Graphic& rGraph ) const { bool bRetValue = false; - PPTBuGraEntry* pPtr = NULL; + PPTBuGraEntry* pPtr = nullptr; if ( nInstance < aBuGraList.size() ) { pPtr = aBuGraList[ nInstance ]; @@ -3618,7 +3618,7 @@ void PPTNumberFormatCreator::GetNumberFormat( SdrPowerPointImport& rManager, Svx nBulletOfs = rParaLevel.mnBulletOfs; boost::optional< sal_Int16 > oStartNumbering; - ImplGetExtNumberFormat( rManager, rNumberFormat, nLevel, nInstance, 0xffffffff, oStartNumbering, rCharLevel.mnFontHeight, NULL ); + ImplGetExtNumberFormat( rManager, rNumberFormat, nLevel, nInstance, 0xffffffff, oStartNumbering, rCharLevel.mnFontHeight, nullptr ); if ( ( rNumberFormat.GetNumberingType() != SVX_NUM_BITMAP ) && ( nBulletHeight > 0x7fff ) ) nBulletHeight = rCharLevel.mnFontHeight ? ((-((sal_Int16)nBulletHeight)) * 100 ) / rCharLevel.mnFontHeight : 100; ImplGetNumberFormat( rManager, rNumberFormat, nLevel ); @@ -4046,8 +4046,8 @@ PPTStyleSheet::PPTStyleSheet( const DffRecordHeader& rSlideHd, SvStream& rIn, Sd mpParaSheet[ TSS_TYPE_NOTES ] = new PPTParaSheet( TSS_TYPE_NOTES ); mpParaSheet[ TSS_TYPE_UNUSED ] = new PPTParaSheet( TSS_TYPE_UNUSED ); mpParaSheet[ TSS_TYPE_TEXT_IN_SHAPE ] = new PPTParaSheet( TSS_TYPE_TEXT_IN_SHAPE ); - mpCharSheet[ TSS_TYPE_QUARTERBODY ] = mpCharSheet[ TSS_TYPE_HALFBODY ] = mpCharSheet[ TSS_TYPE_TITLE ] = mpCharSheet[ TSS_TYPE_SUBTITLE ] = NULL; - mpParaSheet[ TSS_TYPE_QUARTERBODY ] = mpParaSheet[ TSS_TYPE_HALFBODY ] = mpParaSheet[ TSS_TYPE_TITLE ] = mpParaSheet[ TSS_TYPE_SUBTITLE ] = NULL; + mpCharSheet[ TSS_TYPE_QUARTERBODY ] = mpCharSheet[ TSS_TYPE_HALFBODY ] = mpCharSheet[ TSS_TYPE_TITLE ] = mpCharSheet[ TSS_TYPE_SUBTITLE ] = nullptr; + mpParaSheet[ TSS_TYPE_QUARTERBODY ] = mpParaSheet[ TSS_TYPE_HALFBODY ] = mpParaSheet[ TSS_TYPE_TITLE ] = mpParaSheet[ TSS_TYPE_SUBTITLE ] = nullptr; /* SJ: try to locate the txMasterStyleAtom in the Environment @@ -4411,7 +4411,7 @@ PPTParaPropSet& PPTParaPropSet::operator=( PPTParaPropSet& rParaPropSet ) PPTCharPropSet::PPTCharPropSet(sal_uInt32 nParagraph) : mnOriginalTextPos(0) , mnParagraph(nParagraph) - , mpFieldItem(NULL) + , mpFieldItem(nullptr) , pCharSet(new ImplPPTCharPropSet) { mnHylinkOrigColor = 0; @@ -4431,7 +4431,7 @@ PPTCharPropSet::PPTCharPropSet( const PPTCharPropSet& rCharPropSet ) mnParagraph = rCharPropSet.mnParagraph; mnOriginalTextPos = rCharPropSet.mnOriginalTextPos; maString = rCharPropSet.maString; - mpFieldItem = ( rCharPropSet.mpFieldItem ) ? new SvxFieldItem( *rCharPropSet.mpFieldItem ) : NULL; + mpFieldItem = ( rCharPropSet.mpFieldItem ) ? new SvxFieldItem( *rCharPropSet.mpFieldItem ) : nullptr; mnLanguage[ 0 ] = rCharPropSet.mnLanguage[ 0 ]; mnLanguage[ 1 ] = rCharPropSet.mnLanguage[ 1 ]; mnLanguage[ 2 ] = rCharPropSet.mnLanguage[ 2 ]; @@ -4449,7 +4449,7 @@ PPTCharPropSet::PPTCharPropSet( const PPTCharPropSet& rCharPropSet, sal_uInt32 n mnParagraph = nParagraph; mnOriginalTextPos = rCharPropSet.mnOriginalTextPos; maString = rCharPropSet.maString; - mpFieldItem = ( rCharPropSet.mpFieldItem ) ? new SvxFieldItem( *rCharPropSet.mpFieldItem ) : NULL; + mpFieldItem = ( rCharPropSet.mpFieldItem ) ? new SvxFieldItem( *rCharPropSet.mpFieldItem ) : nullptr; mnLanguage[ 0 ] = mnLanguage[ 1 ] = mnLanguage[ 2 ] = 0; } @@ -4472,7 +4472,7 @@ PPTCharPropSet& PPTCharPropSet::operator=( const PPTCharPropSet& rCharPropSet ) mnOriginalTextPos = rCharPropSet.mnOriginalTextPos; mnParagraph = rCharPropSet.mnParagraph; maString = rCharPropSet.maString; - mpFieldItem = ( rCharPropSet.mpFieldItem ) ? new SvxFieldItem( *rCharPropSet.mpFieldItem ) : NULL; + mpFieldItem = ( rCharPropSet.mpFieldItem ) ? new SvxFieldItem( *rCharPropSet.mpFieldItem ) : nullptr; } return *this; } @@ -4515,7 +4515,7 @@ PPTRuler::PPTRuler() : nRefCount(1) , nFlags(0) , nDefaultTab(0x240) - , pTab(NULL) + , pTab(nullptr) , nTabCount(0) { memset(nTextOfs, 0, sizeof(nTextOfs)); @@ -5436,7 +5436,7 @@ bool PPTPortionObj::GetAttrib( sal_uInt32 nAttr, sal_uInt32& rRetValue, sal_uInt else { const PPTCharLevel& rCharLevel = mrStyleSheet.mpCharSheet[ mnInstance ]->maCharLevel[ mnDepth ]; - PPTCharLevel* pCharLevel = NULL; + PPTCharLevel* pCharLevel = nullptr; if ( ( nDestinationInstance == 0xffffffff ) || ( mnDepth && ( ( mnInstance == TSS_TYPE_SUBTITLE ) || ( mnInstance == TSS_TYPE_TEXT_IN_SHAPE ) ) ) ) bIsHardAttribute = true; @@ -5504,7 +5504,7 @@ bool PPTPortionObj::GetAttrib( sal_uInt32 nAttr, sal_uInt32& rRetValue, sal_uInt void PPTPortionObj::ApplyTo( SfxItemSet& rSet, SdrPowerPointImport& rManager, sal_uInt32 nDestinationInstance ) { - ApplyTo( rSet, rManager, nDestinationInstance, NULL ); + ApplyTo( rSet, rManager, nDestinationInstance, nullptr ); } void PPTPortionObj::ApplyTo( SfxItemSet& rSet, SdrPowerPointImport& rManager, sal_uInt32 nDestinationInstance, const PPTTextObj* pTextObj ) @@ -5654,7 +5654,7 @@ void PPTPortionObj::ApplyTo( SfxItemSet& rSet, SdrPowerPointImport& rManager, s const SfxItemSet* pItemSet = pTextObj->GetBackground(); if ( pItemSet ) { - const SfxPoolItem* pFillStyleItem = NULL; + const SfxPoolItem* pFillStyleItem = nullptr; pItemSet->GetItemState( XATTR_FILLSTYLE, false, &pFillStyleItem ); if ( pFillStyleItem ) { @@ -5663,7 +5663,7 @@ void PPTPortionObj::ApplyTo( SfxItemSet& rSet, SdrPowerPointImport& rManager, s { case drawing::FillStyle_SOLID : { - const SfxPoolItem* pFillColorItem = NULL; + const SfxPoolItem* pFillColorItem = nullptr; pItemSet->GetItemState( XATTR_FILLCOLOR, false, &pFillColorItem ); if ( pFillColorItem ) aDefColor = static_cast<const XColorItem*>(pFillColorItem)->GetColorValue(); @@ -5671,7 +5671,7 @@ void PPTPortionObj::ApplyTo( SfxItemSet& rSet, SdrPowerPointImport& rManager, s break; case drawing::FillStyle_GRADIENT : { - const SfxPoolItem* pGradientItem = NULL; + const SfxPoolItem* pGradientItem = nullptr; pItemSet->GetItemState( XATTR_FILLGRADIENT, false, &pGradientItem ); if ( pGradientItem ) aDefColor = static_cast<const XFillGradientItem*>(pGradientItem)->GetGradientValue().GetStartColor(); @@ -5735,11 +5735,11 @@ SvxFieldItem* PPTPortionObj::GetTextField() { if ( mpFieldItem ) return new SvxFieldItem( *mpFieldItem ); - return NULL; + return nullptr; } PPTParagraphObj::PPTParagraphObj( const PPTStyleSheet& rStyleSheet, sal_uInt32 nInstance, sal_uInt16 nDepth ) : - PPTNumberFormatCreator ( NULL ), + PPTNumberFormatCreator ( nullptr ), mrStyleSheet ( rStyleSheet ), mnInstance ( nInstance ), mbTab ( true ), // style sheets always have to get the right tabulator setting @@ -5755,7 +5755,7 @@ PPTParagraphObj::PPTParagraphObj( PPTStyleTextPropReader& rPropReader, const PPTStyleSheet& rStyleSheet, sal_uInt32 nInstance, PPTTextRulerInterpreter& rRuler ) : PPTParaPropSet ( *rPropReader.aParaPropList[nCurParaPos] ), - PPTNumberFormatCreator ( NULL ), + PPTNumberFormatCreator ( nullptr ), PPTTextRulerInterpreter ( rRuler ), mrStyleSheet ( rStyleSheet ), mnInstance ( nInstance ), @@ -5894,7 +5894,7 @@ bool PPTParagraphObj::GetAttrib( sal_uInt32 nAttr, sal_uInt32& rRetValue, sal_uI { const PPTParaLevel& rParaLevel = mrStyleSheet.mpParaSheet[ mnInstance ]->maParaLevel[ pParaSet->mnDepth ]; - PPTParaLevel* pParaLevel = NULL; + PPTParaLevel* pParaLevel = nullptr; if ( ( nDestinationInstance == 0xffffffff ) || ( pParaSet->mnDepth && ( ( mnInstance == TSS_TYPE_SUBTITLE ) || ( mnInstance == TSS_TYPE_TEXT_IN_SHAPE ) ) ) ) bIsHardAttribute = true; @@ -6304,7 +6304,7 @@ PPTPortionObj* PPTParagraphObj::First() { mnCurrentObject = 0; if (m_PortionList.empty()) - return NULL; + return nullptr; return m_PortionList.front().get(); } @@ -6312,7 +6312,7 @@ PPTPortionObj* PPTParagraphObj::Next() { sal_uInt32 i = mnCurrentObject + 1; if (i >= m_PortionList.size()) - return NULL; + return nullptr; mnCurrentObject++; return m_PortionList[i].get(); } @@ -6390,11 +6390,11 @@ PPTTextObj::PPTTextObj( SvStream& rIn, SdrPowerPointImport& rSdrPowerPointImport mpImplTextObj->mnRefCount = 1; mpImplTextObj->mnShapeId = 0; mpImplTextObj->mnShapeMaster = 0; - mpImplTextObj->mpPlaceHolderAtom = NULL; + mpImplTextObj->mpPlaceHolderAtom = nullptr; mpImplTextObj->mnDestinationInstance = mpImplTextObj->mnInstance = 4; mpImplTextObj->mnCurrentObject = 0; mpImplTextObj->mnParagraphCount = 0; - mpImplTextObj->mpParagraphList = NULL; + mpImplTextObj->mpParagraphList = nullptr; mpImplTextObj->mnTextFlags = 0; mpImplTextObj->meShapeType = ( pObjData && pObjData->bShapeType ) ? pObjData->eShapeType : mso_sptMin; @@ -6405,7 +6405,7 @@ PPTTextObj::PPTTextObj( SvStream& rIn, SdrPowerPointImport& rSdrPowerPointImport DffRecordHeader aShapeContainerHd; ReadDffRecordHeader( rIn, aShapeContainerHd ); - if ( ( pObjData == NULL ) || ( pObjData->bShapeType ) ) + if ( ( pObjData == nullptr ) || ( pObjData->bShapeType ) ) { PPTExtParaProv* pExtParaProv = rSdrPowerPointImport.pPPTStyleSheet->pExtParaProv; if ( pObjData ) @@ -6517,7 +6517,7 @@ PPTTextObj::PPTTextObj( SvStream& rIn, SdrPowerPointImport& rSdrPowerPointImport } // now pHd points to the right SlideListWithText Container PptSlidePersistList* pPageList = rSdrPowerPointImport.GetPageList( rSdrPowerPointImport.eAktPageKind ); - PptSlidePersistEntry* pE = NULL; + PptSlidePersistEntry* pE = nullptr; if ( pPageList && ( rSdrPowerPointImport.nAktPageNum < pPageList->size() ) ) pE = &(*pPageList)[ rSdrPowerPointImport.nAktPageNum ]; if ( (!pE) || (!pE->nSlidePersistStartOffset) || ( pE->aPersistAtom.nSlideId != nSlideId ) ) @@ -6666,7 +6666,7 @@ PPTTextObj::PPTTextObj( SvStream& rIn, SdrPowerPointImport& rSdrPowerPointImport { ReadDffRecordHeader( rIn, aTextHd ); sal_uInt16 nVal = 0; - PPTFieldEntry* pEntry = NULL; + PPTFieldEntry* pEntry = nullptr; switch ( aTextHd.nRecType ) { case PPT_PST_DateTimeMCAtom : @@ -6773,7 +6773,7 @@ PPTTextObj::PPTTextObj( SvStream& rIn, SdrPowerPointImport& rSdrPowerPointImport } } } - if ( pEntry->pString == NULL ) + if ( pEntry->pString == nullptr ) { // Handle as previously pEntry->pField1 = new SvxFieldItem( SvxDateField( Date( Date::SYSTEM ), SVXDATETYPE_FIX ), EE_FEATURE_FIELD ); @@ -6886,7 +6886,7 @@ PPTTextObj::PPTTextObj( SvStream& rIn, SdrPowerPointImport& rSdrPowerPointImport if ( (*FE)->pField2 ) { PPTCharPropSet* pNewCPS = new PPTCharPropSet( *pSet ); - pNewCPS->mpFieldItem = (*FE)->pField2, (*FE)->pField2 = NULL; + pNewCPS->mpFieldItem = (*FE)->pField2, (*FE)->pField2 = nullptr; aCharPropList.insert( aCharPropList.begin() + n + 1, pNewCPS ); pNewCPS = new PPTCharPropSet( *pSet ); @@ -6901,7 +6901,7 @@ PPTTextObj::PPTTextObj( SvStream& rIn, SdrPowerPointImport& rSdrPowerPointImport } if ( (*FE)->pField1 ) { - pSet->mpFieldItem = (*FE)->pField1, (*FE)->pField1 = NULL; + pSet->mpFieldItem = (*FE)->pField1, (*FE)->pField1 = nullptr; } else if ( (*FE)->pString ) pSet->maString = *(*FE)->pString; @@ -6913,7 +6913,7 @@ PPTTextObj::PPTTextObj( SvStream& rIn, SdrPowerPointImport& rSdrPowerPointImport sal_uInt32 nHyperLen = (*FE)->nTextRangeEnd - nPos; if ( nHyperLen ) { - PPTCharPropSet* pBefCPS = NULL; + PPTCharPropSet* pBefCPS = nullptr; if ( nCount ) { pBefCPS = new PPTCharPropSet( *pSet ); @@ -6980,7 +6980,7 @@ PPTTextObj::PPTTextObj( SvStream& rIn, SdrPowerPointImport& rSdrPowerPointImport } nIdx++; } - delete (*FE)->pField1, (*FE)->pField1 = NULL; + delete (*FE)->pField1, (*FE)->pField1 = nullptr; if ( pBefCPS ) { @@ -7046,7 +7046,7 @@ PPTParagraphObj* PPTTextObj::First() { mpImplTextObj->mnCurrentObject = 0; if ( !mpImplTextObj->mnParagraphCount ) - return NULL; + return nullptr; return mpImplTextObj->mpParagraphList[ 0 ]; } @@ -7054,7 +7054,7 @@ PPTParagraphObj* PPTTextObj::Next() { sal_uInt32 i = mpImplTextObj->mnCurrentObject + 1; if ( i >= mpImplTextObj->mnParagraphCount ) - return NULL; + return nullptr; mpImplTextObj->mnCurrentObject++; return mpImplTextObj->mpParagraphList[ i ]; } @@ -7064,7 +7064,7 @@ const SfxItemSet* PPTTextObj::GetBackground() const if ( mpImplTextObj->mrPersistEntry.pBObj ) return &mpImplTextObj->mrPersistEntry.pBObj->GetMergedItemSet(); else - return NULL; + return nullptr; } void PPTTextObj::ImplClear() @@ -7606,9 +7606,9 @@ SdrObject* SdrPowerPointImport::CreateTable( SdrObject* pGroup, sal_uInt32* pTab // check connections to the group object if ( pPtr->pAObj == pGroup ) - pPtr->pAObj = NULL; + pPtr->pAObj = nullptr; if ( pPtr->pBObj == pGroup ) - pPtr->pBObj = NULL; + pPtr->pBObj = nullptr; // check connections to all its subobjects SdrObjListIter aIter( *pGroup, IM_DEEPWITHGROUPS ); @@ -7616,9 +7616,9 @@ SdrObject* SdrPowerPointImport::CreateTable( SdrObject* pGroup, sal_uInt32* pTab { SdrObject* pPartObj = aIter.Next(); if ( pPtr->pAObj == pPartObj ) - pPtr->pAObj = NULL; + pPtr->pAObj = nullptr; if ( pPtr->pBObj == pPartObj ) - pPtr->pBObj = NULL; + pPtr->pBObj = nullptr; } //In MS, the one_row_one_col table is made up of five //shape,the connector is connected to some part of a diff --git a/filter/source/msfilter/svxmsbas2.cxx b/filter/source/msfilter/svxmsbas2.cxx index e2a4ce64af12..0c04ff77e172 100644 --- a/filter/source/msfilter/svxmsbas2.cxx +++ b/filter/source/msfilter/svxmsbas2.cxx @@ -37,7 +37,7 @@ ErrCode SvxImportMSVBasic::SaveOrDelMSVBAStorage( bool bSaveInto, STREAM_READWRITE | StreamMode::NOCREATE | StreamMode::SHARE_DENYALL ) ); if( xVBAStg.Is() && !xVBAStg->GetError() ) { - xVBAStg = 0; + xVBAStg = nullptr; if( bSaveInto ) { #if HAVE_FEATURE_SCRIPTING diff --git a/filter/source/msfilter/util.cxx b/filter/source/msfilter/util.cxx index aa5556818bf7..42b3b926afae 100644 --- a/filter/source/msfilter/util.cxx +++ b/filter/source/msfilter/util.cxx @@ -1178,11 +1178,11 @@ static struct { }; typedef std::unordered_map< const char*, const char*, rtl::CStringHash, rtl::CStringEqual> CustomShapeTypeTranslationHashMap; -static CustomShapeTypeTranslationHashMap* pCustomShapeTypeTranslationHashMap = NULL; +static CustomShapeTypeTranslationHashMap* pCustomShapeTypeTranslationHashMap = nullptr; const char* GetOOXMLPresetGeometry( const char* sShapeType ) { - if( pCustomShapeTypeTranslationHashMap == NULL ) + if( pCustomShapeTypeTranslationHashMap == nullptr ) { pCustomShapeTypeTranslationHashMap = new CustomShapeTypeTranslationHashMap (); for( unsigned int i = 0; i < SAL_N_ELEMENTS(pCustomShapeTypeTranslationTable); ++i ) diff --git a/filter/source/msfilter/viscache.hxx b/filter/source/msfilter/viscache.hxx index 40dc36b7089e..cf91eda47103 100644 --- a/filter/source/msfilter/viscache.hxx +++ b/filter/source/msfilter/viscache.hxx @@ -40,11 +40,11 @@ public: explicit Impl_OlePres( SotClipboardFormatId nF ) : nFormat( nF ) , nAspect( ASPECT_CONTENT ) - , pBmp( NULL ) - , pMtf( NULL ) + , pBmp( nullptr ) + , pMtf( nullptr ) , nAdvFlags( 0x2 ) // in Dokument gefunden , nJobLen( 0 ) - , pJob( NULL ) + , pJob( nullptr ) {} ~Impl_OlePres() { |