summaryrefslogtreecommitdiffabout
path: root/kaddressbook
authorzautrix <zautrix>2005-04-29 12:18:46 (UTC)
committer zautrix <zautrix>2005-04-29 12:18:46 (UTC)
commitbdaded2da25b0ccef80d6e638fa12f92a4f8744d (patch) (side-by-side diff)
tree4ab99ccab5c3610a26df59c6f79204e054c32dd5 /kaddressbook
parent8fbdf5d2b0ee1e1496cb856e0ead37c668066353 (diff)
downloadkdepimpi-bdaded2da25b0ccef80d6e638fa12f92a4f8744d.zip
kdepimpi-bdaded2da25b0ccef80d6e638fa12f92a4f8744d.tar.gz
kdepimpi-bdaded2da25b0ccef80d6e638fa12f92a4f8744d.tar.bz2
another csv import fix
Diffstat (limited to 'kaddressbook') (more/less context) (show whitespace changes)
-rw-r--r--kaddressbook/xxport/csvimportdialog.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/kaddressbook/xxport/csvimportdialog.cpp b/kaddressbook/xxport/csvimportdialog.cpp
index 41e2612..4044fa8 100644
--- a/kaddressbook/xxport/csvimportdialog.cpp
+++ b/kaddressbook/xxport/csvimportdialog.cpp
@@ -349,25 +349,25 @@ KABC::AddresseeList CSVImportDialog::contacts() const
case BusinessAddressLabel:
addrWork.setLabel( value );
break;
default:
KABC::Field::List fields = mAddressBook->fields( KABC::Field::CustomCategory );
KABC::Field::List::Iterator it;
int counter = 0;
for ( it = fields.begin(); it != fields.end(); ++it ) {
if ( counter == (int)( posToType( item->currentItem() ) - mCustomCounter ) )
{
(*it)->setValue( a, value );
- continue;
+ break;
}
++counter;
}
break;
}
}
if ( !addrHome.isEmpty() )
a.insertAddress( addrHome );
if ( !addrWork.isEmpty() )
a.insertAddress( addrWork );
@@ -532,25 +532,25 @@ void CSVImportDialog::fillTable()
lastCharDelimiter = true;
} else if ( x == '\n' ) {
++row;
column = 1;
} else {
field += x;
state = S_MAYBE_NORMAL_FIELD;
}
break;
case S_QUOTED_FIELD :
if ( x == mTextQuote ) {
state = S_MAYBE_END_OF_QUOTED_FIELD;
- } else if ( x == '\n' ) {
+ } else if ( x == '\n' && mTextQuote.isNull() ) {
setText( row - mStartLine + 1, column, field );
field = "";
if ( x == '\n' ) {
++row;
column = 1;
} else {
if ( ( ignoreDups == false ) || ( lastCharDelimiter == false ) )
++column;
lastCharDelimiter = true;
}
state = S_START;
} else {