21#include <osl/diagnose.h>
22#include <com/sun/star/sdbcx/XTablesSupplier.hpp>
23#include <com/sun/star/sdb/XSQLQueryComposerFactory.hpp>
24#include <com/sun/star/ucb/XContent.hpp>
47 ,
const Reference< XContent>& xContent)
64 OSL_ENSURE(
static_cast<SotClipboardFormatId>(-1) != s_nFormFormat,
"OComponentTransferable::getDescriptorFormatId: bad exchange id!");
69 OSL_ENSURE(
static_cast<SotClipboardFormatId>(-1) != s_nReportFormat,
"OComponentTransferable::getDescriptorFormatId: bad exchange id!");
71 return _bExtractForm ? s_nFormFormat : s_nReportFormat;
80 Reference<XPropertySet> xProp;
83 xProp->getPropertyValue(
"IsForm") >>= bForm;
104 return std::any_of(_rFlavors.begin(), _rFlavors.end(),
105 [&nFormatId](
const DataFlavorEx& rCheck) { return nFormatId == rCheck.mnSotId; });
120 OSL_ENSURE(bSuccess,
"OComponentTransferable::extractColumnDescriptor: invalid data format (no flavor)!");
122 Any aDescriptor = _rData.
GetAny(aFlavor, OUString());
125 Sequence< PropertyValue > aDescriptorProps;
126 bSuccess = aDescriptor >>= aDescriptorProps;
127 OSL_ENSURE(bSuccess,
"OComponentTransferable::extractColumnDescriptor: invalid clipboard format!");
static bool GetFormatDataFlavor(SotClipboardFormatId nFormat, css::datatransfer::DataFlavor &rFlavor)
static SotClipboardFormatId GetFormat(const css::datatransfer::DataFlavor &rFlavor)
static SotClipboardFormatId RegisterFormatName(const OUString &rName)
css::uno::Any GetAny(SotClipboardFormatId nFormat, const OUString &rDestDoc) const
bool HasFormat(SotClipboardFormatId nFormat) const
bool SetAny(const css::uno::Any &rAny)
void AddFormat(SotClipboardFormatId nFormat)
virtual void AddSupportedFormats() override
static bool canExtractComponentDescriptor(const DataFlavorExVector &_rFlavors, bool _bForm)
checks whether or not a component descriptor can be extracted from the data flavor vector given
virtual bool GetData(const css::datatransfer::DataFlavor &rFlavor, const OUString &rDestDoc) override
ODataAccessDescriptor m_aDescriptor
void Update(const OUString &rDatasourceOrLocation, const css::uno::Reference< css::ucb::XContent > &xContent)
static SotClipboardFormatId getDescriptorFormatId(bool _bExtractForm)
static ODataAccessDescriptor extractComponentDescriptor(const TransferableDataHelper &_rData)
extracts a component descriptor from the transferable given
class encapsulating the css::sdb::DataAccessDescriptor service.
css::uno::Sequence< css::beans::PropertyValue > const & createPropertyValueSequence()
returns the descriptor as property value sequence
void setDataSource(const OUString &_sDataSourceNameOrLocation)
set the data source name, if it is not file URL
::std::vector< DataFlavorEx > DataFlavorExVector
@ Component
selection are bookmarks? (boolean)