[Libreoffice-commits] core.git: cui/source include/test include/vcl sc/source sd/source test/source vcl/source
Noel Grandin
noel.grandin at collabora.co.uk
Wed May 30 06:40:43 UTC 2018
cui/source/dialogs/screenshotannotationdlg.cxx | 8 ++++----
include/test/screenshot_test.hxx | 2 +-
include/vcl/abstdlg.hxx | 3 ++-
include/vcl/dialog.hxx | 2 +-
sc/source/ui/attrdlg/scdlgfact.hxx | 4 ++--
sd/source/ui/dlg/sddlgfact.hxx | 4 ++--
test/source/screenshot_test.cxx | 6 +++---
vcl/source/window/abstdlg.cxx | 6 +++---
vcl/source/window/dialog.cxx | 4 ++--
9 files changed, 20 insertions(+), 19 deletions(-)
New commits:
commit 57722dfc48d79986aafe6874875fa20827c0136e
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date: Tue May 29 17:24:01 2018 +0200
use BitmapEx in the screenshot stuff
part of the process of moving Bitmap usage to BitmapEx
Change-Id: I4f02f8aa60d19a3639d623a998491447adf79e15
Reviewed-on: https://gerrit.libreoffice.org/55031
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/cui/source/dialogs/screenshotannotationdlg.cxx b/cui/source/dialogs/screenshotannotationdlg.cxx
index a1e7cc404c49..a405266f3748 100644
--- a/cui/source/dialogs/screenshotannotationdlg.cxx
+++ b/cui/source/dialogs/screenshotannotationdlg.cxx
@@ -159,8 +159,8 @@ private:
// local variables
Dialog& mrParentDialog;
- Bitmap maParentDialogBitmap;
- Bitmap maDimmedDialogBitmap;
+ BitmapEx maParentDialogBitmap;
+ BitmapEx maDimmedDialogBitmap;
Size maParentDialogSize;
// VirtualDevice for buffered interaction paints
@@ -233,7 +233,7 @@ ScreenshotAnnotationDlg_Impl::ScreenshotAnnotationDlg_Impl(
// to make clear that maParentDialogBitmap is a background image, adjust
// luminance a bit for maDimmedDialogBitmap - other methods may be applied
- maDimmedDialogBitmap.Adjust(-15);
+ maDimmedDialogBitmap.Adjust(-15, 0, 0, 0, 0);
// init paint buffering VirtualDevice
mpVirtualBufferDevice = VclPtr<VirtualDevice>::Create(*Application::GetDefaultDevice(), DeviceFormat::DEFAULT, DeviceFormat::BITMASK);
@@ -488,7 +488,7 @@ void ScreenshotAnnotationDlg_Impl::RepaintToBuffer(
if (mpVirtualBufferDevice)
{
// reset with original screenshot bitmap
- mpVirtualBufferDevice->DrawBitmap(
+ mpVirtualBufferDevice->DrawBitmapEx(
Point(0, 0),
bUseDimmed ? maDimmedDialogBitmap : maParentDialogBitmap);
diff --git a/include/test/screenshot_test.hxx b/include/test/screenshot_test.hxx
index de773fcf682e..7bf8874a1361 100644
--- a/include/test/screenshot_test.hxx
+++ b/include/test/screenshot_test.hxx
@@ -35,7 +35,7 @@ private:
private:
/// helpers
- void implSaveScreenshot(const Bitmap& rScreenshot, const OString& rScreenshotId);
+ void implSaveScreenshot(const BitmapEx& rScreenshot, const OString& rScreenshotId);
void saveScreenshot(VclAbstractDialog const & rDialog);
void saveScreenshot(Dialog& rDialog);
diff --git a/include/vcl/abstdlg.hxx b/include/vcl/abstdlg.hxx
index 955000e47fbd..f05fe4c7de2b 100644
--- a/include/vcl/abstdlg.hxx
+++ b/include/vcl/abstdlg.hxx
@@ -35,6 +35,7 @@
namespace vcl { class Window; }
class Dialog;
class Bitmap;
+class BitmapEx;
namespace weld
{
class DialogController;
@@ -74,7 +75,7 @@ public:
// Screenshot interface
virtual std::vector<OString> getAllPageUIXMLDescriptions() const;
virtual bool selectPageByUIXMLDescription(const OString& rUIXMLDescription);
- virtual Bitmap createScreenshot() const;
+ virtual BitmapEx createScreenshot() const;
virtual OString GetScreenshotId() const { return OString(); };
};
diff --git a/include/vcl/dialog.hxx b/include/vcl/dialog.hxx
index 36f88b8feb45..43f45955a69f 100644
--- a/include/vcl/dialog.hxx
+++ b/include/vcl/dialog.hxx
@@ -129,7 +129,7 @@ public:
// Screenshot interface
virtual std::vector<OString> getAllPageUIXMLDescriptions() const;
virtual bool selectPageByUIXMLDescription(const OString& rUIXMLDescription);
- Bitmap createScreenshot();
+ BitmapEx createScreenshot();
virtual short Execute();
bool IsInExecute() const { return mbInExecute; }
diff --git a/sc/source/ui/attrdlg/scdlgfact.hxx b/sc/source/ui/attrdlg/scdlgfact.hxx
index 722684d30c95..dd56b7f9a712 100644
--- a/sc/source/ui/attrdlg/scdlgfact.hxx
+++ b/sc/source/ui/attrdlg/scdlgfact.hxx
@@ -68,7 +68,7 @@ public: \
virtual bool StartExecuteAsync(VclAbstractDialog::AsyncContext &rCtx) override; \
std::vector<OString> getAllPageUIXMLDescriptions() const override; \
bool selectPageByUIXMLDescription(const OString& rUIXMLDescription) override; \
- virtual Bitmap createScreenshot() const override; \
+ virtual BitmapEx createScreenshot() const override; \
virtual OString GetScreenshotId() const override; \
#define IMPL_ABSTDLG_BASE(Class) \
@@ -91,7 +91,7 @@ bool Class::selectPageByUIXMLDescription(const OString& rUIXMLDescription) \
{ \
return pDlg->selectPageByUIXMLDescription(rUIXMLDescription); \
} \
-Bitmap Class::createScreenshot() const \
+BitmapEx Class::createScreenshot() const \
{ \
return pDlg->createScreenshot(); \
} \
diff --git a/sd/source/ui/dlg/sddlgfact.hxx b/sd/source/ui/dlg/sddlgfact.hxx
index 5e2b2f11c2d8..fb97d5c6f636 100644
--- a/sd/source/ui/dlg/sddlgfact.hxx
+++ b/sd/source/ui/dlg/sddlgfact.hxx
@@ -31,7 +31,7 @@ public: \
} \
virtual std::vector<OString> getAllPageUIXMLDescriptions() const override; \
virtual bool selectPageByUIXMLDescription(const OString& rUIXMLDescription) override; \
- virtual Bitmap createScreenshot() const override; \
+ virtual BitmapEx createScreenshot() const override; \
virtual OString GetScreenshotId() const override; \
virtual ~Class() override; \
virtual short Execute() override ;
@@ -39,7 +39,7 @@ public: \
#define IMPL_ABSTDLG_BASE(Class) \
std::vector<OString> Class::getAllPageUIXMLDescriptions() const { return pDlg->getAllPageUIXMLDescriptions(); } \
bool Class::selectPageByUIXMLDescription(const OString& rUIXMLDescription) { return pDlg->selectPageByUIXMLDescription(rUIXMLDescription); } \
-Bitmap Class::createScreenshot() const { return pDlg->createScreenshot();} \
+BitmapEx Class::createScreenshot() const { return pDlg->createScreenshot();} \
OString Class::GetScreenshotId() const { return pDlg->GetScreenshotId();} \
Class::~Class() \
{ \
diff --git a/test/source/screenshot_test.cxx b/test/source/screenshot_test.cxx
index 9ed30b14d98b..9afa798b6e28 100644
--- a/test/source/screenshot_test.cxx
+++ b/test/source/screenshot_test.cxx
@@ -61,7 +61,7 @@ void ScreenshotTest::setUp()
}
}
-void ScreenshotTest::implSaveScreenshot(const Bitmap& rScreenshot, const OString& rScreenshotId)
+void ScreenshotTest::implSaveScreenshot(const BitmapEx& rScreenshot, const OString& rScreenshotId)
{
OUString aDirname, aBasename;
splitHelpId(rScreenshotId, aDirname, aBasename);
@@ -87,7 +87,7 @@ void ScreenshotTest::implSaveScreenshot(const Bitmap& rScreenshot, const OString
void ScreenshotTest::saveScreenshot(VclAbstractDialog const & rDialog)
{
- const Bitmap aScreenshot(rDialog.createScreenshot());
+ const BitmapEx aScreenshot(rDialog.createScreenshot());
if (!aScreenshot.IsEmpty())
{
@@ -102,7 +102,7 @@ void ScreenshotTest::saveScreenshot(VclAbstractDialog const & rDialog)
void ScreenshotTest::saveScreenshot(Dialog& rDialog)
{
- const Bitmap aScreenshot(rDialog.createScreenshot());
+ const BitmapEx aScreenshot(rDialog.createScreenshot());
if (!aScreenshot.IsEmpty())
{
diff --git a/vcl/source/window/abstdlg.cxx b/vcl/source/window/abstdlg.cxx
index 267df9e097ad..0483d789aecb 100644
--- a/vcl/source/window/abstdlg.cxx
+++ b/vcl/source/window/abstdlg.cxx
@@ -22,7 +22,7 @@
#include <rtl/ustring.hxx>
#include <osl/module.hxx>
#include <vcl/abstdlg.hxx>
-#include <vcl/bitmap.hxx>
+#include <vcl/bitmapex.hxx>
typedef VclAbstractDialogFactory* (*FuncPtrCreateDialogFactory)();
@@ -76,10 +76,10 @@ bool VclAbstractDialog::selectPageByUIXMLDescription(const OString& /*rUIXMLDesc
return true;
}
-Bitmap VclAbstractDialog::createScreenshot() const
+BitmapEx VclAbstractDialog::createScreenshot() const
{
// default returns empty bitmap
- return Bitmap();
+ return BitmapEx();
}
// virtual
diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx
index c29227d86b25..00040af4aeb9 100644
--- a/vcl/source/window/dialog.cxx
+++ b/vcl/source/window/dialog.cxx
@@ -965,7 +965,7 @@ void Dialog::ensureRepaint()
}
}
-Bitmap Dialog::createScreenshot()
+BitmapEx Dialog::createScreenshot()
{
// same prerequisites as in Execute()
setDeferredProperties();
@@ -974,7 +974,7 @@ Bitmap Dialog::createScreenshot()
ToTop();
ensureRepaint();
- return GetBitmap(Point(), GetOutputSizePixel());
+ return GetBitmapEx(Point(), GetOutputSizePixel());
}
short Dialog::Execute()
More information about the Libreoffice-commits
mailing list