summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--basctl/source/dlged/dlged.cxx6
-rw-r--r--filter/source/t602/t602filter.cxx8
-rw-r--r--xmlscript/test/imexp.cxx3
3 files changed, 7 insertions, 10 deletions
diff --git a/basctl/source/dlged/dlged.cxx b/basctl/source/dlged/dlged.cxx
index 5bad05d4d4af..8e55c02387c2 100644
--- a/basctl/source/dlged/dlged.cxx
+++ b/basctl/source/dlged/dlged.cxx
@@ -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 );
diff --git a/filter/source/t602/t602filter.cxx b/filter/source/t602/t602filter.cxx
index 54876048ebc6..0d3c948e0996 100644
--- a/filter/source/t602/t602filter.cxx
+++ b/filter/source/t602/t602filter.cxx
@@ -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 );
diff --git a/xmlscript/test/imexp.cxx b/xmlscript/test/imexp.cxx
index 9466af05b822..c75cb8104ec7 100644
--- a/xmlscript/test/imexp.cxx
+++ b/xmlscript/test/imexp.cxx
@@ -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(