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 ':', '+', ... ...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Andreas Heinisch
URL:
Whiteboard: target:7.2.0
Keywords:
Depends on:
Blocks:
 
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:


Attachments

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). 

Example:

REM  *****  BASIC  *****
OPTION EXPLICIT

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: 6.2.0.0.alpha0+
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: 6.4.0.0.alpha0+ (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":

https://git.libreoffice.org/core/commit/aed1937e7efdf9a6d8c831edef73ec822832ea4e

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:
https://wiki.documentfoundation.org/Testing_Daily_Builds

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