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 /framework/source/layoutmanager/layoutmanager.cxx | |
parent | Remove unnecessary member field (diff) | |
download | core-dde234b6955a421d51d2b37e4fc3972c660146f0.tar.gz core-dde234b6955a421d51d2b37e4fc3972c660146f0.zip |
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 'framework/source/layoutmanager/layoutmanager.cxx')
-rw-r--r-- | framework/source/layoutmanager/layoutmanager.cxx | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/framework/source/layoutmanager/layoutmanager.cxx b/framework/source/layoutmanager/layoutmanager.cxx index a91642888977..ece410cc8432 100644 --- a/framework/source/layoutmanager/layoutmanager.cxx +++ b/framework/source/layoutmanager/layoutmanager.cxx @@ -113,7 +113,6 @@ LayoutManager::LayoutManager( const Reference< XMultiServiceFactory >& xServiceM , LayoutManager_PBase( *(static_cast< ::cppu::OBroadcastHelper* >(this)) ) , m_xSMGR( xServiceManager ) , m_xURLTransformer( URLTransformer::create(::comphelper::getComponentContext(xServiceManager)) ) - , m_xDisplayAccess( xServiceManager->createInstance( SERVICENAME_DISPLAYACCESS ), UNO_QUERY ) , m_nLockCount( 0 ) , m_bActive( false ) , m_bInplaceMenuSet( false ) @@ -2472,25 +2471,15 @@ sal_Bool LayoutManager::implts_resizeContainerWindow( const awt::Size& rContaine Reference< awt::XWindow > xContainerWindow = m_xContainerWindow; Reference< awt::XTopWindow2 > xContainerTopWindow = m_xContainerTopWindow; Reference< awt::XWindow > xComponentWindow = m_xFrame->getComponentWindow(); - Reference< container::XIndexAccess > xDisplayAccess = m_xDisplayAccess; aReadLock.unlock(); // calculate the maximum size we have for the container window - awt::Rectangle aWorkArea; - try - { - sal_Int32 nDisplay = xContainerTopWindow->getDisplay(); - Reference< beans::XPropertySet > xDisplayInfo( xDisplayAccess->getByIndex( nDisplay ), UNO_QUERY_THROW ); - OSL_VERIFY( xDisplayInfo->getPropertyValue( ::rtl::OUString( "WorkArea" ) ) >>= aWorkArea ); - } - catch( const Exception& ) - { - DBG_UNHANDLED_EXCEPTION(); - } + sal_Int32 nDisplay = xContainerTopWindow->getDisplay(); + Rectangle aWorkArea = Application::GetWorkAreaPosSizePixel( nDisplay ); - if (( aWorkArea.Width > 0 ) && ( aWorkArea.Height > 0 )) + if (( aWorkArea.GetWidth() > 0 ) && ( aWorkArea.GetHeight() > 0 )) { - if (( rContainerSize.Width > aWorkArea.Width ) || ( rContainerSize.Height > aWorkArea.Height )) + if (( rContainerSize.Width > aWorkArea.GetWidth() ) || ( rContainerSize.Height > aWorkArea.GetHeight() )) return sal_False; // Strictly, this is not correct. If we have a multi-screen display (css.awt.DisplayAccess.MultiDisplay == true), // the the "effective work area" would be much larger than the work area of a single display, since we could in theory |