https://issues.apache.org/ooo/show_bug.cgi?id=121982
Bug ID: 121982
Issue Type: DEFECT
Summary: Loading with "private:stream" ignores filter settings
on the media descriptor
Classification: Code
Product: General
Version: AOO 3.4.0
Hardware: All
OS: All
Status: CONFIRMED
Severity: normal
Priority: P3
Component: scripting
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Loading a component using the URL "private:stream" seems to ignore the
"FilterName", and loads always as plain text in Writer.
Example code:
REM ***** BASIC *****
Option Explicit
Sub Main
Dim sContent$
sContent = "<?xml version=""1.0"" encoding=""UTF-8""?>" + Chr(13) + _
"<svg xmlns=""http://www.w3.org/2000/svg"" version=""1.1"">" + Chr(13) + _
"<circle cx=""100"" cy=""50"" r=""40"" stroke=""black"" stroke-width=""2""
fill=""red"" />" + Chr(13) + _
"</svg>"
Dim nLen%
nLen = Len(sContent)
Dim aBytes%(nLen-1)
Dim n%
For n = 0 To nLen-1
aBytes(n) = Asc(Mid(sContent,n+1,1))
Next
Dim oTempFile as Object
oTempFile = CreateUnoService("com.sun.star.io.TempFile")
Dim oOut as Object
oOut = oTempFile.getOutputStream()
oOut.writeBytes(aBytes)
oOut.flush()
oOut.closeOutput()
Dim oIn as Object
oIn = oTempFile.getInputStream()
Dim oMediaDesc(1) as new com.sun.star.beans.PropertyValue
oMediaDesc(0).Name = "InputStream"
oMediaDesc(0).Value = oIn
oMediaDesc(1).Name = "FilterName"
oMediaDesc(1).Value = "SVG - Scalable Vector Graphics"
Dim oDoc
oDoc = StarDesktop.loadComponentFromURL("private:stream","_blank",0,oMediaDesc)
End Sub
--
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.