To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=94274
Issue #|94274
Summary|Office crash after document was loaded by .net uno api
Component|framework
Version|1.0.0
Platform|All
URL|
OS/Version|All
Status|NEW
Status whiteboard|
Keywords|
Resolution|
Issue type|DEFECT
Priority|P3
Subcomponent|code
Assigned to|jl
Reported by|tkr
------- Additional comments from [EMAIL PROTECTED] Wed Sep 24 11:32:17 +0000
2008 -------
- Open a document with .net uno api
- Close OpenOffice after document was loaded
- Start OpenOffice manually and open a document. -> Office crash
Use following source code the reproduce the behavior:
using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using System.Linq;
using System.Text;
using System.Threading;
using unoidl.com.sun.star.lang;
using unoidl.com.sun.star.uno;
using unoidl.com.sun.star.uri;
using unoidl.com.sun.star.frame;
using unoidl.com.sun.star.task;
using unoidl.com.sun.star.beans;
using uno.util;
using uno;
using System.Security;
namespace UnoTest
{
class Program
{
class OpenOfficeInstance
{
private String url;
private XComponentContext xContext;
private XComponentContext connectOffice()
{
return Bootstrap.bootstrap();
}
public OpenOfficeInstance(String url)
{
this.url = url;
}
public void EditDocument()
{
xContext = connectOffice();
XComponentLoader xComponentLoader =
(XComponentLoader)xContext.getServiceManager().createInstanceWithContext("com.sun.star.frame.Desktop",
xContext);
XInteractionHandler xIneractionHandler =
(XInteractionHandler)xContext.getServiceManager().createInstanceWithContext("com.sun.star.task.InteractionHandler",
xContext);
PropertyValue[] props = new PropertyValue[1];
props[0] = new PropertyValue();
props[0].Name = "InteractionHandler";
props[0].Value = new Any(xIneractionHandler.GetType(),
xIneractionHandler);
}
}
static void Main(string[] args)
{
try
{
OpenOfficeInstance instance = new
OpenOfficeInstance("file:///[insert a file name]");
instance.EditDocument();
// if you comment the while statement openoffice won't crash
while (true);
}
catch (System.Exception ex)
{
}
}
}
}
---------------------------------------------------------------------
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]