Resolves: tdf#152704 old image remains underneath when new image drawn
in this dialog preview widget
Change-Id: Id33995d9a9557d235178be0d12cc6b44e146ff4c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149017
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Tested-by: Jenkins
diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx
index 8dff4cd..e32147d2 100644
--- a/sw/source/ui/frmdlg/frmpage.cxx
+++ b/sw/source/ui/frmdlg/frmpage.cxx
@@ -2602,7 +2602,8 @@ void BmpWindow::SetDrawingArea(weld::DrawingArea* pDrawingArea)
void BmpWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&)
{
// Setup
rRenderContext.SetBackground();
rRenderContext.SetBackground(Wallpaper(Application::GetSettings().GetStyleSettings().GetDialogColor()));
rRenderContext.Erase();
// #i119307# the graphic might have transparency, set up white as the color
// to use when drawing a rectangle under the image
rRenderContext.SetLineColor(COL_WHITE);