OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

Empty draw to EPS export using macro

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API
View previous topic :: View next topic  
Author Message
jruuttun
Guest





PostPosted: Fri Feb 13, 2004 12:30 am    Post subject: Empty draw to EPS export using macro Reply with quote

Hi,

first, thanks for the useful advice I've found in this forum.

Q1: I'm running OOo 1.1.0 on a WinXP and trying to export a drawing using the following subroutine, adapted from DannyB:s examples found in this forum:

Code:

Sub ConvertSxdToEpsByURL( cURL)
   oDoc = StarDesktop.loadComponentFromURL( cURL, "_blank", 0, Array(MakePropertyValue( "Hidden", True)))
   cURL = Left( cURL, Len( cURL ) - 4) + ".eps"   
   oDoc.storeToURL( cURL, Array( MakePropertyValue( "FilterName", "draw_eps_Export" ))
   oDoc.close( True)
End Sub


I'm running this macro from the cygwin command line, using an 'invisible' OOo DeskTop. The file from the given URL is loaded OK. The problem is, the exported file seems empty when I view it with gv. What am I missing here?
A manual EPS export from inside OOo works fine.

While at it, here's Q2: My goal is a macro that first selects all, then exports to eps only the selection. This is how far I got with the selection part:
Code:

dim document   as object
dim dispatcher as object
document = ThisComponent.CurrentController.Frame
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")
dispatcher.executeDispatch(document, ".uno:SelectAll", "", 0, Array())

This works fine, but how do I export just the selection (after having solved Q1...)?

Any advice greatly appreciated. Thanks again.

Janne
Back to top
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2005 phpBB Group