|
|
f325b2 |
From 8727412bd1619f42f0dcd9ea820c2348a9bd8af9 Mon Sep 17 00:00:00 2001
|
|
|
f325b2 |
Message-Id: <8727412bd1619f42f0dcd9ea820c2348a9bd8af9.1462798322.git.erack@redhat.com>
|
|
|
f325b2 |
From: Eike Rathke <erack@redhat.com>
|
|
|
f325b2 |
Date: Fri, 6 May 2016 16:56:29 +0200
|
|
|
f325b2 |
Subject: [PATCH] tdf#86575 for OOXML write plain #REF! if deleted parts
|
|
|
f325b2 |
MIME-Version: 1.0
|
|
|
f325b2 |
Content-Type: multipart/mixed; boundary="------------erAck-patch-parts"
|
|
|
f325b2 |
|
|
|
f325b2 |
This is a multi-part message in MIME format.
|
|
|
f325b2 |
--------------erAck-patch-parts
|
|
|
f325b2 |
Content-Type: text/plain; charset=UTF-8; format=fixed
|
|
|
f325b2 |
Content-Transfer-Encoding: 8bit
|
|
|
f325b2 |
|
|
|
f325b2 |
|
|
|
f325b2 |
(cherry picked from commit bb0ef99fb9dce30e99a7e9f7fa295a634d07b423)
|
|
|
f325b2 |
|
|
|
f325b2 |
write the [#REF!] as defined in ODFF, tdf#86575 related
|
|
|
f325b2 |
|
|
|
f325b2 |
... if a part of the reference was deleted, instead of [.#REF!A1]
|
|
|
f325b2 |
|
|
|
f325b2 |
Actually this is a regression that already can be tracked down to
|
|
|
f325b2 |
c54616f62bc70a9d39abf8837a9d7c3031c80a41 which changed things to use
|
|
|
f325b2 |
ValidAddress() only.
|
|
|
f325b2 |
|
|
|
f325b2 |
(cherry picked from commit eeb203089f2ba6dffba9a2543c9a7e8bf551bbc5)
|
|
|
f325b2 |
|
|
|
f325b2 |
70f68722d7af02f6da3380c2dd9d54704c20b451
|
|
|
f325b2 |
|
|
|
f325b2 |
Change-Id: Ie3233d72bdbdd0ab82386c98a46755ce64ef3e7f
|
|
|
f325b2 |
Reviewed-on: https://gerrit.libreoffice.org/24705
|
|
|
f325b2 |
Tested-by: Jenkins <ci@libreoffice.org>
|
|
|
f325b2 |
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
|
|
|
f325b2 |
---
|
|
|
f325b2 |
sc/source/core/tool/compiler.cxx | 11 ++++++++++-
|
|
|
f325b2 |
1 file changed, 10 insertions(+), 1 deletion(-)
|
|
|
f325b2 |
|
|
|
f325b2 |
|
|
|
f325b2 |
--------------erAck-patch-parts
|
|
|
f325b2 |
Content-Type: text/x-patch; name="0001-tdf-86575-for-OOXML-write-plain-REF-if-deleted-parts.patch"
|
|
|
f325b2 |
Content-Transfer-Encoding: 8bit
|
|
|
f325b2 |
Content-Disposition: attachment; filename="0001-tdf-86575-for-OOXML-write-plain-REF-if-deleted-parts.patch"
|
|
|
f325b2 |
|
|
|
f325b2 |
diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
|
|
|
f325b2 |
index 80f37a4..091e2e3 100644
|
|
|
f325b2 |
--- a/sc/source/core/tool/compiler.cxx
|
|
|
f325b2 |
+++ b/sc/source/core/tool/compiler.cxx
|
|
|
f325b2 |
@@ -1011,7 +1011,8 @@ struct ConventionOOO_A1_ODF : public ConventionOOO_A1
|
|
|
f325b2 |
if( !bSingleRef )
|
|
|
f325b2 |
aAbs2 = rRef.Ref2.toAbs(rPos);
|
|
|
f325b2 |
|
|
|
f325b2 |
- if (FormulaGrammar::isODFF(eGram) && (!ValidAddress(aAbs1) || !ValidAddress(aAbs2)))
|
|
|
f325b2 |
+ if (FormulaGrammar::isODFF(eGram) && (rRef.Ref1.IsDeleted() || !ValidAddress(aAbs1) ||
|
|
|
f325b2 |
+ (!bSingleRef && (rRef.Ref2.IsDeleted() || !ValidAddress(aAbs2)))))
|
|
|
f325b2 |
{
|
|
|
f325b2 |
rBuffer.append(rErrRef);
|
|
|
f325b2 |
// For ODFF write [#REF!], but not for PODF so apps reading ODF
|
|
|
f325b2 |
@@ -1408,6 +1409,14 @@ struct ConventionXL_OOX : public ConventionXL_A1
|
|
|
f325b2 |
aPos.SetRow(0);
|
|
|
f325b2 |
}
|
|
|
f325b2 |
|
|
|
f325b2 |
+ if (rRef.Ref1.IsDeleted() || (!bSingleRef && rRef.Ref2.IsDeleted()))
|
|
|
f325b2 |
+ {
|
|
|
f325b2 |
+ // For OOXML write plain "#REF!" instead of detailed sheet/col/row
|
|
|
f325b2 |
+ // information.
|
|
|
f325b2 |
+ rBuf.append(rErrRef);
|
|
|
f325b2 |
+ return;
|
|
|
f325b2 |
+ }
|
|
|
f325b2 |
+
|
|
|
f325b2 |
ConventionXL_A1::makeRefStr( rBuf, eGram, aPos, rErrRef, rTabNames, rRef, bSingleRef, bFromRangeName);
|
|
|
f325b2 |
}
|
|
|
f325b2 |
|
|
|
f325b2 |
|
|
|
f325b2 |
--------------erAck-patch-parts--
|
|
|
f325b2 |
|
|
|
f325b2 |
|