summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2016-05-19 13:51:13 +0100
committerCaolán McNamara <caolanm@redhat.com>2016-05-19 14:45:54 +0000
commitaea9c5ecdc17dbc15497afa4b6202f8af8a1a6d5 (patch)
tree53c218ac59c81bee4cbda9e3d5a3ed28fca48304 /vcl
parent2383d557e5751387451cefa33516736228429137 (diff)
rename to two GetSystemData methods to find all call-sites
anyplace calling GetSystemChildSystemData on a SystemChildWindow is definitely right anyplace calling GetWindowSystemData on a Window *might* have intended to call GetSystemChildSystemData on a Window casted back to an underlying SystemChildWindow. Change-Id: I7dcf3a50d0b7ed29bc08cfdb15cc0dcb86be8fa7 Reviewed-on: https://gerrit.libreoffice.org/25158 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/opengl/OpenGLContext.cxx8
-rw-r--r--vcl/source/window/cairo_cairo.cxx4
-rw-r--r--vcl/source/window/mouse.cxx2
-rw-r--r--vcl/source/window/syschild.cxx10
-rw-r--r--vcl/source/window/window.cxx34
-rw-r--r--vcl/unx/generic/app/i18n_status.cxx10
-rw-r--r--vcl/unx/generic/fontmanager/fontconfig.cxx2
-rw-r--r--vcl/unx/kde/UnxFilePicker.cxx2
-rw-r--r--vcl/unx/kde4/KDE4FilePicker.cxx2
9 files changed, 49 insertions, 25 deletions
diff --git a/vcl/source/opengl/OpenGLContext.cxx b/vcl/source/opengl/OpenGLContext.cxx
index f254974727c9..f36c61010f30 100644
--- a/vcl/source/opengl/OpenGLContext.cxx
+++ b/vcl/source/opengl/OpenGLContext.cxx
@@ -1114,7 +1114,7 @@ bool OpenGLContext::initWindow()
if (m_pChildWindow)
{
InitChildWindow(m_pChildWindow.get());
- const SystemEnvData* sysData(m_pChildWindow->GetSystemData());
+ const SystemEnvData* sysData(m_pChildWindow->GetSystemChildSystemData());
m_aGLWin.hWnd = sysData->hWnd;
}
@@ -1159,7 +1159,7 @@ bool OpenGLContext::initWindow()
{
m_pChildWindow = VclPtr<SystemChildWindow>::Create(mpWindow, 0, &winData, false);
}
- pChildSysData = m_pChildWindow->GetSystemData();
+ pChildSysData = m_pChildWindow->GetSystemChildSystemData();
}
if (!m_pChildWindow || !pChildSysData)
@@ -1309,7 +1309,7 @@ SystemWindowData OpenGLContext::generateWinData(vcl::Window* pParent, bool)
aWinData.pVisual = nullptr;
#if !defined(LIBO_HEADLESS)
- const SystemEnvData* sysData(pParent->GetSystemData());
+ const SystemEnvData* sysData(pParent->GetWindowSystemData());
Display *dpy = static_cast<Display*>(sysData->pDisplay);
Window win = sysData->aWindow;
@@ -1590,7 +1590,7 @@ bool OpenGLContext::supportMultiSampling() const
#if defined(MACOSX)
NSOpenGLView* OpenGLContext::getOpenGLView()
{
- return reinterpret_cast<NSOpenGLView*>(m_pChildWindow->GetSystemData()->mpNSView);
+ return reinterpret_cast<NSOpenGLView*>(m_pChildWindow->GetSystemChildSystemData()->mpNSView);
}
#endif
diff --git a/vcl/source/window/cairo_cairo.cxx b/vcl/source/window/cairo_cairo.cxx
index 54b27dc98cf7..fd6181e3b589 100644
--- a/vcl/source/window/cairo_cairo.cxx
+++ b/vcl/source/window/cairo_cairo.cxx
@@ -41,9 +41,9 @@ namespace cairo
// method is unfortunately not virtual
const SystemChildWindow* pSysChild = dynamic_cast< const SystemChildWindow* >( pOutputWindow );
if( pSysChild )
- pSysData = pSysChild->GetSystemData();
+ pSysData = pSysChild->GetSystemChildSystemData();
else
- pSysData = pOutputWindow->GetSystemData();
+ pSysData = pOutputWindow->GetWindowSystemData();
return pSysData;
}
}
diff --git a/vcl/source/window/mouse.cxx b/vcl/source/window/mouse.cxx
index 19cdc7334cbc..ee89b8c6fd73 100644
--- a/vcl/source/window/mouse.cxx
+++ b/vcl/source/window/mouse.cxx
@@ -725,7 +725,7 @@ Reference< css::datatransfer::dnd::XDragSource > Window::GetDragSource()
try
{
Reference< XComponentContext > xContext( comphelper::getProcessComponentContext() );
- const SystemEnvData * pEnvData = GetSystemData();
+ const SystemEnvData * pEnvData = GetWindowSystemData();
if( pEnvData )
{
diff --git a/vcl/source/window/syschild.cxx b/vcl/source/window/syschild.cxx
index 7f92c641127d..854f508ecaef 100644
--- a/vcl/source/window/syschild.cxx
+++ b/vcl/source/window/syschild.cxx
@@ -112,7 +112,7 @@ void SystemChildWindow::ImplInitSysChild( vcl::Window* pParent, WinBits nStyle,
Window::ImplInit( pParent, nStyle, nullptr );
// we do not paint if it is the right SysChild
- if ( GetSystemData() )
+ if ( GetSystemChildSystemData() )
{
mpWindowImpl->mpSysObj->SetCallback( this, ImplSysChildProc );
SetParentClipMode( ParentClipMode::Clip );
@@ -148,7 +148,7 @@ void SystemChildWindow::dispose()
Window::dispose();
}
-const SystemEnvData* SystemChildWindow::GetSystemData() const
+const SystemEnvData* SystemChildWindow::GetSystemChildSystemData() const
{
if ( mpWindowImpl->mpSysObj )
return mpWindowImpl->mpSysObj->GetSystemData();
@@ -206,16 +206,16 @@ sal_IntPtr SystemChildWindow::GetParentWindowHandle()
sal_IntPtr nRet = 0;
#if defined(_WIN32)
- nRet = reinterpret_cast< sal_IntPtr >( GetSystemData()->hWnd );
+ nRet = reinterpret_cast< sal_IntPtr >( GetSystemChildSystemData()->hWnd );
#elif defined MACOSX
// FIXME: this is wrong
- nRet = reinterpret_cast< sal_IntPtr >( GetSystemData()->mpNSView );
+ nRet = reinterpret_cast< sal_IntPtr >( GetSystemChildSystemData()->mpNSView );
#elif defined ANDROID
// Nothing
#elif defined IOS
// Nothing
#elif defined UNX
- nRet = (sal_IntPtr) GetSystemData()->aWindow;
+ nRet = (sal_IntPtr) GetSystemChildSystemData()->aWindow;
#endif
return nRet;
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index 105f62f56879..4d7795b4fa42 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -3602,12 +3602,36 @@ Reference< css::rendering::XCanvas > Window::ImplGetCanvas( bool bSpriteCanvas )
const SystemChildWindow* pSysChild = dynamic_cast< const SystemChildWindow* >( this );
if( pSysChild )
{
- aArg[ 1 ] = pSysChild->GetSystemDataAny();
+ /*
+ Note the comment expresses the desire to call the GetSystemChildSystemData variant
+ which it did initially on
+
+ commit 807c11075f63801f5b29a665c01b946bd7554785
+ Author: Rüdiger Timm <rt@openoffice.org>
+ Date: Fri Nov 26 19:44:05 2004 +0000
+
+ INTEGRATION: CWS presentationengine01 (1.195.30); FILE MERGED
+ 2004/11/17 19:52:23 thb 1.195.30.9: RESYNC: (1.199-1.200); FILE MERGED
+
+ but on
+
+ commit d551190e8311242eadda4a3e82efff160175cb04
+ Author: Kurt Zenker <kz@openoffice.org>
+ Date: Tue Jun 24 10:41:50 2008 +0000
+
+ INTEGRATION: CWS canvas05 (1.264.12); FILE MERGED
+ 2008/04/21 07:47:51 thb 1.264.12.5: RESYNC: (1.277-1.278); FILE MERGED
+
+ GetSystemData was changed to GetSystemDataAny which does not
+ have a shadowed call in SystemChildWindow, so that turned this from
+ using the GetSystemChildSystemData variant to the GetWindowSystemData variant
+ */
+ aArg[ 1 ] = pSysChild->GetWindowSystemDataAny();
aArg[ 5 ] = pSysChild->GetSystemGfxDataAny();
}
else
{
- aArg[ 1 ] = GetSystemDataAny();
+ aArg[ 1 ] = GetWindowSystemDataAny();
aArg[ 5 ] = GetSystemGfxDataAny();
}
@@ -3700,16 +3724,16 @@ void Window::ApplySettings(vcl::RenderContext& /*rRenderContext*/)
{
}
-const SystemEnvData* Window::GetSystemData() const
+const SystemEnvData* Window::GetWindowSystemData() const
{
return mpWindowImpl->mpFrame ? mpWindowImpl->mpFrame->GetSystemData() : nullptr;
}
-Any Window::GetSystemDataAny() const
+Any Window::GetWindowSystemDataAny() const
{
Any aRet;
- const SystemEnvData* pSysData = GetSystemData();
+ const SystemEnvData* pSysData = GetWindowSystemData();
if( pSysData )
{
Sequence< sal_Int8 > aSeq( reinterpret_cast<sal_Int8 const *>(pSysData), pSysData->nSize );
diff --git a/vcl/unx/generic/app/i18n_status.cxx b/vcl/unx/generic/app/i18n_status.cxx
index 6ed22df78795..90c8d8966b36 100644
--- a/vcl/unx/generic/app/i18n_status.cxx
+++ b/vcl/unx/generic/app/i18n_status.cxx
@@ -157,7 +157,7 @@ void XIMStatusWindow::layout()
if (m_bAnchoredAtRight && IsVisible())
{
- SalFrame* pFrame = static_cast<SalFrame*>(GetSystemData()->pSalFrame);
+ SalFrame* pFrame = static_cast<SalFrame*>(GetWindowSystemData()->pSalFrame);
long nDelta = pFrame->maGeometry.nWidth - m_aWindowSize.Width();
pFrame->SetPosSize( pFrame->maGeometry.nX + nDelta,
pFrame->maGeometry.nY,
@@ -249,7 +249,7 @@ void XIMStatusWindow::setPosition( SalFrame* pParent )
}
if( IsVisible() )
{
- const SystemEnvData* pEnvData = GetSystemData();
+ const SystemEnvData* pEnvData = GetWindowSystemData();
SalFrame* pStatusFrame = static_cast<SalFrame*>(pEnvData->pSalFrame);
Point aPoint = updatePosition();
pStatusFrame->SetPosSize( aPoint.X(), aPoint.Y(), m_aWindowSize.Width(), m_aWindowSize.Height(), SAL_FRAME_POSSIZE_X | SAL_FRAME_POSSIZE_Y | SAL_FRAME_POSSIZE_WIDTH | SAL_FRAME_POSSIZE_HEIGHT );
@@ -260,7 +260,7 @@ void XIMStatusWindow::setPosition( SalFrame* pParent )
IMPL_LINK_NOARG_TYPED(XIMStatusWindow, DelayedShowHdl, void*, void)
{
m_nDelayedEvent = nullptr;
- const SystemEnvData* pData = GetSystemData();
+ const SystemEnvData* pData = GetWindowSystemData();
SalFrame* pStatusFrame = static_cast<SalFrame*>(pData->pSalFrame);
if( m_bDelayedShow )
{
@@ -348,7 +348,7 @@ IIIMPStatusWindow::IIIMPStatusWindow( SalFrame* pParent, bool bOn ) :
if( pParent )
{
- const SystemEnvData* pEnvData = GetSystemData();
+ const SystemEnvData* pEnvData = GetWindowSystemData();
const SalFrameGeometry& rGeom( pParent->GetUnmirroredGeometry() );
int nDistance = rGeom.nTopDecoration;
@@ -593,7 +593,7 @@ SalFrame* I18NStatus::getStatusFrame() const
SalFrame* pRet = nullptr;
if( m_pStatusWindow )
{
- const SystemEnvData* pData = m_pStatusWindow->GetSystemData();
+ const SystemEnvData* pData = m_pStatusWindow->GetWindowSystemData();
pRet = static_cast<SalFrame*>(pData->pSalFrame);
}
return pRet;
diff --git a/vcl/unx/generic/fontmanager/fontconfig.cxx b/vcl/unx/generic/fontmanager/fontconfig.cxx
index 73ad87afe6b0..912838c4e60d 100644
--- a/vcl/unx/generic/fontmanager/fontconfig.cxx
+++ b/vcl/unx/generic/fontmanager/fontconfig.cxx
@@ -881,7 +881,7 @@ namespace
guint get_xid_for_dbus()
{
const vcl::Window *pTopWindow = Application::IsHeadlessModeEnabled() ? nullptr : Application::GetActiveTopWindow();
- const SystemEnvData* pEnvData = pTopWindow ? pTopWindow->GetSystemData() : nullptr;
+ const SystemEnvData* pEnvData = pTopWindow ? pTopWindow->GetWindowSystemData() : nullptr;
return pEnvData ? pEnvData->aWindow : 0;
}
#endif
diff --git a/vcl/unx/kde/UnxFilePicker.cxx b/vcl/unx/kde/UnxFilePicker.cxx
index 8dce0e0d0610..b57ba0a45609 100644
--- a/vcl/unx/kde/UnxFilePicker.cxx
+++ b/vcl/unx/kde/UnxFilePicker.cxx
@@ -819,7 +819,7 @@ void UnxFilePicker::initFilePicker()
vcl::Window *pParentWin = Application::GetDefDialogParent();
if ( pParentWin )
{
- const SystemEnvData* pSysData = pParentWin->GetSystemData();
+ const SystemEnvData* pSysData = pParentWin->GetWindowSystemData();
if ( pSysData )
{
snprintf( pWinId, nIdLen, "%ld", pSysData->aWindow ); // unx only
diff --git a/vcl/unx/kde4/KDE4FilePicker.cxx b/vcl/unx/kde4/KDE4FilePicker.cxx
index 229aa020bb98..68728a4affd2 100644
--- a/vcl/unx/kde4/KDE4FilePicker.cxx
+++ b/vcl/unx/kde4/KDE4FilePicker.cxx
@@ -243,7 +243,7 @@ sal_Int16 SAL_CALL KDE4FilePicker::execute()
vcl::Window *pParentWin = Application::GetDefDialogParent();
if ( pParentWin )
{
- const SystemEnvData* pSysData = pParentWin->GetSystemData();
+ const SystemEnvData* pSysData = pParentWin->GetWindowSystemData();
if ( pSysData )
{
KWindowSystem::setMainWindow( _dialog, pSysData->aWindow); // unx only