summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Sherlock <chris.sherlock79@gmail.com>2014-02-03 15:02:11 +1100
committerCaolán McNamara <caolanm@redhat.com>2014-02-05 14:41:18 +0000
commitd892e5d4da5b4fe4664c22a6bde21619b62eeae5 (patch)
tree7e684ff309588173aff36f517468b4bcb9fa2392
parente45c729da21c6923032b64c543136efe066b756a (diff)
fdo#74424 Use Window::GetOutDev() to access ImplGetGraphics()
Part of the decoupling of Window from OutputDevice. We now get the Window's OutputDevice instance and manipulate this. Do not rely on the inherited function. Conflicts: vcl/source/window/window2.cxx Change-Id: I964596bb6457ccb24e69bad15c497dbf97e5880f Reviewed-on: https://gerrit.libreoffice.org/7789 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--vcl/source/window/window.cxx10
-rw-r--r--vcl/source/window/window2.cxx4
2 files changed, 10 insertions, 4 deletions
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index a5ebc0ce04e6..6c3dca204be2 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -937,7 +937,8 @@ void Window::ImplInit( Window* pParent, WinBits nStyle, SystemParentData* pSyste
}
else
{
- if ( ImplGetGraphics() )
+ OutputDevice *pOutDev = GetOutDev();
+ if ( pOutDev->ImplGetGraphics() )
{
mpGraphics->GetResolution( mpWindowImpl->mpFrameData->mnDPIX, mpWindowImpl->mpFrameData->mnDPIY );
}
@@ -1396,9 +1397,14 @@ ImplWinData* Window::ImplGetWinData() const
SalGraphics* Window::ImplGetFrameGraphics() const
{
if ( mpWindowImpl->mpFrameWindow->mpGraphics )
+ {
mpWindowImpl->mpFrameWindow->mbInitClipRegion = true;
+ }
else
- mpWindowImpl->mpFrameWindow->ImplGetGraphics();
+ {
+ OutputDevice *pFrameWinOutDev = mpWindowImpl->mpFrameWindow;
+ pFrameWinOutDev->ImplGetGraphics();
+ }
mpWindowImpl->mpFrameWindow->mpGraphics->ResetClipRegion();
return mpWindowImpl->mpFrameWindow->mpGraphics;
}
diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx
index 0af25502f68c..ba9976b46c69 100644
--- a/vcl/source/window/window2.cxx
+++ b/vcl/source/window/window2.cxx
@@ -424,7 +424,7 @@ void Window::Invert( const Polygon& rPoly, sal_uInt16 nFlags )
// we need a graphics
if ( !mpGraphics )
{
- if ( !ImplGetGraphics() )
+ if ( !pOutDev->ImplGetGraphics() )
return;
}
@@ -505,7 +505,7 @@ void Window::InvertTracking( const Rectangle& rRect, sal_uInt16 nFlags )
// we need a graphics
if ( !mpGraphics )
{
- if ( !ImplGetGraphics() )
+ if ( !pOutDev->ImplGetGraphics() )
return;
}