summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Ohly <patrick.ohly@intel.com>2011-01-31 08:24:29 +0100
committerPatrick Ohly <patrick.ohly@intel.com>2011-01-31 08:24:29 +0100
commitd013790ca8d8ee2d9409749b963cacec357bd5f6 (patch)
treed4f61b70ffb14d862ad66f2e3e7afcb0fac8fd9f
parent46559ff7727bad87b2a03c246bc0f057b36ed827 (diff)
parent6ed4e2eb79ed8cff2cda78c969b6060e3256811e (diff)
Merge remote branch 'synthesis/luz'libsynthesis_3.4.0.16+syncevolution-1-1-99-2
-rw-r--r--src/global_options.h4
-rw-r--r--src/sysync/mimedirprofile.cpp28
-rwxr-xr-xsrc/sysync/mimedirprofile.h4
3 files changed, 19 insertions, 17 deletions
diff --git a/src/global_options.h b/src/global_options.h
index 2a90f18..589acfd 100644
--- a/src/global_options.h
+++ b/src/global_options.h
@@ -76,8 +76,8 @@
#endif
#ifndef SYSYNC_BUILDNUMBER
-#define SYSYNC_BUILDNUMBER 26
-#define SYSYNC_BUILDNUMBER_TXT "26"
+#define SYSYNC_BUILDNUMBER 27
+#define SYSYNC_BUILDNUMBER_TXT "27"
#endif
diff --git a/src/sysync/mimedirprofile.cpp b/src/sysync/mimedirprofile.cpp
index dcdefa6..617294d 100644
--- a/src/sysync/mimedirprofile.cpp
+++ b/src/sysync/mimedirprofile.cpp
@@ -511,10 +511,10 @@ bool TMIMEProfileConfig::localStartElement(const char *aElementName, const char
return fail("bad boolean value");
// - add parameter
fOpenParameter = fOpenProperty->addParam(nam,defparam,positional,shownonempty,showinctcap,modeDep);
-#ifndef NO_REMOTE_RULES
+ #ifndef NO_REMOTE_RULES
const char *depRuleName = getAttr(aAttributes,"rule");
TCFG_ASSIGN(fOpenParameter->dependencyRuleName,depRuleName); // save name for later resolving
-#endif
+ #endif
startNestedParsing();
}
else if (strucmp(aElementName,"position")==0) {
@@ -941,10 +941,10 @@ TParameterDefinition::TParameterDefinition(
shownonempty=aShowNonEmpty;
showInCTCap=aShowInCTCap;
modeDependency=aModeDep;
-#ifndef NO_REMOTE_RULES
+ #ifndef NO_REMOTE_RULES
ruleDependency=NULL;
TCFG_CLEAR(dependencyRuleName);
-#endif
+ #endif
} // TParameterDefinition::TParameterDefinition
@@ -3850,9 +3850,9 @@ bool TMimeDirProfileHandler::parseProperty(
// - obtain unfolded value
val.erase();
bool dquoted = false;
- bool wasdquoted = false;
- // - note: we allow quoted params even with mimo_old, as the chance is much higher that a param value
- // beginning with doublequote is actually a quoted string than a value containing a doublequote at the beginning
+ bool wasdquoted = false;
+ // - note: we allow quoted params even with mimo_old, as the chance is much higher that a param value
+ // beginning with doublequote is actually a quoted string than a value containing a doublequote at the beginning
if (*vp=='"') {
dquoted = true;
wasdquoted = true;
@@ -3894,7 +3894,7 @@ bool TMimeDirProfileHandler::parseProperty(
// - processing of next param starts here
p=vp;
// check for global parameters
- bool storeUnprocessed = true;
+ bool storeUnprocessed = true; // in case this is a unprocessed property, flag will be cleared to prevent storing params that still ARE processed
if ((aMimeMode==mimo_old && defaultparam) || strucmp(pname.c_str(),"ENCODING")==0) {
// get encoding
// Note: always process ENCODING, as QP is mimo-old specific and must be removed for normalized storage
@@ -3903,10 +3903,12 @@ bool TMimeDirProfileHandler::parseProperty(
encoding=static_cast <TEncodingTypes> (k);
}
}
- if (encoding==enc_quoted_printable)
- storeUnprocessed = false; // QP will be decoded, so param must not be stored
- else
- encoding = enc_none; // other encodings will not be processed
+ if (aPropP->unprocessed) {
+ if (encoding==enc_quoted_printable)
+ storeUnprocessed = false; // QP will be decoded (for unprocessed properties), so param must not be stored
+ else
+ encoding = enc_none; // other encodings will not be processed for unprocessed properties
+ }
}
else if (strucmp(pname.c_str(),"CHARSET")==0) {
// charset specified (mimo_old value-only not supported)
@@ -3926,7 +3928,7 @@ bool TMimeDirProfileHandler::parseProperty(
// %%% replace 8bit chars with underscore
charset=chs_unknown;
}
- storeUnprocessed = false;
+ storeUnprocessed = false; // CHARSET is never included in unprocessed property, as we always store UTF-8
}
if (aPropP->unprocessed && storeUnprocessed && fieldoffsetfound) {
// append in reconstructed form for storing "unprocessed" (= lightly normalized)
diff --git a/src/sysync/mimedirprofile.h b/src/sysync/mimedirprofile.h
index eead164..4db8bdf 100755
--- a/src/sysync/mimedirprofile.h
+++ b/src/sysync/mimedirprofile.h
@@ -178,14 +178,14 @@ public:
bool showInCTCap;
// conversion information
TConversionDef convdef;
-#ifndef NO_REMOTE_RULES
+ #ifndef NO_REMOTE_RULES
// rule processing is simpler than with properties:
// a parameter is expanded or parsed if no rule was set or the given
// rule is active
TRemoteRuleConfig *ruleDependency;
// name of remote rule dependency (will be resolved to set ruleDependency)
TCFG_STRING dependencyRuleName;
-#endif
+ #endif
}; // TParameterDefinition