summaryrefslogtreecommitdiff
path: root/sw/source/filter/ww8/ww8par.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/filter/ww8/ww8par.cxx')
-rw-r--r--sw/source/filter/ww8/ww8par.cxx260
1 files changed, 130 insertions, 130 deletions
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index 0886debc7155..d4ea09f766c8 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -178,7 +178,7 @@ SwMacroInfo* GetMacroInfo( SdrObject* pObj, bool bCreate ) // static
}
}
- return 0;
+ return nullptr;
};
void lclGetAbsPath(OUString& rPath, sal_uInt16 nLevel, SwDocShell* pDocShell)
@@ -528,8 +528,8 @@ Sttb::getStringAtIndex( sal_uInt32 index )
SwMSDffManager::SwMSDffManager( SwWW8ImplReader& rRdr, bool bSkipImages )
: SvxMSDffManager(*rRdr.m_pTableStream, rRdr.GetBaseURL(), rRdr.m_pWwFib->fcDggInfo,
- rRdr.m_pDataStream, 0, 0, COL_WHITE, rRdr.m_pStrm, bSkipImages),
- rReader(rRdr), pFallbackStream(0)
+ rRdr.m_pDataStream, nullptr, 0, COL_WHITE, rRdr.m_pStrm, bSkipImages),
+ rReader(rRdr), pFallbackStream(nullptr)
{
SetSvxMSDffSettings( GetSvxMSDffSettings() );
nSvxMSDffOLEConvFlags = SwMSDffManager::GetFilterFlags();
@@ -568,10 +568,10 @@ SdrObject* SwMSDffManager::ImportOLE( long nOLEId,
// if drawing OLE objects are allowed in Writer.
if ( _nCalledByGroup > 0 )
{
- return 0L;
+ return nullptr;
}
- SdrObject* pRet = 0;
+ SdrObject* pRet = nullptr;
OUString sStorageName;
tools::SvRef<SotStorage> xSrcStg;
uno::Reference < embed::XStorage > xDstStg;
@@ -602,7 +602,7 @@ void SwMSDffManager::DisableFallbackStream()
pFallbackStream = pStData2;
aOldEscherBlipCache = aEscherBlipCache;
aEscherBlipCache.clear();
- pStData2 = 0;
+ pStData2 = nullptr;
}
void SwMSDffManager::EnableFallbackStream()
@@ -610,7 +610,7 @@ void SwMSDffManager::EnableFallbackStream()
pStData2 = pFallbackStream;
aEscherBlipCache = aOldEscherBlipCache;
aOldEscherBlipCache.clear();
- pFallbackStream = 0;
+ pFallbackStream = nullptr;
}
sal_uInt16 SwWW8ImplReader::GetToggleAttrFlags() const
@@ -948,7 +948,7 @@ SdrObject* SwMSDffManager::ProcessObj(SvStream& rSt,
aSet.Put( SdrTextVertAdjustItem( eTVA ) );
aSet.Put( SdrTextHorzAdjustItem( eTHA ) );
- if (pObj != NULL)
+ if (pObj != nullptr)
{
pObj->SetMergedItemSet(aSet);
pObj->SetModel(pSdrModel);
@@ -1022,7 +1022,7 @@ SdrObject* SwMSDffManager::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 )
@@ -1059,7 +1059,7 @@ SdrObject* SwMSDffManager::ProcessObj(SvStream& rSt,
if (SeekToContent(DFF_Prop_pWrapPolygonVertices, rSt))
{
delete pImpRec->pWrapPolygon;
- pImpRec->pWrapPolygon = NULL;
+ pImpRec->pWrapPolygon = nullptr;
sal_uInt16 nNumElemVert(0), nNumElemMemVert(0), nElemSizeVert(0);
rSt.ReadUInt16( nNumElemVert ).ReadUInt16( nNumElemMemVert ).ReadUInt16( nElemSizeVert );
@@ -1235,7 +1235,7 @@ void SwWW8FltControlStack::NewAttr(const SwPosition& rPos,
SwFltStackEntry* SwWW8FltControlStack::SetAttr(const SwPosition& rPos, sal_uInt16 nAttrId,
bool bTstEnde, long nHand, bool )
{
- SwFltStackEntry *pRet = NULL;
+ SwFltStackEntry *pRet = nullptr;
// Doing a textbox, and using the control stack only as a temporary
// collection point for properties which will are not to be set into
// the real document
@@ -1333,7 +1333,7 @@ void SyncIndentWithList( SvxLRSpaceItem &rLR,
const SwNumFormat* SwWW8FltControlStack::GetNumFormatFromStack(const SwPosition &rPos,
const SwTextNode &rTextNode)
{
- const SwNumFormat *pRet = 0;
+ const SwNumFormat *pRet = nullptr;
const SfxPoolItem *pItem = GetStackAttr(rPos, RES_FLTR_NUMRULE);
if (pItem && rTextNode.GetNumRule())
{
@@ -1387,7 +1387,7 @@ void SwWW8ReferencedFltEndStack::SetAttrInDoc( const SwPosition& rTmpPos,
bool bInsertBookmarkIntoDoc = true;
SwFltBookmark* pFltBookmark = dynamic_cast<SwFltBookmark*>(rEntry.pAttr);
- if ( pFltBookmark != 0 && pFltBookmark->IsTOCBookmark() )
+ if ( pFltBookmark != nullptr && pFltBookmark->IsTOCBookmark() )
{
const OUString& rName = pFltBookmark->GetName();
::std::set< OUString, SwWW8::ltstr >::const_iterator aResult = aReferencedTOCBookmarks.find(rName);
@@ -1441,7 +1441,7 @@ void SwWW8FltControlStack::SetAttrInDoc(const SwPosition& rTmpPos,
SwTextNode *pTextNode = static_cast<SwTextNode*>(pNode);
- const SwNumFormat *pNum = 0;
+ const SwNumFormat *pNum = nullptr;
pNum = GetNumFormatFromStack( *aRegion.GetPoint(), *pTextNode );
if (!pNum)
{
@@ -1497,7 +1497,7 @@ void SwWW8FltControlStack::SetAttrInDoc(const SwPosition& rTmpPos,
// If we have just one single inline graphic then
// don't insert a field for the single frame, set
// the frames hyperlink field attribute directly.
- if (0 != (pFrm = SwWW8ImplReader::ContainsSingleInlineGraphic(aRegion)))
+ if (nullptr != (pFrm = SwWW8ImplReader::ContainsSingleInlineGraphic(aRegion)))
{
const SwFormatINetFormat *pAttr = static_cast<const SwFormatINetFormat *>(
rEntry.pAttr);
@@ -1592,7 +1592,7 @@ const SfxPoolItem* SwWW8FltControlStack::GetStackAttr(const SwPosition& rPos,
}
}
}
- return 0;
+ return nullptr;
}
bool SwWW8FltRefStack::IsFootnoteEdnBkmField(
@@ -1717,7 +1717,7 @@ void SwWW8ImplReader::Read_Tab(sal_uInt16 , const sal_uInt8* pData, short nLen)
SvxTabStopItem aAttr(0, 0, SVX_TAB_ADJUST_DEFAULT, RES_PARATR_TABSTOP);
- const SwTextFormatColl* pSty = 0;
+ const SwTextFormatColl* pSty = nullptr;
sal_uInt16 nTabBase;
if (m_pAktColl && m_nAktColl < m_vColl.size()) // StyleDef
{
@@ -1764,10 +1764,10 @@ void SwWW8ImplReader::Read_Tab(sal_uInt16 , const sal_uInt8* pData, short nLen)
if (aLoopWatch.find(reinterpret_cast<size_t>(pSty)) !=
aLoopWatch.end())
- pSty = 0;
+ pSty = nullptr;
}
else
- pSty = 0; // Give up on the search
+ pSty = nullptr; // Give up on the search
}
}
@@ -2065,11 +2065,11 @@ WW8ReaderSave::WW8ReaderSave(SwWW8ImplReader* pRdr ,WW8_CP nStartCp) :
= pRdr->m_bHasBorder = false;
pRdr->m_bFirstPara = true;
pRdr->m_nInTable = 0;
- pRdr->m_pWFlyPara = 0;
- pRdr->m_pSFlyPara = 0;
- pRdr->m_pPreviousNumPaM = 0;
- pRdr->m_pPrevNumRule = 0;
- pRdr->m_pTableDesc = 0;
+ pRdr->m_pWFlyPara = nullptr;
+ pRdr->m_pSFlyPara = nullptr;
+ pRdr->m_pPreviousNumPaM = nullptr;
+ pRdr->m_pPrevNumRule = nullptr;
+ pRdr->m_pTableDesc = nullptr;
pRdr->m_nAktColl = 0;
pRdr->m_pCtrlStck = new SwWW8FltControlStack(&pRdr->m_rDoc, pRdr->m_nFieldFlags,
@@ -2212,7 +2212,7 @@ long SwWW8ImplReader::Read_And(WW8PLCFManResult* pRes)
OutlinerParaObject *pOutliner = ImportAsOutliner( sText, pRes->nCp2OrIdx,
pRes->nCp2OrIdx + pRes->nMemLen, MAN_AND );
- m_pFormatOfJustInsertedApo = 0;
+ m_pFormatOfJustInsertedApo = nullptr;
SwPostItField aPostIt(
static_cast<SwPostItFieldType*>(m_rDoc.getIDocumentFieldsAccess().GetSysFieldType(RES_POSTITFLD)), sAuthor,
sText, sInitials, OUString(), aDate );
@@ -2434,7 +2434,7 @@ void wwSectionManager::SetHdFt(wwSection &rSection, int nSect,
OSL_ENSURE(rSection.mpPage, "makes no sense to call with a main page");
if (rSection.mpPage)
{
- mrReader.Read_HdFt(nSect, pPrevious ? pPrevious->mpPage : 0,
+ mrReader.Read_HdFt(nSect, pPrevious ? pPrevious->mpPage : nullptr,
rSection);
}
@@ -2449,9 +2449,9 @@ void SwWW8ImplReader::AppendTextNode(SwPosition& rPos)
{
SwTextNode* pText = m_pPaM->GetNode().GetTextNode();
- const SwNumRule* pRule = NULL;
+ const SwNumRule* pRule = nullptr;
- if (pText != NULL)
+ if (pText != nullptr)
pRule = sw::util::GetNumRuleFromTextNode(*pText);
if (
@@ -2475,7 +2475,7 @@ void SwWW8ImplReader::AppendTextNode(SwPosition& rPos)
// cache current paragraph
if(m_pPreviousNumPaM)
- delete m_pPreviousNumPaM, m_pPreviousNumPaM = 0;
+ delete m_pPreviousNumPaM, m_pPreviousNumPaM = nullptr;
m_pPreviousNumPaM = new SwPaM(*m_pPaM, m_pPaM);
m_pPrevNumRule = pRule;
@@ -2485,14 +2485,14 @@ void SwWW8ImplReader::AppendTextNode(SwPosition& rPos)
// If the previous paragraph has numbering but the current one does not
// we need to add a space after the previous paragraph
SetLowerSpacing(*m_pPreviousNumPaM, GetParagraphAutoSpace(m_pWDop->fDontUseHTMLAutoSpacing));
- delete m_pPreviousNumPaM, m_pPreviousNumPaM = 0;
- m_pPrevNumRule = 0;
+ delete m_pPreviousNumPaM, m_pPreviousNumPaM = nullptr;
+ m_pPrevNumRule = nullptr;
}
else
{
// clear paragraph cache
if(m_pPreviousNumPaM)
- delete m_pPreviousNumPaM, m_pPreviousNumPaM = 0;
+ delete m_pPreviousNumPaM, m_pPreviousNumPaM = nullptr;
m_pPrevNumRule = pRule;
}
@@ -2517,7 +2517,7 @@ bool SwWW8ImplReader::SetSpacing(SwPaM &rMyPam, int nSpace, bool bIsUpper )
const SvxULSpaceItem* pULSpaceItem = static_cast<const SvxULSpaceItem*>(m_pCtrlStck->GetFormatAttr(*pSpacingPos, RES_UL_SPACE));
- if(pULSpaceItem != 0)
+ if(pULSpaceItem != nullptr)
{
SvxULSpaceItem aUL(*pULSpaceItem);
@@ -2585,7 +2585,7 @@ bool SwWW8ImplReader::ProcessSpecial(bool &rbReSync, WW8_CP nStartCp)
OSL_ENSURE(m_nInTable >= 0,"nInTable < 0!");
// TabRowEnd
- bool bTableRowEnd = (m_pPlcxMan->HasParaSprm(m_bVer67 ? 25 : 0x2417) != 0 );
+ bool bTableRowEnd = (m_pPlcxMan->HasParaSprm(m_bVer67 ? 25 : 0x2417) != nullptr );
// Unfortunately, for every paragraph we need to check first whether
// they contain a sprm 29 (0x261B), which starts an APO.
@@ -2616,16 +2616,16 @@ bool SwWW8ImplReader::ProcessSpecial(bool &rbReSync, WW8_CP nStartCp)
sal_uInt8 nCellLevel = 0;
if (m_bVer67)
- nCellLevel = int(0 != m_pPlcxMan->HasParaSprm(24));
+ nCellLevel = int(nullptr != m_pPlcxMan->HasParaSprm(24));
else
{
- nCellLevel = int(0 != m_pPlcxMan->HasParaSprm(0x2416));
+ nCellLevel = int(nullptr != m_pPlcxMan->HasParaSprm(0x2416));
if (!nCellLevel)
- nCellLevel = int(0 != m_pPlcxMan->HasParaSprm(0x244B));
+ nCellLevel = int(nullptr != m_pPlcxMan->HasParaSprm(0x244B));
}
do
{
- WW8_TablePos *pTabPos=0;
+ WW8_TablePos *pTabPos=nullptr;
WW8_TablePos aTabPos;
if(nCellLevel && !m_bVer67)
{
@@ -2826,12 +2826,12 @@ rtl_TextEncoding SwWW8ImplReader::GetCurrentCJKCharSet()
void SwWW8ImplReader::PostProcessAttrs()
{
- if (m_pPostProcessAttrsInfo != NULL)
+ if (m_pPostProcessAttrsInfo != nullptr)
{
SfxItemIter aIter(m_pPostProcessAttrsInfo->mItemSet);
const SfxPoolItem * pItem = aIter.GetCurItem();
- if (pItem != NULL)
+ if (pItem != nullptr)
{
do
{
@@ -2840,11 +2840,11 @@ void SwWW8ImplReader::PostProcessAttrs()
m_pCtrlStck->SetAttr(*m_pPostProcessAttrsInfo->mPaM.GetMark(),
pItem->Which());
}
- while (!aIter.IsAtEnd() && 0 != (pItem = aIter.NextItem()));
+ while (!aIter.IsAtEnd() && nullptr != (pItem = aIter.NextItem()));
}
delete m_pPostProcessAttrsInfo;
- m_pPostProcessAttrsInfo = NULL;
+ m_pPostProcessAttrsInfo = nullptr;
}
}
@@ -2882,7 +2882,7 @@ sal_Size Custom8BitToUnicode(rtl_TextToUnicodeConverter hConverter,
sal_uInt32 nInfo = 0;
sal_Size nThisConverted=0;
- nDestChars += rtl_convertTextToUnicode(hConverter, 0,
+ nDestChars += rtl_convertTextToUnicode(hConverter, nullptr,
pIn+nConverted, nInLen-nConverted,
pOut+nDestChars, nOutLen-nDestChars,
nFlags, &nInfo, &nThisConverted);
@@ -2899,7 +2899,7 @@ sal_Size Custom8BitToUnicode(rtl_TextToUnicodeConverter hConverter,
sal_Size nOtherConverted;
rtl_TextToUnicodeConverter hCP1252Converter =
rtl_createTextToUnicodeConverter(RTL_TEXTENCODING_MS_1252);
- nDestChars += rtl_convertTextToUnicode(hCP1252Converter, 0,
+ nDestChars += rtl_convertTextToUnicode(hCP1252Converter, nullptr,
pIn+nConverted, 1,
pOut+nDestChars, nOutLen-nDestChars,
nFlags2, &nInfo, &nOtherConverted);
@@ -3026,7 +3026,7 @@ bool SwWW8ImplReader::ReadPlainChars(WW8_CP& rPos, sal_Int32 nEnd, sal_Int32 nCp
*/
const SfxPoolItem * pItem = GetFormatAttr(RES_CHRATR_CJK_LANGUAGE);
- if (pItem != NULL && LANGUAGE_JAPANESE != static_cast<const SvxLanguageItem *>(pItem)->GetLanguage())
+ if (pItem != nullptr && LANGUAGE_JAPANESE != static_cast<const SvxLanguageItem *>(pItem)->GetLanguage())
{
SAL_WARN("sw.ww8", "discarding word95 RTL_TEXTENCODING_MS_932 encoding");
eSrcCharSet = GetCharSetFromLanguage();
@@ -3040,9 +3040,9 @@ bool SwWW8ImplReader::ReadPlainChars(WW8_CP& rPos, sal_Int32 nEnd, sal_Int32 nCp
sal_Unicode* pBuffer = pStr->buffer;
sal_Unicode* pWork = pBuffer;
- sal_Char* p8Bits = NULL;
+ sal_Char* p8Bits = nullptr;
- rtl_TextToUnicodeConverter hConverter = 0;
+ rtl_TextToUnicodeConverter hConverter = nullptr;
if (!m_bIsUnicode || m_bVer67)
hConverter = rtl_createTextToUnicodeConverter(eSrcCharSet);
@@ -3055,7 +3055,7 @@ bool SwWW8ImplReader::ReadPlainChars(WW8_CP& rPos, sal_Int32 nEnd, sal_Int32 nCp
sal_uInt16 nCTLLang = 0;
const SfxPoolItem * pItem = GetFormatAttr(RES_CHRATR_CTL_LANGUAGE);
- if (pItem != NULL)
+ if (pItem != nullptr)
nCTLLang = static_cast<const SvxLanguageItem *>(pItem)->GetLanguage();
sal_Int32 nL2;
@@ -3123,7 +3123,7 @@ bool SwWW8ImplReader::ReadPlainChars(WW8_CP& rPos, sal_Int32 nEnd, sal_Int32 nCp
pStr->length = nEndUsed;
emulateMSWordAddTextToParagraph(OUString(pStr, SAL_NO_ACQUIRE));
- pStr = NULL;
+ pStr = nullptr;
rPos += nL2;
if (!m_aApos.back()) // a para end in apo doesn't count
m_bWasParaEnd = false; // No CR
@@ -3247,7 +3247,7 @@ void SwWW8ImplReader::emulateMSWordAddTextToParagraph(const OUString& rAddString
OUString sParagraphText;
const SwContentNode *pCntNd = m_pPaM->GetContentNode();
- const SwTextNode* pNd = pCntNd ? pCntNd->GetTextNode() : NULL;
+ const SwTextNode* pNd = pCntNd ? pCntNd->GetTextNode() : nullptr;
if (pNd)
sParagraphText = pNd->GetText();
sal_Int32 nParaOffset = sParagraphText.getLength();
@@ -3262,7 +3262,7 @@ void SwWW8ImplReader::emulateMSWordAddTextToParagraph(const OUString& rAddString
OUString sChunk(rAddString.copy(nPos, nEnd-nPos));
const sal_uInt16 aIds[] = {RES_CHRATR_FONT, RES_CHRATR_CJK_FONT, RES_CHRATR_CTL_FONT};
- const SvxFontItem *pOverriddenItems[] = {NULL, NULL, NULL};
+ const SvxFontItem *pOverriddenItems[] = {nullptr, nullptr, nullptr};
bool aForced[] = {false, false, false};
int nLclIdctHint = 0xFF;
@@ -3372,7 +3372,7 @@ void SwWW8ImplReader::simpleAddTextToParagraph(const OUString& rAddString)
#endif
const SwContentNode *pCntNd = m_pPaM->GetContentNode();
- const SwTextNode* pNd = pCntNd ? pCntNd->GetTextNode() : NULL;
+ const SwTextNode* pNd = pCntNd ? pCntNd->GetTextNode() : nullptr;
OSL_ENSURE(pNd, "What the hell, where's my text node");
@@ -3524,7 +3524,7 @@ bool SwWW8ImplReader::ReadChar(long nPosCp, long nCpOfs)
{
// Always insert a txtnode for a column break, e.g. ##
SwContentNode *pCntNd=m_pPaM->GetContentNode();
- if (pCntNd!=NULL && pCntNd->Len()>0) // if par is empty not break is needed
+ if (pCntNd!=nullptr && pCntNd->Len()>0) // if par is empty not break is needed
AppendTextNode(*m_pPaM->GetPoint());
m_rDoc.getIDocumentContentOperations().InsertPoolItem(*m_pPaM, SvxFormatBreakItem(SVX_BREAK_COLUMN_BEFORE, RES_BREAK));
}
@@ -3616,7 +3616,7 @@ bool SwWW8ImplReader::ReadChar(long nPosCp, long nCpOfs)
}
if( !bReadObj )
{
- SwFrameFormat *pResult = 0;
+ SwFrameFormat *pResult = nullptr;
if (m_bObj)
pResult = ImportOle();
else if (m_bSpec)
@@ -3851,7 +3851,7 @@ long SwWW8ImplReader::ReadTextAttr(WW8_CP& rTextPos, long nTextEnd, bool& rbStar
{
m_pCtrlStck->KillUnlockedAttrs( *m_pPaM->GetPoint() );
if( nOldColl != m_pPlcxMan->GetColl() )
- ProcessAktCollChange(aRes, 0, false);
+ ProcessAktCollChange(aRes, nullptr, false);
}
return nNext;
@@ -3947,7 +3947,7 @@ bool SwWW8ImplReader::ReadText(WW8_CP nStartCp, WW8_CP nTextLen, ManTypes nType)
m_bWasParaEnd = false;
m_nAktColl = 0;
- m_pAktItemSet = 0;
+ m_pAktItemSet = nullptr;
m_nCharFormat = -1;
m_bSpec = false;
m_bPgSecBreak = false;
@@ -3956,10 +3956,10 @@ bool SwWW8ImplReader::ReadText(WW8_CP nStartCp, WW8_CP nTextLen, ManTypes nType)
long nCpOfs = m_pPlcxMan->GetCpOfs(); // Offset for Header/Footer, Footnote
WW8_CP nNext = m_pPlcxMan->Where();
- SwTextNode* pPreviousNode = 0;
+ SwTextNode* pPreviousNode = nullptr;
sal_uInt8 nDropLines = 0;
- SwCharFormat* pNewSwCharFormat = 0;
- const SwCharFormat* pFormat = 0;
+ SwCharFormat* pNewSwCharFormat = nullptr;
+ const SwCharFormat* pFormat = nullptr;
m_pStrm->Seek( m_pSBase->WW8Cp2Fc( nStartCp + nCpOfs, &m_bIsUnicode ) );
WW8_CP l = nStartCp;
@@ -3975,7 +3975,7 @@ bool SwWW8ImplReader::ReadText(WW8_CP nStartCp, WW8_CP nTextLen, ManTypes nType)
ReadAttrs( l, nNext, nTextEnd, bStartLine );// Takes SectionBreaks into account, too
OSL_ENSURE(m_pPaM->GetNode().GetTextNode(), "Missing txtnode");
- if (m_pPostProcessAttrsInfo != NULL)
+ if (m_pPostProcessAttrsInfo != nullptr)
PostProcessAttrs();
if (l >= nTextEnd)
@@ -4039,7 +4039,7 @@ bool SwWW8ImplReader::ReadText(WW8_CP nStartCp, WW8_CP nTextLen, ManTypes nType)
SwPosition aStart(*pEndNd);
m_pCtrlStck->NewAttr(aStart, aDrop);
m_pCtrlStck->SetAttr(*m_pPaM->GetPoint(), RES_PARATR_DROP);
- pPreviousNode = 0;
+ pPreviousNode = nullptr;
}
else if (m_bDropCap)
{
@@ -4056,14 +4056,14 @@ bool SwWW8ImplReader::ReadText(WW8_CP nStartCp, WW8_CP nTextLen, ManTypes nType)
if (pDCS)
nDropLines = (*pDCS) >> 3;
else // There is no Drop Cap Specifier hence no dropcap
- pPreviousNode = 0;
+ pPreviousNode = nullptr;
if (const sal_uInt8 *pDistance = m_pPlcxMan->GetPapPLCF()->HasSprm(0x842F))
nDistance = SVBT16ToShort( pDistance );
else
nDistance = 0;
- const SwFormatCharFormat *pSwFormatCharFormat = 0;
+ const SwFormatCharFormat *pSwFormatCharFormat = nullptr;
if(m_pAktItemSet)
pSwFormatCharFormat = &(ItemGet<SwFormatCharFormat>(*m_pAktItemSet, RES_TXTATR_CHARFMT));
@@ -4080,7 +4080,7 @@ bool SwWW8ImplReader::ReadText(WW8_CP nStartCp, WW8_CP nTextLen, ManTypes nType)
}
delete m_pAktItemSet;
- m_pAktItemSet = 0;
+ m_pAktItemSet = nullptr;
m_bDropCap=false;
}
@@ -4133,7 +4133,7 @@ bool SwWW8ImplReader::ReadText(WW8_CP nStartCp, WW8_CP nTextLen, ManTypes nType)
CloseAttrEnds();
- delete m_pPlcxMan, m_pPlcxMan = 0;
+ delete m_pPlcxMan, m_pPlcxMan = nullptr;
return bJoined;
}
@@ -4142,55 +4142,55 @@ SwWW8ImplReader::SwWW8ImplReader(sal_uInt8 nVersionPara, SotStorage* pStorage,
: m_pDocShell(rD.GetDocShell())
, m_pStg(pStorage)
, m_pStrm(pSt)
- , m_pTableStream(0)
- , m_pDataStream(0)
+ , m_pTableStream(nullptr)
+ , m_pDataStream(nullptr)
, m_rDoc(rD)
- , m_pPaM(0)
- , m_pCtrlStck(0)
- , m_pRedlineStack(0)
- , m_pReffedStck(0)
- , m_pReffingStck(0)
- , m_pAnchorStck(0)
+ , m_pPaM(nullptr)
+ , m_pCtrlStck(nullptr)
+ , m_pRedlineStack(nullptr)
+ , m_pReffedStck(nullptr)
+ , m_pReffingStck(nullptr)
+ , m_pAnchorStck(nullptr)
, m_aSectionManager(*this)
, m_aExtraneousParas(rD)
, m_aInsertedTables(rD)
, m_aSectionNameGenerator(rD, OUString("WW"))
- , m_pSprmParser(NULL)
+ , m_pSprmParser(nullptr)
, m_aGrfNameGenerator(bNewDoc, OUString('G'))
, m_aParaStyleMapper(rD)
, m_aCharStyleMapper(rD)
- , m_pFormImpl(0)
- , m_pFlyFormatOfJustInsertedGraphic(0)
- , m_pFormatOfJustInsertedApo(0)
- , m_pPreviousNumPaM(0)
- , m_pPrevNumRule(0)
- , m_pPostProcessAttrsInfo(0)
- , m_pWwFib(0)
- , m_pFonts(0)
- , m_pWDop(0)
- , m_pLstManager(0)
- , m_pSBase(0)
- , m_pPlcxMan(0)
+ , m_pFormImpl(nullptr)
+ , m_pFlyFormatOfJustInsertedGraphic(nullptr)
+ , m_pFormatOfJustInsertedApo(nullptr)
+ , m_pPreviousNumPaM(nullptr)
+ , m_pPrevNumRule(nullptr)
+ , m_pPostProcessAttrsInfo(nullptr)
+ , m_pWwFib(nullptr)
+ , m_pFonts(nullptr)
+ , m_pWDop(nullptr)
+ , m_pLstManager(nullptr)
+ , m_pSBase(nullptr)
+ , m_pPlcxMan(nullptr)
, m_aTextNodesHavingFirstLineOfstSet()
, m_aTextNodesHavingLeftIndentSet()
- , m_pStyles(0)
- , m_pAktColl(0)
- , m_pAktItemSet(0)
- , m_pDfltTextFormatColl(0)
- , m_pStandardFormatColl(0)
- , m_pHdFt(0)
- , m_pWFlyPara(0)
- , m_pSFlyPara(0)
- , m_pTableDesc(0)
- , m_pNumOlst(0)
- , m_pNode_FLY_AT_PARA(0)
- , m_pDrawModel(0)
- , m_pDrawPg(0)
- , m_pDrawEditEngine(0)
- , m_pWWZOrder(0)
- , m_pNumFieldType(0)
- , m_pMSDffManager(0)
- , m_pAtnNames(0)
+ , m_pStyles(nullptr)
+ , m_pAktColl(nullptr)
+ , m_pAktItemSet(nullptr)
+ , m_pDfltTextFormatColl(nullptr)
+ , m_pStandardFormatColl(nullptr)
+ , m_pHdFt(nullptr)
+ , m_pWFlyPara(nullptr)
+ , m_pSFlyPara(nullptr)
+ , m_pTableDesc(nullptr)
+ , m_pNumOlst(nullptr)
+ , m_pNode_FLY_AT_PARA(nullptr)
+ , m_pDrawModel(nullptr)
+ , m_pDrawPg(nullptr)
+ , m_pDrawEditEngine(nullptr)
+ , m_pWWZOrder(nullptr)
+ , m_pNumFieldType(nullptr)
+ , m_pMSDffManager(nullptr)
+ , m_pAtnNames(nullptr)
, m_sBaseURL(rBaseURL)
, m_nIniFlags(0)
, m_nIniFlags1(0)
@@ -4265,7 +4265,7 @@ SwWW8ImplReader::SwWW8ImplReader(sal_uInt8 nVersionPara, SotStorage* pStorage,
, m_bLoadingTOXCache(false)
, m_nEmbeddedTOXLevel(0)
, m_bLoadingTOXHyperlink(false)
- , m_pPosAfterTOC(0)
+ , m_pPosAfterTOC(nullptr)
, m_bCareFirstParaEndInToc(false)
, m_bCareLastParaEndInToc(false)
, m_aTOXEndCps()
@@ -4308,7 +4308,7 @@ void wwSectionManager::SetSegmentToPageDesc(const wwSection &rSection,
{
Rectangle aRect(0, 0, 100, 100); // A dummy, we don't care about the size
SvxMSDffImportData aData(aRect);
- SdrObject* pObject = 0;
+ SdrObject* pObject = nullptr;
if (mrReader.m_pMSDffManager->GetShape(0x401, pObject, aData))
{
// Only handle shape if it is a background shape
@@ -4402,14 +4402,14 @@ SwFormatPageDesc wwSectionManager::SetSwFormatPageDesc(mySegIter &rIter,
{
rIter->mpPage = mrReader.m_rDoc.MakePageDesc(
SwViewShell::GetShellRes()->GetPageDescName(mnDesc, ShellResource::NORMAL_PAGE),
- 0, false);
+ nullptr, false);
}
OSL_ENSURE(rIter->mpPage, "no page!");
if (!rIter->mpPage)
return SwFormatPageDesc();
// Set page before hd/ft
- const wwSection *pPrevious = 0;
+ const wwSection *pPrevious = nullptr;
if (rIter != rStart)
pPrevious = &(*(rIter-1));
SetHdFt(*rIter, std::distance(rStart, rIter), pPrevious);
@@ -4532,7 +4532,7 @@ void wwSectionManager::InsertSegments()
GiveNodePageDesc(aIter->maStart, aDesc, mrReader.m_rDoc);
}
- SwTextNode* pTextNd = 0;
+ SwTextNode* pTextNd = nullptr;
if (bInsertSection)
{
// Start getting the bounds of this section
@@ -4549,7 +4549,7 @@ void wwSectionManager::InsertSegments()
const SwPosition* pPos = aSectPaM.GetPoint();
SwTextNode const*const pSttNd = pPos->nNode.GetNode().GetTextNode();
- const SwTableNode* pTableNd = pSttNd ? pSttNd->FindTableNode() : 0;
+ const SwTableNode* pTableNd = pSttNd ? pSttNd->FindTableNode() : nullptr;
if (pTableNd)
{
pTextNd =
@@ -4637,7 +4637,7 @@ void wwSectionManager::InsertSegments()
SwNodeIndex aIdx(*pTextNd);
SwPaM aTest(aIdx);
mrReader.m_rDoc.getIDocumentContentOperations().DelFullPara(aTest);
- pTextNd = 0;
+ pTextNd = nullptr;
}
}
}
@@ -5215,8 +5215,8 @@ sal_uLong SwWW8ImplReader::CoreLoad(WW8Glossary *pGloss)
// Initialize FlyFrame Formats
SwFlyFrameFormat* pFlyFormat = pOrder->pFly;
- SwFlyFrameFormat* pNextFlyFormat = 0;
- SwFlyFrameFormat* pPrevFlyFormat = 0;
+ SwFlyFrameFormat* pNextFlyFormat = nullptr;
+ SwFlyFrameFormat* pPrevFlyFormat = nullptr;
// Determine successor, if we can
SvxMSDffShapeTxBxSort::iterator tmpIter1 = it;
@@ -5277,8 +5277,8 @@ sal_uLong SwWW8ImplReader::CoreLoad(WW8Glossary *pGloss)
delete m_pSprmParser;
::EndProgress(m_pDocShell);
- m_pDataStream = 0;
- m_pTableStream = 0;
+ m_pDataStream = nullptr;
+ m_pTableStream = nullptr;
DeleteCtrlStk();
m_pRedlineStack->closeall(*m_pPaM->GetPoint());
@@ -5314,12 +5314,12 @@ sal_uLong SwWW8ImplReader::CoreLoad(WW8Glossary *pGloss)
SwFrameFormat* pFrameFormat = pHt->GetFlyCnt().GetFrameFormat();
vecFrameFormat.push_back(pFrameFormat);
const SwNodeIndex* pNdIdx = pFrameFormat->GetContent().GetContentIdx();
- const SwNodes* pNodesArray = (pNdIdx != NULL)
+ const SwNodes* pNodesArray = (pNdIdx != nullptr)
? &(pNdIdx->GetNodes())
- : NULL;
- const SwGrfNode *pGrf = (pNodesArray != NULL)
+ : nullptr;
+ const SwGrfNode *pGrf = (pNodesArray != nullptr)
? dynamic_cast<const SwGrfNode*>((*pNodesArray)[pNdIdx->GetIndex() + 1])
- : NULL;
+ : nullptr;
vecBulletGrf.push_back(pGrf);
}
}
@@ -5335,7 +5335,7 @@ sal_uLong SwWW8ImplReader::CoreLoad(WW8Glossary *pGloss)
const sal_uInt16 nGrfBulletCP = aNumFormat.GetGrfBulletCP();
if ( nType == SVX_NUM_BITMAP
&& vecBulletGrf.size() > nGrfBulletCP
- && vecBulletGrf[nGrfBulletCP] != NULL )
+ && vecBulletGrf[nGrfBulletCP] != nullptr )
{
Graphic aGraphic = vecBulletGrf[nGrfBulletCP]->GetGrf();
SvxBrushItem aBrush(aGraphic, GPOS_AREA, SID_ATTR_BRUSH);
@@ -5627,9 +5627,9 @@ sal_uLong SwWW8ImplReader::LoadThroughDecryption(WW8Glossary *pGloss)
if (!nErrRet)
nErrRet = SetSubStreams(xTableStream, xDataStream);
- utl::TempFile *pTempMain = 0;
- utl::TempFile *pTempTable = 0;
- utl::TempFile *pTempData = 0;
+ utl::TempFile *pTempMain = nullptr;
+ utl::TempFile *pTempTable = nullptr;
+ utl::TempFile *pTempData = nullptr;
SvFileStream aDecryptMain;
SvFileStream aDecryptTable;
SvFileStream aDecryptData;
@@ -5817,7 +5817,7 @@ void SwWW8ImplReader::SetOutlineStyles()
// - Populate temporary list of WW8 Built-In Heading Styles for further
// iteration
std::vector<SwWW8StyInf*> aWW8BuiltInHeadingStyles;
- const SwNumRule* pChosenWW8ListStyle = NULL;
+ const SwNumRule* pChosenWW8ListStyle = nullptr;
{
std::map<const SwNumRule*, int> aWW8ListStyleCounts;
for (size_t nI = 0; nI < m_vColl.size(); ++nI)
@@ -5832,7 +5832,7 @@ void SwWW8ImplReader::SetOutlineStyles()
aWW8BuiltInHeadingStyles.push_back(&rSI);
const SwNumRule* pWW8ListStyle = rSI.GetOutlineNumrule();
- if (pWW8ListStyle != NULL)
+ if (pWW8ListStyle != nullptr)
{
std::map<const SwNumRule*, int>::iterator aCountIter
= aWW8ListStyleCounts.find(pWW8ListStyle);
@@ -5893,7 +5893,7 @@ void SwWW8ImplReader::SetOutlineStyles()
continue;
}
- if (pChosenWW8ListStyle != NULL && pStyleInf->mnWW8OutlineLevel
+ if (pChosenWW8ListStyle != nullptr && pStyleInf->mnWW8OutlineLevel
== pStyleInf->nListLevel)
{
const SwNumFormat& rRule
@@ -5917,7 +5917,7 @@ void SwWW8ImplReader::SetOutlineStyles()
pTextFormatColl->DeleteAssignmentToListLevelOfOutlineStyle(false);
// Apply existing WW8 list style a normal list style at the
// Paragraph Style
- if (pStyleInf->GetOutlineNumrule() != NULL)
+ if (pStyleInf->GetOutlineNumrule() != nullptr)
{
pTextFormatColl->SetFormatAttr(
SwNumRuleItem(pStyleInf->GetOutlineNumrule()->GetName()));
@@ -5972,7 +5972,7 @@ const OUString* SwWW8ImplReader::GetAnnotationAuthor(sal_uInt16 nIdx)
rStrm.Seek( nOldPos );
}
- const OUString *pRet = 0;
+ const OUString *pRet = nullptr;
if (m_pAtnNames && nIdx < m_pAtnNames->size())
pRet = &((*m_pAtnNames)[nIdx]);
return pRet;
@@ -6169,8 +6169,8 @@ sal_uLong WW8Reader::Read(SwDoc &rDoc, const OUString& rBaseURL, SwPaM &rPaM, co
// Remove Frame and offsets from Frame Template
Reader::ResetFrameFormats( rDoc );
- rPaM.GetBound().nContent.Assign(0, 0);
- rPaM.GetBound(false).nContent.Assign(0, 0);
+ rPaM.GetBound().nContent.Assign(nullptr, 0);
+ rPaM.GetBound(false).nContent.Assign(nullptr, 0);
}
try