Kaydet (Commit) 44d4d9d4 authored tarafından Caolán McNamara's avatar Caolán McNamara

fftester: use of deleted RTFParserState

but we only use the RTFParserState to use its m_pDocumentImpl and
the m_pDocumentImpl is never changed for the RTFParserState lifetime,
so take the m_pDocumentImpl at ctor time instead and use that
directly later

Change-Id: I15152e3f6d9008553b4a384a5e5da21373904cc9
Reviewed-on: https://gerrit.libreoffice.org/28802Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 0832db13
......@@ -3294,7 +3294,7 @@ RTFDrawingObject::RTFDrawingObject()
}
RTFFrame::RTFFrame(RTFParserState* pParserState)
: m_pParserState(pParserState),
: m_pDocumentImpl(pParserState->m_pDocumentImpl),
m_nX(0),
m_nY(0),
m_nW(0),
......@@ -3312,10 +3312,10 @@ RTFFrame::RTFFrame(RTFParserState* pParserState)
void RTFFrame::setSprm(Id nId, Id nValue)
{
if (m_pParserState->m_pDocumentImpl->getFirstRun() && !m_pParserState->m_pDocumentImpl->isStyleSheetImport())
if (m_pDocumentImpl->getFirstRun() && !m_pDocumentImpl->isStyleSheetImport())
{
m_pParserState->m_pDocumentImpl->checkFirstRun();
m_pParserState->m_pDocumentImpl->setNeedPar(false);
m_pDocumentImpl->checkFirstRun();
m_pDocumentImpl->setNeedPar(false);
}
switch (nId)
{
......
......@@ -182,12 +182,13 @@ public:
};
class RTFParserState;
class RTFDocumentImpl;
/// Stores the properties of a frame
class RTFFrame
{
private:
RTFParserState* m_pParserState;
RTFDocumentImpl* m_pDocumentImpl;
sal_Int32 m_nX, m_nY, m_nW, m_nH;
sal_Int32 m_nHoriPadding, m_nVertPadding;
sal_Int32 m_nHoriAlign, m_nHoriAnchor, m_nVertAlign, m_nVertAnchor;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment