Re: XJob freezes documents
Oliver Brinzing <[email protected]> Wed, 01 Jun 2011 20:30:32 +0200
| Newsgroups | gmane.comp.openoffice.devel.api |
|---|---|
| Message-ID | <[email protected]> |
This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enig934C8230E1906F7D0060B6C4
Content-Type: text/plain; charset=ISO-8859-15
Content-Transfer-Encoding: quoted-printable
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 docum=
ent 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 froze=
n 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 =3D ThisComponent
oServiceManager =3D GetProcessServiceManager()
oDesktop =3D oServiceManager.createInstance("com.sun.star.frame.Desktop"=
)=09
oComponents =3D oDesktop.Components.CreateEnumeration
While oComponents.HasMoreElements()
oComponent =3D oComponents.NextElement
=09
If Not EqualUnoObjects(oDoc, oComponent) Then
sTitle =3D oComponent.Title
If MsgBox("Dokument: """ & sTitle & """ retten?", 32+4, "Dokument rett=
en...") =3D 6 Then
oFrame =3D oComponent.getCurrentController().getFrame()
oFrame.Title =3D "wird geschlossen..."
mFileProps(0).Name =3D "Model"
mFileProps(0).Value =3D oComponent
oDesktop.loadComponentFromURL("private:object", "_blank", 0, mFilePro=
ps())
Wait(1000)
oComponent =3D oNull
oFrame.dispose()
oFrame =3D oNull
Exit Sub
EndIf
EndIf
Wend
End Sub
--=20
GnuPG key 0xCFD04A45: 8822 057F 4956 46D3 352C 1A06 4E2C AB40 CFD0 4A45
--------------enig934C8230E1906F7D0060B6C4
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAk3mhUwACgkQTiyrQM/QSkXb9QCeK6LnImVQCwY29CgtqBHBYhvS
DBoAoKbL87ncBu9gSbTxzUNNHaHuvhnj
=8DI9
-----END PGP SIGNATURE-----
--------------enig934C8230E1906F7D0060B6C4--