Welcome to NeoOffice developer notes and announcements
NeoOffice
Developer notes and announcements
 
 

This website is an archive and is no longer active
NeoOffice announcements have moved to the NeoOffice News website


Support
· Forums
· NeoOffice Support
· NeoWiki


Announcements
· Twitter @NeoOffice


Downloads
· Download NeoOffice


  
NeoOffice :: View topic - .uno:copy from table does not overwrite clipboard
.uno:copy from table does not overwrite clipboard
 
   NeoOffice Forum Index -> NeoOffice Releases
View previous topic :: View next topic  
Author Message
HButenhoff
Agent


Joined: Oct 26, 2010
Posts: 10

PostPosted: Thu Dec 23, 2010 6:35 am    Post subject: .uno:copy from table does not overwrite clipboard

Hi,

I have a bug that makes a lot of my macros not work any more:
My macros are copying some table content, then open a template and insert that content into the document.

Problem is in many cases any other stuff that was in the clipboard first is inserted. That is very risky here as those clipboard contents are similar tables and we are afraid of ever sending out the wrong one to the wrong customer.

Steps to reproduce
1. put both attached files into the same folder
2. open "OpenThis" in NeoOffice
3. copy anything e.g. from Safari into the clipboard
4. press the button in the Table document

What SHOULD happen is that the template opens and copies the first three cells into the text document

What DOES happen is that the content you had before in your clipboard ends up in the document.

NOTE: This does normally NOT happen while debugging (using break points) only when the macros is just running. (Not sure if its a timing problem or the clipboard is handled differently when macros are interrupted)

Thank you!

Harry
Back to top
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11949

PostPosted: Thu Dec 23, 2010 6:55 am    Post subject:

Thank you for the sample documents. The bad news is that I cannot reproduce this problem using the steps that you listed. In all cases, whether I copy text or an image in Safari, pressing the button in your sample document always copies the text from the sample document into the table.

Can you check if you are using a different Mac OS X or NeoOffice version than me? Specifically, what Mac OS X version is shown in the Apple :: About This Mac menu and in NeoOffice's Help :: About NeoOffice menu?

Edit by pluby: I forgot to mention that I am using Mac OS X 10.6.5 and NeoOffice 3.1.2 Patch 2.

Patrick
Back to top
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11949

PostPosted: Thu Dec 23, 2010 10:24 am    Post subject:

pluby wrote:
Can you check if you are using a different Mac OS X or NeoOffice version than me? Specifically, what Mac OS X version is shown in the Apple :: About This Mac menu and in NeoOffice's Help :: About NeoOffice menu?


If you are using Mac OS X 10.6.5 and NeoOffice 3.1.2 Patch 2 like I am, can you go to the Finder, launch the /Applications/Utilities/Terminal application, paste the following commands into the Terminal window, press the Return key, and copy the output into this forum topic?:

Code:
ls -l ~/Library/InputManagers
ls -l ~/Library/Application\ Support
ls -l /Library/InputManagers
ls -l /Library/Application\ Support


The above steps will tell us if you have "clipboard management" software installed on your machine. If so, we can investigate if that clipboard management software is interleaving updates to the system clipboard while your macro is running:

Patrick
Back to top
HButenhoff
Agent


Joined: Oct 26, 2010
Posts: 10

PostPosted: Tue Dec 28, 2010 2:13 am    Post subject:

Hi,

yes, I do have the same NeoOffice and Mac OS, but I had to notice that this bug demo does work.
Seems like I stripped my problem down too much and it has something to do with the original table document I was using.

I will have to further investigate and either find the source of the problem or make a more sophisticated example.

Thank you!

Harry
Back to top
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11949

PostPosted: Tue Dec 28, 2010 10:05 am    Post subject:

I you can find a sample document where this problem occurs, I will definitely look at it.

We are preparing to update our copy/paste/drag/drop code to be compatible with Apple's upcoming Mac OS X 10.7 Lion release so now is really a good time for us to fix any copy and paste bugs that you have found.

Patrick
Back to top
HButenhoff
Agent


Joined: Oct 26, 2010
Posts: 10

PostPosted: Thu Jan 06, 2011 3:03 am    Post subject:

Hi,

the bug still occurs in our tables, that I cannot publicly give away, but I can try to describe the situation more thoroughly:

The situation is kind of like in the sample, a table is copied into a text document, for multiple documents in a row.
The area that is copied has an applied filter, that might change between document, the content always changes between documents.
The area stays selected between document creations.
What now happens is that the table copied into those text documents stays the same even though the copy methods is called.

I just found a way to avoid the bug that might be key to finding it:
If I click anywhere in the table document (thus selecting a different part), the next copying goes fine. So it seems directly related to the fact that the area stays selected.
However if I select an area programmatically the bug persists.

Hope this helps!
Harry

P.S.: I don't know if this has any influence on the situation, but these huge tables have a bug that has been around since Star Office. Some fields refuse to take in a formula, if you change the existing one or type in a new one the formula is used as text (including the "=") the only way to resolve this is to delete the whole content of the field (formatting and everything) and then type in the formula and I typically paste the formatting then into the field again (running into the same problem later again ....)
Back to top
HButenhoff
Agent


Joined: Oct 26, 2010
Posts: 10

PostPosted: Thu Jan 06, 2011 3:13 am    Post subject:

I found a programmatic solution:
A temporarily jumping to a cell in a different sheet using the dispatcher.
(did not work on the same sheet)
Back to top
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11949

PostPosted: Thu Jan 06, 2011 5:54 am    Post subject:

HButenhoff wrote:
I found a programmatic solution:
A temporarily jumping to a cell in a different sheet using the dispatcher.
(did not work on the same sheet)


I am glad to hear that you found a programmatic solution as based on what you described, it is likely that you have encountered a bug in NeoOffice's underlying OpenOffice.org code which would mean that the bug you found would also occur if your macros are used in OpenOffice.org or LibreOffice.

Does your programmatic solution also work in OpenOffice.org and LibreOffice?

Patrick
Back to top
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11949

PostPosted: Tue Jan 11, 2011 8:05 am    Post subject:

If possible, can you install the following test patch and verify that your macros still work correctly?

I ask this because I have reimplemented NeoOffice's copy and paste code so that NeoOffice no longer uses functions that Apple is likely to remove in their upcoming Mac OS X 10.7 Lion release.

Below are links to the test patch. If you find any breakage in your macros, please let us know so that I can fix any breakage before we put this code into an official patch:

Intel:
http://joe.neooffice.org/test/NeoOffice-3.1.2-Patch-2-Test-2-Intel.dmg

PowerPC:
http://joe.neooffice.org/test/NeoOffice-3.1.2-Patch-2-Test-2-PowerPC.dmg

Patrick
Back to top
HButenhoff
Agent


Joined: Oct 26, 2010
Posts: 10

PostPosted: Thu Jan 13, 2011 5:57 am    Post subject:

I did different tests, sadly one of them failed.
I get the message (translated from german) The requested Clip board format does not exist.
This happened instead of the original bug mentioned earlier in this thread.
(And only happened when I removed the bug workaround, thus leaving the original area marked, that has been copied before, while the clipboard has been used from the text document afterwards.)
[/code]
Back to top
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11949

PostPosted: Thu Jan 13, 2011 10:54 am    Post subject:

HButenhoff wrote:
I did different tests, sadly one of them failed.
I get the message (translated from german) The requested Clip board format does not exist.
This happened instead of the original bug mentioned earlier in this thread.
(And only happened when I removed the bug workaround, thus leaving the original area marked, that has been copied before, while the clipboard has been used from the text document afterwards.)
[/code]


Thank you for testing the test patch. The error dialog is a tweak to the code that force NeoOffice's underlying OpenOffice.org code to display the error instead of silently failing.

Since the dialog clearly indicates that the same problem you encountered earlier is still there, I am still interested in fixing this problem if I can so I have an idea that might give me enough data to troubleshoot this problem.

Can you do the tell us the following?:

1. What exactly is copied to the clipboard from Calc? I am interested in what type of data, images, or graphs are selected so if you can grab a screen snapshot of the selected area using the Command-Shift-4 keys (this will create a .png file on your Desktop that you can attach), that might give me some further troubleshooting ideas.

2. What exactly is supposed to happen in the Writer document when the error dialog appears? If nothing is selected, I am interested in seeing the cursor's surrounding content. If some content is selected, I am interested in seeing a screen snapshot like in step 1.

Let us know if you are unable to obtain either of the above.

Patrick
Back to top
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11949

PostPosted: Sun Jan 23, 2011 2:16 pm    Post subject:

I have a new test patch that includes changes to NeoOffice's drag and drop code so that NeoOffice no longer uses functions that Apple is likely to remove in their upcoming Mac OS X 10.7 Lion release.

I had to make some changes to the copy and paste code so I wanted to ask if your macros still work with the following test patch. You will likely need to keep your workaround in your macros, but if you find that workaround no longer works with the following test patch, please let us know and I will investigate immediately:

Intel:
http://joe.neooffice.org/test/NeoOffice-3.1.2-Patch-2-Test-3-Intel.dmg

PowerPC:
http://joe.neooffice.org/test/NeoOffice-3.1.2-Patch-2-Test-3-PowerPC.dmg

Patrick
Back to top
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11949

PostPosted: Wed Feb 02, 2011 10:19 am    Post subject:

FYI. I have included the new copy and paste code in NeoOffice 3.1.2 Patch 3. You can download the patch from the NeoOffice patch download page.

Please let us know if you find any new copy and paste issues with Patch 3 and we will investigate them immediately.

Patrick
Back to top
HButenhoff
Agent


Joined: Oct 26, 2010
Posts: 10

PostPosted: Tue Feb 08, 2011 3:03 am    Post subject:

Patch 3 seem to works fine.

The old Bug is still there, so seems to be on OOo side.

Harry
Back to top
Display posts from previous:   
   NeoOffice Forum Index -> NeoOffice Releases All times are GMT - 7 Hours
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum

Powered by phpBB © 2001, 2005 phpBB Group

All logos and trademarks in this site are property of their respective owner. The comments are property of their posters, all the rest © Planamesa Inc.
NeoOffice is a registered trademark of Planamesa Inc. and may not be used without permission.
PHP-Nuke Copyright © 2005 by Francisco Burzi. This is free software, and you may redistribute it under the GPL. PHP-Nuke comes with absolutely no warranty, for details, see the license.