writerfilter/qa/cppunittests/rtftok/data/fail/tablemanager-6.rtf |binary writerfilter/qa/cppunittests/rtftok/data/pass/parser-state-1.rtf |binary writerfilter/source/dmapper/DomainMapper_Impl.cxx | 2 +- writerfilter/source/rtftok/rtfdocumentimpl.cxx | 8 ++++---- writerfilter/source/rtftok/rtfdocumentimpl.hxx | 3 ++- 5 files changed, 7 insertions(+), 6 deletions(-)
New commits: commit 951c8ee5a5fdf1d57570dd4c1134a88ce7c22e22 Author: Caolán McNamara <[email protected]> Date: Sat Sep 10 13:46:47 2016 +0100 fftester: no table manager Change-Id: I033454670d1ee662bc80bc07578690155d97ce28 Reviewed-on: https://gerrit.libreoffice.org/28807 Tested-by: Jenkins <[email protected]> Reviewed-by: Miklos Vajna <[email protected]> diff --git a/writerfilter/qa/cppunittests/rtftok/data/fail/tablemanager-6.rtf b/writerfilter/qa/cppunittests/rtftok/data/fail/tablemanager-6.rtf new file mode 100644 index 0000000..67a0ea1 Binary files /dev/null and b/writerfilter/qa/cppunittests/rtftok/data/fail/tablemanager-6.rtf differ diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx index e27e17e..ca9980c 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -1221,7 +1221,7 @@ void DomainMapper_Impl::appendTextPortion( const OUString& rString, PropertyMapP if( pPropertyMap == m_pTopContext && !deferredCharacterProperties.empty() && (GetTopContextType() == CONTEXT_CHARACTER) ) processDeferredCharacterProperties(); uno::Reference< text::XTextAppend > xTextAppend = m_aTextAppendStack.top().xTextAppend; - if(xTextAppend.is() && ! getTableManager( ).isIgnore()) + if (xTextAppend.is() && hasTableManager() && !getTableManager().isIgnore()) { try { commit 4ed7ca7bfd5aab9846a02d3397771c0724344993 Author: Caolán McNamara <[email protected]> Date: Sat Sep 10 11:47:16 2016 +0100 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 Reviewed-on: https://gerrit.libreoffice.org/28802 Reviewed-by: Caolán McNamara <[email protected]> Tested-by: Caolán McNamara <[email protected]> (cherry picked from commit 44d4d9d4e998de9b4dc939af4fa40e51e6300951) Change-Id: I15152e3f6d9008553b4a384a5e5da21373904cc9 Reviewed-on: https://gerrit.libreoffice.org/28804 Tested-by: Jenkins <[email protected]> Reviewed-by: Miklos Vajna <[email protected]> diff --git a/writerfilter/qa/cppunittests/rtftok/data/pass/parser-state-1.rtf b/writerfilter/qa/cppunittests/rtftok/data/pass/parser-state-1.rtf new file mode 100644 index 0000000..3fe4b28 Binary files /dev/null and b/writerfilter/qa/cppunittests/rtftok/data/pass/parser-state-1.rtf differ diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx index 48a3707..a48577f 100644 --- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx +++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx @@ -6515,7 +6515,7 @@ RTFDrawingObject::RTFDrawingObject() } RTFFrame::RTFFrame(RTFParserState* pParserState) - : m_pParserState(pParserState), + : m_pDocumentImpl(pParserState->m_pDocumentImpl), nX(0), nY(0), nW(0), @@ -6533,10 +6533,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) { diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.hxx b/writerfilter/source/rtftok/rtfdocumentimpl.hxx index 500b7bb..2ec7f05 100644 --- a/writerfilter/source/rtftok/rtfdocumentimpl.hxx +++ b/writerfilter/source/rtftok/rtfdocumentimpl.hxx @@ -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 nX, nY, nW, nH; sal_Int32 nHoriPadding, nVertPadding; sal_Int32 nHoriAlign, nHoriAnchor, nVertAlign, nVertAnchor;
_______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
