Am Montag, den 10.04.2006, 06:36 -0700 schrieb Kent Gibson:
> wow, so to write an unpacked format I will have to
> write an export and import filter, or use the UCP?
> Seems like overkill? 

You are already using UCB/P, storing a document makes use of a
"com.sun.star.ucb.FileContentProvider" as I understand it.

> Did you do something similiar
> with  UCP? I looked at the demo code and it seems to
> like file urls, and my "document" is in memory, so I
> wonder if the UCP will work for me. I wonder why the
> "Unpacked " parameters is there.

Because it works with most precanned UCPs (file, WebDAV, ftp, hirarchy,
zip/jar). ;)

> Thanks for the help. If you have some snippets doing
> something similiar to what I want that would be grand.

No, I haven't. Sorry.

> The truth is that I am just trying to squeeze some
> performance, and this might not even work. I am
> rendering a document which takes a minute and then 2
> minutes to presumably compress (loads of redundant
> data). 

If you can stand losing macros embedded in documents there's a chance
that making a flat xsl filter work. Most common stuff is this:

<?xml version="1.0" encoding="ISO-8859-1"?>

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
version="1.0">
        <xsl:output method="xml" encoding="UTF-8"/>
        <xsl:template match="/">
                <xsl:copy-of select="/" />
        </xsl:template>

</xsl:stylesheet>

You can register it for writing and reading (Menu: Tools - XML Filter
Settings) and then use "save as" to select it in the type combo box. At
least for testing the performance advantage it may be helpful.

Have you tried saving uncompressed to an ordinary file system? This
would be easy, somthing like (BASIC, written from memory):

<snip>
fname = "/where/you/like/yourdoc"

dim Args(2) as new com.sun.star.beans.PropertyValue
' not sure atm if it's necessary for standard format ...
' args(2).Name = "FilterName"
' args(2).Value = "OpenOffice.org 1.0 Text Document"
args(1).Name = "Overwrite"
args(1).Value = TRUE
args(0).Name = "Unpacked"
args(0).Value = TRUE
doc.storeAsUrl(ConvertToUrl(fname), args())
' or storeToUrl for making a copy like when exporting

This will create a folder hirarchy like the one in the zip but
uncompressed an "unarchived". The last name component (yourdoc) is the
base folder.

HTH,
Marc
-- 
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?

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

Reply via email to