openoffice-api mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Антон Борисов <antonhbbori...@gmail.com>
Subject Re: programmatically removing connected shapes
Date Wed, 22 May 2013 17:07:59 GMT
Suddenly closing,
if run from console:

## A fatal error has been detected by the Java Runtime Environment:##
SIGSEGV (0xb) at pc=0x00007f0b3c22fbe8, pid=5345,
tid=139686241486656## JRE version: 7.0_03-b147# Java VM: OpenJDK
64-Bit Server VM (22.0-b10 mixed mode linux-amd64 compressed oops)#
Derivative: IcedTea7 2.1.1pre# Distribution: Ubuntu 12.04 LTS, package
7~u3-2.1.1~pre1-1ubuntu3# Problematic frame:# C  [libc.so.6+0x3b6be8]
__libc_thread_freeres+0x2539b8## Failed to write core dump. Core dumps
have been disabled. To enable core dumping, try "ulimit -c unlimited"
before starting Java again## An error report file with more
information is saved as:# /tmp/hs_err_pid5345.log## If you would like
to submit a bug report, please include# instructions on how to
reproduce the bug and visit:#
https://bugs.launchpad.net/ubuntu/+source/openjdk-7/#[error occurred
during error reporting , id 0xb]

storing connected shapes isn't a problem, problem is that it's crashes
when deleting.

if i manually ( by delete key) remove connector shape it's ok, i
handle OnShapeRemove event and remove other.
In case of manually removing text shape, o handle OnShapeRemove event,
delete connected ConnectorShape but program crashes.


2013/5/20 Ariel Constenla-Haile <arielch@apache.org>:
> Hi Антон,
>
> On Mon, May 20, 2013 at 08:56:05PM +0400, Антон Борисов wrote:
>> Hello, need some help with draw extension
>>
>> I have 3 shapes connected: 2 connector shapes, 1 text shape, they are
>> connected next way:   " ----> text ----> "
>>
>> I trying to do next: removing one of this shapes (i.e by key delete)
>> will causes deleting two another.
>>
>> I handle XEventListener "ShapeRemoved", and deleting another by
>> XDrawPage.remove, but sdraw fails in some case, exactly when firstly i
>> remove text shape ( by key ).
>
> In which way is it failing?
>
> AFAIK, there is no way to know, from the text shape, if it connected to
> connectors. For a connector, you have StartShape and EndShape; but for
> the text shape you have no way to know which connectors are connecting
> it.
>
> One way is to track this information in a collection of connected shapes
> and for each connected shape store the information about its connectors.
> Then, when you get notified that a shape is being removed, search the
> shape in the collection and remove its connector.
>
>
> Regards
> --
> Ariel Constenla-Haile
> La Plata, Argentina



-- 
Борисов Антон

---------------------------------------------------------------------
To unsubscribe, e-mail: api-unsubscribe@openoffice.apache.org
For additional commands, e-mail: api-help@openoffice.apache.org


Mime
View raw message