Discussion:
XJob freezes documents
Peter Eberlein
2011-06-01 18:08:20 UTC
Permalink
Hi,

me migrated from OpenOffice 2.2 to 3.2 and have trouble with textdocuments.
The scenario is the following:
A user action is intercepted and a new document from a template created.
This OnNew event triggers a synced XJob. Some user interactions (via
OLE-bridge) have to be done, after all the job has finished, but the
document is frozen (no cursor, no scrolling, etc.) It can only be closed
with the TaskManager. Working with oo is possible with other documents
furthermore.
All logging output is ok.
This behavior is reproducable in 90% of similar actions, but only in
10-20% of actions, where no dispatching is active (creating of new
document only by code).
This doesn't occur with OpenOffice 2. So what has changed here?

In the jobs.xcu I changed the node from oor:op="replace" to "fuse" and
implemented XCloseable and XComponent in the JXob class according to the
DevGuide without success.
I read about problems, when other GUI than uno-awt is used with XJob,
but the UI is a not replaceable third party product.

Any hints are appreciated.

OpenOffice 3.2.0
Java 1.6
Windows XP SP3

Regards

Peter
--
-----------------------------------------------------------------
To unsubscribe send email to dev-***@api.openoffice.org
For additional commands send email to ***@api.openoffice.org
with Subject: help
Oliver Brinzing
2011-06-01 18:30:32 UTC
Permalink
Hi Peter,
but the document is frozen (no cursor, no scrolling, etc.)
Working with oo is possible with other documents furthermore.
this sounds pretty much like my problem we were talking about some weeks ago:
i print a document with my custom print dialog. after that a second document is
opened, parts of the first documents are copied and then printed too.
after closing this document the first document is frozen sometimes ...

till now i have no solution for this problem, but i can recover the frozen document
using the macro below.

can you recover your the frozen document too ?

Regards

Oliver

Sub DocRescue()

Dim oDoc as Object
Dim oServiceManager as Object
Dim oDesktop as Object
Dim oComponents as Object
Dim oComponent as Object
Dim oFrame as Object
Dim sTitle as String
Dim mFileProps(0) as New com.sun.star.beans.PropertyValue
Dim oNull as Object

oDoc = ThisComponent
oServiceManager = GetProcessServiceManager()
oDesktop = oServiceManager.createInstance("com.sun.star.frame.Desktop")
oComponents = oDesktop.Components.CreateEnumeration

While oComponents.HasMoreElements()
oComponent = oComponents.NextElement

If Not EqualUnoObjects(oDoc, oComponent) Then
sTitle = oComponent.Title

If MsgBox("Dokument: """ & sTitle & """ retten?", 32+4, "Dokument retten...") = 6 Then

oFrame = oComponent.getCurrentController().getFrame()
oFrame.Title = "wird geschlossen..."

mFileProps(0).Name = "Model"
mFileProps(0).Value = oComponent
oDesktop.loadComponentFromURL("private:object", "_blank", 0, mFileProps())

Wait(1000)

oComponent = oNull
oFrame.dispose()
oFrame = oNull
Exit Sub
EndIf
EndIf
Wend
End Sub
--
GnuPG key 0xCFD04A45: 8822 057F 4956 46D3 352C 1A06 4E2C AB40 CFD0 4A45
Peter Eberlein
2011-06-03 11:08:45 UTC
Permalink
Post by Oliver Brinzing
Hi Peter,
but the document is frozen (no cursor, no scrolling, etc.)
Working with oo is possible with other documents furthermore.
i print a document with my custom print dialog. after that a second document is
opened, parts of the first documents are copied and then printed too.
after closing this document the first document is frozen sometimes ...
till now i have no solution for this problem, but i can recover the frozen document
using the macro below.
can you recover your the frozen document too ?
yep,
thx for the example

Regards

Peter
--
-----------------------------------------------------------------
To unsubscribe send email to dev-***@api.openoffice.org
For additional commands send email to ***@api.openoffice.org
with Subject: help
Loading...