letter

16:38:49.034 INFO  jd.cli.Main - Decompiling letter.jar
package com.sun.star.wizards.letter;

import com.sun.star.beans.XPropertyAccess;
import com.sun.star.lang.XInitialization;
import com.sun.star.lang.XMultiServiceFactory;
import com.sun.star.lang.XServiceInfo;
import com.sun.star.lang.XTypeProvider;
import com.sun.star.task.XJob;
import com.sun.star.task.XJobExecutor;
import com.sun.star.uno.Type;
import com.sun.star.wizards.common.PropertyNames;
import java.io.PrintStream;

public class CallWizard$WizardImplementation
  implements XInitialization, XTypeProvider, XServiceInfo, XJobExecutor
{
  private static final String __serviceName = "com.sun.star.wizards.letter.CallWizard";
  private XMultiServiceFactory xmultiservicefactory;
  
  public CallWizard$WizardImplementation(XMultiServiceFactory paramXMultiServiceFactory)
  {
    xmultiservicefactory = paramXMultiServiceFactory;
    if (xmultiservicefactory != null) {}
  }
  
  public void trigger(String paramString)
  {
    if (paramString.equalsIgnoreCase(PropertyNames.START))
    {
      LetterWizardDialogImpl localLetterWizardDialogImpl = new LetterWizardDialogImpl(xmultiservicefactory);
      if (!LetterWizardDialogImpl.running) {
        localLetterWizardDialogImpl.startWizard(xmultiservicefactory, null);
      }
    }
  }
  
  public void initialize(Object[] paramArrayOfObject)
    throws com.sun.star.uno.Exception
  {}
  
  public String[] getSupportedServiceNames()
  {
    String[] arrayOfString = new String[1];
    arrayOfString[0] = "com.sun.star.wizards.letter.CallWizard";
    
    return arrayOfString;
  }
  
  public boolean supportsService(String paramString)
  {
    boolean bool = false;
    if (paramString.equals("com.sun.star.wizards.letter.CallWizard")) {
      bool = true;
    }
    return bool;
  }
  
  public byte[] getImplementationId()
  {
    byte[] arrayOfByte = new byte[0];
    try
    {
      arrayOfByte = (PropertyNames.EMPTY_STRING + hashCode()).getBytes();
    }
    catch (Exception localException)
    {
      System.err.println(localException);
    }
    return arrayOfByte;
  }
  
  public String getImplementationName()
  {
    return WizardImplementation.class.getName();
  }
  
  public Type[] getTypes()
  {
    Type[] arrayOfType = new Type[0];
    try
    {
      arrayOfType = new Type[] { new Type(XPropertyAccess.class), new Type(XJob.class), new Type(XJobExecutor.class), new Type(XTypeProvider.class), new Type(XServiceInfo.class), new Type(XInitialization.class) };
    }
    catch (Exception localException)
    {
      System.err.println(localException);
    }
    return arrayOfType;
  }
}

/* Location:
 * Qualified Name:     com.sun.star.wizards.letter.CallWizard.WizardImplementation
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.star.wizards.letter;

import com.sun.star.beans.XPropertyAccess;
import com.sun.star.comp.loader.FactoryHelper;
import com.sun.star.lang.XInitialization;
import com.sun.star.lang.XMultiServiceFactory;
import com.sun.star.lang.XServiceInfo;
import com.sun.star.lang.XSingleServiceFactory;
import com.sun.star.lang.XTypeProvider;
import com.sun.star.registry.XRegistryKey;
import com.sun.star.task.XJob;
import com.sun.star.task.XJobExecutor;
import com.sun.star.uno.Type;
import com.sun.star.wizards.common.PropertyNames;
import java.io.PrintStream;

public class CallWizard
{
  public static XSingleServiceFactory __getServiceFactory(String paramString, XMultiServiceFactory paramXMultiServiceFactory, XRegistryKey paramXRegistryKey)
  {
    XSingleServiceFactory localXSingleServiceFactory = null;
    if (paramString.equals(WizardImplementation.class.getName())) {
      localXSingleServiceFactory = FactoryHelper.getServiceFactory(WizardImplementation.class, "com.sun.star.wizards.letter.CallWizard", paramXMultiServiceFactory, paramXRegistryKey);
    }
    return localXSingleServiceFactory;
  }
  
  public static class WizardImplementation
    implements XInitialization, XTypeProvider, XServiceInfo, XJobExecutor
  {
    private static final String __serviceName = "com.sun.star.wizards.letter.CallWizard";
    private XMultiServiceFactory xmultiservicefactory;
    
    public WizardImplementation(XMultiServiceFactory paramXMultiServiceFactory)
    {
      xmultiservicefactory = paramXMultiServiceFactory;
      if (xmultiservicefactory != null) {}
    }
    
    public void trigger(String paramString)
    {
      if (paramString.equalsIgnoreCase(PropertyNames.START))
      {
        LetterWizardDialogImpl localLetterWizardDialogImpl = new LetterWizardDialogImpl(xmultiservicefactory);
        if (!LetterWizardDialogImpl.running) {
          localLetterWizardDialogImpl.startWizard(xmultiservicefactory, null);
        }
      }
    }
    
    public void initialize(Object[] paramArrayOfObject)
      throws com.sun.star.uno.Exception
    {}
    
    public String[] getSupportedServiceNames()
    {
      String[] arrayOfString = new String[1];
      arrayOfString[0] = "com.sun.star.wizards.letter.CallWizard";
      
      return arrayOfString;
    }
    
    public boolean supportsService(String paramString)
    {
      boolean bool = false;
      if (paramString.equals("com.sun.star.wizards.letter.CallWizard")) {
        bool = true;
      }
      return bool;
    }
    
    public byte[] getImplementationId()
    {
      byte[] arrayOfByte = new byte[0];
      try
      {
        arrayOfByte = (PropertyNames.EMPTY_STRING + hashCode()).getBytes();
      }
      catch (Exception localException)
      {
        System.err.println(localException);
      }
      return arrayOfByte;
    }
    
    public String getImplementationName()
    {
      return WizardImplementation.class.getName();
    }
    
    public Type[] getTypes()
    {
      Type[] arrayOfType = new Type[0];
      try
      {
        arrayOfType = new Type[] { new Type(XPropertyAccess.class), new Type(XJob.class), new Type(XJobExecutor.class), new Type(XTypeProvider.class), new Type(XServiceInfo.class), new Type(XInitialization.class) };
      }
      catch (Exception localException)
      {
        System.err.println(localException);
      }
      return arrayOfType;
    }
  }
}

/* Location:
 * Qualified Name:     com.sun.star.wizards.letter.CallWizard
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.star.wizards.letter;

import com.sun.star.wizards.common.ConfigGroup;

public class CGLetter
  extends ConfigGroup
{
  public int cp_Style;
  public boolean cp_BusinessPaper;
  public CGPaperElementLocation cp_CompanyLogo = new CGPaperElementLocation();
  public CGPaperElementLocation cp_CompanyAddress = new CGPaperElementLocation();
  public boolean cp_PaperCompanyAddressReceiverField;
  public boolean cp_PaperFooter;
  public double cp_PaperFooterHeight;
  public int cp_Norm;
  public boolean cp_PrintCompanyLogo;
  public boolean cp_PrintCompanyAddressReceiverField;
  public boolean cp_PrintLetterSigns;
  public boolean cp_PrintSubjectLine;
  public boolean cp_PrintSalutation;
  public boolean cp_PrintBendMarks;
  public boolean cp_PrintGreeting;
  public boolean cp_PrintFooter;
  public String cp_Salutation;
  public String cp_Greeting;
  public int cp_SenderAddressType;
  public String cp_SenderCompanyName;
  public String cp_SenderStreet;
  public String cp_SenderPostCode;
  public String cp_SenderState;
  public String cp_SenderCity;
  public int cp_ReceiverAddressType;
  public String cp_Footer;
  public boolean cp_FooterOnlySecondPage;
  public boolean cp_FooterPageNumbers;
  public int cp_CreationType;
  public String cp_TemplateName;
  public String cp_TemplatePath;
}

/* Location:
 * Qualified Name:     com.sun.star.wizards.letter.CGLetter
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.star.wizards.letter;

import com.sun.star.wizards.common.ConfigGroup;

public class CGLetterWizard
  extends ConfigGroup
{
  public int cp_LetterType;
  public CGLetter cp_BusinessLetter = new CGLetter();
  public CGLetter cp_PrivateOfficialLetter = new CGLetter();
  public CGLetter cp_PrivateLetter = new CGLetter();
}

/* Location:
 * Qualified Name:     com.sun.star.wizards.letter.CGLetterWizard
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.star.wizards.letter;

import com.sun.star.wizards.common.ConfigGroup;

public class CGPaperElementLocation
  extends ConfigGroup
{
  public boolean cp_Display;
  public double cp_Width;
  public double cp_Height;
  public double cp_X;
  public double cp_Y;
}

/* Location:
 * Qualified Name:     com.sun.star.wizards.letter.CGPaperElementLocation
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.star.wizards.letter;

import com.sun.star.beans.XPropertySet;
import com.sun.star.drawing.XShape;
import com.sun.star.lang.XMultiServiceFactory;
import com.sun.star.table.BorderLine;
import com.sun.star.text.TextContentAnchorType;
import com.sun.star.text.WrapTextMode;
import com.sun.star.text.XText;
import com.sun.star.text.XTextCursor;
import com.sun.star.text.XTextDocument;
import com.sun.star.text.XTextFrame;
import com.sun.star.uno.Exception;
import com.sun.star.uno.UnoRuntime;
import com.sun.star.wizards.common.Helper;
import com.sun.star.wizards.common.PropertyNames;

public class LetterDocument$BusinessPaperObject
{
  public int iWidth;
  public int iHeight;
  public int iXPos;
  public int iYPos;
  XTextFrame xFrame;
  XShape xShape;
  
  public LetterDocument$BusinessPaperObject(LetterDocument paramLetterDocument, String paramString, int paramInt1, int paramInt2, int paramInt3, int paramInt4)
  {
    iWidth = paramInt1;
    iHeight = paramInt2;
    iXPos = paramInt3;
    iYPos = paramInt4;
    try
    {
      xFrame = ((XTextFrame)UnoRuntime.queryInterface(XTextFrame.class, xMSFDoc.createInstance("com.sun.star.text.TextFrame")));
      xShape = ((XShape)UnoRuntime.queryInterface(XShape.class, xFrame));
      
      setFramePosition();
      Helper.setUnoPropertyValue(xShape, "AnchorType", TextContentAnchorType.AT_PAGE);
      Helper.setUnoPropertyValue(xShape, "SizeType", new Short((short)1));
      
      Helper.setUnoPropertyValue(xFrame, "TextWrap", WrapTextMode.THROUGHT);
      Helper.setUnoPropertyValue(xFrame, "Opaque", Boolean.TRUE);
      Helper.setUnoPropertyValue(xFrame, "BackColor", Integer.valueOf(15790320));
      
      BorderLine localBorderLine = new BorderLine();
      OuterLineWidth = 0;
      Helper.setUnoPropertyValue(xFrame, "LeftBorder", localBorderLine);
      Helper.setUnoPropertyValue(xFrame, "RightBorder", localBorderLine);
      Helper.setUnoPropertyValue(xFrame, "TopBorder", localBorderLine);
      Helper.setUnoPropertyValue(xFrame, "BottomBorder", localBorderLine);
      Helper.setUnoPropertyValue(xFrame, "Print", Boolean.FALSE);
      
      XTextCursor localXTextCursor1 = xTextDocument.getText().createTextCursor();
      localXTextCursor1.gotoEnd(true);
      XText localXText1 = xTextDocument.getText();
      localXText1.insertTextContent(localXTextCursor1, xFrame, false);
      
      XText localXText2 = xFrame.getText();
      XTextCursor localXTextCursor2 = localXText2.createTextCursor();
      XPropertySet localXPropertySet = (XPropertySet)UnoRuntime.queryInterface(XPropertySet.class, localXTextCursor2);
      localXPropertySet.setPropertyValue("CharWeight", new Float(150.0F));
      localXPropertySet.setPropertyValue("CharColor", Integer.valueOf(16777215));
      localXPropertySet.setPropertyValue("CharFontName", "Albany");
      localXPropertySet.setPropertyValue("CharHeight", new Float(18.0F));
      
      localXText2.insertString(localXTextCursor2, paramString, false);
    }
    catch (Exception localException)
    {
      localException.printStackTrace(System.out);
    }
  }
  
  public void setFramePosition()
  {
    Helper.setUnoPropertyValue(xFrame, "HoriOrient", new Short((short)0));
    Helper.setUnoPropertyValue(xFrame, "VertOrient", new Short((short)0));
    Helper.setUnoPropertyValue(xFrame, PropertyNames.PROPERTY_HEIGHT, new Integer(iHeight));
    Helper.setUnoPropertyValue(xFrame, PropertyNames.PROPERTY_WIDTH, new Integer(iWidth));
    Helper.setUnoPropertyValue(xFrame, "HoriOrientPosition", new Integer(iXPos));
    Helper.setUnoPropertyValue(xFrame, "VertOrientPosition", new Integer(iYPos));
    Helper.setUnoPropertyValue(xFrame, "HoriOrientRelation", new Short((short)7));
    Helper.setUnoPropertyValue(xFrame, "VertOrientRelation", new Short((short)7));
  }
  
  public void removeFrame()
  {
    if (xFrame != null) {
      try
      {
        this$0.xTextDocument.getText().removeTextContent(xFrame);
      }
      catch (Exception localException)
      {
        localException.printStackTrace(System.out);
      }
    }
  }
}

/* Location:
 * Qualified Name:     com.sun.star.wizards.letter.LetterDocument.BusinessPaperObject
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.star.wizards.letter;

import com.sun.star.awt.XWindowPeer;
import com.sun.star.beans.XPropertySet;
import com.sun.star.container.XNameAccess;
import com.sun.star.container.XNameContainer;
import com.sun.star.drawing.XShape;
import com.sun.star.frame.XDesktop;
import com.sun.star.frame.XTerminateListener;
import com.sun.star.lang.XMultiServiceFactory;
import com.sun.star.style.ParagraphAdjust;
import com.sun.star.style.XStyle;
import com.sun.star.style.XStyleFamiliesSupplier;
import com.sun.star.table.BorderLine;
import com.sun.star.text.PageNumberType;
import com.sun.star.text.TextContentAnchorType;
import com.sun.star.text.WrapTextMode;
import com.sun.star.text.XText;
import com.sun.star.text.XTextCursor;
import com.sun.star.text.XTextDocument;
import com.sun.star.text.XTextField;
import com.sun.star.text.XTextFrame;
import com.sun.star.text.XTextSectionsSupplier;
import com.sun.star.uno.Exception;
import com.sun.star.uno.UnoRuntime;
import com.sun.star.wizards.common.Configuration;
import com.sun.star.wizards.common.Helper;
import com.sun.star.wizards.common.PropertyNames;
import com.sun.star.wizards.text.TextDocument;
import com.sun.star.wizards.text.TextFieldHandler;
import com.sun.star.wizards.text.TextFrameHandler;
import com.sun.star.wizards.text.TextSectionHandler;

public class LetterDocument
  extends TextDocument
{
  XDesktop xDesktop;
  boolean keepLogoFrame = true;
  boolean keepBendMarksFrame = true;
  boolean keepLetterSignsFrame = true;
  boolean keepSenderAddressRepeatedFrame = true;
  boolean keepAddressFrame = true;
  
  public LetterDocument(XMultiServiceFactory paramXMultiServiceFactory, XTerminateListener paramXTerminateListener)
  {
    super(paramXMultiServiceFactory, paramXTerminateListener, "WIZARD_LIVE_PREVIEW");
  }
  
  public XWindowPeer getWindowPeer()
  {
    return (XWindowPeer)UnoRuntime.queryInterface(XWindowPeer.class, xTextDocument);
  }
  
  public void switchElement(String paramString, boolean paramBoolean)
  {
    try
    {
      TextSectionHandler localTextSectionHandler = new TextSectionHandler(xMSF, xTextDocument);
      Object localObject = xTextSectionsSupplier.getTextSections().getByName(paramString);
      Helper.setUnoPropertyValue(localObject, "IsVisible", Boolean.valueOf(paramBoolean));
    }
    catch (Exception localException)
    {
      localException.printStackTrace(System.out);
    }
  }
  
  public void updateDateFields()
  {
    TextFieldHandler localTextFieldHandler = new TextFieldHandler(xMSFDoc, xTextDocument);
    localTextFieldHandler.updateDateFields();
  }
  
  public void switchFooter(String paramString1, boolean paramBoolean1, boolean paramBoolean2, String paramString2)
  {
    if (xTextDocument != null) {
      try
      {
        xTextDocument.lockControllers();
        XStyleFamiliesSupplier localXStyleFamiliesSupplier = (XStyleFamiliesSupplier)UnoRuntime.queryInterface(XStyleFamiliesSupplier.class, xTextDocument);
        XNameAccess localXNameAccess = null;
        localXNameAccess = localXStyleFamiliesSupplier.getStyleFamilies();
        
        XNameContainer localXNameContainer = null;
        localXNameContainer = (XNameContainer)UnoRuntime.queryInterface(XNameContainer.class, localXNameAccess.getByName("PageStyles"));
        
        XStyle localXStyle = (XStyle)UnoRuntime.queryInterface(XStyle.class, localXNameContainer.getByName(paramString1));
        if (paramBoolean1)
        {
          Helper.setUnoPropertyValue(localXStyle, "FooterIsOn", Boolean.TRUE);
          XText localXText = (XText)UnoRuntime.queryInterface(XText.class, Helper.getUnoPropertyValue(localXStyle, "FooterText"));
          localXText.setString(paramString2);
          if (paramBoolean2)
          {
            XTextCursor localXTextCursor = localXText.createTextCursor();
            localXTextCursor.gotoEnd(false);
            localXText.insertControlCharacter(localXTextCursor, (short)0, false);
            XPropertySet localXPropertySet1 = (XPropertySet)UnoRuntime.queryInterface(XPropertySet.class, localXTextCursor);
            localXPropertySet1.setPropertyValue("ParaAdjust", ParagraphAdjust.CENTER);
            XTextField localXTextField = (XTextField)UnoRuntime.queryInterface(XTextField.class, xMSFDoc.createInstance("com.sun.star.text.TextField.PageNumber"));
            XPropertySet localXPropertySet2 = (XPropertySet)UnoRuntime.queryInterface(XPropertySet.class, localXTextField);
            localXPropertySet2.setPropertyValue("SubType", PageNumberType.CURRENT);
            localXPropertySet2.setPropertyValue("NumberingType", new Short((short)4));
            localXText.insertTextContent(localXText.getEnd(), localXTextField, false);
          }
        }
        else
        {
          Helper.setUnoPropertyValue(localXStyle, "FooterIsOn", Boolean.FALSE);
        }
        xTextDocument.unlockControllers();
      }
      catch (Exception localException)
      {
        localException.printStackTrace(System.out);
      }
    }
  }
  
  public boolean hasElement(String paramString)
  {
    if (xTextDocument != null)
    {
      TextSectionHandler localTextSectionHandler = new TextSectionHandler(xMSF, xTextDocument);
      return localTextSectionHandler.hasTextSectionByName(paramString);
    }
    return false;
  }
  
  public void switchUserField(String paramString1, String paramString2, boolean paramBoolean)
  {
    TextFieldHandler localTextFieldHandler = new TextFieldHandler(xMSF, xTextDocument);
    if (paramBoolean) {
      localTextFieldHandler.changeUserFieldContent(paramString1, paramString2);
    } else {
      localTextFieldHandler.changeUserFieldContent(paramString1, PropertyNames.EMPTY_STRING);
    }
  }
  
  public void fillSenderWithUserData()
  {
    try
    {
      TextFieldHandler localTextFieldHandler = new TextFieldHandler(xMSFDoc, xTextDocument);
      Object localObject = Configuration.getConfigurationRoot(xMSF, "org.openoffice.UserProfile/Data", false);
      localTextFieldHandler.changeUserFieldContent("Company", (String)Helper.getUnoObjectbyName(localObject, "o"));
      localTextFieldHandler.changeUserFieldContent("Street", (String)Helper.getUnoObjectbyName(localObject, "street"));
      localTextFieldHandler.changeUserFieldContent("PostCode", (String)Helper.getUnoObjectbyName(localObject, "postalcode"));
      localTextFieldHandler.changeUserFieldContent("City", (String)Helper.getUnoObjectbyName(localObject, "l"));
      localTextFieldHandler.changeUserFieldContent(PropertyNames.PROPERTY_STATE, (String)Helper.getUnoObjectbyName(localObject, "st"));
    }
    catch (Exception localException)
    {
      localException.printStackTrace(System.out);
    }
  }
  
  public void killEmptyUserFields()
  {
    TextFieldHandler localTextFieldHandler = new TextFieldHandler(xMSF, xTextDocument);
    localTextFieldHandler.removeUserFieldByContent(PropertyNames.EMPTY_STRING);
  }
  
  public void killEmptyFrames()
  {
    try
    {
      XTextFrame localXTextFrame;
      if (!keepLogoFrame)
      {
        localXTextFrame = TextFrameHandler.getFrameByName("Company Logo", xTextDocument);
        if (localXTextFrame != null) {
          localXTextFrame.dispose();
        }
      }
      if (!keepBendMarksFrame)
      {
        localXTextFrame = TextFrameHandler.getFrameByName("Bend Marks", xTextDocument);
        if (localXTextFrame != null) {
          localXTextFrame.dispose();
        }
      }
      if (!keepLetterSignsFrame)
      {
        localXTextFrame = TextFrameHandler.getFrameByName("Letter Signs", xTextDocument);
        if (localXTextFrame != null) {
          localXTextFrame.dispose();
        }
      }
      if (!keepSenderAddressRepeatedFrame)
      {
        localXTextFrame = TextFrameHandler.getFrameByName("Sender Address Repeated", xTextDocument);
        if (localXTextFrame != null) {
          localXTextFrame.dispose();
        }
      }
      if (!keepAddressFrame)
      {
        localXTextFrame = TextFrameHandler.getFrameByName("Sender Address", xTextDocument);
        if (localXTextFrame != null) {
          localXTextFrame.dispose();
        }
      }
    }
    catch (Exception localException)
    {
      localException.printStackTrace();
    }
  }
  
  public class BusinessPaperObject
  {
    public int iWidth;
    public int iHeight;
    public int iXPos;
    public int iYPos;
    XTextFrame xFrame;
    XShape xShape;
    
    public BusinessPaperObject(String paramString, int paramInt1, int paramInt2, int paramInt3, int paramInt4)
    {
      iWidth = paramInt1;
      iHeight = paramInt2;
      iXPos = paramInt3;
      iYPos = paramInt4;
      try
      {
        xFrame = ((XTextFrame)UnoRuntime.queryInterface(XTextFrame.class, xMSFDoc.createInstance("com.sun.star.text.TextFrame")));
        xShape = ((XShape)UnoRuntime.queryInterface(XShape.class, xFrame));
        
        setFramePosition();
        Helper.setUnoPropertyValue(xShape, "AnchorType", TextContentAnchorType.AT_PAGE);
        Helper.setUnoPropertyValue(xShape, "SizeType", new Short((short)1));
        
        Helper.setUnoPropertyValue(xFrame, "TextWrap", WrapTextMode.THROUGHT);
        Helper.setUnoPropertyValue(xFrame, "Opaque", Boolean.TRUE);
        Helper.setUnoPropertyValue(xFrame, "BackColor", Integer.valueOf(15790320));
        
        BorderLine localBorderLine = new BorderLine();
        OuterLineWidth = 0;
        Helper.setUnoPropertyValue(xFrame, "LeftBorder", localBorderLine);
        Helper.setUnoPropertyValue(xFrame, "RightBorder", localBorderLine);
        Helper.setUnoPropertyValue(xFrame, "TopBorder", localBorderLine);
        Helper.setUnoPropertyValue(xFrame, "BottomBorder", localBorderLine);
        Helper.setUnoPropertyValue(xFrame, "Print", Boolean.FALSE);
        
        XTextCursor localXTextCursor1 = xTextDocument.getText().createTextCursor();
        localXTextCursor1.gotoEnd(true);
        XText localXText1 = xTextDocument.getText();
        localXText1.insertTextContent(localXTextCursor1, xFrame, false);
        
        XText localXText2 = xFrame.getText();
        XTextCursor localXTextCursor2 = localXText2.createTextCursor();
        XPropertySet localXPropertySet = (XPropertySet)UnoRuntime.queryInterface(XPropertySet.class, localXTextCursor2);
        localXPropertySet.setPropertyValue("CharWeight", new Float(150.0F));
        localXPropertySet.setPropertyValue("CharColor", Integer.valueOf(16777215));
        localXPropertySet.setPropertyValue("CharFontName", "Albany");
        localXPropertySet.setPropertyValue("CharHeight", new Float(18.0F));
        
        localXText2.insertString(localXTextCursor2, paramString, false);
      }
      catch (Exception localException)
      {
        localException.printStackTrace(System.out);
      }
    }
    
    public void setFramePosition()
    {
      Helper.setUnoPropertyValue(xFrame, "HoriOrient", new Short((short)0));
      Helper.setUnoPropertyValue(xFrame, "VertOrient", new Short((short)0));
      Helper.setUnoPropertyValue(xFrame, PropertyNames.PROPERTY_HEIGHT, new Integer(iHeight));
      Helper.setUnoPropertyValue(xFrame, PropertyNames.PROPERTY_WIDTH, new Integer(iWidth));
      Helper.setUnoPropertyValue(xFrame, "HoriOrientPosition", new Integer(iXPos));
      Helper.setUnoPropertyValue(xFrame, "VertOrientPosition", new Integer(iYPos));
      Helper.setUnoPropertyValue(xFrame, "HoriOrientRelation", new Short((short)7));
      Helper.setUnoPropertyValue(xFrame, "VertOrientRelation", new Short((short)7));
    }
    
    public void removeFrame()
    {
      if (xFrame != null) {
        try
        {
          xTextDocument.getText().removeTextContent(xFrame);
        }
        catch (Exception localException)
        {
          localException.printStackTrace(System.out);
        }
      }
    }
  }
}

/* Location:
 * Qualified Name:     com.sun.star.wizards.letter.LetterDocument
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.star.wizards.letter;

import com.sun.star.awt.FontDescriptor;
import com.sun.star.awt.XCheckBox;
import com.sun.star.awt.XComboBox;
import com.sun.star.awt.XControl;
import com.sun.star.awt.XFixedText;
import com.sun.star.awt.XListBox;
import com.sun.star.awt.XNumericField;
import com.sun.star.awt.XRadioButton;
import com.sun.star.awt.XTextComponent;
import com.sun.star.lang.XMultiServiceFactory;
import com.sun.star.wizards.common.HelpIds;
import com.sun.star.wizards.common.Helper;
import com.sun.star.wizards.common.PropertyNames;
import com.sun.star.wizards.ui.UIConsts;
import com.sun.star.wizards.ui.WizardDialog;

public abstract class LetterWizardDialog
  extends WizardDialog
  implements LetterWizardDialogConst, UIConsts
{
  XRadioButton optBusinessLetter;
  XListBox lstBusinessStyle;
  XCheckBox chkBusinessPaper;
  XRadioButton optPrivOfficialLetter;
  XListBox lstPrivOfficialStyle;
  XRadioButton optPrivateLetter;
  XListBox lstPrivateStyle;
  XFixedText lblBusinessStyle;
  XFixedText lblPrivOfficialStyle;
  XFixedText lblTitle1;
  XFixedText lblPrivateStyle;
  XFixedText lblIntroduction;
  XControl ImageControl3;
  XCheckBox chkPaperCompanyLogo;
  XNumericField numLogoHeight;
  XNumericField numLogoX;
  XNumericField numLogoWidth;
  XNumericField numLogoY;
  XCheckBox chkPaperCompanyAddress;
  XNumericField numAddressHeight;
  XNumericField numAddressX;
  XNumericField numAddressWidth;
  XNumericField numAddressY;
  XCheckBox chkCompanyReceiver;
  XCheckBox chkPaperFooter;
  XNumericField numFooterHeight;
  XFixedText lblLogoHeight;
  XFixedText lblLogoWidth;
  XControl FixedLine5;
  XControl FixedLine6;
  XFixedText lblFooterHeight;
  XFixedText lblLogoX;
  XFixedText lblLogoY;
  XFixedText lblAddressHeight;
  XFixedText lblAddressWidth;
  XFixedText lblAddressX;
  XFixedText lblAddressY;
  XFixedText lblTitle2;
  XListBox lstLetterNorm;
  XCheckBox chkUseLogo;
  XCheckBox chkUseAddressReceiver;
  XCheckBox chkUseSigns;
  XCheckBox chkUseSubject;
  XCheckBox chkUseSalutation;
  XComboBox lstSalutation;
  XCheckBox chkUseBendMarks;
  XCheckBox chkUseGreeting;
  XComboBox lstGreeting;
  XCheckBox chkUseFooter;
  XFixedText lblLetterNorm;
  XFixedText lblTitle3;
  XRadioButton optSenderPlaceholder;
  XRadioButton optSenderDefine;
  XTextComponent txtSenderName;
  XTextComponent txtSenderStreet;
  XTextComponent txtSenderPostCode;
  XTextComponent txtSenderState;
  XTextComponent txtSenderCity;
  XRadioButton optReceiverPlaceholder;
  XRadioButton optReceiverDatabase;
  XFixedText lblSenderAddress;
  XControl FixedLine2;
  XFixedText lblReceiverAddress;
  XFixedText lblSenderName;
  XFixedText lblSenderStreet;
  XFixedText lblPostCodeCity;
  XFixedText lblTitle4;
  XTextComponent txtFooter;
  XCheckBox chkFooterNextPages;
  XCheckBox chkFooterPageNumbers;
  XFixedText lblFooter;
  XFixedText lblTitle5;
  XTextComponent txtTemplateName;
  XControl fileTemplatePath;
  XRadioButton optCreateLetter;
  XRadioButton optMakeChanges;
  XFixedText lblFinalExplanation1;
  XFixedText lblProceed;
  XFixedText lblFinalExplanation2;
  XControl ImageControl2;
  XFixedText lblTemplateName;
  XFixedText lblTemplatePath;
  XFixedText lblTitle6;
  XFixedText Label9;
  FontDescriptor fontDescriptor1 = new FontDescriptor();
  FontDescriptor fontDescriptor2 = new FontDescriptor();
  FontDescriptor fontDescriptor5 = new FontDescriptor();
  FontDescriptor fontDescriptor6 = new FontDescriptor();
  LetterWizardDialogResources resources;
  
  public LetterWizardDialog(XMultiServiceFactory paramXMultiServiceFactory)
  {
    super(paramXMultiServiceFactory, 40820);
    
    resources = new LetterWizardDialogResources(paramXMultiServiceFactory);
    
    Helper.setUnoPropertyValues(xDialogModel, new String[] { PropertyNames.PROPERTY_CLOSEABLE, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_MOVEABLE, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_TITLE, PropertyNames.PROPERTY_WIDTH }, new Object[] { Boolean.TRUE, Integer.valueOf(210), Boolean.TRUE, "LetterWizardDialog", Integer.valueOf(104), Integer.valueOf(52), INTEGERS[1], new Short(1), resources.resLetterWizardDialog_title, Integer.valueOf(310) });
    
    fontDescriptor1.Weight = 150.0F;
    fontDescriptor1.Underline = 1;
    fontDescriptor2.Weight = 100.0F;
    fontDescriptor5.Weight = 100.0F;
    fontDescriptor6.Weight = 150.0F;
  }
  
  public void buildStep1()
  {
    optBusinessLetter = insertRadioButton("optBusinessLetter", "optBusinessLetterItemChanged", new String[] { PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { INTEGERS[8], HelpIds.getHelpIdString(40769), resources.resoptBusinessLetter_value, "optBusinessLetter", Integer.valueOf(97), Integer.valueOf(28), INTEGERS[1], new Short(1), Integer.valueOf(184) });
    
    optPrivOfficialLetter = insertRadioButton("optPrivOfficialLetter", "optPrivOfficialLetterItemChanged", new String[] { PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { INTEGERS[8], HelpIds.getHelpIdString(40770), resources.resoptPrivOfficialLetter_value, "optPrivOfficialLetter", Integer.valueOf(97), Integer.valueOf(74), INTEGERS[1], new Short(2), Integer.valueOf(184) });
    
    optPrivateLetter = insertRadioButton("optPrivateLetter", "optPrivateLetterItemChanged", new String[] { PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { INTEGERS[8], HelpIds.getHelpIdString(40771), resources.resoptPrivateLetter_value, "optPrivateLetter", Integer.valueOf(97), Integer.valueOf(106), INTEGERS[1], new Short(3), Integer.valueOf(184) });
    
    lstBusinessStyle = insertListBox("lstBusinessStyle", LSTBUSINESSSTYLE_ACTION_PERFORMED, "lstBusinessStyleItemChanged", new String[] { "Dropdown", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { Boolean.TRUE, INTEGER_12, HelpIds.getHelpIdString(40772), "lstBusinessStyle", Integer.valueOf(180), INTEGER_40, INTEGERS[1], new Short(4), Integer.valueOf(74) });
    
    chkBusinessPaper = insertCheckBox("chkBusinessPaper", "chkBusinessPaperItemChanged", new String[] { PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { INTEGERS[8], HelpIds.getHelpIdString(40773), resources.reschkBusinessPaper_value, "chkBusinessPaper", Integer.valueOf(110), Integer.valueOf(56), new Short(0), INTEGERS[1], new Short(5), Integer.valueOf(168) });
    
    lstPrivOfficialStyle = insertListBox("lstPrivOfficialStyle", LSTPRIVOFFICIALSTYLE_ACTION_PERFORMED, "lstPrivOfficialStyleItemChanged", new String[] { "Dropdown", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { Boolean.TRUE, INTEGER_12, HelpIds.getHelpIdString(40774), "lstPrivOfficialStyle", Integer.valueOf(180), Integer.valueOf(86), INTEGERS[1], new Short(6), Integer.valueOf(74) });
    
    lstPrivateStyle = insertListBox("lstPrivateStyle", LSTPRIVATESTYLE_ACTION_PERFORMED, "lstPrivateStyleItemChanged", new String[] { "Dropdown", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { Boolean.TRUE, INTEGER_12, HelpIds.getHelpIdString(40775), "lstPrivateStyle", Integer.valueOf(180), Integer.valueOf(118), INTEGERS[1], new Short(7), Integer.valueOf(74) });
    
    lblBusinessStyle = insertLabel("lblBusinessStyle", new String[] { PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { INTEGERS[8], resources.reslblBusinessStyle_value, "lblBusinessStyle", Integer.valueOf(110), Integer.valueOf(42), INTEGERS[1], new Short(48), Integer.valueOf(60) });
    
    lblPrivOfficialStyle = insertLabel("lblPrivOfficialStyle", new String[] { PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { INTEGERS[8], resources.reslblPrivOfficialStyle_value, "lblPrivOfficialStyle", Integer.valueOf(110), Integer.valueOf(88), INTEGERS[1], new Short(49), Integer.valueOf(60) });
    
    lblTitle1 = insertLabel("lblTitle1", new String[] { PropertyNames.FONT_DESCRIPTOR, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { fontDescriptor6, INTEGER_16, resources.reslblTitle1_value, Boolean.TRUE, "lblTitle1", Integer.valueOf(91), INTEGERS[8], INTEGERS[1], new Short(55), Integer.valueOf(212) });
    
    lblPrivateStyle = insertLabel("lblPrivateStyle", new String[] { PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { INTEGERS[8], resources.reslblPrivateStyle_value, "lblPrivateStyle", Integer.valueOf(110), Integer.valueOf(120), INTEGERS[1], new Short(74), Integer.valueOf(60) });
    
    lblIntroduction = insertLabel("lblIntroduction", new String[] { PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { Integer.valueOf(39), resources.reslblIntroduction_value, Boolean.TRUE, "lblIntroduction", Integer.valueOf(104), Integer.valueOf(145), INTEGERS[1], new Short(80), Integer.valueOf(199) });
    
    ImageControl3 = insertInfoImage(92, 145, 1);
  }
  
  public void buildStep2()
  {
    chkPaperCompanyLogo = insertCheckBox("chkPaperCompanyLogo", "chkPaperCompanyLogoItemChanged", new String[] { PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { INTEGERS[8], HelpIds.getHelpIdString(40776), resources.reschkPaperCompanyLogo_value, "chkPaperCompanyLogo", Integer.valueOf(97), Integer.valueOf(28), new Short(0), INTEGERS[2], new Short(8), Integer.valueOf(68) });
    
    numLogoHeight = insertNumericField("numLogoHeight", "numLogoHeightTextChanged", new String[] { PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "Spin", PropertyNames.PROPERTY_STEP, "StrictFormat", PropertyNames.PROPERTY_TABINDEX, "Value", PropertyNames.PROPERTY_WIDTH }, new Object[] { INTEGER_12, HelpIds.getHelpIdString(40777), "numLogoHeight", Integer.valueOf(138), INTEGER_40, Boolean.TRUE, INTEGERS[2], Boolean.TRUE, new Short(9), INTEGERS[3], Integer.valueOf(30) });
    
    numLogoX = insertNumericField("numLogoX", "numLogoXTextChanged", new String[] { PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "Spin", PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, "Value", PropertyNames.PROPERTY_WIDTH }, new Object[] { INTEGER_12, HelpIds.getHelpIdString(40778), "numLogoX", Integer.valueOf(266), INTEGER_40, Boolean.TRUE, INTEGERS[2], new Short(10), INTEGERS[0], Integer.valueOf(30) });
    
    numLogoWidth = insertNumericField("numLogoWidth", "numLogoWidthTextChanged", new String[] { PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "Spin", PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, "Value", PropertyNames.PROPERTY_WIDTH }, new Object[] { INTEGER_12, HelpIds.getHelpIdString(40779), "numLogoWidth", Integer.valueOf(138), Integer.valueOf(56), Boolean.TRUE, INTEGERS[2], new Short(11), new Double(3.8D), Integer.valueOf(30) });
    
    numLogoY = insertNumericField("numLogoY", "numLogoYTextChanged", new String[] { PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "Spin", PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, "Value", PropertyNames.PROPERTY_WIDTH }, new Object[] { INTEGER_12, HelpIds.getHelpIdString(40780), "numLogoY", Integer.valueOf(266), Integer.valueOf(56), Boolean.TRUE, INTEGERS[2], new Short(12), new Double(-3.4D), Integer.valueOf(30) });
    
    chkPaperCompanyAddress = insertCheckBox("chkPaperCompanyAddress", "chkPaperCompanyAddressItemChanged", new String[] { PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { INTEGERS[8], HelpIds.getHelpIdString(40781), resources.reschkPaperCompanyAddress_value, "chkPaperCompanyAddress", Intege
1 2 3 4

Further reading...

For more information on Java 1.5 Tiger, you may find Java 1.5 Tiger, A developer's Notebook by D. Flanagan and B. McLaughlin from O'Reilly of interest.

New!JAR listings


Copyright 2006-2017. Infinite Loop Ltd