writerfilter/source/rtftok/rtfdocumentimpl.cxx |   16 +++++++++-------
 writerfilter/source/rtftok/rtfdocumentimpl.hxx |    5 +++--
 2 files changed, 12 insertions(+), 9 deletions(-)

New commits:
commit 3f736b998d6606f5b6066bca528c15d5f40242b5
Author: Noel Grandin <n...@peralex.com>
Date:   Tue Sep 20 13:42:36 2016 +0200

    fix build
    
    by reverting part of commit b18e1bc61ccba9d0c74274e2fe45b2b422c601cf
    "loplugin:unusedfields"
    
    Change-Id: I69274b54f65e22ec15a053b54af84635d245f51b

diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx 
b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index 6dd8a78..92b9b96 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -225,7 +225,7 @@ 
RTFDocumentImpl::RTFDocumentImpl(uno::Reference<uno::XComponentContext> const& x
       m_xFrame(xFrame),
       m_xStatusIndicator(xStatusIndicator),
       m_pMapperStream(nullptr),
-      m_aDefaultState(),
+      m_aDefaultState(this),
       m_bSkipUnknown(false),
       m_aFontIndexes(),
       m_aColorTable(),
@@ -3181,8 +3181,9 @@ void RTFDocumentImpl::checkUnicode(bool bUnicode, bool 
bHex)
     }
 }
 
-RTFParserState::RTFParserState()
-    : nInternalState(RTFInternalState::NORMAL),
+RTFParserState::RTFParserState(RTFDocumentImpl* pDocumentImpl)
+    : m_pDocumentImpl(pDocumentImpl),
+      nInternalState(RTFInternalState::NORMAL),
       eDestination(Destination::NORMAL),
       eFieldStatus(RTFFieldStatus::NONE),
       nBorderState(RTFBorderState::NONE),
@@ -3211,7 +3212,7 @@ RTFParserState::RTFParserState()
       aPicture(),
       aShape(),
       aDrawingObject(),
-      aFrame(),
+      aFrame(this),
       eRunType(RunType::LOCH),
       isRightToLeft(false),
       nYear(0),
@@ -3236,7 +3237,7 @@ RTFParserState::RTFParserState()
 
 void RTFDocumentImpl::resetFrame()
 {
-    m_aStates.top().aFrame = RTFFrame();
+    m_aStates.top().aFrame = RTFFrame(&m_aStates.top());
 }
 
 RTFColorTableEntry::RTFColorTableEntry()
@@ -3292,8 +3293,9 @@ RTFDrawingObject::RTFDrawingObject()
 {
 }
 
-RTFFrame::RTFFrame()
-    : m_nX(0),
+RTFFrame::RTFFrame(RTFParserState* pParserState)
+    : m_pDocumentImpl(pParserState->m_pDocumentImpl),
+      m_nX(0),
       m_nY(0),
       m_nW(0),
       m_nH(0),
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.hxx 
b/writerfilter/source/rtftok/rtfdocumentimpl.hxx
index 10b47ba..d1b5ca1 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.hxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.hxx
@@ -195,7 +195,7 @@ private:
     Id m_nHRule;
     boost::optional<Id> m_oWrap;
 public:
-    RTFFrame();
+    RTFFrame(RTFParserState* pParserState);
     sal_Int16 m_nAnchorType;
 
     /// Convert the stored properties to Sprms
@@ -213,8 +213,9 @@ class RTFDocumentImpl;
 class RTFParserState
 {
 public:
-    RTFParserState();
+    RTFParserState(RTFDocumentImpl* pDocumentImpl);
 
+    RTFDocumentImpl* m_pDocumentImpl;
     RTFInternalState nInternalState;
     Destination eDestination;
     RTFFieldStatus eFieldStatus;
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to