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 /sc | |
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 'sc')
-rw-r--r-- | sc/source/ui/attrdlg/scdlgfact.cxx | 42 |
1 files changed, 14 insertions, 28 deletions
diff --git a/sc/source/ui/attrdlg/scdlgfact.cxx b/sc/source/ui/attrdlg/scdlgfact.cxx index e947993cacd2..55340b185d8b 100644 --- a/sc/source/ui/attrdlg/scdlgfact.cxx +++ b/sc/source/ui/attrdlg/scdlgfact.cxx @@ -128,8 +128,7 @@ short AbstractScDataFormDlg_Impl::Execute() BitmapEx AbstractScDataFormDlg_Impl::createScreenshot() const { - VclPtr<VirtualDevice> xDialogSurface(VclPtr<VirtualDevice>::Create(DeviceFormat::DEFAULT)); - m_xDlg->getDialog()->draw(*xDialogSurface); + VclPtr<VirtualDevice> xDialogSurface(m_xDlg->getDialog()->screenshot()); return xDialogSurface->GetBitmapEx(Point(), xDialogSurface->GetOutputSizePixel()); } @@ -185,8 +184,7 @@ short AbstractScMoveTableDlg_Impl::Execute() BitmapEx AbstractScMoveTableDlg_Impl::createScreenshot() const { - VclPtr<VirtualDevice> xDialogSurface(VclPtr<VirtualDevice>::Create(DeviceFormat::DEFAULT)); - m_xDlg->getDialog()->draw(*xDialogSurface); + VclPtr<VirtualDevice> xDialogSurface(m_xDlg->getDialog()->screenshot()); return xDialogSurface->GetBitmapEx(Point(), xDialogSurface->GetOutputSizePixel()); } @@ -291,8 +289,7 @@ void AbstractScImportAsciiDlg_Impl::SaveParameters() BitmapEx AbstractScImportAsciiDlg_Impl::createScreenshot() const { - VclPtr<VirtualDevice> xDialogSurface(VclPtr<VirtualDevice>::Create(DeviceFormat::DEFAULT)); - m_xDlg->getDialog()->draw(*xDialogSurface); + VclPtr<VirtualDevice> xDialogSurface(m_xDlg->getDialog()->screenshot()); return xDialogSurface->GetBitmapEx(Point(), xDialogSurface->GetOutputSizePixel()); } @@ -323,8 +320,7 @@ bool AbstractScColRowLabelDlg_Impl::IsRow() BitmapEx AbstractScColRowLabelDlg_Impl::createScreenshot() const { - VclPtr<VirtualDevice> xDialogSurface(VclPtr<VirtualDevice>::Create(DeviceFormat::DEFAULT)); - m_xDlg->getDialog()->draw(*xDialogSurface); + VclPtr<VirtualDevice> xDialogSurface(m_xDlg->getDialog()->screenshot()); return xDialogSurface->GetBitmapEx(Point(), xDialogSurface->GetOutputSizePixel()); } @@ -340,8 +336,7 @@ void AbstractScDataPilotDatabaseDlg_Impl::GetValues( ScImportSourceDesc& rDesc ) BitmapEx AbstractScDataPilotDatabaseDlg_Impl::createScreenshot() const { - VclPtr<VirtualDevice> xDialogSurface(VclPtr<VirtualDevice>::Create(DeviceFormat::DEFAULT)); - m_xDlg->getDialog()->draw(*xDialogSurface); + VclPtr<VirtualDevice> xDialogSurface(m_xDlg->getDialog()->screenshot()); return xDialogSurface->GetBitmapEx(Point(), xDialogSurface->GetOutputSizePixel()); } @@ -377,8 +372,7 @@ void AbstractScDataPilotSourceTypeDlg_Impl::AppendNamedRange(const OUString& rNa BitmapEx AbstractScDataPilotSourceTypeDlg_Impl::createScreenshot() const { - VclPtr<VirtualDevice> xDialogSurface(VclPtr<VirtualDevice>::Create(DeviceFormat::DEFAULT)); - m_xDlg->getDialog()->draw(*xDialogSurface); + VclPtr<VirtualDevice> xDialogSurface(m_xDlg->getDialog()->screenshot()); return xDialogSurface->GetBitmapEx(Point(), xDialogSurface->GetOutputSizePixel()); } @@ -419,8 +413,7 @@ DelCellCmd AbstractScDeleteCellDlg_Impl::GetDelCellCmd() const BitmapEx AbstractScDeleteCellDlg_Impl::createScreenshot() const { - VclPtr<VirtualDevice> xDialogSurface(VclPtr<VirtualDevice>::Create(DeviceFormat::DEFAULT)); - m_xDlg->getDialog()->draw(*xDialogSurface); + VclPtr<VirtualDevice> xDialogSurface(m_xDlg->getDialog()->screenshot()); return xDialogSurface->GetBitmapEx(Point(), xDialogSurface->GetOutputSizePixel()); } @@ -441,8 +434,7 @@ InsertDeleteFlags AbstractScDeleteContentsDlg_Impl::GetDelContentsCmdBits() cons BitmapEx AbstractScDeleteContentsDlg_Impl::createScreenshot() const { - VclPtr<VirtualDevice> xDialogSurface(VclPtr<VirtualDevice>::Create(DeviceFormat::DEFAULT)); - m_xDlg->getDialog()->draw(*xDialogSurface); + VclPtr<VirtualDevice> xDialogSurface(m_xDlg->getDialog()->screenshot()); return xDialogSurface->GetBitmapEx(Point(), xDialogSurface->GetOutputSizePixel()); } @@ -553,8 +545,7 @@ InsCellCmd AbstractScInsertContentsDlg_Impl::GetMoveMode() BitmapEx AbstractScInsertContentsDlg_Impl::createScreenshot() const { - VclPtr<VirtualDevice> xDialogSurface(VclPtr<VirtualDevice>::Create(DeviceFormat::DEFAULT)); - m_xDlg->getDialog()->draw(*xDialogSurface); + VclPtr<VirtualDevice> xDialogSurface(m_xDlg->getDialog()->screenshot()); return xDialogSurface->GetBitmapEx(Point(), xDialogSurface->GetOutputSizePixel()); } @@ -600,8 +591,7 @@ const OUString* AbstractScInsertTableDlg_Impl::GetNextTable( sal_uInt16* pN ) BitmapEx AbstractScInsertTableDlg_Impl::createScreenshot() const { - VclPtr<VirtualDevice> xDialogSurface(VclPtr<VirtualDevice>::Create(DeviceFormat::DEFAULT)); - m_xDlg->getDialog()->draw(*xDialogSurface); + VclPtr<VirtualDevice> xDialogSurface(m_xDlg->getDialog()->screenshot()); return xDialogSurface->GetBitmapEx(Point(), xDialogSurface->GetOutputSizePixel()); } @@ -714,8 +704,7 @@ CreateNameFlags AbstractScNameCreateDlg_Impl::GetFlags() const BitmapEx AbstractScNameCreateDlg_Impl::createScreenshot() const { - VclPtr<VirtualDevice> xDialogSurface(VclPtr<VirtualDevice>::Create(DeviceFormat::DEFAULT)); - m_xDlg->getDialog()->draw(*xDialogSurface); + VclPtr<VirtualDevice> xDialogSurface(m_xDlg->getDialog()->screenshot()); return xDialogSurface->GetBitmapEx(Point(), xDialogSurface->GetOutputSizePixel()); } @@ -820,8 +809,7 @@ OUString AbstractScStringInputDlg_Impl::GetInputString() const BitmapEx AbstractScStringInputDlg_Impl::createScreenshot() const { - VclPtr<VirtualDevice> xDialogSurface(VclPtr<VirtualDevice>::Create(DeviceFormat::DEFAULT)); - m_xDlg->getDialog()->draw(*xDialogSurface); + VclPtr<VirtualDevice> xDialogSurface(m_xDlg->getDialog()->screenshot()); return xDialogSurface->GetBitmapEx(Point(), xDialogSurface->GetOutputSizePixel()); } @@ -837,8 +825,7 @@ void AbstractScTabBgColorDlg_Impl::GetSelectedColor( Color& rColor ) const BitmapEx AbstractScTabBgColorDlg_Impl::createScreenshot() const { - VclPtr<VirtualDevice> xDialogSurface(VclPtr<VirtualDevice>::Create(DeviceFormat::DEFAULT)); - m_xDlg->getDialog()->draw(*xDialogSurface); + VclPtr<VirtualDevice> xDialogSurface(m_xDlg->getDialog()->screenshot()); return xDialogSurface->GetBitmapEx(Point(), xDialogSurface->GetOutputSizePixel()); } @@ -869,8 +856,7 @@ bool AbstractScTextImportOptionsDlg_Impl::IsDateConversionSet() const BitmapEx AbstractScTextImportOptionsDlg_Impl::createScreenshot() const { - VclPtr<VirtualDevice> xDialogSurface(VclPtr<VirtualDevice>::Create(DeviceFormat::DEFAULT)); - m_xDlg->getDialog()->draw(*xDialogSurface); + VclPtr<VirtualDevice> xDialogSurface(m_xDlg->getDialog()->screenshot()); return xDialogSurface->GetBitmapEx(Point(), xDialogSurface->GetOutputSizePixel()); } |