diff options
Diffstat (limited to 'sw/source/filter/basflt/shellio.cxx')
-rw-r--r-- | sw/source/filter/basflt/shellio.cxx | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/sw/source/filter/basflt/shellio.cxx b/sw/source/filter/basflt/shellio.cxx index 500150427326..7c098122b840 100644 --- a/sw/source/filter/basflt/shellio.cxx +++ b/sw/source/filter/basflt/shellio.cxx @@ -68,11 +68,11 @@ sal_uLong SwReader::Read( const Reader& rOptions ) po->pStrm = pStrm; po->pStg = pStg; po->xStg = xStg; - po->bInsertMode = 0 != pCrsr; + po->bInsertMode = nullptr != pCrsr; po->bSkipImages = mbSkipImages; // if a Medium is selected, get its Stream - if( 0 != (po->pMedium = pMedium ) && + if( nullptr != (po->pMedium = pMedium ) && !po->SetStrmStgPtr() ) { po->SetReadUTF8( false ); @@ -110,7 +110,7 @@ sal_uLong SwReader::Read( const Reader& rOptions ) // Pams are connected like rings; stop when we return to the 1st element SwPaM *pEnd = pPam; - SwUndoInsDoc* pUndo = 0; + SwUndoInsDoc* pUndo = nullptr; bool bReadPageDescs = false; bool const bDocUndo = pDoc->GetIDocumentUndoRedo().DoesUndo(); @@ -126,7 +126,7 @@ sal_uLong SwReader::Read( const Reader& rOptions ) else { pDoc->GetIDocumentUndoRedo().ClearRedo(); - pDoc->GetIDocumentUndoRedo().StartUndo( UNDO_INSDOKUMENT, NULL ); + pDoc->GetIDocumentUndoRedo().StartUndo( UNDO_INSDOKUMENT, nullptr ); } } pDoc->GetIDocumentUndoRedo().DoUndo(false); @@ -148,7 +148,7 @@ sal_uLong SwReader::Read( const Reader& rOptions ) pDoc->getIDocumentRedlineAccess().SetRedlineMode_intern( nsRedlineMode_t::REDLINE_IGNORE ); - SwPaM* pUndoPam = 0; + SwPaM* pUndoPam = nullptr; if( bDocUndo || pCrsr ) { // set Pam to the previous node, so that it is not also moved @@ -183,7 +183,7 @@ sal_uLong SwReader::Read( const Reader& rOptions ) { --aEndPos; pCNd = aEndPos.GetNode().GetContentNode(); - if( !pCNd && 0 == ( pCNd = SwNodes::GoPrevious( &aEndPos ) )) + if( !pCNd && nullptr == ( pCNd = SwNodes::GoPrevious( &aEndPos ) )) pCNd = pDoc->GetNodes().GoNext( &aEndPos ); pPam->GetPoint()->nNode = aEndPos; @@ -214,7 +214,7 @@ sal_uLong SwReader::Read( const Reader& rOptions ) pUndoPam->GetPoint()->nContent.Assign( static_cast<SwContentNode*>(&rNd), nSttContent ); else - pUndoPam->GetPoint()->nContent.Assign( 0, 0 ); + pUndoPam->GetPoint()->nContent.Assign( nullptr, 0 ); bool bChkHeaderFooter = rNd.FindHeaderStartNode() || rNd.FindFooterStartNode(); @@ -351,7 +351,7 @@ sal_uLong SwReader::Read( const Reader& rOptions ) if( bSaveUndo ) { pDoc->getIDocumentRedlineAccess().SetRedlineMode_intern( eOld ); - pDoc->GetIDocumentUndoRedo().EndUndo( UNDO_INSDOKUMENT, NULL ); + pDoc->GetIDocumentUndoRedo().EndUndo( UNDO_INSDOKUMENT, nullptr ); pDoc->getIDocumentRedlineAccess().SetRedlineMode_intern( nsRedlineMode_t::REDLINE_IGNORE ); } } @@ -370,7 +370,7 @@ sal_uLong SwReader::Read( const Reader& rOptions ) eOld = static_cast<RedlineMode_t>( ePostReadRedlineMode & ~nsRedlineMode_t::REDLINE_IGNORE); - pDoc->getIDocumentFieldsAccess().SetFieldsDirty(false, NULL, 0); + pDoc->getIDocumentFieldsAccess().SetFieldsDirty(false, nullptr, 0); } pDoc->getIDocumentRedlineAccess().SetRedlineMode_intern( eOld ); @@ -397,7 +397,7 @@ sal_uLong SwReader::Read( const Reader& rOptions ) SwReader::SwReader(SfxMedium& rMedium, const OUString& rFileName, SwDoc *pDocument) - : SwDocFac(pDocument), pStrm(0), pMedium(&rMedium), pCrsr(0), + : SwDocFac(pDocument), pStrm(nullptr), pMedium(&rMedium), pCrsr(nullptr), aFileName(rFileName), mbSkipImages(false) { SetBaseURL( rMedium.GetBaseURL() ); @@ -407,30 +407,30 @@ SwReader::SwReader(SfxMedium& rMedium, const OUString& rFileName, SwDoc *pDocume // Read into an existing document SwReader::SwReader(SvStream& rStrm, const OUString& rFileName, const OUString& rBaseURL, SwPaM& rPam) - : SwDocFac(rPam.GetDoc()), pStrm(&rStrm), pMedium(0), pCrsr(&rPam), + : SwDocFac(rPam.GetDoc()), pStrm(&rStrm), pMedium(nullptr), pCrsr(&rPam), aFileName(rFileName), mbSkipImages(false) { SetBaseURL( rBaseURL ); } SwReader::SwReader(SfxMedium& rMedium, const OUString& rFileName, SwPaM& rPam) - : SwDocFac(rPam.GetDoc()), pStrm(0), pMedium(&rMedium), + : SwDocFac(rPam.GetDoc()), pStrm(nullptr), pMedium(&rMedium), pCrsr(&rPam), aFileName(rFileName), mbSkipImages(false) { SetBaseURL( rMedium.GetBaseURL() ); } SwReader::SwReader( const uno::Reference < embed::XStorage > &rStg, const OUString& rFilename, SwPaM &rPam ) - : SwDocFac(rPam.GetDoc()), pStrm(0), xStg( rStg ), pMedium(0), pCrsr(&rPam), aFileName(rFilename), mbSkipImages(false) + : SwDocFac(rPam.GetDoc()), pStrm(nullptr), xStg( rStg ), pMedium(nullptr), pCrsr(&rPam), aFileName(rFilename), mbSkipImages(false) { } Reader::Reader() - : pTemplate(0), + : pTemplate(nullptr), aDStamp( Date::EMPTY ), aTStamp( tools::Time::EMPTY ), aChkDateTime( DateTime::EMPTY ), - pStrm(0), pMedium(0), bInsertMode(false), + pStrm(nullptr), pMedium(nullptr), bInsertMode(false), bTmplBrowseMode(false), bReadUTF8(false), bBlockMode(false), bOrganizerMode(false), bHasAskTemplateName(false), bIgnoreHTMLComments(false), bSkipImages(false) { @@ -536,7 +536,7 @@ bool Reader::SetTemplate( SwDoc& rDoc ) { rDoc.RemoveAllFormatLanguageDependencies(); rDoc.ReplaceStyles( *pTemplate ); - rDoc.getIDocumentFieldsAccess().SetFixFields(false, NULL); + rDoc.getIDocumentFieldsAccess().SetFixFields(false, nullptr); bRet = true; } @@ -549,7 +549,7 @@ void Reader::ClearTemplate() { if( 0 == pTemplate->release() ) delete pTemplate; - pTemplate = 0; + pTemplate = nullptr; } } @@ -594,11 +594,11 @@ bool Reader::SetStrmStgPtr() if ( pStrm && SotStorage::IsStorageFile(pStrm) && (SW_STORAGE_READER & GetReaderType()) ) { pStg = new SotStorage( *pStrm ); - pStrm = NULL; + pStrm = nullptr; } else if ( !(SW_STREAM_READER & GetReaderType()) ) { - pStrm = NULL; + pStrm = nullptr; return false; } @@ -655,7 +655,7 @@ bool SwReader::HasGlossaries( const Reader& rOptions ) // if a Medium is selected, get its Stream bool bRet = false; - if( !( 0 != (po->pMedium = pMedium ) && !po->SetStrmStgPtr() )) + if( !( nullptr != (po->pMedium = pMedium ) && !po->SetStrmStgPtr() )) bRet = po->HasGlossaries(); return bRet; } @@ -671,7 +671,7 @@ bool SwReader::ReadGlossaries( const Reader& rOptions, // if a Medium is selected, get its Stream bool bRet = false; - if( !( 0 != (po->pMedium = pMedium ) && !po->SetStrmStgPtr() )) + if( !( nullptr != (po->pMedium = pMedium ) && !po->SetStrmStgPtr() )) bRet = po->ReadGlossaries( rBlocks, bSaveRelFiles ); return bRet; } @@ -700,36 +700,36 @@ int StgReader::GetReaderType() */ SwWriter::SwWriter(SvStream& rStrm, SwCrsrShell &rShell, bool bInWriteAll) - : pStrm(&rStrm), pMedium(0), pOutPam(0), pShell(&rShell), + : pStrm(&rStrm), pMedium(nullptr), pOutPam(nullptr), pShell(&rShell), rDoc(*rShell.GetDoc()), bWriteAll(bInWriteAll) { } SwWriter::SwWriter(SvStream& rStrm,SwDoc &rDocument) - : pStrm(&rStrm), pMedium(0), pOutPam(0), pShell(0), rDoc(rDocument), + : pStrm(&rStrm), pMedium(nullptr), pOutPam(nullptr), pShell(nullptr), rDoc(rDocument), bWriteAll(true) { } SwWriter::SwWriter(SvStream& rStrm, SwPaM& rPam, bool bInWriteAll) - : pStrm(&rStrm), pMedium(0), pOutPam(&rPam), pShell(0), + : pStrm(&rStrm), pMedium(nullptr), pOutPam(&rPam), pShell(nullptr), rDoc(*rPam.GetDoc()), bWriteAll(bInWriteAll) { } SwWriter::SwWriter( const uno::Reference < embed::XStorage >& rStg, SwDoc &rDocument) - : pStrm(0), xStg( rStg ), pMedium(0), pOutPam(0), pShell(0), rDoc(rDocument), bWriteAll(true) + : pStrm(nullptr), xStg( rStg ), pMedium(nullptr), pOutPam(nullptr), pShell(nullptr), rDoc(rDocument), bWriteAll(true) { } SwWriter::SwWriter(SfxMedium& rMedium, SwCrsrShell &rShell, bool bInWriteAll) - : pStrm(0), pMedium(&rMedium), pOutPam(0), pShell(&rShell), + : pStrm(nullptr), pMedium(&rMedium), pOutPam(nullptr), pShell(&rShell), rDoc(*rShell.GetDoc()), bWriteAll(bInWriteAll) { } SwWriter::SwWriter(SfxMedium& rMedium, SwDoc &rDocument) - : pStrm(0), pMedium(&rMedium), pOutPam(0), pShell(0), rDoc(rDocument), + : pStrm(nullptr), pMedium(&rMedium), pOutPam(nullptr), pShell(nullptr), rDoc(rDocument), bWriteAll(true) { } @@ -742,7 +742,7 @@ sal_uLong SwWriter::Write( WriterRef& rxWriter, const OUString* pRealFileName ) bool bHasMark = false; SwPaM * pPam; - SwDoc *pDoc = 0; + SwDoc *pDoc = nullptr; if ( pShell && !bWriteAll && pShell->IsTableMode() ) { |