LibreOffice Module dbaccess (master) 1
|
#include <TableCopyHelper.hxx>
Classes | |
struct | DropDescriptor |
Public Member Functions | |
OTableCopyHelper (OGenericUnoController *_pController) | |
void | pasteTable (const TransferableDataHelper &_rTransData, std::u16string_view _sDestDataSourceName, const SharedConnection &_xConnection) |
pastes a table into the data source More... | |
void | pasteTable (SotClipboardFormatId _nFormatId, const TransferableDataHelper &_rTransData, std::u16string_view _sDestDataSourceName, const SharedConnection &_xConnection) |
pastes a table into the data source More... | |
bool | copyTagTable (DropDescriptor const &_rDesc, bool _bCheck, const SharedConnection &_xConnection) |
copies a table which was constructed by tags like HTML or RTF More... | |
void | asyncCopyTagTable (DropDescriptor &_rDesc, std::u16string_view _sDestDataSourceName, const SharedConnection &_xConnection) |
copies a table which was constructed by tags like HTML or RTF More... | |
bool | copyTagTable (const TransferableDataHelper &_aDroppedData, DropDescriptor &_rAsyncDrop, const SharedConnection &_xConnection) |
copies a table which was constructed by tags like HTML or RTF More... | |
void | SetTableNameForAppend (const OUString &_rDefaultTableName) |
void | ResetTableNameForAppend () |
const OUString & | GetTableNameForAppend () const |
Static Public Member Functions | |
static bool | isTableFormat (const TransferableDataHelper &_rClipboard) |
returns <TRUE> if the clipboard supports a table format, otherwise <FALSE>. More... | |
Private Member Functions | |
void | pasteTable (const svx::ODataAccessDescriptor &_rPasteData, std::u16string_view _sDestDataSourceName, const SharedConnection &_xDestConnection) |
pastes a table into the data source More... | |
void | insertTable (std::u16string_view i_rSourceDataSource, const css::uno::Reference< css::sdbc::XConnection > &i_rSourceConnection, const OUString &i_rCommand, const sal_Int32 i_nCommandType, const css::uno::Reference< css::sdbc::XResultSet > &i_rSourceRows, const css::uno::Sequence< css::uno::Any > &i_rSelection, const bool i_bBookmarkSelection, std::u16string_view i_rDestDataSource, const css::uno::Reference< css::sdbc::XConnection > &i_rDestConnection) |
insert a table into the data source. More... | |
Private Attributes | |
OGenericUnoController * | m_pController |
OUString | m_sTableNameForAppend |
Definition at line 59 of file TableCopyHelper.hxx.
dbaui::OTableCopyHelper::OTableCopyHelper | ( | OGenericUnoController * | _pController | ) |
Definition at line 59 of file TableCopyHelper.cxx.
void dbaui::OTableCopyHelper::asyncCopyTagTable | ( | DropDescriptor & | _rDesc, |
std::u16string_view | _sDestDataSourceName, | ||
const SharedConnection & | _xConnection | ||
) |
copies a table which was constructed by tags like HTML or RTF
_rDesc | The Drop descriptor |
_bCheck | If set to <TRUE> than the controller checks only if a copy is possible. |
_xConnection | The connection |
Definition at line 285 of file TableCopyHelper.cxx.
References dbaui::OTableCopyHelper::DropDescriptor::aDroppedData, dbaui::OTableCopyHelper::DropDescriptor::aHtmlRtfStorage, Any, aURL, dbaui::OTableCopyHelper::DropDescriptor::aUrl, dbaui::OTableCopyHelper::DropDescriptor::bError, copyTagTable(), DBA_RES, tools::SvRef< typename T >::is(), m_pController, INetURLObject::NONE, pasteTable(), and dbaui::OGenericUnoController::showError().
bool dbaui::OTableCopyHelper::copyTagTable | ( | const TransferableDataHelper & | _aDroppedData, |
DropDescriptor & | _rAsyncDrop, | ||
const SharedConnection & | _xConnection | ||
) |
copies a table which was constructed by tags like HTML or RTF
_aDroppedData | The dropped data |
_rDesc | IN/OUT parameter |
_xConnection | The connection |
Definition at line 251 of file TableCopyHelper.cxx.
References dbaui::OTableCopyHelper::DropDescriptor::aHtmlRtfStorage, dbaui::OTableCopyHelper::DropDescriptor::aUrl, dbaui::OTableCopyHelper::DropDescriptor::bError, dbaui::OTableCopyHelper::DropDescriptor::bHtml, copyTagTable(), tools::SvRef< typename T >::get(), utl::TempFileNamed::GetFileName(), TransferableDataHelper::GetSotStorageStream(), utl::TempFileNamed::GetURL(), TransferableDataHelper::HasFormat(), tools::SvRef< typename T >::is(), and STREAM_SEEK_TO_BEGIN.
bool dbaui::OTableCopyHelper::copyTagTable | ( | OTableCopyHelper::DropDescriptor const & | _rDesc, |
bool | _bCheck, | ||
const SharedConnection & | _xConnection | ||
) |
copies a table which was constructed by tags like HTML or RTF
_rDesc | The Drop descriptor |
_bCheck | If set to <TRUE> than the controller checks only if a copy is possible. |
_xConnection | The connection |
Definition at line 222 of file TableCopyHelper.cxx.
References dbaui::OTableCopyHelper::DropDescriptor::aHtmlRtfStorage, dbaui::OTableCopyHelper::DropDescriptor::bHtml, tools::SvRef< typename T >::get(), dbaui::getNumberFormatter(), dbaui::OGenericUnoController::getORB(), m_pController, and dbaui::OTableCopyHelper::DropDescriptor::sDefaultTableName.
Referenced by asyncCopyTagTable(), copyTagTable(), dbaui::OApplicationController::executeDrop(), dbaui::SbaTableQueryBrowser::executeDrop(), and pasteTable().
|
inline |
Definition at line 156 of file TableCopyHelper.hxx.
References m_sTableNameForAppend.
Referenced by insertTable(), and pasteTable().
|
private |
insert a table into the data source.
The source can either be a table or a query
Definition at line 64 of file TableCopyHelper.cxx.
References Any, DBG_UNHANDLED_EXCEPTION, Exception, VCLUnoHelper::GetInterface(), dbaui::OGenericUnoController::getORB(), GetTableNameForAppend(), dbaui::OGenericUnoController::getView(), m_pController, PROPERTY_ACTIVE_CONNECTION(), PROPERTY_BOOKMARK_SELECTION(), PROPERTY_COMMAND(), PROPERTY_COMMAND_TYPE(), PROPERTY_RESULT_SET(), PROPERTY_SELECTION(), dbaccess::QUERY, SAL_WARN, dbaui::OGenericUnoController::showError(), dbaccess::TABLE, and xFactory.
Referenced by pasteTable().
|
static |
returns <TRUE> if the clipboard supports a table format, otherwise <FALSE>.
Definition at line 241 of file TableCopyHelper.cxx.
References TransferableDataHelper::HasFormat().
Referenced by dbaui::OApplicationController::isTableFormat().
|
private |
pastes a table into the data source
_rPasteData | The data descriptor. |
_sDestDataSourceName | The name of the dest data source. |
Definition at line 124 of file TableCopyHelper.cxx.
References svx::ODataAccessDescriptor::getDataSource(), svx::ODataAccessDescriptor::has(), and insertTable().
void dbaui::OTableCopyHelper::pasteTable | ( | const TransferableDataHelper & | _rTransData, |
std::u16string_view | _sDestDataSourceName, | ||
const SharedConnection & | _xConnection | ||
) |
pastes a table into the data source
_rPasteData | The data helper. |
_sDestDataSourceName | The name of the dest data source. |
Definition at line 210 of file TableCopyHelper.cxx.
References TransferableDataHelper::HasFormat(), and pasteTable().
Referenced by asyncCopyTagTable(), dbaui::OApplicationController::Execute(), dbaui::OApplicationController::pasteFormat(), and pasteTable().
void dbaui::OTableCopyHelper::pasteTable | ( | SotClipboardFormatId | _nFormatId, |
const TransferableDataHelper & | _rTransData, | ||
std::u16string_view | _sDestDataSourceName, | ||
const SharedConnection & | _xConnection | ||
) |
pastes a table into the data source
_nFormatId | The format which should be copied. |
_rPasteData | The data helper. |
_sDestDataSourceName | The name of the dest data source. |
Definition at line 167 of file TableCopyHelper.cxx.
References dbaui::OTableCopyHelper::DropDescriptor::aHtmlRtfStorage, Any, dbaui::OTableCopyHelper::DropDescriptor::bHtml, copyTagTable(), DBA_RES, DBG_UNHANDLED_EXCEPTION, dbaui::E_TABLE, Exception, TransferableDataHelper::GetDataFlavorExVector(), TransferableDataHelper::GetSotStorageStream(), GetTableNameForAppend(), TransferableDataHelper::HasFormat(), m_pController, dbaui::OTableCopyHelper::DropDescriptor::nType, pasteTable(), dbaui::OTableCopyHelper::DropDescriptor::sDefaultTableName, and dbaui::OGenericUnoController::showError().
|
inline |
Definition at line 155 of file TableCopyHelper.hxx.
References SetTableNameForAppend().
Referenced by dbaui::OApplicationController::Execute().
|
inline |
Definition at line 154 of file TableCopyHelper.hxx.
References m_sTableNameForAppend.
Referenced by dbaui::OApplicationController::Execute(), and ResetTableNameForAppend().
|
private |
Definition at line 62 of file TableCopyHelper.hxx.
Referenced by asyncCopyTagTable(), copyTagTable(), insertTable(), and pasteTable().
|
private |
Definition at line 63 of file TableCopyHelper.hxx.
Referenced by GetTableNameForAppend(), and SetTableNameForAppend().