diff options
author | Kurt Zenker <kz@openoffice.org> | 2008-06-25 13:33:40 +0000 |
---|---|---|
committer | Kurt Zenker <kz@openoffice.org> | 2008-06-25 13:33:40 +0000 |
commit | 82135d22f17fc1a415a2b8514d08488d08a79b41 (patch) | |
tree | 8909d0ca96f93b4cc6e6697f053059ac602c1c80 /wizards/com | |
parent | 85dc3dcc4358bc5ffe870139736025a2325fe022 (diff) |
INTEGRATION: CWS rptwizard01 (1.7.126); FILE MERGED
2008/05/21 10:14:43 lla 1.7.126.3: RESYNC: (1.7-1.8); FILE MERGED
2008/03/31 11:59:23 lla 1.7.126.2: #i86092# wrong document for ReportLayouter.initialize() used, fixed.
2008/02/14 13:00:48 lla 1.7.126.1: #i86092# changes for new Report Wizard
Diffstat (limited to 'wizards/com')
-rw-r--r-- | wizards/com/sun/star/wizards/report/RecordTable.java | 78 |
1 files changed, 46 insertions, 32 deletions
diff --git a/wizards/com/sun/star/wizards/report/RecordTable.java b/wizards/com/sun/star/wizards/report/RecordTable.java index 3576af19c004..984d12a0cd95 100644 --- a/wizards/com/sun/star/wizards/report/RecordTable.java +++ b/wizards/com/sun/star/wizards/report/RecordTable.java @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: RecordTable.java,v $ - * $Revision: 1.8 $ + * $Revision: 1.9 $ * * This file is part of OpenOffice.org. * @@ -42,7 +42,8 @@ import com.sun.star.wizards.text.TextTableHandler; import com.sun.star.wizards.text.ViewHandler; -public class RecordTable{ +public class RecordTable +{ String CurFieldName; String LabelDescription; public XNamed xTableName; @@ -54,37 +55,50 @@ public class RecordTable{ - public RecordTable(TextTableHandler _oTextTableHandler){ - try{ - this.oTextTableHandler = _oTextTableHandler; - String[] TableNames = oTextTableHandler.xTextTablesSupplier.getTextTables().getElementNames(); - XNameAccess xAllTextTables = oTextTableHandler.xTextTablesSupplier.getTextTables(); - if ((xAllTextTables.hasByName(ReportDocument.TBLRECORDSECTION)) || (xAllTextTables.hasByName(ReportDocument.COPYOFTBLRECORDSECTION))){ - Object oTable; - if (xAllTextTables.hasByName(ReportDocument.COPYOFTBLRECORDSECTION)) - oTable = xAllTextTables.getByName(ReportDocument.COPYOFTBLRECORDSECTION); - else - oTable = xAllTextTables.getByName(ReportDocument.TBLRECORDSECTION); - xTextTable = (XTextTable) UnoRuntime.queryInterface(XTextTable.class, oTable); - xTableName = (XNamed) UnoRuntime.queryInterface(XNamed.class, xTextTable); + public RecordTable(TextTableHandler _oTextTableHandler) + { + try + { + this.oTextTableHandler = _oTextTableHandler; + String[] TableNames = oTextTableHandler.xTextTablesSupplier.getTextTables().getElementNames(); + XNameAccess xAllTextTables = oTextTableHandler.xTextTablesSupplier.getTextTables(); + if ((xAllTextTables.hasByName(ReportTextDocument.TBLRECORDSECTION)) || (xAllTextTables.hasByName(ReportTextDocument.COPYOFTBLRECORDSECTION))) + { + Object oTable; + if (xAllTextTables.hasByName(ReportTextDocument.COPYOFTBLRECORDSECTION)) + { + oTable = xAllTextTables.getByName(ReportTextDocument.COPYOFTBLRECORDSECTION); + } + else + { + oTable = xAllTextTables.getByName(ReportTextDocument.TBLRECORDSECTION); + } + xTextTable = (XTextTable) UnoRuntime.queryInterface(XTextTable.class, oTable); + xTableName = (XNamed) UnoRuntime.queryInterface(XNamed.class, xTextTable); + } + else + { + XIndexAccess xTableIndex = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class, xAllTextTables); + int n = xTableIndex.getCount()-1; + Object x = xTableIndex.getByIndex(n); + xTextTable = (XTextTable) UnoRuntime.queryInterface(XTextTable.class, x); + xTableName = (XNamed) UnoRuntime.queryInterface(XNamed.class, xTextTable); + xTableName.setName(ReportTextDocument.TBLRECORDSECTION); + } + xTableRows = xTextTable.getRows(); + xTableColumns = xTextTable.getColumns(); + xCellRange = (XCellRange) UnoRuntime.queryInterface(XCellRange.class, xTextTable); + } + catch(Exception exception) + { + exception.printStackTrace(System.out); + } } - else{ - XIndexAccess xTableIndex = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class, xAllTextTables); - xTextTable = (XTextTable) UnoRuntime.queryInterface(XTextTable.class, xTableIndex.getByIndex(xTableIndex.getCount()-1)); - xTableName = (XNamed) UnoRuntime.queryInterface(XNamed.class, xTextTable); - xTableName.setName(ReportDocument.TBLRECORDSECTION); - } - xTableRows = xTextTable.getRows(); - xTableColumns = xTextTable.getColumns(); - xCellRange = (XCellRange) UnoRuntime.queryInterface(XCellRange.class, xTextTable); - } - catch(Exception exception){ - exception.printStackTrace(System.out); - }} - public void adjustOptimalTableWidths(XMultiServiceFactory _xMSF, ViewHandler oViewHandler){ // setTableColumnSeparators(){ - oTextTableHandler.adjustOptimalTableWidths(_xMSF, xTextTable); - oViewHandler.collapseViewCursorToStart(); - } + public void adjustOptimalTableWidths(XMultiServiceFactory _xMSF, ViewHandler oViewHandler) + { // setTableColumnSeparators(){ + oTextTableHandler.adjustOptimalTableWidths(_xMSF, xTextTable); + oViewHandler.collapseViewCursorToStart(); + } } |