LibreOffice Module dbaccess (master) 1
Classes | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
dbaui::OTableCopyHelper Class Reference

#include <TableCopyHelper.hxx>

Collaboration diagram for dbaui::OTableCopyHelper:
[legend]

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

OGenericUnoControllerm_pController
 
OUString m_sTableNameForAppend
 

Detailed Description

Definition at line 59 of file TableCopyHelper.hxx.

Constructor & Destructor Documentation

◆ OTableCopyHelper()

dbaui::OTableCopyHelper::OTableCopyHelper ( OGenericUnoController _pController)

Definition at line 59 of file TableCopyHelper.cxx.

Member Function Documentation

◆ asyncCopyTagTable()

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

Parameters
_rDescThe Drop descriptor
_bCheckIf set to <TRUE> than the controller checks only if a copy is possible.
_xConnectionThe 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().

◆ copyTagTable() [1/2]

bool dbaui::OTableCopyHelper::copyTagTable ( const TransferableDataHelper _aDroppedData,
DropDescriptor _rAsyncDrop,
const SharedConnection _xConnection 
)

◆ copyTagTable() [2/2]

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

Parameters
_rDescThe Drop descriptor
_bCheckIf set to <TRUE> than the controller checks only if a copy is possible.
_xConnectionThe 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().

◆ GetTableNameForAppend()

const OUString & dbaui::OTableCopyHelper::GetTableNameForAppend ( ) const
inline

Definition at line 156 of file TableCopyHelper.hxx.

References m_sTableNameForAppend.

Referenced by insertTable(), and pasteTable().

◆ insertTable()

void dbaui::OTableCopyHelper::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 
)
private

◆ isTableFormat()

bool dbaui::OTableCopyHelper::isTableFormat ( const TransferableDataHelper _rClipboard)
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().

◆ pasteTable() [1/3]

void dbaui::OTableCopyHelper::pasteTable ( const svx::ODataAccessDescriptor _rPasteData,
std::u16string_view  _sDestDataSourceName,
const SharedConnection _xDestConnection 
)
private

pastes a table into the data source

Parameters
_rPasteDataThe data descriptor.
_sDestDataSourceNameThe name of the dest data source.

Definition at line 124 of file TableCopyHelper.cxx.

References svx::ODataAccessDescriptor::getDataSource(), svx::ODataAccessDescriptor::has(), and insertTable().

◆ pasteTable() [2/3]

void dbaui::OTableCopyHelper::pasteTable ( const TransferableDataHelper _rTransData,
std::u16string_view  _sDestDataSourceName,
const SharedConnection _xConnection 
)

pastes a table into the data source

Parameters
_rPasteDataThe data helper.
_sDestDataSourceNameThe 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().

◆ pasteTable() [3/3]

void dbaui::OTableCopyHelper::pasteTable ( SotClipboardFormatId  _nFormatId,
const TransferableDataHelper _rTransData,
std::u16string_view  _sDestDataSourceName,
const SharedConnection _xConnection 
)

◆ ResetTableNameForAppend()

void dbaui::OTableCopyHelper::ResetTableNameForAppend ( )
inline

Definition at line 155 of file TableCopyHelper.hxx.

References SetTableNameForAppend().

Referenced by dbaui::OApplicationController::Execute().

◆ SetTableNameForAppend()

void dbaui::OTableCopyHelper::SetTableNameForAppend ( const OUString &  _rDefaultTableName)
inline

Member Data Documentation

◆ m_pController

OGenericUnoController* dbaui::OTableCopyHelper::m_pController
private

Definition at line 62 of file TableCopyHelper.hxx.

Referenced by asyncCopyTagTable(), copyTagTable(), insertTable(), and pasteTable().

◆ m_sTableNameForAppend

OUString dbaui::OTableCopyHelper::m_sTableNameForAppend
private

Definition at line 63 of file TableCopyHelper.hxx.

Referenced by GetTableNameForAppend(), and SetTableNameForAppend().


The documentation for this class was generated from the following files: