[dev] Re: API to clone a row in a writer's table
Hi Peter, > Maybe the XTransferable interface is useful in this scenario. You'll > find examples googling this or the api list. thanks for the hint. I'm slowing acquiring the needed basis (yes I don't know java and it took me some time to understand the majority of examples that used queryInterface...). I almost finished but I still can't understand how to move the visible cursor to the correct position. What I do is: table.Rows.insertByIndex(index, count) cell = self.table.getCellByPosition(c, index+1) controller.select(cell) view_cursor.gotoStart(False) # retes position of cursor to beginning # of table view_cursor.gotoEnd(True) transferrable = controller.getTransferable() ... here I select the new cell and insert controller.insertTransferable(transferrable) this code fails in that the cell that gets selected is always 'A1' and not the cell at position (c, index+1). How can I set the cursor so that it encompasses the whole cell? thanks again sandro *:-) > > Hi Sandro > Am 03.01.2011 12:16, schrieb Sandro: > > Hi, > > > > I'm writing to the dev list after spending many days trying hard to > > understand the best way and asking in user lists and forums. > > > > I really hope someone can help me or point me in the correct > > direction/reading. > > > > I need to programmatically duplicate rows of a Table in openoffice writer. > > > > It's not difficult to add rows via table.Rows.insertByIndex(idx, count), > > that adds empty rows and it's easy to add text in that row assigning > > DataArray to the CellRange. Doing this way you loose control on the style of > > the cells and specifically if a cell has words with different style > > (bold/italic) they get flattened to the same face. What I need is to > > duplicate a row in a way that preserves the style of each word in the > > cell/row. > > > > As far as I understand using openoffice in headless mode prevents me > > from using dispatch as no ViewCursor should be available. > > > Regards > > Peter > - To unsubscribe, e-mail: dev-unsubscr...@openoffice.org For additional commands, e-mail: dev-h...@openoffice.org
[dev] Dev300m96 a two issues
With the start of m95 I noticed my page numbering doesn't work many more in writer and still continues into m96. Has this been noticed and flagged as a bug to be fixed? The next issue, starting way back to maybe m90 or m93, there is a long time delay showing the splash screen before any app (calc, writer, etc) starts. I tried turning the splash screen off (/opt/ooo-dev3/program/sofficerc) by changing Logo=1 to Logo=0. Is there any timer set for an opening delay, or is this just a debugging mode making it longer. Paul
Re: [dev] Re: [long] Integrate an extension in the code at buildtime : what do with bitmaps ?
Hi Christian, Le 3 janv. 11 à 20:58, Christian Lippka a écrit : Hi Eric, just to clearify. Do you still want to keep it as an extension or do you like to 'dissolve' the extensions functionality in native OOo code? I wanted to dissolve the extension functionnality in the code, and I discovered new ideas :) In fact, what I did was more "for the principle", a proof of concept, and the result is what I expected. If you are interested to know more, we could discuss about that on IRC ? Regards, Eric -- qɔᴉɹə Education Project: http://wiki.services.openoffice.org/wiki/Education_Project Projet OOo4Kids : http://wiki.ooo4kids.org/index.php/Main_Page L'association EducOOo : http://www.educoo.org Blog : http://eric.bachard.org/news
[dev] [SOLVED] Re: [dev] [long] Integrate an extension in the code at buildtime : what do with bitmaps ?
Hi Jürgen, Le 3 janv. 11 à 12:03, Jürgen Schmidt a écrit : Hi, mmh, if you want to use the extension as it is see http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/ Extensions/Packaging_Notes If you prefer to integrate the extension as a fix part of OOo you probably have to tweak a little bit more. That's what I did. More precisely, I But keep in mind that the configuration changed and we don't have the many xcu/xcs files anymore. They are combined in *.xcd files, for example brand.xcd Ah, yes, I'll have a look at the new scheme. Images are often provided in a zip container but also as single image files, In this case as single image files (was my need). The remaining problem would be how to address such an image from a config file. $(insturl) is expanded some where in the framework. It was the case + a bad path (yes, a typo ) I solved the problem using Bootstrap. More precisely : #if defined( OOo4Kids ) || defined( OOoLight ) OUString aConfigPath( RTL_CONSTASCII_USTRINGPARAM ("$OOO_BASE_DIR/share/config/") ); ::rtl::Bootstrap::expandMacros( aConfigPath ); And the expandMacros did it : the feature works now :-) It seems that we are missing a macro that can be used here and that can be expanded with the macro expander. Or maybe a special UCP like the one for extensions (using the the extension identifier). But this UCP don't work in this case. Yes, doing that, I discovered the UCP world, and I think I'll learn more in the future about this great idea. Sorry i have no real solution for you at the moment or at least i don't know one. Thanks anyway : I solved all the issues (the interation is done now), and I'm glad to see fast answers. Regards, Eric -- qɔᴉɹə Education Project: http://wiki.services.openoffice.org/wiki/Education_Project Projet OOo4Kids : http://wiki.ooo4kids.org/index.php/Main_Page L'association EducOOo : http://www.educoo.org Blog : http://eric.bachard.org/news
[dev] Re: [long] Integrate an extension in the code at buildtime : what do with bitmaps ?
Hi Eric, just to clearify. Do you still want to keep it as an extension or do you like to 'dissolve' the extensions functionality in native OOo code? Regards, Christian Am 03.01.2011 10:36, schrieb eric b: Hi, Happy New Year to all of you, and the best for 2011 ! :-) I'm currently working on integrate a nice and existing C++ extension, but directly in the code, means at buildtime. To summarize, if I integrate the lib (written in C++) in the scp2 .. and so on system, there is no problem at all, the packaging is ok and it works fine in the install set. In fact, everything works fine, but the icons are not seen, because simply not found :-/ To explain more, the first point is, after tracing a bit, that the "NormalFileName" property is used to retrieve the right bitmap (please correct me if I'm wrong). As example, looking at the original name, we have (in the .xcu) : bitmaps/Background.png And in the extension, it appears that the relative path is used, means the library is in : extension/random_name/libThing.${DLL_EXTENSION} ... while the .png are in : extension/random_name/bitmaps/*.png This happens to work ok, of course. Am I correct to suppose that the relative path is used, or did I miss something ? My tries now : using the other existing .xcu as example and trying to respect the schema ( .xcs file), I did the what follows: "$(insturl)/share/config/bitmaps/Background.png" ... and so on It does not work, but the idea is 1) put the library using those icons in $(insturl)/program (like all the other libs in fact ...) 2) use the path above to retrieve the icons. I must say I tested absolute and relative paths, without success. For example : xlink:href="$(insturl)/share/config/bitmaps/Background.png" or : xlink:href="../share/config/bitmaps/Background.png" Last, the documentation I have read is : http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/Extensions/Checklist_for_Writing_Extensions http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/Extensions/Example + a lot of .xcs / .xcu shipped in the OOO3.2.1 code base Feel free to ask me if I forgot some information, and thanks in advance for any help :-) Eric Bachard - To unsubscribe, e-mail: dev-unsubscr...@openoffice.org For additional commands, e-mail: dev-h...@openoffice.org
[dev] Quick Question
Hi Guys. Your product is far more superior than Microsoft Word in my book. I was wondering if there would be Android Apps for each application of Open Office 3.3 coming down the pike anytime soon? It would be amazing to have Open Office Writer and Math Apps available on my Android Phone. I write and it's cumbersome to have a paper and pen available at any given time an idea strikes me. With Open Office Writer App I could just open it on my phone and start typing away and save and add as I need to. Just a suggestion, but it would be a Godsend if you could develop something. Thanks Steve Chinigo of Westerly, RI.
[dev] ODT packaging, mimetype file
Hi, ODF 1.2 spec says, that mimetype file SHALL be the first one in the ODT. Why signed ODT documents do not have mimetype as the first file in the ZIP? ;-) correct file: 50 4b 03 04 14 00 00 08 00 00 ed 49 23 3e 5e c6 | PK.I#>^.| 0010 32 0c 27 00 00 00 27 00 00 00 08 00 00 00 6d 69 | 2.'...'...mi| 0020 6d 65 74 79 70 65 61 70 70 6c 69 63 61 74 69 6f | metypeapplicatio| 0030 6e 2f 76 6e 64 2e 6f 61 73 69 73 2e 6f 70 65 6e |n/ vnd.oasis.open| 0040 64 6f 63 75 6d 65 6e 74 2e 74 65 78 74 50 4b 03 | document.textPK.| wrong ODT file: 50 4b 03 04 14 00 00 08 00 00 31 3b 9d 3d 00 00 | PK1;.=..| 0010 00 00 00 00 00 00 00 00 00 00 1a 00 00 00 43 6f |..Co| 0020 6e 66 69 67 75 72 61 74 69 6f 6e 73 32 2f 73 74 | nfigurations2/st| 0030 61 74 75 73 62 61 72 2f 50 4b 03 04 14 00 00 08 |atusbar/ PK..| Do we create illegal ODT files? Why do we open such files when they are not correct ODT files? -- Pavel Janík - To unsubscribe, e-mail: dev-unsubscr...@openoffice.org For additional commands, e-mail: dev-h...@openoffice.org
Re: [dev] API to clone a row in a writer's table
Hi Sandro Am 03.01.2011 12:16, schrieb Sandro: Hi, I'm writing to the dev list after spending many days trying hard to understand the best way and asking in user lists and forums. I really hope someone can help me or point me in the correct direction/reading. I need to programmatically duplicate rows of a Table in openoffice writer. It's not difficult to add rows via table.Rows.insertByIndex(idx, count), that adds empty rows and it's easy to add text in that row assigning DataArray to the CellRange. Doing this way you loose control on the style of the cells and specifically if a cell has words with different style (bold/italic) they get flattened to the same face. What I need is to duplicate a row in a way that preserves the style of each word in the cell/row. As far as I understand using openoffice in headless mode prevents me from using dispatch as no ViewCursor should be available. Maybe the XTransferable interface is useful in this scenario. You'll find examples googling this or the api list. Regards Peter - To unsubscribe, e-mail: dev-unsubscr...@openoffice.org For additional commands, e-mail: dev-h...@openoffice.org
[dev] API to clone a row in a writer's table
Hi, I'm writing to the dev list after spending many days trying hard to understand the best way and asking in user lists and forums. I really hope someone can help me or point me in the correct direction/reading. I need to programmatically duplicate rows of a Table in openoffice writer. It's not difficult to add rows via table.Rows.insertByIndex(idx, count), that adds empty rows and it's easy to add text in that row assigning DataArray to the CellRange. Doing this way you loose control on the style of the cells and specifically if a cell has words with different style (bold/italic) they get flattened to the same face. What I need is to duplicate a row in a way that preserves the style of each word in the cell/row. As far as I understand using openoffice in headless mode prevents me from using dispatch as no ViewCursor should be available. This is the last step of a Python template system that uses openoffice (http://oootemplate.argolinux.org). I access the document via 'uno' interface in Python but any language would do to explain the logic behind it. Thanks in advance sandro *:-) Prevous attempts to get help: http://news.gmane.org/gmane.comp.openoffice.questions http://www.oooforum.org/forum/viewtopic.phtml?t=112966 http://stackoverflow.com/questions/4541081/openoffice-duplicating-rows-of-a- table-in-writer - To unsubscribe, e-mail: dev-unsubscr...@openoffice.org For additional commands, e-mail: dev-h...@openoffice.org
Re: [dev] [long] Integrate an extension in the code at buildtime : what do with bitmaps ?
Hi, mmh, if you want to use the extension as it is see http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/Extensions/Packaging_Notes If you prefer to integrate the extension as a fix part of OOo you probably have to tweak a little bit more. But keep in mind that the configuration changed and we don't have the many xcu/xcs files anymore. They are combined in *.xcd files, for example brand.xcd Images are often provided in a zip container but also as single image files, you should check the wizards in the extras module, they provide also images (e.g. .../basis-link/share/config/wizard/web/images) The remaining problem would be how to address such an image from a config file. $(insturl) is expanded some where in the framework. It seems that we are missing a macro that can be used here and that can be expanded with the macro expander. Or maybe a special UCP like the one for extensions (using the the extension identifier). But this UCP don't work in this case. Sorry i have no real solution for you at the moment or at least i don't know one. Juergen On 1/3/11 10:36 AM, eric b wrote: > Hi, > > Happy New Year to all of you, and the best for 2011 ! :-) > > > I'm currently working on integrate a nice and existing C++ extension, > but directly in the code, means at buildtime. To summarize, if I > integrate the lib (written in C++) in the scp2 .. and so on system, > there is no problem at all, the packaging is ok and it works fine in the > install set. > > In fact, everything works fine, but the icons are not seen, because > simply not found :-/ > > > To explain more, the first point is, after tracing a bit, that the > "NormalFileName" property is used to retrieve the right bitmap (please > correct me if I'm wrong). As example, looking at the original name, we > have (in the .xcu) : > > > > bitmaps/Background.png > > > And in the extension, it appears that the relative path is used, means > the library is in : > extension/random_name/libThing.${DLL_EXTENSION} > > ... while the .png are in : > extension/random_name/bitmaps/*.png > > This happens to work ok, of course. Am I correct to suppose that the > relative path is used, or did I miss something ? > > > My tries now : using the other existing .xcu as example and trying to > respect the schema ( .xcs file), I did the what follows: > > > > "$(insturl)/share/config/bitmaps/Background.png" > > ... and so on > > It does not work, but the idea is > > 1) put the library using those icons in $(insturl)/program (like all > the other libs in fact ...) > 2) use the path above to retrieve the icons. > > I must say I tested absolute and relative paths, without success. > > For example : > xlink:href="$(insturl)/share/config/bitmaps/Background.png" > > or : > xlink:href="../share/config/bitmaps/Background.png" > > > Last, the documentation I have read is : > > http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/Extensions/Checklist_for_Writing_Extensions > > http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/Extensions/Example > > + a lot of .xcs / .xcu shipped in the OOO3.2.1 code base > > Feel free to ask me if I forgot some information, and thanks in advance > for any help :-) > > Eric Bachard > - To unsubscribe, e-mail: dev-unsubscr...@openoffice.org For additional commands, e-mail: dev-h...@openoffice.org
[dev] [long] Integrate an extension in the code at buildtime : what do with bitmaps ?
Hi, Happy New Year to all of you, and the best for 2011 ! :-) I'm currently working on integrate a nice and existing C++ extension, but directly in the code, means at buildtime. To summarize, if I integrate the lib (written in C++) in the scp2 .. and so on system, there is no problem at all, the packaging is ok and it works fine in the install set. In fact, everything works fine, but the icons are not seen, because simply not found :-/ To explain more, the first point is, after tracing a bit, that the "NormalFileName" property is used to retrieve the right bitmap (please correct me if I'm wrong). As example, looking at the original name, we have (in the .xcu) : bitmaps/Background.png And in the extension, it appears that the relative path is used, means the library is in : extension/random_name/libThing.${DLL_EXTENSION} ... while the .png are in : extension/random_name/bitmaps/*.png This happens to work ok, of course. Am I correct to suppose that the relative path is used, or did I miss something ? My tries now : using the other existing .xcu as example and trying to respect the schema ( .xcs file), I did the what follows: "$(insturl)/share/config/bitmaps/Background.png" ... and so on It does not work, but the idea is 1) put the library using those icons in $(insturl)/program (like all the other libs in fact ...) 2) use the path above to retrieve the icons. I must say I tested absolute and relative paths, without success. For example : xlink:href="$(insturl)/share/config/bitmaps/Background.png"value> or : xlink:href="../share/config/bitmaps/Background.png" Last, the documentation I have read is : http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/ Extensions/Checklist_for_Writing_Extensions http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/ Extensions/Example + a lot of .xcs / .xcu shipped in the OOO3.2.1 code base Feel free to ask me if I forgot some information, and thanks in advance for any help :-) Eric Bachard -- qɔᴉɹə Education Project: http://wiki.services.openoffice.org/wiki/Education_Project Projet OOo4Kids : http://wiki.ooo4kids.org/index.php/Main_Page L'association EducOOo : http://www.educoo.org Blog : http://eric.bachard.org/news