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>
This commit is contained in:
@@ -923,7 +923,7 @@ uno::Reference< ::media::XPlayerWindow > SAL_CALL Player::createPlayerWindow( co
|
||||
sal_IntPtr pIntPtr = 0;
|
||||
rArguments[ 2 ] >>= pIntPtr;
|
||||
SystemChildWindow *pParentWindow = reinterpret_cast< SystemChildWindow* >( pIntPtr );
|
||||
const SystemEnvData* pEnvData = pParentWindow ? pParentWindow->GetSystemData() : nullptr;
|
||||
const SystemEnvData* pEnvData = pParentWindow ? pParentWindow->GetSystemChildSystemData() : nullptr;
|
||||
OSL_ASSERT(pEnvData);
|
||||
if (pEnvData)
|
||||
{
|
||||
|
@@ -184,7 +184,7 @@ namespace
|
||||
|
||||
SystemChildWindow *pParentWindow = reinterpret_cast< SystemChildWindow* >( pIntPtr );
|
||||
|
||||
const SystemEnvData* pEnvData = pParentWindow ? pParentWindow->GetSystemData() : nullptr;
|
||||
const SystemEnvData* pEnvData = pParentWindow ? pParentWindow->GetSystemChildSystemData() : nullptr;
|
||||
|
||||
if (pEnvData == nullptr)
|
||||
return -1;
|
||||
|
@@ -608,7 +608,7 @@ namespace dxcanvas
|
||||
mpWindow->SetControlForeground();
|
||||
mpWindow->SetControlBackground();
|
||||
|
||||
const SystemEnvData *pData = mpWindow->GetSystemData();
|
||||
const SystemEnvData *pData = mpWindow->GetSystemChildSystemData();
|
||||
const HWND hwnd(reinterpret_cast<HWND>(pData->hWnd));
|
||||
mhWnd = const_cast<HWND>(hwnd);
|
||||
|
||||
|
@@ -64,7 +64,7 @@ namespace dxcanvas
|
||||
VCLUnoHelper::GetInterface(&rWindow),
|
||||
uno::UNO_QUERY_THROW) );
|
||||
|
||||
const SystemEnvData *pData = rWindow.GetSystemData();
|
||||
const SystemEnvData *pData = rWindow.GetWindowSystemData();
|
||||
const HWND hWnd = reinterpret_cast<HWND>(pData->hWnd);
|
||||
if( !IsWindow( hWnd ) )
|
||||
throw lang::NoSupportException( "Passed window has invalid system window, or canvas out-of-process!" );
|
||||
|
@@ -322,7 +322,7 @@ namespace oglcanvas
|
||||
/*
|
||||
* TODO: moggi: fix it!
|
||||
// switch buffer, sync etc.
|
||||
const unx::Window aXWindow=pChildWindow->GetSystemData()->aWindow;
|
||||
const unx::Window aXWindow=pChildWindow->GetSystemChildSystemData()->aWindow;
|
||||
unx::glXSwapBuffers(reinterpret_cast<unx::Display*>(mpDisplay),
|
||||
aXWindow);
|
||||
pChildWindow->Show();
|
||||
|
@@ -271,7 +271,7 @@ namespace dbaui
|
||||
{
|
||||
OUString sOldDataSource=getURLNoPrefix();
|
||||
OUString sNewDataSource;
|
||||
HWND hWnd = GetParent()->GetSystemData()->hWnd;
|
||||
HWND hWnd = GetParent()->GetWindowSystemData()->hWnd;
|
||||
sNewDataSource = getAdoDatalink((LONG_PTR)hWnd,sOldDataSource);
|
||||
if ( !sNewDataSource.isEmpty() )
|
||||
{
|
||||
|
@@ -44,7 +44,7 @@ public:
|
||||
virtual ~SystemChildWindow();
|
||||
virtual void dispose() override;
|
||||
|
||||
const SystemEnvData* GetSystemData() const;
|
||||
const SystemEnvData* GetSystemChildSystemData() const;
|
||||
|
||||
// per default systemchildwindows erase their background for better plugin support
|
||||
// however, this might not always be required
|
||||
|
@@ -1215,8 +1215,8 @@ public:
|
||||
void SaveBackground( const Point& rPos, const Size& rSize,
|
||||
const Point& rDestOff, VirtualDevice& rSaveDevice );
|
||||
|
||||
const SystemEnvData* GetSystemData() const;
|
||||
css::uno::Any GetSystemDataAny() const;
|
||||
const SystemEnvData* GetWindowSystemData() const;
|
||||
css::uno::Any GetWindowSystemDataAny() const;
|
||||
|
||||
// API to set/query the component interfaces
|
||||
virtual css::uno::Reference< css::awt::XWindowPeer >
|
||||
|
@@ -72,7 +72,7 @@ css::uno::Any VCLXSystemDependentWindow::getWindowHandle( const css::uno::Sequen
|
||||
vcl::Window* pWindow = GetWindow();
|
||||
if ( pWindow )
|
||||
{
|
||||
const SystemEnvData* pSysData = static_cast<SystemChildWindow *>(pWindow)->GetSystemData();
|
||||
const SystemEnvData* pSysData = static_cast<SystemChildWindow *>(pWindow)->GetSystemChildSystemData();
|
||||
if( pSysData )
|
||||
{
|
||||
#if defined(_WIN32)
|
||||
|
@@ -83,7 +83,7 @@ css::uno::Any VCLXTopWindow_Base::getWindowHandle( const css::uno::Sequence< sal
|
||||
vcl::Window* pWindow = GetWindowImpl();
|
||||
if ( pWindow )
|
||||
{
|
||||
const SystemEnvData* pSysData = static_cast<SystemWindow *>(pWindow)->GetSystemData();
|
||||
const SystemEnvData* pSysData = static_cast<SystemWindow *>(pWindow)->GetWindowSystemData();
|
||||
if( pSysData )
|
||||
{
|
||||
#if defined (_WIN32)
|
||||
|
@@ -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
|
||||
|
||||
|
@@ -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;
|
||||
}
|
||||
}
|
||||
|
@@ -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 )
|
||||
{
|
||||
|
@@ -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;
|
||||
|
@@ -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 );
|
||||
|
@@ -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;
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -89,7 +89,7 @@ void AccFrameEventListener::HandleChildChangedEvent(Any oldValue, Any newValue)
|
||||
VCLXWindow* pvclwindow =
|
||||
dynamic_cast<VCLXWindow*>(m_xAccessible.get());
|
||||
vcl::Window* window = pvclwindow->GetWindow();
|
||||
const SystemEnvData* systemdata=window->GetSystemData();
|
||||
const SystemEnvData* systemdata=window->GetWindowSystemData();
|
||||
|
||||
//add this child
|
||||
pAgent->InsertAccObj(pAcc, m_xAccessible.get(),
|
||||
|
@@ -57,7 +57,7 @@ void AccTopWindowListener::HandleWindowOpened( css::accessibility::XAccessible*
|
||||
const SystemEnvData* systemdata = NULL;
|
||||
try
|
||||
{
|
||||
systemdata = window->GetSystemData();
|
||||
systemdata = window->GetWindowSystemData();
|
||||
}
|
||||
catch(...)
|
||||
{
|
||||
|
Reference in New Issue
Block a user