You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openoffice.apache.org by Armin Le Grand <Ar...@me.com> on 2012/05/20 13:37:04 UTC

Re: about openoffice support on SVG ?

Hi jianlizhao,

jianlizhao <ji...@hotmail.com> wrote:
> Hello my friend,
> 
> I ask you some question as below:
> 1) source code with support for SVG code, What programming language is used?

It's C++.


> IS   C + + or JAVA?
> 2) In order to support SVG features, which files additions and modifications
> to those source code?

The code is in the main/svgio module, I wrote it. What do you want to do?
Maybe I can help you or just support your needs. Have you read the blog
entry on it
(https://blogs.apache.org/OOo/entry/native_svg_support_for_apache), it
explains some basic principles about it and how it is added to the office
processing (primitive usage).

> Thanks...
> 
>  Best Regards!

Sincerely,
	Armin
-- 
ALG


Re: 答复: about openoffice support on SVG ?

Posted by Regina Henschel <rb...@t-online.de>.
Hi,

jianlizhao schrieb:
> Hi,Armin : thanks for you  replay.
>
> I often deal with the digital camera file, its file format is RAW
> format, I would like to develop an addon in the openoffice's write ,
> through the addon  import RAW files.
>
> Import new pictures to openoffice's write,  the same as Svg import.
>
> I see you develop SVG, no change openoffice's file format, and to
> maintain the compatibility of the before and after, this realization
> of the idea of ​​a good.
>
> I work on the C++ program development in Windows platform about 10
> years, but not familiar with the openoffice extension development.
> Therefore, I need your help.
>
> Can you give me an addon examples code that the following functions
>

If you will work on extensions, you should download and install the 
Software Development Kit (SDK). Or have you already done it?
http://www.openoffice.org/download/other.html

The SDK provides you with the Developer Guide, the API and other 
references and some examples.

Kind regards
Regina

答复: about openoffice support on SVG ?

Posted by jianlizhao <ji...@hotmail.com>.
Hi,Armin :
thanks for you  replay.

I often deal with the digital camera file, its file format is RAW format,
I would like to develop an addon in the openoffice's write , through the addon  import RAW files.

Import new pictures to openoffice's write,  the same as Svg import. 

I see you develop SVG, no change openoffice's file format, and to maintain the compatibility of the before and after, this realization of the idea of ​​a good.

I work on the C++ program development in Windows platform about 10 years, but not familiar with the openoffice extension development. Therefore, I need your help.

Can you give me an addon examples code that the following functions

1) Click on the menu, display a dialog box, a text input box and a button in the dialog box 
2) Click the button on the dialog box , display let users to select the RAW format files.

In this way, I only  consider the  program  procedure, rather than familiar with the addon framework.

     Look forward to your reply.
                                  Best Regards!
                                                 


-----邮件原件-----
发件人: Armin Le Grand [mailto:Armin.Le.Grand@me.com] 
发送时间: 2012年5月20日 19:37
收件人: ooo-dev@incubator.apache.org
主题: Re: about openoffice support on SVG ?

Hi jianlizhao,

jianlizhao <ji...@hotmail.com> wrote:
> Hello my friend,
> 
> I ask you some question as below:
> 1) source code with support for SVG code, What programming language is used?

It's C++.


> IS   C + + or JAVA?
> 2) In order to support SVG features, which files additions and modifications
> to those source code?

The code is in the main/svgio module, I wrote it. What do you want to do?
Maybe I can help you or just support your needs. Have you read the blog
entry on it
(https://blogs.apache.org/OOo/entry/native_svg_support_for_apache), it
explains some basic principles about it and how it is added to the office
processing (primitive usage).

> Thanks...
> 
>  Best Regards!

Sincerely,
	Armin
-- 
ALG



Re: about openoffice insert the picture?

Posted by Xia Zhao <li...@gmail.com>.
Hi Jian Li,

I am totally lost here, what you are asking and what you want to clean up?

Hope Ma's reply is helpful. I am QE lead for AOO 3.4 and hope continuous
working on this area. If something need clarify, you may find me by hotmail
if you want.

Best regards,

Lily

2012/5/21 jianlizhao <ji...@hotmail.com>

> Hello my friend,
> I ask you some question as below:
>
> 1) The code of insert the picture in which directory,
> 2) click menu->insert->picture->From file..., this process are related to
> those files?
> 3) bmp picture how way save to SwNoTxtNode
>
>    Best Regards!
>
>

about openoffice insert the picture?

Posted by jianlizhao <ji...@hotmail.com>.
Hello my friend,
I ask you some question as below:

1) The code of insert the picture in which directory,  
2) click menu->insert->picture->From file..., this process are related to
those files?
3) bmp picture how way save to SwNoTxtNode

    Best Regards!


Re: how Get Bitmap file from SVG module?

Posted by Armin Le Grand <Ar...@me.com>.
	Hi Eric,

On 24.05.2012 03:43, Yong Lin Ma wrote:
> Let me try to translate the message below.

Thanks, that helped. Ansering below...

> Hi Armin,
> I see two interfaces XSVGPrinter and XSVGWriter in svg mdoule
>
> Could they be used for graphic in Bitmap format?

No.

> For function extractFromGraphic in svgimagenode
>
> void extractFromGraphic (
>              const Graphic&  rGraphic
>              drawinglayer :: primitive2d :: Primitive2DSequence&  rEmbedded,
>              basegfx :: B2DRange&  rViewBox,
>              BitmapEx&  rBitmapEx)
>
> What is parameter rBitmapEx work for?

This is a helper method in module svxio. It is not exported from the 
svgio module to make that clear. It should not be called directly and 
may change in the future.

Instead, use the classes Graphic and GraphicObject and work with the 
SvgData class used there if you want to do something in the environment 
of the office core code.

 From outside you may use the service XSvgParser to convert from 
io::XInputStream to uno::Sequence< uno::Reference< 
::graphic::XPrimitive2D > > (the imported primitive representation of 
the SVG). Then use the service XPrimitive2DRenderer to convert such a 
primitive to a rendering::XBitmap. Grep the code to find usage examples.

HTH!

> On Wed, May 23, 2012 at 5:06 PM, jianlizhao<ji...@hotmail.com>  wrote:
>> Hi Armin:
>> I ask you some question as below:
>> In  module svg, have two Interfaces, one is  XSVGPrinter, the other is
>> XSVGWriter.
>>
>> 1) Can I use these interfaces, output Bitmap file?
>>
>> 2) under the module svg, in the file of svgimagenode.cxx,
>>
>> void extractFromGraphic (
>>             const Graphic&  rGraphic
>>             drawinglayer :: primitive2d :: Primitive2DSequence&  rEmbedded,
>>             basegfx :: B2DRange&  rViewBox,
>>             BitmapEx&  rBitmapEx)
>>
>> is the  parameters rBitmapEx get Bitmap file?
>>
>> Thanks...
>> Best Regards!
>>
>



Re: how Get Bitmap file from SVG module?

Posted by Yong Lin Ma <ma...@apache.org>.
Let me try to translate the message below.

Hi Armin,
I see two interfaces XSVGPrinter and XSVGWriter in svg mdoule

Could they be used for graphic in Bitmap format?

For function extractFromGraphic in svgimagenode

void extractFromGraphic (
            const Graphic & rGraphic
            drawinglayer :: primitive2d :: Primitive2DSequence & rEmbedded,
            basegfx :: B2DRange & rViewBox,
            BitmapEx & rBitmapEx)

What is parameter rBitmapEx work for?

On Wed, May 23, 2012 at 5:06 PM, jianlizhao <ji...@hotmail.com> wrote:
> Hi Armin:
> I ask you some question as below:
> In  module svg, have two Interfaces, one is  XSVGPrinter, the other is
> XSVGWriter.
>
> 1) Can I use these interfaces, output Bitmap file?
>
> 2) under the module svg, in the file of svgimagenode.cxx,
>
> void extractFromGraphic (
>            const Graphic & rGraphic
>            drawinglayer :: primitive2d :: Primitive2DSequence & rEmbedded,
>            basegfx :: B2DRange & rViewBox,
>            BitmapEx & rBitmapEx)
>
> is the  parameters rBitmapEx get Bitmap file?
>
> Thanks...
> Best Regards!
>

Re: how Get Bitmap file from SVG module?

Posted by Regina Henschel <rb...@t-online.de>.
Hi jianlizhao,

it is still not clear to me, what you want to do:

Do you want to write macros or extensions and need help to use the API?

or

Do you want to work on the core itself. If it is this, what do you want 
to do? What feature do you want to implement or what bug do you want to fix?

jianlizhao schrieb:
> Hi Armin:
> I ask you some question as below:
> In  module svg, have two Interfaces, one is  XSVGPrinter, the other is
> XSVGWriter.
>
> 1) Can I use these interfaces, output Bitmap file?

If you will use the API the interface XGraphicRasterizer seems to be the 
correct one.

>
> 2) under the module svg, in the file of svgimagenode.cxx,
>
> void extractFromGraphic (
>              const Graphic&  rGraphic
>              drawinglayer :: primitive2d :: Primitive2DSequence&  rEmbedded,
>              basegfx :: B2DRange&  rViewBox,
>              BitmapEx&  rBitmapEx)
>
> is the  parameters rBitmapEx get Bitmap file?

As far as I understand it, you have to use methode getDecomposition from 
XSvgParser and then method rasterize from XPrimitve2DRenderer. But Armin 
can surely tell it, he had implemented it ;)

Kind regards
Regina

Re: how Get Bitmap file from SVG module?

Posted by Armin Le Grand <Ar...@me.com>.
	Hi jianlizhao,

On 23.05.2012 11:06, jianlizhao wrote:
> Hi Armin:
> I ask you some question as below:
> In  module svg, have two Interfaces, one is  XSVGPrinter, the other is
> XSVGWriter.

Both are interfaces, XSVGPrinter is not used at all and XSVGWriter is 
the current SVG export which has nothing to do with the new import. 
There also is no module svg, the module I added for the new SVG import 
is svgio.

> 1) Can I use these interfaces, output Bitmap file?

No.

> 2) under the module svg, in the file of svgimagenode.cxx,
>
> void extractFromGraphic (
>              const Graphic&  rGraphic
>              drawinglayer :: primitive2d :: Primitive2DSequence&  rEmbedded,
>              basegfx :: B2DRange&  rViewBox,
>              BitmapEx&  rBitmapEx)
>
> is the  parameters rBitmapEx get Bitmap file?

I am not sure what you want to do. To work with imported SVGs you need a 
Graphic (see vcl and GraphicObject, too) where it is loaded. From 
Graphic you may try

     const SvgDataPtr& getSvgData() const;

If getSvgData().is() there is a SVG graphic. At the contained SvgData 
you can use

     const BitmapEx& getReplacement() const;

to get the BitmapEx of the SVG. There is no need to work with stuff from 
svgio directly. All usages work with it are using the service XSvgParser 
and do the work for you, where XSvgParser is implemented in svgio.

I still do not understand what you want to do, please explain this, else 
I cannot really help you.

> Thanks...
> Best Regards!
>
>

Sincerely,
	Armin
--
ALG


how Get Bitmap file from SVG module?

Posted by jianlizhao <ji...@hotmail.com>.
Hi Armin:
I ask you some question as below:
In  module svg, have two Interfaces, one is  XSVGPrinter, the other is
XSVGWriter.

1) Can I use these interfaces, output Bitmap file?

2) under the module svg, in the file of svgimagenode.cxx,

void extractFromGraphic (
            const Graphic & rGraphic
            drawinglayer :: primitive2d :: Primitive2DSequence & rEmbedded,
            basegfx :: B2DRange & rViewBox,
            BitmapEx & rBitmapEx)

is the  parameters rBitmapEx get Bitmap file?

Thanks...
Best Regards!


Re: about openoffice insert the picture?

Posted by Yong Lin Ma <ma...@gmail.com>.
Jianli,
I barely know what you are talking about. I think you are asking how
"insert a picture into a
writer document" works. Which function is involved in this process and
some details like
how the data model will be updated.

There are many ways you can find this out. My suggestions is
1, Make a debug build
2, New a writer document in AOO
3, Pop up the "Inster picture from file" dialog
4, Pause it within debuger and take a look at the stacks. Then you can
start from there.

And JianLi, it would be more effective if you can find someone review
your message
before post it here. No one can help you, if they don't understand your post.



On Tue, May 22, 2012 at 4:41 AM, jianlizhao <ji...@hotmail.com> wrote:
> Hello  ,
> I ask some question as below:
>
> 1) The code of insert the picture in which directory,
> 2) On the main menu, select Insert > Picture > From File ..., this process
> are related to those files?
> 3) bmp picture how way save to SwNoTxtNode
>
>    Best Regards!
>



-- 
Regards

Erik Ma

about openoffice insert the picture?

Posted by jianlizhao <ji...@hotmail.com>.
Hello  ,
I ask some question as below:

1) The code of insert the picture in which directory,  
2) On the main menu, select Insert > Picture > From File ..., this process
are related to those files?
3) bmp picture how way save to SwNoTxtNode

    Best Regards!