diff options
author | Noel Grandin <noel@peralex.com> | 2012-12-11 14:59:39 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2012-12-13 05:20:59 +0200 |
commit | dde234b6955a421d51d2b37e4fc3972c660146f0 (patch) | |
tree | d9f5824ccb30141c3d3742e2229b3bf83ffd116b /vcl/win | |
parent | 37b6871fa1fb12c4b2b45db5f3e6ac583577f538 (diff) |
fdo#46808, remove awt::DisplayAccess service.
This service was never documented in an IDL file.
All it did was provide a wrapper around some VCL module API.
Now that we can link the VCL stuff into SD and SDEXT, just
access the API directly.
Change-Id: Ic0ba34c2bca797baa7319878d98cfe3a4ec59d4d
Diffstat (limited to 'vcl/win')
-rw-r--r-- | vcl/win/source/window/salframe.cxx | 41 |
1 files changed, 14 insertions, 27 deletions
diff --git a/vcl/win/source/window/salframe.cxx b/vcl/win/source/window/salframe.cxx index f2110d54677b..b673c463f59b 100644 --- a/vcl/win/source/window/salframe.cxx +++ b/vcl/win/source/window/salframe.cxx @@ -783,40 +783,27 @@ static void ImplSalCalcFullScreenSize( const WinSalFrame* pFrame, try { - uno::Reference< XMultiServiceFactory > xFactory( ::comphelper::getProcessServiceFactory(), UNO_QUERY_THROW ); - uno::Reference< XIndexAccess > xMultiMon( xFactory->createInstance( "com.sun.star.awt.DisplayAccess" ), UNO_QUERY_THROW ); - sal_Int32 nMonitors = xMultiMon->getCount(); + sal_Int32 nMonitors = Application::GetScreenCount(); if( (pFrame->mnDisplay >= 0) && (pFrame->mnDisplay < nMonitors) ) { - uno::Reference< XPropertySet > xMonitor( xMultiMon->getByIndex( pFrame->mnDisplay ), UNO_QUERY_THROW ); - com::sun::star::awt::Rectangle aRect; - if( xMonitor->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "ScreenArea" ) ) ) >>= aRect ) - { - nScreenX = aRect.X; - nScreenY = aRect.Y; - nScreenDX = aRect.Width+1; // difference between java/awt convention and vcl - nScreenDY = aRect.Height+1; // difference between java/awt convention and vcl - } + com::sun::star::awt::Rectangle aRect = Application::GetScreenPosSizePixel( pFrame->mnDisplay ); + nScreenX = aRect.X; + nScreenY = aRect.Y; + nScreenDX = aRect.Width+1; // difference between java/awt convention and vcl + nScreenDY = aRect.Height+1; // difference between java/awt convention and vcl } else { Rectangle aCombined; - uno::Reference< XPropertySet > xMonitor( xMultiMon->getByIndex( 0 ), UNO_QUERY_THROW ); - com::sun::star::awt::Rectangle aRect; - if( xMonitor->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "ScreenArea" ) ) ) >>= aRect ) + com::sun::star::awt::Rectangle aRect = Application::GetScreenPosSizePixel( 0 ); + aCombined.Left() = aRect.X; + aCombined.Top() = aRect.Y; + aCombined.Right() = aRect.X + aRect.Width; + aCombined.Bottom() = aRect.Y + aRect.Height; + for( sal_Int32 i = 1 ; i < nMonitors ; i++ ) { - aCombined.Left() = aRect.X; - aCombined.Top() = aRect.Y; - aCombined.Right() = aRect.X + aRect.Width; - aCombined.Bottom() = aRect.Y + aRect.Height; - for( sal_Int32 i = 1 ; i < nMonitors ; i++ ) - { - xMonitor = uno::Reference< XPropertySet >( xMultiMon->getByIndex(i), UNO_QUERY_THROW ); - if( xMonitor->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "ScreenArea" ) ) ) >>= aRect ) - { - aCombined.Union( Rectangle( aRect.X, aRect.Y, aRect.X+aRect.Width, aRect.Y+aRect.Height ) ); - } - } + aRect = Application::GetScreenPosSizePixel( i ); + aCombined.Union( Rectangle( aRect.X, aRect.Y, aRect.X+aRect.Width, aRect.Y+aRect.Height ) ); } nScreenX = aCombined.Left(); nScreenY = aCombined.Top(); |