To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=80000
                 Issue #|80000
                 Summary|Problem in exporting to EPS from drawing
               Component|Drawing
                 Version|OOo 2.2.1
                Platform|PC
                     URL|
              OS/Version|Windows XP
                  Status|UNCONFIRMED
       Status whiteboard|
                Keywords|
              Resolution|
              Issue type|DEFECT
                Priority|P3
            Subcomponent|programming
             Assigned to|cgu
             Reported by|teddyxiong





------- Additional comments from [EMAIL PROTECTED] Tue Jul 24 18:47:22 +0000 
2007 -------
I used a Macro to export drawing page into EPS. This macro works fine in
OpenOffice version 1.1.4. But after I downloaded latest version 2.2, the macro
doesn't work any more. It did generate eps file but the eps file is alway empty
with 0 bytes. In the function, if I change image type to png or jpeg, it works
fine and png or jpeg images are generated successfully. The only problem is 
eps. 

The following is the macro function:

sub exportSelectionOrPageToEps
   Dim currentPageName as String
   
    oDoc = StarDesktop.getCurrentComponent()
   if not oDoc.SupportsService( "com.sun.star.drawing.DrawingDocument" ) Then
      Msgbox("The current document must be a Draw document", 0)
      exit sub
   end if
      
    oDocCtrl = oDoc.currentController    
   oDrawPage = oDocCtrl.currentPage
    oSelection = oDocCtrl.selection 
      
   'create url for storing
   Dim origUrl as String
   Dim exportUrl as new com.sun.star.util.URL
   'Dim cUrl as new com.sun.star.util.URL
   'origUrl = theDoc.url
   
   cFile = "C:\Temp\test.eps"
   cUrl = ConvertToURL( cFile ) 
     
   ' Create the export filter.
    ' A GraphicExportFilter uses a page, shape or collection of shapes as 
source.
    theExporter = createUnoService( "com.sun.star.drawing.GraphicExportFilter" )
    
  
    ' Export selection if something is selected, otherwise whole page.
    if not isEmpty(oSelection) then
      theExporter.SetSourceDocument(oSelection)
    else
      theExporter.SetSourceDocument(oDrawPage)
    endif
 
    ' Set the filter data
    Dim aFilterData(5) as new com.sun.star.beans.PropertyValue
    aFilterData(0).Name = "Level" '1=PS level 1, 2=PS level 2
    aFilterData(0).Value = 2
    aFilterData(1).Name = "ColorFormat" '1=color, 2=grayscale
    aFilterData(1).Value = 2
    aFilterData(2).Name = "TextMode" '0=glyph outlines, 1=no glyph outlines, see
ooo bug 7918
    aFilterData(2).Value = 1
    aFilterData(3).Name = "Preview" '0=none,1=TIFF,2=EPSI,3=TIFF+EPSI
    aFilterData(3).Value = 0
    aFilterData(4).Name = "CompressionMode" ' 1=LZW, 2=none
    aFilterData(4).Value = 2
    Dim aArgs (2) as new com.sun.star.beans.PropertyValue
    aArgs(0).Name = "MediaType"
    aArgs(0).Value = "application/postscript"
   ' aArgs(0).Value = "image/png"
    aArgs(1).Name = "URL"
    aArgs(1).Value = cUrl
    aArgs(2).Name = "FilterData"
    aArgs(2).Value = aFilterData()
    theExporter.filter(aArgs())
 
    MsgBox("exported to " + cFile, 0)

End Sub

---------------------------------------------------------------------
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to