tdf#132726 tdf#134948 doc/rtf export: don't PostponeWritingText

Since .doc and rtf don't postpone flys, they shouldn't also be
postponing the text.

Partially revert my LO 5.3 commits b39feae4f12b07a0fdb2c8c2a48d5aae613cd7c9/
3ade281c1da91b7646a56227cffba8eb8818ea30
which only avoided postponing within tables for the .doc format,
since this patch eliminates it completely for .doc and .rtf

I think the original Synerzip LO 4.4 patch
commit 80fd9fb7209cfd5c0622ee99d59e42e6db32f021
was only intended for DOCX formats.

I am concerned about doing this since the implications are unclear,
but I take comfort in seeing that many synerzip commits just
need to be reverted, and that a number of .doc bugs are
solved by doing this. The fact that few bug reports have
been made since 4.4 also suggests this isn't a hugely
active area. No intention to backport, and still lots of testing
time available for LO 7.1.

Change-Id: I9284d3cc516c480e8bb0848c17797988ffcdcd2c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100175
Tested-by: Jenkins
Reviewed-by: Justin Luth <justin_luth@sil.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
diff --git a/sw/qa/extras/ww8export/data/tdf132726.odt b/sw/qa/extras/ww8export/data/tdf132726.odt
new file mode 100644
index 0000000..c8106c2
--- /dev/null
+++ b/sw/qa/extras/ww8export/data/tdf132726.odt
Binary files differ
diff --git a/sw/qa/extras/ww8export/data/tdf134948.odt b/sw/qa/extras/ww8export/data/tdf134948.odt
new file mode 100644
index 0000000..a6227fb
--- /dev/null
+++ b/sw/qa/extras/ww8export/data/tdf134948.odt
Binary files differ
diff --git a/sw/qa/extras/ww8export/ww8export3.cxx b/sw/qa/extras/ww8export/ww8export3.cxx
index 2c6f4e1..81dea2f 100644
--- a/sw/qa/extras/ww8export/ww8export3.cxx
+++ b/sw/qa/extras/ww8export/ww8export3.cxx
@@ -318,6 +318,20 @@ DECLARE_WW8EXPORT_TEST(testTdf120225_textControlCrossRef, "tdf120225_textControl
    CPPUNIT_ASSERT_EQUAL(OUString("Text1"), sTextFieldName);
}

DECLARE_WW8EXPORT_TEST(testTdf134948, "tdf134948.odt")
{
    CPPUNIT_ASSERT_EQUAL_MESSAGE("Only 1 paragraph", 1, getParagraphs());
}

DECLARE_WW8EXPORT_TEST(testTdf132726, "tdf132726.odt")
{
    uno::Reference<text::XTextRange> xRun = getRun(getParagraph(1), 1, "What sentence has a yellow background? ");
    CPPUNIT_ASSERT_EQUAL( COL_AUTO, Color(getProperty<sal_uInt32>(xRun, "CharBackColor")) );

    xRun = getRun(getParagraph(1), 2, "Why, this sentence of course");
    CPPUNIT_ASSERT_EQUAL( COL_YELLOW, Color(getProperty<sal_uInt32>(xRun, "CharBackColor")) );
}

DECLARE_WW8EXPORT_TEST(testTdf127316_autoEscapement, "tdf127316_autoEscapement.odt")
{
    CPPUNIT_ASSERT_EQUAL(1, getPages());
diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx
index 3492549..cf71904 100644
--- a/sw/source/filter/ww8/wrtw8nds.cxx
+++ b/sw/source/filter/ww8/wrtw8nds.cxx
@@ -2353,9 +2353,9 @@ void MSWordExportBase::OutputTextNode( SwTextNode& rNode )
               3) If the anchor is associated with a text node with empty text then we ignore.
               */
            if( rNode.IsTextNode()
                && GetExportFormat() == MSWordExportBase::ExportFormat::DOCX
                && aStr != OUStringChar(CH_TXTATR_BREAKWORD) && !aStr.isEmpty()
                    && !rNode.GetFlyFormat()
                    && !(IsInTable() && !AllowPostponedTextInTable())
                    && aAttrIter.IsAnchorLinkedToThisNode(rNode.GetIndex()) )
            {
                bPostponeWritingText = true ;
diff --git a/sw/source/filter/ww8/wrtww8.hxx b/sw/source/filter/ww8/wrtww8.hxx
index d93ce60..92b93d2 100644
--- a/sw/source/filter/ww8/wrtww8.hxx
+++ b/sw/source/filter/ww8/wrtww8.hxx
@@ -688,9 +688,6 @@ public:
    /// If saving page break is preferred as a paragraph attribute (yes) or as a special character (no).
    virtual bool PreferPageBreakBefore() const = 0;

    /// Text in tables can be postponed except for .doc
    virtual bool AllowPostponedTextInTable() const { return true; }

    /// Guess the script (asian/western).
    ///
    /// Sadly word does not have two different sizes for asian font size and
@@ -1014,8 +1011,6 @@ public:

    virtual bool PreferPageBreakBefore() const override { return true; }

    virtual bool AllowPostponedTextInTable() const override { return false; }

    virtual bool FieldsQuoted() const override { return false; }

    virtual bool AddSectionBreaksForTOX() const override { return false; }