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

Eike Rathke erack at redhat.com
Tue Mar 22 13:03:11 UTC 2016


 sc/source/core/tool/compiler.cxx |    3 +++
 sc/source/core/tool/token.cxx    |    3 +++
 2 files changed, 6 insertions(+)

New commits:
commit 97269062ca08d4265e15eb0e8343f90f10810403
Author: Eike Rathke <erack at redhat.com>
Date:   Tue Mar 22 13:59:44 2016 +0100

    enquote sheet name of other-sheet-local named expressions, tdf#96915 follow-up
    
    Change-Id: I8fde73dc86c29054ec05bbc60e212ae660c78376

diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index 15b1939..b425de6 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -4815,7 +4815,10 @@ void ScCompiler::CreateStringFromIndex( OUStringBuffer& rBuffer, const FormulaTo
                     // Sheet-local on other sheet.
                     OUString aName;
                     if (pDoc->GetName( nTab, aName))
+                    {
+                        ScCompiler::CheckTabQuotes( aName, pConv->meConv);
                         aBuffer.append( aName);
+                    }
                     else
                         aBuffer.append( ScGlobal::GetRscString( STR_NO_NAME_REF));
                     aBuffer.append( pConv->getSpecialSymbol( ScCompiler::Convention::SHEET_SEPARATOR));
diff --git a/sc/source/core/tool/token.cxx b/sc/source/core/tool/token.cxx
index d3d571e..ac2eed2 100644
--- a/sc/source/core/tool/token.cxx
+++ b/sc/source/core/tool/token.cxx
@@ -4754,7 +4754,10 @@ void appendTokenByType( sc::TokenStringContext& rCxt, OUStringBuffer& rBuf, cons
                             if (static_cast<size_t>(nTab) < rCxt.maTabNames.size())
                                 aName = rCxt.maTabNames[nTab];
                             if (!aName.isEmpty())
+                            {
+                                ScCompiler::CheckTabQuotes( aName, rCxt.mpRefConv->meConv);
                                 rBuf.append( aName);
+                            }
                             else
                                 rBuf.append( ScGlobal::GetRscString( STR_NO_NAME_REF));
                             rBuf.append( rCxt.mpRefConv->getSpecialSymbol( ScCompiler::Convention::SHEET_SEPARATOR));


More information about the Libreoffice-commits mailing list