summaryrefslogtreecommitdiff
path: root/extensions/source/dbpilots
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2012-09-27 13:43:06 +0200
committerStephan Bergmann <sbergman@redhat.com>2012-09-27 15:03:32 +0200
commita00c4e02acd1b7a3ab126941166aa2d12c7eb3fc (patch)
tree124a0877db6e0921b9a1237261106b63d94c1c9f /extensions/source/dbpilots
parent9c00e38b431b57c3760f6c0aa774424b3239eeda (diff)
Improvements on previous commit
* Made XDatabaseContext inherit XDatabaseRegistrations non-optionally, adapted call-sites to just use XDatabaseContext w/o querying. (The previous commit had inadvertantly effectively removed support for XDatabaseRegistrations from the ODatabaseContext implementation, as an optional UNO super-interface does not lead to a super-class in the corresponding C++ class hierarchy, but making the super-interface non-optional fixes that anyway.) * Adapted some more call-sites to just use XDatabaseContext w/o querying. * Added @since tag. * Replaced new uses of comphelper::ComponentContext::getUNOContext with comphelper::getComponentContext (see 03a9f139bd9ea1a4f9096fc982e6b326def58532 "ComponentContext::getUnoContext -> getComponentContext simplification;" I intend to get rid of comphelper/componentcontext.hxx much sooner than of comphelper/processfactory.hxx). Change-Id: I68d09f2dbe651629f79ed21cd40cdb6d6b32c624
Diffstat (limited to 'extensions/source/dbpilots')
-rw-r--r--extensions/source/dbpilots/commonpagesdbp.hxx4
-rw-r--r--extensions/source/dbpilots/controlwizard.cxx7
-rw-r--r--extensions/source/dbpilots/wizardcontext.hxx3
3 files changed, 7 insertions, 7 deletions
diff --git a/extensions/source/dbpilots/commonpagesdbp.hxx b/extensions/source/dbpilots/commonpagesdbp.hxx
index 07038717bbcb..3d00eba2076c 100644
--- a/extensions/source/dbpilots/commonpagesdbp.hxx
+++ b/extensions/source/dbpilots/commonpagesdbp.hxx
@@ -23,7 +23,7 @@
#include "controlwizard.hxx"
#include <vcl/fixed.hxx>
#include <vcl/lstbox.hxx>
-#include <com/sun/star/container/XNameAccess.hpp>
+#include <com/sun/star/sdb/XDatabaseContext.hpp>
//.........................................................................
namespace dbp
@@ -44,7 +44,7 @@ namespace dbp
FixedText m_aTableLabel;
ListBox m_aTable;
- ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XDatabaseContext >
m_xDSContext;
public:
diff --git a/extensions/source/dbpilots/controlwizard.cxx b/extensions/source/dbpilots/controlwizard.cxx
index ba216b3d4451..47c6bb55ed48 100644
--- a/extensions/source/dbpilots/controlwizard.cxx
+++ b/extensions/source/dbpilots/controlwizard.cxx
@@ -42,7 +42,7 @@
#include <com/sun/star/sdb/CommandType.hpp>
#include <com/sun/star/sdbc/SQLWarning.hpp>
#include <com/sun/star/sdb/SQLContext.hpp>
-#include <comphelper/componentcontext.hxx>
+#include <comphelper/processfactory.hxx>
#include <comphelper/types.hxx>
#include <connectivity/dbtools.hxx>
#include <vcl/msgbox.hxx>
@@ -446,9 +446,8 @@ namespace dbp
{
DBG_ASSERT(xORB.is(), "OControlWizard::implGetDSContext: invalid service factory!");
- m_aContext.xDatasourceContext = Reference<XNameAccess>(
- DatabaseContext::create(comphelper::ComponentContext(xORB).getUNOContext()),
- UNO_QUERY_THROW);
+ m_aContext.xDatasourceContext =
+ DatabaseContext::create(comphelper::getComponentContext(xORB));
}
catch(const Exception&)
{
diff --git a/extensions/source/dbpilots/wizardcontext.hxx b/extensions/source/dbpilots/wizardcontext.hxx
index 2e5bb4240f9a..6b77c7877571 100644
--- a/extensions/source/dbpilots/wizardcontext.hxx
+++ b/extensions/source/dbpilots/wizardcontext.hxx
@@ -22,6 +22,7 @@
#include <com/sun/star/container/XNameAccess.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/sdb/XDatabaseContext.hpp>
#include <com/sun/star/sdbc/XRowSet.hpp>
#include <com/sun/star/uno/Sequence.hxx>
#include <com/sun/star/drawing/XDrawPage.hpp>
@@ -40,7 +41,7 @@ namespace dbp
struct OControlWizardContext
{
// the global data source context
- ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XDatabaseContext >
xDatasourceContext;
// the control mode