summaryrefslogtreecommitdiff
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
commit607f7c2dd2549e979087f026da03a3310292f374 (patch)
tree01b803ad17142e62dff22cbf9f68f271c33fd50a
parent877533dbae1ea84f32760a3d56e698c27ed8d0f4 (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.
-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 b978394fb4..a1045c4cb7 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 );
}