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 /sd/source/ui/dlg/present.cxx | |
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 'sd/source/ui/dlg/present.cxx')
-rw-r--r-- | sd/source/ui/dlg/present.cxx | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/sd/source/ui/dlg/present.cxx b/sd/source/ui/dlg/present.cxx index 5b94cb347e02..1e1a8125cd10 100644 --- a/sd/source/ui/dlg/present.cxx +++ b/sd/source/ui/dlg/present.cxx @@ -26,6 +26,7 @@ #include <com/sun/star/container/XIndexAccess.hpp> #include <comphelper/processfactory.hxx> #include <svl/itemset.hxx> +#include <vcl/svapp.hxx> #include "sdattr.hxx" #include "present.hxx" @@ -176,13 +177,11 @@ void SdStartPresentationDlg::InitMonitorSettings() { try { - Reference< XMultiServiceFactory > xFactory( ::comphelper::getProcessServiceFactory(), UNO_QUERY_THROW ); - Reference< XIndexAccess > xMultiMon( xFactory->createInstance("com.sun.star.awt.DisplayAccess" ), UNO_QUERY_THROW ); maGrpMonitor.Show( true ); maFtMonitor.Show( true ); maLBMonitor.Show( true ); - mnMonitors = xMultiMon->getCount(); + mnMonitors = Application::GetScreenCount(); if( mnMonitors <= 1 ) { @@ -191,19 +190,8 @@ void SdStartPresentationDlg::InitMonitorSettings() } else { - sal_Bool bUnifiedDisplay = false; - sal_Int32 nExternalIndex = 0; - Reference< XPropertySet > xMonProps( xMultiMon, UNO_QUERY ); - if( xMonProps.is() ) try - { - const OUString sPropName1( "IsUnifiedDisplay" ); - xMonProps->getPropertyValue( sPropName1 ) >>= bUnifiedDisplay; - const OUString sPropName2( "ExternalDisplay" ); - xMonProps->getPropertyValue( sPropName2 ) >>= nExternalIndex; - } - catch( Exception& ) - { - } + sal_Bool bUnifiedDisplay = Application::IsUnifiedDisplay(); + sal_Int32 nExternalIndex = Application::GetDisplayExternalScreen(); sal_Int32 nSelectedIndex (-1); sal_Int32 nDefaultExternalIndex (-1); |