summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorOliver Bolte <obo@openoffice.org>2008-05-28 09:18:33 +0000
committerOliver Bolte <obo@openoffice.org>2008-05-28 09:18:33 +0000
commitb290a04e534503204e0228855c416d1f6e685e4f (patch)
treef1245320383a5716a9bf5e7cbdf2ff711a8f958d /sc
parentd6e2b228708736c6cb4aefc69b643a84a920c0cf (diff)
INTEGRATION: CWS calcodfversion (1.131.38); FILE MERGED
2008/04/18 12:48:56 er 1.131.38.2: RESYNC: (1.131-1.132); FILE MERGED 2008/04/09 21:08:42 er 1.131.38.1: #i88113# handle XML_NAMESPACE_OF with GRAM_ODFF
Diffstat (limited to 'sc')
-rw-r--r--sc/source/filter/xml/xmlimprt.cxx26
1 files changed, 13 insertions, 13 deletions
diff --git a/sc/source/filter/xml/xmlimprt.cxx b/sc/source/filter/xml/xmlimprt.cxx
index aaf12d7a81bc..ed9da641879b 100644
--- a/sc/source/filter/xml/xmlimprt.cxx
+++ b/sc/source/filter/xml/xmlimprt.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: xmlimprt.cxx,v $
- * $Revision: 1.132 $
+ * $Revision: 1.133 $
*
* This file is part of OpenOffice.org.
*
@@ -2699,23 +2699,23 @@ bool ScXMLImport::IsAcceptedFormulaNamespace( const sal_uInt16 nFormulaPrefix,
const rtl::OUString & rValue, ScGrammar::Grammar& rGrammar,
const ScGrammar::Grammar eStorageGrammar )
{
-#if 0
- bool bNamespace_OF = (nFormulaPrefix == XML_NAMESPACE_OF);
-#else
- /* FIXME: when support for ODF 1.2 and ODFF is ready in xmloff, activate
- * XML_NAMESPACE_OF. */
- bool bNamespace_OF = false;
-#endif
- bool bNamespace_OOOC = (nFormulaPrefix == XML_NAMESPACE_OOOC);
+ switch (nFormulaPrefix)
+ {
+ case XML_NAMESPACE_OF:
+ rGrammar = ScGrammar::GRAM_ODFF;
+ return true;
+ case XML_NAMESPACE_OOOC:
+ rGrammar = ScGrammar::GRAM_PODF;
+ return true;
+ }
+
// An invalid namespace can occur from a colon in the formula text if no
// namespace tag was added. First character in string has to be '=' in that
// case.
bool bNoNamespace = (nFormulaPrefix == XML_NAMESPACE_NONE ||
(nFormulaPrefix == XML_NAMESPACE_UNKNOWN && rValue.toChar() == '='));
- if (bNamespace_OF)
- rGrammar = ScGrammar::GRAM_ODFF;
- else if (bNamespace_OOOC || (bNoNamespace && eStorageGrammar == ScGrammar::GRAM_PODF))
+ if (bNoNamespace && eStorageGrammar == ScGrammar::GRAM_PODF)
// There may be documents in the wild that stored no namespace in ODF 1.x
rGrammar = ScGrammar::GRAM_PODF;
else if (bNoNamespace)
@@ -2725,5 +2725,5 @@ bool ScXMLImport::IsAcceptedFormulaNamespace( const sal_uInt16 nFormulaPrefix,
// Whatever ...
rGrammar = eStorageGrammar;
- return bNamespace_OF || bNamespace_OOOC;
+ return false;
}