summaryrefslogtreecommitdiff
path: root/vcl/source/window
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/source/window
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/source/window')
-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
4 files changed, 37 insertions, 13 deletions
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 );