[sc-issues] [Issue 115860] oSheets.getCellRangesByNa me(Sh.eet2.A1) fails with c.s.s.lIllegalArgu mentException

2010-12-02 Thread brinzing
To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=115860





--- Additional comments from brinz...@openoffice.org Thu Dec  2 13:15:05 
+ 2010 ---
thanks for the lesson ;-)

added a small test for common special characters

REM  *  BASIC  *
OPTION EXPLICIT

Sub TestSheetNames

 On Local Error Goto ErrorHandler

 Dim oDoc as Object
 Dim oSheets as Object
 Dim mChars as String
 Dim i as Integer
 Dim s as String
 Dim sName as String
 Dim mRanges()

 i = 1  
 mChars = *:[]/\'? $.;°!§%()=|,-_#+~`´²³...@µ^{}ß

 oDoc = ThisComponent
 oSheets = oDoc.getSheets()

 s = can not insert sheets with chars: 
 For i = 1 To Len(mChars)
  sName = Mid(mChars, i, 1)
  If oSheets.hasByName(sName) Then
   oSheets.removeByName(sName)
  EndIf
  oSheets.insertNewByName(sName, oSheets.getCount())
 Next i

 s = s  Chr(13)  Chr(13)  failed to access cellranges without quoting:  

 For i = 0 To oSheets.getCount()-1
  sName = oSheets.getByIndex(i).getName()
  mRanges() = oSheets.getCellRangesByName(sName  .A1)
 Next i

 s = s  Chr(13)  Chr(13)  failed to access a cellrange without quoting:  

 For i = 0 To oSheets.getCount()-1
  sName = oSheets.getByIndex(i).getName()
  oSheets.getByName(sName).getCellRangeByName(sName  .A1)
 Next i

 MsgBox (s, 64, Check characters)

 Exit Sub
ErrorHandler:
 s = s  sName
 Resume Next
End Sub

-
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification

-
To unsubscribe, e-mail: issues-unsubscr...@sc.openoffice.org
For additional commands, e-mail: issues-h...@sc.openoffice.org


-
To unsubscribe, e-mail: allbugs-unsubscr...@openoffice.org
For additional commands, e-mail: allbugs-h...@openoffice.org



[sc-issues] [Issue 115860] oSheets.getCellRangesByNa me(Sh.eet2.A1) fails with c.s.s.lIllegalArgu mentException

2010-12-02 Thread brinzing
To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=115860





--- Additional comments from brinz...@openoffice.org Thu Dec  2 14:11:44 
+ 2010 ---
@er what about adding your comments to
http://api.openoffice.org/docs/common/ref/com/sun/star/sheet/XCellRangesAccess.html
?


-
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification

-
To unsubscribe, e-mail: issues-unsubscr...@sc.openoffice.org
For additional commands, e-mail: issues-h...@sc.openoffice.org


-
To unsubscribe, e-mail: allbugs-unsubscr...@openoffice.org
For additional commands, e-mail: allbugs-h...@openoffice.org



[sc-issues] [Issue 115860] oSheets.getCellRangesByNa me(Sh.eet2.A1) fails with c.s.s.lIllegalArgu mentException

2010-12-01 Thread brinzing
To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=115860
 Issue #|115860
 Summary|oSheets.getCellRangesByName(Sh.eet2.A1) fails with c
|.s.s.lIllegalArgumentException
   Component|Spreadsheet
 Version|OOO330m15
Platform|Unknown
 URL|
  OS/Version|All
  Status|UNCONFIRMED
   Status whiteboard|
Keywords|
  Resolution|
  Issue type|DEFECT
Priority|P3
Subcomponent|code
 Assigned to|spreadsheet
 Reported by|brinzing





--- Additional comments from brinz...@openoffice.org Wed Dec  1 09:53:22 
+ 2010 ---
steps to reproduce:

- open new spreadsheet
- rename Sheet2 to Sh.eet2
- run macro

result: com.sun.star.lang.IllegalArgumentException

if dots . are valid for sheet names, oSheet.getCellRangeByName()
and oSheets.getCellRangesByName() should use the *last* occuring .
as separator for SheetName and Range.


REM  *  BASIC  *
OPTION EXPLICIT

Sub Main

Dim oDoc as Object
Dim oSheets as Object

oDoc = ThisComponent
oSheets = oDoc.getSheets()

Dim mRanges()

mRanges() = oSheets.getCellRangesByName(Sheet1.A1)
MsgBox Sheet Index:   mRanges(0).getRangeAddress().Sheet

' oSheet.getCellRangeByName(Sh.eet2.A1) is also affected
mRanges() = oSheets.getCellRangesByName(Sh.eet2.A1)
MsgBox Sheet Index:   mRanges(0).getRangeAddress().Sheet

End Sub

-
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification

-
To unsubscribe, e-mail: issues-unsubscr...@sc.openoffice.org
For additional commands, e-mail: issues-h...@sc.openoffice.org


-
To unsubscribe, e-mail: allbugs-unsubscr...@openoffice.org
For additional commands, e-mail: allbugs-h...@openoffice.org



[sc-issues] [Issue 115860] oSheets.getCellRangesByNa me(Sh.eet2.A1) fails with c.s.s.lIllegalArgu mentException

2010-12-01 Thread er
To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=115860


User er changed the following:

What|Old value |New value

  Status|RESOLVED  |CLOSED





--- Additional comments from e...@openoffice.org Wed Dec  1 13:14:10 + 
2010 ---
Closing.

-
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification

-
To unsubscribe, e-mail: issues-unsubscr...@sc.openoffice.org
For additional commands, e-mail: issues-h...@sc.openoffice.org


-
To unsubscribe, e-mail: allbugs-unsubscr...@openoffice.org
For additional commands, e-mail: allbugs-h...@openoffice.org



[sc-issues] [Issue 115860] oSheets.getCellRangesByNa me(Sh.eet2.A1) fails with c.s.s.lIllegalArgu mentException

2010-12-01 Thread er
To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=115860


User er changed the following:

What|Old value |New value

  Status|UNCONFIRMED   |RESOLVED

  Resolution|  |INVALID





--- Additional comments from e...@openoffice.org Wed Dec  1 13:13:54 + 
2010 ---
If the sheet name contains dots or operators or blanks it needs to be enclosed
in single quotes = 'Sh.eet2'.A1

To be on the safe side enclose it in single quotes if not all characters are
alphanumeric.

If the sheet name contains single quotes it shall be enclosed in single quotes
and the single quotes enclosed shall be escaped by doubling them: 
'Sh''eet2'.A1


-
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification

-
To unsubscribe, e-mail: issues-unsubscr...@sc.openoffice.org
For additional commands, e-mail: issues-h...@sc.openoffice.org


-
To unsubscribe, e-mail: allbugs-unsubscr...@openoffice.org
For additional commands, e-mail: allbugs-h...@openoffice.org