summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMike Kaganski <mikekaganski@hotmail.com>2015-05-09 00:11:24 +1000
committerCaolán McNamara <caolanm@redhat.com>2015-05-10 19:59:32 +0000
commit4f864949a9484bbf21911859398743bfe2b1430f (patch)
tree11b87f22f1714f7389bbd5794c885725d0c42543 /sw
parent2ff13e13f5f1ec7436e99c6ff7c9a863bc1a1572 (diff)
tdf#66353: fix converting relative sw table formula back to box
The check was incorrect: it invariantly checked only first part of formula, and thus gave wrong results when the relative represen- tation of formula contained external reference in usual box form. BTW, I don't know why there's hardcoded return of "A1" on error in SwTableFormula::RelNmsToBoxNms? Isn't that dangerous to provide an arbitrary valid result that may give unnoticed wrong calculation? Change-Id: If17c0f9459c64e65a6c2b8ed4482ffee78f115b2 Reviewed-on: https://gerrit.libreoffice.org/15678 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/fields/cellfml.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sw/source/core/fields/cellfml.cxx b/sw/source/core/fields/cellfml.cxx
index 51858645b8fa..b163b6b33d33 100644
--- a/sw/source/core/fields/cellfml.cxx
+++ b/sw/source/core/fields/cellfml.cxx
@@ -648,7 +648,7 @@ OUString SwTableFormula::ScanString( FnScanFormula fnFormula, const SwTable& rTb
// JP 22.02.99: Linux compiler needs cast
// JP 28.06.99: rel. BoxName has no preceding tablename!
if( fnFormula != (FnScanFormula)&SwTableFormula::_SplitMergeBoxNm &&
- m_sFormula.getLength()>1 && cRelIdentifier != m_sFormula[1] &&
+ m_sFormula.getLength()>(nStt+1) && cRelIdentifier != m_sFormula[nStt+1] &&
(nSeparator = m_sFormula.indexOf( '.', nStt ))>=0
&& nSeparator < nEnd )
{