summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2016-05-06 16:31:06 +0200
committerEike Rathke <erack@redhat.com>2016-05-06 17:07:04 +0200
commiteeb203089f2ba6dffba9a2543c9a7e8bf551bbc5 (patch)
tree8f2cfce2f3c9cae8270385a6a66fdbf8ab1667c0
parentd20e08a3ab819ac24f7ea49a98b4dd3683120857 (diff)
write the [#REF!] as defined in ODFF, tdf#86575 related
... if a part of the reference was deleted, instead of [.#REF!A1] Actually this is a regression that already can be tracked down to c54616f62bc70a9d39abf8837a9d7c3031c80a41 which changed things to use ValidAddress() only. Change-Id: I70f68722d7af02f6da3380c2dd9d54704c20b451
-rw-r--r--sc/source/core/tool/compiler.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index 958f5b3676dc..da93badec883 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -1023,7 +1023,8 @@ struct ConventionOOO_A1_ODF : public ConventionOOO_A1
if( !bSingleRef )
aAbs2 = rRef.Ref2.toAbs(rPos);
- if (FormulaGrammar::isODFF(eGram) && (!ValidAddress(aAbs1) || !ValidAddress(aAbs2)))
+ if (FormulaGrammar::isODFF(eGram) && (rRef.Ref1.IsDeleted() || !ValidAddress(aAbs1) ||
+ (!bSingleRef && (rRef.Ref2.IsDeleted() || !ValidAddress(aAbs2)))))
{
rBuffer.append(rErrRef);
// For ODFF write [#REF!], but not for PODF so apps reading ODF