OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

Changing DocumentInfo may result in hanging application

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API
View previous topic :: View next topic  
Author Message
parc
Power User
Power User


Joined: 09 Nov 2007
Posts: 55
Location: Hamburg

PostPosted: Sat Nov 29, 2008 12:45 am    Post subject: Changing DocumentInfo may result in hanging application Reply with quote

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
View user's profile Send private message Visit poster's website
B Marcelly
Super User
Super User


Joined: 12 May 2004
Posts: 1453
Location: France

PostPosted: Sat Nov 29, 2008 9:24 am    Post subject: Reply with quote

Hi
As you can see in the IDL, DocumentInfo is deprecated in OpenOffice version 3.
Use DocumentProperties instead.
______
Bernard
Back to top
View user's profile Send private message Visit poster's website
parc
Power User
Power User


Joined: 09 Nov 2007
Posts: 55
Location: Hamburg

PostPosted: Sat Nov 29, 2008 2:57 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
B Marcelly
Super User
Super User


Joined: 12 May 2004
Posts: 1453
Location: France

PostPosted: Sun Nov 30, 2008 12:46 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
parc
Power User
Power User


Joined: 09 Nov 2007
Posts: 55
Location: Hamburg

PostPosted: Sun Nov 30, 2008 2:12 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
B Marcelly
Super User
Super User


Joined: 12 May 2004
Posts: 1453
Location: France

PostPosted: Mon Dec 01, 2008 3:03 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group