Petr Nalevka wrote:
> 
> But I have a different issue with the clipboard in XML Mind. Maybe the
> issue is very specific to my setup and OS (Ubuntu 8.10 Java
> 1.6.0_10-b33, Open Office 3.0 as well as 2.4). But whenever I copy a
> part of the spreadsheet in Open Office and return to XML Mind everything
> slows down massively.
> 
> Even with small matrix beeing copied (80x6) I wait several seconds to
> get focus and if I click somewhere the caret needs another second or two
> to change position. With bigger matix (1000x6) the editor gets totally
> irresponsive.
> 
> It must be something with the format of the clipboard data which Open
> Office uses because if I first paste the text to an plain text editor
> and than I copy it again, there is no issue in XML Mind. Also I tried
> copy really huge texts into the clipboard. Even with the whole HTML 4.01
> sepcification there was no significant lag.
> 
> Can you reproduce the issue with your setup?
> 

Hussein Shafie wrote:
> Yes, I can reproduce the problem with OpenSUSE 10.2, Java 1.6.0_11,
> OpenOffice 2. I'll investigate this problem and I'll get to you in the
> next few days.
> 

I'm sorry but we currently don't see how we can workaround this problem.

--> Here's what happens:

[1] Each time you change the implicit or explicit selection, for
example, when you move the caret from one element to another, XXE
queries the clipboard for some text contents. This happens just once for
each editing context change.

[2] Each time, OpenOffice (or is it X11? or is it the Java[tm] runtime?)
takes *400ms* to *1100ms* to return the text found in the clipboard.
Most other applications do that just in a few milliseconds.

--> Why does XXE query the clipboard so often?

* XXE needs to know when the contents of the clipboard have changed (the
actual contents, not just the type -- text, image, xml, html, rtf, etc
-- of the contents).

* Java has currently no API which allows to detect such change. Thus XXE
has to query the clipboard once for each editing context change.

* XXE needs to know when the contents of the clipboard have changed
because it is a *validating* XML editor. Example:

- You have selected a DocBook para.
- The clipboard contains a DocBook programlisting. You may paste it
after the para.
- The clipboard now contains an XHTML pre (there is no data flavor
change here: was XML and is still XML). You may no longer paste it after
the para.

--> Remarks:

* With Java 1.5 instead of Java 1.6, XXE crashes in the middle of Sun's
code.

* I was not able to reproduce the problem with Java 1.6.0_11 and
OpenOffice 3 on Windows.


Reply via email to