[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: koffice/filters/kword/rtf/import
From: Andreas Kling <info () andreaskling ! com>
Date: 2009-10-16 21:04:56
Message-ID: 1255727096.571483.7462.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 1036233 by kling:
Remove use of qt3support API.
M +8 -7 rtfimport.cpp
--- trunk/koffice/filters/kword/rtf/import/rtfimport.cpp #1036232:1036233
@@ -794,7 +794,7 @@
for (QMap<QString,int>::ConstIterator it=debugUnknownKeywords.constBegin();
it!=debugUnknownKeywords.constEnd();it++)
- kDebug(30515) <<"Unknown keyword:" << QString("%1" ).arg( it.data(), 4 ) <<" *" << it.key();
+ kDebug(30515) <<"Unknown keyword:" << QString("%1" ).arg( it.value(), 4 ) <<" *" << it.key();
return KoFilter::OK;
}
@@ -1574,7 +1574,7 @@
// ### TODO: what with MS-DOS absolute paths? (Will only work for KOffice on Win32)
QFileInfo info;
info.setFile( inFileName );
- QDir dir( info.dirPath() );
+ QDir dir( info.path() );
KUrl url;
url.setPath(dir.filePath( rawFileName ));
@@ -1662,7 +1662,7 @@
// It is a time with a specified format, so check if it is really a time
// (as in KWord 1.3, a date can have a time format but a time cannot have a date format
const QRegExp regexp ("[yMd]"); // any date format character?
- asDate = (regexp.search(format)>-1); // if yes, then it is a date
+ asDate = (regexp.indexIn(format)>-1); // if yes, then it is a date
}
DomNode node;
if (asDate)
@@ -1707,7 +1707,8 @@
if (!fldinst.isEmpty())
{
DomNode node;
- QStringList list ( QStringList::split( ' ', fldinst, false ) );
+ QString strFldinst( QString::fromUtf8(fldinst) );
+ QStringList list = strFldinst.split( ' ', QString::SkipEmptyParts );
kDebug(30515) <<"Field:" << list;
uint i;
@@ -1791,12 +1792,12 @@
{
QString strFldinst( QString::fromUtf8(fldinst) );
QRegExp regexp("\\\\@\\s*\"(.+)\""); // \@ "Text"
- if (regexp.search(strFldinst)==-1)
+ if (regexp.indexIn(strFldinst)==-1)
{ // Not found? Perhaps it is not in quotes (even if it is rare)
kWarning(30515) << "Date/time field format not in quotes!";
strFldinst += ' '; // Add a space at the end to simplify the regular expression
regexp = QRegExp("\\\\@(\\S+)\\s+"); // \@some_text_up_to_a_space
- regexp.search(strFldinst);
+ regexp.indexIn(strFldinst);
}
QString format(regexp.cap(1));
kDebug(30515) <<"Date/time field format:" << format;
@@ -2610,7 +2611,7 @@
if ( dev )
{
QTextStream stream( dev );
- stream.setEncoding( QTextStream::UnicodeUTF8 );
+ stream.setCodec( "UTF-8" );
stream << node.toString();
}
else
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic