Re: [dba-dev] How to store formated text in OO base

2008-08-29 Thread Marc Santhoff
Am Donnerstag, den 28.08.2008, 18:39 +0200 schrieb Fernand Vanrie:
 Marc Santhoff wrote:
  Am Montag, den 25.08.2008, 16:47 +0200 schrieb Fernand Vanrie:

  don't know if this is shorter, but as I said you can store your 
  OO_source.odf into a stream and then read/write a blob field of your 
  database.

  OK, I was concerned about the size of the blob's  i will test it and 
  comback with the results and nobody seems to now ( on the forum at 
  least) how to get the stored binary data out of a database field  !!
  
 
  I think this could be caused by:
 
  http://extensions.openoffice.org/issues/show_bug.cgi?id=83449
 
  I don't know if the forum message is old enough, but nowadays (2.4.x)

 Thanks i hope it will been properly documented somwhere
 
 so no longer need off private:stream argument ?
 
 and
 
 'args1(2).Name = DocumentBaseURL
 'args1(2).Value = file:///h:/test.html
 
 is of no uses ?

See the macro attached to the issue, it has any answers needed.

  But there is still a problem with this styreams, Just the Retrieving of 
 a stream from a medium complex writerdoc  (2 pages) takes over 20 
 seconds from a OO-database doc!!
 
 Storing the stream (after a time consuming loading from the datbase) to 
 a tmpURL is  prety fast but very space consuming on the database site

Did you use a file on disk for streaming *to* the database? If you
managed to get anything else working I'd be keen to see some code. ;)

 I stay with my RTF or even HTML coded strings, far more simple more 
 speedy , and very economic in space :-)

Seems to be [a|the] sensible solution currently.

Regards,
Marc



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



Re: [dba-dev] How to store formated text in OO base

2008-08-29 Thread Fernand Vanrie

Hi marc,
Marc Santhoff wrote:

Am Donnerstag, den 28.08.2008, 18:39 +0200 schrieb Fernand Vanrie:
  

Marc Santhoff wrote:


Am Montag, den 25.08.2008, 16:47 +0200 schrieb Fernand Vanrie:
  
  
don't know if this is shorter, but as I said you can store your 
OO_source.odf into a stream and then read/write a blob field of your 
database.
  
  
OK, I was concerned about the size of the blob's  i will test it and 
comback with the results and nobody seems to now ( on the forum at 
least) how to get the stored binary data out of a database field  !!



I think this could be caused by:

http://extensions.openoffice.org/issues/show_bug.cgi?id=83449

I don't know if the forum message is old enough, but nowadays (2.4.x)
  
  

Thanks i hope it will been properly documented somwhere

so no longer need off private:stream argument ?

and

'args1(2).Name = DocumentBaseURL
'args1(2).Value = file:///h:/test.html

is of no uses ?



See the macro attached to the issue, it has any answers needed.

  
 But there is still a problem with this styreams, Just the Retrieving of 
a stream from a medium complex writerdoc  (2 pages) takes over 20 
seconds from a OO-database doc!!


Storing the stream (after a time consuming loading from the datbase) to 
a tmpURL is  prety fast but very space consuming on the database site



Did you use a file on disk for streaming *to* the database? If you
  
Yep, i isolate the needed textportion, put in a hidden doc , save and 
load the stream from the newly saved doc file.
This is acetable slowly, but retrieving the stored steream from the 
datbase is the most time consuming thing !
As i am not a prof coder , i looked around for getting a stream out off 
the clipboard or out off a Xtransferable object but no luckso far

For iamges we can get a stream from the internal storage
oPictures.getByName(mFiles(j)).getInputStream())

and then to store them directly in a doc i found this code :

 REM Author: Stephan Wunderlich. Two lines added by ms777 and completed 
by  Fernand

Dim oShape
Dim oProvider  'GraphicProvider service.
 oShape = oDoc.createInstance(com.sun.star.drawing.GraphicObjectShape)
oGraphic = oDoc.createInstance(com.sun.star.text.GraphicObject)
oDoc.getDrawPage().add(oShape)
oProvider = createUnoService(com.sun.star.graphic.GraphicProvider)
Dim oProps(0) as new com.sun.star.beans.PropertyValue
oProps(0).Name  = InputStream
oProps(0).Value =  oStream
' oProps(0).Name  = URL
' oProps(0).Value = sGraphicURL
oShape.Graphic = oProvider.queryGraphic(oProps())
oGraphic.GraphicUrl = oShape.GraphicUrl
' Insert at the current cursor location
oDOc.text.insertTextContent(oDoc.getCurrentController().getViewCursor(), 
oGraphic, false)



Maybe there is a more clever brain around who can get a stream out off 
the clibboard o a Xtranferable object ??


Thanks for your interest in this problem

Fernand

managed to get anything else working I'd be keen to see some code. ;)

  
I stay with my RTF or even HTML coded strings, far more simple more 
speedy , and very economic in space :-)



Seems to be [a|the] sensible solution currently.

Regards,
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]