Hi Marc,

the xmlcontent is what it says it is :). 
It's simply a string automatically put together in another function
that builds up a simple xml structure.

But as you're dealing with objectoutput and not textoutput you
wouldn't write strings into your file but dump actual OpenOffice
objects into it.

Best Regards
Christian Junker

On Fri, 04 Feb 2005 02:44:08 +0100, Marc Santhoff
<[EMAIL PROTECTED]> wrote:
> Am Fr, den 04.02.2005 schrieb Christian Junker um 01:21:
> > Hi Marc, yes that is possible.
> 
> Hi Christian,
> 
> wow, that loks promising, thank you.
> 
> Although it'll take some time for me to understand and adapt to my
> needs, there's one question left at once, see inline:
> 
> > I will give you some code that will show you how to deal with xml
> > outputstreams (it's actually pretty similiar to Java's API):
> > <snip>
> >  fileAccessService = createUnoService("com.sun.star.ucb.SimpleFileAccess")
> >  textOutputStream = createUnoService("com.sun.star.io.TextOutputStream")
> >
> >  If fileAccessService.exists(SaveFileName) Then
> >       If fileAccessService.isReadOnly(SaveFileName) Then
> >               IOStreamXML = -2
> >               Exit Function
> >       End If
> >  End If
> >  'now open the file..
> >  outputStream = fileAccessService.openFileWrite(SaveFileName)
> >
> >  outputStream.truncate()
> >  textOutputStream.setOutputStream(outputStream)
> >  textOutputStream.writeString(xmlcontent)
> 
> What type of thing is this "xmlcontent"? That's the missing link to the
> documents content, I think. :)
> 
> >  'Close the Xml File, no writing possible anymore
> >  textOutputStream.closeOutput()
> >        'msgbox "xml saved under: " & SaveFilename '[dbg]
> > </snip>
> >
> > Don't worry about the If statements and what is happening in there,
> > because I took this code fragment out of a bigger macro that I have
> > written.
> > You can see that I use the [...]io.TextOutputStream, you would need to
> > apply the [...].io.ObjectOutputStream service of course.
> >
> > I hope that the code is enough to give you the start. The IDL
> > reference, the Developer's Guide - and in case you need advanced
> > information about data sinks etc. the udk project page - should give
> > you enough information to write a good working implementation.
> >
> > Hope this helps in some way.
> >
> > Best Regards
> > Christian Junker
> >
> > On Thu, 03 Feb 2005 16:01:25 +0100, Marc Santhoff
> > <[EMAIL PROTECTED]> wrote:
> > > Hi,
> > >
> > > is there any chance of storing arbitrary writer text snippets (mostly
> > > TextRange ojects) into an OutputStream (or to a TextOutputStream
> > > represented as XML)?
> > >
> > > Think of autotexts that are streamed away instead of being stored in any
> > > container file while not losing formatting ...
> > >
> > > TIA,
> > > Marc
> > >
> > > ---------------------------------------------------------------------
> > > 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]
> >
> >
> 
> ---------------------------------------------------------------------
> 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