diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-12-09 15:07:28 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-12-09 17:20:51 +0100 |
commit | 1b27638ce1434b0fee73685cb9cfc55dcc0c8b0b (patch) | |
tree | 42f064f17ef712cf1e43af07a98772f05382719b /svx | |
parent | 8acadd0430f5789545b4a1af789780814f2e1247 (diff) |
split WeldEditView::Paint so a subclass can render a specific bg
Change-Id: Id502b98c6754db9dd6314c4bd960ca8065a0fa42
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107473
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/dialog/weldeditview.cxx | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/svx/source/dialog/weldeditview.cxx b/svx/source/dialog/weldeditview.cxx index 61c258a3730a..d14afb6dfec4 100644 --- a/svx/source/dialog/weldeditview.cxx +++ b/svx/source/dialog/weldeditview.cxx @@ -126,20 +126,25 @@ void WeldEditView::Resize() void WeldEditView::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) { - rRenderContext.Push(PushFlags::ALL); - rRenderContext.SetClipRegion(); - const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings(); Color aBgColor = rStyleSettings.GetWindowColor(); rRenderContext.SetBackground(aBgColor); + if (EditView* pEditView = GetEditView()) + pEditView->SetBackgroundColor(aBgColor); + + DoPaint(rRenderContext, rRect); +} + +void WeldEditView::DoPaint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) +{ + rRenderContext.Push(PushFlags::ALL); + rRenderContext.SetClipRegion(); std::vector<tools::Rectangle> aLogicRects; if (EditView* pEditView = GetEditView()) { - pEditView->SetBackgroundColor(aBgColor); - pEditView->Paint(rRect, &rRenderContext); if (HasFocus()) |