To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=85073
Issue #|85073
Summary|Option AutoHScroll in css.awt.UnoControlEditModel cras
|hed dialog
Component|api
Version|OOo 2.3
Platform|All
URL|
OS/Version|All
Status|UNCONFIRMED
Status whiteboard|
Keywords|
Resolution|
Issue type|DEFECT
Priority|P3
Subcomponent|code
Assigned to|jsc
Reported by|tobiaskrais
------- Additional comments from [EMAIL PROTECTED] Tue Jan 8 09:50:22 +0000
2008 -------
Please see the following code. When setting the AutoHScroll or AutoVScroll
value, my dialog crashes.
-----%<-----
package de.designtouse.test;
import com.sun.star.beans.PropertyValue;
import com.sun.star.beans.XPropertySet;
import com.sun.star.comp.helper.Bootstrap;
import com.sun.star.frame.XComponentLoader;
import com.sun.star.frame.XDesktop;
import com.sun.star.lang.XComponent;
import com.sun.star.lang.XMultiComponentFactory;
import com.sun.star.lang.XMultiServiceFactory;
import com.sun.star.uno.UnoRuntime;
import com.sun.star.uno.XComponentContext;
import de.twc.oocom.oo.OOWorkbench;
import de.twc.oocom.utils.OOUtils;
public class DialogCrashTest {
/**
* @param args
*/
public static void main(String[] args) {
try {
XComponentContext xComponentContext =
Bootstrap.bootstrap();
XMultiComponentFactory xMCF =
xComponentContext.getServiceManager();
Object desktop = xMCF.createInstanceWithContext(
"com.sun.star.frame.Desktop", xComponentContext);
XComponentLoader xComponentLoader = (XComponentLoader)
UnoRuntime.queryInterface(XComponentLoader.class,
desktop);
PropertyValue[] myProperties = new PropertyValue[1];
myProperties[0] = new PropertyValue();
// open document but do not show user interface
myProperties[0].Name = "Hidden";
myProperties[0].Value = new Boolean(false);
XComponent xComponent = xComponentLoader.loadComponentFromURL(
"private:factory/swriter", "_blank", 0, myProperties);
// create the dialog model and set the properties
Object dialogModel = xMCF.createInstanceWithContext(
"com.sun.star.awt.UnoControlDialogModel",
xComponentContext);
XPropertySet xPSetDialog = (XPropertySet)UnoRuntime.queryInterface(
XPropertySet.class, dialogModel);
xPSetDialog.setPropertyValue("PositionX", new Integer(0));
xPSetDialog.setPropertyValue("PositionY", new Integer(0));
xPSetDialog.setPropertyValue("Width", new Integer(200));
xPSetDialog.setPropertyValue("Height", new Integer(200));
xPSetDialog.setPropertyValue("Title", new String("Fehler!"));
XMultiServiceFactory xMSF = (XMultiServiceFactory)
UnoRuntime.queryInterface(XMultiServiceFactory.class,
dialogModel);
Object inputModel01 =
xMSF.createInstance("com.sun.star.awt.UnoControlEditModel");
XPropertySet xPSetInput01 = (XPropertySet)
UnoRuntime.queryInterface(
XPropertySet.class, inputModel01);
xPSetInput01.setPropertyValue("PositionX", new Integer(5));
xPSetInput01.setPropertyValue("PositionY", new Integer(5));
xPSetInput01.setPropertyValue("Width", new Integer(190));
xPSetInput01.setPropertyValue("Height", new Integer(120));
xPSetInput01.setPropertyValue("MultiLine", true);
// Application crashes next line with exception
xPSetInput01.setPropertyValue("AutoHScroll", true);
xPSetInput01.setPropertyValue("AutoVScroll", true);
xPSetInput01.setPropertyValue("ReadOnly", true);
xPSetInput01.setPropertyValue("Text", "CrashText");
xPSetInput01.setPropertyValue("Name", "CrashText");
}
catch(Exception e) {
e.printStackTrace();
}
System.exit(0);
}
}
-----%<-----
---------------------------------------------------------------------
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]