diff options
author | Noel Grandin <noel@peralex.com> | 2012-12-14 12:58:00 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2012-12-21 10:57:09 +0200 |
commit | bb121c864cc3c101ef733a4088c7ba3e36eced14 (patch) | |
tree | 2d528ca830aace6e563b7cdc93eb8f8d6c4f70cf /chart2 | |
parent | Updated core (diff) | |
download | core-bb121c864cc3c101ef733a4088c7ba3e36eced14.tar.gz core-bb121c864cc3c101ef733a4088c7ba3e36eced14.zip |
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 'chart2')
-rw-r--r-- | chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx | 24 | ||||
-rw-r--r-- | chart2/source/controller/main/ChartController_Window.cxx | 5 |
2 files changed, 9 insertions, 20 deletions
diff --git a/chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx b/chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx index 5d4e8a593b46..67ff9fa490fe 100644 --- a/chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx +++ b/chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx @@ -36,7 +36,7 @@ #include <com/sun/star/awt/Point.hpp> #include <com/sun/star/awt/Size.hpp> #include <com/sun/star/beans/PropertyValue.hpp> -#include <com/sun/star/frame/XDesktop.hpp> +#include <com/sun/star/frame/Desktop.hpp> //............................................................................. namespace chart @@ -52,14 +52,9 @@ CreationWizardUnoDlg::CreationWizardUnoDlg( const uno::Reference< uno::XComponen , m_pDialog( 0 ) , m_bUnlockControllersOnExecute(false) { - uno::Reference< frame::XDesktop > xDesktop( - m_xCC->getServiceManager()->createInstanceWithContext( - "com.sun.star.frame.Desktop" , m_xCC ), uno::UNO_QUERY ); - if( xDesktop.is() ) - { - uno::Reference< frame::XTerminateListener > xListener( this ); - xDesktop->addTerminateListener( xListener ); - } + uno::Reference< frame::XDesktop2 > xDesktop = frame::Desktop::create(m_xCC); + uno::Reference< frame::XTerminateListener > xListener( this ); + xDesktop->addTerminateListener( xListener ); } CreationWizardUnoDlg::~CreationWizardUnoDlg() { @@ -290,14 +285,9 @@ void SAL_CALL CreationWizardUnoDlg::disposing() try { - uno::Reference< frame::XDesktop > xDesktop( - m_xCC->getServiceManager()->createInstanceWithContext( - "com.sun.star.frame.Desktop" , m_xCC ), uno::UNO_QUERY ); - if( xDesktop.is() ) - { - uno::Reference< frame::XTerminateListener > xListener( this ); - xDesktop->removeTerminateListener( xListener ); - } + uno::Reference< frame::XDesktop2 > xDesktop = frame::Desktop::create(m_xCC); + uno::Reference< frame::XTerminateListener > xListener( this ); + xDesktop->removeTerminateListener( xListener ); } catch( const uno::Exception & ex ) { diff --git a/chart2/source/controller/main/ChartController_Window.cxx b/chart2/source/controller/main/ChartController_Window.cxx index bfb89202cbbe..7f66efbc628b 100644 --- a/chart2/source/controller/main/ChartController_Window.cxx +++ b/chart2/source/controller/main/ChartController_Window.cxx @@ -1323,13 +1323,12 @@ bool ChartController::execute_KeyInput( const KeyEvent& rKEvt ) return bReturn; // handle accelerators - if( ! m_apAccelExecute.get() && m_xFrame.is() && m_xCC.is() && m_xCC->getServiceManager().is() ) + if( ! m_apAccelExecute.get() && m_xFrame.is() && m_xCC.is() ) { m_apAccelExecute.reset( ::svt::AcceleratorExecute::createAcceleratorHelper()); OSL_ASSERT( m_apAccelExecute.get()); if( m_apAccelExecute.get() ) - m_apAccelExecute->init( - uno::Reference< lang::XMultiServiceFactory >( m_xCC->getServiceManager(), uno::UNO_QUERY ), m_xFrame ); + m_apAccelExecute->init( m_xCC, m_xFrame ); } KeyCode aKeyCode( rKEvt.GetKeyCode()); |