diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-03-15 17:26:36 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-03-15 21:21:21 +0100 |
commit | f4c451f2b3cbd360b7141626525ae3982d73e5a4 (patch) | |
tree | fe6c2751b4a6f750ec09fe1ed19c61556e2de734 /sw/source/filter/ww8/ww8par.cxx | |
parent | ecc29989bd58cc54ebeb8b9202399a4e6bd7e4f5 (diff) |
ofz#6827 Bad-cast
Change-Id: I856d781f122c21c02a0a8cd01369d49f50b8a555
Reviewed-on: https://gerrit.libreoffice.org/51363
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw/source/filter/ww8/ww8par.cxx')
-rw-r--r-- | sw/source/filter/ww8/ww8par.cxx | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index 55d2992bb9e8..d0efff84cbcb 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -3955,7 +3955,7 @@ bool SwWW8ImplReader::ReadText(WW8_CP nStartCp, WW8_CP nTextLen, ManTypes nType) long nCpOfs = m_xPlcxMan->GetCpOfs(); // Offset for Header/Footer, Footnote WW8_CP nNext = m_xPlcxMan->Where(); - SwTextNode* pPreviousNode = nullptr; + m_pPreviousNode = nullptr; sal_uInt8 nDropLines = 0; SwCharFormat* pNewSwCharFormat = nullptr; const SwCharFormat* pFormat = nullptr; @@ -3987,7 +3987,7 @@ bool SwWW8ImplReader::ReadText(WW8_CP nStartCp, WW8_CP nTextLen, ManTypes nType) // If the previous paragraph was a dropcap then do not // create a new txtnode and join the two paragraphs together - if (bStartLine && !pPreviousNode) // Line end + if (bStartLine && !m_pPreviousNode) // Line end { bool bSplit = true; if (m_bCareFirstParaEndInToc) @@ -4011,10 +4011,10 @@ bool SwWW8ImplReader::ReadText(WW8_CP nStartCp, WW8_CP nTextLen, ManTypes nType) } } - if (pPreviousNode && bStartLine) + if (m_pPreviousNode && bStartLine) { SwTextNode* pEndNd = m_pPaM->GetNode().GetTextNode(); - const sal_Int32 nDropCapLen = pPreviousNode->GetText().getLength(); + const sal_Int32 nDropCapLen = m_pPreviousNode->GetText().getLength(); // Need to reset the font size and text position for the dropcap { @@ -4041,12 +4041,12 @@ bool SwWW8ImplReader::ReadText(WW8_CP nStartCp, WW8_CP nTextLen, ManTypes nType) SwPosition aStart(*pEndNd); m_xCtrlStck->NewAttr(aStart, aDrop); m_xCtrlStck->SetAttr(*m_pPaM->GetPoint(), RES_PARATR_DROP); - pPreviousNode = nullptr; + m_pPreviousNode = nullptr; } else if (m_bDropCap) { // If we have found a dropcap store the textnode - pPreviousNode = m_pPaM->GetNode().GetTextNode(); + m_pPreviousNode = m_pPaM->GetNode().GetTextNode(); SprmResult aDCS; if (m_bVer67) @@ -4057,7 +4057,7 @@ bool SwWW8ImplReader::ReadText(WW8_CP nStartCp, WW8_CP nTextLen, ManTypes nType) if (aDCS.pSprm && aDCS.nRemainingData >= 1) nDropLines = (*aDCS.pSprm) >> 3; else // There is no Drop Cap Specifier hence no dropcap - pPreviousNode = nullptr; + m_pPreviousNode = nullptr; SprmResult aDistance = m_xPlcxMan->GetPapPLCF()->HasSprm(0x842F); if (aDistance.pSprm && aDistance.nRemainingData >= 2) @@ -4129,6 +4129,8 @@ bool SwWW8ImplReader::ReadText(WW8_CP nStartCp, WW8_CP nTextLen, ManTypes nType) } } + m_pPreviousNode = nullptr; + if (m_pPaM->GetPoint()->nContent.GetIndex()) AppendTextNode(*m_pPaM->GetPoint()); @@ -4244,6 +4246,7 @@ SwWW8ImplReader::SwWW8ImplReader(sal_uInt8 nVersionPara, SotStorage* pStorage, , m_nEmbeddedTOXLevel(0) , m_bLoadingTOXHyperlink(false) , m_pPosAfterTOC(nullptr) + , m_pPreviousNode(nullptr) , m_bCareFirstParaEndInToc(false) , m_bCareLastParaEndInToc(false) , m_aTOXEndCps() |