Re: [api-dev] Dev Guide comment
Hi C., Armin Le Grand and Regina Henschel currently work in this area. I put them on cc maybe they can share some insights. Regards, Christian Am 24.02.2010 09:53, schrieb ccornell - OpenOffice.org: I stumbled on this Wiki comment today: http://wiki.services.openoffice.org/wiki/Talk:Documentation/DevGuide/Drawings/Rotating_and_Shearing Is this comment valid? Does the Dev Guide need an update in this section? C. - To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org For additional commands, e-mail: dev-h...@api.openoffice.org
Re: [api-dev] OO API during slide show
Konstantin Tokarev wrote: I'm trying to develop OOo extension with embedded object, which can be controlled with mouse during slide show Can embedded objects in OOo Impress presentation be accessed through OO API during slide show? No, during slideshow embedded objects are rendered with a static preview. Exceptions are external plugins like shapes or video. - To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org For additional commands, e-mail: dev-h...@api.openoffice.org
Re: [api-dev] OO API during slide show
Plugins like in your web browser, f.e. the adobe flash plugin. But there is no API to access them since they are proprietary anyway. Konstantin Tokarev wrote: Could you explain in detail, what is 'external plugin'? 22.10.09, 11:28, Christian Lippka christian.lip...@sun.com: Konstantin Tokarev wrote: I'm trying to develop OOo extension with embedded object, which can be controlled with mouse during slide show Can embedded objects in OOo Impress presentation be accessed through OO API during slide show? No, during slideshow embedded objects are rendered with a static preview. Exceptions are external plugins like shapes or video. - To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org For additional commands, e-mail: dev-h...@api.openoffice.org
Re: [api-dev] OO API during slide show
The API for plugins was developed by netscape so you may find information on that from the mozilla development community. Konstantin Tokarev wrote: Is there any way for creation of new open source 'external' plugin for OOo? 22.10.09, 11:39, Christian Lippka christian.lip...@sun.com: Plugins like in your web browser, f.e. the adobe flash plugin. But there is no API to access them since they are proprietary anyway. Konstantin Tokarev wrote: Could you explain in detail, what is 'external plugin'? 22.10.09, 11:28, Christian Lippka : Konstantin Tokarev wrote: I'm trying to develop OOo extension with embedded object, which can be controlled with mouse during slide show Can embedded objects in OOo Impress presentation be accessed through OO API during slide show? No, during slideshow embedded objects are rendered with a static preview. Exceptions are external plugins like shapes or video. - To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org For additional commands, e-mail: dev-h...@api.openoffice.org - To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org For additional commands, e-mail: dev-h...@api.openoffice.org
Re: [api-dev] OO API during slide show
Yes Konstantin Tokarev wrote: Do you mean OOo can use Mozilla plugins? 22.10.09, 11:51, Christian Lippka christian.lip...@sun.com: The API for plugins was developed by netscape so you may find information on that from the mozilla development community. Konstantin Tokarev wrote: Is there any way for creation of new open source 'external' plugin for OOo? 22.10.09, 11:39, Christian Lippka : Plugins like in your web browser, f.e. the adobe flash plugin. But there is no API to access them since they are proprietary anyway. Konstantin Tokarev wrote: Could you explain in detail, what is 'external plugin'? 22.10.09, 11:28, Christian Lippka : Konstantin Tokarev wrote: I'm trying to develop OOo extension with embedded object, which can be controlled with mouse during slide show Can embedded objects in OOo Impress presentation be accessed through OO API during slide show? No, during slideshow embedded objects are rendered with a static preview. Exceptions are external plugins like shapes or video. - To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org For additional commands, e-mail: dev-h...@api.openoffice.org - To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org For additional commands, e-mail: dev-h...@api.openoffice.org - To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org For additional commands, e-mail: dev-h...@api.openoffice.org
Re: [api-dev] OO API during slide show
http://tinyurl.com/yhcb6va Konstantin Tokarev wrote: How to install Mozilla plugin into OOo? I didn't find any documentation - To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org For additional commands, e-mail: dev-h...@api.openoffice.org
Re: [api-dev] OO API during slide show
Hi Ariel, Ariel Constenla-Haile wrote: Hello Konstantin, On Thursday 22 October 2009, 07:38, Konstantin Tokarev wrote: Could you explain in detail, what is 'external plugin'? Christian was telling about the feature found when inserting a video from the menu Insert - Object - Video... But this isn't something you can achieve as an OOo extension developer (OOo is just a client of the mozilla plug-ins) well you can write a plugin and possible deploy it with your extension and you could communicate between an OOo Add On and your plugin using something else than UNO API (f.e. a pipe). So yes developing a plugin may be a valid option to add interactivity to a running slideshow as it gives you a system window that is placed on the slideshow window under your control. Not a nice solution but the only one I see right now, depending on what you like to achieve. For example to change content between slide changes could be implemented today by simply restarting the slideshow using the API. But interactive content during the display of one slide is not possible with using only UNO API right now. Regards, Christian - To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org For additional commands, e-mail: dev-h...@api.openoffice.org
Re: [api-dev] OOoDraw question
Hi Paolo, Paolo Mantovani wrote: Hi * I need to perform some selection in Draw Inspecting the result of ThisComponent.getCurrentSelection() I saw that getCurrentSelection() method results always a css.drawing.ShapeCollection, regardless you selected one or many shapes Unfortunately this service is not registered at draw document level but it is registered at level of the context ServiceManager So my questions: 1) It is safe to pass a foreing service as argument for the select() method of the document controller? If you mean a foreign implementation of XShapes then yes this is safe. 2) I saw that if I want to perform a single selection I can directly pass the shape to select (instead of a collection containing the shape) Will this change in future or can I safely use that way (instead of using always the shape collection) ? Yes it is unlikely that support for this will vanish. It is either the other way, as soon as we add more functionality to the API selection implementation in Draw and Impress you might also get a single XShape from getSelection(). Regards, Christian - To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org For additional commands, e-mail: dev-h...@api.openoffice.org
Re: [api-dev] Presentation-Impress ideas
Hi Ken, all input is always very welcome. You should present your designs at the user experience mailing list at disc...@ux.openoffice.org. GUI design is no longer done by developers only but also many developers are reading and discussing there. Please do not forget to subscribe to that mailing list so you can follow the discussion there. Best regards, Christian Dr. Kenneth S. Marsh wrote: Dear Developer, I was a programmer, starting with punch cards, but never was able to think in GUI, so no longer much help in that department. However, having made well over 100 presentations worldwide, I developed specifications for a power presentation program that facilitates preparing presentations for those who make many. I actually started designing the features 20 years ago, and Powerpoint now has some of those ideas, developed independently. I would very much welcome speaking or emailing one of your developers to explore some of the ideas. Might this be of interest? Sincerely, Ken Kenneth S. Marsh, Ph.D., CPP President Kenneth S. Marsh Associates, Ltd. Consultants to the Food, Pharmaceutical and Packaging Industries and Executive Director Woodstock Institute for Science in Service to Humanity Working towards Global Food Security 130 Cane Creek Harbor Road Seneca, SC 29672 864-888-0011 k...@drkenmarsh.com www.drkenmarsh.com www.wissh.org __ - To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org For additional commands, e-mail: dev-h...@api.openoffice.org
Re: [api-dev] show only PDF options dialog without Export dialog
Hi Cor, try the following: Create instance of service com.sun.star.comp.PDF.PDFDialog. This should support XExporter::setSourceDocument to set the document model you try to export to pdf. Then use XPropertyAccess::setPropertyValues to set the properties from the media descriptor. Then XExecuteDialog::execute to execute the dialog and on success you can use XPropertyAccess::getPropertyValues to retrieve the new media descriptor properties. Not tested but this should work. Regards, Christian Cor Nouws wrote: Hi, I've once more searched the idl reference and the devGuideWiki, but cannot find anything on showing only the PDF options dialog (via Basic). Anyone who knows more on this? Thanks, Cor Cor Nouws wrote (27-3-2008 9:22) Hi *, From OOoBasic I can start PDF export without the options dialog. I also can start the PDF options dialog automatically followed by the Export dialog. However, I would like to add path/name info to the Export dialog, therefore looking for a way to display the PDF options dialog without automatic Export dialog thereafter. This is a different question as this one, that learns how to set various options: http://api.openoffice.org/servlets/BrowseList?list=devby=threadfrom=1886361 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] show only PDF options dialog without Export dialog
Hi Ariel, Cor, Ariel you are right. The problem is that the implementation from PDFDialog does not provide a proper XTypeProvider interface. I will personally punish the person who is to blame for this as soon as he is back in the office. While not accessible from basic, this still can be used from c++ or java. I think the best 'workaround' is to add a little java service to the component that implements the needed interfaces and acts as a proxy to the c++ implementation while having the correct XTypeProvider interface. I you need help with this you can contact me. Regards, Christian Ariel Constenla-Haile wrote: Hi Cor, Christian @Cor: I'm sorry to be the one with bad news again :-( Christian Lippka - Sun Microsystems Germany escribió: Hi Cor, try the following: Create instance of service com.sun.star.comp.PDF.PDFDialog. This should support XExporter::setSourceDocument to set the document model you try to export to pdf. Then use XPropertyAccess::setPropertyValues to set the properties from the media descriptor. Then XExecuteDialog::execute to execute the dialog and on success you can use XPropertyAccess::getPropertyValues to retrieve the new media descriptor properties. Not tested but this should work. no, this won't work. At least that's my conclusion by testing this on OOo Basic, and reading a few filter/source/pdf/*. Both your suggestion of using the implementation name oDlg = createUnoService(com.sun.star.comp.PDF.PDFDialog) or using the service name available at the global service manager oDlg = createUnoService(com.sun.star.document.PDFDialog) instantiates an object implementing only this interfaces com.sun.star.beans.XFastPropertySet com.sun.star.beans.XMultiPropertySet com.sun.star.beans.XPropertySet com.sun.star.lang.XInitialization com.sun.star.lang.XServiceInfo com.sun.star.lang.XTypeProvider com.sun.star.ui.dialogs.XExecutableDialog com.sun.star.uno.XInterface com.sun.star.uno.XWeak If I understood clearly the sources, the work-flow is the one described by you, but I can't see a way to make this work if css.document.XExporter is not accessible for clients, as in the implementation (filter/source/pdf/pdfdialog.cxx) PDFDialog::createDialog() checks if mxSrcDoc.is(), and mxSrcDoc is initialized in PDFDialog::setSourceDocument(). So if the client can't invoke XExporter::setSourceDocument(), an ImpPDFTabDialog will never be instantiated: Dialog*PDFDialog::createDialog( Window* pParent ) { Dialog* pRet = NULL; if( mpResMgr mxSrcDoc.is() ) { ImpPDFTabDialog* pDlg = new ImpPDFTabDialog( pParent, *mpResMgr, maFilterData, mxSrcDoc, m_xORB ); pRet = pDlg; } return pRet; } this will always return NULL. Why aren't XPropertyAccess and XExporter implemented by com.sun.star.comp.PDF.PDFDialog? I didn't try to hack OOo yet, so I only know how C++ components are design as extensions using *only* OOo API: com::sun::star::ui::dialogs::XExecutableDialog com::sun::star::lang::XServiceInfo com::sun::star::lang::XInitialization are implemented because PDFDialog inherits from OGenericUnoDialog. If I write a UNO C++ component I would use one of the templates classes ::cppu::WeakImplHelper[N] to implement XPropertyAccess and XExporter, don't know how you do it in the source code... but reading Frank's dbaccess/source/ui/uno/copytablewizard.cxx you seem to use ::cppu::ImplInheritanceHelper[N]. So is the PDFDialog bad implemented? should it be implemented this way so that XPropertyAccess and XExporter are really implemented by the component (not only by the C++ class): typedef ::svt::OGenericUnoDialogPDFDialog_DialogBase; typedef ::cppu::ImplInheritanceHelper2 PDFDialog_DialogBase, XPropertyAccess, XExporterPDFDialog_Base; class PDFDialog : public PDFDialog_Base, public ::comphelper::OPropertyArrayUsageHelper PDFDialog { //... } From OOoBasic I can start PDF export without the options dialog. I also can start the PDF options dialog automatically followed by the Export dialog. However, I would like to add path/name info to the Export dialog, therefore looking for a way to display the PDF options dialog without automatic Export dialog thereafter. This is a different question as this one, that learns how to set various options: http://api.openoffice.org/servlets/BrowseList?list=devby=threadfrom=1886361 @Core: to see the glass half-full and not half-empty, reading the sources filter/source/pdf/impdialog.hxx filter/source/pdf/impdialog.cxx I've found *all* the properties we can use with the filter. Besides the ones that stored in the configuration (query the node-path /org.openoffice.Office.Common/Filter/PDF/Export/) there are other properties we can pass to the filer. In total (and alphabetical order) they are: CenterWindow Changes ConvertOOoTargetToPDFTarget DisplayPDFDocumentTitle DocumentOpenPassword
Re: [api-dev] show only PDF options dialog without Export dialog
Ariel Constenla-Haile wrote: Hi Cor, Christian oDlg = createUnoService(com.sun.star.document.PDFDialog) instantiates an object implementing only this interfaces com.sun.star.beans.XFastPropertySet com.sun.star.beans.XMultiPropertySet com.sun.star.beans.XPropertySet com.sun.star.lang.XInitialization com.sun.star.lang.XServiceInfo com.sun.star.lang.XTypeProvider com.sun.star.ui.dialogs.XExecutableDialog com.sun.star.uno.XInterface com.sun.star.uno.XWeak I submitted issue 87700 so that the other interfaces are also available from basic. Regards, Christian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] AWT TREE: OOoBasic version of the ScriptSelector example
Andrew Douglas Pitonyak wrote: Ariel Constenla-Haile wrote: PS 2: though my English is very me-Tarzan-you-Jane, No, your English is much better than that. isn't it wrong Childs as plural of Child, instead of Children? Children is the correct plural for Child. The Java API uses Children for the plural ( z.B. DefaultMutableTreeNode.allowsChildren , .children, .getAllowsChildren() ... ), OOo API Childs. This will be fixed for OOo 2.4. So please be aware that an incompatible change to the interface is comming. Regards, Christian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] Alter presentation while its running
Hi Dominik, an API to control the slideshow behaviour is currently in development. I can't tell you when it will be available, but don't expect anything for the OOo 2.3 release. Should be available in developer builds some time after the 2.3 release. Regards, Christian Dominik Gundacker wrote: Hi, I want to write a macro in ooRexx for Impress, which should do the following: User specifies estimated duration of the presentation and then the macro should add a blinking image (in the form of a GraphicObjectShape) to the slide, which is displayed at 90% of the time. That means, I need to start the presentation, after lets say 9 minutes I want to get the current displayed slide in the presentation and finally I add the shape on the drawpage. How do I do that? Is it even possible? I went through the mailing list and found 2 topics that are somehow related to my question. One from 2001 about Detecting when a presentation has ended http://api.openoffice.org/servlets/ReadMsg?list=devmsgNo=375 Christian Lippka said, that the current API is not supporting runtime changes on the presentation. And one from 2006 from Jürgen Schmidt regarding end of presentation events that there is no possibility to do that. http://api.openoffice.org/servlets/ReadMsg?list=devmsgNo=14632 So my question is, is there solution now? Or is it planned for a later version? Thanks a lot in advance Best Regards Dominik Gundacker - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] getting names of drawpages in draw andc impress
Hi, if you insert a slide and the user interface displays it as Slide # than that slide actually has no name. The Slide # is generated dynamically by the user interface of the application. The API name page# can be used to reference a slide. For convenience we should add a DisplayName property to the slides, but for now I think you have to translate that on your own. Regards, Christian Christian Andersson wrote: in both draw and impress if I add a new Page/Slide the page/slide is named Slide # where # is the page number.. when I access the draw/impress document usign the api and I'm getting the names of the drapwages I do not get Slide # but I get page# if I have understood this correctly OOo presents the name in a special way if the name of the page is page# right now OOo say that the page is named Slide # and my application say it is named page# Is there some way to get the presentationname from the real name using the api... so taht my application also can present Slide # - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] get the currently selected shaoe from impress
Yes, get the current XController from the XModel and use the XSelectionSupplier interface on it. This either returns a single XShape reference or a sequence of XShape for multi selections. Regards, Christian Madhan Ponnusamy wrote: Hi, i had inserted many shapes inside impress document using XShapes and xShape interfacesbut now i need to get the currently selected shape from the document..is that possible? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] Idea for a feature: adding a PageStyle / PageStyleName for Presentation and Draw documents
Hi Tobias, impress uses a different concept as each slide has a master page assigned which for one is a complete page with shapes that is rendered on the background of that slide but also contains a unique set of presentation styles for shapes used in layouts. So I don't think we need page styles for impress as master pages have far more features than just simple styles and fit the slide oriented document model of impress better. Same holds for draw except draw has no presentation styles of course. Best regards, Christian Tobias Krais wrote: Hi together again, I worte a little program that sets the printer tray and prints OO documents. I use following code to set the printer tray for XTextdocuments: %- XText xText = myXTextDocument.getText(); // create a text cursor from the cells XText interface XTextCursor xTextCursor = xText.createTextCursor(); // Get the property set of the cell's TextCursor XPropertySet xPropSet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xTextCursor); String pageStyleName = xPropSet .getPropertyValue(PageStyleName).toString(); -% For Spreadsheets I use a similar way to get the PageStyleName using: -%- // Selecting each SpreadSheet by itself Object sheet = xSpreadsheets.getByName(sheetName); XSpreadsheet xSpreadsheet = (XSpreadsheet) AnyConverter.toObject(XSpreadsheet.class, sheet); // Get all properties of the sheet XPropertySet xSheetProps = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xSpreadsheet); // Get page style property String pageStyleName = xSheetProps .getPropertyValue(PageStyle).toString(); -%- Now I want to do the same for a presentation document -%- // Getting the page style name XPresentation xPresentation = xPresSupplier.getPresentation(); XPropertySet xPropSet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xPresentation); // TODO: There is no such property name... String pageStyleName = xPropSet.getPropertyValue(PageStyleName).toString(); -%- Same for drawing documents: -%- XDrawPage xDrawPage = (XDrawPage) AnyConverter.toObject(XDrawPage.class, xDrawPages.getByIndex(i)); XPropertySet xPropSet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xDrawPage); // TODO: There is no such property name... String pageStyle = xPropSet.getPropertyValue(PageStyleName).toString(); -%- Do you think it is worth to add an ENHANCEMENT issue? Please disagree or tell me your ideas. Greetings, Tobias - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] REPOST: OutlinerShapes in Impress
Hi Chris, try createInstance(com.sun.star.presentation.OutlinerShape) Regards, Christian Chris Farmer wrote: Hi. I'm a newbie API user, and I'm trying to create an Impress document from Java and add a bulleted outline to a single slide. I can create a page, but I'm sadly stuck after that. I tried creating an Impress document in the UI that contained an outline, and then I used Java to iterate over the shapes found in the slide. I found an OutlinerShape, and I can get its text, but that contains no formatting information, so I don't see how to properly set indentation level and such for each line in the outline. I also see that OutlinerShape also has the XEnumerationAccess interface, so I got that interface and created an enumeration from it. The resulting elements are XTextContents, but I still can't seem to do much with them. How can I get access to individual elements in the outline? I also can't seem to be able to create an OutlinerShape on a slide. I tried Object o = xfact.createInstance(com.sun.star.drawing.OutlinerShape); but a ServiceNotRegisteredException was thrown. (Creating a RectangleShape in this manner works fine, however.) Can someone please give me some hints on how to create such an outline and populate it with a couple items of varying indentation levels? Thanks, Chris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] Catching Mouse Clicks
Hi Bradley, I'm afraid the slideshow API is due to time and resource constrains not yet available to be used from the outside. You may be able to get the XWindow from the top frame after a fullscreen slideshow was started. Then you could register there as a mouselistener from com.sun.star.awt But it is not guaranntied that we advance a slide on each mouse click. It could also mean we trigger an interaction or advance a shape animation. If this does not help you, please tell us what you try to do on the dev@graphics.openoffice.org mailing list, maybe we can give you a hint for a workaround. (I'm afraid Mathias hint with [EMAIL PROTECTED] is not a good choice) Regards, Christian Mathias Bauer wrote: Hi Bradley, unfortunately the API for these events does exist (AFAIK) but currently is not published. So using it exposes your code to the risk that it must be changed later. Non published APIs are not guaranteed to be stable in later OOo versions as are the published APIs. If you still want to use it and don't get any further answers here (I for myself don't know this API well enough) you could ask on the dev@gsl.openoffice.org mailing list. Best regards, Mathias Bradley Bolen wrote: I would be listening for it in the slide show. Thanks, Brad --- Mathias Bauer [EMAIL PROTECTED] wrote: Bradley Bolen wrote: Hello. I'm sorry if this question has already been answered. I checked the mailing list archive (and google) but I didn't find quite what I was looking for. I am trying to find a way to know when a user has clicked a mouse button. Specifically, I will open and start a Presentation document. I then would like to be able to know when the user has clicked the mouse to move to the next slide. From the IDL reference it looks like I should get the com::sun::star::frame::Controller service. Then from that I can get the XUserInputInterception interface and use the addMouseClickHandler method. I would then have to implement the com::sun::star::awt::XMouseClickHandler interface to perform the actions that I want when the mouse button is clicked. Is this the way that the mouse listening interfaces work? If not, can someone point me to the correct way to do what I want? Also, if anyone knows of a link to some example code, even if it is for a keyboard event, that would be helpful. I think this is not the way to go. The XUserInputInteraction interface is more related to clicks into the document pane, not for clicking on control elements. The right way to react on slide exchange is to listen for a specific event. Do you want to listen for this event in the edit mode or in the slide show? Best regards, Mathias -- Mathias Bauer - OpenOffice.org Application Framework Project Lead Please reply to the list only, [EMAIL PROTECTED] is a spam sink. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]