[Libreoffice] [PATCH] Fix field values in export to docx
Troy Rollo
libreoffice at troy.rollo.name
Fri Jul 22 07:18:43 PDT 2011
Prior to this patch, fields were being exported to docx file with the
field value being the name of the field. This patch changes it to
export the field value as the field value.
---
sw/source/filter/ww8/docxattributeoutput.cxx | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index 6086213..390bd60 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -806,8 +806,10 @@ void DocxAttributeOutput::EndField_Impl( FieldInfos& rInfos )
// Write the Field latest value
m_pSerializer->startElementNS( XML_w, XML_r, FSEND );
- // Find another way for hyperlinks
- RunText( rInfos.pField->GetFieldName() );
+ String sExpand( rInfos.pField->ExpandField( true ) );
+ sExpand.SearchAndReplaceAll( 0x0A, 0x0B );
+ RunText( sExpand );
+
m_pSerializer->endElementNS( XML_w, XML_r );
}
--
1.7.2.5
More information about the LibreOffice
mailing list