To comment on the following update, log in, then open the issue: http://www.openoffice.org/issues/show_bug.cgi?id=104055 Issue #|104055 Summary|Clipboard does not properly work at programming Component|Word processor Version|OOo 3.0.1 Platform|PC URL| OS/Version|Windows XP Status|UNCONFIRMED Status whiteboard| Keywords| Resolution| Issue type|DEFECT Priority|P3 Subcomponent|code Assigned to|writerneedsconfirm Reported by|miamichief
------- Additional comments from miamich...@openoffice.org Thu Aug 6 13:05:15 +0000 2009 ------- This issue seems similar to Issue 5561. I have developed a small tool program tracking the last 10 clipboard entries for reusal and other things as e.g. changing a clipboard text into plaintext (without formating). The tool works fine with all applications except open office. I always need to perform the tool actions twice so that the clipboard content is taken over into the Open Office Clipboard, whereas, when I past the clipboard content after only having performed the first action to a simple editor works. I remember having the problem now for about 1 year starting with OO 3.0.x version. After long tries I could fix the problem most of the time (sometimes it does not work either) with following code (the code was a result of a long hassle of tries): string strText = Clipboard.GetText(TextDataFormat.UnicodeText); Clipboard.Clear(); Clipboard.SetText(strText, TextDataFormat.UnicodeText); Clipboard.Clear(); Clipboard.SetText(strText, TextDataFormat.UnicodeText); Clipboard.SetText(strText, TextDataFormat.UnicodeText); //set up a timer: if (gTimer_ClipboardPlainText == null) { gTimer_ClipboardPlainText = new System.Windows.Forms.Timer(); gTimer_ClipboardPlainText.Tick += new EventHandler(evt_Timer_Tick); gTimer_ClipboardPlainText.Interval = 1; } gTimer_ClipboardPlainText.Start(); /// <summary> /// This timer tries Clipboard plain text some time later than the mouse event. /// /// NOTE: Before, Open Office did only accept clipboard plain text after the second click. /// This timer now prevents this problem. /// BT thinks the problem is that the mouse event is catched from the main application and that /// the Java engine of OO does not like this. Now a timer performing the action 500ms later seems to /// work! /// </summary> System.Windows.Forms.Timer gTimer_ClipboardPlainText = null; private void evt_Timer_Tick(object sender, EventArgs e) { try { gTimer_ClipboardPlainText.Stop(); if (Clipboard.ContainsText() == true) { //NOTE: We still need this lot of actions, otherwise Open Office does not work either. string strText = Clipboard.GetText(TextDataFormat.UnicodeText); int i = 0; while (i <= 10) { determineCurrentActiveWindow(); foreach (Process proc in Process.GetProcesses()) { if (proc.MainWindowHandle == ghwinCurrentActive) { proc.WaitForInputIdle(); } } Clipboard.Clear(); Clipboard.SetText(strText, TextDataFormat.UnicodeText); Application.DoEvents(); Thread.Sleep(5); i++; } return; } } catch (Exception ex) { ... } } -> seems to have something to do with the events in Java or Open Office, and once you hit by chance the right time frame to insert into the clipboard it works. Would be very nice to fix the real problem! --------------------------------------------------------------------- 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: issues-unsubscr...@sw.openoffice.org For additional commands, e-mail: issues-h...@sw.openoffice.org --------------------------------------------------------------------- To unsubscribe, e-mail: allbugs-unsubscr...@openoffice.org For additional commands, e-mail: allbugs-h...@openoffice.org