OpenDocument4all - Info and tools about OpenDocument
Sunday, 05 February 2012
Home arrow Forum
Forum Statistics
Total user: 89
Total message: 179
Main Menu
Home
My Blog
AODL - Project
AODC - Project
OO Development & Info
Forum
About OpenDocument ...
Search
News
Contact Us
Login Form





Lost Password?
No account yet? Register
Sourceforge.net

SourceForge.net - Goto the project homepage
Project site on SF.net

 

Demand OpenDocument

 

Countomat Webcounter und Webstatistik (Statistik & Logfileanalyse, Counter)

OpenDocument4all-Forum

 
Copy & Paste by code
Date: 2007/03/16 21:47 By: Michael Herrmann Status: User  
Karma: 0  
Junior Boarder

Posts: 6
graphgraph
Hi,

i need a solution for moving a text-selection from one oo-document-window to another. I have openoffice documents by ...

ServiceManager = CreateObject("com.sun.star.ServiceManager")
Desktop = lv_objServiceManager.createInstance("com.sun.star.frame.Desktop")
Document = lv_objDesktop.loadComponentFromURL(url_Writer, "_blank", 0, args)

integrated with a setparent(handleDesktop, handleMdi) in my mdi-window.


I see multiple possibilities to transfer ...

1. sendmessage / wm_copy / wm_paste to oo-handle (dirty)
2. sendkeys.send("^c/^v") (more dirty)
3. insertTextContent (find no working example)

but no one works

1. The message SendMessage(lv_OO_hwnd_window, WM_PASTE, 0, 0) will not be received from the oo-desktop. The SendMessage(lv_OO_hwnd_window, WM_SYSCOMMAND, SC_CLOSE , 0) works, so the handle must be right. Has the document a other handle like the desktop ? Whats wrong ?

2. The sendkeys-method works, a text will be pasted to the destination-window, but multiple times. Example copy = "Text", paste =>"TextTextText..." The sendkey will only fired one time !!!

3. I can' find the right object for the insertTextContent-Method. What object (oSel) has a text selection ( .currentselection / .getViewCursor) to declare with the .insertTextContent(oVC,oSel,false) . There are many examples for objects=table/field ... but no one for a object that stores all received from getViewCursor.

Another requirement same problem. I want to store a text-selection in a Database and reload it, to insert the selection in a other oo-document.



Have i tomatoes on my eyes . I browse high and low trough the www. Is there a other easy solution i doesn't see ?

Best regards

Michael Herrmann
VB.Net
The administrator has disabled public write access.

Quick jump
Download area
Who's Online
We have 28 guests online
Polls
Should AODL and AODC also implement export as PDF and RTF?
 
Popular
© 2005 MamboZ. All rights reserved.