report

16:51:09.454 INFO  jd.cli.Main - Decompiling report.jar
package com.sun.star.wizards.report;

import com.sun.star.beans.PropertyValue;
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.lib.uno.helper.PropertySet;
import com.sun.star.sdb.application.XDatabaseDocumentUI;
import com.sun.star.task.XJobExecutor;
import com.sun.star.text.XTextDocument;
import com.sun.star.uno.Type;
import com.sun.star.wizards.common.NamedValueCollection;
import com.sun.star.wizards.common.Properties;
import com.sun.star.wizards.common.PropertyNames;
import java.util.logging.Level;
import java.util.logging.Logger;

public class CallReportWizard$ReportWizardImplementation
  extends PropertySet
  implements XInitialization, XServiceInfo, XTypeProvider, XJobExecutor
{
  private PropertyValue[] m_wizardContext;
  private static final String __serviceName = "com.sun.star.wizards.report.CallReportWizard";
  private XMultiServiceFactory xmultiservicefactory;
  
  public CallReportWizard$ReportWizardImplementation(XMultiServiceFactory paramXMultiServiceFactory)
  {
    xmultiservicefactory = paramXMultiServiceFactory;
  }
  
  public void trigger(String paramString)
  {
    try
    {
      Object localObject;
      if (paramString.compareTo(PropertyNames.START) == 0)
      {
        if (!CallReportWizard.bWizardstartedalready)
        {
          localObject = new ReportWizard(xmultiservicefactory, m_wizardContext);
          ((ReportWizard)localObject).startReportWizard();
        }
        CallReportWizard.bWizardstartedalready = false;
      }
      else if (paramString.compareTo("fill") == 0)
      {
        localObject = new Dataimport(xmultiservicefactory);
        if (m_wizardContext != null)
        {
          NamedValueCollection localNamedValueCollection = new NamedValueCollection(m_wizardContext);
          XTextDocument localXTextDocument = (XTextDocument)localNamedValueCollection.queryOrDefault("TextDocument", null, XTextDocument.class);
          XDatabaseDocumentUI localXDatabaseDocumentUI = (XDatabaseDocumentUI)localNamedValueCollection.queryOrDefault("DocumentUI", null, XDatabaseDocumentUI.class);
          if (localXTextDocument != null) {
            ((Dataimport)localObject).createReport(xmultiservicefactory, localXDatabaseDocumentUI, localXTextDocument, m_wizardContext);
          }
        }
      }
    }
    catch (Exception localException)
    {
      Logger.getLogger(CallReportWizard.class.getName()).log(Level.SEVERE, null, localException);
    }
    System.gc();
  }
  
  public void initialize(Object[] paramArrayOfObject)
    throws com.sun.star.uno.Exception
  {
    m_wizardContext = Properties.convertToPropertyValueArray(paramArrayOfObject);
  }
  
  public String[] getSupportedServiceNames()
  {
    String[] arrayOfString = new String[1];
    
    arrayOfString[0] = "com.sun.star.wizards.report.CallReportWizard";
    
    return arrayOfString;
  }
  
  public boolean supportsService(String paramString)
  {
    boolean bool = false;
    if (paramString.equals("com.sun.star.wizards.report.CallReportWizard")) {
      bool = true;
    }
    return bool;
  }
  
  public byte[] getImplementationId()
  {
    byte[] arrayOfByte = new byte[0];
    try
    {
      arrayOfByte = (PropertyNames.EMPTY_STRING + hashCode()).getBytes();
    }
    catch (Exception localException)
    {
      Logger.getLogger(CallReportWizard.class.getName()).log(Level.SEVERE, null, localException);
    }
    return arrayOfByte;
  }
  
  public String getImplementationName()
  {
    return ReportWizardImplementation.class.getName();
  }
  
  public Type[] getTypes()
  {
    Type[] arrayOfType = new Type[0];
    try
    {
      arrayOfType = new Type[] { new Type(XJobExecutor.class), new Type(XTypeProvider.class), new Type(XServiceInfo.class), new Type(XInitialization.class) };
    }
    catch (Exception localException)
    {
      Logger.getLogger(CallReportWizard.class.getName()).log(Level.SEVERE, null, localException);
    }
    return arrayOfType;
  }
}

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

import com.sun.star.beans.PropertyValue;
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.lib.uno.helper.PropertySet;
import com.sun.star.registry.XRegistryKey;
import com.sun.star.sdb.application.XDatabaseDocumentUI;
import com.sun.star.task.XJobExecutor;
import com.sun.star.text.XTextDocument;
import com.sun.star.uno.Type;
import com.sun.star.wizards.common.NamedValueCollection;
import com.sun.star.wizards.common.Properties;
import com.sun.star.wizards.common.PropertyNames;
import java.util.logging.Level;
import java.util.logging.Logger;

public class CallReportWizard
{
  static boolean bWizardstartedalready;
  
  public static XSingleServiceFactory __getServiceFactory(String paramString, XMultiServiceFactory paramXMultiServiceFactory, XRegistryKey paramXRegistryKey)
  {
    XSingleServiceFactory localXSingleServiceFactory = null;
    if (paramString.equals(ReportWizardImplementation.class.getName())) {
      localXSingleServiceFactory = FactoryHelper.getServiceFactory(ReportWizardImplementation.class, "com.sun.star.wizards.report.CallReportWizard", paramXMultiServiceFactory, paramXRegistryKey);
    }
    return localXSingleServiceFactory;
  }
  
  public static class ReportWizardImplementation
    extends PropertySet
    implements XInitialization, XServiceInfo, XTypeProvider, XJobExecutor
  {
    private PropertyValue[] m_wizardContext;
    private static final String __serviceName = "com.sun.star.wizards.report.CallReportWizard";
    private XMultiServiceFactory xmultiservicefactory;
    
    public ReportWizardImplementation(XMultiServiceFactory paramXMultiServiceFactory)
    {
      xmultiservicefactory = paramXMultiServiceFactory;
    }
    
    public void trigger(String paramString)
    {
      try
      {
        Object localObject;
        if (paramString.compareTo(PropertyNames.START) == 0)
        {
          if (!CallReportWizard.bWizardstartedalready)
          {
            localObject = new ReportWizard(xmultiservicefactory, m_wizardContext);
            ((ReportWizard)localObject).startReportWizard();
          }
          CallReportWizard.bWizardstartedalready = false;
        }
        else if (paramString.compareTo("fill") == 0)
        {
          localObject = new Dataimport(xmultiservicefactory);
          if (m_wizardContext != null)
          {
            NamedValueCollection localNamedValueCollection = new NamedValueCollection(m_wizardContext);
            XTextDocument localXTextDocument = (XTextDocument)localNamedValueCollection.queryOrDefault("TextDocument", null, XTextDocument.class);
            XDatabaseDocumentUI localXDatabaseDocumentUI = (XDatabaseDocumentUI)localNamedValueCollection.queryOrDefault("DocumentUI", null, XDatabaseDocumentUI.class);
            if (localXTextDocument != null) {
              ((Dataimport)localObject).createReport(xmultiservicefactory, localXDatabaseDocumentUI, localXTextDocument, m_wizardContext);
            }
          }
        }
      }
      catch (Exception localException)
      {
        Logger.getLogger(CallReportWizard.class.getName()).log(Level.SEVERE, null, localException);
      }
      System.gc();
    }
    
    public void initialize(Object[] paramArrayOfObject)
      throws com.sun.star.uno.Exception
    {
      m_wizardContext = Properties.convertToPropertyValueArray(paramArrayOfObject);
    }
    
    public String[] getSupportedServiceNames()
    {
      String[] arrayOfString = new String[1];
      
      arrayOfString[0] = "com.sun.star.wizards.report.CallReportWizard";
      
      return arrayOfString;
    }
    
    public boolean supportsService(String paramString)
    {
      boolean bool = false;
      if (paramString.equals("com.sun.star.wizards.report.CallReportWizard")) {
        bool = true;
      }
      return bool;
    }
    
    public byte[] getImplementationId()
    {
      byte[] arrayOfByte = new byte[0];
      try
      {
        arrayOfByte = (PropertyNames.EMPTY_STRING + hashCode()).getBytes();
      }
      catch (Exception localException)
      {
        Logger.getLogger(CallReportWizard.class.getName()).log(Level.SEVERE, null, localException);
      }
      return arrayOfByte;
    }
    
    public String getImplementationName()
    {
      return ReportWizardImplementation.class.getName();
    }
    
    public Type[] getTypes()
    {
      Type[] arrayOfType = new Type[0];
      try
      {
        arrayOfType = new Type[] { new Type(XJobExecutor.class), new Type(XTypeProvider.class), new Type(XServiceInfo.class), new Type(XInitialization.class) };
      }
      catch (Exception localException)
      {
        Logger.getLogger(CallReportWizard.class.getName()).log(Level.SEVERE, null, localException);
      }
      return arrayOfType;
    }
  }
}

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

import com.sun.star.awt.ActionEvent;
import com.sun.star.awt.FontDescriptor;
import com.sun.star.awt.XActionListener;
import com.sun.star.awt.XReschedule;
import com.sun.star.awt.XWindow;
import com.sun.star.beans.PropertyValue;
import com.sun.star.frame.XFrame;
import com.sun.star.lang.EventObject;
import com.sun.star.lang.XComponent;
import com.sun.star.lang.XMultiServiceFactory;
import com.sun.star.sdb.application.XDatabaseDocumentUI;
import com.sun.star.text.XTextDocument;
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.common.Resource;
import com.sun.star.wizards.db.RecordParser;
import com.sun.star.wizards.ui.UnoDialog2;
import java.util.logging.Level;
import java.util.logging.Logger;

public class Dataimport
  extends UnoDialog2
  implements XActionListener
{
  IReportDocument CurReportDocument;
  static boolean bStopProcess;
  static String sProgressDBConnection;
  static String sProgressDataImport;
  static String sProgressBaseCurRecord;
  static String sProgressCurRecord;
  static String sProgressTitle;
  static String sStop;
  
  public Dataimport(XMultiServiceFactory paramXMultiServiceFactory)
  {
    super(paramXMultiServiceFactory);
    super.addResourceHandler("ReportWizard", "dbw");
    sProgressDBConnection = m_oResource.getResText(1034);
    sProgressDataImport = m_oResource.getResText(2467);
    sProgressTitle = m_oResource.getResText(2462);
    sProgressBaseCurRecord = m_oResource.getResText(2463);
    sStop = m_oResource.getResText(1021);
  }
  
  public void disposing(EventObject paramEventObject) {}
  
  public void actionPerformed(ActionEvent paramActionEvent)
  {
    CurReportDocument.StopProcess();
  }
  
  public void showProgressDisplay(XMultiServiceFactory paramXMultiServiceFactory, boolean paramBoolean)
  {
    try
    {
      Helper.setUnoPropertyValues(xDialogModel, new String[] { PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TITLE, PropertyNames.PROPERTY_WIDTH }, new Object[] { Integer.valueOf(84), Integer.valueOf(0), sProgressTitle, Integer.valueOf(180) });
      
      FontDescriptor localFontDescriptor = new FontDescriptor();
      Weight = 150.0F;
      if (paramBoolean)
      {
        insertControlModel("com.sun.star.awt.UnoControlFixedTextModel", "lblProgressDBConnection", new String[] { PropertyNames.FONT_DESCRIPTOR, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_WIDTH }, new Object[] { localFontDescriptor, Integer.valueOf(10), sProgressDBConnection, Integer.valueOf(6), Integer.valueOf(6), Integer.valueOf(0), Integer.valueOf(150) });
        
        insertControlModel("com.sun.star.awt.UnoControlFixedTextModel", "lblProgressDataImport", new String[] { PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_WIDTH }, new Object[] { Integer.valueOf(10), sProgressDataImport, Integer.valueOf(6), Integer.valueOf(24), Integer.valueOf(0), Integer.valueOf(120) });
      }
      else
      {
        insertControlModel("com.sun.star.awt.UnoControlFixedTextModel", "lblProgressDataImport", new String[] { PropertyNames.FONT_DESCRIPTOR, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_WIDTH }, new Object[] { localFontDescriptor, Integer.valueOf(10), sProgressDataImport, Integer.valueOf(6), Integer.valueOf(24), Integer.valueOf(0), Integer.valueOf(120) });
      }
      insertControlModel("com.sun.star.awt.UnoControlFixedTextModel", "lblCurProgress", new String[] { PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_WIDTH }, new Object[] { Integer.valueOf(10), PropertyNames.EMPTY_STRING, Integer.valueOf(12), Integer.valueOf(42), Integer.valueOf(0), Integer.valueOf(120) });
      
      insertButton("cmdCancel", 10000, this, new String[] { PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH, PropertyNames.PROPERTY_LABEL }, new Object[] { Integer.valueOf(14), HelpIds.getHelpIdString(34321), Integer.valueOf(74), Integer.valueOf(58), Integer.valueOf(0), new Short(1), Integer.valueOf(40), sStop });
      
      createWindowPeer(CurReportDocument.getWizardParent());
      calculateDialogPosition(CurReportDocument.getFrame().getComponentWindow().getPosSize());
      xWindow.setVisible(true);
      xReschedule.reschedule();
    }
    catch (com.sun.star.uno.Exception localException)
    {
      Logger.getLogger(Dataimport.class.getName()).log(Level.SEVERE, null, localException);
    }
    catch (Exception localException1)
    {
      Logger.getLogger(Dataimport.class.getName()).log(Level.SEVERE, null, localException1);
    }
  }
  
  public void importReportData(XMultiServiceFactory paramXMultiServiceFactory, Dataimport paramDataimport, IReportDocument paramIReportDocument, PropertyValue[] paramArrayOfPropertyValue)
  {
    if (CurReportDocument.reconnectToDatabase(paramXMultiServiceFactory, paramArrayOfPropertyValue))
    {
      modifyFontWeight("lblProgressDBConnection", 100.0F);
      modifyFontWeight("lblProgressDataImport", 150.0F);
      CurReportDocument.insertDatabaseDatatoReportDocument(paramXMultiServiceFactory);
    }
    xComponent.dispose();
    CurReportDocument.getRecordParser().dispose();
  }
  
  public void createReport(XMultiServiceFactory paramXMultiServiceFactory, XDatabaseDocumentUI paramXDatabaseDocumentUI, XTextDocument paramXTextDocument, PropertyValue[] paramArrayOfPropertyValue)
  {
    CurReportDocument = ReportTextImplementation.create(paramXMultiServiceFactory, paramXDatabaseDocumentUI, paramXTextDocument, m_oResource);
    showProgressDisplay(paramXMultiServiceFactory, true);
    importReportData(paramXMultiServiceFactory, this, CurReportDocument, paramArrayOfPropertyValue);
  }
}

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

import com.sun.star.beans.PropertyState;
import com.sun.star.beans.UnknownPropertyException;
import com.sun.star.beans.XPropertySet;
import com.sun.star.beans.XPropertyState;
import com.sun.star.container.XNameAccess;
import com.sun.star.container.XNamed;
import com.sun.star.table.XCell;
import com.sun.star.table.XCellRange;
import com.sun.star.table.XTableColumns;
import com.sun.star.table.XTableRows;
import com.sun.star.text.XDependentTextField;
import com.sun.star.text.XTextCursor;
import com.sun.star.text.XTextRange;
import com.sun.star.text.XTextTable;
import com.sun.star.text.XTextTablesSupplier;
import com.sun.star.uno.AnyConverter;
import com.sun.star.uno.Exception;
import com.sun.star.uno.UnoRuntime;
import com.sun.star.util.XNumberFormats;
import com.sun.star.wizards.common.Helper;
import com.sun.star.wizards.common.NumberFormatter;
import com.sun.star.wizards.common.PropertyNames;
import com.sun.star.wizards.db.BlindtextCreator;
import com.sun.star.wizards.db.FieldColumn;
import com.sun.star.wizards.db.RecordParser;
import com.sun.star.wizards.text.TextDocument;
import com.sun.star.wizards.text.TextFieldHandler;
import com.sun.star.wizards.text.TextTableHandler;
import java.io.PrintStream;

public class DBColumn
{
  public XCell xValCell;
  public XTextRange xValTextCell;
  public XTextCursor xValCellCursor;
  public XNumberFormats xValCellNumberFormats;
  public XCell xNameCell;
  public XTextRange xNameTextCell;
  public boolean bAlignLeft;
  public Object DefaultValue;
  public String CharFontName;
  public int FormatKey;
  public PropertyState PropertyState;
  public int ValColumn = 1;
  public int ValRow = 0;
  public FieldColumn CurDBField;
  private XTextTable xTextTable;
  private XTableColumns xTableColumns;
  private XCellRange xCellRange;
  public XNamed xTableName;
  private boolean bIsGroupColumn;
  TextDocument oTextDocument;
  RecordParser CurDBMetaData;
  RecordTable CurRecordTable;
  TextTableHandler oTextTableHandler;
  
  public DBColumn(TextTableHandler paramTextTableHandler, RecordParser paramRecordParser, int paramInt)
    throws Exception
  {
    CurRecordTable = new RecordTable(paramTextTableHandler);
    initializeRecordTableMembers(CurRecordTable, paramTextTableHandler, paramRecordParser, paramInt, false);
  }
  
  public DBColumn(RecordTable paramRecordTable, TextTableHandler paramTextTableHandler, RecordParser paramRecordParser, int paramInt, boolean paramBoolean)
    throws Exception
  {
    initializeRecordTableMembers(paramRecordTable, paramTextTableHandler, paramRecordParser, paramInt, paramBoolean);
  }
  
  public DBColumn(RecordTable paramRecordTable, TextTableHandler paramTextTableHandler, RecordParser paramRecordParser, int paramInt)
    throws Exception
  {
    initializeRecordTableMembers(paramRecordTable, paramTextTableHandler, paramRecordParser, paramInt, false);
  }
  
  private void initializeRecordTableMembers(RecordTable paramRecordTable, TextTableHandler paramTextTableHandler, RecordParser paramRecordParser, int paramInt, boolean paramBoolean)
    throws Exception
  {
    oTextTableHandler = paramTextTableHandler;
    CurDBMetaData = paramRecordParser;
    CurRecordTable = paramRecordTable;
    bIsGroupColumn = false;
    if (CurDBMetaData.RecordFieldColumns != null) {
      CurDBField = CurDBMetaData.getFieldColumnByFieldName(CurDBMetaData.RecordFieldColumns[paramInt].getFieldName());
    } else {
      CurDBField = CurDBMetaData.getFieldColumnByFieldName(CurDBMetaData.getRecordFieldName(paramInt));
    }
    if (paramBoolean) {
      assignCells(paramInt, true);
    } else {
      for (int i = 0; i < CurRecordTable.xTableColumns.getCount(); i++) {
        assignCells(i, false);
      }
    }
  }
  
  private boolean assignCells(int paramInt, boolean paramBoolean)
  {
    try
    {
      XCell localXCell = CurRecordTable.xCellRange.getCellByPosition(paramInt, 0);
      XTextRange localXTextRange = (XTextRange)UnoRuntime.queryInterface(XTextRange.class, localXCell);
      String str = "Column";
      XTextCursor localXTextCursor = TextDocument.createTextCursor(localXCell);
      if ((isNameCell(localXTextCursor, CurDBField.getFieldName(), str)) || (paramBoolean))
      {
        xNameCell = localXCell;
        xNameTextCell = localXTextRange;
        xValCell = CurRecordTable.xCellRange.getCellByPosition(paramInt, 1);
        xValTextCell = ((XTextRange)UnoRuntime.queryInterface(XTextRange.class, xValCell));
        xValCellCursor = TextDocument.createTextCursor(xValCell);
        ValColumn = paramInt;
        return true;
      }
    }
    catch (Exception localException)
    {
      localException.printStackTrace(System.out);
    }
    return false;
  }
  
  public DBColumn(TextTableHandler paramTextTableHandler, RecordParser paramRecordParser, String paramString1, int paramInt, String paramString2, DBColumn paramDBColumn)
    throws Exception
  {
    oTextTableHandler = paramTextTableHandler;
    CurDBMetaData = paramRecordParser;
    CurDBField = CurDBMetaData.getFieldColumnByDisplayName(paramString1);
    bIsGroupColumn = true;
    getTableColumns(paramString2);
    xNameCell = xNameCell;
    xNameTextCell = xNameTextCell;
    xValCell = xValCell;
    xValTextCell = xValTextCell;
    xValCellCursor = TextDocument.createTextCursor(xValCell);
    ValColumn = ValColumn;
    ValRow = ValRow;
    initializeNumberFormat();
  }
  
  public DBColumn(TextTableHandler paramTextTableHandler, RecordParser paramRecordParser, String paramString1, int paramInt, String paramString2)
    throws Exception
  {
    oTextTableHandler = paramTextTableHandler;
    CurDBMetaData = paramRecordParser;
    CurDBField = CurDBMetaData.getFieldColumnByFieldName(paramString1);
    bIsGroupColumn = true;
    
    getTableColumns(paramString2);
    
    XTableRows localXTableRows = null;
    try
    {
      localXTableRows = xTextTable.getRows();
    }
    catch (NullPointerException localNullPointerException)
    {
      localNullPointerException.printStackTrace();
    }
    for (int i = 0; i < xTableColumns.getCount(); i++) {
      for (int j = 0; j < localXTableRows.getCount(); j++)
      {
        XCell localXCell = xCellRange.getCellByPosition(i, j);
        XTextRange localXTextRange = (XTextRange)UnoRuntime.queryInterface(XTextRange.class, localXCell);
        String str = paramString2.substring(4);
        XTextCursor localXTextCursor = TextDocument.createTextCursor(localXCell);
        if (isNameCell(localXTextCursor, CurDBField.getFieldName(), str))
        {
          xNameCell = localXCell;
          xNameTextCell = localXTextRange;
        }
        else
        {
          xValCell = localXCell;
          xValTextCell = localXTextRange;
          xValCellCursor = localXTextCursor;
          ValColumn = i;
          ValRow = j;
          checkforLeftAlignment();
        }
      }
    }
  }
  
  private void getTableColumns(String paramString)
  {
    try
    {
      XNameAccess localXNameAccess = oTextTableHandler.xTextTablesSupplier.getTextTables();
      if (localXNameAccess.hasByName(paramString))
      {
        Object localObject = localXNameAccess.getByName(paramString);
        xCellRange = ((XCellRange)UnoRuntime.queryInterface(XCellRange.class, localObject));
        xTextTable = ((XTextTable)UnoRuntime.queryInterface(XTextTable.class, localObject));
        xTableName = ((XNamed)UnoRuntime.queryInterface(XNamed.class, localObject));
        xTableColumns = xTextTable.getColumns();
      }
    }
    catch (Exception localException)
    {
      localException.printStackTrace();
    }
  }
  
  public void initializeNumberFormat()
  {
    if (CurDBField.isBoolean())
    {
      NumberFormatter localNumberFormatter = oTextTableHandler.getNumberFormatter();
      int i = localNumberFormatter.setBooleanReportDisplayNumberFormat();
      localNumberFormatter.setNumberFormat(xValCell, i, localNumberFormatter);
    }
    else
    {
      oTextTableHandler.getNumberFormatter().setNumberFormat(xValCell, CurDBField.getDBFormatKey(), CurDBMetaData.getNumberFormatter());
    }
    setCellFont();
  }
  
  public void insertColumnData(TextFieldHandler paramTextFieldHandler, boolean paramBoolean)
  {
    insertUserFieldToTableCell(paramTextFieldHandler);
    replaceValueCellofTable(paramBoolean);
  }
  
  public void insertUserFieldToTableCell(TextFieldHandler paramTextFieldHandler)
  {
    XTextCursor localXTextCursor = TextDocument.createTextCursor(xNameCell);
    localXTextCursor.gotoStart(false);
    localXTextCursor.gotoEnd(true);
    localXTextCursor.setString(PropertyNames.EMPTY_STRING);
    paramTextFieldHandler.insertUserField(localXTextCursor, CurDBField.getFieldName(), CurDBField.getFieldTitle());
  }
  
  public void insertUserFieldToTableCell(TextFieldHandler paramTextFieldHandler, XCell paramXCell)
  {
    XTextCursor localXTextCursor = TextDocument.createTextCursor(paramXCell);
    localXTextCursor.gotoStart(false);
    localXTextCursor.gotoEnd(true);
    localXTextCursor.setString(PropertyNames.EMPTY_STRING);
    paramTextFieldHandler.insertUserField(localXTextCursor, CurDBField.getFieldName(), CurDBField.getFieldTitle());
  }
  
  public void formatValueCell()
  {
    initializeNumberFormat();
    if (checkforLeftAlignment()) {
      bAlignLeft = true;
    }
  }
  
  private boolean checkforLeftAlignment()
  {
    bAlignLeft = ((CurDBField.isNumberFormat()) && (ValColumn == xTableColumns.getCount() - 1));
    return bAlignLeft;
  }
  
  public void modifyCellContent(XCellRange paramXCellRange, Object paramObject)
  {
    try
    {
      xValCell = paramXCellRange.getCellByPosition(ValColumn, ValRow);
      xValTextCell = ((XTextRange)UnoRuntime.queryInterface(XTextRange.class, xValCell));
      modifyCellContent(paramObject);
      if (bAlignLeft)
      {
        xValCellCursor = TextDocument.createTextCursor(xValCell);
        Helper.setUnoPropertyValue(xValCellCursor, "ParaAdjust", new Integer(0));
      }
    }
    catch (Exception localException)
    {
      localException.printStackTrace(System.out);
    }
  }
  
  public void modifyCellContent(Object paramObject)
  {
    double d = 0.0D;
    try
    {
      if (xValCell != null) {
        if (AnyConverter.isString(paramObject))
        {
          String str = AnyConverter.toString(paramObject);
          xValTextCell.setString(str);
        }
        else
        {
          if (AnyConverter.isBoolean(paramObject)) {
            d = AnyConverter.toInt(paramObject);
          }
          if (AnyConverter.isByte(paramObject)) {
            d = AnyConverter.toByte(paramObject);
          } else if (AnyConverter.isDouble(paramObject)) {
            d = AnyConverter.toDouble(paramObject);
          } else if (AnyConverter.isFloat(paramObject)) {
            d = AnyConverter.toFloat(paramObject);
          } else if (AnyConverter.isInt(paramObject)) {
            d = AnyConverter.toInt(paramObject);
          } else if (AnyConverter.isLong(paramObject)) {
            d = AnyConverter.toLong(paramObject);
          } else if (AnyConverter.isShort(paramObject)) {
            d = AnyConverter.toShort(paramObject);
          }
          xValCell.setValue(d);
        }
      }
    }
    catch (Exception localException)
    {
      System.err.println(localException);
    }
  }
  
  public void replaceValueCellofTable(boolean paramBoolean)
  {
    try
    {
      Object localObject;
      if ((!bIsGroupColumn) && (!CurDBField.isNumberFormat())) {
        localObject = BlindtextCreator.adjustBlindTextlength(CurDBField.getFieldTitle(), CurDBField.getFieldWidth(), paramBoolean, bIsGroupColumn, CurDBMetaData.getRecordFieldNames());
      } else {
        localObject = CurDBField.getDefaultValue();
      }
      modifyCellContent(localObject);
      if (bAlignLeft) {
        Helper.setUnoPropertyValue(xValCellCursor, "ParaAdjust", new Integer(0));
      }
      int i = CurDBField.getFieldType();
      if ((i == -7) || (i == 16))
      {
        CharFontName = "StarSymbol";
        Helper.setUnoPropertyValue(xValCellCursor, "CharFontName", CharFontName);
        if (!bIsGroupColumn) {
          Helper.setUnoPropertyValue(xValCellCursor, "ParaAdjust", new Integer(3));
        }
      }
      else if (PropertyState == PropertyState.DEFAULT_VALUE)
      {
        XPropertyState localXPropertyState = (XPropertyState)UnoRuntime.queryInterface(XPropertyState.class, xValCellCursor);
        localXPropertyState.setPropertyToDefault("CharFontName");
      }
      else if (PropertyState == PropertyState.DIRECT_VALUE)
      {
        Helper.setUnoPropertyValue(xValCellCursor, "CharFontName", CharFontName);
      }
    }
    catch (UnknownPropertyException localUnknownPropertyException)
    {
      localUnknownPropertyException.printStackTrace(System.out);
    }
  }
  
  public void setCellFont()
  {
    try
    {
      int i = CurDBField.getFieldType();
      if ((i == -7) || (i == 16))
      {
        CharFontName = "StarSymbol";
        PropertyState = PropertyState.DIRECT_VALUE;
        xValCellCursor.gotoStart(false);
        xValCellCursor.gotoEnd(true);
        Helper.setUnoPropertyValue(xValCellCursor, "CharFontName", CharFontName);
      }
      else
      {
        XPropertyState localXPropertyState = (XPropertyState)UnoRuntime.queryInterface(XPropertyState.class, xValCellCursor);
        PropertyState = localXPropertyState.getPropertyState("CharFontName");
        CharFontName = AnyConverter.toString(Helper.getUnoPropertyValue(xValCellCursor, "CharFontName"));
      }
    }
    catch (Exception localException)
    {
      localException.printStackTrace(System.out);
    }
  }
  
  private boolean isNameCell(XTextCursor paramXTextCursor, String paramString1, String paramString2)
  {
    try
    {
      paramXTextCursor.gotoStart(false);
      XTextRange localXTextRange = paramXTextCursor.getEnd();
      Object localObject = Helper.getUnoPropertyValue(localXTextRange, "TextField");
      if (AnyConverter.isVoid(localObject)) {
        return false;
      }
      XDependentTextField localXDependentTextField = (XDependentTextField)UnoRuntime.queryInterface(XDependentTextField.class, localObject);
      XPropertySet localXPropertySet = localXDependentTextField.getTextFieldMaster();
      String str1 = (String)localXPropertySet.getPropertyValue(PropertyNames.PROPERTY_NAME);
      boolean bool = false;
      if ((str1.startsWith(paramString2)) || (str1.equals(paramString1)))
      {
        bool = true;
      }
      else
      {
        String str2 = paramString1 + "_renamed_";
        if (!str1.startsWith(str2)) {}
      }
      return true;
    }
    catch (Exception localException)
    {
      localException.printStackTrace(System.out);
    }
    return true;
  }
}

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

import com.sun.star.awt.XListBox;
import com.sun.star.wizards.common.PropertyNames;
import com.sun.star.wizards.ui.UnoDialog;
import com.sun.star.wizards.ui.XFieldSelectionListener;

class GroupFieldHandler$FieldSelectionListener
  implements XFieldSelectionListener
{
  GroupFieldHandler$FieldSelectionListener(GroupFieldHandler paramGroupFieldHandler) {}
  
  public void moveItemDown(String paramString)
  {
    GroupFieldHandler.access$000(this$0).refreshGroupFields(this$0.xSelectedFieldsListBox.getItems());
  }
  
  public void moveItemUp(String paramString)
  {
    GroupFieldHandler.access$000(this$0).refreshGroupFields(this$0.xSelectedFieldsListBox.getItems());
  }
  
  public void shiftFromLeftToRight(String[] paramArrayOfString1, String[] paramArrayOfString2)
  {
    String str = paramArrayOfString1[0];
    int i = this$0.xSelectedFieldsListBox.getItemCount();
    String[] arrayOfString = this$0.xFieldsListBox.getItems();
    GroupFieldHandler.access$000(this$0).liveupdate_addGroupNametoDocument(arrayOfString, str, GroupFieldHandler.access$100(this$0), GroupFieldHandler.access$000(this$0).getReportPath(), i);
    GroupFieldHandler.access$200(this$0).setControlProperty("lblBlindTextNote_1", PropertyNames.PROPERTY_ENABLED, Boolean.TRUE);
    if (i >= 4) {
      GroupFieldHandler.access$300(this$0, false, false);
    }
  }
  
  public void shiftFromRightToLeft(String[] paramArrayOfString1, String[] paramArrayOfString2)
  {
    int i = paramArrayOfString1.length;
    if (i > 0)
    {
      String str = paramArrayOfString1[0];
      String[] arrayOfString1 = this$0.xSelectedFieldsListBox.getItems();
      GroupFieldHandler.access$000(this$0).liveupdate_removeGroupName(arrayOfString1, str, GroupFieldHandler.access$100(this$0));
      String[] arrayOfString2 = this$0.xSelectedFieldsListBox.getItems();
      GroupFieldHandler.access$400(this$0).setControlProperty("lblBlindTextNote_1", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(arrayOfString2.length == 0));
    }
  }
  
  public int getID()
  {
    return 2;
  }
  
  public void setID(String paramString) {}
}

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

import com.sun.star.awt.XListBox;
import com.sun.star.wizards.common.JavaTools;
import com.sun.star.wizards.common.PropertyNames;
import com.sun.star.wizards.common.Resource;
import com.sun.star.wizards.db.CommandMetaData;
import com.sun.star.wizards.db.QueryMetaData;
import com.sun.star.wizards.ui.FieldSelection;
import com.sun.star.wizards.ui.UnoDialog;
import com.sun.star.wizards.ui.WizardDialog;
import com.sun.star.wizards.ui.XFieldSelectionListener;
import java.util.Vector;

public class GroupFieldHandler
  extends FieldSelection
{
  private IReportDocument CurReportDocument;
  private Vector GroupFieldVector = new Vector();
  private QueryMetaData CurDBMetaData;
  private WizardDialog oWizardDialog;
  private static final short MAXSELFIELDS = 4;
  
  public GroupFieldHandler(IReportDocument paramIReportDocument, WizardDialog paramWizardDialog)
  {
    super(paramWizardDialog, 3, 95, 27, 210, 127, m_oResource.getResText(2419), m_oResource.getResText(2450), 34340, false);
    try
    {
      oWizardDialog = paramWizardDialog;
      CurReportDocument = paramIReportDocument;
      CurDBMetaData = CurReportDocument.getRecordParser();
      CurUnoDialog.setControlProperty("lstFields_2", "MultiSelection", Boolean.FALSE);
      CurUnoDialog.setControlProperty("lstSelFields_2", "MultiSelection", Boolean.FALSE);
      addFieldSelectionListener(new FieldSelectionListener());
      String str = ReportWizard.getBlindTextNote(paramIReportDocument, m_oResource);
      CurUnoDialog.insertControlModel("com.sun.star.awt.UnoControlFixedTextModel", "lblBlindTextNote_1", new String[] { PropertyNames.PROPERTY_ENABLED, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_WIDTH }, new Object[] { Boolean.FALSE, Integer.valueOf(18), str, Boolean.TRUE, Integer.valueOf(95), Integer.valueOf(158), new Integer(3), Integer.valueOf(209) });
    }
    catch (Exception localException)
    {
      localException.printStackTrace(System.out);
    }
  }
  
  public boolean isGroupField(String paramString)
  {
    return JavaTools.FieldInList(CurDBMetaData.GroupFieldNames, paramString) != -1;
  }
  
  public void initialize()
  {
    try
    {
      Vector localVector1 = new Vector();
      Vector localVector2 = new Vector();
      String[] arrayOfString1 = CurDBMetaData.getFieldNames();
      for (int i = 0; i < arrayOfString1.length; i++)
      {
        localObject = arrayOfString1[i];
        if (isGroupField(arrayOfString1[i])) {
          localVector2.add(localObject);
        } else {
          localVector1.add(localObject);
        }
      }
      String[] arrayOfString2 = new String[localVector2.size()];
      localVector2.toArray(arrayOfString2);
      Object localObject = new String[localVector1.size()];
      localVector1.toArray((Object[])localObject);
      super.initialize((String[])localObject, arrayOfString2, true);
    }
    catch (Exception localException)
    {
      localException.printStackTrace(System.out);
    }
  }
  
  public void removeGroupFieldNames()
  {
    emptyFieldsListBoxes();
    GroupFieldVector.removeAllElements();
    CurUnoDialog.setControlProperty("lblBlindTextNote_1", PropertyNames.PROPERTY_ENABLED, Boolean.FALSE);
  }
  
  public void getGroupFieldNames(CommandMetaData paramCommandMetaData)
  {
    String[] arrayOfString = new String[GroupFieldVector.size()];
    GroupFieldVector.copyInto(arrayOfString);
    GroupFieldNames = arrayOfString;
  }
  
  protected void toggleListboxButtons(short paramShort1, short paramShort2)
  {
    super.toggleListboxButtons(paramShort1, paramShort2);
    int i = xSelectedFieldsListBox.getItemCount();
    if (i >= 4) {
      CurUnoDialog.setControlProperty("cmdMoveSelected" + sIncSuffix, PropertyNames.PROPERTY_ENABLED, Boolean.FALSE);
    }
  }
  
  public void selectFields(boolean paramBoolean)
  {
    int i = xSelectedFieldsListBox.getItemCount();
    if (i < 4) {
      super.selectFields(paramBoolean);
    }
  }
  
  class FieldSelectionListener
    implements XFieldSelectionListener
  {
    FieldSelectionListener() {}
    
    public void moveItemDown(String paramString)
    {
      CurReportDocument.refreshGroupFields(xSelectedFieldsListBox.getItems());
    }
    
    public void moveItemUp(String paramString)
    {
      CurReportDocument.refreshGroupFields(xSelectedFieldsListBox.getItems());
    }
    
    public void shiftFromLeftToRight(String[] paramArrayOfString1, String[] paramArrayOfString2)
    {
      String str = paramArrayOfString1[0];
      int i = xSelectedFieldsListBox.getItemCount();
      String[] arrayOfString = xFieldsListBox.getItems();
      CurReportDocument.liveupdate_addGroupNametoDocument(arrayOfString, str, GroupFieldVector, CurReportDocument.getReportPath(), i);
      CurUnoDialog.setControlProperty("lblBlindTextNote_1", PropertyNames.PROPERTY_ENABLED, Boolean.TRUE);
      if (i >= 4) {
        toggleMoveButtons(false, false);
      }
    }
    
    public void shiftFromRightToLeft(String[] paramArrayOfString1, String[] paramArrayOfString2)
    {
      int i = paramArrayOfString1.length;
      if (i > 0)
      {
        String str = paramArrayOfString1[0];
        String[] arrayOfString1 = xSelectedFieldsListBox.getItems();
        CurReportDocument.liveupdate_removeGroupName(arrayOfString1, str, GroupFieldVector);
        String[] arrayOfString2 = xSelectedFieldsListBox.getItems();
        CurUnoDialog.setControlProperty("lblBlindTextNote_1", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(arrayOfString2.length == 0));
      }
    }
    
    public int getID()
    {
      return 2;
    }
    
    public void setID(String paramString) {}
  }
}

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

public abstract interface IReportBuilderLayouter
{
  public abstract String getName();
  
  public abstract String getLocalizedName();
  
  public abstract void setPageOrientation(int paramInt);
  
  public abstract void dispose();
  
  public abstract void setTableName(int paramInt, String paramString);
  
  public abstract void insertFieldNames(String[] paramArrayOfString);
  
  public abstract void insertFieldTypes(int[] paramArrayOfInt);
  
  public abstract void insertFieldWidths(int[] paramArrayOfInt);
  
  public abstract void insertFieldTitles(String[] paramArrayOfString);
  
  public abstract void insertGroupNames(String[] paramArrayOfString);
  
  public abstract void insertSortingNames(String[][] paramArrayOfS
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