To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=59199
                  Issue #:|59199
                  Summary:|replaceByName in com.sun.star.drawing.BitmapTable
                          |seems to be broken
                Component:|api
                  Version:|OOo 2.0
                 Platform:|PC
                      URL:|
               OS/Version:|Windows 2000
                   Status:|UNCONFIRMED
        Status whiteboard:|
                 Keywords:|
               Resolution:|
               Issue type:|DEFECT
                 Priority:|P3
             Subcomponent:|definition
              Assigned to:|jsc
              Reported by:|mneumann





------- Additional comments from [EMAIL PROTECTED] Sun Dec 11 04:22:19 -0800 
2005 -------
I have the following function that worked fine in OO 1.1.5, but not anymore in
OO 2.0:

Function LoadGraphicIntoDocument( oDoc As Object, cUrl As String, cInternalName
As String ) As String
   ' Get the BitmapTable from this drawing document.
   ' It is a service that maintains a list of bitmaps that are internal
   '  to the document.
   Dim oBitmaps as Object
   Dim cNewURL as String
   
   oBitmaps = oDoc.createInstance( "com.sun.star.drawing.BitmapTable" )
   
   If oBitmaps.hasByName (cInternalName) Then
         oBitmaps.replaceByName (cInternalName, cUrl)
   Else
         ' Add an external graphic to the BitmapTable of this document.
         oBitmaps.insertByName( cInternalName, cUrl )
   End If
   
   ' Now ask for it back.
   ' What we get back is an different Url that points to a graphic
   '  which is inside this document, and remains with the document.
   cNewUrl = oBitmaps.getByName( cInternalName )
   
   LoadGraphicIntoDocument = cNewUrl
End Function 

It throws a NoSuchElementException when asking back the name with the getbyname
function. And it seems to do that only once it was running the insertbyName
section. Obviously the InsertByName function does not work properly.

The replacebyName does not throw a runtime error, but it does not seem to do
anything either. I did not do thorough tests on that point, but the InsertByName
is definitely not functioning anymore.

---------------------------------------------------------------------
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to