24#include <osl/diagnose.h>
25#include <com/sun/star/beans/PropertyAttribute.hpp>
36using namespace ::
cppu;
43 public ::cppu::WeakImplHelper< XPropertyChangeListener >
59 virtual void SAL_CALL
disposing(
const EventObject& )
override
111 ,
const Reference< XInterface >& _xParentContainer
126 ,
const OUString& _rElementName
127 ,
const Reference< XComponentContext >& _xORB
136 m_pImpl->m_aProps.aTitle = _rElementName;
137 OSL_ENSURE(!
m_pImpl->m_aProps.aTitle.isEmpty(),
"OComponentDefinition::OComponentDefinition : invalid name !");
142 return css::uno::Sequence<sal_Int8>();
147 return ::comphelper::concatSequences(
148 ODataSettings::getTypes( ),
149 OContentHelper::getTypes( ),
157 return "com.sun.star.comp.dba.OComponentDefinition";
162 return {
"com.sun.star.sdb.TableDefinition",
"com.sun.star.ucb.Content" };
183 Sequence< Property > aProps;
185 return new OPropertyArrayHelper(aProps);
190 Reference<XPropertySetInfo> xInfo( createPropertySetInfo(
getInfoHelper() ) );
197 ? OUString(
"application/vnd.org.openoffice.DatabaseTable" )
198 : OUString(
"application/vnd.org.openoffice.DatabaseCommandDefinition" );
204 ::connectivity::checkDisposed(OContentHelper::rBHelper.bDisposed);
208 std::vector< OUString> aNames;
211 aNames.reserve( rDefinition.
size() );
213 for (
auto const& definition : rDefinition)
214 aNames.push_back(definition.first);
227 if ( aFind != rDefinition.
end() )
232 OSL_FAIL(
"OComponentDefinition::createColumn: is this a valid case?" );
260 ::comphelper::copyProperties( _rxSourceDescriptor, xColDesc );
277extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
279 css::uno::Sequence<css::uno::Any>
const &)
282 context,
nullptr, std::make_shared<dbaccess::OComponentDefinition_Impl>()));
SAL_DLLPUBLIC_EXPORT css::uno::XInterface * com_sun_star_comp_dba_OComponentDefinition(css::uno::XComponentContext *context, css::uno::Sequence< css::uno::Any > const &)
::cppu::IPropertyArrayHelper * getArrayHelper()
void describeProperties(css::uno::Sequence< css::beans::Property > &_rProps) const
void registerProperty(const OUString &_rName, sal_Int32 _nHandle, sal_Int32 _nAttributes, void *_pPointerToMember, const css::uno::Type &_rMemberType)
virtual void SAL_CALL setFastPropertyValue_NoBroadcast(sal_Int32 nHandle, const css::uno::Any &rValue) override
mutable::osl::Mutex m_aMutex
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() SAL_OVERRIDE
helper class for column property change events which holds the OComponentDefinition weak
OColumnPropertyListener(OComponentDefinition *_pComponent)
const OColumnPropertyListener & operator=(const OColumnPropertyListener &)=delete
virtual void SAL_CALL disposing(const EventObject &) override
virtual void SAL_CALL propertyChange(const PropertyChangeEvent &) override
virtual ~OColumnPropertyListener() override
OColumnPropertyListener(const OColumnPropertyListener &)=delete
OComponentDefinition * m_pComponent
void insert(const OUString &_rName, const css::uno::Reference< css::beans::XPropertySet > &_rxColumn)
Columns::const_iterator const_iterator
virtual ~OComponentDefinition_Impl() override
const_iterator end() const
const_iterator find(const OUString &_rName) const
void erase(const OUString &_rName)
OComponentDefinition_Impl()
virtual ::cppu::IPropertyArrayHelper &SAL_CALL getInfoHelper() override
std::unique_ptr< OColumns > m_pColumns
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override
virtual void SAL_CALL initialize(css::uno::Sequence< css::uno::Any > const &rArguments) override
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
virtual OUString determineContentType() const override
virtual void columnAppended(const css::uno::Reference< css::beans::XPropertySet > &_rxSourceDescriptor) override
notifies that a column, created from a column descriptor, has been appended
void notifyDataSourceModified()
const OComponentDefinition_Impl & getDefinition() const
virtual void SAL_CALL disposing() override
virtual ::cppu::IPropertyArrayHelper * createArrayHelper() const override
virtual void columnDropped(const OUString &_sName) override
notifies that a column with a given name has been dropped
OComponentDefinition(const css::uno::Reference< css::uno::XComponentContext > &, const css::uno::Reference< css::uno::XInterface > &_xParentContainer, const TContentPtr &_pImpl, bool _bTable=true)
virtual rtl::Reference< OColumn > createColumn(const OUString &_rName) const override
creates an OColumn object which should represent the column with a given name
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual css::uno::Reference< css::beans::XPropertySet > createColumnDescriptor() override
creates a column descriptor object.
rtl::Reference< OColumnPropertyListener > m_xColumnPropertyListener
virtual ~OComponentDefinition() override
virtual void SAL_CALL setFastPropertyValue_NoBroadcast(sal_Int32 nHandle, const css::uno::Any &rValue) override
void registerProperties()
virtual css::uno::Reference< css::container::XNameAccess > SAL_CALL getColumns() override
ContentProperties m_aProps
virtual void SAL_CALL disposing() override
virtual void SAL_CALL initialize(const css::uno::Sequence< css::uno::Any > &aArguments) override
void registerPropertiesFor(ODataSettings_Base *_pItem)
register the properties from the param given.
provides the properties for description.
describes all properties for a columns of a table.
describes a column of a table
Sequence< PropertyValue > aArguments
css::uno::Sequence< css::uno::Any > InitAnyPropertySequence(::std::initializer_list< ::std::pair< OUString, css::uno::Any > > vInit)
std::shared_ptr< OContentHelper_Impl > TContentPtr
#define PROPERTY_ID_CATALOGNAME
#define PROPERTY_ID_SCHEMANAME
constexpr OUStringLiteral PROPERTY_SCHEMANAME(u"SchemaName")
constexpr OUStringLiteral PROPERTY_CATALOGNAME(u"CatalogName")
constexpr OUStringLiteral PROPERTY_NAME(u"Name")
#define IMPLEMENT_FORWARD_XINTERFACE3(classname, refcountbase, baseclass2, baseclass3)