24#include <core_resource.hxx>
28#include <osl/diagnose.h>
30#include <com/sun/star/beans/PropertyAttribute.hpp>
31#include <com/sun/star/sdbc/SQLException.hpp>
32#include <com/sun/star/sdb/tools/XTableRename.hpp>
33#include <com/sun/star/sdb/tools/XTableAlteration.hpp>
51using namespace ::
cppu;
56 ,
const Reference< XConnection >& _rxConn
57 ,
const OUString& _rCatalog
58 ,
const OUString& _rSchema
59 ,
const OUString& _rName
60 ,
const OUString& _rType
61 ,
const OUString& _rDesc
62 ,
const Reference< XNameAccess >& _xColumnDefinitions)
63 :
OTable_Base(_pTables,_rxConn,_rxConn->getMetaData().is() && _rxConn->getMetaData()->supportsMixedCaseQuotedIdentifiers(), _rName, _rType, _rDesc, _rSchema, _rCatalog )
64 ,m_xColumnDefinitions(_xColumnDefinitions)
67 OSL_ENSURE(getMetaData().is(),
"ODBTable::ODBTable : invalid conn !");
68 OSL_ENSURE(!_rName.isEmpty(),
"ODBTable::ODBTable : name !");
76 ,
const Reference< XConnection >& _rxConn)
77 :
OTable_Base(_pTables,_rxConn, _rxConn->getMetaData().is() && _rxConn->getMetaData()->supportsMixedCaseQuotedIdentifiers())
88 Reference<XPropertySet> xProp;
99 Reference<XPropertySet> xColumnDefinition;
115 xDrop->dropByName(_sName);
121 return css::uno::Sequence<sal_Int8>();
141 OTable_Base::getFastPropertyValue(_rValue, _nHandle);
209 Sequence< Property > aProps;
210 describeProperties(aProps);
213 for(
Property & prop : asNonConstRange(aProps))
216 prop.Attributes = PropertyAttribute::READONLY;
218 prop.Attributes = PropertyAttribute::READONLY;
220 prop.Attributes = PropertyAttribute::READONLY;
222 prop.Attributes = PropertyAttribute::READONLY;
226 return new ::cppu::OPropertyArrayHelper(aProps);
235OUString SAL_CALL ODBTable::getImplementationName()
237 return "com.sun.star.sdb.dbaccess.ODBTable";
239sal_Bool SAL_CALL ODBTable::supportsService(
const OUString& _rServiceName)
242 for (
const OUString& s : aSupported)
243 if (s == _rServiceName)
248css::uno::Sequence< OUString > SAL_CALL ODBTable::getSupportedServiceNames()
269 std::vector<Type> aOwnTypes;
270 aOwnTypes.reserve(
aTypes.getLength());
273 const Type* pEnd = pIter +
aTypes.getLength();
274 for(;pIter != pEnd ;++pIter)
277 aOwnTypes.push_back(*pIter);
280 return Sequence< Type >(aOwnTypes.data(), aOwnTypes.size());
287 checkDisposed(connectivity::sdbcx::OTableDescriptor_BASE::rBHelper.bDisposed);
291 Reference<XPropertySet> xTable(
this);
300 checkDisposed(connectivity::sdbcx::OTableDescriptor_BASE::rBHelper.bDisposed);
307 Reference<XPropertySet> xTable(
this);
319 Reference<XDatabaseMetaData> xMeta =
getMetaData();
321 getAlterService().is() || (xMeta.is() && xMeta->supportsAlterTableWithAddColumn()),
322 getAlterService().is() || (xMeta.is() && xMeta->supportsAlterTableWithDropColumn()));
::cppu::IPropertyArrayHelper * getArrayHelper(sal_Int32 nId)
void disposing(std::unique_lock< std::mutex > &rGuard)
virtual void SAL_CALL disposing() override
css::uno::Reference< css::sdb::tools::XTableRename > const & getRenameService() const
virtual css::uno::Reference< css::sdbc::XDatabaseMetaData > getMetaData() const override
virtual void refreshColumns() override
css::uno::Reference< css::sdb::tools::XTableAlteration > const & getAlterService() const
bool isCaseSensitive() const
std::unique_ptr< OCollection > m_xColumns
virtual void SAL_CALL rename(const OUString &newName) override
virtual void construct() override
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &rType) override
css::uno::Type const & get()
virtual void SAL_CALL setParent(const css::uno::Reference< css::uno::XInterface > &Parent) override
void setMediator(OContainerMediator *_pMediator)
connectivity::sdbcx::ObjectType createBaseObject(const OUString &_rName)
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
virtual void SAL_CALL rename(const OUString &_rNewName) override
virtual ::connectivity::sdbcx::OCollection * createColumns(const ::std::vector< OUString > &_rNames) override
creates the column collection for the table
virtual void columnAppended(const css::uno::Reference< css::beans::XPropertySet > &_rxSourceDescriptor) override
notifies that a column, created from a column descriptor, has been appended
virtual css::uno::Reference< css::beans::XPropertySet > createColumnDescriptor() override
creates a column descriptor object.
virtual void SAL_CALL getFastPropertyValue(css::uno::Any &rValue, sal_Int32 nHandle) const override
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &aType) override
virtual ::connectivity::sdbcx::OCollection * createIndexes(const ::std::vector< OUString > &_rNames) override
creates the index collection for the table
virtual ::connectivity::sdbcx::OCollection * createKeys(const ::std::vector< OUString > &_rNames) override
creates the key collection for the table
virtual void SAL_CALL disposing() override
css::uno::Reference< css::container::XNameAccess > m_xDriverColumns
virtual void construct() override
::rtl::Reference< OContainerMediator > m_pColumnMediator
virtual rtl::Reference< OColumn > createColumn(const OUString &_rName) const override
creates an OColumn object which should represent the column with a given name
virtual void SAL_CALL alterColumnByName(const OUString &_rName, const css::uno::Reference< css::beans::XPropertySet > &_rxDescriptor) override
virtual void columnDropped(const OUString &_sName) override
notifies that a column with a given name has been dropped
virtual ::cppu::IPropertyArrayHelper &SAL_CALL getInfoHelper() override
virtual ::cppu::IPropertyArrayHelper * createArrayHelper(sal_Int32 _nId) const override
css::uno::Reference< css::container::XNameAccess > m_xColumnDefinitions
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override
css::uno::Any m_aTextLineColor
css::uno::Any m_aTextColor
sal_Int16 m_nFontEmphasis
css::uno::Any m_aRowHeight
css::awt::FontDescriptor m_aFont
provides the properties for description.
describes all properties for a columns of a table.
css::uno::Sequence< OUString > getSupportedServiceNames()
void checkDisposed(bool _bThrow)
#define PROPERTY_ID_FONTFAMILY
#define PROPERTY_ID_TEXTEMPHASIS
#define PROPERTY_ID_TEXTRELIEF
#define PROPERTY_ID_PRIVILEGES
#define PROPERTY_ID_AUTOGROW
#define PROPERTY_ID_FONTWORDLINEMODE
#define PROPERTY_ID_FILTER
#define PROPERTY_ID_FONTHEIGHT
#define PROPERTY_ID_FONTSLANT
#define PROPERTY_ID_FONTSTYLENAME
#define PROPERTY_ID_FONTSTRIKEOUT
#define PROPERTY_ID_FONTUNDERLINE
#define PROPERTY_ID_FONTWIDTH
#define PROPERTY_ID_FONTWEIGHT
#define PROPERTY_ID_FONTNAME
#define PROPERTY_ID_ORDER
#define PROPERTY_ID_FONTTYPE
#define PROPERTY_ID_FONTCHARWIDTH
#define PROPERTY_ID_TEXTLINECOLOR
#define PROPERTY_ID_TEXTCOLOR
#define PROPERTY_ID_FONTKERNING
#define PROPERTY_ID_FONTORIENTATION
#define PROPERTY_ID_ROW_HEIGHT
#define PROPERTY_ID_FONTPITCH
#define PROPERTY_ID_APPLYFILTER
#define PROPERTY_ID_FONTCHARSET
constexpr OUStringLiteral PROPERTY_FONTHEIGHT(u"FontHeight")
constexpr OUStringLiteral PROPERTY_FONTCHARWIDTH(u"FontCharWidth")
constexpr OUStringLiteral PROPERTY_FONTORIENTATION(u"FontOrientation")
constexpr OUStringLiteral PROPERTY_TEXTCOLOR(u"TextColor")
constexpr OUStringLiteral PROPERTY_FONTUNDERLINE(u"FontUnderline")
constexpr OUStringLiteral PROPERTY_FONTKERNING(u"FontKerning")
constexpr OUStringLiteral PROPERTY_FONTSTRIKEOUT(u"FontStrikeout")
constexpr OUStringLiteral PROPERTY_SCHEMANAME(u"SchemaName")
constexpr OUStringLiteral PROPERTY_FONTPITCH(u"FontPitch")
constexpr OUStringLiteral PROPERTY_DESCRIPTION(u"Description")
constexpr OUStringLiteral PROPERTY_FONTSLANT(u"FontSlant")
constexpr OUStringLiteral PROPERTY_APPLYFILTER(u"ApplyFilter")
constexpr OUStringLiteral PROPERTY_TEXTEMPHASIS(u"FontEmphasisMark")
constexpr OUStringLiteral PROPERTY_AUTOGROW(u"AutoGrow")
constexpr OUStringLiteral PROPERTY_FILTER(u"Filter")
constexpr OUStringLiteral PROPERTY_FONTCHARSET(u"FontCharset")
constexpr OUStringLiteral PROPERTY_FONT(u"FontDescriptor")
constexpr OUStringLiteral PROPERTY_FONTNAME(u"FontName")
constexpr OUStringLiteral SQLSTATE_GENERAL
constexpr OUStringLiteral PROPERTY_CATALOGNAME(u"CatalogName")
constexpr OUStringLiteral PROPERTY_TEXTLINECOLOR(u"TextLineColor")
constexpr OUStringLiteral PROPERTY_FONTSTYLENAME(u"FontStyleName")
constexpr OUStringLiteral PROPERTY_FONTWEIGHT(u"FontWeight")
constexpr OUStringLiteral PROPERTY_FONTFAMILY(u"FontFamily")
constexpr OUStringLiteral PROPERTY_NAME(u"Name")
constexpr OUStringLiteral PROPERTY_TEXTRELIEF(u"FontRelief")
constexpr OUStringLiteral PROPERTY_FONTTYPE(u"FontType")
constexpr OUStringLiteral PROPERTY_FONTWIDTH(u"FontWidth")
constexpr OUStringLiteral PROPERTY_FONTWORDLINEMODE(u"FontWordLineMode")
constexpr OUStringLiteral SERVICE_SDBCX_TABLE
constexpr OUStringLiteral PROPERTY_ROW_HEIGHT(u"RowHeight")
constexpr OUStringLiteral PROPERTY_PRIVILEGES(u"Privileges")
constexpr OUStringLiteral PROPERTY_ORDER(u"Order")