summaryrefslogtreecommitdiff
path: root/sw/source/filter/ww8/ww8par.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-03-15 17:26:36 +0000
committerMichael Stahl <Michael.Stahl@cib.de>2019-08-01 15:59:18 +0200
commit64fff86bf3b34bdc9e775a64e60b40d3bb01b419 (patch)
tree343aa46f66a3daebae540da5ee48e7485d33b46a /sw/source/filter/ww8/ww8par.cxx
parent50f9448eeb2b4e4d442b0a5e1413c1898abf648b (diff)
ofz#6827 Bad-cast
Change-Id: I856d781f122c21c02a0a8cd01369d49f50b8a555 Reviewed-on: https://gerrit.libreoffice.org/51365 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com> (cherry picked from commit 19f0b25acc2a23b790301755a9fee2629eb667b0)
Diffstat (limited to 'sw/source/filter/ww8/ww8par.cxx')
-rw-r--r--sw/source/filter/ww8/ww8par.cxx17
1 files changed, 10 insertions, 7 deletions
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index e678a3f12a31..f3ab92e7a9a9 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -3973,7 +3973,7 @@ 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 = nullptr;
+ m_pPreviousNode = nullptr;
sal_uInt8 nDropLines = 0;
SwCharFormat* pNewSwCharFormat = nullptr;
const SwCharFormat* pFormat = nullptr;
@@ -4002,7 +4002,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)
@@ -4026,10 +4026,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
{
@@ -4056,12 +4056,12 @@ 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 = 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();
const sal_uInt8 *pDCS;
@@ -4073,7 +4073,7 @@ 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 = nullptr;
+ m_pPreviousNode = nullptr;
if (const sal_uInt8 *pDistance = m_pPlcxMan->GetPapPLCF()->HasSprm(0x842F))
nDistance = SVBT16ToShort( pDistance );
@@ -4142,6 +4142,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());
@@ -4284,6 +4286,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()