summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libopie/pim/ocontact.cpp11
-rw-r--r--libopie2/opiepim/ocontact.cpp11
2 files changed, 12 insertions, 10 deletions
diff --git a/libopie/pim/ocontact.cpp b/libopie/pim/ocontact.cpp
index 9230b8b..178559b 100644
--- a/libopie/pim/ocontact.cpp
+++ b/libopie/pim/ocontact.cpp
@@ -475,17 +475,18 @@ QString OContact::toRichText() const
475 475
476 if ( !(value = businessStreet()).isEmpty() ) 476 if ( !(value = businessStreet()).isEmpty() )
477 text += Qtopia::escapeString(value) + "<br>"; 477 text += Qtopia::escapeString(value) + "<br>";
478 state = businessState(); 478 state = businessState();
479 if ( !(value = businessZip()).isEmpty() )
480 text += Qtopia::escapeString(value) + " ";
479 if ( !(value = businessCity()).isEmpty() ) { 481 if ( !(value = businessCity()).isEmpty() ) {
480 text += Qtopia::escapeString(value); 482 text += Qtopia::escapeString(value);
481 if ( state ) 483 if ( state )
482 text += ", " + Qtopia::escapeString(state); 484 text += ", " + Qtopia::escapeString(state);
483 text += "<br>"; 485 text += "<br>";
484 } else if ( !state.isEmpty() ) 486 } else if ( !state.isEmpty() )
485 text += Qtopia::escapeString(state) + "<br>"; 487 text += Qtopia::escapeString(state) + "<br>";
486 if ( !(value = businessZip()).isEmpty() ) 488
487 text += Qtopia::escapeString(value) + "<br>";
488 if ( !(value = businessCountry()).isEmpty() ) 489 if ( !(value = businessCountry()).isEmpty() )
489 text += Qtopia::escapeString(value) + "<br>"; 490 text += Qtopia::escapeString(value) + "<br>";
490 491
491 // rest of Business data 492 // rest of Business data
@@ -536,17 +537,17 @@ QString OContact::toRichText() const
536 537
537 if ( !(value = homeStreet()).isEmpty() ) 538 if ( !(value = homeStreet()).isEmpty() )
538 text += Qtopia::escapeString(value) + "<br>"; 539 text += Qtopia::escapeString(value) + "<br>";
539 state = homeState(); 540 state = homeState();
541 if ( !(value = homeZip()).isEmpty() )
542 text += Qtopia::escapeString(value) + " ";
540 if ( !(value = homeCity()).isEmpty() ) { 543 if ( !(value = homeCity()).isEmpty() ) {
541 text += Qtopia::escapeString(value); 544 text += Qtopia::escapeString(value);
542 if ( !state.isEmpty() ) 545 if ( !state.isEmpty() )
543 text += ", " + Qtopia::escapeString(state); 546 text += ", " + Qtopia::escapeString(state);
544 text += "<br>"; 547 text += "<br>";
545 } else if (!state.isEmpty()) 548 } else if (!state.isEmpty())
546 text += Qtopia::escapeString(state) + "<br>"; 549 text += Qtopia::escapeString(state) + "<br>";
547 if ( !(value = homeZip()).isEmpty() )
548 text += Qtopia::escapeString(value) + "<br>";
549 if ( !(value = homeCountry()).isEmpty() ) 550 if ( !(value = homeCountry()).isEmpty() )
550 text += Qtopia::escapeString(value) + "<br>"; 551 text += Qtopia::escapeString(value) + "<br>";
551 552
552 // rest of Home data 553 // rest of Home data
@@ -632,9 +633,9 @@ QString OContact::toRichText() const
632 text += "<br>"; 633 text += "<br>";
633 } 634 }
634 635
635 // notes last 636 // notes last
636 if ( (value = notes()) ) { 637 if ( !(value = notes()).isEmpty() ) {
637 text += "<br><hr><b>" + QObject::tr( "Notes:") + "</b> "; 638 text += "<br><hr><b>" + QObject::tr( "Notes:") + "</b> ";
638 QRegExp reg("\n"); 639 QRegExp reg("\n");
639 640
640 //QString tmp = Qtopia::escapeString(value); 641 //QString tmp = Qtopia::escapeString(value);
diff --git a/libopie2/opiepim/ocontact.cpp b/libopie2/opiepim/ocontact.cpp
index 9230b8b..178559b 100644
--- a/libopie2/opiepim/ocontact.cpp
+++ b/libopie2/opiepim/ocontact.cpp
@@ -475,17 +475,18 @@ QString OContact::toRichText() const
475 475
476 if ( !(value = businessStreet()).isEmpty() ) 476 if ( !(value = businessStreet()).isEmpty() )
477 text += Qtopia::escapeString(value) + "<br>"; 477 text += Qtopia::escapeString(value) + "<br>";
478 state = businessState(); 478 state = businessState();
479 if ( !(value = businessZip()).isEmpty() )
480 text += Qtopia::escapeString(value) + " ";
479 if ( !(value = businessCity()).isEmpty() ) { 481 if ( !(value = businessCity()).isEmpty() ) {
480 text += Qtopia::escapeString(value); 482 text += Qtopia::escapeString(value);
481 if ( state ) 483 if ( state )
482 text += ", " + Qtopia::escapeString(state); 484 text += ", " + Qtopia::escapeString(state);
483 text += "<br>"; 485 text += "<br>";
484 } else if ( !state.isEmpty() ) 486 } else if ( !state.isEmpty() )
485 text += Qtopia::escapeString(state) + "<br>"; 487 text += Qtopia::escapeString(state) + "<br>";
486 if ( !(value = businessZip()).isEmpty() ) 488
487 text += Qtopia::escapeString(value) + "<br>";
488 if ( !(value = businessCountry()).isEmpty() ) 489 if ( !(value = businessCountry()).isEmpty() )
489 text += Qtopia::escapeString(value) + "<br>"; 490 text += Qtopia::escapeString(value) + "<br>";
490 491
491 // rest of Business data 492 // rest of Business data
@@ -536,17 +537,17 @@ QString OContact::toRichText() const
536 537
537 if ( !(value = homeStreet()).isEmpty() ) 538 if ( !(value = homeStreet()).isEmpty() )
538 text += Qtopia::escapeString(value) + "<br>"; 539 text += Qtopia::escapeString(value) + "<br>";
539 state = homeState(); 540 state = homeState();
541 if ( !(value = homeZip()).isEmpty() )
542 text += Qtopia::escapeString(value) + " ";
540 if ( !(value = homeCity()).isEmpty() ) { 543 if ( !(value = homeCity()).isEmpty() ) {
541 text += Qtopia::escapeString(value); 544 text += Qtopia::escapeString(value);
542 if ( !state.isEmpty() ) 545 if ( !state.isEmpty() )
543 text += ", " + Qtopia::escapeString(state); 546 text += ", " + Qtopia::escapeString(state);
544 text += "<br>"; 547 text += "<br>";
545 } else if (!state.isEmpty()) 548 } else if (!state.isEmpty())
546 text += Qtopia::escapeString(state) + "<br>"; 549 text += Qtopia::escapeString(state) + "<br>";
547 if ( !(value = homeZip()).isEmpty() )
548 text += Qtopia::escapeString(value) + "<br>";
549 if ( !(value = homeCountry()).isEmpty() ) 550 if ( !(value = homeCountry()).isEmpty() )
550 text += Qtopia::escapeString(value) + "<br>"; 551 text += Qtopia::escapeString(value) + "<br>";
551 552
552 // rest of Home data 553 // rest of Home data
@@ -632,9 +633,9 @@ QString OContact::toRichText() const
632 text += "<br>"; 633 text += "<br>";
633 } 634 }
634 635
635 // notes last 636 // notes last
636 if ( (value = notes()) ) { 637 if ( !(value = notes()).isEmpty() ) {
637 text += "<br><hr><b>" + QObject::tr( "Notes:") + "</b> "; 638 text += "<br><hr><b>" + QObject::tr( "Notes:") + "</b> ";
638 QRegExp reg("\n"); 639 QRegExp reg("\n");
639 640
640 //QString tmp = Qtopia::escapeString(value); 641 //QString tmp = Qtopia::escapeString(value);