diff options
author | Rüdiger Timm <rt@openoffice.org> | 2005-11-11 11:19:16 +0000 |
---|---|---|
committer | Rüdiger Timm <rt@openoffice.org> | 2005-11-11 11:19:16 +0000 |
commit | 285a161ea9c8af1160e50a53b0266ddae8764ef3 (patch) | |
tree | 90507a4a54c5dcdea16ce94d826619acec8e3074 /wizards | |
parent | a5196f03b2225203dee1c54e658b167c7b5947de (diff) |
INTEGRATION: CWS c06 (1.4.90); FILE MERGED
2005/09/15 11:53:20 tv 1.4.90.1: #53536# make sure wizards with live previews behave correctly in terms of attaching and removing a termination listener and being openend via dispatch rather than loadComponentFromURL
Diffstat (limited to 'wizards')
-rw-r--r-- | wizards/com/sun/star/wizards/fax/FaxDocument.java | 2 | ||||
-rw-r--r-- | wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.java | 11 |
2 files changed, 10 insertions, 3 deletions
diff --git a/wizards/com/sun/star/wizards/fax/FaxDocument.java b/wizards/com/sun/star/wizards/fax/FaxDocument.java index 7e8ca47e10fb..42e972e35efe 100644 --- a/wizards/com/sun/star/wizards/fax/FaxDocument.java +++ b/wizards/com/sun/star/wizards/fax/FaxDocument.java @@ -22,7 +22,7 @@ public class FaxDocument extends TextDocument { boolean keepTypeFrame = true; public FaxDocument(XMultiServiceFactory xMSF, XTerminateListener listener) { - super(xMSF, listener); + super(xMSF, listener, "WIZARD_LIVE_PREVIEW"); } public XWindowPeer getWindowPeer() { diff --git a/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.java b/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.java index 2480e9742615..c2f2edbe3b54 100644 --- a/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.java +++ b/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.java @@ -20,6 +20,7 @@ import com.sun.star.uno.RuntimeException; import com.sun.star.uno.UnoRuntime; import com.sun.star.wizards.text.*; import com.sun.star.wizards.common.*; +import com.sun.star.task.XInteractionHandler; import com.sun.star.text.XTextDocument; import com.sun.star.uno.XInterface; import com.sun.star.util.CloseVetoException; @@ -154,6 +155,7 @@ public class FaxWizardDialogImpl extends FaxWizardDialog { public void cancelWizard() { xWindow.setVisible(false); closeDocument(); + removeTerminateListener(); running = false; } @@ -193,8 +195,8 @@ public class FaxWizardDialogImpl extends FaxWizardDialog { xWindow.setVisible(false); closeDocument(); //myFaxDoc.xTextDocument.unlockControllers(); - - PropertyValue loadValues[] = new PropertyValue[3]; + XInteractionHandler xIH = (XInteractionHandler) UnoRuntime.queryInterface(XInteractionHandler.class, xMSF.createInstance("com.sun.star.comp.uui.UUIInteractionHandler")); + PropertyValue loadValues[] = new PropertyValue[4]; loadValues[0] = new PropertyValue(); loadValues[0].Name = "AsTemplate"; loadValues[1] = new PropertyValue(); @@ -203,6 +205,10 @@ public class FaxWizardDialogImpl extends FaxWizardDialog { loadValues[2] = new PropertyValue(); loadValues[2].Name = "UpdateDocMode"; loadValues[2].Value = new Short (com.sun.star.document.UpdateDocMode.FULL_UPDATE); + loadValues[3] = new PropertyValue(); + loadValues[3].Name = "InteractionHandler"; + loadValues[3].Value = xIH; + if (bEditTemplate) { loadValues[0].Value = Boolean.FALSE; @@ -221,6 +227,7 @@ public class FaxWizardDialogImpl extends FaxWizardDialog { e.printStackTrace(); } finally { + removeTerminateListener(); running = false; } |