Kaydet (Commit) 5ab3015a authored tarafından Noel Grandin's avatar Noel Grandin

fdo#46808, Clean up old usages of ExtToolkit

This service no longer exists in LO, and no-one seems to know what
this service was, so convert it to use the awt::Toolkit service,
since that service returns the interface the code expects.

Change-Id: I761effbd49a9a3a15ec9c8716c72d4220a3e987e
üst be50ad28
......@@ -32,9 +32,10 @@
#include "localizationmgr.hxx"
#include "baside3.hxx"
#include <com/sun/star/awt/XDialog.hpp>
#include <com/sun/star/awt/Toolkit.hpp>
#include <com/sun/star/awt/UnoControlDialog.hpp>
#include <com/sun/star/awt/UnoControlDialogModel.hpp>
#include <com/sun/star/awt/XDialog.hpp>
#include <com/sun/star/resource/StringResource.hpp>
#include <com/sun/star/util/XCloneable.hpp>
#include <com/sun/star/util/NumberFormatsSupplier.hpp>
......@@ -89,7 +90,6 @@ DlgEdHint::~DlgEdHint()
void DlgEditor::ShowDialog()
{
uno::Reference< lang::XMultiServiceFactory > xMSF = getProcessServiceFactory();
uno::Reference< uno::XComponentContext > xContext = getProcessComponentContext();
// create a dialog
......@@ -137,7 +137,7 @@ void DlgEditor::ShowDialog()
xDlg->setModel( xDlgMod );
// create a peer
uno::Reference< awt::XToolkit> xToolkit( xMSF->createInstance( "com.sun.star.awt.ExtToolkit" ), uno::UNO_QUERY );
uno::Reference< awt::XToolkit> xToolkit = awt::Toolkit::create( xContext );
xDlg->createPeer( xToolkit, rWindow.GetComponentInterface() );
uno::Reference< awt::XDialog > xD( xDlg, uno::UNO_QUERY );
......
......@@ -25,6 +25,7 @@
#include <cppuhelper/factory.hxx>
#include <cppuhelper/bootstrap.hxx>
#include <com/sun/star/awt/Toolkit.hpp>
#include <com/sun/star/awt/UnoControlDialogModel.hpp>
#include <com/sun/star/bridge/XUnoUrlResolver.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
......@@ -939,9 +940,6 @@ sal_Bool T602ImportFilterDialog::OptionsDlg()
_prop->setPropertyValue(OUString::createFromAscii(_nam), any);
#define _propGet(_prop,_nam) \
_prop->getPropertyValue(OUString::createFromAscii(_nam));
#define _InstCtx(_path,_ctx)\
rServiceManager->createInstanceWithContext(\
OUString::createFromAscii(_path),_ctx);
#define _Insert(_cont,_nam,_obj) \
any <<= _obj;\
_cont->insertByName( OUString::createFromAscii(_nam), any );
......@@ -1069,9 +1067,7 @@ sal_Bool T602ImportFilterDialog::OptionsDlg()
dialog->setModel( xControlModel );
Reference< XInterface > toolkit = _InstCtx("com.sun.star.awt.ExtToolkit", rComponentContext);
Reference < XToolkit > xToolkit (toolkit,UNO_QUERY);
Reference < XToolkit > xToolkit = Toolkit::create( rComponentContext );
dialog->setVisible( false );
dialog->createPeer( xToolkit, NULL );
......
......@@ -34,6 +34,7 @@
#include <vcl/svapp.hxx>
#include <com/sun/star/awt/Toolkit.hpp>
#include <com/sun/star/awt/UnoControlDialog.hpp>
#include <com/sun/star/awt/UnoControlDialogModel.hpp>
#include <com/sun/star/awt/XToolkit.hpp>
......@@ -172,7 +173,7 @@ void MyApp::Main()
{
::comphelper::setProcessServiceFactory( xMSF );
Reference< awt::XToolkit> xToolkit( xMSF->createInstance( "com.sun.star.awt.ExtToolkit" ), UNO_QUERY );
Reference< awt::XToolkit> xToolkit = awt::Toolkit::create( xContext );
// import dialogs
OString aParam1( OUStringToOString(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment