summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Sherlock <chris.sherlock79@gmail.com>2014-11-21 01:34:07 +1100
committerChris Sherlock <chris.sherlock79@gmail.com>2014-11-20 20:36:06 +0000
commita91d3c0751f75b08561bf7d047043471956af747 (patch)
tree8aa59cdbd793d0198e60bb167d6f9746fe29d0b8
parentbe5ef396a54da1a8aa4b9c23b43496f1f407e447 (diff)
vcl: remove Application as friend of OutputDevice
Change-Id: Id8296445c72334164db149440c60c89823c94e40 Reviewed-on: https://gerrit.libreoffice.org/12989 Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com> Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
-rw-r--r--include/vcl/outdev.hxx4
-rw-r--r--vcl/source/app/svapp.cxx26
2 files changed, 16 insertions, 14 deletions
diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx
index dfe88aab9347..e1a9ca4d5f0c 100644
--- a/include/vcl/outdev.hxx
+++ b/include/vcl/outdev.hxx
@@ -255,7 +255,6 @@ extern const sal_uLong nVCLLut[ 256 ];
class VCL_DLLPUBLIC OutputDevice: private boost::noncopyable
{
- friend class Application;
friend class ::Bitmap;
friend class ImplImageBmp;
friend class Printer;
@@ -463,6 +462,9 @@ public:
*/
SAL_DLLPRIVATE sal_Int32 GetDPIY() const { return mnDPIY; }
+ SAL_DLLPRIVATE void SetDPIX( sal_Int32 nDPIX ) { mnDPIX = nDPIX; }
+ SAL_DLLPRIVATE void SetDPIY( sal_Int32 nDPIY ) { mnDPIY = nDPIY; }
+
sal_Int32 GetDPIScaleFactor() const { return mnDPIScaleFactor; }
OutDevType GetOutDevType() const { return meOutDevType; }
diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx
index 8d99977983be..29f160e069c2 100644
--- a/vcl/source/app/svapp.cxx
+++ b/vcl/source/app/svapp.cxx
@@ -548,8 +548,8 @@ void Application::SetSettings( const AllSettings& rSettings )
long nOldDPIY = 0;
if ( pFirstFrame )
{
- nOldDPIX = pFirstFrame->mnDPIX;
- nOldDPIY = pFirstFrame->mnDPIY;
+ nOldDPIX = pFirstFrame->GetDPIX();
+ nOldDPIY = pFirstFrame->GetDPIY();
vcl::Window::ImplInitAppFontData(pFirstFrame);
}
vcl::Window* pFrame = pFirstFrame;
@@ -583,19 +583,19 @@ void Application::SetSettings( const AllSettings& rSettings )
pFirstFrame = pSVData->maWinData.mpFirstFrame;
if ( pFirstFrame )
{
- if ( (pFirstFrame->mnDPIX != nOldDPIX) ||
- (pFirstFrame->mnDPIY != nOldDPIY) )
+ if ( (pFirstFrame->GetDPIX() != nOldDPIX) ||
+ (pFirstFrame->GetDPIY() != nOldDPIY) )
{
VirtualDevice* pVirDev = pSVData->maGDIData.mpFirstVirDev;
while ( pVirDev )
{
if ( pVirDev->mbScreenComp &&
- (pVirDev->mnDPIX == nOldDPIX) &&
- (pVirDev->mnDPIY == nOldDPIY) )
+ (pVirDev->GetDPIX() == nOldDPIX) &&
+ (pVirDev->GetDPIY() == nOldDPIY) )
{
- pVirDev->mnDPIX = pFirstFrame->mnDPIX;
- pVirDev->mnDPIY = pFirstFrame->mnDPIY;
- if (pVirDev->IsMapModeEnabled())
+ pVirDev->SetDPIX( pFirstFrame->GetDPIX() );
+ pVirDev->SetDPIY( pFirstFrame->GetDPIY() );
+ if ( pVirDev->IsMapModeEnabled() )
{
MapMode aMapMode = pVirDev->GetMapMode();
pVirDev->SetMapMode();
@@ -745,8 +745,8 @@ ImplSVEvent * Application::PostMouseEvent( sal_uLong nEvent, vcl::Window *pWin,
{
Point aTransformedPos( pMouseEvent->GetPosPixel() );
- aTransformedPos.X() += pWin->mnOutOffX;
- aTransformedPos.Y() += pWin->mnOutOffY;
+ aTransformedPos.X() += pWin->GetOutOffXPixel();
+ aTransformedPos.Y() += pWin->GetOutOffYPixel();
const MouseEvent aTransformedEvent( aTransformedPos, pMouseEvent->GetClicks(), pMouseEvent->GetMode(),
pMouseEvent->GetButtons(), pMouseEvent->GetModifier() );
@@ -780,8 +780,8 @@ ImplSVEvent * Application::PostZoomEvent( sal_uLong nEvent, vcl::Window *pWin, Z
{
Point aTransformedPos( pZoomEvent->GetCenter() );
- aTransformedPos.X() += pWin->mnOutOffX;
- aTransformedPos.Y() += pWin->mnOutOffY;
+ aTransformedPos.X() += pWin->GetOutOffXPixel();
+ aTransformedPos.Y() += pWin->GetOutOffYPixel();
const ZoomEvent aTransformedEvent( aTransformedPos, pZoomEvent->GetScale() );