summaryrefslogtreecommitdiff
path: root/libopie/pim
Side-by-side diff
Diffstat (limited to 'libopie/pim') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie/pim/ocontact.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/libopie/pim/ocontact.cpp b/libopie/pim/ocontact.cpp
index 3473baa..e34feeb 100644
--- a/libopie/pim/ocontact.cpp
+++ b/libopie/pim/ocontact.cpp
@@ -471,13 +471,13 @@ QString OContact::toRichText() const
marker = true;
}
// business address
if ( !businessStreet().isEmpty() || !businessCity().isEmpty() ||
!businessZip().isEmpty() || !businessCountry().isEmpty() ) {
- text += QObject::tr( "<br><br><b>Work Address:</b>" );
+ text += QObject::tr( "<br><b>Work Address:</b>" );
marker = true;
}
if ( !(value = businessStreet()).isEmpty() ){
text += "<br>" + Qtopia::escapeString(value);
marker = true;
@@ -487,17 +487,17 @@ QString OContact::toRichText() const
case Zip_City_State:{ // Zip_Code City, State
state = businessState();
if ( !(value = businessZip()).isEmpty() ){
text += "<br>" + Qtopia::escapeString(value) + " ";
marker = true;
- } else
- text += "<br>";
-
+ }
if ( !(value = businessCity()).isEmpty() ) {
marker = true;
+ if ( businessZip().isEmpty() && !businessStreet().isEmpty() )
+ text += "<br>";
text += Qtopia::escapeString(value);
if ( state )
text += ", " + Qtopia::escapeString(state);
} else if ( !state.isEmpty() ){
text += "<br>" + Qtopia::escapeString(state);
marker = true;
@@ -563,18 +563,18 @@ QString OContact::toRichText() const
if ( !str.isEmpty() ){
text += "<br><b>" + QObject::tr("Business Pager: ") + "</b>"
+ Qtopia::escapeString(str);
marker = true;
}
- text += "<br>";
+ // text += "<br>";
// home address
if ( !homeStreet().isEmpty() || !homeCity().isEmpty() ||
!homeZip().isEmpty() || !homeCountry().isEmpty() ) {
- text += QObject::tr( "<br><br><b>Home Address:</b>" );
+ text += QObject::tr( "<br><b>Home Address:</b>" );
marker = true;
}
if ( !(value = homeStreet()).isEmpty() ){
text += "<br>" + Qtopia::escapeString(value);
marker = true;
@@ -583,17 +583,17 @@ QString OContact::toRichText() const
switch( addressformat ){
case Zip_City_State:{ // Zip_Code City, State
state = homeState();
if ( !(value = homeZip()).isEmpty() ){
text += "<br>" + Qtopia::escapeString(value) + " ";
marker = true;
- } else
- text += "<br>";
-
+ }
if ( !(value = homeCity()).isEmpty() ) {
marker = true;
+ if ( homeZip().isEmpty() && !homeStreet().isEmpty() )
+ text += "<br>";
text += Qtopia::escapeString(value);
if ( !state.isEmpty() )
text += ", " + Qtopia::escapeString(state);
} else if (!state.isEmpty()) {
text += "<br>" + Qtopia::escapeString(state);
marker = true;