Issue 23479 - RTF Conversion with macro fails for certain documents
Summary: RTF Conversion with macro fails for certain documents
Status: CONFIRMED
Alias: None
Product: Writer
Classification: Application
Component: ui (show other issues)
Version: OOo 1.1
Hardware: PC Linux, all
: P3 Trivial (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-12-11 16:53 UTC by burgi
Modified: 2013-08-07 14:38 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description burgi 2003-12-11 16:53:04 UTC
RTF conversion by a macro fails (reproducable) for long documents while it works
with shorter documents.

This is the macro code:

Sub Main (FileName as string)

	On Error Goto ErrorHandler
	Dim Doc as Object
	Dim document as Object
	Dim Url as String
	Dim Dummy()
	Dim oCursor As Object


	'Save as HTML

	HTMLFileName = ReplaceFileAppendix(FileName, "html")

	Dim args1(1) as new com.sun.star.beans.PropertyValue
	args1(0).Name = "Overwrite"
	args1(0).Value = True
	args1(1).Name = "FilterName"
	args1(1).Value = "HTML (StarWriter)"
	Doc.storeAsURL("file://" + HTMLFileName, args1())


	'Save As RTF

	RTFFileName = ReplaceFileAppendix(FileName, "rtf")
	args1(1).Value = "Rich Text Format"
	Doc.storeAsURL("file://" + RTFFileName, args1())


	'Save As PDF

	PDFFileName = ReplaceFileAppendix(FileName, "pdf")
	Dim PDFargs1(1) as new com.sun.star.beans.PropertyValue
	PDFargs1(0).Name = "FilterName"
	PDFargs1(0).Value = "writer_pdf_Export"
	PDFargs1(1).Name = "CompressMode"
	PDFargs1(1).Value = 0
	Doc.storeToURL("file://" + PDFFileName, PDFargs1())


	Doc.dispose()

Exit Sub

ErrorHandler:
	Doc.dispose()

End Sub
Comment 1 jack.warchold 2003-12-15 11:21:33 UTC
set target to OOo later
Comment 2 h.ilter 2003-12-15 11:37:19 UTC
HI->JSK: Please take a look.
Comment 3 joerg.skottke 2004-04-30 09:08:01 UTC
Hi burgi,

can you determine at which instruction the conversion fails?
Additionally, the code is incomplete, it would make things easier for me if you
could include the function ReplaceFileAppendix( ... ).

Comment 4 Rob Weir 2013-07-30 02:16:53 UTC
Reset assignee on issues not touched by assignee in more than 2000 days.