tdf#148380 docx export: use content of unknown fields, not name

This used to be GetCntnt, but then out of the blue in a huge
squashed commit, it changed to GetFieldName. So I assume that
was just debugging code that got accidentally committed.
It just doesn't make any sense to export the field name
as the plain text content instead of the field's value.

commit ed40f62e64564d2b22c9285cfdc6778aeac8fd68
Author: Michael Meeks on Mon Mar 14 16:51:14 2011 +0000
    Merge commit 'ooo/DEV300_m101' into integration/dev300_m101

NOTE: DOC also does a .replace(0x0A, 0x0B),
//replace LF 0x0A with VT 0x0B
//#i19604# convert hard line breaks inside fields to word equivalent

After taking care of SAVEDATE, PRINTDATE, I tested this with
assert(rInfos.pField->GetFieldName() == "Sender");
and found no other examples.

Change-Id: Ie24b8c176fe6df4015be221c87aa249fe9b8ce92
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132666
Tested-by: Jenkins
Reviewed-by: Justin Luth <jluth@mail.com>
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx
index c4bcd2b..2cf7046 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx
@@ -319,9 +319,12 @@ CPPUNIT_TEST_FIXTURE(Test, testOldComplexMergeTableInTable)

CPPUNIT_TEST_FIXTURE(Test, testHyperlinkContainingPlaceholderField)
{
    loadAndSave("hyperlink-field.odt");
    loadAndReload("hyperlink-field.odt");
    CPPUNIT_ASSERT_EQUAL(1, getShapes());
    parseExport("word/document.xml");

    // tdf#148380 output unknown field's contents("") instead of field name("Sender" aka e-mail)
    CPPUNIT_ASSERT_EQUAL(sal_Int32(-1), getParagraph(1)->getString().indexOf("Sender"));
}

CPPUNIT_TEST_FIXTURE(Test, testTablePreferredWidth)
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index 6daca466..88df3b9 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -2403,7 +2403,7 @@ void DocxAttributeOutput::StartField_Impl( const SwTextNode* pNode, sal_Int32 nP
    if ( rInfos.pField && rInfos.eType == ww::eUNKNOWN )
    {
        // Expand unsupported fields
        RunText( rInfos.pField->GetFieldName() );
        RunText(rInfos.pField->ExpandField(/*bCached=*/true, nullptr));
        return;
    }
    else if ( rInfos.eType == ww::eFORMDATE )