Kaydet (Commit) 4f864949 authored tarafından Mike Kaganski's avatar Mike Kaganski Kaydeden (comit) Caolán McNamara

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/15678Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 2ff13e13
......@@ -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 )
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment