Files
libreoffice/dbaccess/source/ui/misc/RtfReader.cxx

350 lines
12 KiB
C++
Raw Normal View History

/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2012-06-14 17:39:53 +01:00
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
2001-02-16 14:54:09 +00:00
#include "RtfReader.hxx"
#include <tools/debug.hxx>
#include <com/sun/star/sdbcx/XDataDescriptorFactory.hpp>
#include <com/sun/star/sdbcx/XColumnsSupplier.hpp>
#include <com/sun/star/sdbcx/XAppend.hpp>
#include <com/sun/star/sdbc/DataType.hpp>
#include <com/sun/star/sdbc/ColumnValue.hpp>
#include <com/sun/star/awt/FontDescriptor.hpp>
#include <com/sun/star/awt/FontWeight.hpp>
#include <com/sun/star/awt/FontStrikeout.hpp>
#include <com/sun/star/awt/FontSlant.hpp>
#include <com/sun/star/awt/FontUnderline.hpp>
#include <com/sun/star/util/NumberFormat.hpp>
#include <com/sun/star/util/XNumberFormatTypes.hpp>
#include "dbustrings.hrc"
#include <svtools/rtftoken.h>
#include <toolkit/helper/vclunohelper.hxx>
2002-08-19 07:01:32 +00:00
#include "dbu_misc.hrc"
2001-02-16 14:54:09 +00:00
#include <vcl/msgbox.hxx>
#include <connectivity/dbconversion.hxx>
#include <connectivity/dbtools.hxx>
#include <comphelper/extract.hxx>
#include <comphelper/string.hxx>
2001-02-16 14:54:09 +00:00
#include <tools/color.hxx>
2001-02-23 14:13:25 +00:00
#include "WExtendPages.hxx"
#include "moduledbu.hxx"
2001-02-23 14:13:25 +00:00
#include "QEnumTypes.hxx"
#include "UITools.hxx"
#include <vcl/svapp.hxx>
#include <vcl/settings.hxx>
2001-02-16 14:54:09 +00:00
using namespace dbaui;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::container;
using namespace ::com::sun::star::sdbc;
using namespace ::com::sun::star::sdbcx;
using namespace ::com::sun::star::awt;
// ORTFReader
ORTFReader::ORTFReader( SvStream& rIn,
const SharedConnection& _rxConnection,
const Reference< ::com::sun::star::util::XNumberFormatter >& _rxNumberF,
const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxContext,
const TColumnVector* pList,
const OTypeInfoMap* _pInfoMap)
:SvRTFParser(rIn)
,ODatabaseExport( _rxConnection, _rxNumberF, _rxContext, pList, _pInfoMap, rIn )
2001-02-16 14:54:09 +00:00
{
SAL_INFO("dbaccess.ui", "ORTFReader::ORTFReader" );
m_bAppendFirstLine = false;
2001-02-16 14:54:09 +00:00
}
2001-02-16 14:54:09 +00:00
ORTFReader::ORTFReader(SvStream& rIn,
sal_Int32 nRows,
2002-05-23 11:03:56 +00:00
const TPositions &_rColumnPositions,
const Reference< ::com::sun::star::util::XNumberFormatter >& _rxNumberF,
const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxContext,
const TColumnVector* pList,
const OTypeInfoMap* _pInfoMap,
sal_Bool _bAutoIncrementEnabled)
2001-02-23 14:13:25 +00:00
:SvRTFParser(rIn)
,ODatabaseExport( nRows, _rColumnPositions, _rxNumberF, _rxContext, pList, _pInfoMap, _bAutoIncrementEnabled, rIn )
2001-02-16 14:54:09 +00:00
{
SAL_INFO("dbaccess.ui", "ORTFReader::ORTFReader" );
m_bAppendFirstLine = false;
2001-02-16 14:54:09 +00:00
}
2001-02-16 14:54:09 +00:00
ORTFReader::~ORTFReader()
{
}
2001-02-16 14:54:09 +00:00
SvParserState ORTFReader::CallParser()
{
SAL_INFO("dbaccess.ui", "ORTFReader::CallParser" );
2001-02-16 14:54:09 +00:00
rInput.Seek(STREAM_SEEK_TO_BEGIN);
rInput.ResetError();
SvParserState eParseState = SvRTFParser::CallParser();
SetColumnTypes(m_pColumnList,m_pInfoMap);
return m_bFoundTable ? eParseState : SVPAR_ERROR;
2001-02-16 14:54:09 +00:00
}
2001-02-16 14:54:09 +00:00
void ORTFReader::NextToken( int nToken )
{
SAL_INFO("dbaccess.ui", "ORTFReader::NextToken" );
if(m_bError || !m_nRows) // if there is an error or no more rows to check, return immediatelly
2001-02-16 14:54:09 +00:00
return;
if(m_xConnection.is()) // names, which CTOR was called and hence, if a table should be created
2001-02-16 14:54:09 +00:00
{
switch(nToken)
{
case RTF_COLORTBL:
{
int nTmpToken2 = GetNextToken();
do
{
Color aColor;
do
{
switch(nTmpToken2)
{
2001-02-28 09:11:33 +00:00
case RTF_RED: aColor.SetRed((sal_uInt8)nTokenValue); break;
case RTF_BLUE: aColor.SetBlue((sal_uInt8)nTokenValue); break;
case RTF_GREEN: aColor.SetGreen((sal_uInt8)nTokenValue); break;
2011-01-27 11:24:16 +00:00
default: break;
2001-02-16 14:54:09 +00:00
}
nTmpToken2 = GetNextToken();
}
while(aToken[0] != ';' && eState != SVPAR_ERROR && eState != SVPAR_ACCEPTED);
2001-02-16 14:54:09 +00:00
m_vecColor.push_back(aColor.GetRGBColor());
nTmpToken2 = GetNextToken();
}
2001-11-23 13:51:40 +00:00
while(nTmpToken2 == RTF_RED && eState != SVPAR_ERROR && eState != SVPAR_ACCEPTED);
2001-02-16 14:54:09 +00:00
SkipToken();
}
break;
case RTF_DEFLANG:
case RTF_LANG: // inquire language
2001-02-28 09:11:33 +00:00
m_nDefToken = (rtl_TextEncoding)nTokenValue;
2001-02-16 14:54:09 +00:00
break;
case RTF_TROWD:
{
bool bInsertRow = true;
if ( !m_xTable.is() ) // use first line as header
{
sal_Size nTell = rInput.Tell(); // perhaps alters position of the stream
CWS-TOOLING: integrate CWS dba32d 2009-06-30 08:58:13 +0200 fs r273488 : merging latest changes from CWS dba32c 2009-06-29 11:40:42 +0200 oj r273459 : #i101652# fix token handling 2009-06-26 09:27:30 +0200 oj r273394 : #i101994# wrong condition checked 2009-06-22 12:09:04 +0200 fs r273210 : merging latest changes from CWS dba32c 2009-06-18 11:01:06 +0200 fs r273108 : merge latest changes from CWS dba32c 2009-06-17 14:19:33 +0200 oj r273072 : handle images at the correct position 2009-06-17 13:37:19 +0200 oj r273067 : compile error 2009-06-17 13:35:58 +0200 oj r273066 : #i102201# handle images 2009-06-17 13:27:21 +0200 oj r273065 : #i80917# disable checkbox for internal copy 2009-06-17 13:25:38 +0200 oj r273064 : #i80917# disable checkbox for internal copy 2009-06-15 12:59:16 +0200 fs r272978 : merging latest changes from CWS dba32c 2009-06-15 10:45:58 +0200 fs r272967 : CWS-TOOLING: rebase CWS dba32d to trunk@272827 (milestone: DEV300:m50) 2009-06-15 08:41:05 +0200 fs r272960 : merging changes from CWS dba32c (resulting from rebasing dba32c to m50) 2009-06-03 12:22:32 +0200 fs r272554 : merging latest changes from CWS dba32c 2009-06-03 11:11:27 +0200 fs r272549 : #i100818# special treatment for DataAwareness not needed anymore 2009-06-03 11:07:01 +0200 fs r272548 : #i10000# removed package declaration 2009-06-03 09:21:03 +0200 oj r272537 : #i93465# save window states 2009-06-03 08:56:25 +0200 oj r272535 : solve compiler warnings 2009-06-03 08:55:02 +0200 oj r272534 : #i102295# export shapes i the first cell 2009-06-03 07:35:18 +0200 oj r272533 : #i101994# check for - and + prefix 2009-06-03 06:51:38 +0200 oj r272531 : #i101463# use uncomposed table name 2009-06-03 06:33:06 +0200 oj r272530 : #i102019# word corrected 2009-06-02 14:58:28 +0200 fs r272507 : #i102443# call initializeParser from LoadFinished 2009-06-02 14:30:10 +0200 oj r272504 : #i102019# introduce static ints 2009-06-02 13:51:02 +0200 oj r272501 : #i102439# wrong method used 2009-06-02 13:44:09 +0200 fs r272500 : #i102440# when tampering with Order/GroupBy, reset the cached columns 2009-06-02 10:53:01 +0200 fs r272487 : #i102234# preserve the original filter when using a 0=1 filter 2009-06-02 10:21:21 +0200 oj r272486 : #i100535# handle time values as float 2009-06-02 10:19:07 +0200 fs r272485 : merging latest changes from CWS dba32c 2009-05-29 16:00:15 +0200 fs r272467 : merging latest changes from dba32c 2009-05-29 15:31:25 +0200 fs r272462 : merging latest changes from dba32c 2009-05-29 10:58:03 +0200 oj r272438 : #101135# export embedded-text 2009-05-29 08:17:57 +0200 oj r272431 : #i80917# make attribute not optional 2009-05-29 08:17:32 +0200 oj r272430 : remoe unused token 2009-05-29 07:17:15 +0200 oj r272429 : #i80917# make attribute not optional 2009-05-28 12:48:14 +0200 oj r272401 : #i102201# insert images in context menu 2009-05-28 12:47:44 +0200 oj r272400 : #i80917# add new attribute to handle first line 2009-05-28 12:16:12 +0200 oj r272397 : #i96134# add / to path when it doesn't exist 2009-05-28 12:11:08 +0200 oj r272390 : #i80917# add new attribute to handle first line 2009-05-28 11:33:35 +0200 oj r272388 : #i101652# add new checkbox to handle header line as column names 2009-05-28 11:30:15 +0200 oj r272387 : #i101652# add localize 2009-05-28 11:15:53 +0200 oj r272386 : merge from dba32c 2009-05-28 09:08:25 +0200 fs r272378 : merged a build fix from CWS dba32c
2009-07-06 09:00:26 +00:00
m_bError = !CreateTable(nToken);
bInsertRow = m_bAppendFirstLine;
if ( m_bAppendFirstLine )
{
rInput.Seek(nTell);
CWS-TOOLING: integrate CWS dba32d 2009-06-30 08:58:13 +0200 fs r273488 : merging latest changes from CWS dba32c 2009-06-29 11:40:42 +0200 oj r273459 : #i101652# fix token handling 2009-06-26 09:27:30 +0200 oj r273394 : #i101994# wrong condition checked 2009-06-22 12:09:04 +0200 fs r273210 : merging latest changes from CWS dba32c 2009-06-18 11:01:06 +0200 fs r273108 : merge latest changes from CWS dba32c 2009-06-17 14:19:33 +0200 oj r273072 : handle images at the correct position 2009-06-17 13:37:19 +0200 oj r273067 : compile error 2009-06-17 13:35:58 +0200 oj r273066 : #i102201# handle images 2009-06-17 13:27:21 +0200 oj r273065 : #i80917# disable checkbox for internal copy 2009-06-17 13:25:38 +0200 oj r273064 : #i80917# disable checkbox for internal copy 2009-06-15 12:59:16 +0200 fs r272978 : merging latest changes from CWS dba32c 2009-06-15 10:45:58 +0200 fs r272967 : CWS-TOOLING: rebase CWS dba32d to trunk@272827 (milestone: DEV300:m50) 2009-06-15 08:41:05 +0200 fs r272960 : merging changes from CWS dba32c (resulting from rebasing dba32c to m50) 2009-06-03 12:22:32 +0200 fs r272554 : merging latest changes from CWS dba32c 2009-06-03 11:11:27 +0200 fs r272549 : #i100818# special treatment for DataAwareness not needed anymore 2009-06-03 11:07:01 +0200 fs r272548 : #i10000# removed package declaration 2009-06-03 09:21:03 +0200 oj r272537 : #i93465# save window states 2009-06-03 08:56:25 +0200 oj r272535 : solve compiler warnings 2009-06-03 08:55:02 +0200 oj r272534 : #i102295# export shapes i the first cell 2009-06-03 07:35:18 +0200 oj r272533 : #i101994# check for - and + prefix 2009-06-03 06:51:38 +0200 oj r272531 : #i101463# use uncomposed table name 2009-06-03 06:33:06 +0200 oj r272530 : #i102019# word corrected 2009-06-02 14:58:28 +0200 fs r272507 : #i102443# call initializeParser from LoadFinished 2009-06-02 14:30:10 +0200 oj r272504 : #i102019# introduce static ints 2009-06-02 13:51:02 +0200 oj r272501 : #i102439# wrong method used 2009-06-02 13:44:09 +0200 fs r272500 : #i102440# when tampering with Order/GroupBy, reset the cached columns 2009-06-02 10:53:01 +0200 fs r272487 : #i102234# preserve the original filter when using a 0=1 filter 2009-06-02 10:21:21 +0200 oj r272486 : #i100535# handle time values as float 2009-06-02 10:19:07 +0200 fs r272485 : merging latest changes from CWS dba32c 2009-05-29 16:00:15 +0200 fs r272467 : merging latest changes from dba32c 2009-05-29 15:31:25 +0200 fs r272462 : merging latest changes from dba32c 2009-05-29 10:58:03 +0200 oj r272438 : #101135# export embedded-text 2009-05-29 08:17:57 +0200 oj r272431 : #i80917# make attribute not optional 2009-05-29 08:17:32 +0200 oj r272430 : remoe unused token 2009-05-29 07:17:15 +0200 oj r272429 : #i80917# make attribute not optional 2009-05-28 12:48:14 +0200 oj r272401 : #i102201# insert images in context menu 2009-05-28 12:47:44 +0200 oj r272400 : #i80917# add new attribute to handle first line 2009-05-28 12:16:12 +0200 oj r272397 : #i96134# add / to path when it doesn't exist 2009-05-28 12:11:08 +0200 oj r272390 : #i80917# add new attribute to handle first line 2009-05-28 11:33:35 +0200 oj r272388 : #i101652# add new checkbox to handle header line as column names 2009-05-28 11:30:15 +0200 oj r272387 : #i101652# add localize 2009-05-28 11:15:53 +0200 oj r272386 : merge from dba32c 2009-05-28 09:08:25 +0200 fs r272378 : merged a build fix from CWS dba32c
2009-07-06 09:00:26 +00:00
rInput.ResetError();
}
}
if ( bInsertRow && !m_bError)
{
try
{
m_pUpdateHelper->moveToInsertRow(); // otherwise append new line
}
catch(SQLException& e)
// handling update failure
{
showErrorDialog(e);
}
}
}
2001-02-16 14:54:09 +00:00
break;
case RTF_INTBL:
if(m_bInTbl)
{
eraseTokens();
}
m_bInTbl = sal_True; // Now we are in a table description
2001-02-16 14:54:09 +00:00
break;
case RTF_TEXTTOKEN:
case RTF_SINGLECHAR:
if(m_bInTbl) // important, as otherwise we also get the names of the fonts
2001-02-16 14:54:09 +00:00
m_sTextToken += aToken;
break;
case RTF_CELL:
{
try
{
insertValueIntoColumn();
}
catch(SQLException& e)
// handling update failure
{
showErrorDialog(e);
}
2001-02-16 14:54:09 +00:00
m_nColumnPos++;
eraseTokens();
2001-02-16 14:54:09 +00:00
}
break;
case RTF_ROW:
// it can happen that the last cell is not concluded with \cell
2001-02-16 14:54:09 +00:00
try
{
insertValueIntoColumn();
m_nRowCount++;
if(m_bIsAutoIncrement) // if bSetAutoIncrement then I have to set the autoincrement
m_pUpdateHelper->updateInt(1,m_nRowCount);
m_pUpdateHelper->insertRow();
2001-02-16 14:54:09 +00:00
}
catch(SQLException& e)
// handling update failure
2001-02-16 14:54:09 +00:00
{
showErrorDialog(e);
2001-02-16 14:54:09 +00:00
}
m_nColumnPos = 0;
break;
}
}
else // branch only valid for type checking
2001-02-16 14:54:09 +00:00
{
switch(nToken)
{
case RTF_TROWD:
// The head of the column is not included
2001-02-16 14:54:09 +00:00
if(m_bHead)
{
do
{}
2001-11-23 13:51:40 +00:00
while(GetNextToken() != RTF_ROW && eState != SVPAR_ERROR && eState != SVPAR_ACCEPTED);
2001-02-16 14:54:09 +00:00
m_bHead = sal_False;
}
break;
case RTF_INTBL:
m_bInTbl = sal_True;
2001-02-16 14:54:09 +00:00
break;
case RTF_TEXTTOKEN:
case RTF_SINGLECHAR:
if(m_bInTbl)
m_sTextToken += aToken;
break;
case RTF_CELL:
adjustFormat();
2001-02-16 14:54:09 +00:00
m_nColumnPos++;
break;
case RTF_ROW:
adjustFormat();
2001-02-16 14:54:09 +00:00
m_nColumnPos = 0;
m_nRows--;
break;
}
}
}
2001-02-16 14:54:09 +00:00
sal_Bool ORTFReader::CreateTable(int nToken)
{
SAL_INFO("dbaccess.ui", "ORTFReader::CreateTable" );
OUString aTableName(ModuleRes(STR_TBL_TITLE));
aTableName = aTableName.getToken(0,' ');
aTableName = ::dbtools::createUniqueName(m_xTables, aTableName);
2001-02-16 14:54:09 +00:00
int nTmpToken2 = nToken;
OUString aColumnName;
2001-02-16 14:54:09 +00:00
FontDescriptor aFont = VCLUnoHelper::CreateFontDescriptor(Application::GetSettings().GetStyleSettings().GetAppFont());
2001-02-16 14:54:09 +00:00
do
{
switch(nTmpToken2)
{
case RTF_UNKNOWNCONTROL:
case RTF_UNKNOWNDATA:
m_bInTbl = sal_False;
aColumnName = "";
2001-02-16 14:54:09 +00:00
break;
case RTF_INTBL:
if(m_bInTbl)
aColumnName = "";
2001-02-16 14:54:09 +00:00
m_bInTbl = sal_True;
2001-02-16 14:54:09 +00:00
break;
case RTF_TEXTTOKEN:
case RTF_SINGLECHAR:
if(m_bInTbl)
aColumnName += aToken;
break;
case RTF_CELL:
{
aColumnName = comphelper::string::strip(aColumnName, ' ');
if (aColumnName.isEmpty() || m_bAppendFirstLine )
aColumnName = ModuleRes(STR_COLUMN_NAME);
2001-02-16 14:54:09 +00:00
CreateDefaultColumn(aColumnName);
aColumnName = "";
2001-02-16 14:54:09 +00:00
}
break;
case RTF_CF:
break;
case RTF_B:
aFont.Weight = ::com::sun::star::awt::FontWeight::BOLD;
break;
case RTF_I:
aFont.Slant = ::com::sun::star::awt::FontSlant_ITALIC;
break;
case RTF_UL:
aFont.Underline = ::com::sun::star::awt::FontUnderline::SINGLE;
break;
case RTF_STRIKE:
aFont.Strikeout = ::com::sun::star::awt::FontStrikeout::SINGLE;
break;
}
}
CWS-TOOLING: integrate CWS dba32d 2009-06-30 08:58:13 +0200 fs r273488 : merging latest changes from CWS dba32c 2009-06-29 11:40:42 +0200 oj r273459 : #i101652# fix token handling 2009-06-26 09:27:30 +0200 oj r273394 : #i101994# wrong condition checked 2009-06-22 12:09:04 +0200 fs r273210 : merging latest changes from CWS dba32c 2009-06-18 11:01:06 +0200 fs r273108 : merge latest changes from CWS dba32c 2009-06-17 14:19:33 +0200 oj r273072 : handle images at the correct position 2009-06-17 13:37:19 +0200 oj r273067 : compile error 2009-06-17 13:35:58 +0200 oj r273066 : #i102201# handle images 2009-06-17 13:27:21 +0200 oj r273065 : #i80917# disable checkbox for internal copy 2009-06-17 13:25:38 +0200 oj r273064 : #i80917# disable checkbox for internal copy 2009-06-15 12:59:16 +0200 fs r272978 : merging latest changes from CWS dba32c 2009-06-15 10:45:58 +0200 fs r272967 : CWS-TOOLING: rebase CWS dba32d to trunk@272827 (milestone: DEV300:m50) 2009-06-15 08:41:05 +0200 fs r272960 : merging changes from CWS dba32c (resulting from rebasing dba32c to m50) 2009-06-03 12:22:32 +0200 fs r272554 : merging latest changes from CWS dba32c 2009-06-03 11:11:27 +0200 fs r272549 : #i100818# special treatment for DataAwareness not needed anymore 2009-06-03 11:07:01 +0200 fs r272548 : #i10000# removed package declaration 2009-06-03 09:21:03 +0200 oj r272537 : #i93465# save window states 2009-06-03 08:56:25 +0200 oj r272535 : solve compiler warnings 2009-06-03 08:55:02 +0200 oj r272534 : #i102295# export shapes i the first cell 2009-06-03 07:35:18 +0200 oj r272533 : #i101994# check for - and + prefix 2009-06-03 06:51:38 +0200 oj r272531 : #i101463# use uncomposed table name 2009-06-03 06:33:06 +0200 oj r272530 : #i102019# word corrected 2009-06-02 14:58:28 +0200 fs r272507 : #i102443# call initializeParser from LoadFinished 2009-06-02 14:30:10 +0200 oj r272504 : #i102019# introduce static ints 2009-06-02 13:51:02 +0200 oj r272501 : #i102439# wrong method used 2009-06-02 13:44:09 +0200 fs r272500 : #i102440# when tampering with Order/GroupBy, reset the cached columns 2009-06-02 10:53:01 +0200 fs r272487 : #i102234# preserve the original filter when using a 0=1 filter 2009-06-02 10:21:21 +0200 oj r272486 : #i100535# handle time values as float 2009-06-02 10:19:07 +0200 fs r272485 : merging latest changes from CWS dba32c 2009-05-29 16:00:15 +0200 fs r272467 : merging latest changes from dba32c 2009-05-29 15:31:25 +0200 fs r272462 : merging latest changes from dba32c 2009-05-29 10:58:03 +0200 oj r272438 : #101135# export embedded-text 2009-05-29 08:17:57 +0200 oj r272431 : #i80917# make attribute not optional 2009-05-29 08:17:32 +0200 oj r272430 : remoe unused token 2009-05-29 07:17:15 +0200 oj r272429 : #i80917# make attribute not optional 2009-05-28 12:48:14 +0200 oj r272401 : #i102201# insert images in context menu 2009-05-28 12:47:44 +0200 oj r272400 : #i80917# add new attribute to handle first line 2009-05-28 12:16:12 +0200 oj r272397 : #i96134# add / to path when it doesn't exist 2009-05-28 12:11:08 +0200 oj r272390 : #i80917# add new attribute to handle first line 2009-05-28 11:33:35 +0200 oj r272388 : #i101652# add new checkbox to handle header line as column names 2009-05-28 11:30:15 +0200 oj r272387 : #i101652# add localize 2009-05-28 11:15:53 +0200 oj r272386 : merge from dba32c 2009-05-28 09:08:25 +0200 fs r272378 : merged a build fix from CWS dba32c
2009-07-06 09:00:26 +00:00
while((nTmpToken2 = GetNextToken()) != RTF_TROWD && eState != SVPAR_ERROR && eState != SVPAR_ACCEPTED);
2001-02-23 14:13:25 +00:00
2002-01-22 06:22:37 +00:00
sal_Bool bOk = !m_vDestVector.empty();
if(bOk)
{
if ( !aColumnName.isEmpty() )
{
if ( m_bAppendFirstLine )
aColumnName = ModuleRes(STR_COLUMN_NAME);
2002-01-22 06:22:37 +00:00
CreateDefaultColumn(aColumnName);
}
2001-02-23 14:13:25 +00:00
2002-01-22 06:22:37 +00:00
m_bInTbl = sal_False;
m_bFoundTable = sal_True;
2001-02-23 14:13:25 +00:00
2002-05-28 07:41:41 +00:00
if ( isCheckEnabled() )
return sal_True;
2002-01-22 06:22:37 +00:00
Any aTextColor;
if(!m_vecColor.empty())
aTextColor <<= m_vecColor[0];
2001-02-23 14:13:25 +00:00
2002-01-22 06:22:37 +00:00
bOk = !executeWizard(aTableName,aTextColor,aFont) && m_xTable.is();
2001-02-23 14:13:25 +00:00
}
2002-01-22 06:22:37 +00:00
return bOk;
2001-02-16 14:54:09 +00:00
}
2001-11-23 13:51:40 +00:00
void ORTFReader::release()
{
SAL_INFO("dbaccess.ui", "ORTFReader::release" );
2001-11-23 13:51:40 +00:00
ReleaseRef();
}
TypeSelectionPageFactory ORTFReader::getTypeSelectionPageFactory()
2002-01-22 06:22:37 +00:00
{
SAL_INFO("dbaccess.ui", "ORTFReader::getTypeSelectionPageFactory" );
return &OWizRTFExtend::Create;
2002-01-22 06:22:37 +00:00
}
2001-02-16 14:54:09 +00:00
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */