To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=84010
                 Issue #|84010
                 Summary|App crash attempting to insert empty Transferable
               Component|Word processor
                 Version|OOo 2.3
                Platform|All
                     URL|
              OS/Version|All
                  Status|UNCONFIRMED
       Status whiteboard|
                Keywords|
              Resolution|
              Issue type|DEFECT
                Priority|P3
            Subcomponent|code
             Assigned to|mru
             Reported by|silvercapo





------- Additional comments from [EMAIL PROTECTED] Tue Nov 27 14:28:15 +0000 
2007 -------
In Writer/OOoBasic, when using the Transferable framework to copy-and-paste
between two documents, and the transferable is 'empty', the application crashes.

STEPS TO REPRODUCE THE PROBLEM
1. Create a new document, and create a new Basic module Module1 with default sub
Main
2. In Main, enter the following code:
Dim oTransferable As Object
Dim oNewDoc       As Object
Dim aNoArgs()
oTransferable = ThisComponent.CurrentController.getTransferable() ' ***
oNewDoc = StarDesktop.loadComponentFromURL("private:factory/swriter", "_blank",
0, aNoArgs())
oNewDoc.CurrentController.insertTransferable(oTransferable)

*** Since this document is currently empty, no selection has been made, and
oTransferable contains nothing (but note an object has still been returned, this
is not Empty, Null, or Missing)

3. Run Main, and the application will pause for a second, then system crash.

POSSIBLE WORKAROUNDS
Could avoid this by checking that something has actually been selected in the
current document before invoking this code.

PROPOSED SOLUTION
insertTransferable(obj) should just do nothing in the case where the
Transferable obj contains nothing; and possibly also that getTransferable()
should return a null object (not sure if that is possible?) that can be tested
for Null or Empty.

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