[Libreoffice-commits] core.git: sc/inc sc/source
Eike Rathke (via logerrit)
logerrit at kemper.freedesktop.org
Sat Oct 31 20:31:15 UTC 2020
sc/inc/document.hxx | 6 ++++++
sc/source/core/data/documen4.cxx | 8 ++++++++
2 files changed, 14 insertions(+)
New commits:
commit c87a70c9f66256c85df7e7d33c3ebb46782593a7
Author: Eike Rathke <erack at redhat.com>
AuthorDate: Sat Oct 31 18:27:58 2020 +0100
Commit: Eike Rathke <erack at redhat.com>
CommitDate: Sat Oct 31 21:30:31 2020 +0100
Implement ScDocument::GetSheetSeparator()
That can be reused.
Change-Id: I4805fefa7585ddee026073e3b647020f8a993ab2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105123
Tested-by: Jenkins
Reviewed-by: Eike Rathke <erack at redhat.com>
diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index edc0447949cf..5bab5a19d80c 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -803,6 +803,12 @@ public:
*/
bool InsertNewRangeName( SCTAB nTab, const OUString& rName, const ScAddress& rPos, const OUString& rExpr );
+ /** Obtain the sheet separator corresponding to the document's grammar.
+
+ @return '.' for our own grammars, '!' for Excel grammars.
+ */
+ SC_DLLPUBLIC sal_Unicode GetSheetSeparator() const;
+
SCTAB GetMaxTableNumber() const { return static_cast<SCTAB>(maTabs.size()) - 1; }
ScRangePairList* GetColNameRanges() { return xColNameRanges.get(); }
diff --git a/sc/source/core/data/documen4.cxx b/sc/source/core/data/documen4.cxx
index 5e0e19f93035..9190ed109e44 100644
--- a/sc/source/core/data/documen4.cxx
+++ b/sc/source/core/data/documen4.cxx
@@ -1346,4 +1346,12 @@ void ScDocument::CompareDocument( ScDocument& rOtherDoc )
}
}
+sal_Unicode ScDocument::GetSheetSeparator() const
+{
+ const ScCompiler::Convention* pConv = ScCompiler::GetRefConvention(
+ FormulaGrammar::extractRefConvention( GetGrammar()));
+ assert(pConv);
+ return pConv ? pConv->getSpecialSymbol( ScCompiler::Convention::SHEET_SEPARATOR) : '.';
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
More information about the Libreoffice-commits
mailing list