summaryrefslogtreecommitdiff
path: root/touch/source/uno/Document.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2012-12-14 12:58:00 +0200
committerNoel Grandin <noel@peralex.com>2012-12-21 10:57:09 +0200
commitbb121c864cc3c101ef733a4088c7ba3e36eced14 (patch)
tree2d528ca830aace6e563b7cdc93eb8f8d6c4f70cf /touch/source/uno/Document.cxx
parent6d818ed651aaafcfb12ebc21449d35947d2e85a9 (diff)
fdo#46808, Convert frame::Desktop to new style service.
I had to drop XEventBroadcaster from the merged interface because it introduced method name conflicts (addEventListener). Shouldn't be an issue since it was scheduled to be dropped anyhow, and the service implementation still implements it, so existing clients will be fine. I dropped the interface XPropertySet from the combined IDL because nobody seems to be using it, and it's primary purpose appears to be to set weird flags. I dropped the optional interfaces XStatusIndicatorFactory XDispatchInformationProvider from the combined IDL because the service does not implement them, and nobody seems to be using them. I suspect they were mistakenly copied from XFrame. I also did not convert the Title, UserDefinedAttributes and LayoutManager properties to attributes, again because no-one is using them. Change-Id: I678a00006ed2cca2d6c37c4e39465811442c33af
Diffstat (limited to 'touch/source/uno/Document.cxx')
-rw-r--r--touch/source/uno/Document.cxx9
1 files changed, 3 insertions, 6 deletions
diff --git a/touch/source/uno/Document.cxx b/touch/source/uno/Document.cxx
index 0acb9031d775..d59e4e1e4af1 100644
--- a/touch/source/uno/Document.cxx
+++ b/touch/source/uno/Document.cxx
@@ -15,7 +15,7 @@
#include <com/sun/star/beans/NamedValue.hpp>
#include <com/sun/star/beans/PropertyValues.hpp>
#include <com/sun/star/frame/XComponentLoader.hpp>
-#include <com/sun/star/frame/XDesktop.hpp>
+#include <com/sun/star/frame/Desktop.hpp>
#include <com/sun/star/lang/XInitialization.hpp>
#include <com/sun/star/view/XRenderable.hpp>
@@ -147,10 +147,7 @@ public:
if ( arguments[0] >>= m_sURI )
{
// create( [in] string uri );
- uno::Reference< frame::XDesktop > desktop( m_rContext->getServiceManager()->createInstanceWithContext( "com.sun.star.frame.Desktop", m_rContext ), uno::UNO_QUERY_THROW );
- uno::Reference< frame::XComponentLoader > componentLoader( desktop, uno::UNO_QUERY_THROW );
-
- (void) componentLoader;
+ uno::Reference< frame::XDesktop2 > desktop = frame::Desktop::Create( m_rContext );
beans::PropertyValues loadProps(3);
loadProps[0].Name = "Hidden";
@@ -160,7 +157,7 @@ public:
loadProps[2].Name = "Preview";
loadProps[2].Value <<= sal_Bool(true);
- m_xComponent = componentLoader->loadComponentFromURL( m_sURI, "_blank", 0, loadProps );
+ m_xComponent = desktop->loadComponentFromURL( m_sURI, "_blank", 0, loadProps );
m_xToolkit = uno::Reference< awt::XToolkitExperimental >( m_rContext->getServiceManager()->createInstanceWithContext( "com.sun.star.awt.ToolkitExperimental", m_rContext ), uno::UNO_QUERY_THROW );