summaryrefslogtreecommitdiff
path: root/wizards
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2005-04-06 11:09:14 +0000
committerJens-Heiner Rechtien <hr@openoffice.org>2005-04-06 11:09:14 +0000
commit4015187d274957cdea894cb23c696d78347d57db (patch)
treed3a2cf0580744ecaf3dec94a706cc58955f1e0f1 /wizards
parentbf10d4bb851217c709b4c00684290ff5f02a36a9 (diff)
INTEGRATION: CWS dba31 (1.10.4); FILE MERGED
2005/04/05 08:10:08 oj 1.10.4.1: #i46465# return document defintion to controller
Diffstat (limited to 'wizards')
-rw-r--r--wizards/com/sun/star/wizards/db/DBMetaData.java39
1 files changed, 20 insertions, 19 deletions
diff --git a/wizards/com/sun/star/wizards/db/DBMetaData.java b/wizards/com/sun/star/wizards/db/DBMetaData.java
index fa9cc20b6404..d3cb83582aa2 100644
--- a/wizards/com/sun/star/wizards/db/DBMetaData.java
+++ b/wizards/com/sun/star/wizards/db/DBMetaData.java
@@ -2,9 +2,9 @@
*
* $RCSfile: DBMetaData.java,v $
*
-* $Revision: 1.11 $
+* $Revision: 1.12 $
*
-* last change: $Author: hr $ $Date: 2005-04-06 10:18:21 $
+* last change: $Author: hr $ $Date: 2005-04-06 12:09:14 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -735,33 +735,34 @@ public class DBMetaData {
- public XComponent openDatabaseDocument(String _docname, boolean _bAsTemplate, boolean _bOpenInDesign, XHierarchicalNameAccess _xDocuments){
- XComponent xRetComponent = null;
- try {
- XComponentLoader xComponentLoader = (XComponentLoader) UnoRuntime.queryInterface(XComponentLoader.class, _xDocuments);
- PropertyValue[] aPropertyValues = new PropertyValue[4];
- aPropertyValues[0] = Properties.createProperty("OpenMode", _bOpenInDesign ? "openDesign": "open" );
- aPropertyValues[1] = Properties.createProperty("ActiveConnection", this.DBConnection);
- aPropertyValues[2] = Properties.createProperty("DocumentTitle", _docname);
- aPropertyValues[3] = Properties.createProperty("AsTemplate", new Boolean(_bAsTemplate));
- XHierarchicalNameContainer xHier = (XHierarchicalNameContainer) UnoRuntime.queryInterface(XHierarchicalNameContainer.class, _xDocuments);
- if (xHier.hasByHierarchicalName(_docname)){
- xRetComponent = xComponentLoader.loadComponentFromURL(_docname, "", 0, aPropertyValues);
+ public XComponent[] openDatabaseDocument(String _docname, boolean _bAsTemplate, boolean _bOpenInDesign, XHierarchicalNameAccess _xDocuments){
+ XComponent[] xRetComponent = new XComponent[2];
+ try {
+ XComponentLoader xComponentLoader = (XComponentLoader) UnoRuntime.queryInterface(XComponentLoader.class, _xDocuments);
+ PropertyValue[] aPropertyValues = new PropertyValue[4];
+ aPropertyValues[0] = Properties.createProperty("OpenMode", _bOpenInDesign ? "openDesign": "open" );
+ aPropertyValues[1] = Properties.createProperty("ActiveConnection", this.DBConnection);
+ aPropertyValues[2] = Properties.createProperty("DocumentTitle", _docname);
+ aPropertyValues[3] = Properties.createProperty("AsTemplate", new Boolean(_bAsTemplate));
+ XHierarchicalNameContainer xHier = (XHierarchicalNameContainer) UnoRuntime.queryInterface(XHierarchicalNameContainer.class, _xDocuments);
+ if (xHier.hasByHierarchicalName(_docname)){
+ xRetComponent[0] = (XComponent)UnoRuntime.queryInterface(XComponent.class, xHier.getByHierarchicalName(_docname));
+ xRetComponent[1] = xComponentLoader.loadComponentFromURL(_docname, "", 0, aPropertyValues);
+ }
+ } catch (Exception e) {
+ e.printStackTrace(System.out);
}
- } catch (Exception e) {
- e.printStackTrace(System.out);
- }
return xRetComponent;
}
- public XComponent openFormDocument(String _sformname, boolean _bOpenInDesign){
+ public XComponent[] openFormDocument(String _sformname, boolean _bOpenInDesign){
XHierarchicalNameAccess xFormDocuments = getFormDocuments();
return openDatabaseDocument(_sformname, false, _bOpenInDesign, xFormDocuments);
}
- public XComponent openReportDocument(String _sreportname, boolean _bAsTemplate, boolean _bOpenInDesign){
+ public XComponent[] openReportDocument(String _sreportname, boolean _bAsTemplate, boolean _bOpenInDesign){
XHierarchicalNameAccess xReportDocuments = getReportDocuments();
return openDatabaseDocument(_sreportname, _bAsTemplate, _bOpenInDesign, xReportDocuments);
}