20#ifndef INCLUDED_DBACCESS_DBSUBCOMPONENTCONTROLLER_HXX
21#define INCLUDED_DBACCESS_DBSUBCOMPONENTCONTROLLER_HXX
25#include <com/sun/star/document/XScriptInvocationContext.hpp>
26#include <com/sun/star/lang/EventObject.hpp>
27#include <com/sun/star/uno/Any.hxx>
28#include <com/sun/star/uno/Reference.hxx>
29#include <com/sun/star/uno/Sequence.hxx>
30#include <com/sun/star/uno/Type.hxx>
31#include <com/sun/star/util/XModifiable.hpp>
35#include <rtl/ustring.hxx>
40 namespace beans {
struct PropertyValue; }
41 namespace document {
class XEmbeddedScripts; }
42 namespace frame {
class XModel; }
43 namespace sdbc {
class XConnection; }
44 namespace sdbc {
class XDatabaseMetaData; }
45 namespace uno {
class XComponentContext; }
46 namespace util {
class XModifyListener; }
47 namespace util {
class XNumberFormatter; }
51 class DatabaseMetaData;
52 class SQLExceptionInfo;
59 typedef ::cppu::ImplInheritanceHelper< OGenericUnoController
60 , css::document::XScriptInvocationContext
61 , css::util::XModifiable
68 ::std::unique_ptr<DBSubComponentController_Impl>
m_pImpl;
74 void initializeConnection(
const css::uno::Reference< css::sdbc::XConnection >& _rxForeignConn );
78 virtual void impl_initialize()
override;
81 virtual void Execute(sal_uInt16 nId,
const css::uno::Sequence< css::beans::PropertyValue>& aArgs)
override;
83 virtual css::uno::Reference< css::frame::XModel > getPrivateModel()
const override;
85 bool impl_isModified()
const;
86 virtual void impl_onModifyChanged();
89 bool isReadOnly()
const;
90 bool isEditable()
const;
91 void setEditable(
bool _bEditable);
96 bool isConnected()
const;
98 css::uno::Reference< css::sdbc::XDatabaseMetaData >
103 OUString getDataSourceName()
const;
104 const css::uno::Reference< css::beans::XPropertySet >&
106 bool haveDataSource()
const;
108 css::uno::Reference< css::frame::XModel >
109 getDatabaseDocument()
const;
113 const ::dbtools::DatabaseMetaData& getSdbMetaData()
const;
117 void appendError(
const OUString& _rErrorMessage );
126 bool hasError()
const;
130 const ::dbtools::SQLExceptionInfo& getError()
const;
138 void connectionLostMessage()
const;
144 const css::uno::Reference< css::sdbc::XConnection >&
149 css::uno::Reference< css::util::XNumberFormatter >
const &
getNumberFormatter()
const;
153 virtual sal_Bool SAL_CALL attachModel(
const css::uno::Reference< css::frame::XModel > &
xModel)
override;
156 virtual css::uno::Reference< css::document::XEmbeddedScripts > SAL_CALL getScriptContainer()
override;
159 virtual sal_Bool SAL_CALL isModified( )
override;
160 virtual void SAL_CALL setModified(
sal_Bool bModified )
override;
163 virtual void SAL_CALL addModifyListener(
const css::uno::Reference< css::util::XModifyListener >& aListener )
override;
164 virtual void SAL_CALL removeModifyListener(
const css::uno::Reference< css::util::XModifyListener >& aListener )
override;
167 virtual OUString SAL_CALL
getTitle( )
override;
174 virtual void reconnect(
bool _bUI );
176 if ( !isConnected() ) reconnect(
false );
177 return isConnected();
183 virtual void losingConnection( );
187 virtual void SAL_CALL
disposing(
const css::lang::EventObject& Source)
override;
190 virtual void SAL_CALL disposing()
override;
193 virtual css::uno::Any SAL_CALL
queryInterface(
const css::uno::Type& _rType)
override;
196 virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes( )
override;
199 sal_Int32 getCurrentStartNumber()
const;
virtual void SAL_CALL disposing(const css::lang::EventObject &Source) override
::std::unique_ptr< DBSubComponentController_Impl > m_pImpl
#define DBACCESS_DLLPUBLIC
class SAL_NO_VTABLE XPropertySet
css::uno::Any SAL_CALL queryInterface(const css::uno::Type &rType, Interface1 *p1)
css::uno::Reference< css::uno::XInterface > getDataSource(const css::uno::Reference< css::uno::XInterface > &_rxDependentObject)
css::uno::Reference< css::util::XNumberFormatter > getNumberFormatter(const css::uno::Reference< css::sdbc::XConnection > &_rxConnection, const css::uno::Reference< css::uno::XComponentContext > &_rxContext)
creates a number formatter
::cppu::ImplInheritanceHelper< OGenericUnoController, css::document::XScriptInvocationContext, css::util::XModifiable > DBSubComponentController_Base
std::u16string_view getTitle(std::u16string_view aPath)
Reference< XModel > xModel
the model of the sub component. Might be <NULL>