You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openoffice.apache.org by bu...@apache.org on 2012/02/10 13:14:57 UTC

DO NOT REPLY [Bug 118896] New: BASIC needs a throwRuntimeException() function

https://issues.apache.org/ooo/show_bug.cgi?id=118896

             Bug #: 118896
        Issue Type: DEFECT
           Summary: BASIC needs a throwRuntimeException() function
    Classification: Code
           Product: scripting
           Version: version58
          Platform: All
        OS/Version: All
            Status: CONFIRMED
          Severity: enhancement
          Priority: P3
         Component: code
        AssignedTo: kr@openoffice.org
        ReportedBy: donjaime@freenet.de
                CC: ooo-issues@incubator.apache.org


There are some things that can only be done by throwing an exception.

For example, Page 13 of
http://www.openoffice.org/documentation/HOW_TO/various_topics/VbaStarBasicXref.pdf,
addressing the differences between VBA and OOo BASIC happily states that "To
cancel the close in OOo, you must
register a listener for the close event and then veto the close."

But at
http://www.openoffice.org/api/docs/common/ref/com/sun/star/util/XCloseListener.html
we read that to veto the close the listener has to throw a closeVetoException.
Which BASIC can't do. So you have to jump through a lot of hoops, register a
dispatch interceptor, crash the application if you get it wrong, etc.

Something like throwRuntimeException("com.sun.star.util.CloseVetoException")
would make life easier.

-- 
Configure bugmail: https://issues.apache.org/ooo/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

DO NOT REPLY [Bug 118896] BASIC needs a throwRuntimeException() function

Posted by bu...@apache.org.
https://issues.apache.org/ooo/show_bug.cgi?id=118896

T. J. Frazier <tj...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |tj@apache.org
         Issue Type|DEFECT                      |ENHANCEMENT

-- 
Configure bugmail: https://issues.apache.org/ooo/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

[Bug 118896] BASIC needs a throwRuntimeException() function

Posted by bu...@apache.org.
https://issues.apache.org/ooo/show_bug.cgi?id=118896

Oliver-Rainer Wittmann (orw at apache dot org) <or...@googlemail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|enhancement                 |normal

--- Comment #3 from Oliver-Rainer Wittmann (orw at apache dot org) <or...@googlemail.com> ---
getting rid of value "enhancement" for field "severity".
For enhancement the field "issue type" shall be used.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

DO NOT REPLY [Bug 118896] BASIC needs a throwRuntimeException() function

Posted by bu...@apache.org.
https://issues.apache.org/ooo/show_bug.cgi?id=118896

bmarcelly <ma...@club-internet.fr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |marcelly@club-internet.fr

--- Comment #1 from bmarcelly <ma...@club-internet.fr> 2012-02-16 13:08:20 UTC ---
For your information, read this message from Mathias Bauer :
http://www.mail-archive.com/dev@api.openoffice.org/msg03222.html

My attempts to use the service com.sun.star.embed.InstanceLocker from Basic
were unsuccessful, the document still closes.

-- 
Configure bugmail: https://issues.apache.org/ooo/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

DO NOT REPLY [Bug 118896] BASIC needs a throwRuntimeException() function

Posted by bu...@apache.org.
https://issues.apache.org/ooo/show_bug.cgi?id=118896

--- Comment #2 from DonJaime <do...@freenet.de> 2012-02-23 18:32:29 UTC ---
com.sun.star.embed.InstanceLocker will prevent closure of a document, but not
usefully if the user has tried to close it, since the frame still closes: see
Bug 118965.

Using an InstanceLocker on the frame can stop the user closing a document, but
requires caution if the document is closed using the api, since it is possible
for the frame to remain, displaying a document that no longer exists. See the
test document at the above bug.

-- 
Configure bugmail: https://issues.apache.org/ooo/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.