summaryrefslogtreecommitdiff
path: root/library/backend/vobject.cpp
authorzecke <zecke>2004-09-14 22:50:22 (UTC)
committer zecke <zecke>2004-09-14 22:50:22 (UTC)
commitd46a01de16c8ad65b00c76beda547970f7972b62 (patch) (side-by-side diff)
tree3ce4b630f5cd45c230c0a4f4ff92993a9c4f4f6c /library/backend/vobject.cpp
parent271a3753d1b71a85e5463b357abbfe46fce51732 (diff)
downloadopie-d46a01de16c8ad65b00c76beda547970f7972b62.zip
opie-d46a01de16c8ad65b00c76beda547970f7972b62.tar.gz
opie-d46a01de16c8ad65b00c76beda547970f7972b62.tar.bz2
Be able to properly import vCard from Cell Phones
Diffstat (limited to 'library/backend/vobject.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--library/backend/vobject.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/library/backend/vobject.cpp b/library/backend/vobject.cpp
index 9263c3a..592d116 100644
--- a/library/backend/vobject.cpp
+++ b/library/backend/vobject.cpp
@@ -1105,3 +1105,3 @@ static void writeEncString(OFile *fp, const char *s, bool nosemi)
-static bool includesUnprintable(VObject *o)
+static bool includesUnprintable(VObject *o, bool nosemi)
{
@@ -1113,3 +1113,4 @@ static bool includesUnprintable(VObject *o)
if (*p==' ' && (!p[1] || p[1]=='\n') // RFC 1521: spaces at ends need quoting
- || qpReplaceChar(*p) )
+ || qpReplaceChar(*p)
+ || *p==';' && nosemi )
return TRUE;
@@ -1163,3 +1164,3 @@ static void writeAttrValue(OFile *fp, VObject *o)
if (pi && ((pi->flags & PD_INTERNAL) != 0)) return;
- if ( includesUnprintable(o) )
+ if ( includesUnprintable(o,TRUE) )
appendsOFileEncCs(fp);
@@ -1231,3 +1232,3 @@ static void writeProp(OFile *fp, VObject *o)
VObject *t = isAPropertyOf(o,*fields);
- if (includesUnprintable(t))
+ if (includesUnprintable(t,TRUE))
printable = FALSE;
@@ -1256,3 +1257,3 @@ static void writeProp(OFile *fp, VObject *o)
if (VALUE_TYPE(o)) {
- if ( includesUnprintable(o) )
+ if ( includesUnprintable(o,FALSE) )
appendsOFileEncCs(fp);