[Libreoffice-commits] core.git: include/vcl vcl/headless vcl/inc vcl/osx vcl/qt5 vcl/unx vcl/win
Stephan Bergmann (via logerrit)
logerrit at kemper.freedesktop.org
Sun Oct 6 07:14:47 UTC 2019
include/vcl/sysdata.hxx | 8 +++-----
vcl/headless/svpdummies.cxx | 6 ------
vcl/headless/svpframe.cxx | 1 -
vcl/headless/svpinst.cxx | 2 +-
vcl/inc/headless/svpdummies.hxx | 1 -
vcl/osx/salframe.cxx | 2 --
vcl/osx/salobj.cxx | 1 -
vcl/qt5/Qt5Frame.cxx | 2 --
vcl/qt5/Qt5Object.cxx | 1 -
vcl/unx/generic/window/salframe.cxx | 1 -
vcl/unx/generic/window/salobj.cxx | 1 -
vcl/unx/gtk3/gtk3gtkframe.cxx | 1 -
vcl/unx/gtk3/gtk3gtkobject.cxx | 1 -
vcl/win/window/salframe.cxx | 1 -
vcl/win/window/salobj.cxx | 1 -
15 files changed, 4 insertions(+), 26 deletions(-)
New commits:
commit 070b3a848d6824ea154ae2d68fc7571feed60a5f
Author: Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Sat Oct 5 18:36:38 2019 +0200
Commit: Stephan Bergmann <sbergman at redhat.com>
CommitDate: Sun Oct 6 09:13:47 2019 +0200
SystemEnvData::nSize is no longer read and can be removed
...since 5926b22b5dc33490d23d594b129eb8a70b94ffb0 "The SystemEnvData passed into
the canvas factories appears to be unused". (And the user-provided SvpSalObject
ctor can be removed, at which point the use in SvpSalInstance::CreateObject
should be written without "()" to avoid loplugin:subtlezeroinit.
Change-Id: I4392fa2d697b29c814d7b577a7b1f8c984c05e70
Reviewed-on: https://gerrit.libreoffice.org/80298
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
diff --git a/include/vcl/sysdata.hxx b/include/vcl/sysdata.hxx
index 722c223f5e19..e7a8f5d2df55 100644
--- a/include/vcl/sysdata.hxx
+++ b/include/vcl/sysdata.hxx
@@ -51,7 +51,6 @@ typedef struct CGContext *CGContextRef;
struct SystemEnvData
{
- sal_uInt32 nSize; // size in bytes of this structure
#if defined(_WIN32)
HWND hWnd; // the window hwnd
#elif defined( MACOSX )
@@ -76,16 +75,15 @@ struct SystemEnvData
#endif
SystemEnvData()
- : nSize(0)
#if defined(_WIN32)
- , hWnd(nullptr)
+ : hWnd(nullptr)
#elif defined( MACOSX )
- , mpNSView(nullptr)
+ : mpNSView(nullptr)
, mbOpenGL(false)
#elif defined( ANDROID )
#elif defined( IOS )
#elif defined( UNX )
- , pDisplay(nullptr)
+ : pDisplay(nullptr)
, aWindow(0)
, pSalFrame(nullptr)
, pWidget(nullptr)
diff --git a/vcl/headless/svpdummies.cxx b/vcl/headless/svpdummies.cxx
index 9fab8f15f990..548868c05349 100644
--- a/vcl/headless/svpdummies.cxx
+++ b/vcl/headless/svpdummies.cxx
@@ -21,12 +21,6 @@
#include <headless/svpdummies.hxx>
#include <headless/svpinst.hxx>
-// SalObject
-SvpSalObject::SvpSalObject()
-{
- m_aSystemChildData.nSize = sizeof( SystemEnvData );
-}
-
SvpSalObject::~SvpSalObject()
{
}
diff --git a/vcl/headless/svpframe.cxx b/vcl/headless/svpframe.cxx
index 977d83d08fcf..20876ef2ff0a 100644
--- a/vcl/headless/svpframe.cxx
+++ b/vcl/headless/svpframe.cxx
@@ -55,7 +55,6 @@ SvpSalFrame::SvpSalFrame( SvpSalInstance* pInstance,
m_nMaxHeight( 0 )
{
// SAL_DEBUG("SvpSalFrame::SvpSalFrame: " << this);
- m_aSystemChildData.nSize = sizeof( SystemEnvData );
#ifdef IOS
// Nothing
#elif defined ANDROID
diff --git a/vcl/headless/svpinst.cxx b/vcl/headless/svpinst.cxx
index 6b415d39135f..617ac21fa884 100644
--- a/vcl/headless/svpinst.cxx
+++ b/vcl/headless/svpinst.cxx
@@ -230,7 +230,7 @@ void SvpSalInstance::DestroyFrame( SalFrame* pFrame )
SalObject* SvpSalInstance::CreateObject( SalFrame*, SystemWindowData*, bool )
{
- return new SvpSalObject();
+ return new SvpSalObject;
}
void SvpSalInstance::DestroyObject( SalObject* pObject )
diff --git a/vcl/inc/headless/svpdummies.hxx b/vcl/inc/headless/svpdummies.hxx
index ddcc7d7e3860..760b6f9a43a5 100644
--- a/vcl/inc/headless/svpdummies.hxx
+++ b/vcl/inc/headless/svpdummies.hxx
@@ -31,7 +31,6 @@ class VCL_DLLPUBLIC SvpSalObject : public SalObject
public:
SystemEnvData m_aSystemChildData;
- SvpSalObject();
virtual ~SvpSalObject() override;
// override all pure virtual methods
diff --git a/vcl/osx/salframe.cxx b/vcl/osx/salframe.cxx
index 3057611d12b8..0ab8d9160dcf 100644
--- a/vcl/osx/salframe.cxx
+++ b/vcl/osx/salframe.cxx
@@ -84,8 +84,6 @@ AquaSalFrame::AquaSalFrame( SalFrame* pParent, SalFrameStyleFlags salFrameStyle
mrClippingPath( nullptr ),
mnICOptions( InputContextFlags::NONE )
{
- maSysData.nSize = sizeof( SystemEnvData );
-
mpParent = dynamic_cast<AquaSalFrame*>(pParent);
initWindowAndView();
diff --git a/vcl/osx/salobj.cxx b/vcl/osx/salobj.cxx
index fb1105b6adb7..34679dcdbaf7 100644
--- a/vcl/osx/salobj.cxx
+++ b/vcl/osx/salobj.cxx
@@ -43,7 +43,6 @@ AquaSalObject::AquaSalObject( AquaSalFrame* pFrame, SystemWindowData const * pWi
mnWidth( 20 ),
mnHeight( 20 )
{
- maSysData.nSize = sizeof( maSysData );
maSysData.mpNSView = nullptr;
maSysData.mbOpenGL = false;
diff --git a/vcl/qt5/Qt5Frame.cxx b/vcl/qt5/Qt5Frame.cxx
index a18af04b5cbd..01e501ab1ba4 100644
--- a/vcl/qt5/Qt5Frame.cxx
+++ b/vcl/qt5/Qt5Frame.cxx
@@ -165,8 +165,6 @@ Qt5Frame::Qt5Frame(Qt5Frame* pParent, SalFrameStyleFlags nStyle, bool bUseCairo)
pChildWindow->setTransientParent(pParentWindow);
}
- m_aSystemData.nSize = sizeof(SystemEnvData);
-
// Calling 'QWidget::winId()' implicitly enables native windows to be used
// rather than "alien widgets" that are unknown to the windowing system,
// s. https://doc.qt.io/qt-5/qwidget.html#native-widgets-vs-alien-widgets
diff --git a/vcl/qt5/Qt5Object.cxx b/vcl/qt5/Qt5Object.cxx
index 961622eeb893..4deffda7d18e 100644
--- a/vcl/qt5/Qt5Object.cxx
+++ b/vcl/qt5/Qt5Object.cxx
@@ -41,7 +41,6 @@ Qt5Object::Qt5Object(Qt5Frame* pParent, bool bShow)
if (bShow)
m_pQWidget->show();
- m_aSystemData.nSize = sizeof(SystemEnvData);
m_aSystemData.aShellWindow = reinterpret_cast<sal_IntPtr>(this);
//m_aSystemData.pSalFrame = this;
m_aSystemData.pWidget = m_pQWidget;
diff --git a/vcl/unx/generic/window/salframe.cxx b/vcl/unx/generic/window/salframe.cxx
index ed2a3bb2c3bb..370b47cbdb6b 100644
--- a/vcl/unx/generic/window/salframe.cxx
+++ b/vcl/unx/generic/window/salframe.cxx
@@ -948,7 +948,6 @@ void X11SalFrame::SetExtendedFrameStyle( SalExtStyle nStyle )
const SystemEnvData* X11SalFrame::GetSystemData() const
{
X11SalFrame *pFrame = const_cast<X11SalFrame*>(this);
- pFrame->maSystemChildData.nSize = sizeof( SystemEnvData );
pFrame->maSystemChildData.pDisplay = GetXDisplay();
pFrame->maSystemChildData.aWindow = pFrame->GetWindow();
pFrame->maSystemChildData.pSalFrame = pFrame;
diff --git a/vcl/unx/generic/window/salobj.cxx b/vcl/unx/generic/window/salobj.cxx
index 9fe34d4528b9..c5719362af3d 100644
--- a/vcl/unx/generic/window/salobj.cxx
+++ b/vcl/unx/generic/window/salobj.cxx
@@ -219,7 +219,6 @@ X11SalObject::X11SalObject()
, maColormap(0)
, mbVisible(false)
{
- maSystemChildData.nSize = sizeof( SystemEnvData );
maSystemChildData.pDisplay = vcl_sal::getSalDisplay(GetGenericUnixSalData())->GetDisplay();
maSystemChildData.aWindow = None;
maSystemChildData.pSalFrame = nullptr;
diff --git a/vcl/unx/gtk3/gtk3gtkframe.cxx b/vcl/unx/gtk3/gtk3gtkframe.cxx
index b37d75ed4ba4..164699768496 100644
--- a/vcl/unx/gtk3/gtk3gtkframe.cxx
+++ b/vcl/unx/gtk3/gtk3gtkframe.cxx
@@ -963,7 +963,6 @@ void GtkSalFrame::InitCommon()
gtk_widget_realize( m_pWindow );
//system data
- m_aSystemData.nSize = sizeof( SystemEnvData );
m_aSystemData.aWindow = GetNativeWindowHandle(m_pWindow);
m_aSystemData.aShellWindow = reinterpret_cast<sal_IntPtr>(this);
m_aSystemData.pSalFrame = this;
diff --git a/vcl/unx/gtk3/gtk3gtkobject.cxx b/vcl/unx/gtk3/gtk3gtkobject.cxx
index 04db858a3ade..a4c7fb5864dc 100644
--- a/vcl/unx/gtk3/gtk3gtkobject.cxx
+++ b/vcl/unx/gtk3/gtk3gtkobject.cxx
@@ -48,7 +48,6 @@ GtkSalObject::GtkSalObject( GtkSalFrame* pParent, bool bShow )
gtk_widget_realize( m_pSocket );
// system data
- m_aSystemData.nSize = sizeof( SystemEnvData );
m_aSystemData.aWindow = pParent->GetNativeWindowHandle(m_pSocket);
m_aSystemData.aShellWindow = reinterpret_cast<sal_IntPtr>(this);
m_aSystemData.pSalFrame = nullptr;
diff --git a/vcl/win/window/salframe.cxx b/vcl/win/window/salframe.cxx
index cb46d5e29279..4546031b20b3 100644
--- a/vcl/win/window/salframe.cxx
+++ b/vcl/win/window/salframe.cxx
@@ -869,7 +869,6 @@ WinSalFrame::WinSalFrame()
mbPropertiesStored = false;
memset( &maState, 0, sizeof( SalFrameState ) );
- maSysData.nSize = sizeof( SystemEnvData );
memset( &maGeometry, 0, sizeof( maGeometry ) );
diff --git a/vcl/win/window/salobj.cxx b/vcl/win/window/salobj.cxx
index a1489a9cc42d..9840994bc9fa 100644
--- a/vcl/win/window/salobj.cxx
+++ b/vcl/win/window/salobj.cxx
@@ -550,7 +550,6 @@ WinSalObject::WinSalObject()
mhWnd = nullptr;
mhWndChild = nullptr;
mhLastFocusWnd = nullptr;
- maSysData.nSize = sizeof( SystemEnvData );
mpStdClipRgnData = nullptr;
// Insert object in objectlist
More information about the Libreoffice-commits
mailing list