diff options
author | Miklos Vajna <vmiklos@suse.cz> | 2013-04-03 17:04:32 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@suse.cz> | 2013-04-03 17:37:40 +0200 |
commit | 7a7d77f97b61ae7f602ed403ecfbbcdb03a06c00 (patch) | |
tree | 56396ca0a96ac2a62dae29f02decb0d370984aa2 /writerfilter | |
parent | fix fdo#40496: don't reset RES_FRAMEDIR attribute. (diff) | |
download | core-7a7d77f97b61ae7f602ed403ecfbbcdb03a06c00.tar.gz core-7a7d77f97b61ae7f602ed403ecfbbcdb03a06c00.zip |
fdo#51916 don't try to support nested tables having table styles for now
Change-Id: I4350ce0b791b42ce3c21a61e37d61e3b2063cb6a
Diffstat (limited to 'writerfilter')
-rw-r--r-- | writerfilter/source/rtftok/rtfdocumentimpl.cxx | 12 | ||||
-rw-r--r-- | writerfilter/source/rtftok/rtfdocumentimpl.hxx | 3 |
2 files changed, 13 insertions, 2 deletions
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx index 0afe427dcc0a..0714b1579a68 100644 --- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx +++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx @@ -1316,7 +1316,11 @@ int RTFDocumentImpl::dispatchDestination(RTFKeyword nKeyword) m_aStates.top().nDestinationState = DESTINATION_SKIP; break; case RTF_NESTTABLEPROPS: - m_aStates.top().nDestinationState = DESTINATION_NESTEDTABLEPROPERTIES; + // Don't try to support nested tables having table styles for now. + if (!m_aStates.top().bHasTableStyle) + m_aStates.top().nDestinationState = DESTINATION_NESTEDTABLEPROPERTIES; + else + m_aStates.top().nDestinationState = DESTINATION_SKIP; break; case RTF_HEADER: case RTF_FOOTER: @@ -3558,6 +3562,9 @@ int RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam) m_aStates.top().aCharacterAttributes.set(NS_rtf::LN_WR, RTFValue::Pointer_t(new RTFValue(3))); } break; + case RTF_TS: + m_aStates.top().bHasTableStyle = true; + break; default: { SAL_INFO("writerfilter", "TODO handle value '" << lcl_RtfToString(nKeyword) << "'"); @@ -4686,7 +4693,8 @@ RTFParserState::RTFParserState(RTFDocumentImpl *pDocumentImpl) nHour(0), nMinute(0), nCurrentStyleIndex(-1), - pCurrentBuffer(0) + pCurrentBuffer(0), + bHasTableStyle(false) { } diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.hxx b/writerfilter/source/rtftok/rtfdocumentimpl.hxx index b7f367b89b48..f8e016e8036c 100644 --- a/writerfilter/source/rtftok/rtfdocumentimpl.hxx +++ b/writerfilter/source/rtftok/rtfdocumentimpl.hxx @@ -411,6 +411,9 @@ namespace writerfilter { /// Points to the active buffer, if there is one. RTFBuffer_t* pCurrentBuffer; + + /// If a table style was requested to be used. + bool bHasTableStyle; }; class RTFTokenizer; |