Kaydet (Commit) 7e482377 authored tarafından Nikhil Walvekar's avatar Nikhil Walvekar Kaydeden (comit) Adam CloudOn

FILESAVE: DOCX Preserve Font information for Para marker

Change-Id: Ic8cb9fec8a62f14e47899056beaededd791b590d
Reviewed-on: https://gerrit.libreoffice.org/7438Tested-by: 's avatarAdam CloudOn <rattles2013@gmail.com>
Reviewed-by: 's avatarAdam CloudOn <rattles2013@gmail.com>
üst e3e6ad0e
...@@ -519,6 +519,18 @@ void DocxAttributeOutput::EndParagraphProperties( const boost::shared_ptr<SfxIte ...@@ -519,6 +519,18 @@ void DocxAttributeOutput::EndParagraphProperties( const boost::shared_ptr<SfxIte
if(pParagraphMarkerProperties) if(pParagraphMarkerProperties)
{ {
// The 'm_pFontsAttrList', 'm_pEastAsianLayoutAttrList', 'm_pCharLangAttrList' are used to hold information
// that should be collected by different properties in the core, and are all flushed together
// to the DOCX when the function 'WriteCollectedRunProperties' gets called.
// So we need to store the current status of these lists, so that we can revert back to them when
// we are done exporting the redline attributes.
::sax_fastparser::FastAttributeList *pFontsAttrList_Original = m_pFontsAttrList;
::sax_fastparser::FastAttributeList *pEastAsianLayoutAttrList_Original = m_pEastAsianLayoutAttrList;
::sax_fastparser::FastAttributeList *pCharLangAttrList_Original = m_pCharLangAttrList;
m_pFontsAttrList = NULL;
m_pEastAsianLayoutAttrList = NULL;
m_pCharLangAttrList = NULL;
SfxWhichIter aIter( *pParagraphMarkerProperties ); SfxWhichIter aIter( *pParagraphMarkerProperties );
sal_uInt16 nWhichId = aIter.FirstWhich(); sal_uInt16 nWhichId = aIter.FirstWhich();
const SfxPoolItem* pItem = 0; const SfxPoolItem* pItem = 0;
...@@ -532,18 +544,6 @@ void DocxAttributeOutput::EndParagraphProperties( const boost::shared_ptr<SfxIte ...@@ -532,18 +544,6 @@ void DocxAttributeOutput::EndParagraphProperties( const boost::shared_ptr<SfxIte
nWhichId = aIter.NextWhich(); nWhichId = aIter.NextWhich();
} }
// The 'm_pFontsAttrList', 'm_pEastAsianLayoutAttrList', 'm_pCharLangAttrList' are used to hold information
// that should be collected by different properties in the core, and are all flushed together
// to the DOCX when the function 'WriteCollectedRunProperties' gets called.
// So we need to store the current status of these lists, so that we can revert back to them when
// we are done exporting the redline attributes.
::sax_fastparser::FastAttributeList *pFontsAttrList_Original = m_pFontsAttrList;
::sax_fastparser::FastAttributeList *pEastAsianLayoutAttrList_Original = m_pEastAsianLayoutAttrList;
::sax_fastparser::FastAttributeList *pCharLangAttrList_Original = m_pCharLangAttrList;
m_pFontsAttrList = NULL;
m_pEastAsianLayoutAttrList = NULL;
m_pCharLangAttrList = NULL;
// Write the collected run properties that are stored in 'm_pFontsAttrList', 'm_pEastAsianLayoutAttrList', 'm_pCharLangAttrList' // Write the collected run properties that are stored in 'm_pFontsAttrList', 'm_pEastAsianLayoutAttrList', 'm_pCharLangAttrList'
WriteCollectedRunProperties(); WriteCollectedRunProperties();
......
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