diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-07-07 20:27:51 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-07-08 13:39:11 +0200 |
commit | 19fd82ac6e08896bd17169d1b6ea090458fc18da (patch) | |
tree | a179a2651dc58d4574833ac39ab0ea70f1dd8110 /vcl/source/app/salvtables.cxx | |
parent | 2d8e2813ddc87f7ce03b97e4d603df11613461f0 (diff) |
distinguish between dialog screenshoting and rendering a widget
Change-Id: I43ee0c68d72c97a15d26e2ffea577c2a44ba91e8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98326
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl/source/app/salvtables.cxx')
-rw-r--r-- | vcl/source/app/salvtables.cxx | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx index f3778f91340c..81c2e38085c3 100644 --- a/vcl/source/app/salvtables.cxx +++ b/vcl/source/app/salvtables.cxx @@ -1133,10 +1133,12 @@ std::unique_ptr<weld::Container> SalInstanceWidget::weld_parent() const return std::make_unique<SalInstanceContainer>(pParent, m_pBuilder, false); } -void SalInstanceWidget::draw(VirtualDevice& rOutput) +void SalInstanceWidget::draw(OutputDevice& rOutput, const tools::Rectangle& rRect) { - rOutput.SetOutputSizePixel(m_xWidget->GetSizePixel()); - m_xWidget->PaintToDevice(&rOutput, Point()); + Size aOrigSize(m_xWidget->GetSizePixel()); + m_xWidget->SetSizePixel(rRect.GetSize()); + m_xWidget->Draw(&rOutput, rRect.TopLeft(), DrawFlags::NONE); + m_xWidget->SetSizePixel(aOrigSize); } namespace @@ -1321,11 +1323,11 @@ void SalInstanceWindow::HandleEventListener(VclWindowEvent& rEvent) SalInstanceContainer::HandleEventListener(rEvent); } -void SalInstanceWindow::draw(VirtualDevice& rOutput) +VclPtr<VirtualDevice> SalInstanceWindow::screenshot() { SystemWindow* pSysWin = dynamic_cast<SystemWindow*>(m_xWindow.get()); assert(pSysWin); - pSysWin->createScreenshot(rOutput); + return pSysWin->createScreenshot(); } weld::ScreenShotCollection SalInstanceWindow::collect_screenshot_data() |