info/DEV300m60 : LoadComponentFromURL now allows to specify templates for new documents

View: New views
1 Messages — Rating Filter:   Alert me  

info/DEV300m60 : LoadComponentFromURL now allows to specify templates for new documents

by mathias.bauer :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message



          Type: info
         Title: LoadComponentFromURL now allows to specify templates for new documents
     Posted by: mathias.bauer@...
      Affected: -,-
         TaskId: i82287
<http://www.openoffice.org/issues/show_bug.cgi?id=82287>
Effective from: DEV300m60


*Summary*
--------
LoadComponentFromURL now allows to specify templates for new documents

*Description*
-------------
Until now a template could be used only by its file name, but not by
the logical names we have in the template component. The documentation
of the MediaDescriptor in the DevGuide mentioned two properties called
"TemplateName" and "TemplateRegionName", but they never workrd. Now it
is possible to create a new document from a template using these
properties. Example in Basic:

Sub createNewDoc
    Dim md(2) as New com.sun.star.beans.PropertyValue
    md(0).Name="TemplateName"
    md(0).Value="some_template"
    md(1).Name="TemplateRegionName"
    md(1).Value="My Templates"
    md(2).Name="AsTemplate"
    md(2).Value=TRUE
   
StarDesktop.loadComponentFromURL("private:factory/swriter","_blank",0,md)
End Sub




Send feedback to interface-announce@...



---------------------------------------------------------------------
To unsubscribe, e-mail: interface-announce-unsubscribe@...
For additional commands, e-mail: interface-announce-help@...