LibreOffice Module dbaccess (master) 1
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
dbaui::ODatabaseExport Class Referenceabstract

#include <DExport.hxx>

Inheritance diagram for dbaui::ODatabaseExport:
[legend]
Collaboration diagram for dbaui::ODatabaseExport:
[legend]

Public Types

typedef std::map< OUString, OFieldDescription *, ::comphelper::UStringMixLessTColumns
 
typedef std::vector< TColumns::const_iterator > TColumnVector
 
typedef std::vector< std::pair< sal_Int32, sal_Int32 > > TPositions
 

Public Member Functions

 ODatabaseExport (const SharedConnection &_rxConnection, const css::uno::Reference< css::util::XNumberFormatter > &_rxNumberF, const css::uno::Reference< css::uno::XComponentContext > &_rxContext, SvStream &_rInputStream)
 
 ODatabaseExport (sal_Int32 nRows, TPositions &&_rColumnPositions, const css::uno::Reference< css::util::XNumberFormatter > &_rxNumberF, const css::uno::Reference< css::uno::XComponentContext > &_rxContext, const TColumnVector *rList, const OTypeInfoMap *_pInfoMap, bool _bAutoIncrementEnabled, SvStream &_rInputStream)
 
void SetColumnTypes (const TColumnVector *rList, const OTypeInfoMap *_pInfoMap)
 
void SetTableName (const OUString &_sTableName)
 
void enableCheckOnly ()
 
bool isCheckEnabled () const
 

Static Public Member Functions

static css::uno::Reference< css::sdbc::XPreparedStatement > createPreparedStatement (const css::uno::Reference< css::sdbc::XDatabaseMetaData > &_xMetaData, const css::uno::Reference< css::beans::XPropertySet > &_xDestTable, const TPositions &_rvColumnPositions)
 

Protected Member Functions

virtual TypeSelectionPageFactory getTypeSelectionPageFactory ()=0
 
void CreateDefaultColumn (const OUString &_rColumnName)
 
sal_Int16 CheckString (const OUString &aToken, sal_Int16 _nOldNumberFormat)
 
void adjustFormat ()
 
void eraseTokens ()
 
void insertValueIntoColumn ()
 
void createRowSet ()
 
void showErrorDialog (const css::sdbc::SQLException &e)
 
void ensureFormatter ()
 
bool executeWizard (const OUString &_sTableName, const css::uno::Any &_aTextColor, const css::awt::FontDescriptor &_rFont)
 executeWizard calls a wizard to create/append data More...
 
virtual ~ODatabaseExport ()
 

Protected Attributes

TPositions m_vColumnPositions
 columns to be used More...
 
std::vector< sal_Int32 > m_vColumnTypes
 ColumnTypes for faster access. More...
 
std::vector< sal_Int32 > m_vColumnSize
 
std::vector< sal_Int16 > m_vNumberFormat
 
css::lang::Locale m_aLocale
 
TColumns m_aDestColumns
 container for new created columns More...
 
TColumnVector m_vDestVector
 
css::uno::Reference< css::beans::XPropertySetm_xTable
 dest table More...
 
css::uno::Reference< css::container::XNameAccess > m_xTables
 container More...
 
SharedConnection m_xConnection
 dest conn More...
 
std::shared_ptr< IUpdateHelperm_pUpdateHelper
 
css::uno::Reference< css::util::XNumberFormatter > m_xFormatter
 a number formatter working with the connection's NumberFormatsSupplier More...
 
css::uno::Reference< css::uno::XComponentContext > m_xContext
 
css::util::Date m_aNullDate
 
SvNumberFormatterm_pFormatter
 
SvStreamm_rInputStream
 
OUString m_sDefaultTableName
 for saving the selected tablename More...
 
OUString m_sTextToken
 cell content More...
 
OUString m_sNumToken
 SDNUM value. More...
 
TOTypeInfoSP m_pTypeInfo
 contains the default type More...
 
const TColumnVectorm_pColumnList
 
const OTypeInfoMapm_pInfoMap
 
sal_Int32 m_nColumnPos
 current column position More...
 
sal_Int32 m_nRows
 number of rows to be searched More...
 
sal_Int32 m_nRowCount
 current count of rows More...
 
bool m_bError
 error and termination code More...
 
bool m_bInTbl
 true, if parser is in RTF table More...
 
bool m_bHead
 true, if the header hasn't been read yet More...
 
bool m_bDontAskAgain
 if there is an error when pasting, don't show it again More...
 
bool m_bIsAutoIncrement
 if PKey is set by user More...
 
bool m_bFoundTable
 set to true when a table was found More...
 
bool m_bCheckOnly
 
bool m_bAppendFirstLine
 

Detailed Description

Definition at line 54 of file DExport.hxx.

Member Typedef Documentation

◆ TColumns

Definition at line 57 of file DExport.hxx.

◆ TColumnVector

typedef std::vector<TColumns::const_iterator> dbaui::ODatabaseExport::TColumnVector

Definition at line 58 of file DExport.hxx.

◆ TPositions

typedef std::vector< std::pair<sal_Int32,sal_Int32> > dbaui::ODatabaseExport::TPositions

Definition at line 59 of file DExport.hxx.

Constructor & Destructor Documentation

◆ ~ODatabaseExport()

ODatabaseExport::~ODatabaseExport ( )
protectedvirtual

Definition at line 263 of file DExport.cxx.

References m_aDestColumns, m_pFormatter, and m_vDestVector.

◆ ODatabaseExport() [1/2]

dbaui::ODatabaseExport::ODatabaseExport ( const SharedConnection _rxConnection,
const css::uno::Reference< css::util::XNumberFormatter > &  _rxNumberF,
const css::uno::Reference< css::uno::XComponentContext > &  _rxContext,
SvStream _rInputStream 
)

◆ ODatabaseExport() [2/2]

dbaui::ODatabaseExport::ODatabaseExport ( sal_Int32  nRows,
TPositions &&  _rColumnPositions,
const css::uno::Reference< css::util::XNumberFormatter > &  _rxNumberF,
const css::uno::Reference< css::uno::XComponentContext > &  _rxContext,
const TColumnVector rList,
const OTypeInfoMap _pInfoMap,
bool  _bAutoIncrementEnabled,
SvStream _rInputStream 
)

Member Function Documentation

◆ adjustFormat()

void ODatabaseExport::adjustFormat ( )
protected

◆ CheckString()

sal_Int16 ODatabaseExport::CheckString ( const OUString &  aToken,
sal_Int16  _nOldNumberFormat 
)
protected

◆ CreateDefaultColumn()

void ODatabaseExport::CreateDefaultColumn ( const OUString &  _rColumnName)
protected

◆ createPreparedStatement()

Reference< XPreparedStatement > ODatabaseExport::createPreparedStatement ( const css::uno::Reference< css::sdbc::XDatabaseMetaData > &  _xMetaData,
const css::uno::Reference< css::beans::XPropertySet > &  _xDestTable,
const TPositions _rvColumnPositions 
)
static

Definition at line 781 of file DExport.cxx.

References COLUMN_POSITION_NOT_FOUND.

Referenced by createRowSet().

◆ createRowSet()

void ODatabaseExport::createRowSet ( )
protected

Definition at line 656 of file DExport.cxx.

References createPreparedStatement(), m_pUpdateHelper, m_vColumnPositions, m_xConnection, and m_xTable.

Referenced by executeWizard().

◆ enableCheckOnly()

void dbaui::ODatabaseExport::enableCheckOnly ( )
inline

Definition at line 153 of file DExport.hxx.

References m_bCheckOnly.

◆ ensureFormatter()

void ODatabaseExport::ensureFormatter ( )
protected

Definition at line 769 of file DExport.cxx.

References m_aNullDate, m_pFormatter, and m_xFormatter.

Referenced by CheckString(), and insertValueIntoColumn().

◆ eraseTokens()

void ODatabaseExport::eraseTokens ( )
protected

◆ executeWizard()

bool ODatabaseExport::executeWizard ( const OUString &  _sTableName,
const css::uno::Any &  _aTextColor,
const css::awt::FontDescriptor &  _rFont 
)
protected

◆ getTypeSelectionPageFactory()

virtual TypeSelectionPageFactory dbaui::ODatabaseExport::getTypeSelectionPageFactory ( )
protectedpure virtual

Implemented in dbaui::OHTMLReader, and dbaui::ORTFReader.

Referenced by executeWizard().

◆ insertValueIntoColumn()

void ODatabaseExport::insertValueIntoColumn ( )
protected

◆ isCheckEnabled()

bool dbaui::ODatabaseExport::isCheckEnabled ( ) const
inline

Definition at line 154 of file DExport.hxx.

References m_bCheckOnly.

Referenced by dbaui::OHTMLReader::CreateTable(), and dbaui::ORTFReader::CreateTable().

◆ SetColumnTypes()

void ODatabaseExport::SetColumnTypes ( const TColumnVector rList,
const OTypeInfoMap _pInfoMap 
)

◆ SetTableName()

void dbaui::ODatabaseExport::SetTableName ( const OUString &  _sTableName)
inline

Definition at line 151 of file DExport.hxx.

References m_sDefaultTableName.

◆ showErrorDialog()

void ODatabaseExport::showErrorDialog ( const css::sdbc::SQLException &  e)
protected

Member Data Documentation

◆ m_aDestColumns

TColumns dbaui::ODatabaseExport::m_aDestColumns
protected

container for new created columns

Definition at line 68 of file DExport.hxx.

Referenced by CreateDefaultColumn(), executeWizard(), and ~ODatabaseExport().

◆ m_aLocale

css::lang::Locale dbaui::ODatabaseExport::m_aLocale
protected

Definition at line 66 of file DExport.hxx.

Referenced by CheckString(), insertValueIntoColumn(), and SetColumnTypes().

◆ m_aNullDate

css::util::Date dbaui::ODatabaseExport::m_aNullDate
protected

Definition at line 78 of file DExport.hxx.

Referenced by ensureFormatter(), and insertValueIntoColumn().

◆ m_bAppendFirstLine

bool dbaui::ODatabaseExport::m_bAppendFirstLine
protected

◆ m_bCheckOnly

bool dbaui::ODatabaseExport::m_bCheckOnly
protected

Definition at line 99 of file DExport.hxx.

Referenced by enableCheckOnly(), and isCheckEnabled().

◆ m_bDontAskAgain

bool dbaui::ODatabaseExport::m_bDontAskAgain
protected

if there is an error when pasting, don't show it again

Definition at line 96 of file DExport.hxx.

Referenced by showErrorDialog().

◆ m_bError

bool dbaui::ODatabaseExport::m_bError
protected

error and termination code

Definition at line 93 of file DExport.hxx.

Referenced by dbaui::OHTMLReader::NextToken(), dbaui::ORTFReader::NextToken(), and showErrorDialog().

◆ m_bFoundTable

bool dbaui::ODatabaseExport::m_bFoundTable
protected

◆ m_bHead

bool dbaui::ODatabaseExport::m_bHead
protected

true, if the header hasn't been read yet

Definition at line 95 of file DExport.hxx.

Referenced by dbaui::OHTMLReader::NextToken(), and dbaui::ORTFReader::NextToken().

◆ m_bInTbl

bool dbaui::ODatabaseExport::m_bInTbl
protected

◆ m_bIsAutoIncrement

bool dbaui::ODatabaseExport::m_bIsAutoIncrement
protected

◆ m_nColumnPos

sal_Int32 dbaui::ODatabaseExport::m_nColumnPos
protected

current column position

Definition at line 90 of file DExport.hxx.

Referenced by adjustFormat(), insertValueIntoColumn(), dbaui::OHTMLReader::NextToken(), and dbaui::ORTFReader::NextToken().

◆ m_nRowCount

sal_Int32 dbaui::ODatabaseExport::m_nRowCount
protected

current count of rows

Definition at line 92 of file DExport.hxx.

Referenced by dbaui::OHTMLReader::NextToken(), and dbaui::ORTFReader::NextToken().

◆ m_nRows

sal_Int32 dbaui::ODatabaseExport::m_nRows
protected

number of rows to be searched

Definition at line 91 of file DExport.hxx.

Referenced by dbaui::OHTMLReader::NextToken(), and dbaui::ORTFReader::NextToken().

◆ m_pColumnList

const TColumnVector* dbaui::ODatabaseExport::m_pColumnList
protected

Definition at line 88 of file DExport.hxx.

Referenced by dbaui::OHTMLReader::CallParser(), and dbaui::ORTFReader::CallParser().

◆ m_pFormatter

SvNumberFormatter* dbaui::ODatabaseExport::m_pFormatter
protected

Definition at line 80 of file DExport.hxx.

Referenced by CheckString(), ensureFormatter(), insertValueIntoColumn(), and ~ODatabaseExport().

◆ m_pInfoMap

const OTypeInfoMap* dbaui::ODatabaseExport::m_pInfoMap
protected

Definition at line 89 of file DExport.hxx.

Referenced by dbaui::OHTMLReader::CallParser(), and dbaui::ORTFReader::CallParser().

◆ m_pTypeInfo

TOTypeInfoSP dbaui::ODatabaseExport::m_pTypeInfo
protected

contains the default type

Definition at line 87 of file DExport.hxx.

Referenced by CreateDefaultColumn().

◆ m_pUpdateHelper

std::shared_ptr<IUpdateHelper> dbaui::ODatabaseExport::m_pUpdateHelper
protected

◆ m_rInputStream

SvStream& dbaui::ODatabaseExport::m_rInputStream
protected

Definition at line 81 of file DExport.hxx.

Referenced by executeWizard().

◆ m_sDefaultTableName

OUString dbaui::ODatabaseExport::m_sDefaultTableName
protected

for saving the selected tablename

Definition at line 83 of file DExport.hxx.

Referenced by executeWizard(), and SetTableName().

◆ m_sNumToken

OUString dbaui::ODatabaseExport::m_sNumToken
protected

SDNUM value.

Definition at line 86 of file DExport.hxx.

Referenced by CheckString(), eraseTokens(), dbaui::OHTMLReader::fetchOptions(), and insertValueIntoColumn().

◆ m_sTextToken

OUString dbaui::ODatabaseExport::m_sTextToken
protected

◆ m_vColumnPositions

TPositions dbaui::ODatabaseExport::m_vColumnPositions
protected

columns to be used

Definition at line 62 of file DExport.hxx.

Referenced by adjustFormat(), createRowSet(), executeWizard(), and insertValueIntoColumn().

◆ m_vColumnSize

std::vector<sal_Int32> dbaui::ODatabaseExport::m_vColumnSize
protected

Definition at line 64 of file DExport.hxx.

Referenced by adjustFormat(), and SetColumnTypes().

◆ m_vColumnTypes

std::vector<sal_Int32> dbaui::ODatabaseExport::m_vColumnTypes
protected

ColumnTypes for faster access.

Definition at line 63 of file DExport.hxx.

Referenced by executeWizard(), and insertValueIntoColumn().

◆ m_vDestVector

TColumnVector dbaui::ODatabaseExport::m_vDestVector
protected

◆ m_vNumberFormat

std::vector<sal_Int16> dbaui::ODatabaseExport::m_vNumberFormat
protected

Definition at line 65 of file DExport.hxx.

Referenced by adjustFormat(), and SetColumnTypes().

◆ m_xConnection

SharedConnection dbaui::ODatabaseExport::m_xConnection
protected

◆ m_xContext

css::uno::Reference< css::uno::XComponentContext> dbaui::ODatabaseExport::m_xContext
protected

Definition at line 77 of file DExport.hxx.

Referenced by executeWizard().

◆ m_xFormatter

css::uno::Reference< css::util::XNumberFormatter > dbaui::ODatabaseExport::m_xFormatter
protected

a number formatter working with the connection's NumberFormatsSupplier

Definition at line 76 of file DExport.hxx.

Referenced by CheckString(), ensureFormatter(), executeWizard(), insertValueIntoColumn(), and SetColumnTypes().

◆ m_xTable

css::uno::Reference< css::beans::XPropertySet > dbaui::ODatabaseExport::m_xTable
protected

◆ m_xTables

css::uno::Reference< css::container::XNameAccess> dbaui::ODatabaseExport::m_xTables
protected

container

Definition at line 72 of file DExport.hxx.

Referenced by dbaui::OHTMLReader::CreateTable(), and dbaui::ORTFReader::CreateTable().


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