summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorTroy Rollo <libreoffice@troy.rollo.name>2011-07-23 00:18:43 +1000
committerJan Holesovsky <kendy@dhcp28.suse.cz>2011-08-06 01:43:29 +0200
commitaafce5802165dc55814f98102e1a713f6054c7f3 (patch)
tree319410259359d31313228c349605473fce9ec829 /sw
parentdaa4a9483c41be6077ba0840e526474641ffc5c3 (diff)
Fix field values in export to docx
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.
Diffstat (limited to 'sw')
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index 45aab31dfb41..c02b5ed16c4c 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -807,8 +807,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 );
}