To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=80297
                 Issue #|80297
                 Summary|Cannot modify Chart title via Basic using old API beca
                        |use getTitle is ambiguous
               Component|Chart
                 Version|680m223
                Platform|All
                     URL|
              OS/Version|All
                  Status|NEW
       Status whiteboard|
                Keywords|
              Resolution|
              Issue type|DEFECT
                Priority|P3
            Subcomponent|programming
             Assigned to|bm
             Reported by|bm





------- Additional comments from [EMAIL PROTECTED] Thu Aug  2 16:01:08 +0000 
2007 -------
In a Basic Macro where you have an XChartDocument in oDoc the call

oDoc.Title

may call css::chart2::XTitled::getTitle instead of
css::chart::XChartDocument::getTitle. So, the following fails:

oDoc.Title.CharHeight = 12
oDoc.Title.String = "My Title"

As a work-around, the following works:

Dim oFormattedString As Object
Dim oTitle As Object
Dim aStrings(0) As Object

Set oTitle = createUNOService( "com.sun.star.chart2.Title" )

Set oFormattedString = createUNOService( "com.sun.star.chart2.FormattedString" )
oFormattedString.String = "My Title"
oFormattedString.CharHeight = 12
Set aStrings(0) = oFormattedString

oTitle.Text = aStrings
oDoc.Title = oTitle

Although its is quite more complicated.

The cleanest fix would be to rename chart::XChartDocument::getTitle to
getMainTitle, that would be consistent to the "HasMainTitle" property and would
solve the ambiguity, however this is published API, so not possible.

The other getTitle() is a method from the interface XTitled, so the name of the
method cannot be renamed to getMainTitle(). Maybe it can be renamed to
getTitleContent or sth. like that?

---------------------------------------------------------------------
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification

---------------------------------------------------------------------
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]

Reply via email to