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

[email protected] Thu, 24 Sep 2009 18:41:42 +0200 (MEST)
Newsgroups gmane.comp.openoffice.announce.interface
Message-ID <33217327.111253810502857.JavaMail.root@so-web4>
------=_Part_22993_7071426.1253810502856
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit



          Type: info
         Title: LoadComponentFromURL now allows to specify templates for new documents
     Posted by: [email protected]
      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 [email protected]



------=_Part_22993_7071426.1253810502856
Content-Type: text/plain; charset=us-ascii

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
------=_Part_22993_7071426.1253810502856--