[Libreoffice-commits] core.git: sw/source

Mike Kaganski mikekaganski at hotmail.com
Sun May 10 12:59:52 PDT 2015


 sw/source/core/fields/cellfml.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 4f864949a9484bbf21911859398743bfe2b1430f
Author: Mike Kaganski <mikekaganski at hotmail.com>
Date:   Sat May 9 00:11:24 2015 +1000

    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 at libreoffice.org>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sw/source/core/fields/cellfml.cxx b/sw/source/core/fields/cellfml.cxx
index 5185864..b163b6b 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 )
             {


More information about the Libreoffice-commits mailing list