22#include <com/sun/star/sdbcx/XDataDescriptorFactory.hpp>
23#include <com/sun/star/awt/FontDescriptor.hpp>
24#include <com/sun/star/awt/FontWeight.hpp>
25#include <com/sun/star/awt/FontStrikeout.hpp>
26#include <com/sun/star/awt/FontSlant.hpp>
27#include <com/sun/star/awt/FontUnderline.hpp>
28#include <core_resource.hxx>
48ORTFReader::ORTFReader(
SvStream& rIn,
51 const css::uno::Reference< css::uno::XComponentContext >& _rxContext)
55 m_bAppendFirstLine =
false;
60 TPositions&& _rColumnPositions,
62 const css::uno::Reference< css::uno::XComponentContext >& _rxContext,
63 const TColumnVector* pList,
65 bool _bAutoIncrementEnabled)
67 ,
ODatabaseExport( nRows,
std::move(_rColumnPositions), _rxNumberF, _rxContext, pList, _pInfoMap, _bAutoIncrementEnabled, rIn )
69 m_bAppendFirstLine =
false;
72ORTFReader::~ORTFReader()
86#pragma warning(disable: 4702)
116 while(
aToken[0] !=
';' &&
eState != SvParserState::Error &&
eState != SvParserState::Accepted);
120 while(nTmpToken2 ==
RTF_RED &&
eState != SvParserState::Error &&
eState != SvParserState::Accepted);
159 catch(SQLException& e)
178 catch(SQLException& e)
224 OUString aTableName(
DBA_RES(STR_TBL_TITLE));
225 aTableName = aTableName.getToken(0,
' ');
226 aTableName = ::dbtools::createUniqueName(
m_xTables, aTableName);
228 OUString aColumnName;
255 aColumnName =
DBA_RES(STR_COLUMN_NAME);
264 aFont.Weight = css::awt::FontWeight::BOLD;
267 aFont.Slant = css::awt::FontSlant_ITALIC;
270 aFont.Underline = css::awt::FontUnderline::SINGLE;
273 aFont.Strikeout = css::awt::FontStrikeout::SINGLE;
283 if ( !aColumnName.isEmpty() )
286 aColumnName =
DBA_RES(STR_COLUMN_NAME);
static const AllSettings & GetSettings()
Color GetRGBColor() const
void SetGreen(sal_uInt8 nGreen)
void SetRed(sal_uInt8 nRed)
void SetBlue(sal_uInt8 nBlue)
T SkipToken(short nCnt=-1)
virtual SvParserState CallParser() override
virtual void ResetError()
sal_uInt64 Seek(sal_uInt64 nPos)
static css::awt::FontDescriptor CreateFontDescriptor(const vcl::Font &rFont)
sal_Int32 m_nRows
number of rows to be searched
bool isCheckEnabled() const
OUString m_sTextToken
cell content
void CreateDefaultColumn(const OUString &_rColumnName)
css::uno::Reference< css::container::XNameAccess > m_xTables
container
TColumnVector m_vDestVector
bool m_bError
error and termination code
std::shared_ptr< IUpdateHelper > m_pUpdateHelper
sal_Int32 m_nColumnPos
current column position
const OTypeInfoMap * m_pInfoMap
bool m_bInTbl
true, if parser is in RTF table
sal_Int32 m_nRowCount
current count of rows
css::uno::Reference< css::beans::XPropertySet > m_xTable
dest table
bool executeWizard(const OUString &_sTableName, const css::uno::Any &_aTextColor, const css::awt::FontDescriptor &_rFont)
executeWizard calls a wizard to create/append data
bool m_bFoundTable
set to true when a table was found
bool m_bIsAutoIncrement
if PKey is set by user
void showErrorDialog(const css::sdbc::SQLException &e)
void SetColumnTypes(const TColumnVector *rList, const OTypeInfoMap *_pInfoMap)
void insertValueIntoColumn()
bool m_bHead
true, if the header hasn't been read yet
const TColumnVector * m_pColumnList
SharedConnection m_xConnection
dest conn
virtual TypeSelectionPageFactory getTypeSelectionPageFactory() override
virtual SvParserState CallParser() override
std::vector< Color > m_vecColor
virtual void NextToken(int nToken) override
bool CreateTable(int nToken)
static std::unique_ptr< OWizTypeSelect > Create(weld::Container *pPage, OCopyTableWizard *pWizard, SvStream &rInput)
OString strip(const OString &rIn, char c)
std::multimap< DataTypeEnum, OExtendedTypeInfo * > OTypeInfoMap
std::unique_ptr< OWizTypeSelect >(* TypeSelectionPageFactory)(weld::Container *, OCopyTableWizard *, SvStream &)
#define STREAM_SEEK_TO_BEGIN