[Libreoffice-commits] core.git: vcl/headless vcl/inc vcl/osx vcl/qt5 vcl/unx vcl/win

Noel Grandin (via logerrit) logerrit at kemper.freedesktop.org
Thu Jun 10 11:22:19 UTC 2021


 vcl/headless/svpframe.cxx           |    3 +--
 vcl/inc/headless/svpframe.hxx       |    2 +-
 vcl/inc/osx/salframe.h              |    2 +-
 vcl/inc/qt5/Qt5Frame.hxx            |    2 +-
 vcl/inc/salframe.hxx                |    2 +-
 vcl/inc/unx/gtk/gtkframe.hxx        |    2 +-
 vcl/inc/unx/salframe.h              |    2 +-
 vcl/inc/win/salframe.h              |    2 +-
 vcl/osx/salframe.cxx                |    3 +--
 vcl/qt5/Qt5Frame.cxx                |    3 +--
 vcl/unx/generic/window/salframe.cxx |    4 +---
 vcl/unx/gtk3/gtkframe.cxx           |    3 +--
 vcl/win/window/salframe.cxx         |    3 +--
 13 files changed, 13 insertions(+), 20 deletions(-)

New commits:
commit e2644dc93e0c9577e3d6d1e8c4918481165d1378
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Thu Jun 10 11:35:19 2021 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Thu Jun 10 13:19:28 2021 +0200

    loplugin:unnecessaryreturn SalFrame::SetPluginParent
    
    Change-Id: If927a834f5b5d722fc36cce40e161597af6234ca
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116972
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/vcl/headless/svpframe.cxx b/vcl/headless/svpframe.cxx
index fb7a81d08b7a..ab82a90a4faa 100644
--- a/vcl/headless/svpframe.cxx
+++ b/vcl/headless/svpframe.cxx
@@ -482,9 +482,8 @@ void SvpSalFrame::SetParent( SalFrame* pNewParent )
     m_pParent = static_cast<SvpSalFrame*>(pNewParent);
 }
 
-bool SvpSalFrame::SetPluginParent( SystemParentData* )
+void SvpSalFrame::SetPluginParent( SystemParentData* )
 {
-    return true;
 }
 
 void SvpSalFrame::ResetClipRegion()
diff --git a/vcl/inc/headless/svpframe.hxx b/vcl/inc/headless/svpframe.hxx
index 1d8622d586b9..145ccf5b3655 100644
--- a/vcl/inc/headless/svpframe.hxx
+++ b/vcl/inc/headless/svpframe.hxx
@@ -106,7 +106,7 @@ public:
     virtual KeyIndicatorState   GetIndicatorState() override;
     virtual void                SimulateKeyPress( sal_uInt16 nKeyCode ) override;
     virtual void                SetParent( SalFrame* pNewParent ) override;
-    virtual bool                SetPluginParent( SystemParentData* pNewParent ) override;
+    virtual void                SetPluginParent( SystemParentData* pNewParent ) override;
     virtual void                ResetClipRegion() override;
     virtual void                BeginSetClipRegion( sal_uInt32 nRects ) override;
     virtual void                UnionClipRegion( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight ) override;
diff --git a/vcl/inc/osx/salframe.h b/vcl/inc/osx/salframe.h
index d634647715ce..47f8e62981b8 100644
--- a/vcl/inc/osx/salframe.h
+++ b/vcl/inc/osx/salframe.h
@@ -149,7 +149,7 @@ public:
     virtual KeyIndicatorState   GetIndicatorState() override;
     virtual void                SimulateKeyPress( sal_uInt16 nKeyCode ) override;
     virtual void                SetParent( SalFrame* pNewParent ) override;
-    virtual bool                SetPluginParent( SystemParentData* pNewParent ) override;
+    virtual void                SetPluginParent( SystemParentData* pNewParent ) override;
     virtual void                SetExtendedFrameStyle( SalExtStyle ) override;
     virtual void                SetScreenNumber(unsigned int) override;
     virtual void                SetApplicationID( const OUString &rApplicationID ) override;
diff --git a/vcl/inc/qt5/Qt5Frame.hxx b/vcl/inc/qt5/Qt5Frame.hxx
index 828f212babfb..62877e15e89a 100644
--- a/vcl/inc/qt5/Qt5Frame.hxx
+++ b/vcl/inc/qt5/Qt5Frame.hxx
@@ -197,7 +197,7 @@ public:
     virtual KeyIndicatorState GetIndicatorState() override;
     virtual void SimulateKeyPress(sal_uInt16 nKeyCode) override;
     virtual void SetParent(SalFrame* pNewParent) override;
-    virtual bool SetPluginParent(SystemParentData* pNewParent) override;
+    virtual void SetPluginParent(SystemParentData* pNewParent) override;
     virtual void ResetClipRegion() override;
     virtual void BeginSetClipRegion(sal_uInt32 nRects) override;
     virtual void UnionClipRegion(tools::Long nX, tools::Long nY, tools::Long nWidth,
diff --git a/vcl/inc/salframe.hxx b/vcl/inc/salframe.hxx
index 20eab00d7989..6525ab14b1c9 100644
--- a/vcl/inc/salframe.hxx
+++ b/vcl/inc/salframe.hxx
@@ -237,7 +237,7 @@ public:
     // reparent window to act as a plugin; implementation
     // may choose to use a new system window internally
     // return false to indicate failure
-    virtual bool            SetPluginParent( SystemParentData* pNewParent ) = 0;
+    virtual void            SetPluginParent( SystemParentData* pNewParent ) = 0;
 
     // move the frame to a new screen
     virtual void            SetScreenNumber( unsigned int nScreen ) = 0;
diff --git a/vcl/inc/unx/gtk/gtkframe.hxx b/vcl/inc/unx/gtk/gtkframe.hxx
index 645dbd9ac794..b1ddd52913b8 100644
--- a/vcl/inc/unx/gtk/gtkframe.hxx
+++ b/vcl/inc/unx/gtk/gtkframe.hxx
@@ -551,7 +551,7 @@ public:
     // reparent window to act as a plugin; implementation
     // may choose to use a new system window internally
     // return false to indicate failure
-    virtual bool                SetPluginParent( SystemParentData* pNewParent ) override;
+    virtual void                SetPluginParent( SystemParentData* pNewParent ) override;
 
     virtual void                SetScreenNumber( unsigned int ) override;
     virtual void                SetApplicationID( const OUString &rWMClass ) override;
diff --git a/vcl/inc/unx/salframe.h b/vcl/inc/unx/salframe.h
index 0c56bc677d04..1107ac9feb71 100644
--- a/vcl/inc/unx/salframe.h
+++ b/vcl/inc/unx/salframe.h
@@ -245,7 +245,7 @@ public:
     virtual KeyIndicatorState   GetIndicatorState() override;
     virtual void                SimulateKeyPress( sal_uInt16 nKeyCode ) override;
     virtual void                SetParent( SalFrame* pNewParent ) override;
-    virtual bool                SetPluginParent( SystemParentData* pNewParent ) override;
+    virtual void                SetPluginParent( SystemParentData* pNewParent ) override;
 
     virtual void                SetScreenNumber( unsigned int ) override;
     virtual void                SetApplicationID( const OUString &rWMClass ) override;
diff --git a/vcl/inc/win/salframe.h b/vcl/inc/win/salframe.h
index 5068ecd987aa..de0f3b37c1ff 100644
--- a/vcl/inc/win/salframe.h
+++ b/vcl/inc/win/salframe.h
@@ -131,7 +131,7 @@ public:
     virtual KeyIndicatorState   GetIndicatorState() override;
     virtual void                SimulateKeyPress( sal_uInt16 nKeyCode ) override;
     virtual void                SetParent( SalFrame* pNewParent ) override;
-    virtual bool                SetPluginParent( SystemParentData* pNewParent ) override;
+    virtual void                SetPluginParent( SystemParentData* pNewParent ) override;
     virtual void                SetScreenNumber( unsigned int ) override;
     virtual void                SetApplicationID( const OUString &rApplicationID ) override;
     virtual void                ResetClipRegion() override;
diff --git a/vcl/osx/salframe.cxx b/vcl/osx/salframe.cxx
index 650526ad08c6..18263fa5ea46 100644
--- a/vcl/osx/salframe.cxx
+++ b/vcl/osx/salframe.cxx
@@ -1587,13 +1587,12 @@ void AquaSalFrame::SimulateKeyPress( sal_uInt16 /*nKeyCode*/ )
 {
 }
 
-bool AquaSalFrame::SetPluginParent( SystemParentData* )
+void AquaSalFrame::SetPluginParent( SystemParentData* )
 {
     // plugin parent may be killed unexpectedly by
     // plugging process;
 
     //TODO: implement
-    return false;
 }
 
 bool AquaSalFrame::MapUnicodeToKeyCode( sal_Unicode , LanguageType , vcl::KeyCode& )
diff --git a/vcl/qt5/Qt5Frame.cxx b/vcl/qt5/Qt5Frame.cxx
index eb043ae1862a..36ce1222cb5e 100644
--- a/vcl/qt5/Qt5Frame.cxx
+++ b/vcl/qt5/Qt5Frame.cxx
@@ -1178,10 +1178,9 @@ void Qt5Frame::SimulateKeyPress(sal_uInt16 nKeyCode)
 
 void Qt5Frame::SetParent(SalFrame* pNewParent) { m_pParent = static_cast<Qt5Frame*>(pNewParent); }
 
-bool Qt5Frame::SetPluginParent(SystemParentData* /*pNewParent*/)
+void Qt5Frame::SetPluginParent(SystemParentData* /*pNewParent*/)
 {
     //FIXME: no SetPluginParent impl. for qt5
-    return false;
 }
 
 void Qt5Frame::ResetClipRegion() { m_bNullRegion = true; }
diff --git a/vcl/unx/generic/window/salframe.cxx b/vcl/unx/generic/window/salframe.cxx
index d5e1427e9af2..6e1c392706a9 100644
--- a/vcl/unx/generic/window/salframe.cxx
+++ b/vcl/unx/generic/window/salframe.cxx
@@ -2457,14 +2457,12 @@ void X11SalFrame::createNewWindow( ::Window aNewParent, SalX11Screen nXScreen )
     // FIXME: SalObjects
 }
 
-bool X11SalFrame::SetPluginParent( SystemParentData* pNewParent )
+void X11SalFrame::SetPluginParent( SystemParentData* pNewParent )
 {
     if( pNewParent->nSize >= sizeof(SystemParentData) )
         m_bXEmbed = pNewParent->aWindow != None && pNewParent->bXEmbedSupport;
 
     createNewWindow(pNewParent->aWindow);
-
-    return true;
 }
 
 // Sound
diff --git a/vcl/unx/gtk3/gtkframe.cxx b/vcl/unx/gtk3/gtkframe.cxx
index ba3fcf4e7615..14f2a2e76c59 100644
--- a/vcl/unx/gtk3/gtkframe.cxx
+++ b/vcl/unx/gtk3/gtkframe.cxx
@@ -2586,10 +2586,9 @@ void GtkSalFrame::SetParent( SalFrame* pNewParent )
                                      );
 }
 
-bool GtkSalFrame::SetPluginParent( SystemParentData* )
+void GtkSalFrame::SetPluginParent( SystemParentData* )
 {
     //FIXME: no SetPluginParent impl. for gtk3
-    return false;
 }
 
 void GtkSalFrame::ResetClipRegion()
diff --git a/vcl/win/window/salframe.cxx b/vcl/win/window/salframe.cxx
index a727d8a76462..559598b20446 100644
--- a/vcl/win/window/salframe.cxx
+++ b/vcl/win/window/salframe.cxx
@@ -1555,7 +1555,7 @@ void WinSalFrame::SetParent( SalFrame* pNewParent )
     WinSalFrame::mbInReparent = false;
 }
 
-bool WinSalFrame::SetPluginParent( SystemParentData* pNewParent )
+void WinSalFrame::SetPluginParent( SystemParentData* pNewParent )
 {
     if ( pNewParent->hWnd == nullptr )
     {
@@ -1565,7 +1565,6 @@ bool WinSalFrame::SetPluginParent( SystemParentData* pNewParent )
     WinSalFrame::mbInReparent = true;
     ImplSetParentFrame( pNewParent->hWnd, true );
     WinSalFrame::mbInReparent = false;
-    return true;
 }
 
 void WinSalFrame::GetWorkArea( tools::Rectangle &rRect )


More information about the Libreoffice-commits mailing list