Resolves: tdf#152329 Caption preview font is black when using OS dark mode

Change-Id: I2ed9ae77ecb9a5a83d88dce5a2834e6c882cfec1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143448
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
diff --git a/sw/source/ui/config/optload.cxx b/sw/source/ui/config/optload.cxx
index 9f0531b..1885c06 100644
--- a/sw/source/ui/config/optload.cxx
+++ b/sw/source/ui/config/optload.cxx
@@ -375,10 +375,12 @@ SwCaptionPreview::SwCaptionPreview()

void SwCaptionPreview::ApplySettings(vcl::RenderContext& rRenderContext)
{
    Wallpaper aBack(rRenderContext.GetSettings().GetStyleSettings().GetWindowColor());
    const StyleSettings& rSettings = rRenderContext.GetSettings().GetStyleSettings();
    Wallpaper aBack(rSettings.GetWindowColor());
    rRenderContext.SetBackground(aBack);
    rRenderContext.SetFillColor(aBack.GetColor());
    rRenderContext.SetLineColor(aBack.GetColor());
    rRenderContext.SetTextColor(rSettings.GetWindowTextColor());

    if (!mbFontInitialized)
    {