Bug 119457 - inserting named ranges with special characters, e.g. operators ':', '+', ... in name are allowed via api
Summary: inserting named ranges with special characters, e.g. operators ':', '+', ... ...
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Andreas Heinisch
Whiteboard: target:7.2.0
Depends on:
Reported: 2018-08-23 16:14 UTC by Oliver Brinzing
Modified: 2021-04-09 08:10 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:
Regression By:


Note You need to log in before you can comment on or make changes to this bug.
Description Oliver Brinzing 2018-08-23 16:14:41 UTC
inserting named ranges with special characters, e.g. operators ':', '+',... 
are allowed via api but disallowed using named ranges dialog (Strg+F3). 


REM  *****  BASIC  *****

Sub Main
	Dim oDoc as Object
	Dim oNRanges as Object
	Dim sN as String
	Dim sC as String
	Dim oDummy as New com.sun.star.table.CellAddress
	Dim l as Long

	oDoc = ThisComponent
	oNRanges = oDoc.NamedRanges
	sN = "TIMESTAMP_23.08.2018_18:05:00"
	sC =  "$'" & oDoc.getSheets().getByIndex(0).getName() & "'." & "$A$1"
	oNRanges.AddNewbyName(sN, sC, oDummy, l)
End Sub
Comment 1 raal 2018-09-05 21:08:58 UTC
I can confirm with Version:
Build ID: 4b5fcd417587cfb9e6d8b61ecb037ab165eeb5b9
CPU threads: 4; OS: Linux 4.4; UI render: default; VCL: gtk3;
Comment 2 QA Administrators 2019-09-06 05:01:35 UTC Comment hidden (obsolete)
Comment 3 Oliver Brinzing 2019-09-06 05:36:14 UTC
still reproducible with:

Version: (x64)
Build ID: 1c7fdf561bc924741a121439a6cb42f96f285b58
CPU threads: 4; OS: Windows 10.0; UI render: default; VCL: win; 
Locale: de-DE (de_DE); UI-Language: en-US
Calc: threaded
Comment 4 Commit Notification 2021-04-09 07:41:42 UTC
Andreas Heinisch committed a patch related to this issue.
It has been pushed to "master":


tdf#119457 - check for a valid range name and cell reference

It will be available in 7.2.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:

Affected users are encouraged to test the fix and report feedback.