Kaydet (Commit) 9f8fb9fc authored tarafından Jan Holesovsky's avatar Jan Holesovsky

DOCX styles: Output real rPrDefault's.

Not complete - to be checked which of the properties are we supposed to
output; so far we support only w:rFont and w:lang.

Change-Id: I142dd075735ba2c5cb1022768bfecf793148078f
üst ad7b757a
......@@ -2358,13 +2358,27 @@ void DocxAttributeOutput::StartStyles()
void DocxAttributeOutput::DocDefaults( )
{
// To-Do : fill the '<w:docDefaults>' node with actual data
// Write the '<w:docDefaults>' section here
m_pSerializer->startElementNS( XML_w, XML_docDefaults, FSEND );
m_pSerializer->singleElementNS( XML_w, XML_rPrDefault, FSEND );
m_pSerializer->singleElementNS( XML_w, XML_pPrDefault, FSEND );
m_pSerializer->endElementNS( XML_w, XML_docDefaults );
m_pSerializer->startElementNS(XML_w, XML_docDefaults, FSEND);
// Output the default run properties
m_pSerializer->startElementNS(XML_w, XML_rPrDefault, FSEND);
StartRunProperties();
// TODO find out which run properties do we want to write
const RES_CHRATR aDefaultRunProperties[] = {
RES_CHRATR_FONT, RES_CHRATR_CJK_FONT, RES_CHRATR_CTL_FONT,
RES_CHRATR_LANGUAGE, RES_CHRATR_CJK_LANGUAGE, RES_CHRATR_CTL_LANGUAGE,
};
for (size_t i = 0; i < SAL_N_ELEMENTS(aDefaultRunProperties); ++i)
OutputItem(m_rExport.pDoc->GetDefault(aDefaultRunProperties[i]));
EndRunProperties(NULL);
m_pSerializer->endElementNS(XML_w, XML_rPrDefault);
// TODO should we output some paragraph properties too?
m_pSerializer->singleElementNS(XML_w, XML_pPrDefault, FSEND);
m_pSerializer->endElementNS(XML_w, XML_docDefaults);
}
void DocxAttributeOutput::EndStyles( sal_uInt16 /*nNumberOfStyles*/ )
......
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