diff options
author | Kurt Zenker <kz@openoffice.org> | 2004-11-27 08:05:43 +0000 |
---|---|---|
committer | Kurt Zenker <kz@openoffice.org> | 2004-11-27 08:05:43 +0000 |
commit | f32b373549998f19d1ce735eab76299e3844e5f3 (patch) | |
tree | 8bdff5a4f9236dc3d2b0eeb77a578cec9df5f2b9 /wizards | |
parent | 2c54015705b8aa101f8e08f622faa2392529afcf (diff) |
INTEGRATION: CWS qwizardsbf1 (1.2.2); FILE MERGED
2004/11/22 08:10:54 tv 1.2.2.7: controllers need to be unlocked again after locking
Issue number:
Submitted by:
Reviewed by:
2004/11/01 14:52:13 tv 1.2.2.6: #i36078# prevented flickering in footer
2004/10/26 14:58:09 tv 1.2.2.5: #i36072# removed empty frames in final document
2004/10/25 13:23:15 tv 1.2.2.4: #i35890# updated date in letter wizard and fax wizard preview
2004/09/30 11:53:27 tv 1.2.2.3: removed unnecessary import statements
2004/09/24 14:07:00 tv 1.2.2.2: change in Frame handling: disconnect preview frame from desktop, implement own terminateListener, close preview via XCloseable
2004/09/22 14:29:48 tv 1.2.2.1: #i30337# load generated document with target '_default'.
Diffstat (limited to 'wizards')
-rw-r--r-- | wizards/com/sun/star/wizards/fax/FaxDocument.java | 41 |
1 files changed, 28 insertions, 13 deletions
diff --git a/wizards/com/sun/star/wizards/fax/FaxDocument.java b/wizards/com/sun/star/wizards/fax/FaxDocument.java index 4ac0de9c4d43..70e4fa3cede3 100644 --- a/wizards/com/sun/star/wizards/fax/FaxDocument.java +++ b/wizards/com/sun/star/wizards/fax/FaxDocument.java @@ -1,18 +1,17 @@ package com.sun.star.wizards.fax; import com.sun.star.wizards.common.*; -import com.sun.star.wizards.document.*; import com.sun.star.wizards.text.*; import com.sun.star.frame.XDesktop; -import com.sun.star.table.BorderLine; +import com.sun.star.frame.XTerminateListener; import com.sun.star.text.*; +import com.sun.star.lang.WrappedTargetException; import com.sun.star.lang.XMultiServiceFactory; import com.sun.star.awt.XWindowPeer; import com.sun.star.uno.Exception; import com.sun.star.uno.UnoRuntime; -import com.sun.star.beans.PropertyValue; -import com.sun.star.drawing.XShape; import com.sun.star.beans.XPropertySet; +import com.sun.star.container.NoSuchElementException; import com.sun.star.awt.Size; import com.sun.star.style.NumberingType; import com.sun.star.style.ParagraphAdjust; @@ -23,9 +22,11 @@ public class FaxDocument extends TextDocument { XDesktop xDesktop; Size DocSize = null; + boolean keepLogoFrame = true; + boolean keepTypeFrame = true; - public FaxDocument(XMultiServiceFactory xMSF) { - super(xMSF); + public FaxDocument(XMultiServiceFactory xMSF, XTerminateListener listener) { + super(xMSF, listener); } public XWindowPeer getWindowPeer() { @@ -44,8 +45,14 @@ public class FaxDocument extends TextDocument { } } + public void updateDateFields() { + TextFieldHandler FH = new TextFieldHandler(xMSFDoc, xTextDocument); + FH.updateDateFields(); + } + public void switchFooter(String sPageStyle, boolean bState, boolean bPageNumber, String sText) { if (xTextDocument != null) { + xTextDocument.lockControllers(); try { XStyleFamiliesSupplier xStyleFamiliesSupplier = (XStyleFamiliesSupplier) com.sun.star.uno.UnoRuntime.queryInterface(XStyleFamiliesSupplier.class, xTextDocument); com.sun.star.container.XNameAccess xNameAccess = null; @@ -77,6 +84,7 @@ public class FaxDocument extends TextDocument { } else { Helper.setUnoPropertyValue(xPageStyle, "FooterIsOn", new Boolean(false)); } + xTextDocument.unlockControllers(); } catch (Exception exception) { exception.printStackTrace(System.out); } @@ -121,13 +129,20 @@ public class FaxDocument extends TextDocument { myFieldHandler.removeUserFieldByContent(""); } - public void loadResult(String sLoadURL, boolean bAsTemplate) { - PropertyValue loadValues[] = new PropertyValue[1]; - loadValues[0] = new PropertyValue(); - loadValues[0].Name = "AsTemplate"; - loadValues[0].Value = new Boolean(bAsTemplate); - String sFrame = "_self"; - OfficeDocument.load(xDesktop, sLoadURL, sFrame, loadValues); + public void killEmptyFrames() { + try { + if (!keepLogoFrame) { + XTextFrame xTF = TextFrameHandler.getFrameByName("Company Logo", xTextDocument); + if (xTF != null) xTF.dispose(); + } + if (!keepTypeFrame) { + XTextFrame xTF = TextFrameHandler.getFrameByName("Communication Type", xTextDocument); + if (xTF != null) xTF.dispose(); + } + } catch (Exception e) { + e.printStackTrace(); + } + } } |