summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2020-10-31 21:49:36 +0100
committerEike Rathke <erack@redhat.com>2020-10-31 23:26:09 +0100
commit5805a1d57c4a52566899b7fdaf88d6309056411e (patch)
treee16066452c71d09484daae306679916f1be0eaa3
parenttdf#121553: Firebird, fix datatypes management (diff)
downloadcore-5805a1d57c4a52566899b7fdaf88d6309056411e.tar.gz
core-5805a1d57c4a52566899b7fdaf88d6309056411e.zip
Enquote sheet name if necessary, tdf#137896 follow-up
Change-Id: I9ebdc30bf0b8b1531d57da299146fda9871442ed Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105126 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
-rw-r--r--sc/source/ui/namedlg/namepast.cxx7
1 files changed, 6 insertions, 1 deletions
diff --git a/sc/source/ui/namedlg/namepast.cxx b/sc/source/ui/namedlg/namepast.cxx
index 491c69e0f7ba..63ddeccd0ab8 100644
--- a/sc/source/ui/namedlg/namepast.cxx
+++ b/sc/source/ui/namedlg/namepast.cxx
@@ -26,6 +26,7 @@
#include <scui_def.hxx>
#include <globstr.hrc>
#include <scresid.hxx>
+#include <compiler.hxx>
ScNamePasteDlg::ScNamePasteDlg(weld::Window * pParent, ScDocShell* pShell)
: GenericDialogController(pParent, "modules/scalc/ui/insertname.ui", "InsertNameDialog")
@@ -80,7 +81,11 @@ IMPL_LINK(ScNamePasteDlg, ButtonHdl, weld::Button&, rButton, void)
if (rLine.aScope == aGlobalScope)
maSelectedNames.push_back(rLine.aName);
else
- maSelectedNames.push_back(rLine.aScope + m_aSheetSep + rLine.aName);
+ {
+ OUString aSheet( rLine.aScope);
+ ScCompiler::CheckTabQuotes( aSheet);
+ maSelectedNames.push_back( aSheet + m_aSheetSep + rLine.aName);
+ }
}
m_xDialog->response(BTN_PASTE_NAME);
}