summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-03-19 13:08:47 +0200
committerNoel Grandin <noel@peralex.com>2013-03-20 07:32:53 +0200
commita066525b42a1ab8dc60e10a5d62819c259904f32 (patch)
tree0c21130ff82a482ab80de0fcc3c73be0125d06f5 /svtools
parent6999a50efaaf802ccd4c7eb7957af17cc32602be (diff)
fdo#46808, Convert a bunch of comphelper::ComponentContext stuff
.. to Reference<XComponentContext> mostly in the dbaccess module, but it also affected some other modules. Change-Id: I09b3f6fe7a9b33498b11d98b5521b5aeeb8882be
Diffstat (limited to 'svtools')
-rw-r--r--svtools/inc/svtools/genericunodialog.hxx4
-rw-r--r--svtools/source/uno/addrtempuno.cxx11
-rw-r--r--svtools/source/uno/genericunodialog.cxx18
3 files changed, 7 insertions, 26 deletions
diff --git a/svtools/inc/svtools/genericunodialog.hxx b/svtools/inc/svtools/genericunodialog.hxx
index 326a2380333a..d1d532f7a1f1 100644
--- a/svtools/inc/svtools/genericunodialog.hxx
+++ b/svtools/inc/svtools/genericunodialog.hxx
@@ -37,7 +37,6 @@
#include <comphelper/uno3.hxx>
#include <comphelper/propertycontainer.hxx>
#include <comphelper/broadcasthelper.hxx>
-#include <comphelper/componentcontext.hxx>
#include <tools/link.hxx>
class Dialog;
@@ -86,13 +85,12 @@ namespace svt
com::sun::star::uno::Reference<com::sun::star::awt::XWindow> m_xParent; /// parent window
// </properties>
- ::comphelper::ComponentContext m_aContext;
+ com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> m_aContext;
public:
inline bool needInitialization() const { return m_bNeedInitialization && !m_bInitialized; }
protected:
- OGenericUnoDialog(const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& _rxORB);
OGenericUnoDialog(const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& _rxContext);
virtual ~OGenericUnoDialog();
diff --git a/svtools/source/uno/addrtempuno.cxx b/svtools/source/uno/addrtempuno.cxx
index ca255facf1c1..c7e6cebd0e23 100644
--- a/svtools/source/uno/addrtempuno.cxx
+++ b/svtools/source/uno/addrtempuno.cxx
@@ -22,6 +22,7 @@
#include <comphelper/extract.hxx>
#include <cppuhelper/typeprovider.hxx>
#include <comphelper/property.hxx>
+#include <comphelper/processfactory.hxx>
#include <com/sun/star/sdbc/XDataSource.hpp>
// .......................................................................
@@ -53,7 +54,7 @@ namespace svt
::rtl::OUString m_sTable;
protected:
- OAddressBookSourceDialogUno(const Reference< XMultiServiceFactory >& _rxORB);
+ OAddressBookSourceDialogUno(const Reference< XComponentContext >& _rxORB);
public:
// XTypeProvider
@@ -97,7 +98,7 @@ namespace svt
}
//-------------------------------------------------------------------------
- OAddressBookSourceDialogUno::OAddressBookSourceDialogUno(const Reference< XMultiServiceFactory >& _rxORB)
+ OAddressBookSourceDialogUno::OAddressBookSourceDialogUno(const Reference< XComponentContext >& _rxORB)
:OGenericUnoDialog(_rxORB)
{
registerProperty(::rtl::OUString(UNODIALOG_PROPERTY_ALIASES), UNODIALOG_PROPERTY_ID_ALIASES, PropertyAttribute::READONLY,
@@ -114,7 +115,7 @@ namespace svt
//-------------------------------------------------------------------------
Reference< XInterface > SAL_CALL OAddressBookSourceDialogUno::Create(const Reference< XMultiServiceFactory >& _rxFactory)
{
- return *(new OAddressBookSourceDialogUno(_rxFactory));
+ return *(new OAddressBookSourceDialogUno( comphelper::getComponentContext(_rxFactory)));
}
//-------------------------------------------------------------------------
@@ -252,9 +253,9 @@ namespace svt
Dialog* OAddressBookSourceDialogUno::createDialog(Window* _pParent)
{
if ( m_xDataSource.is() && !m_sTable.isEmpty() )
- return new AddressBookSourceDialog(_pParent, m_aContext.getUNOContext(), m_xDataSource, m_sDataSourceName, m_sTable, m_aAliases );
+ return new AddressBookSourceDialog(_pParent, m_aContext, m_xDataSource, m_sDataSourceName, m_sTable, m_aAliases );
else
- return new AddressBookSourceDialog( _pParent, m_aContext.getUNOContext() );
+ return new AddressBookSourceDialog( _pParent, m_aContext );
}
// .......................................................................
diff --git a/svtools/source/uno/genericunodialog.cxx b/svtools/source/uno/genericunodialog.cxx
index 870fffb71fc2..204ed20d4b9f 100644
--- a/svtools/source/uno/genericunodialog.cxx
+++ b/svtools/source/uno/genericunodialog.cxx
@@ -44,24 +44,6 @@ namespace svt
{
//.........................................................................
-//=========================================================================
-//-------------------------------------------------------------------------
-OGenericUnoDialog::OGenericUnoDialog(const Reference< XMultiServiceFactory >& _rxORB)
- :OPropertyContainer(GetBroadcastHelper())
- ,m_pDialog(NULL)
- ,m_bExecuting(sal_False)
- ,m_bCanceled(sal_False)
- ,m_bTitleAmbiguous(sal_True)
- ,m_bInitialized( false )
- ,m_bNeedInitialization( false )
- ,m_aContext( _rxORB )
-{
- registerProperty(::rtl::OUString(UNODIALOG_PROPERTY_TITLE), UNODIALOG_PROPERTY_ID_TITLE, PropertyAttribute::TRANSIENT,
- &m_sTitle, getCppuType(&m_sTitle));
- registerProperty(::rtl::OUString(UNODIALOG_PROPERTY_PARENT), UNODIALOG_PROPERTY_ID_PARENT, PropertyAttribute::TRANSIENT,
- &m_xParent, getCppuType(&m_xParent));
-}
-
//-------------------------------------------------------------------------
OGenericUnoDialog::OGenericUnoDialog(const Reference< XComponentContext >& _rxContext)
:OPropertyContainer(GetBroadcastHelper())