Hi Deborah,

Deborah Digges schrieb:
Hi Regina,

I looked through the documentation you sent me, but I wasn't able to figure
out where exactly to start. Could you please help me out?

The code is indeed huge. But you can mimic the solutions you see for rectangles and ellipses. And therefore you should look how it is done for them.

You get an overview of the code in https://wiki.openoffice.org/wiki/Source_code_directories. It is not up-to-date, but in most parts are still valid. The sister project LibreOffice has some similar information in http://docs.libreoffice.org/ Although they made some changes in the structure most parts are still the same as in Apache OpenOffice.

Besides searching in your local copy of the code you can use OpenGrok
http://opengrok.adfinis-sygroup.org
Very useful is the 'File Path' field to restrict the search. You can enter a part of a path or you can exclude some paths from the search with a NOT before it.

===========

Such new feature has several aspects, some are necessary, some are not needed in the beginning.

Necessary:
Read it from file.
Keep the information.
Write the information back to file.

Next step would be to show the shape on screen.

I'm not sure whether parts of the API are needed in the beginning.

Not necessary in the beginning:
- Making an UI to generate the shape. For example OpenOffice has no UI to generate a custom shape. To test a new shape you can always easily write it into the file manually, using an editor.
- Having an import and export filter to foreign formats like pptx.
- Implementing the API for using the shape in macros (not sure, see above).

===========

Reading and writing to file is done in code part 'xmloff'. Most methods there are generic and will do the right things automatically. You will find some specific parts in e.g. classes SdXML..ShapeContext.

Shapes are implemented as "Primitive". Such primitive can decompose itself into polylines, which can be drawn directly. Please look, how it is done for rectangle and ellipse in modul svx, e.g in main/svx/inc/svx/sdr/primitive2d and main/svx/source/sdr/primitive2d/.

The lower parts of this decomposition is done in module basegfx, e.g. in b2dpolygontools.cxx Shapes are defined as Unitshapes and scaled to the desired size by using a transformation. There you will actually define the outline of the shape. Do you know the involved mathematics?

The shape related classes are organized hierarchical. This hierarchy determines, where an attribute is introduced. Find a diagram in http://docs.libreoffice.org/svx/html/classSdrObject.html Or look at http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/svx/inc/svx/svdobj.hxx?view=markup around line 285. [The branch aw080 contains ongoing improvement work in Draw, for example change from integer to double and change to always use transformation matrices. The owner of this branch is Armin, our Draw expert.]

I hope this will help you to find relevant parts.

Kind regards
Regina



On Sep 21, 2014 11:01 PM, "Regina Henschel" <rb.hensc...@t-online.de> wrote:

Hi Deborah,

Deborah Digges schrieb:

Hi Regina,

I am very much interested in this task . I'd love to go over the details
with you, at your convenience. I'm not exactly sure what this means, but
it
sounds really interesting! I've started reading the chapter on the docs.

I'll reach out to you with questions as I get them :)


We will surely help you if necessary.

Do you have made any progress? For example identify the areas where work
is needed in the code? Do you have already an idea where to start?

Kind regards
Regina



Thanks,
Deborah



On Fri, Sep 12, 2014 at 6:20 PM, Regina Henschel <rb.hensc...@t-online.de

wrote:

  Hi Deborah,

Deborah Digges schrieb:

  I'll get in touch with the QA team right away. Thanks for all your help.
I've uploaded the patches and set the appropriate flags for review
request,  as indicated by Regina Henschel :)
If there are any more such issues, I'd be glad to work on them,to
familiarize myself with the whole process. Meanwhile,  I'll scout for
issues on bugzilla.


I think you can start a larger project. Here is my proposal: Implement a
regular polygon. The request [1] is very old. In the meantime we have got
ODF1.2 specification [2] which defines the element
<draw:regular-polygon>.
The shape belongs to the primitive shapes, same as <draw:rect> or
<draw:circle> or <draw:ellipse>. To see such shape, you can use the
application Karbon from the Calligra suite and therein the shape "Star".
Calligra should be available from your Linux distributor.

Apache OpenOffice has not yet implemented this kind of shape. Are you
interested in this task? If yes, we can speak about details.

Kind regards
Regina

[1] https://issues.apache.org/ooo/show_bug.cgi?id=18381
[2] http://docs.oasis-open.org/office/v1.2/os/OpenDocument-
v1.2-os-part1.html chapter 10.3.6<draw:regular-polygon>


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@openoffice.apache.org
For additional commands, e-mail: dev-h...@openoffice.apache.org





---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@openoffice.apache.org
For additional commands, e-mail: dev-h...@openoffice.apache.org





---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@openoffice.apache.org
For additional commands, e-mail: dev-h...@openoffice.apache.org

Reply via email to