incubator-ooo-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 119339] internal names of documents are not accessible via API
Date Sat, 12 May 2012 23:38:48 GMT
https://issues.apache.org/ooo/show_bug.cgi?id=119339

Ariel Constenla-Haile <arielch@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |arielch@apache.org

--- Comment #2 from Ariel Constenla-Haile <arielch@apache.org> ---
(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
::com::sun::star::document::(X)DocumentProperties.

I tried with OOo 3.3.0 the following code:

Sub Main
    Dim oDoc as Object
    oDoc = StarDesktop.loadComponentFromURL("private:factory/scalc",_
                                            "_default",_
                                            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

oDocInfo.getPropertyValue("Title")
oDocumentProperties.Title

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.

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