Cristian Fonti wrote:
Hi to all,
i have a problem using the method insertDocumentFromURL: when i use it to insert some formatted text (font size, font color,etc...) from another document, in the destination file appear at the top of the document 2-3 blank row... the code snipplets is:
xTextDocument = (XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, xcomponent);
xText = xTextDocument.getText();
TextCursor=xText.createTextCursor();
xd=(XDocumentInsertable) UnoRuntime.queryInterface(XDocumentInsertable.class,TextCursor);
xd.insertDocumentFromURL("file:///C:/file1.rtf",loadProps);
TextCursor=xText.createTextCursor();
xd=(XDocumentInsertable) UnoRuntime.queryInterface(XDocumentInsertable.class,TextCursor);
xd.insertDocumentFromURL("file:///C:/file2.rtf",loadProps);
If i add 3,4,5,6 documents the number of white rows increase...
Please someone help me.... Thanks Cristian Fonti
I ran the following test:
Dim sURL$ Dim oText Dim oCurs
sURL = "file:///andrew0/home/andy/film.txt" oText = ThisComponent.getText() oCurs = oText.createTextCursor() oCurs.gotoStart(False) oCurs.insertDocumentFromURL(sURL, Array())
The film.txt file, contains NO extra spaces. I did NOT see the problems that you mention.
Notice that I did use the 2.0 Beta.
I suspect that margins from the RTF file are inserted, but this is ONLY a guess. What happens with your code when you sue text files with NO top or bottom margins?
-- Andrew Pitonyak My Macro Document: http://www.pitonyak.org/AndrewMacro.sxw My Macro Book: http://www.hentzenwerke.com/catalog/oome.htm Free Info: http://www.pitonyak.org/oo.php
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]