| View previous topic :: View next topic |
| Author |
Message |
parc Power User

Joined: 09 Nov 2007 Posts: 55 Location: Hamburg
|
Posted: Sat Nov 29, 2008 12:45 am Post subject: Changing DocumentInfo may result in hanging application |
|
|
There is a bug in OpenOffice 3.0, when changing DocumentInfo (Title, Subject, ...) items. Changing these values may lead to a hanging OpenOffice (and the calling application). This bug should already be fixed in the actual development builds and will be available with 3.01.
I noticed this, when changing the entries via C#. |
|
| Back to top |
|
 |
B Marcelly Super User

Joined: 12 May 2004 Posts: 1414 Location: France
|
Posted: Sat Nov 29, 2008 9:24 am Post subject: |
|
|
Hi
As you can see in the IDL, DocumentInfo is deprecated in OpenOffice version 3.
Use DocumentProperties instead.
______
Bernard |
|
| Back to top |
|
 |
parc Power User

Joined: 09 Nov 2007 Posts: 55 Location: Hamburg
|
Posted: Sat Nov 29, 2008 2:57 pm Post subject: |
|
|
| B Marcelly wrote: | Hi
As you can see in the IDL, DocumentInfo is deprecated in OpenOffice version 3.
Use DocumentProperties instead.
______
Bernard |
Here is the C# code, which may hang - it uses DocumentProperties
| Code: |
/// <summary>
/// Setze Thema und Titel des Dokumentes, damit dieses im Dokument über Felder genutzt werden kann
/// </summary>
/// <param name="textDocument"></param>
/// <param name="titleString"></param>
/// <param name="themaString"></param>
private void SetTitleAndThema(XTextDocument textDocument, string titleString, string themaString)
{
XDocumentPropertiesSupplier propSupp = textDocument as XDocumentPropertiesSupplier;
if (propSupp != null)
{
XDocumentProperties docuProperties = propSupp.getDocumentProperties();
docuProperties.Title = titleString;
docuProperties.Subject = themaString;
}
else
{
if (Debugger.IsAttached)
Debugger.Break();
}
}
|
|
|
| Back to top |
|
 |
B Marcelly Super User

Joined: 12 May 2004 Posts: 1414 Location: France
|
Posted: Sun Nov 30, 2008 12:46 am Post subject: |
|
|
Hi,
I did several tests with 300m9 on Win XP. Never a hang with this Basic routine | Code: | Sub Main
Dim docInfos As Object
docInfos = ThisComponent.DocumentProperties
With docInfos
.Author = "Zoé"
.Description = "How to change doc properties"
.ModifiedBy = "Laura"
.Title = "Change props"
.Subject = "A simple Basic script"
.EditingCycles = 456
.EditingDuration = 2*3600 +15*60 +33 ' 2h 15mn 33 sec
End With
End Sub |
|
|
| Back to top |
|
 |
parc Power User

Joined: 09 Nov 2007 Posts: 55 Location: Hamburg
|
Posted: Sun Nov 30, 2008 2:12 am Post subject: |
|
|
| B Marcelly wrote: | Hi,
I did several tests with 300m9 on Win XP. Never a hang with this Basic routine | Code: | Sub Main
Dim docInfos As Object
docInfos = ThisComponent.DocumentProperties
With docInfos
.Author = "Zoé"
.Description = "How to change doc properties"
.ModifiedBy = "Laura"
.Title = "Change props"
.Subject = "A simple Basic script"
.EditingCycles = 456
.EditingDuration = 2*3600 +15*60 +33 ' 2h 15mn 33 sec
End With
End Sub |
|
I got an eMail from Michael Stahl from sun about this topic:
| Quote: | in OOo 3.0, there is unfortunately a deadlock in the (new) implementation of DocumentProperties service. i guess that would be the problem you hit here. the issue number is 93514.
the fix is integrated in the following milestones: OOO300/m12, DEV300/m36
the fix will be shipped with OOo 3.0.1. |
|
|
| Back to top |
|
 |
B Marcelly Super User

Joined: 12 May 2004 Posts: 1414 Location: France
|
Posted: Mon Dec 01, 2008 3:03 am Post subject: |
|
|
| Quote: | | the issue number is 93514 |
This is the information that was needed.
The bug occurs if you use some specific listener. |
|
| Back to top |
|
 |
|