Issue 109140 - Adding named range with operators (':', '+', ...) in name is possible using the API
Summary: Adding named range with operators (':', '+', ...) in name is possible using t...
Status: CONFIRMED
Alias: None
Product: Calc
Classification: Application
Component: programming (show other issues)
Version: OOo 3.2 RC5
Hardware: All All
: P4 Trivial (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-02-11 08:02 UTC by Oliver Brinzing
Modified: 2017-05-20 11:11 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Oliver Brinzing 2010-02-11 08:02:48 UTC
it's possible to insert a named range containing a ":" using api
but it's not possible to add/change it via Insert - Names - Define...
it was possible in oo 1.1.5 ...

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_10.02.2010_09:00:00"
	sC =  "$'" & oDoc.getSheets().getByIndex(0).getName() & "'." & "$A$1"
	oNRanges.AddNewbyName(sN, sC, oDummy, l)
End Sub
Comment 1 ooo 2010-02-11 12:29:08 UTC
Actually it is an error that adding such a name using the API is still allowed..
The colon is the range operator, the name couldn't be used in formulas.
Comment 2 Oliver Brinzing 2010-02-11 14:56:55 UTC
> Actually it is an error that adding such a name using the API is still allowed..

please be aware that  disallowing this  (via api) could lead to 
compatibilty problems. 

furthermore opening document containing such chars could be problematic in
future too, for example if range names would be checked during load ...
Comment 3 ooo 2010-02-11 16:38:09 UTC
What is a name good for that can't be used anywhere? OOo may support single
quoted name identifiers in future, but please also note that when exporting to
other file formats or being read by other applications the name may get lost or
converted.
Comment 4 Marcus 2017-05-20 11:11:34 UTC
Reset assigne to the default "issues@openoffice.apache.org".