[ooo-build] Fw: Re: Go-oo Uno Filter Name Query

vnaresh prasad vnareshprasad123 at yahoo.com
Thu Feb 25 03:20:35 PST 2010


Hi ,
                     Thanks for your reply.
But i was not able to make it for the conversions doc, docx, pptx, xslx .The steps i followed here are described here 
1. Installed GoOo-3.2-10.exe in C:\Program Files
2. Referred  C:\Program Files\OpenOffice.org 3\Basis\share\registry\modules\org\openoffice\TypeDetection\Filter   .xcu files .

3. Reference added got from intalled path of  sdk\cli of   GoOo-SDK-3.2-12.exe
cli_basetypes.dll
cli_cppuhelper.dll
cli_oootypes.dll
cli_ure.dll
cli_uretypes.dll

4. Imports  made for it are
Imports unoidl.com.sun.star.frame
Imports System.Runtime.InteropServices
Imports uno
Imports System.Net.Sockets
Imports
 unoidl.com.sun.star.lang
Imports unoidl.com.sun.star.bridge

5. Established connection to the Uno using Bootstrap.bootstrap  

6. I give here a piece of code which worked for me in VB.Net . which sets PropertyValue() for the file types.

 Case ".txt"
                Dim saveProps As unoidl.com.sun.star.beans.PropertyValue() = New unoidl.com.sun.star.beans.PropertyValue(1) {}
                saveProps(0) = New unoidl.com.sun.star.beans.PropertyValue()
                saveProps(1) = New unoidl.com.sun.star.beans.PropertyValue()
                saveProps(0).Name =
 "FilterName"
                saveProps(0).Value = New Any("Text (encoded)")
                saveProps(1).Name = "FilterOptions"
                saveProps(1).Value = New Any("utf8")
                Return saveProps
           
 Case ".rtf"
                Dim saveProps As unoidl.com.sun.star.beans.PropertyValue() = New unoidl.com.sun.star.beans.PropertyValue(0) {}
                saveProps(0) = New
 unoidl.com.sun.star.beans.PropertyValue()
                saveProps(0).Name = "FilterName"
                saveProps(0).Value = New Any("Rich Text Format")
                Return saveProps
           
 Case ".pdf"
                Dim saveProps As unoidl.com.sun.star.beans.PropertyValue() = New unoidl.com.sun.star.beans.PropertyValue(0) {}
                saveProps(0) = New unoidl.com.sun.star.beans.PropertyValue()
               
 saveProps(0).Name = "FilterName"
                saveProps(0).Value = New Any("writer_pdf_Export")
                Return saveProps

DirectCast(xComponent, XStorable).storeToURL(" filepath", saveProps) 
   
6.Similarly
i tried in the same way for doc, docx, xlsx, pptx  as it was in the
fcfg_writer_filters.xcu for doc and docx (from where i got it for txt,
rtf, pdf). 
fcfg_calc_filters.xcu for xlsx (from where it got it for csv, xls).


Case ".doc"
                Dim saveProps As unoidl.com.sun.star.beans.PropertyValue() = New unoidl.com.sun.star.beans.PropertyValue(0) {}
                saveProps(0) = New
 unoidl.com.sun.star.beans.PropertyValue()
                saveProps(0).Name = "FilterName"
                saveProps(0).Value = New Any("MS Word 97")
Case ".docx"
                Dim saveProps As unoidl.com.sun.star.beans.PropertyValue() = New unoidl.com.sun.star.beans.PropertyValue(0) {}
                saveProps(0) = New unoidl.com.sun.star.beans.PropertyValue()
                saveProps(0).Name = "FilterName"
                saveProps(0).Value = New Any("MS Word 2007 XML")

Case
 ".xlsx"
                Dim saveProps As unoidl.com.sun.star.beans.PropertyValue() = New unoidl.com.sun.star.beans.PropertyValue(0) {}
                saveProps(0) = New unoidl.com.sun.star.beans.PropertyValue()
                saveProps(0).Name = "FilterName"
                saveProps(0).Value = New Any("Calc MS Excel 2007 XML")

Case ".pptx"
                Dim saveProps As unoidl.com.sun.star.beans.PropertyValue() = New unoidl.com.sun.star.beans.PropertyValue(0) {}
               
 saveProps(0) = New unoidl.com.sun.star.beans.PropertyValue()
                saveProps(0).Name = "FilterName"
                saveProps(0).Value = New Any("MS PowerPoint 2007 XML")

These conversions throws exception at 
unoidl.com.sun.star.task.ErrorCodeIIOException
Source: mscorlib 

Server stack trace: 
Exception rethrown at [0]: 
   at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
   at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
   at unoidl.com.sun.star.frame.XStorable.storeToURL(String sURL, PropertyValue[] lArguments)


--- On Tue, 23/2/10, Petr Mladek <pmladek at suse.cz> wrote:

From: Petr Mladek <pmladek at suse.cz>
Subject: Re: [ooo-build] Go-oo Uno Filter Name Query
To: ooo-build at lists.freedesktop.org
Cc: "vnaresh prasad" <vnareshprasad123 at yahoo.com>
Date: Tuesday, 23 February, 2010, 3:36 PM

Hi Vnaresh,

On Monday 22 February 2010, vnaresh prasad wrote:
> Hi,
>    Im a Developer involved in an application which converts files from one
> format to other. using VB.Net in Windows 7 .Im using UNO service for this
> conversions . Im able to convert all formats such as "txt"
> ,"pdf","rtf","sxi" etc.. supported in OpenOffice and using
>
> com.sun.star.beans.PropertyValue
> for it. Which does not support doc,docx,xlsx,pptx. And so i migrated to
> Go-oo and all other conversions work for it.
> But was not able to get
 FilterName and FilterValue for the newly supported
> file formats
>
> 1. doc
> 2. docx
> 3. pptx
> 4. xlsx

I am not 100% sure what value you need. Anyway, I am sure that you will be 
able to find it in:

C:\Program Files\OpenOffice.org 
3\Basis\share\registry\modules\org\openoffice\TypeDetection\Types
and
C:\Program Files\OpenOffice.org 
3\Basis\share\registry\modules\org\openoffice\TypeDetection\Filter

For example, the docx type is defined in Types\fcfg_writer_types.xcu with the 
name "writer_MS_Word_2007". The corresponding filter is defined in 
Filters\fcfg_writer_filters.xcu with the name "MS Word 97".


-- 
Best Regards,

Petr Mladek
software developer
---------------------------------------------------------------------  
SUSE LINUX, s. r. o.                        e-mail: pmladek at suse.cz
Lihovarská 1060/12                          tel: +420 284 028 952
190 00 Prague 9                             fax: +420 284 028 951
Czech Republic                              http://www.suse.cz/
_______________________________________________
ooo-build mailing list
ooo-build at lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/ooo-build



      The INTERNET now has a personality. YOURS! See your Yahoo! Homepage. http://in.yahoo.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/ooo-build/attachments/20100225/989502c0/attachment-0001.html>


More information about the ooo-build mailing list