summaryrefslogtreecommitdiff
path: root/sc/source/ui/vba/vbawindows.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/ui/vba/vbawindows.cxx')
-rw-r--r--sc/source/ui/vba/vbawindows.cxx8
1 files changed, 2 insertions, 6 deletions
diff --git a/sc/source/ui/vba/vbawindows.cxx b/sc/source/ui/vba/vbawindows.cxx
index b78d8eb1eff3..56ddccf9e9c0 100644
--- a/sc/source/ui/vba/vbawindows.cxx
+++ b/sc/source/ui/vba/vbawindows.cxx
@@ -21,7 +21,7 @@
#include <boost/unordered_map.hpp>
#include <com/sun/star/sheet/XSpreadsheetDocument.hpp>
-#include <com/sun/star/frame/XDesktop.hpp>
+#include <com/sun/star/frame/Desktop.hpp>
#include <cppuhelper/implbase3.hxx>
#include "vbawindow.hxx"
@@ -66,11 +66,7 @@ public:
WindowComponentEnumImpl( const uno::Reference< uno::XComponentContext >& xContext ) throw ( uno::RuntimeException ) : m_xContext( xContext )
{
- uno::Reference< lang::XMultiComponentFactory > xSMgr(
- m_xContext->getServiceManager(), uno::UNO_QUERY_THROW );
-
- uno::Reference< frame::XDesktop > xDesktop
- (xSMgr->createInstanceWithContext(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.Desktop")), m_xContext), uno::UNO_QUERY_THROW );
+ uno::Reference< frame::XDesktop2 > xDesktop = frame::Desktop::create(m_xContext);
uno::Reference< container::XEnumeration > mxComponents = xDesktop->getComponents()->createEnumeration();
while( mxComponents->hasMoreElements() )
{