summaryrefslogtreecommitdiff
path: root/sd/source/ui/slideshow/slideshow.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sd/source/ui/slideshow/slideshow.cxx')
-rw-r--r--sd/source/ui/slideshow/slideshow.cxx23
1 files changed, 2 insertions, 21 deletions
diff --git a/sd/source/ui/slideshow/slideshow.cxx b/sd/source/ui/slideshow/slideshow.cxx
index 9980082e99b3..af2033e8560b 100644
--- a/sd/source/ui/slideshow/slideshow.cxx
+++ b/sd/source/ui/slideshow/slideshow.cxx
@@ -101,25 +101,6 @@ namespace {
private:
::boost::shared_ptr<SlideShowRestarter> mpRestarter;
};
-
- /** Return the default display id (or -1 when that can not be
- determined.)
- */
- sal_Int32 GetExternalDisplay (void)
- {
- try
- {
- Reference< XMultiServiceFactory > xFactory(::comphelper::getProcessServiceFactory(), UNO_QUERY_THROW );
- Reference< XPropertySet > xMonProps(xFactory->createInstance( "com.sun.star.awt.DisplayAccess" ), UNO_QUERY_THROW );
- sal_Int32 nPrimaryIndex (-1);
- if (xMonProps->getPropertyValue( "ExternalDisplay" ) >>= nPrimaryIndex)
- return nPrimaryIndex;
- }
- catch( Exception& )
- {
- }
- return -1;
- }
}
@@ -573,7 +554,7 @@ void SAL_CALL SlideShow::setPropertyValue( const OUString& aPropertyName, const
{
// Convert value to true display id.
if (nDisplay == 0)
- nDisplay = GetExternalDisplay();
+ nDisplay = Application::GetDisplayExternalScreen();
else if (nDisplay < 0)
nDisplay = -1;
else
@@ -665,7 +646,7 @@ Any SAL_CALL SlideShow::getPropertyValue( const OUString& PropertyName ) throw(U
SdOptions* pOptions = SD_MOD()->GetSdOptions(DOCUMENT_TYPE_IMPRESS);
const sal_Int32 nDisplay (pOptions->GetDisplay());
// Convert true display id to the previously used schema.
- if (nDisplay == GetExternalDisplay())
+ if (nDisplay == (sal_Int32)Application::GetDisplayExternalScreen())
return Any(sal_Int32(0));
else if (nDisplay < 0)
return Any(sal_Int32(-1));