summaryrefslogtreecommitdiff
path: root/dbaccess
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 /dbaccess
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 'dbaccess')
-rw-r--r--dbaccess/inc/dataview.hxx8
-rw-r--r--dbaccess/qa/extras/macros-test.cxx5
-rw-r--r--dbaccess/source/core/dataaccess/databasecontext.cxx12
-rw-r--r--dbaccess/source/core/dataaccess/databasedocument.cxx7
-rw-r--r--dbaccess/source/core/dataaccess/documentdefinition.cxx22
-rw-r--r--dbaccess/source/core/dataaccess/documentdefinition.hxx2
-rw-r--r--dbaccess/source/filter/xml/dbloader2.cxx26
-rw-r--r--dbaccess/source/filter/xml/xmlfilter.cxx9
-rw-r--r--dbaccess/source/inc/stringconstants.inc1
-rw-r--r--dbaccess/source/ui/app/AppController.cxx2
-rw-r--r--dbaccess/source/ui/app/AppDetailPageHelper.cxx11
-rw-r--r--dbaccess/source/ui/app/AppDetailView.cxx4
-rw-r--r--dbaccess/source/ui/app/AppView.cxx2
-rw-r--r--dbaccess/source/ui/app/AppView.hxx2
-rw-r--r--dbaccess/source/ui/browser/brwctrlr.cxx2
-rw-r--r--dbaccess/source/ui/browser/brwview.cxx6
-rw-r--r--dbaccess/source/ui/browser/dataview.cxx6
-rw-r--r--dbaccess/source/ui/browser/unodatbr.cxx60
-rw-r--r--dbaccess/source/ui/dlg/dbwizsetup.cxx6
-rw-r--r--dbaccess/source/ui/inc/JoinDesignView.hxx2
-rw-r--r--dbaccess/source/ui/inc/QueryDesignView.hxx2
-rw-r--r--dbaccess/source/ui/inc/QueryViewSwitch.hxx4
-rw-r--r--dbaccess/source/ui/inc/RelationDesignView.hxx2
-rw-r--r--dbaccess/source/ui/inc/TableDesignView.hxx2
-rw-r--r--dbaccess/source/ui/inc/brwview.hxx2
-rw-r--r--dbaccess/source/ui/inc/querycontainerwindow.hxx2
-rw-r--r--dbaccess/source/ui/inc/queryview.hxx2
-rw-r--r--dbaccess/source/ui/querydesign/JoinDesignView.cxx4
-rw-r--r--dbaccess/source/ui/querydesign/QueryDesignView.cxx4
-rw-r--r--dbaccess/source/ui/querydesign/QueryViewSwitch.cxx6
-rw-r--r--dbaccess/source/ui/querydesign/querycontainerwindow.cxx8
-rw-r--r--dbaccess/source/ui/querydesign/querycontroller.cxx2
-rw-r--r--dbaccess/source/ui/querydesign/queryview.cxx4
-rw-r--r--dbaccess/source/ui/relationdesign/RelationController.cxx2
-rw-r--r--dbaccess/source/ui/relationdesign/RelationDesignView.cxx4
-rw-r--r--dbaccess/source/ui/tabledesign/TableController.cxx2
-rw-r--r--dbaccess/source/ui/tabledesign/TableDesignView.cxx2
37 files changed, 121 insertions, 128 deletions
diff --git a/dbaccess/inc/dataview.hxx b/dbaccess/inc/dataview.hxx
index 11e7fc0291be..70fcf034af6f 100644
--- a/dbaccess/inc/dataview.hxx
+++ b/dbaccess/inc/dataview.hxx
@@ -21,7 +21,7 @@
#include "dbaccessdllapi.h"
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/uno/XComponentContext.hpp>
#include <svtools/acceleratorexecute.hxx>
#include <sal/macros.h>
#include <vcl/fixed.hxx>
@@ -34,7 +34,7 @@ namespace dbaui
class IController;
class DBACCESS_DLLPUBLIC ODataView : public Window
{
- ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xServiceFactory; // the service factory to work with
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > m_xContext; // the service factory to work with
protected:
IController& m_rController; // the controller in where we resides in
@@ -44,7 +44,7 @@ namespace dbaui
public:
ODataView( Window* pParent,
IController& _rController,
- const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& ,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& ,
WinBits nStyle = 0 );
virtual ~ODataView();
@@ -63,7 +63,7 @@ namespace dbaui
*/
virtual void resizeControls(const Size& /*_rDiff*/) { Resize(); }
- ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > getORB() { return m_xServiceFactory;}
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > getORB() { return m_xContext;}
// the default implementation simply calls resizeAll( GetSizePixel() )
virtual void Resize();
diff --git a/dbaccess/qa/extras/macros-test.cxx b/dbaccess/qa/extras/macros-test.cxx
index 4be3e655c455..b3f30b9f432c 100644
--- a/dbaccess/qa/extras/macros-test.cxx
+++ b/dbaccess/qa/extras/macros-test.cxx
@@ -33,6 +33,7 @@
#include <unotest/macros_test.hxx>
#include <rtl/strbuf.hxx>
#include <osl/file.hxx>
+#include <com/sun/star/frame/Desktop.hpp>
#include <sfx2/app.hxx>
#include <sfx2/docfilt.hxx>
@@ -99,9 +100,7 @@ void DBAccessTest::setUp()
// This is a bit of a fudge, we do this to ensure that ScGlobals::ensure,
// which is a private symbol to us, gets called
- mxDesktop = Reference<com::sun::star::frame::XDesktop>( getMultiServiceFactory()->createInstance(
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.Desktop" ))), UNO_QUERY );
- CPPUNIT_ASSERT(mxDesktop.is());
+ mxDesktop = com::sun::star::frame::Desktop::create( comphelper::getComponentContext(getMultiServiceFactory()) );
}
void DBAccessTest::tearDown()
diff --git a/dbaccess/source/core/dataaccess/databasecontext.cxx b/dbaccess/source/core/dataaccess/databasecontext.cxx
index c4c625fde1d4..b5372d42f0d0 100644
--- a/dbaccess/source/core/dataaccess/databasecontext.cxx
+++ b/dbaccess/source/core/dataaccess/databasecontext.cxx
@@ -34,7 +34,7 @@
#include <com/sun/star/document/MacroExecMode.hpp>
#include <com/sun/star/document/XFilter.hpp>
#include <com/sun/star/document/XImporter.hpp>
-#include <com/sun/star/frame/XDesktop.hpp>
+#include <com/sun/star/frame/Desktop.hpp>
#include <com/sun/star/frame/XModel.hpp>
#include <com/sun/star/frame/XModel2.hpp>
#include <com/sun/star/frame/XTerminateListener.hpp>
@@ -97,11 +97,11 @@ namespace dbaccess
class DatabaseDocumentLoader : public DatabaseDocumentLoader_Base
{
private:
- Reference< XDesktop > m_xDesktop;
+ Reference< XDesktop2 > m_xDesktop;
::std::list< const ODatabaseModelImpl* > m_aDatabaseDocuments;
public:
- DatabaseDocumentLoader( const comphelper::ComponentContext& _aContext);
+ DatabaseDocumentLoader( const Reference<XComponentContext> & rxContext);
inline void append(const ODatabaseModelImpl& _rModelImpl )
{
@@ -117,12 +117,12 @@ namespace dbaccess
virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw (::com::sun::star::uno::RuntimeException);
};
- DatabaseDocumentLoader::DatabaseDocumentLoader( const comphelper::ComponentContext& _aContext )
+ DatabaseDocumentLoader::DatabaseDocumentLoader( const Reference<XComponentContext> & rxContext )
{
acquire();
try
{
- m_xDesktop.set( _aContext.createComponent( (rtl::OUString)SERVICE_FRAME_DESKTOP ), UNO_QUERY_THROW );
+ m_xDesktop.set( Desktop::create(rxContext) );
m_xDesktop->addTerminateListener( this );
}
catch( const Exception& )
@@ -173,7 +173,7 @@ ODatabaseContext::ODatabaseContext( const Reference< XComponentContext >& _rxCon
,m_aContext( _rxContext )
,m_aContainerListeners(m_aMutex)
{
- m_pDatabaseDocumentLoader = new DatabaseDocumentLoader( m_aContext );
+ m_pDatabaseDocumentLoader = new DatabaseDocumentLoader( _rxContext );
#ifndef DISABLE_SCRIPTING
::basic::BasicManagerRepository::registerCreationListener( *this );
diff --git a/dbaccess/source/core/dataaccess/databasedocument.cxx b/dbaccess/source/core/dataaccess/databasedocument.cxx
index ece5bc465e82..e3c799d49acc 100644
--- a/dbaccess/source/core/dataaccess/databasedocument.cxx
+++ b/dbaccess/source/core/dataaccess/databasedocument.cxx
@@ -38,6 +38,7 @@
#include <com/sun/star/embed/XEmbedPersist.hpp>
#include <com/sun/star/embed/XTransactedObject.hpp>
#include <com/sun/star/embed/XTransactionBroadcaster.hpp>
+#include <com/sun/star/frame/Desktop.hpp>
#include <com/sun/star/frame/ModuleManager.hpp>
#include <com/sun/star/io/XActiveDataSource.hpp>
#include <com/sun/star/io/XSeekable.hpp>
@@ -2061,10 +2062,8 @@ Reference< XTitle > ODatabaseDocument::impl_getTitleHelper_throw()
{
if ( ! m_xTitleHelper.is ())
{
- Reference< XUntitledNumbers > xDesktop(
- m_pImpl->m_aContext.createComponent( "com.sun.star.frame.Desktop" ),
- UNO_QUERY_THROW );
- uno::Reference< frame::XModel > xThis (getThis(), uno::UNO_QUERY_THROW);
+ Reference< XUntitledNumbers > xDesktop(Desktop::create(m_pImpl->m_aContext.getUNOContext()), uno::UNO_QUERY_THROW);
+ Reference< frame::XModel > xThis (getThis(), uno::UNO_QUERY_THROW);
::framework::TitleHelper* pHelper = new ::framework::TitleHelper(m_pImpl->m_aContext.getUNOContext());
m_xTitleHelper.set(static_cast< ::cppu::OWeakObject* >(pHelper), uno::UNO_QUERY_THROW);
diff --git a/dbaccess/source/core/dataaccess/documentdefinition.cxx b/dbaccess/source/core/dataaccess/documentdefinition.cxx
index d3e660e3ea3e..d0fd4dc0d9fd 100644
--- a/dbaccess/source/core/dataaccess/documentdefinition.cxx
+++ b/dbaccess/source/core/dataaccess/documentdefinition.cxx
@@ -34,6 +34,7 @@
#include <com/sun/star/awt/Size.hpp>
#include <com/sun/star/lang/DisposedException.hpp>
#include <com/sun/star/beans/PropertyAttribute.hpp>
+#include <com/sun/star/frame/Desktop.hpp>
#include <com/sun/star/frame/XModel.hpp>
#include <com/sun/star/frame/XTitle.hpp>
#include <com/sun/star/frame/XController.hpp>
@@ -603,9 +604,9 @@ namespace
}
}
-void ODocumentDefinition::impl_removeFrameFromDesktop_throw( const ::comphelper::ComponentContext& _rContxt, const Reference< XFrame >& _rxFrame )
+void ODocumentDefinition::impl_removeFrameFromDesktop_throw( const Reference<XComponentContext> & _rxContext, const Reference< XFrame >& _rxFrame )
{
- Reference< XFramesSupplier > xDesktop( _rContxt.createComponent( (::rtl::OUString)SERVICE_FRAME_DESKTOP ), UNO_QUERY_THROW );
+ Reference< XDesktop2 > xDesktop = Desktop::create( _rxContext );
Reference< XFrames > xFrames( xDesktop->getFrames(), UNO_QUERY_THROW );
xFrames->remove( _rxFrame );
}
@@ -630,7 +631,7 @@ void ODocumentDefinition::impl_onActivateEmbeddedObject_nothrow( const bool i_bR
xTopWindow->toFront();
// remove the frame from the desktop's frame collection because we need full control of it.
- impl_removeFrameFromDesktop_throw( m_aContext, xFrame );
+ impl_removeFrameFromDesktop_throw( m_aContext.getUNOContext(), xFrame );
// ensure that we ourself are kept alive as long as the embedded object's frame is
// opened
@@ -1560,16 +1561,13 @@ Sequence< PropertyValue > ODocumentDefinition::fillLoadArgs( const Reference< XC
xParentFrame = lcl_getDatabaseDocumentFrame( *m_pImpl->m_pDataSource );
if ( !xParentFrame.is() )
{ // i87957 we need a parent frame
- Reference< XComponentLoader > xDesktop( m_aContext.createComponent( (::rtl::OUString)SERVICE_FRAME_DESKTOP ), UNO_QUERY_THROW );
- xParentFrame.set( xDesktop, UNO_QUERY );
- if ( xParentFrame.is() )
+ Reference< XDesktop2 > xDesktop = Desktop::create( m_aContext.getUNOContext() );
+ xParentFrame.set( xDesktop, UNO_QUERY_THROW );
+ Reference<util::XCloseable> xCloseable(m_pImpl->m_pDataSource->getModel_noCreate(),UNO_QUERY);
+ if ( xCloseable.is() )
{
- Reference<util::XCloseable> xCloseable(m_pImpl->m_pDataSource->getModel_noCreate(),UNO_QUERY);
- if ( xCloseable.is() )
- {
- xCloseable->addCloseListener(this);
- m_bRemoveListener = sal_True;
- }
+ xCloseable->addCloseListener(this);
+ m_bRemoveListener = sal_True;
}
}
OSL_ENSURE( xParentFrame.is(), "ODocumentDefinition::fillLoadArgs: no parent frame!" );
diff --git a/dbaccess/source/core/dataaccess/documentdefinition.hxx b/dbaccess/source/core/dataaccess/documentdefinition.hxx
index 7b426031ea72..553a61f28cee 100644
--- a/dbaccess/source/core/dataaccess/documentdefinition.hxx
+++ b/dbaccess/source/core/dataaccess/documentdefinition.hxx
@@ -214,7 +214,7 @@ private:
@raises ::com::sun::star::uno::RuntimeException
*/
static void impl_removeFrameFromDesktop_throw(
- const ::comphelper::ComponentContext& _rContxt,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rContxt,
const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& _rxFrame
);
diff --git a/dbaccess/source/filter/xml/dbloader2.cxx b/dbaccess/source/filter/xml/dbloader2.cxx
index e75835cc66bb..a7c48330db81 100644
--- a/dbaccess/source/filter/xml/dbloader2.cxx
+++ b/dbaccess/source/filter/xml/dbloader2.cxx
@@ -28,6 +28,7 @@
#include <com/sun/star/document/XFilter.hpp>
#include <com/sun/star/embed/ElementModes.hpp>
#include <com/sun/star/embed/XStorage.hpp>
+#include <com/sun/star/frame/Desktop.hpp>
#include <com/sun/star/frame/XController.hpp>
#include <com/sun/star/frame/XFrame.hpp>
#include <com/sun/star/frame/XFrameLoader.hpp>
@@ -343,24 +344,21 @@ namespace
}
// ...................................................................
- Reference< XWindow > lcl_getTopMostWindow( const ::comphelper::ComponentContext& _rContext )
+ Reference< XWindow > lcl_getTopMostWindow( const Reference<XComponentContext> & _rxContext )
{
Reference< XWindow > xWindow;
// get the top most window
- Reference < XFramesSupplier > xDesktop;
- if ( _rContext.createComponent( "com.sun.star.frame.Desktop", xDesktop ) )
+ Reference < XDesktop2 > xDesktop = Desktop::create(_rxContext);
+ Reference < XFrame > xActiveFrame = xDesktop->getActiveFrame();
+ if ( xActiveFrame.is() )
{
- Reference < XFrame > xActiveFrame = xDesktop->getActiveFrame();
- if ( xActiveFrame.is() )
- {
- xWindow = xActiveFrame->getContainerWindow();
- Reference<XFrame> xFrame = xActiveFrame;
- while ( xFrame.is() && !xFrame->isTop() )
- xFrame.set(xFrame->getCreator(),UNO_QUERY);
+ xWindow = xActiveFrame->getContainerWindow();
+ Reference<XFrame> xFrame = xActiveFrame;
+ while ( xFrame.is() && !xFrame->isTop() )
+ xFrame.set(xFrame->getCreator(),UNO_QUERY);
- if ( xFrame.is() )
- xWindow = xFrame->getContainerWindow();
- }
+ if ( xFrame.is() )
+ xWindow = xFrame->getContainerWindow();
}
return xWindow;
}
@@ -373,7 +371,7 @@ sal_Bool DBContentLoader::impl_executeNewDatabaseWizard( Reference< XModel >& _r
aWizardArgs[0] <<= PropertyValue(
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ParentWindow")),
0,
- makeAny( lcl_getTopMostWindow( m_aContext ) ),
+ makeAny( lcl_getTopMostWindow( m_aContext.getUNOContext() ) ),
PropertyState_DIRECT_VALUE);
aWizardArgs[1] <<= PropertyValue(
diff --git a/dbaccess/source/filter/xml/xmlfilter.cxx b/dbaccess/source/filter/xml/xmlfilter.cxx
index 990e5ae4edaf..8ad67807c5d5 100644
--- a/dbaccess/source/filter/xml/xmlfilter.cxx
+++ b/dbaccess/source/filter/xml/xmlfilter.cxx
@@ -46,6 +46,7 @@
#include <xmloff/xmluconv.hxx>
#include "xmlHelper.hxx"
#include <com/sun/star/util/XModifiable.hpp>
+#include <com/sun/star/frame/Desktop.hpp>
#include <com/sun/star/frame/XComponentLoader.hpp>
#include <com/sun/star/frame/FrameSearchFlag.hpp>
#include <com/sun/star/lang/WrappedTargetRuntimeException.hpp>
@@ -124,13 +125,11 @@ namespace dbaxml
s_bFirstTime = false;
try
{
- uno::Reference<frame::XComponentLoader> xFrameLoad( m_xFactory->createInstance(
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.Desktop")))
- ,uno::UNO_QUERY);
+ uno::Reference<frame::XDesktop2> xDesktop = frame::Desktop::create( comphelper::getComponentContext(m_xFactory) );
const ::rtl::OUString sTarget(RTL_CONSTASCII_USTRINGPARAM("_blank"));
sal_Int32 nFrameSearchFlag = frame::FrameSearchFlag::TASKS | frame::FrameSearchFlag::CREATE;
- uno::Reference< frame::XFrame> xFrame = uno::Reference< frame::XFrame>(xFrameLoad,uno::UNO_QUERY_THROW)->findFrame(sTarget,nFrameSearchFlag);
- xFrameLoad.set( xFrame,uno::UNO_QUERY);
+ uno::Reference< frame::XFrame> xFrame = xDesktop->findFrame(sTarget,nFrameSearchFlag);
+ uno::Reference<frame::XComponentLoader> xFrameLoad(xFrame,uno::UNO_QUERY);
if ( xFrameLoad.is() )
{
diff --git a/dbaccess/source/inc/stringconstants.inc b/dbaccess/source/inc/stringconstants.inc
index 390d92dd7541..50be6eceb979 100644
--- a/dbaccess/source/inc/stringconstants.inc
+++ b/dbaccess/source/inc/stringconstants.inc
@@ -208,7 +208,6 @@ IMPLEMENT_CONSTASCII_USTRING(SERVICE_SDBCX_TABLES, "com.sun.star.sdbcx.Tables");
IMPLEMENT_CONSTASCII_USTRING(SERVICE_SDB_QUERIES, "com.sun.star.sdb.Queries");
IMPLEMENT_CONSTASCII_USTRING(SERVICE_SDBCX_INDEXCOLUMN, "com.sun.star.sdbcx.IndexColumn");
IMPLEMENT_CONSTASCII_USTRING(SERVICE_SDBCX_KEYCOLUMN, "com.sun.star.sdbcx.KeyColumn");
-IMPLEMENT_CONSTASCII_USTRING(SERVICE_FRAME_DESKTOP, "com.sun.star.frame.Desktop");
IMPLEMENT_CONSTASCII_USTRING(SERVICE_I18N_COLLATOR, "com.sun.star.i18n.Collator");
IMPLEMENT_CONSTASCII_USTRING(SERVICE_SDB_TABLEDEFINITION, "com.sun.star.sdb.TableDefinition");
IMPLEMENT_CONSTASCII_USTRING(SERVICE_SDB_COMMAND_DEFINITION, "com.sun.star.sdb.CommandDefinition");
diff --git a/dbaccess/source/ui/app/AppController.cxx b/dbaccess/source/ui/app/AppController.cxx
index e3e51372d225..43366805df60 100644
--- a/dbaccess/source/ui/app/AppController.cxx
+++ b/dbaccess/source/ui/app/AppController.cxx
@@ -444,7 +444,7 @@ void SAL_CALL OApplicationController::disposing()
//--------------------------------------------------------------------
sal_Bool OApplicationController::Construct(Window* _pParent)
{
- setView( * new OApplicationView( _pParent, getORB(), *this, m_ePreviewMode ) );
+ setView( * new OApplicationView( _pParent, comphelper::getComponentContext(getORB()), *this, m_ePreviewMode ) );
getView()->SetUniqueId(UID_APP_VIEW);
// late construction
diff --git a/dbaccess/source/ui/app/AppDetailPageHelper.cxx b/dbaccess/source/ui/app/AppDetailPageHelper.cxx
index e4e41dd96417..a053679f1436 100644
--- a/dbaccess/source/ui/app/AppDetailPageHelper.cxx
+++ b/dbaccess/source/ui/app/AppDetailPageHelper.cxx
@@ -604,7 +604,7 @@ void OAppDetailPageHelper::createTablesPage(const Reference< XConnection>& _xCon
if ( !m_pLists[E_TABLE] )
{
OTableTreeListBox* pTreeView = new OTableTreeListBox(this
- ,getBorderWin().getView()->getORB()
+ ,uno::Reference<lang::XMultiServiceFactory>(getBorderWin().getView()->getORB()->getServiceManager(), uno::UNO_QUERY_THROW)
,WB_HASLINES | WB_SORT | WB_HASBUTTONS | WB_HSCROLL |WB_HASBUTTONSATROOT | WB_TABSTOP
,sal_False);
pTreeView->SetHelpId(HID_APP_TABLE_TREE);
@@ -776,7 +776,9 @@ void OAppDetailPageHelper::fillNames( const Reference< XNameAccess >& _xContaine
// -----------------------------------------------------------------------------
DBTreeListBox* OAppDetailPageHelper::createSimpleTree( const rtl::OString& _sHelpId, const Image& _rImage)
{
- DBTreeListBox* pTreeView = new DBTreeListBox(this,getBorderWin().getView()->getORB(),WB_HASLINES | WB_SORT | WB_HASBUTTONS | WB_HSCROLL |WB_HASBUTTONSATROOT | WB_TABSTOP);
+ DBTreeListBox* pTreeView = new DBTreeListBox(this,
+ uno::Reference<lang::XMultiServiceFactory>(getBorderWin().getView()->getORB()->getServiceManager(), uno::UNO_QUERY_THROW),
+ WB_HASLINES | WB_SORT | WB_HASBUTTONS | WB_HSCROLL |WB_HASBUTTONSATROOT | WB_TABSTOP);
pTreeView->SetHelpId( _sHelpId );
return createTree( pTreeView, _rImage );
}
@@ -1142,7 +1144,7 @@ void OAppDetailPageHelper::showPreview( const ::rtl::OUString& _sDataSourceName,
{
try
{
- m_xFrame = Reference < XFrame > ( getBorderWin().getView()->getORB()->createInstance( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.Frame")) ), UNO_QUERY );
+ m_xFrame = Reference < XFrame > ( getBorderWin().getView()->getORB()->getServiceManager()->createInstanceWithContext( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.Frame")), getBorderWin().getView()->getORB() ), UNO_QUERY );
m_xFrame->initialize( m_xWindow );
// no layout manager (and thus no toolbars) in the preview
@@ -1166,7 +1168,8 @@ void OAppDetailPageHelper::showPreview( const ::rtl::OUString& _sDataSourceName,
Reference< XDatabaseDocumentUI > xApplication( getBorderWin().getView()->getAppController().getXController(), UNO_QUERY );
SAL_WNODEPRECATED_DECLARATIONS_PUSH
::std::auto_ptr< DatabaseObjectView > pDispatcher( new ResultSetBrowser(
- getBorderWin().getView()->getORB(), xApplication, NULL, _bTable
+ uno::Reference<lang::XMultiServiceFactory>(getBorderWin().getView()->getORB()->getServiceManager(), uno::UNO_QUERY_THROW),
+ xApplication, NULL, _bTable
) );
SAL_WNODEPRECATED_DECLARATIONS_POP
pDispatcher->setTargetFrame( m_xFrame );
diff --git a/dbaccess/source/ui/app/AppDetailView.cxx b/dbaccess/source/ui/app/AppDetailView.cxx
index cb26fabd6b27..d33d0e75066e 100644
--- a/dbaccess/source/ui/app/AppDetailView.cxx
+++ b/dbaccess/source/ui/app/AppDetailView.cxx
@@ -477,8 +477,8 @@ void OTasksWindow::fillTaskEntryList( const TaskEntryList& _rList )
try
{
- Reference< XModuleUIConfigurationManagerSupplier > xModuleCfgMgrSupplier(
- ModuleUIConfigurationManagerSupplier::create(comphelper::getComponentContext(getDetailView()->getBorderWin().getView()->getORB())) );
+ Reference< XModuleUIConfigurationManagerSupplier > xModuleCfgMgrSupplier =
+ ModuleUIConfigurationManagerSupplier::create( getDetailView()->getBorderWin().getView()->getORB() );
Reference< XUIConfigurationManager > xUIConfigMgr = xModuleCfgMgrSupplier->getUIConfigurationManager(
::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.sdb.OfficeDatabaseDocument" ) )
);
diff --git a/dbaccess/source/ui/app/AppView.cxx b/dbaccess/source/ui/app/AppView.cxx
index a57b03dd30d9..1402466c31c4 100644
--- a/dbaccess/source/ui/app/AppView.cxx
+++ b/dbaccess/source/ui/app/AppView.cxx
@@ -200,7 +200,7 @@ OApplicationDetailView* OAppBorderWindow::getDetailView() const
DBG_NAME(OApplicationView);
//------------------------------------------------------------------------------
OApplicationView::OApplicationView( Window* pParent
- ,const Reference< XMultiServiceFactory >& _rxOrb
+ ,const Reference< XComponentContext >& _rxOrb
,IApplicationController& _rAppController
,PreviewMode _ePreviewMode
) :
diff --git a/dbaccess/source/ui/app/AppView.hxx b/dbaccess/source/ui/app/AppView.hxx
index ab2c3ff50452..9c9cddf0e239 100644
--- a/dbaccess/source/ui/app/AppView.hxx
+++ b/dbaccess/source/ui/app/AppView.hxx
@@ -101,7 +101,7 @@ namespace dbaui
virtual void DataChanged( const DataChangedEvent& rDCEvt );
public:
OApplicationView( Window* pParent
- ,const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >&
+ ,const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >&
,IApplicationController& _rAppController
,PreviewMode _ePreviewMode
);
diff --git a/dbaccess/source/ui/browser/brwctrlr.cxx b/dbaccess/source/ui/browser/brwctrlr.cxx
index fc7237eb1f24..13b59603bf2a 100644
--- a/dbaccess/source/ui/browser/brwctrlr.cxx
+++ b/dbaccess/source/ui/browser/brwctrlr.cxx
@@ -849,7 +849,7 @@ sal_Bool SbaXDataBrowserController::Construct(Window* pParent)
// ---------------
// create the view
- setView( * new UnoDataBrowserView( pParent, *this, getORB() ) );
+ setView( * new UnoDataBrowserView( pParent, *this, comphelper::getComponentContext(getORB()) ) );
if (!getBrowserView())
return sal_False;
diff --git a/dbaccess/source/ui/browser/brwview.cxx b/dbaccess/source/ui/browser/brwview.cxx
index 168a494dc29e..c29ea1d53246 100644
--- a/dbaccess/source/ui/browser/brwview.cxx
+++ b/dbaccess/source/ui/browser/brwview.cxx
@@ -72,8 +72,8 @@ DBG_NAME(UnoDataBrowserView)
// -------------------------------------------------------------------------
UnoDataBrowserView::UnoDataBrowserView( Window* pParent,
IController& _rController,
- const Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rFactory)
- :ODataView(pParent,_rController,_rFactory)
+ const Reference< ::com::sun::star::uno::XComponentContext >& _rxContext)
+ :ODataView(pParent,_rController,_rxContext)
,m_pTreeView(NULL)
,m_pSplitter(NULL)
,m_pVclControl(NULL)
@@ -93,7 +93,7 @@ void UnoDataBrowserView::Construct(const Reference< ::com::sun::star::awt::XCont
m_xMe = VCLUnoHelper::CreateControlContainer(this);
// create the (UNO-) control
- m_xGrid = new SbaXGridControl(getORB());
+ m_xGrid = new SbaXGridControl(Reference<XMultiServiceFactory>(getORB()->getServiceManager(), UNO_QUERY_THROW) );
OSL_ENSURE(m_xGrid.is(), "UnoDataBrowserView::Construct : could not create a grid control !");
// in design mode (for the moment)
m_xGrid->setDesignMode(sal_True);
diff --git a/dbaccess/source/ui/browser/dataview.cxx b/dbaccess/source/ui/browser/dataview.cxx
index 923b9d1e3fbc..b9c5f81e5e61 100644
--- a/dbaccess/source/ui/browser/dataview.cxx
+++ b/dbaccess/source/ui/browser/dataview.cxx
@@ -67,10 +67,10 @@ namespace dbaui
// -------------------------------------------------------------------------
ODataView::ODataView( Window* pParent,
IController& _rController,
- const Reference< XMultiServiceFactory >& _rFactory,
+ const Reference< XComponentContext >& _rxContext,
WinBits nStyle)
:Window(pParent,nStyle)
- ,m_xServiceFactory(_rFactory)
+ ,m_xContext(_rxContext)
,m_rController( _rController )
,m_aSeparator( this )
{
@@ -205,7 +205,7 @@ namespace dbaui
// -----------------------------------------------------------------------------
void ODataView::attachFrame(const Reference< XFrame >& _xFrame)
{
- m_pAccel->init(m_xServiceFactory,_xFrame);
+ m_pAccel->init(m_xContext, _xFrame);
}
//.........................................................................
}
diff --git a/dbaccess/source/ui/browser/unodatbr.cxx b/dbaccess/source/ui/browser/unodatbr.cxx
index a3f7a48a23fa..8d123a6878b8 100644
--- a/dbaccess/source/ui/browser/unodatbr.cxx
+++ b/dbaccess/source/ui/browser/unodatbr.cxx
@@ -56,6 +56,7 @@
#include <com/sun/star/form/XGridColumnFactory.hpp>
#include <com/sun/star/form/XLoadable.hpp>
#include <com/sun/star/form/XReset.hpp>
+#include <com/sun/star/frame/Desktop.hpp>
#include <com/sun/star/frame/FrameSearchFlag.hpp>
#include <com/sun/star/frame/XLayoutManager.hpp>
#include <com/sun/star/lang/DisposedException.hpp>
@@ -3515,41 +3516,38 @@ void SbaTableQueryBrowser::implAdministrate( SvTreeListEntry* _pApplyTo )
{
// get the desktop object
sal_Int32 nFrameSearchFlag = FrameSearchFlag::ALL | FrameSearchFlag::GLOBAL ;
- Reference< XComponentLoader > xFrameLoader(getORB()->createInstance(SERVICE_FRAME_DESKTOP),UNO_QUERY);
+ Reference< XDesktop2 > xFrameLoader = Desktop::create( comphelper::getComponentContext(getORB()) );
- if ( xFrameLoader.is() )
+ // the initial selection
+ SvTreeListEntry* pTopLevelSelected = _pApplyTo;
+ while (pTopLevelSelected && m_pTreeView->getListBox().GetParent(pTopLevelSelected))
+ pTopLevelSelected = m_pTreeView->getListBox().GetParent(pTopLevelSelected);
+ ::rtl::OUString sInitialSelection;
+ if (pTopLevelSelected)
+ sInitialSelection = getDataSourceAcessor( pTopLevelSelected );
+
+ Reference< XDataSource > xDataSource( getDataSourceByName( sInitialSelection, getView(), comphelper::getComponentContext(getORB()), NULL ) );
+ Reference< XModel > xDocumentModel( getDataSourceOrModel( xDataSource ), UNO_QUERY );
+
+ if ( xDocumentModel.is() )
{
- // the initial selection
- SvTreeListEntry* pTopLevelSelected = _pApplyTo;
- while (pTopLevelSelected && m_pTreeView->getListBox().GetParent(pTopLevelSelected))
- pTopLevelSelected = m_pTreeView->getListBox().GetParent(pTopLevelSelected);
- ::rtl::OUString sInitialSelection;
- if (pTopLevelSelected)
- sInitialSelection = getDataSourceAcessor( pTopLevelSelected );
+ Reference< XInteractionHandler2 > xInteractionHandler(
+ InteractionHandler::createWithParent(comphelper::getComponentContext(getORB()), 0) );
- Reference< XDataSource > xDataSource( getDataSourceByName( sInitialSelection, getView(), comphelper::getComponentContext(getORB()), NULL ) );
- Reference< XModel > xDocumentModel( getDataSourceOrModel( xDataSource ), UNO_QUERY );
+ ::comphelper::NamedValueCollection aLoadArgs;
+ aLoadArgs.put( "Model", xDocumentModel );
+ aLoadArgs.put( "InteractionHandler", xInteractionHandler );
+ aLoadArgs.put( "MacroExecutionMode", MacroExecMode::USE_CONFIG );
- if ( xDocumentModel.is() )
- {
- Reference< XInteractionHandler2 > xInteractionHandler(
- InteractionHandler::createWithParent(comphelper::getComponentContext(getORB()), 0) );
-
- ::comphelper::NamedValueCollection aLoadArgs;
- aLoadArgs.put( "Model", xDocumentModel );
- aLoadArgs.put( "InteractionHandler", xInteractionHandler );
- aLoadArgs.put( "MacroExecutionMode", MacroExecMode::USE_CONFIG );
-
- Sequence< PropertyValue > aLoadArgPV;
- aLoadArgs >>= aLoadArgPV;
-
- xFrameLoader->loadComponentFromURL(
- xDocumentModel->getURL(),
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("_default")),
- nFrameSearchFlag,
- aLoadArgPV
- );
- }
+ Sequence< PropertyValue > aLoadArgPV;
+ aLoadArgs >>= aLoadArgPV;
+
+ xFrameLoader->loadComponentFromURL(
+ xDocumentModel->getURL(),
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("_default")),
+ nFrameSearchFlag,
+ aLoadArgPV
+ );
}
}
catch( const Exception& )
diff --git a/dbaccess/source/ui/dlg/dbwizsetup.cxx b/dbaccess/source/ui/dlg/dbwizsetup.cxx
index 55690f915e2f..2ea3cd0896fb 100644
--- a/dbaccess/source/ui/dlg/dbwizsetup.cxx
+++ b/dbaccess/source/ui/dlg/dbwizsetup.cxx
@@ -55,6 +55,7 @@
#include <com/sun/star/container/XNameAccess.hpp>
#include <com/sun/star/sdb/DatabaseContext.hpp>
#include <com/sun/star/sdb/XDocumentDataSource.hpp>
+#include <com/sun/star/frame/Desktop.hpp>
#include <com/sun/star/frame/FrameSearchFlag.hpp>
#include <com/sun/star/frame/XComponentLoader.hpp>
#include <com/sun/star/frame/XModel.hpp>
@@ -65,7 +66,6 @@
#include <com/sun/star/ucb/InteractiveIOException.hpp>
#include <com/sun/star/io/IOException.hpp>
#include <com/sun/star/frame/XTerminateListener.hpp>
-#include <com/sun/star/frame/XDesktop.hpp>
#include <com/sun/star/sdbc/XDriverAccess.hpp>
#include <com/sun/star/document/MacroExecMode.hpp>
#include <com/sun/star/ucb/IOErrorCode.hpp>
@@ -963,7 +963,7 @@ sal_Bool ODbTypeWizDialogSetup::SaveDatabaseDocument()
{
private:
Reference< XComponentLoader > m_xFrameLoader;
- Reference< XDesktop > m_xDesktop;
+ Reference< XDesktop2 > m_xDesktop;
Reference< XInteractionHandler2 > m_xInteractionHandler;
::rtl::OUString m_sURL;
OAsyncronousLink m_aAsyncCaller;
@@ -990,7 +990,7 @@ sal_Bool ODbTypeWizDialogSetup::SaveDatabaseDocument()
{
try
{
- m_xDesktop.set( _rxORB->createInstance( SERVICE_FRAME_DESKTOP ), UNO_QUERY_THROW );
+ m_xDesktop.set( Desktop::create(comphelper::getComponentContext(_rxORB)) );
m_xFrameLoader.set( m_xDesktop, UNO_QUERY_THROW );
m_xInteractionHandler =
InteractionHandler::createWithParent(comphelper::getComponentContext(_rxORB), 0);
diff --git a/dbaccess/source/ui/inc/JoinDesignView.hxx b/dbaccess/source/ui/inc/JoinDesignView.hxx
index e0e9321abd65..d21f722748d2 100644
--- a/dbaccess/source/ui/inc/JoinDesignView.hxx
+++ b/dbaccess/source/ui/inc/JoinDesignView.hxx
@@ -45,7 +45,7 @@ namespace dbaui
public:
OJoinDesignView(Window* pParent,
OJoinController& _rController,
- const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& );
+ const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& );
virtual ~OJoinDesignView();
// set the view readonly or not
diff --git a/dbaccess/source/ui/inc/QueryDesignView.hxx b/dbaccess/source/ui/inc/QueryDesignView.hxx
index 07a55ce1e537..ff95e71a6a2b 100644
--- a/dbaccess/source/ui/inc/QueryDesignView.hxx
+++ b/dbaccess/source/ui/inc/QueryDesignView.hxx
@@ -75,7 +75,7 @@ namespace dbaui
sal_Bool m_bInSplitHandler;
public:
- OQueryDesignView(OQueryContainerWindow* pParent, OQueryController& _rController,const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& );
+ OQueryDesignView(OQueryContainerWindow* pParent, OQueryController& _rController,const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& );
virtual ~OQueryDesignView();
virtual sal_Bool isCutAllowed();
diff --git a/dbaccess/source/ui/inc/QueryViewSwitch.hxx b/dbaccess/source/ui/inc/QueryViewSwitch.hxx
index 9fab832cd6fa..c8fc0809389b 100644
--- a/dbaccess/source/ui/inc/QueryViewSwitch.hxx
+++ b/dbaccess/source/ui/inc/QueryViewSwitch.hxx
@@ -38,7 +38,7 @@ namespace dbaui
OQueryTextView* m_pTextView;
sal_Bool m_bAddTableDialogWasVisible; // true if so
public:
- OQueryViewSwitch(OQueryContainerWindow* pParent, OQueryController& _rController,const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& );
+ OQueryViewSwitch(OQueryContainerWindow* pParent, OQueryController& _rController,const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& );
virtual ~OQueryViewSwitch();
virtual sal_Bool isCutAllowed();
@@ -82,7 +82,7 @@ namespace dbaui
OQueryContainerWindow* getContainer() const;
void SetPosSizePixel( Point _rPt,Size _rSize);
- ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > getORB() const;
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > getORB() const;
protected:
// return the Rectangle where I can paint myself
virtual void resizeDocumentView(Rectangle& rRect);
diff --git a/dbaccess/source/ui/inc/RelationDesignView.hxx b/dbaccess/source/ui/inc/RelationDesignView.hxx
index 850effc813b9..0d106bf584bf 100644
--- a/dbaccess/source/ui/inc/RelationDesignView.hxx
+++ b/dbaccess/source/ui/inc/RelationDesignView.hxx
@@ -34,7 +34,7 @@ namespace dbaui
class ORelationDesignView : public OJoinDesignView
{
public:
- ORelationDesignView(Window* pParent, ORelationController& _rController,const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& );
+ ORelationDesignView(Window* pParent, ORelationController& _rController,const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& );
virtual ~ORelationDesignView();
// set the statement for representation
diff --git a/dbaccess/source/ui/inc/TableDesignView.hxx b/dbaccess/source/ui/inc/TableDesignView.hxx
index 06a5f6f3b8ec..79c6e42ea600 100644
--- a/dbaccess/source/ui/inc/TableDesignView.hxx
+++ b/dbaccess/source/ui/inc/TableDesignView.hxx
@@ -77,7 +77,7 @@ namespace dbaui
public:
OTableDesignView( Window* pParent,
- const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >&,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >&,
OTableController& _rController);
virtual ~OTableDesignView();
diff --git a/dbaccess/source/ui/inc/brwview.hxx b/dbaccess/source/ui/inc/brwview.hxx
index f5c39e7c16e7..049227cef2b5 100644
--- a/dbaccess/source/ui/inc/brwview.hxx
+++ b/dbaccess/source/ui/inc/brwview.hxx
@@ -62,7 +62,7 @@ namespace dbaui
public:
UnoDataBrowserView( Window* pParent,
IController& _rController,
- const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& );
+ const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& );
virtual ~UnoDataBrowserView();
/// late construction
diff --git a/dbaccess/source/ui/inc/querycontainerwindow.hxx b/dbaccess/source/ui/inc/querycontainerwindow.hxx
index ff6d5fffb650..7301f094364e 100644
--- a/dbaccess/source/ui/inc/querycontainerwindow.hxx
+++ b/dbaccess/source/ui/inc/querycontainerwindow.hxx
@@ -54,7 +54,7 @@ namespace dbaui
DECL_LINK( SplitHdl, void* );
public:
- OQueryContainerWindow(Window* pParent, OQueryController& _rController,const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >&);
+ OQueryContainerWindow(Window* pParent, OQueryController& _rController,const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >&);
~OQueryContainerWindow();
virtual void Construct();
diff --git a/dbaccess/source/ui/inc/queryview.hxx b/dbaccess/source/ui/inc/queryview.hxx
index 5e9302174f15..62a27a937c3e 100644
--- a/dbaccess/source/ui/inc/queryview.hxx
+++ b/dbaccess/source/ui/inc/queryview.hxx
@@ -27,7 +27,7 @@ namespace dbaui
class OQueryView : public OJoinDesignView
{
public:
- OQueryView(Window* pParent, OQueryController& _rController,const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& );
+ OQueryView(Window* pParent, OQueryController& _rController,const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& );
virtual ~OQueryView();
virtual sal_Bool isCutAllowed() = 0;
diff --git a/dbaccess/source/ui/querydesign/JoinDesignView.cxx b/dbaccess/source/ui/querydesign/JoinDesignView.cxx
index ad7cf9eace71..b5d0c440cd30 100644
--- a/dbaccess/source/ui/querydesign/JoinDesignView.cxx
+++ b/dbaccess/source/ui/querydesign/JoinDesignView.cxx
@@ -53,8 +53,8 @@ namespace dbaui
// = OJoinDesignView
// =============================================================================
// -----------------------------------------------------------------------------
-OJoinDesignView::OJoinDesignView(Window* _pParent, OJoinController& _rController,const Reference< XMultiServiceFactory >& _rFactory)
- :ODataView( _pParent, _rController, _rFactory )
+OJoinDesignView::OJoinDesignView(Window* _pParent, OJoinController& _rController,const Reference< XComponentContext >& _rxContext)
+ :ODataView( _pParent, _rController, _rxContext )
,m_pTableView(NULL)
,m_rController( _rController )
{
diff --git a/dbaccess/source/ui/querydesign/QueryDesignView.cxx b/dbaccess/source/ui/querydesign/QueryDesignView.cxx
index 816991ad8a8d..20a6ebd003de 100644
--- a/dbaccess/source/ui/querydesign/QueryDesignView.cxx
+++ b/dbaccess/source/ui/querydesign/QueryDesignView.cxx
@@ -2520,8 +2520,8 @@ DBG_NAME(OQueryDesignView)
OQueryDesignView::OQueryDesignView( OQueryContainerWindow* _pParent,
OQueryController& _rController,
- const Reference< XMultiServiceFactory >& _rFactory)
- :OQueryView( _pParent, _rController, _rFactory )
+ const Reference< XComponentContext >& _rxContext)
+ :OQueryView( _pParent, _rController, _rxContext )
,m_aSplitter( this )
,m_eChildFocus(NONE)
,m_bInSplitHandler( sal_False )
diff --git a/dbaccess/source/ui/querydesign/QueryViewSwitch.cxx b/dbaccess/source/ui/querydesign/QueryViewSwitch.cxx
index 4a584efdf845..b6a9dbe00ee8 100644
--- a/dbaccess/source/ui/querydesign/QueryViewSwitch.cxx
+++ b/dbaccess/source/ui/querydesign/QueryViewSwitch.cxx
@@ -32,13 +32,13 @@ using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::lang;
DBG_NAME(OQueryViewSwitch)
-OQueryViewSwitch::OQueryViewSwitch(OQueryContainerWindow* _pParent, OQueryController& _rController,const Reference< XMultiServiceFactory >& _rFactory)
+OQueryViewSwitch::OQueryViewSwitch(OQueryContainerWindow* _pParent, OQueryController& _rController,const Reference< XComponentContext >& _rxContext)
: m_bAddTableDialogWasVisible(sal_False)
{
DBG_CTOR(OQueryViewSwitch,NULL);
m_pTextView = new OQueryTextView(_pParent);
- m_pDesignView = new OQueryDesignView( _pParent, _rController, _rFactory );
+ m_pDesignView = new OQueryDesignView( _pParent, _rController, _rxContext );
}
// -----------------------------------------------------------------------------
OQueryViewSwitch::~OQueryViewSwitch()
@@ -309,7 +309,7 @@ void OQueryViewSwitch::SetPosSizePixel( Point _rPt,Size _rSize)
m_pTextView->SetPosSizePixel( _rPt,_rSize);
}
// -----------------------------------------------------------------------------
-Reference< XMultiServiceFactory > OQueryViewSwitch::getORB() const
+Reference< XComponentContext > OQueryViewSwitch::getORB() const
{
return m_pDesignView->getORB();
}
diff --git a/dbaccess/source/ui/querydesign/querycontainerwindow.cxx b/dbaccess/source/ui/querydesign/querycontainerwindow.cxx
index 06d84f3989bc..dc342f56ae04 100644
--- a/dbaccess/source/ui/querydesign/querycontainerwindow.cxx
+++ b/dbaccess/source/ui/querydesign/querycontainerwindow.cxx
@@ -45,13 +45,13 @@ namespace dbaui
//= OQueryContainerWindow
//=====================================================================
DBG_NAME(OQueryContainerWindow)
- OQueryContainerWindow::OQueryContainerWindow(Window* pParent, OQueryController& _rController,const Reference< XMultiServiceFactory >& _rFactory)
- :ODataView( pParent, _rController, _rFactory )
+ OQueryContainerWindow::OQueryContainerWindow(Window* pParent, OQueryController& _rController,const Reference< XComponentContext >& _rxContext)
+ :ODataView( pParent, _rController, _rxContext )
,m_pViewSwitch(NULL)
,m_pBeamer(NULL)
{
DBG_CTOR(OQueryContainerWindow,NULL);
- m_pViewSwitch = new OQueryViewSwitch( this, _rController, _rFactory );
+ m_pViewSwitch = new OQueryViewSwitch( this, _rController, _rxContext );
m_pSplitter = new Splitter(this,WB_VSCROLL);
m_pSplitter->Hide();
@@ -195,7 +195,7 @@ namespace dbaui
::dbaui::notifySystemWindow(this,m_pBeamer,::comphelper::mem_fun(&TaskPaneList::AddWindow));
- Reference < XFrame > xBeamerFrame( m_pViewSwitch->getORB()->createInstance(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.Frame"))),UNO_QUERY );
+ Reference < XFrame > xBeamerFrame( m_pViewSwitch->getORB()->getServiceManager()->createInstanceWithContext(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.Frame")), m_pViewSwitch->getORB()),UNO_QUERY );
m_xBeamer.set( xBeamerFrame );
OSL_ENSURE(m_xBeamer.is(),"No frame created!");
m_xBeamer->initialize( VCLUnoHelper::GetInterface ( m_pBeamer ) );
diff --git a/dbaccess/source/ui/querydesign/querycontroller.cxx b/dbaccess/source/ui/querydesign/querycontroller.cxx
index d0ea41b81516..22109df206bd 100644
--- a/dbaccess/source/ui/querydesign/querycontroller.cxx
+++ b/dbaccess/source/ui/querydesign/querycontroller.cxx
@@ -1107,7 +1107,7 @@ sal_Bool OQueryController::Construct(Window* pParent)
{
// TODO: we have to check if we should create the text- or the design- view
- setView( * new OQueryContainerWindow( pParent, *this, getORB() ) );
+ setView( * new OQueryContainerWindow( pParent, *this, comphelper::getComponentContext(getORB()) ) );
return OJoinController::Construct(pParent);
}
diff --git a/dbaccess/source/ui/querydesign/queryview.cxx b/dbaccess/source/ui/querydesign/queryview.cxx
index 124540498195..e49c7b000c9f 100644
--- a/dbaccess/source/ui/querydesign/queryview.cxx
+++ b/dbaccess/source/ui/querydesign/queryview.cxx
@@ -27,8 +27,8 @@ using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::lang;
DBG_NAME(OQueryView)
// -------------------------------------------------------------------------
-OQueryView::OQueryView(Window* _pParent, OQueryController& _rController,const Reference< XMultiServiceFactory >& _rFactory)
- :OJoinDesignView( _pParent, _rController, _rFactory )
+OQueryView::OQueryView(Window* _pParent, OQueryController& _rController,const Reference< XComponentContext >& _rxContext)
+ :OJoinDesignView( _pParent, _rController, _rxContext )
{
DBG_CTOR(OQueryView,NULL);
diff --git a/dbaccess/source/ui/relationdesign/RelationController.cxx b/dbaccess/source/ui/relationdesign/RelationController.cxx
index abe665bd88b2..2e999e8e118e 100644
--- a/dbaccess/source/ui/relationdesign/RelationController.cxx
+++ b/dbaccess/source/ui/relationdesign/RelationController.cxx
@@ -249,7 +249,7 @@ void ORelationController::impl_initialize()
// -----------------------------------------------------------------------------
sal_Bool ORelationController::Construct(Window* pParent)
{
- setView( * new ORelationDesignView( pParent, *this, getORB() ) );
+ setView( * new ORelationDesignView( pParent, *this, comphelper::getComponentContext(getORB()) ) );
OJoinController::Construct(pParent);
return sal_True;
}
diff --git a/dbaccess/source/ui/relationdesign/RelationDesignView.cxx b/dbaccess/source/ui/relationdesign/RelationDesignView.cxx
index 31676ce96f7b..602b79323d89 100644
--- a/dbaccess/source/ui/relationdesign/RelationDesignView.cxx
+++ b/dbaccess/source/ui/relationdesign/RelationDesignView.cxx
@@ -46,8 +46,8 @@ using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::container;
DBG_NAME(ORelationDesignView)
-ORelationDesignView::ORelationDesignView(Window* _pParent, ORelationController& _rController,const Reference< XMultiServiceFactory >& _rFactory)
- :OJoinDesignView( _pParent, _rController, _rFactory )
+ORelationDesignView::ORelationDesignView(Window* _pParent, ORelationController& _rController,const Reference< XComponentContext >& _rxContext)
+ :OJoinDesignView( _pParent, _rController, _rxContext )
{
DBG_CTOR(ORelationDesignView,NULL);
}
diff --git a/dbaccess/source/ui/tabledesign/TableController.cxx b/dbaccess/source/ui/tabledesign/TableController.cxx
index 869af3d4268e..91c5352e923b 100644
--- a/dbaccess/source/ui/tabledesign/TableController.cxx
+++ b/dbaccess/source/ui/tabledesign/TableController.cxx
@@ -565,7 +565,7 @@ void OTableController::impl_initialize()
// -----------------------------------------------------------------------------
sal_Bool OTableController::Construct(Window* pParent)
{
- setView( * new OTableDesignView( pParent, getORB(), *this ) );
+ setView( * new OTableDesignView( pParent, comphelper::getComponentContext(getORB()), *this ) );
OTableController_BASE::Construct(pParent);
return sal_True;
}
diff --git a/dbaccess/source/ui/tabledesign/TableDesignView.cxx b/dbaccess/source/ui/tabledesign/TableDesignView.cxx
index 499d2149c594..a82ae839d9cc 100644
--- a/dbaccess/source/ui/tabledesign/TableDesignView.cxx
+++ b/dbaccess/source/ui/tabledesign/TableDesignView.cxx
@@ -187,7 +187,7 @@ void OTableBorderWindow::GetFocus()
DBG_NAME(OTableDesignView);
//------------------------------------------------------------------------------
OTableDesignView::OTableDesignView( Window* pParent,
- const Reference< XMultiServiceFactory >& _rxOrb,
+ const Reference< XComponentContext >& _rxOrb,
OTableController& _rController
) :
ODataView( pParent, _rController,_rxOrb )