To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=94987
Issue #|94987
Summary|API Service Annotation does not work anymore
Component|api
Version|OOO300m9
Platform|PC
URL|
OS/Version|Windows XP
Status|UNCONFIRMED
Status whiteboard|
Keywords|
Resolution|
Issue type|DEFECT
Priority|P3
Subcomponent|code
Assigned to|jsc
Reported by|bmarcelly
------- Additional comments from [EMAIL PROTECTED] Thu Oct 16 09:18:55 +0000
2008 -------
An existing macro that created text notes did not work on OOo 3.0.
Dim myNote As Object
Dim uneDate As New com.sun.star.util.Date
myNote = ThisComponent.createInstance("com.sun.star.text.TextField.Annotation")
myNote.Author = "Somebody"
myNote.Content = "This is the text of the note"
uneDate.Day = 15
uneDate.Month = 7
uneDate.Year = 2008
myNote.Date = uneDate ' <<< -- property not found
myText.insertTextContent(myCursor, myNote, False)
Investigation shows two problems:
1 - Service com.sun.star.text.textfield.Annotation provides a note object with
a
property "DateTimeValue" instead of property "Date".
The new one has the same structure as the old property : com.sun.star.util.Date
The IDL documentation of the service has not changed : the property Date is
described, not the property DateTimeValue.
Changing a name of a property is unacceptable as it breaks compatibility with
old
code. Please correct this regression.
2 - Setting DateTimeValue to a valid date does not work : the note then
displays a
date 00/00/000 00:0
In version 2.x it worked (with property Date), so this is another regression.
If DateTimeValue is not set by program, the current date is stored on the note.
But
it should be possible to change a date by API, both at note creation or on an
existing
note. The IDL documentation does not indicate any limitation.
Dim myNote As Object
Dim uneDate As New com.sun.star.util.Date
myNote = ThisComponent.createInstance("com.sun.star.text.TextField.Annotation")
myNote.Author = "Somebody"
myNote.Content = "This is the text of the note"
uneDate.Day = 15
uneDate.Month = 7
uneDate.Year = 2008
myNote.DateTimeValue = uneDate
---------------------------------------------------------------------
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]