tdf#135774 Char highlight: numbering: don't clear existing mxBackColor

If the numbering had a specified w:shd in numbering.xml,
then that character background should apply to the bullet point.
However, SetDiffFnt automatically clears mxBackColor (and I'm not
sure why - but that has been true since way back to original import).
Well, in this section the paragraph marker properties should
only apply if the numbering doesn't have direct formatting already.

So a special step is needed to check if the font has an mxBackColor,
and since that direct formatting has priority, re-apply it
after SetDiffFnt has finished.

(P.S. This had been done earlier for GetHighlightColor, but it was
reverted in 7.0. From my testing, I haven't seen an example where
it was needed, but it too is reset to null - only it isn't optional.)

Again, a unit test will be challenging here, since this is a
visual change only.

Change-Id: I2be129b11b6f746ba11c19d69bf01f3174c1b64b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111675
Tested-by: Jenkins
Tested-by: Justin Luth <justin_luth@sil.org>
Reviewed-by: Justin Luth <justin_luth@sil.org>
diff --git a/sw/source/core/text/txtfld.cxx b/sw/source/core/text/txtfld.cxx
index 7e5073e..3d1bd58 100644
--- a/sw/source/core/text/txtfld.cxx
+++ b/sw/source/core/text/txtfld.cxx
@@ -521,7 +521,15 @@ static void checkApplyParagraphMarkFormatToNumbering(SwFont* pNumFnt, SwTextForm
        }
        pItem = aIter.NextItem();
    };

    // SetDiffFnt resets the background color (why?), so capture it and re-apply if it had a value,
    // because an existing value should override anything inherited from the paragraph marker.
    const std::optional<Color> oFontBackColor = pNumFnt->GetBackColor();

    pNumFnt->SetDiffFnt(pCleanedSet.get(), pIDSA);

    if (oFontBackColor)
        pNumFnt->SetBackColor(oFontBackColor);
}

static const SwRangeRedline* lcl_GetRedlineAtNodeInsertionOrDeletion( const SwTextNode& rTextNode )