android/source/src/java/org/mozilla/gecko/gfx/GLController.java |    3 ++-
 sfx2/source/doc/exoticfileloadexception.cxx                     |    7 +------
 sfx2/source/doc/exoticfileloadexception.hxx                     |    6 ++++--
 sw/source/core/doc/docfmt.cxx                                   |    2 +-
 sw/source/core/inc/DocumentContentOperationsManager.hxx         |    2 +-
 5 files changed, 9 insertions(+), 11 deletions(-)

New commits:
commit c621e6a2614dd8277def293b55d0444ea28c3d4e
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Wed Nov 8 10:17:26 2023 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Thu Nov 9 13:16:28 2023 +0100

    loplugin:fieldcast in ExoticFileLoadException
    
    Change-Id: Ia4fac9b3313adc22e0f371cbff6828add474d097
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159174
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/sfx2/source/doc/exoticfileloadexception.cxx 
b/sfx2/source/doc/exoticfileloadexception.cxx
index 91dc9c273929..2b2500d71aef 100644
--- a/sfx2/source/doc/exoticfileloadexception.cxx
+++ b/sfx2/source/doc/exoticfileloadexception.cxx
@@ -27,11 +27,6 @@ ExoticFileLoadException::ExoticFileLoadException(const 
OUString& rURL,
     m_aRequest <<= aReq;
 }
 
-bool ExoticFileLoadException::isApprove() const
-{
-    comphelper::OInteractionApprove* pBase
-        = static_cast<comphelper::OInteractionApprove*>(m_xApprove.get());
-    return pBase->wasSelected();
-}
+bool ExoticFileLoadException::isApprove() const { return 
m_xApprove->wasSelected(); }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/doc/exoticfileloadexception.hxx 
b/sfx2/source/doc/exoticfileloadexception.hxx
index 8204d6f55426..9a4211d5d6f9 100644
--- a/sfx2/source/doc/exoticfileloadexception.hxx
+++ b/sfx2/source/doc/exoticfileloadexception.hxx
@@ -12,7 +12,9 @@
 
 #include <com/sun/star/task/XInteractionContinuation.hpp>
 #include <com/sun/star/task/XInteractionRequest.hpp>
+#include <comphelper/interaction.hxx>
 #include <cppuhelper/implbase.hxx>
+#include <rtl/ref.hxx>
 
 class ExoticFileLoadException : public 
cppu::WeakImplHelper<css::task::XInteractionRequest>
 {
@@ -33,8 +35,8 @@ public:
     // member
 private:
     css::uno::Any m_aRequest;
-    css::uno::Reference<css::task::XInteractionContinuation> m_xAbort;
-    css::uno::Reference<css::task::XInteractionContinuation> m_xApprove;
+    rtl::Reference<comphelper::OInteractionAbort> m_xAbort;
+    rtl::Reference<comphelper::OInteractionApprove> m_xApprove;
     
css::uno::Sequence<css::uno::Reference<css::task::XInteractionContinuation>> 
m_lContinuations;
 };
 
commit 444548b4c7ac47028cdfe0a6c45b1cc32514848a
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Tue Nov 7 16:13:38 2023 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Thu Nov 9 13:16:18 2023 +0100

    loplugin:fieldcast in ParaRstFormat
    
    Change-Id: I684e53a2c06ed1a6b2e85eb07162cd4ef43d0dd9
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159136
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/sw/source/core/doc/docfmt.cxx b/sw/source/core/doc/docfmt.cxx
index c7deb91478b9..b6ac04ef682a 100644
--- a/sw/source/core/doc/docfmt.cxx
+++ b/sw/source/core/doc/docfmt.cxx
@@ -1013,7 +1013,7 @@ static bool lcl_SetTextFormatColl( SwNode* pNode, void* 
pArgs )
         }
     }
 
-    SwTextFormatColl* pFormat = 
static_cast<SwTextFormatColl*>(pPara->pFormatColl);
+    SwTextFormatColl* pFormat = pPara->pFormatColl;
     if ( pPara->bReset )
     {
         lcl_RstAttr(pCNd, pPara);
diff --git a/sw/source/core/inc/DocumentContentOperationsManager.hxx 
b/sw/source/core/inc/DocumentContentOperationsManager.hxx
index 434eaf7ed07b..8332cf34bf92 100644
--- a/sw/source/core/inc/DocumentContentOperationsManager.hxx
+++ b/sw/source/core/inc/DocumentContentOperationsManager.hxx
@@ -117,7 +117,7 @@ public:
     //originallyfrom docfmt.cxx
     struct ParaRstFormat
     {
-        SwFormatColl* pFormatColl;
+        SwTextFormatColl* pFormatColl;
         SwHistory* pHistory;
         const SwPosition *pSttNd, *pEndNd;
         const SfxItemSet* pDelSet;
commit d9a43fa5f94839d79cbd8524ba5c0b1865e6ad52
Author:     Michael Weghorn <m.wegh...@posteo.de>
AuthorDate: Thu Nov 9 08:54:08 2023 +0100
Commit:     Michael Weghorn <m.wegh...@posteo.de>
CommitDate: Thu Nov 9 13:16:16 2023 +0100

    tdf#158125 android: Don't insist on RGB 565 EGL config
    
    As the `eglChooseConfig` doc [1] says:
    
    > eglChooseConfig returns in configs a list of all EGL frame buffer
    > configurations that match the attributes specified
    > [...]
    > Attributes are matched in an attribute-specific manner. Some of the
    > attributes, such as EGL_LEVEL, must match the specified value exactly.
    > Others, such as, EGL_RED_SIZE must meet or exceed the specified minimum
    > values.
    
    The config/attribute list used for Android Viewer specifies
    EGL_RED_SIZE=5, EGL_GREEN_SIZE=6, and EGL_BLUE_SIZE=5 and so
    far, only configs using exactly those bit sizes were accepted,
    causing 1 of the 11 devices used in automated tests in Google Play CI
    crashing with this stack trace:
    
        Exception org.mozilla.gecko.gfx.GLController$GLControllerException: No 
suitable EGL configuration found
          at org.mozilla.gecko.gfx.GLController.chooseConfig 
(GLController.java:219)
          at org.mozilla.gecko.gfx.GLController.initEGL (GLController.java:172)
          at org.mozilla.gecko.gfx.GLController.initEGLContext 
(GLController.java:176)
          at org.mozilla.gecko.gfx.GLController.initGLContext 
(GLController.java:57)
          at org.mozilla.gecko.gfx.RenderControllerThread.doSurfaceCreated 
(RenderControllerThread.java:132)
          at org.mozilla.gecko.gfx.RenderControllerThread.execute 
(RenderControllerThread.java:52)
          at org.mozilla.gecko.gfx.RenderControllerThread.run 
(RenderControllerThread.java:30)
    
    Since only configs fulfilling the minimium specification
    have been returned, I don't see a reason to insist on
    having one that uses exactly the specified amount of bits
    for the individual color components.
    
    I also didn't see any rendering issues in a quick test (also using
    the colorful Calc sheet attachment 188343 from tdf#156182) forcing the
    use of a configuration using EGL_RED_SIZE=8, EGL_GREEN_SIZE=8, and
    EGL_BLUE_SIZE=8 with an x86_64 AVD and on a Fairphone 3+ (arm64)
    using this temporary local change:
    
        diff --git 
a/android/source/src/java/org/mozilla/gecko/gfx/GLController.java 
b/android/source/src/java/org/mozilla/gecko/gfx/GLController.java
        index 45600e9f1e7c..9e7f348e9e72 100644
        --- a/android/source/src/java/org/mozilla/gecko/gfx/GLController.java
        +++ b/android/source/src/java/org/mozilla/gecko/gfx/GLController.java
        @@ -171,7 +171,7 @@ public class GLController {
                     mEGL.eglGetConfigAttrib(mEGLDisplay, config, 
EGL10.EGL_RED_SIZE, red);
                     mEGL.eglGetConfigAttrib(mEGLDisplay, config, 
EGL10.EGL_GREEN_SIZE, green);
                     mEGL.eglGetConfigAttrib(mEGLDisplay, config, 
EGL10.EGL_BLUE_SIZE, blue);
        -            if (red[0] == 5 && green[0] == 6 && blue[0] == 5) {
        +            if (red[0] == 8 && green[0] == 8 && blue[0] == 8) {
                         return config;
                     }
                 }
    
    Therefore, fall back to using another config that fulfils the
    specification.
    (Leave the previously required config as preferred one for now,
    maybe it still has advantages, e.g. might be more efficient due
    to not wasting extra bits for the color components that are
    not needed for the rendering in LibreOffice Viewer. (?))
    
    [1] https://registry.khronos.org/EGL/sdk/docs/man/html/eglChooseConfig.xhtml
    
    Change-Id: I953d292248004bc6f7e9384ceef78c8a88c21e9e
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159204
    Tested-by: Jenkins
    Reviewed-by: Michael Weghorn <m.wegh...@posteo.de>

diff --git a/android/source/src/java/org/mozilla/gecko/gfx/GLController.java 
b/android/source/src/java/org/mozilla/gecko/gfx/GLController.java
index 45600e9f1e7c..6a43dd6a87db 100644
--- a/android/source/src/java/org/mozilla/gecko/gfx/GLController.java
+++ b/android/source/src/java/org/mozilla/gecko/gfx/GLController.java
@@ -176,7 +176,8 @@ public class GLController {
             }
         }
 
-        throw new GLControllerException("No suitable EGL configuration found");
+        // if there's no 565 RGB configuration, select another one that 
fulfils the specification
+        return configs[0];
     }
 
     private void createEGLSurface() {

Reply via email to