openoffice-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [Bug 119339] internal names of documents are not accessible via API
Date Sat, 12 May 2012 23:38:48 GMT

Ariel Constenla-Haile <> changed:

           What    |Removed                     |Added
                 CC|                            |

--- Comment #2 from Ariel Constenla-Haile <> ---
(In reply to comment #0)
> Now it is the problem: In earlier OOo-Versions the solution was:
> argsCopy(0).Value = Doc.DocumentInfo.Title
> I don't know since which version of OOo this problem resides.

This seems to be introduced with the new

I tried with OOo 3.3.0 the following code:

Sub Main
    Dim oDoc as Object
    oDoc = StarDesktop.loadComponentFromURL("private:factory/scalc",_
                                            0, Array())
    Dim sTitleFromGetTitle$
    Dim sTitleFromDocInfo$
    Dim sTitleFromDocProps$

    Dim oDocInfo as Object
    oDocInfo = oDoc.DocumentInfo

    Dim oDocumentProperties as Object
    oDocumentProperties = oDoc.DocumentProperties '"SfxDocumentMetaData"

    'getTitle() - function in interface ::com::sun::star::frame:: .XTitle
    sTitleFromGetTitle = oDoc.getTitle()

    'service ::com::sun::star::document:: .DocumentInfo - DEPRECATED
    '   ::com::sun::star::document::XDocumentInfo - DEPRECATED
    '     ::com::sun::star::beans::XPropertySet
    '    ::com::sun::star::beans::XFastPropertySet
    '    ::com::sun::star::beans::XPropertyContainer
    sTitleFromDocInfo = oDocInfo.getPropertyValue("Title")

    'interface ::com::sun::star::document::XDocumentProperties
    sTitleFromDocProps = oDocumentProperties.Title ' Title here is attribute,
not property anymore
End Sub


are empty strings if you don't set a title in the document metadata, even If
you save the untitled document.

You are receiving this mail because:
You are the assignee for the bug.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message