23#include <com/sun/star/sdbcx/XColumnsSupplier.hpp>
24#include <com/sun/star/connection/XConnection.hpp>
25#include <com/sun/star/beans/PropertyValue.hpp>
32extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
34 css::uno::XComponentContext* context, css::uno::Sequence<css::uno::Any>
const& )
36 return cppu::acquire(new ::dbaui::ODirectSQLDialog(context));
63 return css::uno::Sequence<sal_Int8>();
68 return "com.sun.star.comp.sdb.DirectSQLDialog";
73 for (
const OUString& s : aSupported)
74 if (s == _rServiceName)
95 css::uno::Sequence< css::beans::Property > aProps;
96 describeProperties(aProps);
97 return new ::cppu::OPropertyArrayHelper(aProps);
106 if ( !xConnection.is() )
119 if (!xConnection.is())
125 return std::make_unique<DirectSQLDialog>(pParent, xConnection);
130 PropertyValue aProperty;
131 if (_rValue >>= aProperty)
133 if (aProperty.Name ==
"InitialSelection")
138 else if (aProperty.Name ==
"ActiveConnection")
141 OSL_ENSURE(
m_xActiveConnection.is(),
"ODirectSQLDialog::implInitialize: invalid connection!" );
static weld::Window * GetFrameWeld(const css::uno::Reference< css::awt::XWindow > &rWindow)
::cppu::IPropertyArrayHelper * getArrayHelper()
css::uno::Reference< css::sdbc::XConnection > connect(const OUString &_rDataSourceName, ::dbtools::SQLExceptionInfo *_pErrorInfo) const
creates a connection to the data source, displays the possible error to the user, or returns it
OUString m_sInitialSelection
virtual ::cppu::IPropertyArrayHelper &SAL_CALL getInfoHelper() override
virtual std::unique_ptr< weld::DialogController > createDialog(const css::uno::Reference< css::awt::XWindow > &rParent) override
virtual void implInitialize(const css::uno::Any &_rValue) override
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
css::uno::Reference< css::sdbc::XConnection > m_xActiveConnection
virtual ::cppu::IPropertyArrayHelper * createArrayHelper() const override
virtual ~ODirectSQLDialog() override
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override
ODirectSQLDialog(const css::uno::Reference< css::uno::XComponentContext > &_rxORB)
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override=0
virtual OUString SAL_CALL getImplementationName() override=0
virtual void implInitialize(const css::uno::Any &_rValue)
css::uno::Reference< css::uno::XComponentContext > m_aContext
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
#define DBG_UNHANDLED_EXCEPTION(...)
constexpr OUStringLiteral SERVICE_SDB_DIRECTSQLDIALOG
SAL_DLLPUBLIC_EXPORT css::uno::XInterface * com_sun_star_comp_sdb_DirectSQLDialog_get_implementation(css::uno::XComponentContext *context, css::uno::Sequence< css::uno::Any > const &)