[Libreoffice-commits] core.git: 2 commits - include/vcl vcl/source vcl/unx
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Thu Oct 22 07:52:57 UTC 2020
include/vcl/filter/PDFiumLibrary.hxx | 2 ++
vcl/source/filter/ipdf/pdfread.cxx | 3 +--
vcl/source/pdf/PDFiumLibrary.cxx | 2 ++
vcl/unx/gtk3/gtk3gtkinst.cxx | 10 ++++++++++
4 files changed, 15 insertions(+), 2 deletions(-)
New commits:
commit bfd096858005aa07121c218845af15fbefe18e1e
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Wed Oct 21 20:58:27 2020 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Thu Oct 22 09:52:25 2020 +0200
add some SolarMutexGuards for IME
Change-Id: I1bd2e3c34e400b597dec1b9b3933b7dc85d2b78f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104644
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index f42b767bf843..6448e3733256 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -13770,6 +13770,8 @@ public:
{
IMHandler* pThis = static_cast<IMHandler*>(im_handler);
+ SolarMutexGuard aGuard;
+
// at least editeng expects to have seen a start before accepting a commit
pThis->StartExtTextInput();
@@ -13789,6 +13791,8 @@ public:
{
IMHandler* pThis = static_cast<IMHandler*>(im_handler);
+ SolarMutexGuard aGuard;
+
sal_Int32 nCursorPos(0);
sal_uInt8 nCursorFlags(0);
std::vector<ExtTextInputAttr> aInputFlags;
@@ -13812,6 +13816,8 @@ public:
{
IMHandler* pThis = static_cast<IMHandler*>(im_handler);
+ SolarMutexGuard aGuard;
+
OUString sSurroundingText;
int nCursorIndex = pThis->m_pArea->im_context_get_surrounding(sSurroundingText);
@@ -13833,6 +13839,8 @@ public:
IMHandler* pThis = static_cast<IMHandler*>(im_handler);
+ SolarMutexGuard aGuard;
+
OUString sSurroundingText;
sal_Int32 nCursorIndex = pThis->m_pArea->im_context_get_surrounding(sSurroundingText);
@@ -13875,6 +13883,7 @@ public:
static void signalIMPreeditStart(GtkIMContext*, gpointer im_handler)
{
IMHandler* pThis = static_cast<IMHandler*>(im_handler);
+ SolarMutexGuard aGuard;
pThis->StartExtTextInput();
pThis->updateIMSpotLocation();
}
@@ -13891,6 +13900,7 @@ public:
static void signalIMPreeditEnd(GtkIMContext*, gpointer im_handler)
{
IMHandler* pThis = static_cast<IMHandler*>(im_handler);
+ SolarMutexGuard aGuard;
pThis->updateIMSpotLocation();
pThis->EndExtTextInput();
}
commit 0a2d0342d73a99264677a5b701768e128b09a39c
Author: Miklos Vajna <vmiklos at collabora.com>
AuthorDate: Thu Oct 22 09:06:48 2020 +0200
Commit: Miklos Vajna <vmiklos at collabora.com>
CommitDate: Thu Oct 22 09:52:17 2020 +0200
pdfium: add a wrapper for FPDFPage_HasTransparency()
Change-Id: Id0595e96a4de7fabe6613cf2df69684da6e8a6d2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104648
Reviewed-by: Miklos Vajna <vmiklos at collabora.com>
Tested-by: Jenkins
diff --git a/include/vcl/filter/PDFiumLibrary.hxx b/include/vcl/filter/PDFiumLibrary.hxx
index 1900c07d8e8c..556ca44ac4fd 100644
--- a/include/vcl/filter/PDFiumLibrary.hxx
+++ b/include/vcl/filter/PDFiumLibrary.hxx
@@ -219,6 +219,8 @@ public:
double getWidth();
double getHeight();
+
+ bool hasTransparency();
};
class VCL_DLLPUBLIC PDFiumDocument final
diff --git a/vcl/source/filter/ipdf/pdfread.cxx b/vcl/source/filter/ipdf/pdfread.cxx
index f4ed0acf5b43..bb9b91e97702 100644
--- a/vcl/source/filter/ipdf/pdfread.cxx
+++ b/vcl/source/filter/ipdf/pdfread.cxx
@@ -171,8 +171,7 @@ size_t RenderPDFBitmaps(const void* pBuffer, int nSize, std::vector<Bitmap>& rBi
if (!pPdfBitmap)
break;
- const FPDF_DWORD nColor
- = FPDFPage_HasTransparency(pPdfPage->getPointer()) ? 0x00000000 : 0xFFFFFFFF;
+ const FPDF_DWORD nColor = pPdfPage->hasTransparency() ? 0x00000000 : 0xFFFFFFFF;
FPDFBitmap_FillRect(pPdfBitmap->getPointer(), 0, 0, nPageWidth, nPageHeight, nColor);
FPDF_RenderPageBitmap(pPdfBitmap->getPointer(), pPdfPage->getPointer(), /*start_x=*/0,
/*start_y=*/0, nPageWidth, nPageHeight, /*rotate=*/0, /*flags=*/0);
diff --git a/vcl/source/pdf/PDFiumLibrary.cxx b/vcl/source/pdf/PDFiumLibrary.cxx
index 10fa42f143cf..fa5baeebb0c3 100644
--- a/vcl/source/pdf/PDFiumLibrary.cxx
+++ b/vcl/source/pdf/PDFiumLibrary.cxx
@@ -463,6 +463,8 @@ double PDFiumPage::getWidth() { return FPDF_GetPageWidth(mpPage); }
double PDFiumPage::getHeight() { return FPDF_GetPageHeight(mpPage); }
+bool PDFiumPage::hasTransparency() { return FPDFPage_HasTransparency(mpPage); }
+
PDFiumPathSegment::PDFiumPathSegment(FPDF_PATHSEGMENT pPathSegment)
: mpPathSegment(pPathSegment)
{
More information about the Libreoffice-commits
mailing list