summaryrefslogtreecommitdiff
path: root/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.java
diff options
context:
space:
mode:
authorKurt Zenker <kz@openoffice.org>2005-03-01 16:29:18 +0000
committerKurt Zenker <kz@openoffice.org>2005-03-01 16:29:18 +0000
commit56263cf2e407902e7a0c5886a3ceab309bb7871b (patch)
tree60386f626fc2f9dfa9c0d0c54866c83a7f521466 /wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.java
parente435103bea0bd395a96b16590ea1de307cb94101 (diff)
INTEGRATION: CWS qwizardsbf3 (1.3.20); FILE MERGED
2005/02/24 15:49:22 tv 1.3.20.2: correct handling of reloaded document 2005/02/23 12:30:22 tv 1.3.20.1: #i42619# calling of macros after loading of the template enabled Issue number: Submitted by: Reviewed by:
Diffstat (limited to 'wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.java')
-rw-r--r--wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.java24
1 files changed, 17 insertions, 7 deletions
diff --git a/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.java b/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.java
index 37d8f7f7c57e..2480e9742615 100644
--- a/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.java
+++ b/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.java
@@ -28,6 +28,7 @@ import com.sun.star.wizards.document.*;
import com.sun.star.wizards.ui.*;
import com.sun.star.wizards.ui.event.*;
import com.sun.star.wizards.common.Helper;
+import com.sun.star.document.MacroExecMode;
public class FaxWizardDialogImpl extends FaxWizardDialog {
@@ -168,10 +169,6 @@ public class FaxWizardDialogImpl extends FaxWizardDialog {
sPath = myPathSelection.getSelectedPath();
}
sPath = fileAccess.getURL(sPath);
- myFaxDoc.killEmptyUserFields();
- myFaxDoc.keepLogoFrame = (chkUseLogo.getState() != 0);
- myFaxDoc.keepTypeFrame = (chkUseCommunicationType.getState() != 0);
- myFaxDoc.killEmptyFrames();
//first, if the filename was not changed, thus
//it is coming from a saved session, check if the
@@ -183,6 +180,11 @@ public class FaxWizardDialogImpl extends FaxWizardDialog {
if (answer == 3) // user said: no, do not overwrite....
return;
}
+ myFaxDoc.setWizardTemplateDocInfo(resources.resFaxWizardDialog_title, resources.resTemplateDescription);
+ myFaxDoc.killEmptyUserFields();
+ myFaxDoc.keepLogoFrame = (chkUseLogo.getState() != 0);
+ myFaxDoc.keepTypeFrame = (chkUseCommunicationType.getState() != 0);
+ myFaxDoc.killEmptyFrames();
bSaveSuccess = OfficeDocument.store(xMSF, xTextDocument, sPath, "writer8_template", false, "Template could not be saved to" + sPath);
@@ -191,15 +193,23 @@ public class FaxWizardDialogImpl extends FaxWizardDialog {
xWindow.setVisible(false);
closeDocument();
//myFaxDoc.xTextDocument.unlockControllers();
- PropertyValue loadValues[] = new PropertyValue[1];
+
+ PropertyValue loadValues[] = new PropertyValue[3];
loadValues[0] = new PropertyValue();
loadValues[0].Name = "AsTemplate";
+ loadValues[1] = new PropertyValue();
+ loadValues[1].Name = "MacroExecutionMode";
+ loadValues[1].Value = new Short (MacroExecMode.ALWAYS_EXECUTE);
+ loadValues[2] = new PropertyValue();
+ loadValues[2].Name = "UpdateDocMode";
+ loadValues[2].Value = new Short (com.sun.star.document.UpdateDocMode.FULL_UPDATE);
+
if (bEditTemplate) {
loadValues[0].Value = Boolean.FALSE;
} else {
loadValues[0].Value = Boolean.TRUE;
}
- Object oDoc = OfficeDocument.load(Desktop.getDesktop(xMSF), sPath, "_blank", loadValues);
+ Object oDoc = OfficeDocument.load(Desktop.getDesktop(xMSF), sPath, "_default", loadValues);
XTextDocument xTextDocument = (com.sun.star.text.XTextDocument) oDoc;
XMultiServiceFactory xDocMSF = (XMultiServiceFactory) UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDocument);
ViewHandler myViewHandler = new ViewHandler(xDocMSF, xTextDocument);
@@ -672,4 +682,4 @@ public class FaxWizardDialogImpl extends FaxWizardDialog {
- \ No newline at end of file
+