diff options
Diffstat (limited to 'writerfilter')
-rw-r--r-- | writerfilter/source/rtftok/rtfdocumentimpl.cxx | 17 | ||||
-rw-r--r-- | writerfilter/source/rtftok/rtfdocumentimpl.hxx | 3 |
2 files changed, 19 insertions, 1 deletions
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx index b0835e1b0573..d73c5bd600fe 100644 --- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx +++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx @@ -140,6 +140,15 @@ static void lcl_putBorderProperty(std::stack<RTFParserState>& aStates, Id nId, R rAttributes.set(nId, pValue); } } + else if (aStates.top().nBorderState == BORDER_CHARACTER) + { + RTFValue::Pointer_t pPointer = aStates.top().aCharacterSprms.find(NS_ooxml::LN_EG_RPrBase_bdr); + if (pPointer.get()) + { + RTFSprms& rAttributes = pPointer->getAttributes(); + rAttributes.set(nId, pValue); + } + } // Attributes of the last border type else if (aStates.top().nBorderState == BORDER_PARAGRAPH) pAttributes = &lcl_getLastAttributes(aStates.top().aParagraphSprms, NS_ooxml::LN_CT_PrBase_pBdr); @@ -2414,6 +2423,14 @@ int RTFDocumentImpl::dispatchFlag(RTFKeyword nKeyword) m_aStates.top().nBorderState = BORDER_PARAGRAPH; } break; + case RTF_CHBRDR: + { + RTFSprms aAttributes; + RTFValue::Pointer_t pValue(new RTFValue(aAttributes)); + m_aStates.top().aCharacterSprms.set(NS_ooxml::LN_EG_RPrBase_bdr, pValue); + m_aStates.top().nBorderState = BORDER_CHARACTER; + } + break; case RTF_CLVMGF: { RTFValue::Pointer_t pValue(new RTFValue(NS_ooxml::LN_Value_ST_Merge_restart)); diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.hxx b/writerfilter/source/rtftok/rtfdocumentimpl.hxx index 276ca933a6c5..a0b1076f3a03 100644 --- a/writerfilter/source/rtftok/rtfdocumentimpl.hxx +++ b/writerfilter/source/rtftok/rtfdocumentimpl.hxx @@ -36,7 +36,8 @@ namespace writerfilter { BORDER_PARAGRAPH, BORDER_PARAGRAPH_BOX, BORDER_CELL, - BORDER_PAGE + BORDER_PAGE, + BORDER_CHARACTER }; /// Minimalistic buffer of elements for nested cells. |