#5 Build frames around cells and group of cells

Solution available
closed
nobody
ooRexx (4)
5
2012-10-15
2012-10-13
JM Buisson
No

Hello,

I would like to build some frames around cells and group of cells, but the proc I wrote gives some strange results. Either the documentation is not complete or I did not understant the short epxlanations I found in it.
I give you a zip with 4 files
1 - TestFrame.rex is the procedure itself
2 - StaffCalc.cls is a little class to avoid typing huge commands
3 - TestFrameTarget.odt the spreadsheet I would like to get as result
4 - TestFrameResult.odt the spredshheet I get which is a bit different of the prvious one
The main question is
When I draw a border line as topline for instance, the other lines of a cell such as left, right, bottom disapear ?
I have created a macro to see what statements have been used to create the TestFrameTarget sheet, and I have seen that the TableBorder struture had been used. I ccould do the same, but I did'nt see any interface to work with this structure easyly.
Could you help me please ?

Thanks in advance

Configuration : window xp sp3, libreoffice 3.6.2, java 1.7.0, bsf4oorexx last version..

Rony, my first sheet Detail has been translated successfully from Excel to LibreOffice.

Discussion

  • JM Buisson

    JM Buisson - 2012-10-13

    Included in problem description

     
  • Nobody/Anonymous

    Hmm, good questions! :)

    It seems, after looking at it, that it has to do with the LO UNO programming model. It looks like defining new borders may influence the borders of the neighboring cells. Unforutunately, I have no expertise in this particular area of scalc, :( !

    Looking around, it seems that setting border (inner and outer) styles is something that is very powerful/elaborate.

    One idea to find the information you need to achieve what you want might be to look throught Andrew Pitonyak's "OpenOffice Macros Explained" which is very good in many respects, especially explaining the OOo programming concepts. Here is a URL where you can directly download (it seems to be an updated, current version of which he might create a book as in the past)::<www.pitonyak.org/OOME_3_0.odt>. Although the book is about OOo/LO Basic, you should be able to transfer the knowledge to BSF4ooRexx. [You may also look-up Andrew's homepage and follow his link to OOo as he has even more information there!]

    Maybe it is just a conceptual link that is missing to solve your problem, so just look through Andrew's book above!

    One request: if you find a solution, then please add it as a comment to this support request, such that maybe others can later draw on your expertise, o.k.?

    Also, if there are BSF4ooRexx/UNO.CLS questions (in this conetxt or another one), then please ask!

     
  • Rony G. Flatscher

    Sorry, if you know these links to the OOo documentation already, which may contain information that is helpful or links to the forum where you could ask specific OOo UNO programming questions: <http://wiki.openoffice.org/wiki/Documentation/DevGuide>.

    There, after navigation to Spreadsheets (http://wiki.openoffice.org/wiki/MediaWiki:Collections/Developer%27s_Guide_-_Spreadsheet_Documents), you can find an entry for "Formatting" which leads a series of pages about formatting cells that might be helpful as well, like starting out at: <http://wiki.openoffice.org/wiki/Documentation/DevGuide/Spreadsheets/Formatting>. Note on that page the layout of the section in the box on the right upper side with links for navigation!

    HTH in addition to Andrew's resource mentioned in my previous comment! ---rony

     
  • JM Buisson

    JM Buisson - 2012-10-15

    Problem solution

     
  • JM Buisson

    JM Buisson - 2012-10-15
    • status: open --> closed
     
  • JM Buisson

    JM Buisson - 2012-10-15

    Hello,

    Thanks for prompt answers, but none gave me the solution (even Andrew's book). Each example is related to BorderLine only which not solves my request.
    Finally I found the solution whith the Example_13 of Burger which aalso uses the BorderLine but in different manner than the other examples.
    From this I can use the TableBorder, this structure is exactly what I research.
    So I attach a new zip file with 2 files
    1 - New version of StaffCalc (Attribute and method)
    2 - The new version of my procedure using the new method

    This method (setTableBorder) can be improved to be able for instance to define several size for the same range of cells. Define new method to generate BorderLine as request.
    I will try to add some staff as one goeq along my translations from Excel to LibreOffice.

    Regards

     
  • Rony G. Flatscher

    Bonsoir Jean-Louis,

    thank you very much for supplying your solution! (Trying to create a new entry in "response" to hint others that a solution to this problem has become available; not sure whether this is what turns out.)

    As you are translating/migrating Excel sheets to scalc, would you mind sharing them in the process? If so, one possibility might be to include your scripts to a future version of BSF4ooRexx or setup a Wiki on Sourceforge, if you are interested in this and have time for it.

    In any case, thank you very much again and good luck with your next migration projects!

    ---rony

     
  • Rony G. Flatscher

    Someone has solved this support request. A zip-archive containing the solution may be available.

     
  • Rony G. Flatscher

    • milestone: --> Solution available