summaryrefslogtreecommitdiff
path: root/sw/source/ui/frmdlg
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2015-05-18 15:07:06 +0900
committerTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2015-05-18 15:55:01 +0900
commit3010e6716362cfd1c2199f11add2754ad3d488f6 (patch)
treedb420e3f506d40fe975e4b75f737ab26b3a79590 /sw/source/ui/frmdlg
parentd015547d8aedeb253a157310c227337abd02d2fe (diff)
setup fg/bg in Paint method
Change-Id: I38c6018816254a92a144160d963fc90a48be739f
Diffstat (limited to 'sw/source/ui/frmdlg')
-rw-r--r--sw/source/ui/frmdlg/frmpage.cxx15
1 files changed, 9 insertions, 6 deletions
diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx
index 664e5c504592..1186b66518a3 100644
--- a/sw/source/ui/frmdlg/frmpage.cxx
+++ b/sw/source/ui/frmdlg/frmpage.cxx
@@ -2648,12 +2648,6 @@ BmpWindow::BmpWindow(vcl::Window* pPar, WinBits nStyle)
, bGraphic(false)
, bLeftAlign(false)
{
- SetBackground();
- SetPaintTransparent(true);
- // #i119307# the graphic might have transparency, set up white as the color
- // to use when drawing a rectangle under the image
- SetLineColor(COL_WHITE);
- SetFillColor(COL_WHITE);
}
Size BmpWindow::GetOptimalSize() const
@@ -2665,6 +2659,15 @@ VCL_BUILDER_FACTORY_ARGS(BmpWindow, 0)
void BmpWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle&)
{
+ // Setup
+ rRenderContext.SetBackground();
+ SetPaintTransparent(true);
+ // #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);
+ rRenderContext.SetFillColor(COL_WHITE);
+
+ // Paint
Point aPntPos;
Size aPntSz(GetSizePixel());
Size aGrfSize;