using ::com::sun::star::uno::Reference; using ::com::sun::star::sdbc::XConnection; using ::com::sun::star::uno::Exception; using ::com::sun::star::container::XNameAccess; using ::com::sun::star::graphic::XGraphic; using ::com::sun::star::sdb::application::XTableUIProvider; using ::com::sun::star::uno::UNO_QUERY; using ::com::sun::star::sdbcx::XViewsSupplier; using ::com::sun::star::uno::UNO_SET_THROW;
OUString ImageProvider::getImageId(const OUString& _rName, const sal_Int32 _nDatabaseObjectType)
{ if (_nDatabaseObjectType != DatabaseObject::TABLE)
{ // for types other than tables, the icon does not depend on the concrete object return getDefaultImageResourceID( _nDatabaseObjectType );
} else
{ // no -> determine by type
OUString sImageResourceID;
lcl_getTableImageResourceID_nothrow( mxViews, _rName, sImageResourceID ); return sImageResourceID;
}
}
Reference<XGraphic> ImageProvider::getXGraphic(const OUString& _rName, const sal_Int32 _nDatabaseObjectType)
{
Reference<XGraphic> xGraphic; if (_nDatabaseObjectType == DatabaseObject::TABLE)
{ // check whether the connection can give us an icon
lcl_getConnectionProvidedTableIcon_nothrow( mxTableUI, _rName, xGraphic );
} return xGraphic;
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.