diff options
author | Norbert Thiebaud <nthiebaud@gmail.com> | 2011-03-06 22:03:09 -0600 |
---|---|---|
committer | Norbert Thiebaud <nthiebaud@gmail.com> | 2011-03-06 22:03:09 -0600 |
commit | 615f67cedb7873d8cfd1a5a71210c2200ffca8d5 (patch) | |
tree | 7520f6f398820b3b4a177792468d8512799f29b0 | |
parent | fb2038e67257fb410f96bfa0ef6302275696c688 (diff) | |
parent | cc50d78db9bdee61353f4b4ee335166adeccf2cc (diff) |
Merge remote branch 'staging/ooo/dev300_m98_fixed' into integration/dev300_m98integration/dev300_m98
* staging/ooo/dev300_m98_fixed: (242 commits)
vcl117: #i115686# remove old unused style setting
vcl117: removed obsolete header
sb131: #i115124# $(XSLTPROC) implies LIBXSLT:libxslt
dba33k: #i114026# check if key columns from all tables are involved
CWS changehid: generate former auto hids into src files
dba34a: #i112617#
dba34a: if there exists a data source registration from the previous test run, revoke it
dba34a: #i31275# allow 'select as you type' aka 'quick selection' for tree list boxes (SvLBox derivees, to be precise), and enable this for Base main window, and the stylist
dba34a: #i97111# make the 'Test Connection' button big enough to display all its text
dba34a: #i114698# allow for property change notifications for properties which do not exist as real property, but as attribute only
dba34a: #i114671#
dba33j: unxmacxi.pro: WaE
dba33j: GCC WaE
dba33j: i114026: findTableColumnsMatching_throw: take the update-table's name as parameter, to catch the cases where the name is an alias
dba34a: GCC WaE
dba34a: WaE
dba33j: #i114627# do not let the SubComponentManager manage reports executed for data display
dba33j: #i114438#
dba33j: #i114438#
dba34a: #i113475# SRB->ORB
...
Conflicts:
dbaccess/inc/ToolBoxHelper.hxx
dbaccess/inc/dbaccess_helpid.hrc
dbaccess/prj/build.lst
dbaccess/qa/complex/dbaccess/ApplicationController.java
dbaccess/qa/complex/dbaccess/CRMBasedTestCase.java
dbaccess/qa/complex/dbaccess/DataSource.java
dbaccess/qa/complex/dbaccess/DatabaseDocument.java
dbaccess/qa/complex/dbaccess/Query.java
dbaccess/qa/complex/dbaccess/RowSet.java
dbaccess/qa/complex/dbaccess/SingleSelectQueryComposer.java
dbaccess/qa/complex/dbaccess/TestCase.java
dbaccess/qa/complex/dbaccess/UISettings.java
dbaccess/qa/complex/dbaccess/makefile.mk
dbaccess/source/core/api/BookmarkSet.cxx
dbaccess/source/core/api/BookmarkSet.hxx
dbaccess/source/core/api/CIndexColumn.hxx
dbaccess/source/core/api/CIndexes.cxx
dbaccess/source/core/api/CIndexes.hxx
dbaccess/source/core/api/CRowSetColumn.cxx
dbaccess/source/core/api/CRowSetColumn.hxx
dbaccess/source/core/api/CRowSetDataColumn.cxx
dbaccess/source/core/api/CRowSetDataColumn.hxx
dbaccess/source/core/api/CacheSet.cxx
dbaccess/source/core/api/CacheSet.hxx
dbaccess/source/core/api/FilteredContainer.cxx
dbaccess/source/core/api/HelperCollections.cxx
dbaccess/source/core/api/HelperCollections.hxx
dbaccess/source/core/api/KeySet.cxx
dbaccess/source/core/api/KeySet.hxx
dbaccess/source/core/api/OptimisticSet.cxx
dbaccess/source/core/api/OptimisticSet.hxx
dbaccess/source/core/api/PrivateRow.cxx
dbaccess/source/core/api/PrivateRow.hxx
dbaccess/source/core/api/RowSet.cxx
dbaccess/source/core/api/RowSet.hxx
dbaccess/source/core/api/RowSetBase.cxx
dbaccess/source/core/api/RowSetBase.hxx
dbaccess/source/core/api/RowSetCache.cxx
dbaccess/source/core/api/RowSetCache.hxx
dbaccess/source/core/api/RowSetCacheIterator.cxx
dbaccess/source/core/api/RowSetCacheIterator.hxx
dbaccess/source/core/api/RowSetRow.hxx
dbaccess/source/core/api/SingleSelectQueryComposer.cxx
dbaccess/source/core/api/StaticSet.cxx
dbaccess/source/core/api/StaticSet.hxx
dbaccess/source/core/api/TableDeco.cxx
dbaccess/source/core/api/View.cxx
dbaccess/source/core/api/WrappedResultSet.cxx
dbaccess/source/core/api/WrappedResultSet.hxx
dbaccess/source/core/api/callablestatement.cxx
dbaccess/source/core/api/column.cxx
dbaccess/source/core/api/columnsettings.cxx
dbaccess/source/core/api/datacolumn.cxx
dbaccess/source/core/api/datacolumn.hxx
dbaccess/source/core/api/datasettings.cxx
dbaccess/source/core/api/definitioncolumn.cxx
dbaccess/source/core/api/makefile.mk
dbaccess/source/core/api/preparedstatement.cxx
dbaccess/source/core/api/query.cxx
dbaccess/source/core/api/query.hxx
dbaccess/source/core/api/querycomposer.cxx
dbaccess/source/core/api/querycontainer.cxx
dbaccess/source/core/api/querydescriptor.cxx
dbaccess/source/core/api/querydescriptor.hxx
dbaccess/source/core/api/resultcolumn.cxx
dbaccess/source/core/api/resultcolumn.hxx
dbaccess/source/core/api/resultset.cxx
dbaccess/source/core/api/resultset.hxx
dbaccess/source/core/api/statement.cxx
dbaccess/source/core/api/table.cxx
dbaccess/source/core/api/tablecontainer.cxx
dbaccess/source/core/api/viewcontainer.cxx
dbaccess/source/core/dataaccess/ComponentDefinition.cxx
dbaccess/source/core/dataaccess/ComponentDefinition.hxx
dbaccess/source/core/dataaccess/ContentHelper.cxx
dbaccess/source/core/dataaccess/ModelImpl.cxx
dbaccess/source/core/dataaccess/ModelImpl.hxx
dbaccess/source/core/dataaccess/SharedConnection.cxx
dbaccess/source/core/dataaccess/SharedConnection.hxx
dbaccess/source/core/dataaccess/bookmarkcontainer.cxx
dbaccess/source/core/dataaccess/bookmarkcontainer.hxx
dbaccess/source/core/dataaccess/commandcontainer.cxx
dbaccess/source/core/dataaccess/commandcontainer.hxx
dbaccess/source/core/dataaccess/commanddefinition.cxx
dbaccess/source/core/dataaccess/commanddefinition.hxx
dbaccess/source/core/dataaccess/connection.cxx
dbaccess/source/core/dataaccess/connection.hxx
dbaccess/source/core/dataaccess/dataaccessdescriptor.cxx
dbaccess/source/core/dataaccess/databasecontext.cxx
dbaccess/source/core/dataaccess/databasecontext.hxx
dbaccess/source/core/dataaccess/databasedocument.cxx
dbaccess/source/core/dataaccess/databasedocument.hxx
dbaccess/source/core/dataaccess/databaseregistrations.cxx
dbaccess/source/core/dataaccess/databaseregistrations.hxx
dbaccess/source/core/dataaccess/datasource.cxx
dbaccess/source/core/dataaccess/datasource.hxx
dbaccess/source/core/dataaccess/definitioncontainer.cxx
dbaccess/source/core/dataaccess/documentcontainer.cxx
dbaccess/source/core/dataaccess/documentcontainer.hxx
dbaccess/source/core/dataaccess/documentdefinition.cxx
dbaccess/source/core/dataaccess/documentdefinition.hxx
dbaccess/source/core/dataaccess/documenteventexecutor.cxx
dbaccess/source/core/dataaccess/documenteventexecutor.hxx
dbaccess/source/core/dataaccess/documenteventnotifier.cxx
dbaccess/source/core/dataaccess/documenteventnotifier.hxx
dbaccess/source/core/dataaccess/documentevents.cxx
dbaccess/source/core/dataaccess/documentevents.hxx
dbaccess/source/core/dataaccess/intercept.cxx
dbaccess/source/core/dataaccess/intercept.hxx
dbaccess/source/core/dataaccess/makefile.mk
dbaccess/source/core/dataaccess/myucp_datasupplier.cxx
dbaccess/source/core/dataaccess/myucp_datasupplier.hxx
dbaccess/source/core/dataaccess/myucp_resultset.cxx
dbaccess/source/core/dataaccess/myucp_resultset.hxx
dbaccess/source/core/inc/ContainerListener.hxx
dbaccess/source/core/inc/ContainerMediator.hxx
dbaccess/source/core/inc/ContentHelper.hxx
dbaccess/source/core/inc/DatabaseDataProvider.hxx
dbaccess/source/core/inc/FilteredContainer.hxx
dbaccess/source/core/inc/PropertyForward.hxx
dbaccess/source/core/inc/RefreshListener.hxx
dbaccess/source/core/inc/SingleSelectQueryComposer.hxx
dbaccess/source/core/inc/TableDeco.hxx
dbaccess/source/core/inc/View.hxx
dbaccess/source/core/inc/callablestatement.hxx
dbaccess/source/core/inc/column.hxx
dbaccess/source/core/inc/columnsettings.hxx
dbaccess/source/core/inc/commandbase.hxx
dbaccess/source/core/inc/composertools.hxx
dbaccess/source/core/inc/containerapprove.hxx
dbaccess/source/core/inc/core_resource.hrc
dbaccess/source/core/inc/core_resource.hxx
dbaccess/source/core/inc/datasettings.hxx
dbaccess/source/core/inc/dbamiscres.hrc
dbaccess/source/core/inc/definitioncolumn.hxx
dbaccess/source/core/inc/definitioncontainer.hxx
dbaccess/source/core/inc/module_dba.hxx
dbaccess/source/core/inc/object.hxx
dbaccess/source/core/inc/objectnameapproval.hxx
dbaccess/source/core/inc/preparedstatement.hxx
dbaccess/source/core/inc/querycomposer.hxx
dbaccess/source/core/inc/querycontainer.hxx
dbaccess/source/core/inc/sdbcoretools.hxx
dbaccess/source/core/inc/statement.hxx
dbaccess/source/core/inc/table.hxx
dbaccess/source/core/inc/tablecontainer.hxx
dbaccess/source/core/inc/userinformation.hxx
dbaccess/source/core/inc/veto.hxx
dbaccess/source/core/inc/viewcontainer.hxx
dbaccess/source/core/misc/DatabaseDataProvider.cxx
dbaccess/source/core/recovery/settingsimport.cxx
dbaccess/source/core/recovery/settingsimport.hxx
dbaccess/source/core/recovery/storagestream.cxx
dbaccess/source/core/recovery/storagestream.hxx
dbaccess/source/core/recovery/storagetextstream.cxx
dbaccess/source/core/recovery/storagetextstream.hxx
dbaccess/source/core/recovery/storagexmlstream.cxx
dbaccess/source/core/recovery/storagexmlstream.hxx
dbaccess/source/core/recovery/subcomponentrecovery.cxx
dbaccess/source/core/recovery/subcomponentrecovery.hxx
dbaccess/source/core/recovery/subcomponents.hxx
dbaccess/source/core/resource/strings.src
dbaccess/source/ext/adabas/Acomponentmodule.cxx
dbaccess/source/ext/adabas/AdabasNewDb.src
dbaccess/source/ext/macromigration/macromigration.src
dbaccess/source/filter/migration/makefile.mk
dbaccess/source/filter/xml/makefile.mk
dbaccess/source/filter/xml/xmlColumn.cxx
dbaccess/source/filter/xml/xmlExport.cxx
dbaccess/source/inc/OAuthenticationContinuation.hxx
dbaccess/source/inc/stringconstants.hrc
dbaccess/source/inc/stringconstants.inc
dbaccess/source/sdbtools/resource/sdbt_strings.src
dbaccess/source/shared/registrationhelper.cxx
dbaccess/source/ui/app/AppController.cxx
dbaccess/source/ui/app/AppControllerGen.cxx
dbaccess/source/ui/app/AppDetailPageHelper.cxx
dbaccess/source/ui/app/AppDetailPageHelper.hxx
dbaccess/source/ui/app/AppDetailView.cxx
dbaccess/source/ui/app/AppIconControl.cxx
dbaccess/source/ui/app/app.src
dbaccess/source/ui/browser/bcommon.src
dbaccess/source/ui/browser/brwctrlr.cxx
dbaccess/source/ui/browser/dsEntriesNoExp.cxx
dbaccess/source/ui/browser/exsrcbrw.cxx
dbaccess/source/ui/browser/sbabrw.src
dbaccess/source/ui/browser/sbagrid.cxx
dbaccess/source/ui/browser/sbagrid.src
dbaccess/source/ui/browser/unodatbr.cxx
dbaccess/source/ui/control/TableGrantCtrl.src
dbaccess/source/ui/control/dbtreelistbox.cxx
dbaccess/source/ui/control/opendoccontrols.cxx
dbaccess/source/ui/control/tabletree.cxx
dbaccess/source/ui/control/tabletree.src
dbaccess/source/ui/control/toolboxcontroller.cxx
dbaccess/source/ui/control/undosqledit.src
dbaccess/source/ui/dlg/AdabasStat.src
dbaccess/source/ui/dlg/AutoControls.src
dbaccess/source/ui/dlg/CollectionView.cxx
dbaccess/source/ui/dlg/CollectionView.src
dbaccess/source/ui/dlg/ConnectionHelper.cxx
dbaccess/source/ui/dlg/ConnectionPage.src
dbaccess/source/ui/dlg/DbAdminImpl.cxx
dbaccess/source/ui/dlg/ExtensionNotPresent.cxx
dbaccess/source/ui/dlg/ExtensionNotPresent.src
dbaccess/source/ui/dlg/RelationDlg.src
dbaccess/source/ui/dlg/TablesSingleDlg.cxx
dbaccess/source/ui/dlg/UserAdmin.src
dbaccess/source/ui/dlg/UserAdminDlg.src
dbaccess/source/ui/dlg/adtabdlg.cxx
dbaccess/source/ui/dlg/adtabdlg.src
dbaccess/source/ui/dlg/advancedsettings.cxx
dbaccess/source/ui/dlg/dbadmin.src
dbaccess/source/ui/dlg/dbadmin2.src
dbaccess/source/ui/dlg/dbadminsetup.src
dbaccess/source/ui/dlg/dbfindex.cxx
dbaccess/source/ui/dlg/dbfindex.src
dbaccess/source/ui/dlg/directsql.src
dbaccess/source/ui/dlg/dlgattr.src
dbaccess/source/ui/dlg/dlgsave.src
dbaccess/source/ui/dlg/dlgsize.src
dbaccess/source/ui/dlg/dsselect.src
dbaccess/source/ui/dlg/indexdialog.src
dbaccess/source/ui/dlg/indexfieldscontrol.cxx
dbaccess/source/ui/dlg/makefile.mk
dbaccess/source/ui/dlg/optionalboolitem.cxx
dbaccess/source/ui/dlg/optionalboolitem.hxx
dbaccess/source/ui/dlg/paramdialog.src
dbaccess/source/ui/dlg/queryfilter.src
dbaccess/source/ui/dlg/queryorder.src
dbaccess/source/ui/dlg/sqlmessage.src
dbaccess/source/ui/dlg/textconnectionsettings.src
dbaccess/source/ui/imagelists/dbimagelists.src
dbaccess/source/ui/inc/ExtensionNotPresent.hxx
dbaccess/source/ui/inc/TableConnectionData.hxx
dbaccess/source/ui/inc/dbu_resource.hrc
dbaccess/source/ui/inc/dsmeta.hxx
dbaccess/source/ui/inc/sbagrid.hxx
dbaccess/source/ui/inc/unodatbr.hxx
dbaccess/source/ui/misc/TableCopyHelper.cxx
dbaccess/source/ui/misc/TokenWriter.cxx
dbaccess/source/ui/misc/ToolBoxHelper.cxx
dbaccess/source/ui/misc/WCopyTable.cxx
dbaccess/source/ui/misc/WNameMatch.cxx
dbaccess/source/ui/misc/WizardPages.src
dbaccess/source/ui/misc/dbumiscres.src
dbaccess/source/ui/querydesign/JoinController.cxx
dbaccess/source/ui/querydesign/QueryDesignView.cxx
dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
dbaccess/source/ui/querydesign/TableFieldDescription.cxx
dbaccess/source/ui/querydesign/TableWindow.cxx
dbaccess/source/ui/querydesign/query.src
dbaccess/source/ui/querydesign/querydlg.src
dbaccess/source/ui/relationdesign/relation.src
dbaccess/source/ui/tabledesign/TEditControl.cxx
dbaccess/source/ui/tabledesign/TableController.cxx
dbaccess/source/ui/tabledesign/table.src
dbaccess/source/ui/uno/copytablewizard.cxx
dbaccess/source/ui/uno/copytablewizard.src
dbaccess/source/ui/uno/dbinteraction.cxx
dbaccess/source/ui/uno/dbinteraction.src
dbaccess/util/hidother.src
reportdesign/inc/RptResId.hrc
reportdesign/qa/complex/reportdesign/ReportDesignerTest.java
reportdesign/source/core/resource/strings.src
reportdesign/source/filter/xml/xmlExport.cxx
reportdesign/source/filter/xml/xmlGroup.cxx
reportdesign/source/filter/xml/xmlHelper.cxx
reportdesign/source/filter/xml/xmlservices.cxx
reportdesign/source/ui/dlg/AddField.cxx
reportdesign/source/ui/dlg/CondFormat.hrc
reportdesign/source/ui/dlg/CondFormat.src
reportdesign/source/ui/dlg/Condition.cxx
reportdesign/source/ui/dlg/DateTime.src
reportdesign/source/ui/dlg/GroupsSorting.cxx
reportdesign/source/ui/dlg/GroupsSorting.src
reportdesign/source/ui/dlg/Navigator.cxx
reportdesign/source/ui/dlg/Navigator.src
reportdesign/source/ui/inc/DesignView.hxx
reportdesign/source/ui/inc/GroupsSorting.hxx
reportdesign/source/ui/misc/UITools.cxx
reportdesign/source/ui/misc/rptuiservices.cxx
reportdesign/source/ui/report/DesignView.cxx
reportdesign/source/ui/report/ReportController.cxx
reportdesign/source/ui/report/ReportSection.cxx
reportdesign/source/ui/report/ViewsWindow.cxx
reportdesign/source/ui/report/report.src
184 files changed, 2632 insertions, 1735 deletions
diff --git a/dbaccess/inc/dbaccess_helpid.hrc b/dbaccess/inc/dbaccess_helpid.hrc index e9118216b..a637494b9 100644 --- a/dbaccess/inc/dbaccess_helpid.hrc +++ b/dbaccess/inc/dbaccess_helpid.hrc @@ -29,7 +29,6 @@ #define _DBA_DBACCESS_HELPID_HRC_ #define HID_DSADMIN_CHARSET "DBACCESS_HID_DSADMIN_CHARSET" - #define HID_DLG_FILTERCRIT "DBACCESS_HID_DLG_FILTERCRIT" #define HID_DLG_ORDERCRIT "DBACCESS_HID_DLG_ORDERCRIT" @@ -462,4 +461,5 @@ #define HID_DLG_JOIN_TABADD "DBACCESS_HID_DLG_JOIN_TABADD" + #endif // _DBA_DBACCESS_HELPID_HRC_ diff --git a/dbaccess/inc/dbaccess_slotid.hrc b/dbaccess/inc/dbaccess_slotid.hrc index 6ecd68d05..ed569e232 100644 --- a/dbaccess/inc/dbaccess_slotid.hrc +++ b/dbaccess/inc/dbaccess_slotid.hrc @@ -109,6 +109,9 @@ #define SID_DB_APP_EDIT_SQL_VIEW ( SID_DBACCESS_START + 66 ) +#define SID_TABLEDESIGN_TABED_PRIMARYKEY ( SID_DBACCESS_START + 67 ) +#define SID_TABLEDESIGN_INSERTROWS ( SID_DBACCESS_START + 68 ) + #endif // _DBACCESS_SLOTID_HRC_ diff --git a/dbaccess/inc/genericcontroller.hxx b/dbaccess/inc/genericcontroller.hxx index d31229fbc..53407af03 100644 --- a/dbaccess/inc/genericcontroller.hxx +++ b/dbaccess/inc/genericcontroller.hxx @@ -281,7 +281,7 @@ namespace dbaui @param _nHelpId The help id to dispatch. */ - void openHelpAgent(sal_Int32 _nHelpId); + void openHelpAgent( const rtl::OString& _sHelpId ); /** open the help agent for the given help url. @param _pHelpStringURL diff --git a/dbaccess/prj/build.lst b/dbaccess/prj/build.lst index f8b050257..b90f631db 100644 --- a/dbaccess/prj/build.lst +++ b/dbaccess/prj/build.lst @@ -1,4 +1,4 @@ -ba dbaccess : l10n BOOST:boost connectivity svx stoc qadevOOo xmlscript NULL +ba dbaccess : l10n BOOST:boost connectivity svx stoc qadevOOo xmlscript LIBXSLT:libxslt NULL ba dbaccess usr1 - all ba_mkout NULL ba dbaccess\inc nmake - all ba_inc NULL ba dbaccess\source\ui\inc nmake - all ba_uiinc ba_inc NULL @@ -27,5 +27,8 @@ ba dbaccess\source\ui\uno nmake - all ba_uiuno ba_inc NULL ba dbaccess\source\ui\imagelists nmake - all ba_uiimglst ba_inc NULL ba dbaccess\util nmake - all ba_util ba_uiimglst ba_capi ba_cdaccess ba_cmisc ba_crecovery ba_shared ba_uibrowser ba_uiapp ba_uicontrol ba_uidlg ba_uimisc ba_uiquery ba_uitabledesign ba_uirelationdesign ba_uiuno ba_conntools ba_misctools ba_miscres ba_ext_adabasui NULL ba dbaccess\win32\source\odbcconfig nmake - w ba_odbcconfig ba_inc NULL -ba dbaccess\qa\complex\dbaccess nmake - all ba_complex_tests NULL ba dbaccess\qa\unoapi nmake - all ba_q_unoapi NULL + +# complex tests doesn't work +# ba dbaccess\qa\complex\dbaccess nmake - all ba_qa_complex NULL + diff --git a/dbaccess/prj/d.lst b/dbaccess/prj/d.lst index 383cc119c..4e1ab9c7f 100644 --- a/dbaccess/prj/d.lst +++ b/dbaccess/prj/d.lst @@ -51,3 +51,10 @@ touch: ..\%__SRC%\misc\dbaccess.hid %_DEST%\bin%_EXT%\dba.hid ..\inc\*.hxx %_DEST%\inc%_EXT%\dbaccess\*.hxx ..\inc\*.h %_DEST%\inc%_EXT%\dbaccess\*.h +..\%__SRC%\misc\adabasui.component %_DEST%\xml%_EXT%\adabasui.component +..\%__SRC%\misc\dba.component %_DEST%\xml%_EXT%\dba.component +..\%__SRC%\misc\dbacfg.component %_DEST%\xml%_EXT%\dbacfg.component +..\%__SRC%\misc\dbaxml.component %_DEST%\xml%_EXT%\dbaxml.component +..\%__SRC%\misc\dbmm.component %_DEST%\xml%_EXT%\dbmm.component +..\%__SRC%\misc\dbu.component %_DEST%\xml%_EXT%\dbu.component +..\%__SRC%\misc\sdbt.component %_DEST%\xml%_EXT%\sdbt.component diff --git a/dbaccess/qa/complex/dbaccess/ApplicationController.java b/dbaccess/qa/complex/dbaccess/ApplicationController.java index 33a62821a..e635108b9 100644 --- a/dbaccess/qa/complex/dbaccess/ApplicationController.java +++ b/dbaccess/qa/complex/dbaccess/ApplicationController.java @@ -48,6 +48,17 @@ import helper.URLHelper; import java.io.File; import java.io.IOException; + +// ---------- junit imports ----------------- +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; +import org.openoffice.test.OfficeConnection; +import static org.junit.Assert.*; +// ------------------------------------------ + /** complex test case for Base's application UI */ public class ApplicationController extends TestCase @@ -64,13 +75,13 @@ public class ApplicationController extends TestCase // -------------------------------------------------------------------------------------------------------- - public String[] getTestMethodNames() - { - return new String[] - { - "checkSaveAs" - }; - } +// public String[] getTestMethodNames() +// { +// return new String[] +// { +// "checkSaveAs" +// }; +// } // -------------------------------------------------------------------------------------------------------- public String getTestObjectName() @@ -98,16 +109,16 @@ public class ApplicationController extends TestCase // create/load the new database document m_database = (_documentURL == null) - ? new HsqlDatabase(getORB()) - : new HsqlDatabase(getORB(), _documentURL); + ? new HsqlDatabase(getMSF()) + : new HsqlDatabase(getMSF(), _documentURL); m_databaseDocument = m_database.getDatabaseDocument(); // load it into a frame - final Object object = getORB().createInstance("com.sun.star.frame.Desktop"); + final Object object = getMSF().createInstance("com.sun.star.frame.Desktop"); final XComponentLoader xComponentLoader = UnoRuntime.queryInterface(XComponentLoader.class, object); final XComponent loadedComponent = xComponentLoader.loadComponentFromURL(m_database.getDocumentURL(), "_blank", FrameSearchFlag.ALL, new PropertyValue[0]); - assure("too many document instances!", + assertTrue("too many document instances!", UnoRuntime.areSame(loadedComponent, m_databaseDocument)); // get the controller, which provides access to various UI operations @@ -118,21 +129,21 @@ public class ApplicationController extends TestCase } // -------------------------------------------------------------------------------------------------------- - public void before() throws java.lang.Exception + @Before public void before() throws java.lang.Exception { super.before(); impl_switchToDocument(null); } // -------------------------------------------------------------------------------------------------------- - public void after() throws java.lang.Exception + @After public void after() throws java.lang.Exception { impl_closeDocument(); super.after(); } // -------------------------------------------------------------------------------------------------------- - public void checkSaveAs() throws Exception, IOException, java.lang.Exception + @Test public void checkSaveAs() throws Exception, IOException, java.lang.Exception { // issue 93737 describes the problem that when you save-as a database document, and do changes to it, // then those changes are saved in the old document, actually @@ -146,7 +157,7 @@ public class ApplicationController extends TestCase // connect m_documentUI.connect(); - assure("could not connect to " + m_database.getDocumentURL(), m_documentUI.isConnected()); + assertTrue("could not connect to " + m_database.getDocumentURL(), m_documentUI.isConnected()); // create a table in the database m_database.createTable(new HsqlTableDescriptor("abc", new HsqlColumnDescriptor[] @@ -159,18 +170,18 @@ public class ApplicationController extends TestCase // load the old document, and verify there is *no* table therein impl_switchToDocument(oldDocumentURL); m_documentUI.connect(); - assure("could not connect to " + m_database.getDocumentURL(), m_documentUI.isConnected()); + assertTrue("could not connect to " + m_database.getDocumentURL(), m_documentUI.isConnected()); XTablesSupplier suppTables = UnoRuntime.queryInterface( XTablesSupplier.class, m_documentUI.getActiveConnection() ); XNameAccess tables = suppTables.getTables(); - assure("the table was created in the wrong database", !tables.hasByName("abc")); + assertTrue("the table was created in the wrong database", !tables.hasByName("abc")); // load the new document, and verify there *is* a table therein impl_switchToDocument(newDocumentURL); m_documentUI.connect(); - assure("could not connect to " + m_database.getDocumentURL(), m_documentUI.isConnected()); + assertTrue("could not connect to " + m_database.getDocumentURL(), m_documentUI.isConnected()); suppTables = UnoRuntime.queryInterface( XTablesSupplier.class, m_documentUI.getActiveConnection() ); tables = suppTables.getTables(); - assure("the newly created table has not been written", tables.hasByName("abc")); + assertTrue("the newly created table has not been written", tables.hasByName("abc")); } } diff --git a/dbaccess/qa/complex/dbaccess/Beamer.java b/dbaccess/qa/complex/dbaccess/Beamer.java index ec47e7945..bc723a52c 100644 --- a/dbaccess/qa/complex/dbaccess/Beamer.java +++ b/dbaccess/qa/complex/dbaccess/Beamer.java @@ -28,10 +28,8 @@ package complex.dbaccess; import com.sun.star.beans.PropertyState; import com.sun.star.beans.PropertyValue; -import com.sun.star.beans.XPropertySet; import com.sun.star.container.XEnumeration; import com.sun.star.container.XEnumerationAccess; -import com.sun.star.container.XNameAccess; import com.sun.star.frame.FrameSearchFlag; import com.sun.star.frame.XComponentLoader; import com.sun.star.frame.XController; @@ -39,34 +37,30 @@ import com.sun.star.frame.XDispatch; import com.sun.star.frame.XDispatchProvider; import com.sun.star.frame.XFrame; import com.sun.star.frame.XModel; -import com.sun.star.frame.XStorable; import com.sun.star.lang.XComponent; -import com.sun.star.lang.XMultiServiceFactory; import com.sun.star.sdb.CommandType; -import com.sun.star.sdb.XDocumentDataSource; -import com.sun.star.sdb.XOfficeDatabaseDocument; -import com.sun.star.sdb.application.XDatabaseDocumentUI; -import com.sun.star.sdbcx.XTablesSupplier; import com.sun.star.uno.Exception; import com.sun.star.uno.UnoRuntime; -import com.sun.star.uno.XComponentContext; -import com.sun.star.uno.XNamingService; import com.sun.star.util.URL; -import com.sun.star.util.XCloseable; import com.sun.star.util.XURLTransformer; import com.sun.star.view.XSelectionSupplier; -import connectivity.tools.DataSource; -import connectivity.tools.HsqlColumnDescriptor; -import connectivity.tools.HsqlDatabase; -import connectivity.tools.HsqlTableDescriptor; -import helper.URLHelper; -import java.io.File; import java.io.IOException; -import util.UITools; + + +// ---------- junit imports ----------------- +import org.junit.After; +// import org.junit.AfterClass; +import org.junit.Before; +// import org.junit.BeforeClass; +import org.junit.Test; +// import org.openoffice.test.OfficeConnection; +import static org.junit.Assert.*; +// ------------------------------------------ + /** complex test case for Base's application UI */ -public class Beamer extends complexlib.ComplexTestCase +public class Beamer extends TestCase { private XModel docModel; @@ -76,43 +70,43 @@ public class Beamer extends complexlib.ComplexTestCase super(); } - // -------------------------------------------------------------------------------------------------------- - protected final XComponentContext getComponentContext() - { - XComponentContext context = null; - try - { - final XPropertySet orbProps = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, getORB()); - context = (XComponentContext) UnoRuntime.queryInterface(XComponentContext.class, - orbProps.getPropertyValue("DefaultContext")); - } - catch (Exception ex) - { - failed("could not retrieve the ComponentContext"); - } - return context; - } +// // -------------------------------------------------------------------------------------------------------- +// protected final XComponentContext getComponentContext() +// { +// XComponentContext context = null; +// try +// { +// final XPropertySet orbProps = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, getORB()); +// context = (XComponentContext) UnoRuntime.queryInterface(XComponentContext.class, +// orbProps.getPropertyValue("DefaultContext")); +// } +// catch (Exception ex) +// { +// failed("could not retrieve the ComponentContext"); +// } +// return context; +// } // -------------------------------------------------------------------------------------------------------- - public String[] getTestMethodNames() - { - return new String[] - { - "testBeamer" - }; - } +// public String[] getTestMethodNames() +// { +// return new String[] +// { +// "testBeamer" +// }; +// } - // -------------------------------------------------------------------------------------------------------- - public String getTestObjectName() - { - return getClass().getName(); - } +// // -------------------------------------------------------------------------------------------------------- +// public String getTestObjectName() +// { +// return getClass().getName(); +// } // -------------------------------------------------------------------------------------------------------- - protected final XMultiServiceFactory getORB() - { - return (XMultiServiceFactory) param.getMSF(); - } +// protected final XMultiServiceFactory getORB() +// { +// return (XMultiServiceFactory) param.getMSF(); +// } // -------------------------------------------------------------------------------------------------------- private void impl_closeDocument() @@ -120,39 +114,39 @@ public class Beamer extends complexlib.ComplexTestCase } // -------------------------------------------------------------------------------------------------------- - public void before() throws Exception, java.lang.Exception + @Before public void before() throws Exception, java.lang.Exception { // load it into a frame - final Object object = getORB().createInstance("com.sun.star.frame.Desktop"); - final XComponentLoader xComponentLoader = (XComponentLoader) UnoRuntime.queryInterface(XComponentLoader.class, object); + final Object object = getMSF().createInstance("com.sun.star.frame.Desktop"); + final XComponentLoader xComponentLoader = UnoRuntime.queryInterface(XComponentLoader.class, object); final XComponent loadedComponent = xComponentLoader.loadComponentFromURL("private:factory/swriter", "_blank", 0, new PropertyValue[0]); // get the controller, which provides access to various UI operations - docModel = (XModel) UnoRuntime.queryInterface(XModel.class, loadedComponent); + docModel = UnoRuntime.queryInterface(XModel.class, loadedComponent); } // -------------------------------------------------------------------------------------------------------- - public void after() + @After public void after() { } // -------------------------------------------------------------------------------------------------------- - public void testBeamer() throws Exception, IOException, java.lang.Exception + @Test public void testBeamer() throws Exception, IOException, java.lang.Exception { final XController controller = docModel.getCurrentController(); final XFrame frame = controller.getFrame(); - final XDispatchProvider dispatchP = (XDispatchProvider) UnoRuntime.queryInterface(XDispatchProvider.class, frame); + final XDispatchProvider dispatchP = UnoRuntime.queryInterface(XDispatchProvider.class, frame); URL command = new URL(); command.Complete = ".uno:ViewDataSourceBrowser"; - Object instance = getORB().createInstance("com.sun.star.util.URLTransformer"); - XURLTransformer atrans = (XURLTransformer) UnoRuntime.queryInterface(XURLTransformer.class, instance); + Object instance = getMSF().createInstance("com.sun.star.util.URLTransformer"); + XURLTransformer atrans = UnoRuntime.queryInterface(XURLTransformer.class, instance); com.sun.star.util.URL[] aURLA = new com.sun.star.util.URL[1]; aURLA[0] = command; atrans.parseStrict(aURLA); command = aURLA[0]; final XDispatch dispatch = dispatchP.queryDispatch(command, "_self", FrameSearchFlag.AUTO); - assure(dispatch != null); + assertNotNull(dispatch); dispatch.dispatch(command, new PropertyValue[0]); final PropertyValue[] props = new PropertyValue[] @@ -163,8 +157,8 @@ public class Beamer extends complexlib.ComplexTestCase }; final XFrame beamer = frame.findFrame("_beamer", 0); - assure(beamer != null); - final XEnumerationAccess evtBc = (XEnumerationAccess) UnoRuntime.queryInterface(XEnumerationAccess.class, getORB().createInstance("com.sun.star.frame.GlobalEventBroadcaster")); + assertNotNull(beamer); + final XEnumerationAccess evtBc = UnoRuntime.queryInterface(XEnumerationAccess.class, getMSF().createInstance("com.sun.star.frame.GlobalEventBroadcaster")); XEnumeration enumeration = evtBc.createEnumeration(); int count = -1; while (enumeration.hasMoreElements()) @@ -172,9 +166,9 @@ public class Beamer extends complexlib.ComplexTestCase enumeration.nextElement(); ++count; } - final XSelectionSupplier selSup = (XSelectionSupplier)UnoRuntime.queryInterface(XSelectionSupplier.class, beamer.getController()); + final XSelectionSupplier selSup = UnoRuntime.queryInterface(XSelectionSupplier.class, beamer.getController()); selSup.select(props); - final com.sun.star.util.XCloseable close = (com.sun.star.util.XCloseable)UnoRuntime.queryInterface(com.sun.star.util.XCloseable.class, frame); + final com.sun.star.util.XCloseable close = UnoRuntime.queryInterface(com.sun.star.util.XCloseable.class, frame); close.close(false); enumeration = evtBc.createEnumeration(); @@ -185,6 +179,6 @@ public class Beamer extends complexlib.ComplexTestCase ++count2; } - assure("count1 = " + count + " count2 = " + count2, count == count2); + assertTrue("count1 = " + count + " count2 = " + count2, count == count2); } } diff --git a/dbaccess/qa/complex/dbaccess/CRMBasedTestCase.java b/dbaccess/qa/complex/dbaccess/CRMBasedTestCase.java index f9f65268f..d4de0eb0e 100644 --- a/dbaccess/qa/complex/dbaccess/CRMBasedTestCase.java +++ b/dbaccess/qa/complex/dbaccess/CRMBasedTestCase.java @@ -26,13 +26,21 @@ ************************************************************************/ package complex.dbaccess; -import com.sun.star.lang.XMultiServiceFactory; import com.sun.star.sdb.XSingleSelectQueryComposer; -import com.sun.star.uno.UnoRuntime; import connectivity.tools.CRMDatabase; import java.util.logging.Level; import java.util.logging.Logger; +// ---------- junit imports ----------------- +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; +import org.openoffice.test.OfficeConnection; +import static org.junit.Assert.*; +// ------------------------------------------ + public abstract class CRMBasedTestCase extends TestCase { protected CRMDatabase m_database; @@ -42,30 +50,30 @@ public abstract class CRMBasedTestCase extends TestCase { try { - m_database = new CRMDatabase( getORB(), false ); + m_database = new CRMDatabase( getMSF(), false ); } catch ( Exception e ) { e.printStackTrace( System.err ); - assure( "caught an exception (" + e.getMessage() + ") while creating the test case", false ); + fail( "caught an exception (" + e.getMessage() + ") while creating the test case"); } } // -------------------------------------------------------------------------------------------------------- - @Override - public void before() + @Before public void before() { createTestCase(); } // -------------------------------------------------------------------------------------------------------- - @Override - public void after() + @After public void after() { try { if ( m_database != null ) + { m_database.saveAndClose(); + } } catch ( Exception ex ) { diff --git a/dbaccess/qa/complex/dbaccess/CopyTableWizard.java b/dbaccess/qa/complex/dbaccess/CopyTableWizard.java index 9bb102e28..535796001 100755 --- a/dbaccess/qa/complex/dbaccess/CopyTableWizard.java +++ b/dbaccess/qa/complex/dbaccess/CopyTableWizard.java @@ -46,6 +46,16 @@ import connectivity.tools.DbaseDatabase; import java.io.IOException; import util.UITools; +// ---------- junit imports ----------------- +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; +import org.openoffice.test.OfficeConnection; +import static org.junit.Assert.*; +// ------------------------------------------ + /** complex test case for Base's application UI */ public class CopyTableWizard extends CRMBasedTestCase @@ -60,42 +70,40 @@ public class CopyTableWizard extends CRMBasedTestCase } // -------------------------------------------------------------------------------------------------------- - public String[] getTestMethodNames() - { - return new String[] - { - "copyTable", "copyTableDbase" - }; - } +// public String[] getTestMethodNames() +// { +// return new String[] +// { +// "copyTable", "copyTableDbase" +// }; +// } // -------------------------------------------------------------------------------------------------------- - @Override - public String getTestObjectName() - { - return getClass().getName(); - } +// @Override +// public String getTestObjectName() +// { +// return getClass().getName(); +// } // -------------------------------------------------------------------------------------------------------- // -------------------------------------------------------------------------------------------------------- - @Override - public void after() + @After public void after() { dest.store(); super.after(); } - @Override - public void before() + @Before public void before() { try { createTestCase(); source = new DatabaseApplication(this.m_database.getDatabase()); - dest = new DatabaseApplication(new DbaseDatabase(getORB())); + dest = new DatabaseApplication(new DbaseDatabase(getMSF())); } catch (java.lang.Exception ex) { - assure(false); + fail(""); } } // -------------------------------------------------------------------------------------------------------- @@ -123,7 +131,7 @@ public class CopyTableWizard extends CRMBasedTestCase Object toolKit = null; try { - toolKit = getORB().createInstance("com.sun.star.awt.Toolkit"); + toolKit = getMSF().createInstance("com.sun.star.awt.Toolkit"); } catch (com.sun.star.uno.Exception e) { @@ -135,21 +143,21 @@ public class CopyTableWizard extends CRMBasedTestCase return (XWindow) UnoRuntime.queryInterface(XWindow.class, atw); } - public void copyTable() throws Exception, IOException, java.lang.Exception + @Test public void copyTable() throws Exception, IOException, java.lang.Exception { copyTable(source,source); } - public void copyTableDbase() throws Exception, IOException, java.lang.Exception + @Test public void copyTableDbase() throws Exception, IOException, java.lang.Exception { copyTable(source,dest); } - public void copyTable(final DatabaseApplication sourceDb,final DatabaseApplication destDb) throws Exception, IOException, java.lang.Exception + private void copyTable(final DatabaseApplication sourceDb,final DatabaseApplication destDb) throws Exception, IOException, java.lang.Exception { final XConnection destConnection = destDb.getDocumentUI().getActiveConnection(); final XConnection sourceConnection = sourceDb.getDocumentUI().getActiveConnection(); - final XTablesSupplier suppTables = (XTablesSupplier) UnoRuntime.queryInterface(XTablesSupplier.class, sourceConnection); + final XTablesSupplier suppTables = UnoRuntime.queryInterface(XTablesSupplier.class, sourceConnection); final XNameAccess tables = suppTables.getTables(); final String[] names = tables.getElementNames(); @@ -161,7 +169,7 @@ public class CopyTableWizard extends CRMBasedTestCase public void assure(final String message) { - assure(message, false); + fail(message); } private void copyTable(final String tableName, final XConnection sourceConnection, final XConnection destConnection) throws Exception, IOException, java.lang.Exception @@ -194,7 +202,7 @@ public class CopyTableWizard extends CRMBasedTestCase try { final XWindow dialog = getActiveWindow(); - final UITools uiTools = new UITools(getORB(), dialog); + final UITools uiTools = new UITools(getMSF(), dialog); final XAccessible root = uiTools.getRoot(); final XAccessibleContext accContext = root.getAccessibleContext(); final int count = accContext.getAccessibleChildCount(); diff --git a/dbaccess/qa/complex/dbaccess/DataSource.java b/dbaccess/qa/complex/dbaccess/DataSource.java index 69a9fdd82..0a6395da6 100644 --- a/dbaccess/qa/complex/dbaccess/DataSource.java +++ b/dbaccess/qa/complex/dbaccess/DataSource.java @@ -26,36 +26,48 @@ ************************************************************************/ package complex.dbaccess; +import com.sun.star.container.XNameAccess; import com.sun.star.lang.XMultiServiceFactory; import com.sun.star.uno.Exception; import com.sun.star.uno.UnoRuntime; import com.sun.star.uno.XNamingService; -import complexlib.ComplexTestCase; +// import complexlib.ComplexTestCase; import connectivity.tools.CRMDatabase; import connectivity.tools.HsqlDatabase; -import java.util.logging.Level; -import java.util.logging.Logger; +//import java.util.logging.Level; +//import java.util.logging.Logger; -public class DataSource extends ComplexTestCase +// ---------- junit imports ----------------- +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; +import org.openoffice.test.OfficeConnection; +import static org.junit.Assert.*; +// ------------------------------------------ + + +public class DataSource extends TestCase { HsqlDatabase m_database; connectivity.tools.DataSource m_dataSource; // -------------------------------------------------------------------------------------------------------- - public String[] getTestMethodNames() - { - return new String[] - { - "testRegistrationName" - }; - } - - // -------------------------------------------------------------------------------------------------------- - public String getTestObjectName() - { - return "DataSource"; - } +// public String[] getTestMethodNames() +// { +// return new String[] +// { +// "testRegistrationName" +// }; +// } +// +// // -------------------------------------------------------------------------------------------------------- +// public String getTestObjectName() +// { +// return "DataSource"; +// } // -------------------------------------------------------------------------------------------------------- private void createTestCase() @@ -64,47 +76,51 @@ public class DataSource extends ComplexTestCase { if (m_database == null) { - final CRMDatabase database = new CRMDatabase( getFactory(), false ); + final CRMDatabase database = new CRMDatabase( getMSF(), false ); m_database = database.getDatabase(); m_dataSource = m_database.getDataSource(); } } catch (Exception e) { - failed("could not create the test case, error message:\n" + e.getMessage()); + fail("could not create the test case, error message:\n" + e.getMessage()); } catch (java.lang.Exception e) { - failed("could not create the test case, error message:\n" + e.getMessage()); + fail("could not create the test case, error message:\n" + e.getMessage()); } } // -------------------------------------------------------------------------------------------------------- - private XMultiServiceFactory getFactory() - { - return (XMultiServiceFactory) param.getMSF(); - } +// private XMultiServiceFactory getFactory() +// { +// return (XMultiServiceFactory) param.getMSF(); +// } // -------------------------------------------------------------------------------------------------------- - public void testRegistrationName() + @Test public void testRegistrationName() { try { createTestCase(); // 1. check the existing "Bibliography" data source whether it has the proper name String dataSourceName = "Bibliography"; - final connectivity.tools.DataSource bibliography = new connectivity.tools.DataSource(getFactory(), dataSourceName); - assureEquals("pre-registered database has a wrong name!", dataSourceName, bibliography.getName()); + final connectivity.tools.DataSource bibliography = new connectivity.tools.DataSource(getMSF(), dataSourceName); + assertEquals("pre-registered database has a wrong name!", dataSourceName, bibliography.getName()); // 2. register a newly created data source, and verify it has the proper name dataSourceName = "someDataSource"; final XNamingService dataSourceRegistrations = (XNamingService) UnoRuntime.queryInterface( - XNamingService.class, getFactory().createInstance("com.sun.star.sdb.DatabaseContext")); + XNamingService.class, getMSF().createInstance("com.sun.star.sdb.DatabaseContext")); + final XNameAccess existenceCheck = UnoRuntime.queryInterface( XNameAccess.class, dataSourceRegistrations ); + if ( existenceCheck.hasByName( "someDataSource" ) ) + dataSourceRegistrations.revokeObject( "someDataSource" ); dataSourceRegistrations.registerObject("someDataSource", m_dataSource.getXDataSource()); - assureEquals("registration name of a newly registered data source is wrong", dataSourceName, m_dataSource.getName()); + assertEquals("registration name of a newly registered data source is wrong", dataSourceName, m_dataSource.getName()); } catch (Exception ex) { - Logger.getLogger(DataSource.class.getName()).log(Level.SEVERE, null, ex); + // Logger.getLogger(DataSource.class.getName()).log(Level.SEVERE, null, ex); + fail(); } } } diff --git a/dbaccess/qa/complex/dbaccess/DatabaseApplication.java b/dbaccess/qa/complex/dbaccess/DatabaseApplication.java index b9aaac35c..6aefa4582 100755 --- a/dbaccess/qa/complex/dbaccess/DatabaseApplication.java +++ b/dbaccess/qa/complex/dbaccess/DatabaseApplication.java @@ -56,14 +56,12 @@ public class DatabaseApplication // load it into a frame final Object object = db.getORB().createInstance("com.sun.star.frame.Desktop"); - final XComponentLoader xComponentLoader = (XComponentLoader) UnoRuntime.queryInterface(XComponentLoader.class, object); + final XComponentLoader xComponentLoader = UnoRuntime.queryInterface(XComponentLoader.class, object); final XComponent loadedComponent = xComponentLoader.loadComponentFromURL(db.getDocumentURL(), "_blank", FrameSearchFlag.ALL, new PropertyValue[0]); // get the controller, which provides access to various UI operations - final XModel docModel = (XModel) UnoRuntime.queryInterface(XModel.class, - loadedComponent); - documentUI = (XDatabaseDocumentUI) UnoRuntime.queryInterface(XDatabaseDocumentUI.class, - docModel.getCurrentController()); + final XModel docModel = UnoRuntime.queryInterface(XModel.class, loadedComponent); + documentUI = UnoRuntime.queryInterface(XDatabaseDocumentUI.class, docModel.getCurrentController()); documentUI.connect(); } @@ -87,8 +85,7 @@ public class DatabaseApplication // store the doc in a new location try { - final XStorable storeDoc = (XStorable) UnoRuntime.queryInterface(XStorable.class, - databaseDocument); + final XStorable storeDoc = UnoRuntime.queryInterface(XStorable.class, databaseDocument); if (storeDoc != null) { storeDoc.store(); diff --git a/dbaccess/qa/complex/dbaccess/DatabaseDocument.java b/dbaccess/qa/complex/dbaccess/DatabaseDocument.java index 0a9e615b5..70098c6b3 100644 --- a/dbaccess/qa/complex/dbaccess/DatabaseDocument.java +++ b/dbaccess/qa/complex/dbaccess/DatabaseDocument.java @@ -33,7 +33,7 @@ import com.sun.star.lang.XEventListener; import com.sun.star.lang.XMultiServiceFactory; import com.sun.star.script.XStorageBasedLibraryContainer; import com.sun.star.task.XInteractionRequest; -import com.sun.star.uno.Exception; + import com.sun.star.uno.Type; import com.sun.star.uno.UnoRuntime; import com.sun.star.frame.XStorable; @@ -45,7 +45,6 @@ import com.sun.star.document.XDocumentEventBroadcaster; import com.sun.star.document.XDocumentEventListener; import com.sun.star.document.XEmbeddedScripts; import com.sun.star.document.XEventsSupplier; -import com.sun.star.frame.DoubleInitializationException; import com.sun.star.lang.XComponent; import com.sun.star.frame.XComponentLoader; import com.sun.star.frame.XDispatch; @@ -56,13 +55,12 @@ import com.sun.star.frame.XModel; import com.sun.star.frame.XModel2; import com.sun.star.frame.XTitle; import com.sun.star.lang.EventObject; -import com.sun.star.lang.NotInitializedException; import com.sun.star.lang.XServiceInfo; import com.sun.star.lang.XSingleComponentFactory; import com.sun.star.lang.XTypeProvider; import com.sun.star.script.provider.XScriptProviderSupplier; import com.sun.star.sdb.XDocumentDataSource; -import com.sun.star.sdbc.XDataSource; + import com.sun.star.sdb.XFormDocumentsSupplier; import com.sun.star.sdb.XOfficeDatabaseDocument; import com.sun.star.sdb.XReportDocumentsSupplier; @@ -83,6 +81,16 @@ import java.util.ArrayList; import java.util.logging.Level; import java.util.logging.Logger; +// ---------- junit imports ----------------- +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; +import org.openoffice.test.OfficeConnection; +import static org.junit.Assert.*; +// ------------------------------------------ + public class DatabaseDocument extends TestCase implements com.sun.star.document.XDocumentEventListener { @@ -145,12 +153,12 @@ public class DatabaseDocument extends TestCase implements com.sun.star.document. private final ArrayList m_eventListeners = new ArrayList(); - public Object createInstanceWithContext(XComponentContext _context) throws Exception + public Object createInstanceWithContext(XComponentContext _context) throws com.sun.star.uno.Exception { return new CallbackComponent(); } - public Object createInstanceWithArgumentsAndContext(Object[] arg0, XComponentContext _context) throws Exception + public Object createInstanceWithArgumentsAndContext(Object[] arg0, XComponentContext _context) throws com.sun.star.uno.Exception { return createInstanceWithContext(_context); } @@ -209,8 +217,7 @@ public class DatabaseDocument extends TestCase implements com.sun.star.document. { try { - m_defaultHandler = (XInteractionHandler) UnoRuntime.queryInterface(XInteractionHandler.class, - _factory.createInstance("com.sun.star.task.InteractionHandler")); + m_defaultHandler = UnoRuntime.queryInterface(XInteractionHandler.class, _factory.createInstance("com.sun.star.task.InteractionHandler")); } catch (Exception ex) { @@ -227,14 +234,13 @@ public class DatabaseDocument extends TestCase implements com.sun.star.document. return; } - assureEquals("interaction handleer called in wrong state", STATE_LOADING_DOC, m_loadDocState); + assertEquals("interaction handleer called in wrong state", STATE_LOADING_DOC, m_loadDocState); // auto-approve final XInteractionContinuation continuations[] = _request.getContinuations(); for (int i = 0; i < continuations.length; ++i) { - final XInteractionApprove approve = (XInteractionApprove) UnoRuntime.queryInterface(XInteractionApprove.class, - continuations[i]); + final XInteractionApprove approve = UnoRuntime.queryInterface(XInteractionApprove.class, continuations[i]); if (approve != null) { approve.select(); @@ -247,25 +253,25 @@ public class DatabaseDocument extends TestCase implements com.sun.star.document. // ======================================================================================================== // -------------------------------------------------------------------------------------------------------- - public String[] getTestMethodNames() - { - return new String[] - { - "testLoadable", - "testDocumentRevenants", - "testDocumentEvents", - "testGlobalEvents" - }; - } +// public String[] getTestMethodNames() +// { +// return new String[] +// { +// "testLoadable", +// "testDocumentRevenants", +// "testDocumentEvents", +// "testGlobalEvents" +// }; +// } +// +// // -------------------------------------------------------------------------------------------------------- +// public String getTestObjectName() +// { +// return "DatabaseDocument"; +// } // -------------------------------------------------------------------------------------------------------- - public String getTestObjectName() - { - return "DatabaseDocument"; - } - - // -------------------------------------------------------------------------------------------------------- - public void before() throws java.lang.Exception + @Before public void before() throws java.lang.Exception { super.before(); @@ -274,26 +280,24 @@ public class DatabaseDocument extends TestCase implements com.sun.star.document. // at our service factory, insert a new factory for our CallbackComponent // this will allow the Basic code in our test documents to call back into this test case // here, by just instantiating this service - final XSet globalFactory = (XSet) UnoRuntime.queryInterface( - XSet.class, getORB()); + final XSet globalFactory = UnoRuntime.queryInterface(XSet.class, getMSF()); m_callbackFactory = new CallbackComponentFactory(); globalFactory.insert(m_callbackFactory); // register ourself as listener at the global event broadcaster - final XDocumentEventBroadcaster broadcaster = (XDocumentEventBroadcaster) UnoRuntime.queryInterface( - XDocumentEventBroadcaster.class, getORB().createInstance("com.sun.star.frame.GlobalEventBroadcaster")); + final XDocumentEventBroadcaster broadcaster = UnoRuntime.queryInterface(XDocumentEventBroadcaster.class, getMSF().createInstance("com.sun.star.frame.GlobalEventBroadcaster")); broadcaster.addDocumentEventListener(this); } catch (Exception e) { - log.println("could not create the test case, error message:\n" + e.getMessage()); + System.out.println("could not create the test case, error message:\n" + e.getMessage()); e.printStackTrace(System.err); - failed("failed to create the test case"); + fail("failed to create the test case"); } } // -------------------------------------------------------------------------------------------------------- - public void after() throws java.lang.Exception + @After public void after() throws java.lang.Exception { try { @@ -302,15 +306,14 @@ public class DatabaseDocument extends TestCase implements com.sun.star.document. m_callbackFactory.dispose(); // revoke ourself as listener at the global event broadcaster - final XDocumentEventBroadcaster broadcaster = (XDocumentEventBroadcaster) UnoRuntime.queryInterface( - XDocumentEventBroadcaster.class, getORB().createInstance("com.sun.star.frame.GlobalEventBroadcaster")); + final XDocumentEventBroadcaster broadcaster = UnoRuntime.queryInterface(XDocumentEventBroadcaster.class, getMSF().createInstance("com.sun.star.frame.GlobalEventBroadcaster")); broadcaster.removeDocumentEventListener(this); } catch (Exception e) { - log.println("could not create the test case, error message:\n" + e.getMessage()); + System.out.println("could not create the test case, error message:\n" + e.getMessage()); e.printStackTrace(System.err); - failed("failed to close the test case"); + fail("failed to close the test case"); } super.after(); @@ -348,16 +351,15 @@ public class DatabaseDocument extends TestCase implements com.sun.star.document. for (int i = 0; i < unsupportedMethods.length; ++i) { - assureException( _document, unsupportedMethods[i].unoInterfaceClass, - unsupportedMethods[i].methodName, new Object[]{}, _isInitialized ? null : NotInitializedException.class ); +// assureException( _document, unsupportedMethods[i].unoInterfaceClass, +// unsupportedMethods[i].methodName, new Object[]{}, _isInitialized ? null : NotInitializedException.class ); } } // -------------------------------------------------------------------------------------------------------- private XModel impl_createDocument() throws Exception { - final XModel databaseDoc = (XModel) UnoRuntime.queryInterface(XModel.class, - getORB().createInstance("com.sun.star.sdb.OfficeDatabaseDocument")); + final XModel databaseDoc = UnoRuntime.queryInterface(XModel.class, getMSF().createInstance("com.sun.star.sdb.OfficeDatabaseDocument")); // should not be initialized here - we did neither initNew nor load nor storeAsURL it impl_checkDocumentInitState(databaseDoc, false); @@ -368,17 +370,15 @@ public class DatabaseDocument extends TestCase implements com.sun.star.document. // -------------------------------------------------------------------------------------------------------- private void impl_closeDocument(XModel _databaseDoc) throws CloseVetoException, IOException, Exception { - final XCloseable closeDoc = (XCloseable) UnoRuntime.queryInterface(XCloseable.class, - _databaseDoc); + final XCloseable closeDoc = UnoRuntime.queryInterface(XCloseable.class, _databaseDoc); closeDoc.close(true); } // -------------------------------------------------------------------------------------------------------- private XModel impl_createEmptyEmbeddedHSQLDocument() throws Exception, IOException { - final XModel databaseDoc = (XModel) UnoRuntime.queryInterface(XModel.class, - getORB().createInstance("com.sun.star.sdb.OfficeDatabaseDocument")); - final XStorable storeDoc = (XStorable) UnoRuntime.queryInterface(XStorable.class, databaseDoc); + final XModel databaseDoc = UnoRuntime.queryInterface(XModel.class, getMSF().createInstance("com.sun.star.sdb.OfficeDatabaseDocument")); + final XStorable storeDoc = UnoRuntime.queryInterface(XStorable.class, databaseDoc); // verify the document rejects API calls which require it to be initialized impl_checkDocumentInitState(databaseDoc, false); @@ -388,15 +388,13 @@ public class DatabaseDocument extends TestCase implements com.sun.star.document. final String url = databaseDoc.getURL(); final PropertyValue[] args = databaseDoc.getArgs(); // they should be all empty at this time - assureEquals("location is expected to be empty here", "", location); - assureEquals("URL is expected to be empty here", "", url); - assureEquals("Args are expected to be empty here", 0, args.length); + assertEquals("location is expected to be empty here", "", location); + assertEquals("URL is expected to be empty here", "", url); + assertEquals("Args are expected to be empty here", 0, args.length); // and, you should be able to set properties at the data source - final XOfficeDatabaseDocument dataSourceAccess = (XOfficeDatabaseDocument) UnoRuntime.queryInterface( - XOfficeDatabaseDocument.class, databaseDoc); - final XPropertySet dsProperties = (XPropertySet) UnoRuntime.queryInterface( - XPropertySet.class, dataSourceAccess.getDataSource()); + final XOfficeDatabaseDocument dataSourceAccess = UnoRuntime.queryInterface(XOfficeDatabaseDocument.class, databaseDoc); + final XPropertySet dsProperties = UnoRuntime.queryInterface(XPropertySet.class, dataSourceAccess.getDataSource()); dsProperties.setPropertyValue("URL", "sdbc:embedded:hsqldb"); final String documentURL = createTempFileURL(); @@ -404,7 +402,7 @@ public class DatabaseDocument extends TestCase implements com.sun.star.document. // now that the document is stored, ... // ... its URL should be correct - assureEquals("wrong URL after storing the document", documentURL, databaseDoc.getURL()); + assertEquals("wrong URL after storing the document", documentURL, databaseDoc.getURL()); // ... it should be initialized impl_checkDocumentInitState(databaseDoc, true); @@ -412,7 +410,7 @@ public class DatabaseDocument extends TestCase implements com.sun.star.document. } // -------------------------------------------------------------------------------------------------------- - public void testLoadable() throws Exception, IOException + @Test public void testLoadable() throws Exception, IOException { XModel databaseDoc = impl_createEmptyEmbeddedHSQLDocument(); String documentURL = databaseDoc.getURL(); @@ -426,40 +424,39 @@ public class DatabaseDocument extends TestCase implements com.sun.star.document. // .................................................................... // 2. XLoadable::load - databaseDoc = (XModel) UnoRuntime.queryInterface(XModel.class, - getORB().createInstance("com.sun.star.sdb.OfficeDatabaseDocument")); + databaseDoc = UnoRuntime.queryInterface(XModel.class, getMSF().createInstance("com.sun.star.sdb.OfficeDatabaseDocument")); documentURL = copyToTempFile(documentURL); // load the doc, and verify it's initialized then, and has the proper URL - XLoadable loadDoc = (XLoadable) UnoRuntime.queryInterface(XLoadable.class, databaseDoc); + XLoadable loadDoc = UnoRuntime.queryInterface(XLoadable.class, databaseDoc); loadDoc.load(new PropertyValue[] { new PropertyValue("URL", 0, documentURL, PropertyState.DIRECT_VALUE) }); databaseDoc.attachResource(documentURL, new PropertyValue[0]); - assureEquals("wrong URL after loading the document", documentURL, databaseDoc.getURL()); + assertEquals("wrong URL after loading the document", documentURL, databaseDoc.getURL()); impl_checkDocumentInitState(databaseDoc, true); // and while we are here ... initilizing the same document again should not be possible - assureException( databaseDoc, XLoadable.class, "initNew", new Object[0], - DoubleInitializationException.class ); - assureException( databaseDoc, XLoadable.class, "load", new Object[] { new PropertyValue[0] }, - DoubleInitializationException.class ); +// assureException( databaseDoc, XLoadable.class, "initNew", new Object[0], +// DoubleInitializationException.class ); +// assureException( databaseDoc, XLoadable.class, "load", new Object[] { new PropertyValue[0] }, +// DoubleInitializationException.class ); // .................................................................... // 3. XLoadable::initNew impl_closeDocument(databaseDoc); databaseDoc = impl_createDocument(); - loadDoc = (XLoadable) UnoRuntime.queryInterface(XLoadable.class, databaseDoc); + loadDoc = UnoRuntime.queryInterface(XLoadable.class, databaseDoc); loadDoc.initNew(); - assureEquals("wrong URL after initializing the document", "", databaseDoc.getURL()); + assertEquals("wrong URL after initializing the document", "", databaseDoc.getURL()); impl_checkDocumentInitState(databaseDoc, true); // same as above - initializing the document a second time must fail - assureException( databaseDoc, XLoadable.class, "initNew", new Object[0], - DoubleInitializationException.class ); - assureException( databaseDoc, XLoadable.class, "load", new Object[] { new PropertyValue[0] }, - DoubleInitializationException.class ); +// assureException( databaseDoc, XLoadable.class, "initNew", new Object[0], +// DoubleInitializationException.class ); +// assureException( databaseDoc, XLoadable.class, "load", new Object[] { new PropertyValue[0] }, +// DoubleInitializationException.class ); } // -------------------------------------------------------------------------------------------------------- @@ -478,7 +475,9 @@ public class DatabaseDocument extends TestCase implements com.sun.star.document. for ( int i=0; i<_args.length; ++i ) { if ( _args[i].Name.equals( "TestCase_Marker" ) && _args[i].Value.equals( "Yes" ) ) + { return true; + } } return false; } @@ -499,28 +498,25 @@ public class DatabaseDocument extends TestCase implements com.sun.star.document. { new PropertyValue("PickListEntry", 0, false, PropertyState.DIRECT_VALUE), new PropertyValue("MacroExecutionMode", 0, com.sun.star.document.MacroExecMode.USE_CONFIG, PropertyState.DIRECT_VALUE), - new PropertyValue("InteractionHandler", 0, new MacroExecutionApprove(getORB()), PropertyState.DIRECT_VALUE) + new PropertyValue("InteractionHandler", 0, new MacroExecutionApprove(getMSF()), PropertyState.DIRECT_VALUE) }; } // -------------------------------------------------------------------------------------------------------- private int impl_setMacroSecurityLevel(int _level) throws Exception { - final XMultiServiceFactory configProvider = (XMultiServiceFactory) UnoRuntime.queryInterface(XMultiServiceFactory.class, - getORB().createInstance("com.sun.star.configuration.ConfigurationProvider")); + final XMultiServiceFactory configProvider = UnoRuntime.queryInterface(XMultiServiceFactory.class, getMSF().createInstance("com.sun.star.configuration.ConfigurationProvider")); final PropertyValue[] args = new PropertyValue[] { new PropertyValue("nodepath", 0, "/org.openoffice.Office.Common/Security/Scripting", PropertyState.DIRECT_VALUE) }; - final XPropertySet securitySettings = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, - configProvider.createInstanceWithArguments("com.sun.star.configuration.ConfigurationUpdateAccess", args)); + final XPropertySet securitySettings = UnoRuntime.queryInterface(XPropertySet.class, configProvider.createInstanceWithArguments("com.sun.star.configuration.ConfigurationUpdateAccess", args)); final int oldValue = ((Integer) securitySettings.getPropertyValue("MacroSecurityLevel")).intValue(); securitySettings.setPropertyValue("MacroSecurityLevel", Integer.valueOf(_level)); - final XChangesBatch committer = (XChangesBatch) UnoRuntime.queryInterface(XChangesBatch.class, - securitySettings); + final XChangesBatch committer = UnoRuntime.queryInterface(XChangesBatch.class, securitySettings); committer.commitChanges(); return oldValue; @@ -529,10 +525,8 @@ public class DatabaseDocument extends TestCase implements com.sun.star.document. // -------------------------------------------------------------------------------------------------------- private XModel impl_loadDocument( final String _documentURL, final PropertyValue[] _loadArgs ) throws Exception { - final XComponentLoader loader = (XComponentLoader) UnoRuntime.queryInterface( XComponentLoader.class, - getORB().createInstance("com.sun.star.frame.Desktop") ); - return (XModel) UnoRuntime.queryInterface( XModel.class, - loader.loadComponentFromURL( _documentURL, _BLANK, 0, _loadArgs ) ); + final XComponentLoader loader = UnoRuntime.queryInterface(XComponentLoader.class, getMSF().createInstance("com.sun.star.frame.Desktop")); + return UnoRuntime.queryInterface(XModel.class, loader.loadComponentFromURL(_documentURL, _BLANK, 0, _loadArgs)); } // -------------------------------------------------------------------------------------------------------- @@ -540,8 +534,7 @@ public class DatabaseDocument extends TestCase implements com.sun.star.document. { // store the document final String documentURL = FileHelper.getOOoCompatibleFileURL( _document.getURL() ); - final XStorable storeDoc = (XStorable) UnoRuntime.queryInterface( XStorable.class, - _document ); + final XStorable storeDoc = UnoRuntime.queryInterface(XStorable.class, _document); storeDoc.store(); } @@ -553,8 +546,7 @@ public class DatabaseDocument extends TestCase implements com.sun.star.document. XModel databaseDoc = impl_createEmptyEmbeddedHSQLDocument(); // create Basic library/module therein - final XEmbeddedScripts embeddedScripts = (XEmbeddedScripts) UnoRuntime.queryInterface(XEmbeddedScripts.class, - databaseDoc); + final XEmbeddedScripts embeddedScripts = UnoRuntime.queryInterface(XEmbeddedScripts.class, databaseDoc); final XStorageBasedLibraryContainer basicLibs = embeddedScripts.getBasicLibraries(); final XNameContainer newLib = basicLibs.createLibrary( _libName ); newLib.insertByName( _moduleName, _code ); @@ -579,7 +571,7 @@ public class DatabaseDocument extends TestCase implements com.sun.star.document. * This method here tests some of those aspects of a document which should survive the death of one * instance and re-creation as a revenant. */ - public void testDocumentRevenants() throws Exception, IOException + @Test public void testDocumentRevenants() throws Exception, IOException { // create an empty document XModel databaseDoc = impl_createDocWithMacro( "Lib", "Module", @@ -592,42 +584,38 @@ public class DatabaseDocument extends TestCase implements com.sun.star.document. // at this stage, the marker should not yet be present in the doc's args, else some of the below // tests become meaningless - assure( "A newly created doc should not have the test case marker", !impl_hasMarker( databaseDoc.getArgs() ) ); + assertTrue( "A newly created doc should not have the test case marker", !impl_hasMarker( databaseDoc.getArgs() ) ); // obtain the DataSource associated with the document. Keeping this alive // ensures that the "impl data" of the document is kept alive, too, so when closing // and re-opening it, this "impl data" must be re-used. - XDocumentDataSource dataSource = (XDocumentDataSource)UnoRuntime.queryInterface( XDocumentDataSource.class, - ((XOfficeDatabaseDocument)UnoRuntime.queryInterface( - XOfficeDatabaseDocument.class, databaseDoc )).getDataSource() ); + XDocumentDataSource dataSource = UnoRuntime.queryInterface(XDocumentDataSource.class, (UnoRuntime.queryInterface(XOfficeDatabaseDocument.class, databaseDoc)).getDataSource()); // close and reload the doc impl_closeDocument(databaseDoc); databaseDoc = impl_loadDocument( documentURL, impl_getMarkerLoadArgs() ); // since we just put the marker into the load-call, it should be present at the doc - assure( "The test case marker got lost.", impl_hasMarker( databaseDoc.getArgs() ) ); + assertTrue( "The test case marker got lost.", impl_hasMarker( databaseDoc.getArgs() ) ); // The basic library should have survived - final XEmbeddedScripts embeddedScripts = (XEmbeddedScripts) UnoRuntime.queryInterface(XEmbeddedScripts.class, - databaseDoc); + final XEmbeddedScripts embeddedScripts = UnoRuntime.queryInterface(XEmbeddedScripts.class, databaseDoc); final XStorageBasedLibraryContainer basicLibs = embeddedScripts.getBasicLibraries(); - assure( "Baisc lib did not survive reloading a closed document", basicLibs.hasByName( "Lib" ) ); - final XNameContainer lib = (XNameContainer)UnoRuntime.queryInterface( - XNameContainer.class, basicLibs.getByName( "Lib" ) ); - assure( "Basic module did not survive reloading a closed document", lib.hasByName( "Module" ) ); + assertTrue( "Baisc lib did not survive reloading a closed document", basicLibs.hasByName( "Lib" ) ); + final XNameContainer lib = UnoRuntime.queryInterface(XNameContainer.class, basicLibs.getByName("Lib")); + assertTrue( "Basic module did not survive reloading a closed document", lib.hasByName( "Module" ) ); // now closing the doc, and obtaining it from the data source, should preserve the marker we put into the load // args impl_closeDocument( databaseDoc ); - databaseDoc = (XModel)UnoRuntime.queryInterface( XModel.class, dataSource.getDatabaseDocument() ); - assure( "The test case marker did not survive re-retrieval of the doc from the data source.", + databaseDoc = UnoRuntime.queryInterface(XModel.class, dataSource.getDatabaseDocument()); + assertTrue( "The test case marker did not survive re-retrieval of the doc from the data source.", impl_hasMarker( databaseDoc.getArgs() ) ); // on the other hand, closing and regurlarly re-loading the doc *without* the marker should indeed // lose it impl_closeDocument( databaseDoc ); databaseDoc = impl_loadDocument( documentURL, impl_getDefaultLoadArgs() ); - assure( "Reloading the document kept the old args, instead of the newly supplied ones.", + assertTrue( "Reloading the document kept the old args, instead of the newly supplied ones.", !impl_hasMarker( databaseDoc.getArgs() ) ); // clean up @@ -635,7 +623,7 @@ public class DatabaseDocument extends TestCase implements com.sun.star.document. } // -------------------------------------------------------------------------------------------------------- - public void testDocumentEvents() throws Exception, IOException + @Test public void testDocumentEvents() throws Exception, IOException { // create an empty document final String libName = "EventHandlers"; @@ -660,8 +648,7 @@ public class DatabaseDocument extends TestCase implements com.sun.star.document. // bind the macro to the OnLoad event final String macroURI = "vnd.sun.star.script:" + libName + "." + moduleName + ".OnLoad?language=Basic&location=document"; - final XEventsSupplier eventsSupplier = (XEventsSupplier) UnoRuntime.queryInterface(XEventsSupplier.class, - databaseDoc); + final XEventsSupplier eventsSupplier = UnoRuntime.queryInterface(XEventsSupplier.class, databaseDoc); eventsSupplier.getEvents().replaceByName("OnLoad", new PropertyValue[] { new PropertyValue("EventType", 0, "Script", PropertyState.DIRECT_VALUE), @@ -694,7 +681,7 @@ public class DatabaseDocument extends TestCase implements com.sun.star.document. "OnLoad" }, context); - assureEquals("our provided interaction handler was not called", STATE_ON_LOAD_RECEIVED, m_loadDocState); + assertEquals("our provided interaction handler was not called", STATE_ON_LOAD_RECEIVED, m_loadDocState); // restore macro security level impl_setMacroSecurityLevel(oldSecurityLevel); @@ -704,11 +691,10 @@ public class DatabaseDocument extends TestCase implements com.sun.star.document. } // -------------------------------------------------------------------------------------------------------- - public void testGlobalEvents() throws Exception, IOException + @Test public void testGlobalEvents() throws Exception, IOException { XModel databaseDoc = impl_createEmptyEmbeddedHSQLDocument(); - final XStorable storeDoc = (XStorable) UnoRuntime.queryInterface(XStorable.class, - databaseDoc); + final XStorable storeDoc = UnoRuntime.queryInterface(XStorable.class, databaseDoc); String context, newURL; @@ -717,7 +703,7 @@ public class DatabaseDocument extends TestCase implements com.sun.star.document. context = "store"; impl_startObservingEvents(context); storeDoc.store(); - assureEquals("store is not expected to change the document URL", databaseDoc.getURL(), oldURL); + assertEquals("store is not expected to change the document URL", databaseDoc.getURL(), oldURL); impl_stopObservingEvents(m_globalEvents, new String[] { "OnSave", "OnSaveDone" @@ -727,7 +713,7 @@ public class DatabaseDocument extends TestCase implements com.sun.star.document. context = "storeToURL"; impl_startObservingEvents(context); storeDoc.storeToURL(createTempFileURL(), new PropertyValue[0]); - assureEquals("storetoURL is not expected to change the document URL", databaseDoc.getURL(), oldURL); + assertEquals("storetoURL is not expected to change the document URL", databaseDoc.getURL(), oldURL); impl_stopObservingEvents(m_globalEvents, new String[] { "OnSaveTo", "OnSaveToDone" @@ -738,19 +724,18 @@ public class DatabaseDocument extends TestCase implements com.sun.star.document. context = "storeAsURL"; impl_startObservingEvents(context); storeDoc.storeAsURL(newURL, new PropertyValue[0]); - assureEquals("storeAsURL is expected to change the document URL", databaseDoc.getURL(), newURL); + assertEquals("storeAsURL is expected to change the document URL", databaseDoc.getURL(), newURL); impl_stopObservingEvents(m_globalEvents, new String[] { "OnSaveAs", "OnSaveAsDone" }, context); // XModifiable.setModified - final XModifiable modifyDoc = (XModifiable) UnoRuntime.queryInterface(XModifiable.class, - databaseDoc); + final XModifiable modifyDoc = UnoRuntime.queryInterface(XModifiable.class, databaseDoc); context = "setModified"; impl_startObservingEvents(context); modifyDoc.setModified(true); - assureEquals("setModified didn't work", modifyDoc.isModified(), true); + assertEquals("setModified didn't work", modifyDoc.isModified(), true); impl_stopObservingEvents(m_globalEvents, new String[] { "OnModifyChanged" @@ -760,7 +745,7 @@ public class DatabaseDocument extends TestCase implements com.sun.star.document. context = "store (2)"; impl_startObservingEvents(context); storeDoc.store(); - assureEquals("'store' should implicitly reset the modified flag", modifyDoc.isModified(), false); + assertEquals("'store' should implicitly reset the modified flag", modifyDoc.isModified(), false); impl_stopObservingEvents(m_globalEvents, new String[] { "OnSave", "OnSaveDone", "OnModifyChanged" @@ -768,12 +753,10 @@ public class DatabaseDocument extends TestCase implements com.sun.star.document. // XComponentLoader.loadComponentFromURL newURL = copyToTempFile(databaseDoc.getURL()); - final XComponentLoader loader = (XComponentLoader) UnoRuntime.queryInterface(XComponentLoader.class, - getORB().createInstance("com.sun.star.frame.Desktop")); + final XComponentLoader loader = UnoRuntime.queryInterface(XComponentLoader.class, getMSF().createInstance("com.sun.star.frame.Desktop")); context = "loadComponentFromURL"; impl_startObservingEvents(context); - databaseDoc = (XModel) UnoRuntime.queryInterface(XModel.class, - loader.loadComponentFromURL(newURL, _BLANK, 0, impl_getDefaultLoadArgs())); + databaseDoc = UnoRuntime.queryInterface(XModel.class, loader.loadComponentFromURL(newURL, _BLANK, 0, impl_getDefaultLoadArgs())); impl_stopObservingEvents(m_globalEvents, new String[] { @@ -781,8 +764,7 @@ public class DatabaseDocument extends TestCase implements com.sun.star.document. }, context); // closing a document by API - final XCloseable closeDoc = (XCloseable) UnoRuntime.queryInterface(XCloseable.class, - databaseDoc); + final XCloseable closeDoc = UnoRuntime.queryInterface(XCloseable.class, databaseDoc); context = "close (API)"; impl_startObservingEvents(context); closeDoc.close(true); @@ -795,13 +777,11 @@ public class DatabaseDocument extends TestCase implements com.sun.star.document. // closing a document via UI context = "close (UI)"; impl_startObservingEvents("prepare for '" + context + "'"); - databaseDoc = (XModel) UnoRuntime.queryInterface(XModel.class, - loader.loadComponentFromURL(newURL, _BLANK, 0, impl_getDefaultLoadArgs())); + databaseDoc = UnoRuntime.queryInterface(XModel.class, loader.loadComponentFromURL(newURL, _BLANK, 0, impl_getDefaultLoadArgs())); impl_waitForEvent(m_globalEvents, "OnLoad", 5000); // wait for all events to arrive - OnLoad should be the last one - final XDispatchProvider dispatchProvider = (XDispatchProvider) UnoRuntime.queryInterface(XDispatchProvider.class, - databaseDoc.getCurrentController().getFrame()); + final XDispatchProvider dispatchProvider = UnoRuntime.queryInterface(XDispatchProvider.class, databaseDoc.getCurrentController().getFrame()); final URL url = impl_getURL(".uno:CloseDoc"); final XDispatch dispatcher = dispatchProvider.queryDispatch(url, "", 0); impl_startObservingEvents(context); @@ -814,8 +794,7 @@ public class DatabaseDocument extends TestCase implements com.sun.star.document. // creating a new document databaseDoc = impl_createDocument(); - final XLoadable loadDoc = (XLoadable) UnoRuntime.queryInterface(XLoadable.class, - databaseDoc); + final XLoadable loadDoc = UnoRuntime.queryInterface(XLoadable.class, databaseDoc); context = "initNew"; impl_startObservingEvents(context); loadDoc.initNew(); @@ -832,13 +811,11 @@ public class DatabaseDocument extends TestCase implements com.sun.star.document. context = "activation"; // for this, load a database document ... impl_startObservingEvents("prepare for '" + context + "'"); - databaseDoc = (XModel) UnoRuntime.queryInterface(XModel.class, - loader.loadComponentFromURL(newURL, _BLANK, 0, impl_getDefaultLoadArgs())); + databaseDoc = UnoRuntime.queryInterface(XModel.class, loader.loadComponentFromURL(newURL, _BLANK, 0, impl_getDefaultLoadArgs())); final int previousOnLoadEventPos = impl_waitForEvent(m_globalEvents, "OnLoad", 5000); // ... and another document ... final String otherURL = copyToTempFile(databaseDoc.getURL()); - final XModel otherDoc = (XModel) UnoRuntime.queryInterface(XModel.class, - loader.loadComponentFromURL(otherURL, _BLANK, 0, impl_getDefaultLoadArgs())); + final XModel otherDoc = UnoRuntime.queryInterface(XModel.class, loader.loadComponentFromURL(otherURL, _BLANK, 0, impl_getDefaultLoadArgs())); impl_raise(otherDoc); impl_waitForEvent(m_globalEvents, "OnLoad", 5000, previousOnLoadEventPos + 1); @@ -864,8 +841,7 @@ public class DatabaseDocument extends TestCase implements com.sun.star.document. new URL() }; url[0].Complete = _completeURL; - final XURLTransformer urlTransformer = (XURLTransformer) UnoRuntime.queryInterface(XURLTransformer.class, - getORB().createInstance("com.sun.star.util.URLTransformer")); + final XURLTransformer urlTransformer = UnoRuntime.queryInterface(XURLTransformer.class, getMSF().createInstance("com.sun.star.util.URLTransformer")); urlTransformer.parseStrict(url); return url[0]; } @@ -874,15 +850,14 @@ public class DatabaseDocument extends TestCase implements com.sun.star.document. private void impl_raise(XModel _document) { final XFrame frame = _document.getCurrentController().getFrame(); - final XTopWindow topWindow = (XTopWindow) UnoRuntime.queryInterface(XTopWindow.class, - frame.getContainerWindow()); + final XTopWindow topWindow = UnoRuntime.queryInterface(XTopWindow.class, frame.getContainerWindow()); topWindow.toFront(); } // -------------------------------------------------------------------------------------------------------- private void impl_startObservingEvents(String _context) { - log.println(" " + _context + " {"); + System.out.println(" " + _context + " {"); synchronized (m_documentEvents) { m_documentEvents.clear(); @@ -923,19 +898,19 @@ public class DatabaseDocument extends TestCase implements com.sun.star.document. actualEventCount = _actualEvents.size(); } - assureEquals("wrong event count for '" + _context + "'", + assertEquals("wrong event count for '" + _context + "'", _expectedEvents.length, _actualEvents.size()); for (int i = 0; i < _expectedEvents.length; ++i) { - assureEquals("wrong event at positon " + (i + 1) + " for '" + _context + "'", + assertEquals("wrong event at positon " + (i + 1) + " for '" + _context + "'", _expectedEvents[i], _actualEvents.get(i)); } } } finally { - log.println(" }"); + System.out.println(" }"); } } @@ -975,7 +950,7 @@ public class DatabaseDocument extends TestCase implements com.sun.star.document. } } - failed("expected event '" + _expectedEvent + "' did not arrive after " + _maxMilliseconds + " milliseconds"); + fail("expected event '" + _expectedEvent + "' did not arrive after " + _maxMilliseconds + " milliseconds"); return -1; } @@ -994,7 +969,7 @@ public class DatabaseDocument extends TestCase implements com.sun.star.document. if ((_Event.EventName.equals("OnLoad")) && (m_loadDocState != STATE_NOT_STARTED)) { - assureEquals("OnLoad event must come *after* invocation of the interaction handler / user!", + assertEquals("OnLoad event must come *after* invocation of the interaction handler / user!", m_loadDocState, STATE_MACRO_EXEC_APPROVED); m_loadDocState = STATE_ON_LOAD_RECEIVED; } @@ -1005,7 +980,7 @@ public class DatabaseDocument extends TestCase implements com.sun.star.document. m_documentEvents.notifyAll(); } - log.println(" document event: " + _Event.EventName); + System.out.println(" document event: " + _Event.EventName); } // -------------------------------------------------------------------------------------------------------- @@ -1023,7 +998,7 @@ public class DatabaseDocument extends TestCase implements com.sun.star.document. m_globalEvents.notifyAll(); } - log.println(" global event: " + _Event.EventName); + System.out.println(" global event: " + _Event.EventName); } // -------------------------------------------------------------------------------------------------------- diff --git a/dbaccess/qa/complex/dbaccess/Parser.java b/dbaccess/qa/complex/dbaccess/Parser.java index 9616a645a..2f7ede904 100644 --- a/dbaccess/qa/complex/dbaccess/Parser.java +++ b/dbaccess/qa/complex/dbaccess/Parser.java @@ -35,23 +35,34 @@ import com.sun.star.sdbc.SQLException; import com.sun.star.uno.Exception; import com.sun.star.uno.UnoRuntime; + +// ---------- junit imports ----------------- +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; +import org.openoffice.test.OfficeConnection; +import static org.junit.Assert.*; +// ------------------------------------------ + public class Parser extends CRMBasedTestCase { // -------------------------------------------------------------------------------------------------------- - public String[] getTestMethodNames() - { - return new String[] { - "checkJoinSyntax", - "checkParameterTypes", - "checkWhere", - }; - } +// public String[] getTestMethodNames() +// { +// return new String[] { +// "checkJoinSyntax", +// "checkParameterTypes", +// "checkWhere", +// }; +// } // -------------------------------------------------------------------------------------------------------- - public String getTestObjectName() - { - return "Parser"; - } +// public String getTestObjectName() +// { +// return "Parser"; +// } // -------------------------------------------------------------------------------------------------------- protected void createTestCase() @@ -64,11 +75,11 @@ public class Parser extends CRMBasedTestCase catch ( Exception e ) { e.printStackTrace( System.err ); - assure( "caught an exception (" + e.getMessage() + ") while creating the test case", false ); + fail( "caught an exception (" + e.getMessage() + ") while creating the test case"); } } - public void checkWhere() throws Exception + @Test public void checkWhere() throws Exception { final XSingleSelectQueryComposer composer = createQueryComposer(); final String SELECT = "SELECT \"products\".\"Name\" FROM \"products\" WHERE "; @@ -107,7 +118,7 @@ public class Parser extends CRMBasedTestCase // -------------------------------------------------------------------------------------------------------- /** verifies that aliases for inner queries work as expected */ - public void checkJoinSyntax() throws Exception + @Test public void checkJoinSyntax() throws Exception { final XSingleSelectQueryComposer composer = createQueryComposer(); @@ -144,7 +155,7 @@ public class Parser extends CRMBasedTestCase { caughtExpected = true; } - assure( "pre-condition not met: parser should except on unparseable statements, else the complete" + + assertTrue( "pre-condition not met: parser should except on unparseable statements, else the complete" + "test is bogus!", caughtExpected ); } @@ -154,30 +165,28 @@ public class Parser extends CRMBasedTestCase final XSingleSelectQueryComposer composer = createQueryComposer(); composer.setQuery( _statement ); - assureEquals( "checkParameterTypes: internal error", _expectedParameterNames.length, _expectedParameterTypes.length ); + assertEquals( "checkParameterTypes: internal error", _expectedParameterNames.length, _expectedParameterTypes.length ); - final XParametersSupplier paramSupp = (XParametersSupplier)UnoRuntime.queryInterface( - XParametersSupplier.class, composer ); + final XParametersSupplier paramSupp = UnoRuntime.queryInterface(XParametersSupplier.class, composer); final XIndexAccess parameters = paramSupp.getParameters(); - assureEquals( "(ctx: " + _context + ") unexpected parameter count", _expectedParameterNames.length, parameters.getCount() ); + assertEquals( "(ctx: " + _context + ") unexpected parameter count", _expectedParameterNames.length, parameters.getCount() ); for ( int i=0; i<parameters.getCount(); ++i ) { - final XPropertySet parameter = (XPropertySet)UnoRuntime.queryInterface( XPropertySet.class, - parameters.getByIndex(i) ); + final XPropertySet parameter = UnoRuntime.queryInterface(XPropertySet.class, parameters.getByIndex(i)); final String name = (String)parameter.getPropertyValue( "Name" ); - assureEquals( "(ctx: " + _context + ") unexpected parameter name for parameter number " + ( i + 1 ), _expectedParameterNames[i], name ); + assertEquals( "(ctx: " + _context + ") unexpected parameter name for parameter number " + ( i + 1 ), _expectedParameterNames[i], name ); final int type = ((Integer)parameter.getPropertyValue( "Type" )).intValue(); - assureEquals( "(ctx: " + _context + ") unexpected data type for parameter number " + ( i + 1 ), _expectedParameterTypes[i], type ); + assertEquals( "(ctx: " + _context + ") unexpected data type for parameter number " + ( i + 1 ), _expectedParameterTypes[i], type ); } } // -------------------------------------------------------------------------------------------------------- /** verifies that the parser properly recognizes the types of parameters */ - public void checkParameterTypes() throws Exception + @Test public void checkParameterTypes() throws Exception { impl_checkParameters( "SELECT * FROM \"all orders\" " + diff --git a/dbaccess/qa/complex/dbaccess/PropertyBag.java b/dbaccess/qa/complex/dbaccess/PropertyBag.java index 911ac557e..6f3a93014 100644 --- a/dbaccess/qa/complex/dbaccess/PropertyBag.java +++ b/dbaccess/qa/complex/dbaccess/PropertyBag.java @@ -27,14 +27,24 @@ package complex.dbaccess; -import complexlib.ComplexTestCase; +// import complexlib.ComplexTestCase; import com.sun.star.uno.UnoRuntime; import com.sun.star.uno.XInterface; import com.sun.star.lang.XMultiServiceFactory; import com.sun.star.beans.*; -public class PropertyBag extends ComplexTestCase +// ---------- junit imports ----------------- +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; +import org.openoffice.test.OfficeConnection; +import static org.junit.Assert.*; +// ------------------------------------------ + +public class PropertyBag extends TestCase { private static final String VALUE = "Value"; private XPropertyContainer m_bag; @@ -42,30 +52,30 @@ public class PropertyBag extends ComplexTestCase private XPropertyAccess m_access; private XMultiServiceFactory m_orb = null; - public String[] getTestMethodNames() - { - return new String[] - { - "checkBasics", - "checkSequenceAccess", - "checkDynamicSet" - }; - } +// public String[] getTestMethodNames() +// { +// return new String[] +// { +// "checkBasics", +// "checkSequenceAccess", +// "checkDynamicSet" +// }; +// } public String getTestObjectName() { return "PropertyBag"; } - public void before() + @Before public void before() { - m_orb = (XMultiServiceFactory)param.getMSF(); + m_orb = getMSF(); } - public void checkBasics() + @Test public void checkBasics() { createEmptyBag(); - log.println("testing the basics"); + System.out.println("testing the basics"); // check whether empty property names are rejected boolean caughtExpected = false; @@ -76,7 +86,9 @@ public class PropertyBag extends ComplexTestCase catch(com.sun.star.lang.IllegalArgumentException e) { caughtExpected = true; } catch(com.sun.star.uno.Exception e) { } if ( !caughtExpected ) - failed( "empty property names are not rejected by XPropertyContainer::addProperty" ); + { + fail("empty property names are not rejected by XPropertyContainer::addProperty"); + } // check whether duplicate insertions are rejected caughtExpected = false; @@ -88,7 +100,9 @@ public class PropertyBag extends ComplexTestCase catch(com.sun.star.beans.PropertyExistException e) { caughtExpected = true; } catch(com.sun.star.uno.Exception e) { } if ( !caughtExpected ) - failed( "insertion of duplicate property names is not rejected" ); + { + fail("insertion of duplicate property names is not rejected"); + } // try removing the property we just added - this should fail, as it does not have // the REMOVEABLE attribute @@ -100,7 +114,9 @@ public class PropertyBag extends ComplexTestCase catch(com.sun.star.beans.NotRemoveableException e) { caughtExpected = true; } catch(com.sun.star.uno.Exception e) { } if ( !caughtExpected ) - failed( "removing non-removeable properties is expected to fail - but it didn't" ); + { + fail("removing non-removeable properties is expected to fail - but it didn't"); + } // try removing a non-existent property caughtExpected = false; @@ -111,7 +127,9 @@ public class PropertyBag extends ComplexTestCase catch(com.sun.star.beans.UnknownPropertyException e) { caughtExpected = true; } catch(com.sun.star.uno.Exception e) { } if ( !caughtExpected ) - failed( "removing non-existent properties is expected to fail - but it didn't" ); + { + fail("removing non-existent properties is expected to fail - but it didn't"); + } // try writing and reading a value for the one property we have so far try @@ -120,11 +138,13 @@ public class PropertyBag extends ComplexTestCase m_set.setPropertyValue( VALUE , testValue); final String currentValue = (String)m_set.getPropertyValue( VALUE); if ( !currentValue.equals( testValue ) ) - failed( "set property is not remembered" ); + { + fail("set property is not remembered"); + } } catch(com.sun.star.uno.Exception e) { - failed( "setting or getting a property value failed" ); + fail( "setting or getting a property value failed" ); } // try setting an illegal value for the property @@ -136,12 +156,14 @@ public class PropertyBag extends ComplexTestCase catch(com.sun.star.lang.IllegalArgumentException e) { caughtExpected = true; } catch(com.sun.star.uno.Exception e) { } if ( !caughtExpected ) - failed( "the bag does not respect the property type we declared for the property" ); + { + fail("the bag does not respect the property type we declared for the property"); + } } - public void checkSequenceAccess() throws com.sun.star.uno.Exception + @Test public void checkSequenceAccess() throws com.sun.star.uno.Exception { - log.println( "checking PropertySetAccess via sequences" ); + System.out.println( "checking PropertySetAccess via sequences" ); createStandardBag( false ); // --------------------------------- @@ -160,10 +182,10 @@ public class PropertyBag extends ComplexTestCase final Object value = m_set.getPropertyValue( expectedValues[i].Name ); if ( !value.equals( expectedValues[i].Value ) ) { - log.println( "property name : " + expectedValues[i].Name ); - log.println( "expected value: " + expectedValues[i].Value.toString() ); - log.println( "current value : " + value.toString() ); - failed( "retrieving a previously set property (" + expectedValues[i].Value.getClass().toString() + ") failed" ); + System.out.println( "property name : " + expectedValues[i].Name ); + System.out.println( "expected value: " + expectedValues[i].Value.toString() ); + System.out.println( "current value : " + value.toString() ); + fail( "retrieving a previously set property (" + expectedValues[i].Value.getClass().toString() + ") failed" ); } } @@ -180,23 +202,25 @@ public class PropertyBag extends ComplexTestCase { if ( !expectedValues[j].Value.equals( value ) ) { - log.println( "property name : " + expectedValues[j].Name ); - log.println( "expected value: " + expectedValues[j].Value.toString() ); - log.println( "current value : " + value.toString() ); - failed( "getPropertyValues failed for property '" + name + "' failed" ); + System.out.println( "property name : " + expectedValues[j].Name ); + System.out.println( "expected value: " + expectedValues[j].Value.toString() ); + System.out.println( "current value : " + value.toString() ); + fail( "getPropertyValues failed for property '" + name + "' failed" ); } break; } } if ( !m_set.getPropertyValue( name ).equals( value ) ) - failed( "XPropertyAccess::getPropertyValues() and XPropertyset::getPropertyValue results are inconsistent" ); + { + fail("XPropertyAccess::getPropertyValues() and XPropertyset::getPropertyValue results are inconsistent"); + } } } - public void checkDynamicSet() throws com.sun.star.uno.Exception + @Test public void checkDynamicSet() throws com.sun.star.uno.Exception { - log.println( "checking proper dynamic of the set" ); + System.out.println( "checking proper dynamic of the set" ); createStandardBag( false ); final PropertyValue props[] = @@ -215,7 +239,9 @@ public class PropertyBag extends ComplexTestCase catch( com.sun.star.beans.UnknownPropertyException e ) { caughtExpected = true; } catch( com.sun.star.uno.Exception e ) { } if ( !caughtExpected ) - failed( "the set shouldn't accept unknown property values, if not explicitly told to do so" ); + { + fail("the set shouldn't accept unknown property values, if not explicitly told to do so"); + } // re-create the bag, this time allow it to implicitly add properties createStandardBag( true ); @@ -223,14 +249,18 @@ public class PropertyBag extends ComplexTestCase try { m_access.setPropertyValues( props ); success = true; } catch( com.sun.star.uno.Exception e ) { } if ( !success ) - failed( "property bag failed to implicitly add unknown properties" ); + { + fail("property bag failed to implicitly add unknown properties"); + } // see whether this property was really added, and not just ignored final PropertyValue newlyAdded = props[ props.length - 1 ]; try { if ( !m_set.getPropertyValue( newlyAdded.Name ).equals( newlyAdded.Value ) ) - failed( "the new property was not really added, or not added with the proper value" ); + { + fail("the new property was not really added, or not added with the proper value"); + } } catch( com.sun.star.uno.Exception e ) { } } @@ -241,13 +271,13 @@ public class PropertyBag extends ComplexTestCase { m_bag = null; final String serviceName = "com.sun.star.beans.PropertyBag"; - m_bag = (XPropertyContainer)UnoRuntime.queryInterface( XPropertyContainer.class, - m_orb.createInstance( serviceName ) - ); + m_bag = UnoRuntime.queryInterface(XPropertyContainer.class, m_orb.createInstance(serviceName)); if ( m_bag == null ) - failed( "could not create a " + serviceName + " instance" ); - m_set = (XPropertySet)UnoRuntime.queryInterface( XPropertySet.class, m_bag ); - m_access = (XPropertyAccess)UnoRuntime.queryInterface( XPropertyAccess.class, m_bag ); + { + fail("could not create a " + serviceName + " instance"); + } + m_set = UnoRuntime.queryInterface(XPropertySet.class, m_bag); + m_access = UnoRuntime.queryInterface(XPropertyAccess.class, m_bag); } catch( com.sun.star.uno.Exception e ) { @@ -263,13 +293,13 @@ public class PropertyBag extends ComplexTestCase final Object initArgs[] = { new NamedValue( "AutomaticAddition", Boolean.valueOf( allowLazyAdding ) ) }; final String serviceName = "com.sun.star.beans.PropertyBag"; - m_bag = (XPropertyContainer)UnoRuntime.queryInterface( XPropertyContainer.class, - m_orb.createInstanceWithArguments( serviceName, initArgs ) - ); + m_bag = UnoRuntime.queryInterface(XPropertyContainer.class, m_orb.createInstanceWithArguments(serviceName, initArgs)); if ( m_bag == null ) - failed( "could not create a " + serviceName + " instance" ); - m_set = (XPropertySet)UnoRuntime.queryInterface( XPropertySet.class, m_bag ); - m_access = (XPropertyAccess)UnoRuntime.queryInterface( XPropertyAccess.class, m_bag ); + { + fail("could not create a " + serviceName + " instance"); + } + m_set = UnoRuntime.queryInterface(XPropertySet.class, m_bag); + m_access = UnoRuntime.queryInterface(XPropertyAccess.class, m_bag); final Object properties[][] = { diff --git a/dbaccess/qa/complex/dbaccess/Query.java b/dbaccess/qa/complex/dbaccess/Query.java index d93d5c337..1ae4a8cc9 100644 --- a/dbaccess/qa/complex/dbaccess/Query.java +++ b/dbaccess/qa/complex/dbaccess/Query.java @@ -36,22 +36,32 @@ import com.sun.star.sdbcx.XColumnsSupplier; import com.sun.star.uno.UnoRuntime; import connectivity.tools.CRMDatabase; -public class Query extends complexlib.ComplexTestCase { +// ---------- junit imports ----------------- +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; +import org.openoffice.test.OfficeConnection; +import static org.junit.Assert.*; +// ------------------------------------------ + +public class Query extends TestCase { connectivity.tools.HsqlDatabase m_database; // -------------------------------------------------------------------------------------------------------- - public String[] getTestMethodNames() { - return new String[] - { - "testQueryColumns" - }; - } +// public String[] getTestMethodNames() { +// return new String[] +// { +// "testQueryColumns" +// }; +// } // -------------------------------------------------------------------------------------------------------- - public String getTestObjectName() { - return "Query"; - } +// public String getTestObjectName() { +// return "Query"; +// } // -------------------------------------------------------------------------------------------------------- private void createTestCase() @@ -60,26 +70,26 @@ public class Query extends complexlib.ComplexTestCase { { if ( m_database == null ) { - final CRMDatabase database = new CRMDatabase( getFactory(), false ); + final CRMDatabase database = new CRMDatabase( getMSF(), false ); m_database = database.getDatabase(); } } catch( Exception e ) { - log.println( "could not create the test case, error message:\n" + e.getMessage() ); + System.out.println( "could not create the test case, error message:\n" + e.getMessage() ); e.printStackTrace( System.err ); - assure( "failed to created the test case", false ); + fail( "failed to created the test case"); } } // -------------------------------------------------------------------------------------------------------- - private XMultiServiceFactory getFactory() - { - return (XMultiServiceFactory)param.getMSF(); - } +// private XMultiServiceFactory getFactory() +// { +// return (XMultiServiceFactory)param.getMSF(); +// } // -------------------------------------------------------------------------------------------------------- - public void testQueryColumns() + @Test public void testQueryColumns() { createTestCase(); @@ -107,20 +117,20 @@ public class Query extends complexlib.ComplexTestCase { XIndexAccess.class, suppCols.getColumns()); // check whether the columns supplied by the query match what we expected - assure( "invalid column count (found " + columns.getCount() + ", expected: " + expectedColumnNames[i].length + ") for query \"" + queryNames[i] + "\"", + assertTrue( "invalid column count (found " + columns.getCount() + ", expected: " + expectedColumnNames[i].length + ") for query \"" + queryNames[i] + "\"", columns.getCount() == expectedColumnNames[i].length ); for ( int col = 0; col < columns.getCount(); ++col ) { final XNamed columnName = UnoRuntime.queryInterface( XNamed.class, columns.getByIndex(col) ); - assure( "column no. " + col + " of query \"" + queryNames[i] + "\" not matching", + assertTrue( "column no. " + col + " of query \"" + queryNames[i] + "\" not matching", columnName.getName().equals( expectedColumnNames[i][col] ) ); } } } catch ( Exception e ) { - assure( "caught an unexpected exception: " + e.getMessage(), false ); + fail( "caught an unexpected exception: " + e.getMessage() ); } } } diff --git a/dbaccess/qa/complex/dbaccess/QueryInQuery.java b/dbaccess/qa/complex/dbaccess/QueryInQuery.java index cd2520934..95ff9a9fd 100644 --- a/dbaccess/qa/complex/dbaccess/QueryInQuery.java +++ b/dbaccess/qa/complex/dbaccess/QueryInQuery.java @@ -37,26 +37,36 @@ import connectivity.tools.RowSet; import com.sun.star.sdbc.XStatement; import com.sun.star.sdbc.XResultSet; +// ---------- junit imports ----------------- +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; +import org.openoffice.test.OfficeConnection; +import static org.junit.Assert.*; +// ------------------------------------------ + public class QueryInQuery extends CRMBasedTestCase { private static final String QUERY_PRODUCTS = "query products"; - // -------------------------------------------------------------------------------------------------------- - public String[] getTestMethodNames() - { - return new String[] { - "executeSimpleSelect", - "executeAliasedSelect", - "checkNameCollisions", - "checkCyclicReferences", - "checkStatementQiQSupport" - }; - } - - // -------------------------------------------------------------------------------------------------------- - public String getTestObjectName() - { - return "QueryInQuery"; - } +// // -------------------------------------------------------------------------------------------------------- +// public String[] getTestMethodNames() +// { +// return new String[] { +// "executeSimpleSelect", +// "executeAliasedSelect", +// "checkNameCollisions", +// "checkCyclicReferences", +// "checkStatementQiQSupport" +// }; +// } +// +// // -------------------------------------------------------------------------------------------------------- +// public String getTestObjectName() +// { +// return "QueryInQuery"; +// } // -------------------------------------------------------------------------------------------------------- protected void createTestCase() @@ -69,7 +79,7 @@ public class QueryInQuery extends CRMBasedTestCase catch ( Exception e ) { e.printStackTrace( System.err ); - assure( "caught an exception (" + e.getMessage() + ") while creating the test case", false ); + fail( "caught an exception (" + e.getMessage() + ") while creating the test case" ); } } @@ -84,17 +94,17 @@ public class QueryInQuery extends CRMBasedTestCase outerRowSet.last(); innerRowSet.last(); - assure( "wrong record counts", outerRowSet.getRow() == innerRowSet.getRow() ); + assertTrue( "wrong record counts", outerRowSet.getRow() == innerRowSet.getRow() ); outerRowSet.beforeFirst(); innerRowSet.beforeFirst(); - assure( "wrong column counts", outerRowSet.getColumnCount() == innerRowSet.getColumnCount() ); + assertTrue( "wrong column counts", outerRowSet.getColumnCount() == innerRowSet.getColumnCount() ); while ( outerRowSet.next() && innerRowSet.next() ) { for ( int i=1; i <= outerRowSet.getColumnCount(); ++i ) { - assure( "content of column " + i + " of row " + outerRowSet.getRow() + " not identical", + assertTrue( "content of column " + i + " of row " + outerRowSet.getRow() + " not identical", innerRowSet.getString(i).equals( outerRowSet.getString(i) ) ); } } @@ -103,7 +113,7 @@ public class QueryInQuery extends CRMBasedTestCase // -------------------------------------------------------------------------------------------------------- /** executes a SQL statement simply selecting all columns from a query */ - public void executeSimpleSelect() throws SQLException + @Test public void executeSimpleSelect() throws SQLException { verifyEqualRowSetContent( CommandType.COMMAND, "SELECT * FROM \"query products\"", @@ -113,7 +123,7 @@ public class QueryInQuery extends CRMBasedTestCase // -------------------------------------------------------------------------------------------------------- /** verifies that aliases for inner queries work as expected */ - public void executeAliasedSelect() throws SQLException + @Test public void executeAliasedSelect() throws SQLException { verifyEqualRowSetContent( CommandType.COMMAND, "SELECT \"PROD\".\"ID\" FROM \"query products\" AS \"PROD\"", @@ -126,7 +136,7 @@ public class QueryInQuery extends CRMBasedTestCase // -------------------------------------------------------------------------------------------------------- /** verifies that aliases for inner queries work as expected */ - public void checkNameCollisions() + @Test public void checkNameCollisions() { // create a query with a name which is used by a table boolean caughtExpected = false; @@ -137,7 +147,7 @@ public class QueryInQuery extends CRMBasedTestCase catch ( WrappedTargetException e ) { caughtExpected = true; } catch ( IllegalArgumentException e ) {} catch ( ElementExistException e ) { caughtExpected = true; } - assure( "creating queries with the name of an existing table should not be possible", + assertTrue( "creating queries with the name of an existing table should not be possible", caughtExpected ); // create a table with a name which is used by a query @@ -153,12 +163,12 @@ public class QueryInQuery extends CRMBasedTestCase } catch ( SQLException e ) { caughtExpected = true; } catch ( ElementExistException ex ) { } - assure( "creating tables with the name of an existing query should not be possible", + assertTrue( "creating tables with the name of an existing query should not be possible", caughtExpected ); } // -------------------------------------------------------------------------------------------------------- - public void checkCyclicReferences() throws ElementExistException, WrappedTargetException, IllegalArgumentException + @Test public void checkCyclicReferences() throws ElementExistException, WrappedTargetException, IllegalArgumentException { // some queries which create a cycle in the sub query tree m_database.getDatabase().getDataSource().createQuery( "orders level 1", "SELECT * FROM \"orders level 0\"" ); @@ -172,21 +182,21 @@ public class QueryInQuery extends CRMBasedTestCase try { rowSet.execute(); } catch ( SQLException e ) { caughtExpected = ( e.ErrorCode == -com.sun.star.sdb.ErrorCondition.PARSER_CYCLIC_SUB_QUERIES ); } - assure( "executing a query with cyclic nested sub queries should fail!", caughtExpected ); + assertTrue( "executing a query with cyclic nested sub queries should fail!", caughtExpected ); } // -------------------------------------------------------------------------------------------------------- - public void checkStatementQiQSupport() + @Test public void checkStatementQiQSupport() { try { final XStatement statement = m_database.getConnection().createStatement(); final XResultSet resultSet = statement.executeQuery( "SELECT * FROM \"query products\"" ); - assure( "Result Set is null", resultSet != null ); + assertTrue( "Result Set is null", resultSet != null ); } catch( SQLException e ) { - assure( "SDB level statements do not allow for queries in queries", false ); + fail( "SDB level statements do not allow for queries in queries" ); } } } diff --git a/dbaccess/qa/complex/dbaccess/RowSet.java b/dbaccess/qa/complex/dbaccess/RowSet.java index c3e83c9c5..acfeb5b48 100644 --- a/dbaccess/qa/complex/dbaccess/RowSet.java +++ b/dbaccess/qa/complex/dbaccess/RowSet.java @@ -49,7 +49,7 @@ import com.sun.star.sdbcx.XColumnsSupplier; import com.sun.star.sdbcx.XDeleteRows; import com.sun.star.sdbcx.XRowLocate; import com.sun.star.uno.UnoRuntime; -import complexlib.ComplexTestCase; + import connectivity.tools.CRMDatabase; import connectivity.tools.DataSource; import connectivity.tools.HsqlDatabase; @@ -57,7 +57,17 @@ import connectivity.tools.sdb.Connection; import java.lang.reflect.Method; import java.util.Random; -public class RowSet extends ComplexTestCase +// ---------- junit imports ----------------- +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; +import org.openoffice.test.OfficeConnection; +import static org.junit.Assert.*; +// ------------------------------------------ + +public class RowSet extends TestCase { static final int MAX_TABLE_ROWS = 100; @@ -99,36 +109,36 @@ public class RowSet extends ComplexTestCase int pos = m_resultSet.getRow(); testPosition(m_resultSet, m_row, i + 1, "clone move(" + m_id + ")"); int pos2 = m_resultSet.getRow(); - assure("ResultSetMovementStress wrong position: " + i + " Pos1: " + pos + " Pos2: " + pos2, pos == pos2); + assertTrue("ResultSetMovementStress wrong position: " + i + " Pos1: " + pos + " Pos2: " + pos2, pos == pos2); } } catch (Exception e) { - assure("ResultSetMovementStress(" + m_id + ") failed: " + e, false); + fail("ResultSetMovementStress(" + m_id + ") failed: " + e); } } } // -------------------------------------------------------------------------------------------------------- - public String[] getTestMethodNames() - { - return new String[] - { - "testRowSet", - "testRowSetEvents", - "testDeleteBehavior", - "testCloneMovesPlusDeletions", - "testCloneMovesPlusInsertions", - "testParameters" - }; - } - - // -------------------------------------------------------------------------------------------------------- - public String getTestObjectName() - { - return "RowSet"; - } - +// public String[] getTestMethodNames() +// { +// return new String[] +// { +// "testRowSet", +// "testRowSetEvents", +// "testDeleteBehavior", +// "testCloneMovesPlusDeletions", +// "testCloneMovesPlusInsertions", +// "testParameters" +// }; +// } +// +// // -------------------------------------------------------------------------------------------------------- +// public String getTestObjectName() +// { +// return "RowSet"; +// } +// // -------------------------------------------------------------------------------------------------------- private void createTestCase(boolean _defaultRowSet) { @@ -136,13 +146,13 @@ public class RowSet extends ComplexTestCase { try { - final CRMDatabase database = new CRMDatabase( getFactory(), false ); + final CRMDatabase database = new CRMDatabase( getMSF(), false ); m_database = database.getDatabase(); m_dataSource = m_database.getDataSource(); } catch (Exception e) { - assure("could not create the embedded HSQL database: " + e.getMessage(), false); + fail("could not create the embedded HSQL database: " + e.getMessage()); } } @@ -152,7 +162,7 @@ public class RowSet extends ComplexTestCase } catch (SQLException e) { - assure("could not connect to the database/table structure, error message:\n" + e.getMessage(), false); + fail("could not connect to the database/table structure, error message:\n" + e.getMessage()); } if (_defaultRowSet) @@ -162,10 +172,10 @@ public class RowSet extends ComplexTestCase } // -------------------------------------------------------------------------------------------------------- - private XMultiServiceFactory getFactory() - { - return (XMultiServiceFactory) param.getMSF(); - } +// private XMultiServiceFactory getFactory() +// { +// return (XMultiServiceFactory) param.getMSF(); +// } // -------------------------------------------------------------------------------------------------------- /** creates a com.sun.star.sdb.RowSet to use during the test @@ -196,7 +206,7 @@ public class RowSet extends ComplexTestCase { try { - m_rowSet = UnoRuntime.queryInterface( XRowSet.class, getFactory().createInstance( "com.sun.star.sdb.RowSet" ) ); + m_rowSet = UnoRuntime.queryInterface( XRowSet.class, getMSF().createInstance( "com.sun.star.sdb.RowSet" ) ); final XPropertySet rowSetProperties = UnoRuntime.queryInterface( XPropertySet.class, m_rowSet ); rowSetProperties.setPropertyValue("Command", command); rowSetProperties.setPropertyValue("CommandType", Integer.valueOf(commandType)); @@ -220,15 +230,15 @@ public class RowSet extends ComplexTestCase } catch (Exception e) { - assure("caught an exception while creating the RowSet. Type:\n" + e.getClass().toString() + "\nMessage:\n" + e.getMessage(), false); + fail("caught an exception while creating the RowSet. Type:\n" + e.getClass().toString() + "\nMessage:\n" + e.getMessage()); } } // -------------------------------------------------------------------------------------------------------- - public void testRowSet() throws java.lang.Exception + @Test public void testRowSet() throws java.lang.Exception { - log.println("testing testRowSet"); + System.out.println("testing testRowSet"); createTestCase(true); // sequential postioning @@ -278,8 +288,8 @@ public class RowSet extends ComplexTestCase { final int val = m_row.getInt(1); final int pos = m_resultSet.getRow(); - assure(location + ": value/position do not match: " + pos + " (pos) != " + val + " (val)", val == pos); - assure(location + ": value/position are not as expected: " + val + " (val) != " + expectedValue + " (expected)", val == expectedValue); + assertTrue(location + ": value/position do not match: " + pos + " (pos) != " + val + " (val)", val == pos); + assertTrue(location + ": value/position are not as expected: " + val + " (val) != " + expectedValue + " (expected)", val == expectedValue); } // -------------------------------------------------------------------------------------------------------- @@ -297,7 +307,7 @@ public class RowSet extends ComplexTestCase } catch (Exception e) { - assure("testSequentialPositining failed: " + e, false); + fail("testSequentialPositining failed: " + e); } } @@ -309,13 +319,13 @@ public class RowSet extends ComplexTestCase for (int i = 1; i <= MAX_FETCH_ROWS; ++i) { final int calcPos = (MAX_TABLE_ROWS % i) + 1; - assure("testAbsolutePositioning failed", _resultSet.absolute(calcPos)); + assertTrue("testAbsolutePositioning failed", _resultSet.absolute(calcPos)); testPosition(_resultSet, _row, calcPos, "testAbsolutePositioning"); } } catch (Exception e) { - assure("testAbsolutePositioning failed: " + e, false); + fail("testAbsolutePositioning failed: " + e); } } @@ -339,7 +349,7 @@ public class RowSet extends ComplexTestCase } catch (Exception e) { - assure("test3 failed: " + e, false); + fail("test3 failed: " + e); } } @@ -366,14 +376,14 @@ public class RowSet extends ComplexTestCase } catch (Exception e) { - assure("test4 failed: " + e, false); + fail("test4 failed: " + e); } } // -------------------------------------------------------------------------------------------------------- void testConcurrentAccess(XResultSet _resultSet) { - log.println("testing Thread"); + System.out.println("testing Thread"); try { _resultSet.beforeFirst(); @@ -384,7 +394,7 @@ public class RowSet extends ComplexTestCase for (int i = 0; i < numberOfThreads; ++i) { threads[i] = new Thread(new ResultSetMovementStress(createClone(), i)); - log.println("starting thread " + (i + 1) + " of " + (numberOfThreads)); + System.out.println("starting thread " + (i + 1) + " of " + (numberOfThreads)); threads[i].start(); } @@ -395,14 +405,14 @@ public class RowSet extends ComplexTestCase } catch (Exception e) { - assure("testConcurrentAccess failed: " + e, false); + fail("testConcurrentAccess failed: " + e); } } // -------------------------------------------------------------------------------------------------------- - public void testRowSetEvents() throws java.lang.Exception + @Test public void testRowSetEvents() throws java.lang.Exception { - log.println("testing RowSet Events"); + System.out.println("testing RowSet Events"); createTestCase(true); // first we create our RowSet object @@ -547,26 +557,26 @@ public class RowSet extends ComplexTestCase _evt.clearCalling(); _method.invoke(res, args); - log.println("testing events for " + _method.getName()); + System.out.println("testing events for " + _method.getName()); final int calling[] = _evt.getCalling(); int pos = 1; - assure("Callings are not in the correct order for APPROVE_CURSOR_MOVE ", + assertTrue("Callings are not in the correct order for APPROVE_CURSOR_MOVE ", (!_must[RowSetEventListener.APPROVE_CURSOR_MOVE] || calling[RowSetEventListener.APPROVE_CURSOR_MOVE] == -1) || calling[RowSetEventListener.APPROVE_CURSOR_MOVE] == pos++); - assure("Callings are not in the correct order for APPROVE_ROW_CHANGE", + assertTrue("Callings are not in the correct order for APPROVE_ROW_CHANGE", (!_must[RowSetEventListener.APPROVE_ROW_CHANGE] || calling[RowSetEventListener.APPROVE_ROW_CHANGE] == -1) || calling[RowSetEventListener.APPROVE_ROW_CHANGE] == pos++); - assure("Callings are not in the correct order for COLUMN_VALUE", + assertTrue("Callings are not in the correct order for COLUMN_VALUE", (!_must[RowSetEventListener.COLUMN_VALUE] || calling[RowSetEventListener.COLUMN_VALUE] == -1) || calling[RowSetEventListener.COLUMN_VALUE] == pos++); - assure("Callings are not in the correct order for CURSOR_MOVED", + assertTrue("Callings are not in the correct order for CURSOR_MOVED", (!_must[RowSetEventListener.CURSOR_MOVED] || calling[RowSetEventListener.CURSOR_MOVED] == -1) || calling[RowSetEventListener.CURSOR_MOVED] == pos++); - assure("Callings are not in the correct order for ROW_CHANGED", + assertTrue("Callings are not in the correct order for ROW_CHANGED", (!_must[RowSetEventListener.ROW_CHANGED] || calling[RowSetEventListener.ROW_CHANGED] == -1) || calling[RowSetEventListener.ROW_CHANGED] == pos++); - assure("Callings are not in the correct order for IS_MODIFIED", + assertTrue("Callings are not in the correct order for IS_MODIFIED", (!_must[RowSetEventListener.IS_MODIFIED] || calling[RowSetEventListener.IS_MODIFIED] == -1) || calling[RowSetEventListener.IS_MODIFIED] == pos++); - assure("Callings are not in the correct order for IS_NEW", + assertTrue("Callings are not in the correct order for IS_NEW", (!_must[RowSetEventListener.IS_NEW] || calling[RowSetEventListener.IS_NEW] == -1) || calling[RowSetEventListener.IS_NEW] == pos++); - assure("Callings are not in the correct order for ROW_COUNT", + assertTrue("Callings are not in the correct order for ROW_COUNT", (!_must[RowSetEventListener.ROW_COUNT] || calling[RowSetEventListener.ROW_COUNT] == -1) || calling[RowSetEventListener.ROW_COUNT] == pos++); - assure("Callings are not in the correct order for IS_ROW_COUNT_FINAL", + assertTrue("Callings are not in the correct order for IS_ROW_COUNT_FINAL", (!_must[RowSetEventListener.IS_ROW_COUNT_FINAL] || calling[RowSetEventListener.IS_ROW_COUNT_FINAL] == -1) || calling[RowSetEventListener.IS_ROW_COUNT_FINAL] == pos); _evt.clearCalling(); @@ -587,7 +597,7 @@ public class RowSet extends ComplexTestCase private int positionRandom() throws SQLException, UnknownPropertyException, WrappedTargetException { final int position = (new Random()).nextInt(currentRowCount() - 2) + 2; - assure("sub task failed: could not position to row no. " + (Integer.valueOf(position)).toString(), + assertTrue("sub task failed: could not position to row no. " + (Integer.valueOf(position)).toString(), m_resultSet.absolute(position)); return m_resultSet.getRow(); } @@ -609,15 +619,15 @@ public class RowSet extends ComplexTestCase final int positionAfter = m_resultSet.getRow(); final int rowCountAfter = currentRowCount(); - assure("position changed during |deleteRow| (it should not)", positionAfter == positionBefore); - assure("row count changed with a |deleteRow| (it should not)", rowCountBefore == rowCountAfter); - assure("RowSet does not report the current row as deleted after |deleteRow|", m_resultSet.rowDeleted()); + assertTrue("position changed during |deleteRow| (it should not)", positionAfter == positionBefore); + assertTrue("row count changed with a |deleteRow| (it should not)", rowCountBefore == rowCountAfter); + assertTrue("RowSet does not report the current row as deleted after |deleteRow|", m_resultSet.rowDeleted()); return positionBefore; } // -------------------------------------------------------------------------------------------------------- - public void testDeleteBehavior() throws Exception + @Test public void testDeleteBehavior() throws Exception { createTestCase(true); @@ -639,40 +649,40 @@ public class RowSet extends ComplexTestCase { caughtException = true; } - assure("asking for the bookmark of a deleted row should throw an exception", caughtException); + assertTrue("asking for the bookmark of a deleted row should throw an exception", caughtException); // ..................................................................................................... // isXXX methods should return |false| on a deleted row - assure("one of the isFoo failed after |deleteRow|", !m_resultSet.isBeforeFirst() && !m_resultSet.isAfterLast() && !m_resultSet.isFirst() && !m_resultSet.isLast()); + assertTrue("one of the isFoo failed after |deleteRow|", !m_resultSet.isBeforeFirst() && !m_resultSet.isAfterLast() && !m_resultSet.isFirst() && !m_resultSet.isLast()); // note that we can assume that isFirst / isLast also return |false|, since deleteRandom did // not position on the first or last record, but inbetween // ..................................................................................................... // check if moving away from this row in either direction yields the expected results - assure("|previous| after |deleteRow| failed", m_resultSet.previous()); + assertTrue("|previous| after |deleteRow| failed", m_resultSet.previous()); final int positionPrevious = m_resultSet.getRow(); - assure("position after |previous| after |deleteRow| is not as expected", positionPrevious == deletedRow - 1); + assertTrue("position after |previous| after |deleteRow| is not as expected", positionPrevious == deletedRow - 1); deletedRow = deleteRandom(); - assure("|next| after |deleteRow| failed", m_resultSet.next()); + assertTrue("|next| after |deleteRow| failed", m_resultSet.next()); final int positionAfter = m_resultSet.getRow(); - assure("position after |next| after |deleteRow| is not as expected", positionAfter == deletedRow); + assertTrue("position after |next| after |deleteRow| is not as expected", positionAfter == deletedRow); // since the deleted record "vanishs" as soon as the cursor is moved away from it, the absolute position does // not change with a |next| call here // ..................................................................................................... // check if the deleted rows really vanished after moving away from them - assure("row count did not change as expected after two deletions", initialRowCount - 2 == currentRowCount()); + assertTrue("row count did not change as expected after two deletions", initialRowCount - 2 == currentRowCount()); // ..................................................................................................... // check if the deleted row vanishes after moving to the insertion row final int rowCountBefore = currentRowCount(); final int deletedPos = deleteRandom(); m_resultSetUpdate.moveToInsertRow(); - assure("moving to the insertion row immediately after |deleteRow| does not adjust the row count", rowCountBefore == currentRowCount() + 1); + assertTrue("moving to the insertion row immediately after |deleteRow| does not adjust the row count", rowCountBefore == currentRowCount() + 1); m_resultSetUpdate.moveToCurrentRow(); - assure("|moveToCurrentRow| after |deleteRow| + |moveToInsertRow| results in unexpected position", + assertTrue("|moveToCurrentRow| after |deleteRow| + |moveToInsertRow| results in unexpected position", (m_resultSet.getRow() == deletedPos) && !m_resultSet.rowDeleted()); // the same, but this time with deleting the first row (which is not covered by deleteRandom) @@ -680,7 +690,7 @@ public class RowSet extends ComplexTestCase m_resultSetUpdate.deleteRow(); m_resultSetUpdate.moveToInsertRow(); m_resultSetUpdate.moveToCurrentRow(); - assure("|last| + |deleteRow| + |moveToInsertRow| + |moveToCurrentRow| results in wrong state", m_resultSet.isAfterLast()); + assertTrue("|last| + |deleteRow| + |moveToInsertRow| + |moveToCurrentRow| results in wrong state", m_resultSet.isAfterLast()); // ..................................................................................................... // check if deleting a deleted row fails as expected @@ -694,7 +704,7 @@ public class RowSet extends ComplexTestCase { caughtException = true; } - assure("deleting a deleted row succeeded - it shouldn't", caughtException); + assertTrue("deleting a deleted row succeeded - it shouldn't", caughtException); // ..................................................................................................... // check if deleteRows fails if it contains the bookmark of a previously-deleted row @@ -708,7 +718,7 @@ public class RowSet extends ComplexTestCase { firstBookmark, deleteBookmark }); - assure("XDeleteRows::deleteRows with the bookmark of an already-deleted row failed", + assertTrue("XDeleteRows::deleteRows with the bookmark of an already-deleted row failed", (deleteSuccess.length == 2) && (deleteSuccess[0] != 0) && (deleteSuccess[1] == 0)); // ..................................................................................................... @@ -723,12 +733,12 @@ public class RowSet extends ComplexTestCase { caughtException = true; } - assure("refreshing a deleted row succeeded - it shouldn't", caughtException); + assertTrue("refreshing a deleted row succeeded - it shouldn't", caughtException); // ..................................................................................................... // rowUpdated/rowDeleted deleteRandom(); - assure("rowDeleted and/or rowUpdated are wrong on a deleted row", !m_resultSet.rowUpdated() && !m_resultSet.rowInserted()); + assertTrue("rowDeleted and/or rowUpdated are wrong on a deleted row", !m_resultSet.rowUpdated() && !m_resultSet.rowInserted()); // ..................................................................................................... // updating values in a deleted row should fail @@ -743,7 +753,7 @@ public class RowSet extends ComplexTestCase { caughtException = true; } - assure("updating values in a deleted row should not succeed", caughtException); + assertTrue("updating values in a deleted row should not succeed", caughtException); } // -------------------------------------------------------------------------------------------------------- @@ -751,7 +761,7 @@ public class RowSet extends ComplexTestCase * on a clone of the RowSet */ @SuppressWarnings("empty-statement") - public void testCloneMovesPlusDeletions() throws SQLException, UnknownPropertyException, WrappedTargetException + @Test public void testCloneMovesPlusDeletions() throws SQLException, UnknownPropertyException, WrappedTargetException { createTestCase(true); // ensure that all records are known @@ -768,20 +778,20 @@ public class RowSet extends ComplexTestCase final int clonePosition = clone.getRow(); m_resultSetUpdate.deleteRow(); - assure("clone doesn't know that its current row has been deleted via the RowSet", clone.rowDeleted()); - assure("clone's position changed somehow during deletion", clonePosition == clone.getRow()); + assertTrue("clone doesn't know that its current row has been deleted via the RowSet", clone.rowDeleted()); + assertTrue("clone's position changed somehow during deletion", clonePosition == clone.getRow()); // ..................................................................................................... // move the row set away from the deleted record. This should still not touch the state of the clone m_resultSet.previous(); - assure("clone doesn't know (anymore) that its current row has been deleted via the RowSet", clone.rowDeleted()); - assure("clone's position changed somehow during deletion and RowSet-movement", clonePosition == clone.getRow()); + assertTrue("clone doesn't know (anymore) that its current row has been deleted via the RowSet", clone.rowDeleted()); + assertTrue("clone's position changed somehow during deletion and RowSet-movement", clonePosition == clone.getRow()); // ..................................................................................................... // move the clone away from the deleted record clone.next(); - assure("clone still assumes that its row is deleted - but we already moved it", !clone.rowDeleted()); + assertTrue("clone still assumes that its row is deleted - but we already moved it", !clone.rowDeleted()); // ..................................................................................................... // check whether deleting the extremes (first / last) work @@ -789,37 +799,37 @@ public class RowSet extends ComplexTestCase cloneRowLocate.moveToBookmark(m_rowLocate.getBookmark()); m_resultSetUpdate.deleteRow(); clone.previous(); - assure("deleting the first record left the clone in a strange state (after |previous|)", clone.isBeforeFirst()); + assertTrue("deleting the first record left the clone in a strange state (after |previous|)", clone.isBeforeFirst()); clone.next(); - assure("deleting the first record left the clone in a strange state (after |previous| + |next|)", clone.isFirst()); + assertTrue("deleting the first record left the clone in a strange state (after |previous| + |next|)", clone.isFirst()); m_resultSet.last(); cloneRowLocate.moveToBookmark(m_rowLocate.getBookmark()); m_resultSetUpdate.deleteRow(); clone.next(); - assure("deleting the last record left the clone in a strange state (after |next|)", clone.isAfterLast()); + assertTrue("deleting the last record left the clone in a strange state (after |next|)", clone.isAfterLast()); clone.previous(); - assure("deleting the first record left the clone in a strange state (after |next| + |previous|)", clone.isLast()); + assertTrue("deleting the first record left the clone in a strange state (after |next| + |previous|)", clone.isLast()); // ..................................................................................................... // check whether movements of the clone interfere with movements of the RowSet, if the latter is on a deleted row final int positionBefore = positionRandom(); m_resultSetUpdate.deleteRow(); - assure("|deleteRow|, but no |rowDeleted| (this should have been found much earlier!)", m_resultSet.rowDeleted()); + assertTrue("|deleteRow|, but no |rowDeleted| (this should have been found much earlier!)", m_resultSet.rowDeleted()); clone.beforeFirst(); while (clone.next()); - assure("row set forgot that the current row is deleted", m_resultSet.rowDeleted()); + assertTrue("row set forgot that the current row is deleted", m_resultSet.rowDeleted()); - assure("moving to the next record after |deleteRow| and clone moves failed", m_resultSet.next()); - assure("wrong position after |deleteRow| and clone movement", !m_resultSet.isAfterLast() && !m_resultSet.isBeforeFirst()); - assure("wrong absolute position after |deleteRow| and clone movement", m_resultSet.getRow() == positionBefore); + assertTrue("moving to the next record after |deleteRow| and clone moves failed", m_resultSet.next()); + assertTrue("wrong position after |deleteRow| and clone movement", !m_resultSet.isAfterLast() && !m_resultSet.isBeforeFirst()); + assertTrue("wrong absolute position after |deleteRow| and clone movement", m_resultSet.getRow() == positionBefore); } // -------------------------------------------------------------------------------------------------------- /** checks whether insertions on the main RowSet properly interfere (or don't interfere) with the movement * on a clone of the RowSet */ - public void testCloneMovesPlusInsertions() throws SQLException, UnknownPropertyException, WrappedTargetException, PropertyVetoException, com.sun.star.lang.IllegalArgumentException + @Test public void testCloneMovesPlusInsertions() throws SQLException, UnknownPropertyException, WrappedTargetException, PropertyVetoException, com.sun.star.lang.IllegalArgumentException { createTestCase(true); // ensure that all records are known @@ -839,7 +849,7 @@ public class RowSet extends ComplexTestCase final int rowValue1 = m_row.getInt(1); final int rowPos = m_resultSet.getRow(); final int rowValue2 = m_row.getInt(1); - assure("repeated query for the same column value delivers different values (" + rowValue1 + " and " + rowValue2 + ") on row: " + rowPos, + assertTrue("repeated query for the same column value delivers different values (" + rowValue1 + " and " + rowValue2 + ") on row: " + rowPos, rowValue1 == rowValue2); testPosition(clone, cloneRow, 1, "mixed clone/rowset move: clone check"); @@ -871,7 +881,7 @@ public class RowSet extends ComplexTestCase } catch (Exception e) { - assure("testing the parameters of a table failed" + e.getMessage(), false); + fail("testing the parameters of a table failed" + e.getMessage()); } } // -------------------------------------------------------------------------------------------------------- @@ -888,7 +898,7 @@ public class RowSet extends ComplexTestCase } catch (Exception e) { - assure("testing the parameters of a table failed" + e.getMessage(), false); + fail("testing the parameters of a table failed" + e.getMessage()); } } @@ -899,7 +909,7 @@ public class RowSet extends ComplexTestCase final int expected = _paramNames.length; final int found = params != null ? params.getCount() : 0; - assure("wrong number of parameters (expected: " + expected + ", found: " + found + ") in " + _context, + assertTrue("wrong number of parameters (expected: " + expected + ", found: " + found + ") in " + _context, found == expected); if (found == 0) @@ -913,7 +923,7 @@ public class RowSet extends ComplexTestCase final String expectedName = _paramNames[i]; final String foundName = (String) parameter.getPropertyValue("Name"); - assure("wrong parameter name (expected: " + expectedName + ", found: " + foundName + ") in" + _context, + assertTrue("wrong parameter name (expected: " + expectedName + ", found: " + foundName + ") in" + _context, expectedName.equals(foundName)); } } @@ -934,7 +944,7 @@ public class RowSet extends ComplexTestCase } catch (Exception e) { - assure("testing the parameters of a parametrized query failed" + e.getMessage(), false); + fail("testing the parameters of a parametrized query failed" + e.getMessage()); } } @@ -953,7 +963,7 @@ public class RowSet extends ComplexTestCase XPropertySet firstParam = UnoRuntime.queryInterface( XPropertySet.class, params.getByIndex( 0 ) ); Object firstParamValue = firstParam.getPropertyValue("Value"); - assure("XParameters and the parameters container do not properly interact", + assertTrue("XParameters and the parameters container do not properly interact", "Apples".equals(firstParamValue)); // let's see whether this also survices an execute of the row set @@ -967,12 +977,12 @@ public class RowSet extends ComplexTestCase firstParam = UnoRuntime.queryInterface( XPropertySet.class, params.getByIndex( 0 ) ); } firstParamValue = firstParam.getPropertyValue("Value"); - assure("XParameters and the parameters container do not properly interact, after the row set has been executed", + assertTrue("XParameters and the parameters container do not properly interact, after the row set has been executed", "Oranges".equals(firstParamValue)); } catch (Exception e) { - assure("could not test the relationship between XParameters and XParametersSupplier" + e.getMessage(), false); + fail("could not test the relationship between XParameters and XParametersSupplier" + e.getMessage()); } } @@ -997,14 +1007,14 @@ public class RowSet extends ComplexTestCase } catch (Exception e) { - assure("testing the parameters within a WHERE clause failed" + e.getMessage(), false); + fail("testing the parameters within a WHERE clause failed" + e.getMessage()); } } // -------------------------------------------------------------------------------------------------------- /** checks the XParametersSupplier functionality of a RowSet */ - public void testParameters() + @Test public void testParameters() { createTestCase(false); // use an own RowSet instance, not the one which is also used for the other cases diff --git a/dbaccess/qa/complex/dbaccess/SingleSelectQueryComposer.java b/dbaccess/qa/complex/dbaccess/SingleSelectQueryComposer.java index 6eb0525b9..86e92c791 100755 --- a/dbaccess/qa/complex/dbaccess/SingleSelectQueryComposer.java +++ b/dbaccess/qa/complex/dbaccess/SingleSelectQueryComposer.java @@ -36,6 +36,16 @@ import com.sun.star.sdbc.DataType; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; +// ---------- junit imports ----------------- +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; +import org.openoffice.test.OfficeConnection; +import static org.junit.Assert.*; +// ------------------------------------------ + public class SingleSelectQueryComposer extends CRMBasedTestCase { @@ -48,24 +58,24 @@ public class SingleSelectQueryComposer extends CRMBasedTestCase private final static String INNERPRODUCTSQUERY = "products (inner)"; // -------------------------------------------------------------------------------------------------------- - public String[] getTestMethodNames() - { - return new String[] - { - "testSetCommand", - "testAttributes", - "testSubQueries", - "testParameters", - "testDisjunctiveNormalForm", - "testConditionByColumn" - }; - } - - // -------------------------------------------------------------------------------------------------------- - public String getTestObjectName() - { - return "SingleSelectQueryComposer"; - } +// public String[] getTestMethodNames() +// { +// return new String[] +// { +// "testSetCommand", +// "testAttributes", +// "testSubQueries", +// "testParameters", +// "testDisjunctiveNormalForm", +// "testConditionByColumn" +// }; +// } + +// // -------------------------------------------------------------------------------------------------------- +// public String getTestObjectName() +// { +// return "SingleSelectQueryComposer"; +// } // -------------------------------------------------------------------------------------------------------- private void createQueries() throws Exception @@ -87,14 +97,14 @@ public class SingleSelectQueryComposer extends CRMBasedTestCase } catch (Exception e) { - assure("caught an exception (" + e.getMessage() + ") while creating the test case", false); + fail("caught an exception (" + e.getMessage() + ") while creating the test case"); } } // -------------------------------------------------------------------------------------------------------- private void checkAttributeAccess(String _attributeName, String _attributeValue) { - log.println("setting " + _attributeName + " to " + _attributeValue); + System.out.println("setting " + _attributeName + " to " + _attributeValue); String realValue = null; try { @@ -124,53 +134,53 @@ public class SingleSelectQueryComposer extends CRMBasedTestCase catch (InvocationTargetException e) { } - assure("set/get" + _attributeName + " not working as expected (set: " + _attributeValue + ", get: " + (realValue != null ? realValue : "null") + ")", + assertTrue("set/get" + _attributeName + " not working as expected (set: " + _attributeValue + ", get: " + (realValue != null ? realValue : "null") + ")", realValue.equals(_attributeValue)); - log.println(" (results in " + (String) m_composer.getQuery() + ")"); + System.out.println(" (results in " + m_composer.getQuery() + ")"); } /** tests setCommand of the composer */ - public void testSetCommand() + @Test public void testSetCommand() { - log.println("testing SingleSelectQueryComposer's setCommand"); + System.out.println("testing SingleSelectQueryComposer's setCommand"); try { final String table = "SELECT * FROM \"customers\""; m_composer.setCommand("customers",CommandType.TABLE); - assure("setCommand/getQuery TABLE inconsistent", m_composer.getQuery().equals(table)); + assertTrue("setCommand/getQuery TABLE inconsistent", m_composer.getQuery().equals(table)); m_database.getDatabase().getDataSource().createQuery("set command test", "SELECT * FROM \"orders for customer\" \"a\", \"customers\" \"b\" WHERE \"a\".\"Product Name\" = \"b\".\"Name\""); m_composer.setCommand("set command test",CommandType.QUERY); - assure("setCommand/getQuery QUERY inconsistent", m_composer.getQuery().equals(m_database.getDatabase().getDataSource().getQueryDefinition("set command test").getCommand())); + assertTrue("setCommand/getQuery QUERY inconsistent", m_composer.getQuery().equals(m_database.getDatabase().getDataSource().getQueryDefinition("set command test").getCommand())); final String sql = "SELECT * FROM \"orders for customer\" WHERE \"Product Name\" = 'test'"; m_composer.setCommand(sql,CommandType.COMMAND); - assure("setCommand/getQuery COMMAND inconsistent", m_composer.getQuery().equals(sql)); + assertTrue("setCommand/getQuery COMMAND inconsistent", m_composer.getQuery().equals(sql)); } catch (Exception e) { - assure("Exception caught: " + e, false); + fail("Exception caught: " + e); } } /** tests accessing attributes of the composer (order, filter, group by, having) */ - public void testAttributes() + @Test public void testAttributes() { - log.println("testing SingleSelectQueryComposer's attributes (order, filter, group by, having)"); + System.out.println("testing SingleSelectQueryComposer's attributes (order, filter, group by, having)"); try { - log.println("check setElementaryQuery"); + System.out.println("check setElementaryQuery"); final String simpleQuery2 = "SELECT * FROM \"customers\" WHERE \"Name\" = 'oranges'"; m_composer.setElementaryQuery(simpleQuery2); - assure("setElementaryQuery/getQuery inconsistent", m_composer.getQuery().equals(simpleQuery2)); + assertTrue("setElementaryQuery/getQuery inconsistent", m_composer.getQuery().equals(simpleQuery2)); - log.println("check setQuery"); + System.out.println("check setQuery"); final String simpleQuery = "SELECT * FROM \"customers\""; m_composer.setQuery(simpleQuery); - assure("set/getQuery inconsistent", m_composer.getQuery().equals(simpleQuery)); + assertTrue("set/getQuery inconsistent", m_composer.getQuery().equals(simpleQuery)); checkAttributeAccess("Filter", "\"Name\" = 'oranges'"); checkAttributeAccess("Group", "\"City\""); @@ -178,16 +188,16 @@ public class SingleSelectQueryComposer extends CRMBasedTestCase checkAttributeAccess("HavingClause", "\"ID\" <> 4"); final XIndexAccess orderColumns = m_composer.getOrderColumns(); - assure("Order columns doesn't exist: \"Address\"", + assertTrue("Order columns doesn't exist: \"Address\"", orderColumns != null && orderColumns.getCount() == 1 && orderColumns.getByIndex(0) != null); final XIndexAccess groupColumns = m_composer.getGroupColumns(); - assure("Group columns doesn't exist: \"City\"", + assertTrue("Group columns doesn't exist: \"City\"", groupColumns != null && groupColumns.getCount() == 1 && groupColumns.getByIndex(0) != null); // XColumnsSupplier - final XColumnsSupplier xSelectColumns = (XColumnsSupplier) UnoRuntime.queryInterface(XColumnsSupplier.class, m_composer); - assure("no select columns, or wrong number of select columns", + final XColumnsSupplier xSelectColumns = UnoRuntime.queryInterface(XColumnsSupplier.class, m_composer); + assertTrue("no select columns, or wrong number of select columns", xSelectColumns != null && xSelectColumns.getColumns() != null && xSelectColumns.getColumns().getElementNames().length == 6); // structured filter @@ -196,41 +206,40 @@ public class SingleSelectQueryComposer extends CRMBasedTestCase final PropertyValue[][] aStructuredFilter = m_composer.getStructuredFilter(); m_composer.setFilter(""); m_composer.setStructuredFilter(aStructuredFilter); - assure("Structured Filter not identical", m_composer.getFilter().equals(COMPLEXFILTER)); + assertTrue("Structured Filter not identical", m_composer.getFilter().equals(COMPLEXFILTER)); // structured having clause m_composer.setHavingClause(COMPLEXFILTER); final PropertyValue[][] aStructuredHaving = m_composer.getStructuredHavingClause(); m_composer.setHavingClause(""); m_composer.setStructuredHavingClause(aStructuredHaving); - assure("Structured Having Clause not identical", m_composer.getHavingClause().equals(COMPLEXFILTER)); + assertTrue("Structured Having Clause not identical", m_composer.getHavingClause().equals(COMPLEXFILTER)); } catch (Exception e) { - assure("Exception caught: " + e, false); + fail("Exception caught: " + e); } } /** test various sub query related features ("queries in queries") */ - public void testSubQueries() throws Exception + @Test public void testSubQueries() throws Exception { m_composer.setQuery("SELECT * from \"" + INNERPRODUCTSQUERY + "\""); - final XTablesSupplier suppTables = (XTablesSupplier) UnoRuntime.queryInterface( - XTablesSupplier.class, m_composer); + final XTablesSupplier suppTables = UnoRuntime.queryInterface(XTablesSupplier.class, m_composer); final XNameAccess tables = suppTables.getTables(); - assure("a simple SELECT * FROM <query> could not be parsed", + assertTrue("a simple SELECT * FROM <query> could not be parsed", tables != null && tables.hasByName(INNERPRODUCTSQUERY)); final String sInnerCommand = m_database.getDatabase().getDataSource().getQueryDefinition(INNERPRODUCTSQUERY).getCommand(); final String sExecutableQuery = m_composer.getQueryWithSubstitution(); - assure("simple query containing a sub query improperly parsed to SDBC level statement: \n1. " + sExecutableQuery + "\n2. " + "SELECT * FROM ( " + sInnerCommand + " ) AS \"" + INNERPRODUCTSQUERY + "\"", + assertTrue("simple query containing a sub query improperly parsed to SDBC level statement: \n1. " + sExecutableQuery + "\n2. " + "SELECT * FROM ( " + sInnerCommand + " ) AS \"" + INNERPRODUCTSQUERY + "\"", sExecutableQuery.equals("SELECT * FROM ( " + sInnerCommand + " ) AS \"" + INNERPRODUCTSQUERY + "\"")); } /** tests the XParametersSupplier functionality */ - public void testParameters() + @Test public void testParameters() { try { @@ -241,8 +250,7 @@ public class SingleSelectQueryComposer extends CRMBasedTestCase m_database.getDatabase().getDataSource().createQuery("orders for customer and product", "SELECT * FROM \"orders for customer\" WHERE \"Product Name\" LIKE ?"); m_composer.setQuery(m_database.getDatabase().getDataSource().getQueryDefinition("orders for customer and product").getCommand()); - final XParametersSupplier suppParams = (XParametersSupplier) UnoRuntime.queryInterface( - XParametersSupplier.class, m_composer); + final XParametersSupplier suppParams = UnoRuntime.queryInterface(XParametersSupplier.class, m_composer); final XIndexAccess parameters = suppParams.getParameters(); final String expectedParamNames[] = @@ -252,26 +260,25 @@ public class SingleSelectQueryComposer extends CRMBasedTestCase }; final int paramCount = parameters.getCount(); - assure("composer did find wrong number of parameters in the nested queries.", + assertTrue("composer did find wrong number of parameters in the nested queries.", paramCount == expectedParamNames.length); for (int i = 0; i < paramCount; ++i) { - final XPropertySet parameter = (XPropertySet) UnoRuntime.queryInterface( - XPropertySet.class, parameters.getByIndex(i)); + final XPropertySet parameter = UnoRuntime.queryInterface(XPropertySet.class, parameters.getByIndex(i)); final String paramName = (String) parameter.getPropertyValue("Name"); - assure("wrong parameter name at position " + (i + 1) + " (expected: " + expectedParamNames[i] + ", found: " + paramName + ")", + assertTrue("wrong parameter name at position " + (i + 1) + " (expected: " + expectedParamNames[i] + ", found: " + paramName + ")", paramName.equals(expectedParamNames[i])); } } catch (Exception e) { - assure("caught an exception: " + e, false); + fail("caught an exception: " + e); } } - public void testConditionByColumn() + @Test public void testConditionByColumn() { try { @@ -282,23 +289,22 @@ public class SingleSelectQueryComposer extends CRMBasedTestCase new NamedValue("AutomaticAddition", Boolean.valueOf(true)) }; final String serviceName = "com.sun.star.beans.PropertyBag"; - final XPropertyContainer filter = (XPropertyContainer) UnoRuntime.queryInterface(XPropertyContainer.class, - getORB().createInstanceWithArguments(serviceName, initArgs)); + final XPropertyContainer filter = UnoRuntime.queryInterface(XPropertyContainer.class, getMSF().createInstanceWithArguments(serviceName, initArgs)); filter.addProperty("Name", PropertyAttribute.MAYBEVOID, "Comment"); filter.addProperty("RealName", PropertyAttribute.MAYBEVOID, "Comment"); filter.addProperty("TableName", PropertyAttribute.MAYBEVOID, "customers"); filter.addProperty("Value", PropertyAttribute.MAYBEVOID, "Good one."); filter.addProperty("Type", PropertyAttribute.MAYBEVOID, Integer.valueOf(DataType.LONGVARCHAR)); - final XPropertySet column = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class,filter); + final XPropertySet column = UnoRuntime.queryInterface(XPropertySet.class, filter); m_composer.appendFilterByColumn(column, true,SQLFilterOperator.LIKE); - assure("At least one row should exist",m_database.getConnection().createStatement().executeQuery(m_composer.getQuery()).next()); + assertTrue("At least one row should exist",m_database.getConnection().createStatement().executeQuery(m_composer.getQuery()).next()); } catch (Exception e) { // this is an error: the query is expected to be parseable - assure("caught an exception: " + e, false); + fail("caught an exception: " + e); } } @@ -311,18 +317,18 @@ public class SingleSelectQueryComposer extends CRMBasedTestCase catch (Exception e) { // this is an error: the query is expected to be parseable - assure("caught an exception: " + e, false); + fail("caught an exception: " + e); } final PropertyValue[][] disjunctiveNormalForm = m_composer.getStructuredFilter(); - assureEquals("DNF: wrong number of rows", _expectedDNF.length, disjunctiveNormalForm.length); + assertEquals("DNF: wrong number of rows", _expectedDNF.length, disjunctiveNormalForm.length); for (int i = 0; i < _expectedDNF.length; ++i) { - assureEquals("DNF: wrong number of columns in row " + i, _expectedDNF[i].length, disjunctiveNormalForm[i].length); + assertEquals("DNF: wrong number of columns in row " + i, _expectedDNF[i].length, disjunctiveNormalForm[i].length); for (int j = 0; j < _expectedDNF[i].length; ++j) { - assureEquals("DNF: wrong content in column " + j + ", row " + i, + assertEquals("DNF: wrong content in column " + j + ", row " + i, _expectedDNF[i][j].Name, disjunctiveNormalForm[i][j].Name); } } @@ -331,7 +337,7 @@ public class SingleSelectQueryComposer extends CRMBasedTestCase /** tests the disjunctive normal form functionality, aka the structured filter, * of the composer */ - public void testDisjunctiveNormalForm() + @Test public void testDisjunctiveNormalForm() { // a simple case: WHERE clause simply is a combination of predicates knitted with AND String query = diff --git a/dbaccess/qa/complex/dbaccess/TestCase.java b/dbaccess/qa/complex/dbaccess/TestCase.java index c66efeb0a..ac6cef43d 100644 --- a/dbaccess/qa/complex/dbaccess/TestCase.java +++ b/dbaccess/qa/complex/dbaccess/TestCase.java @@ -31,7 +31,7 @@ import com.sun.star.beans.XPropertySet; import com.sun.star.frame.XComponentLoader; import com.sun.star.frame.XModel; import com.sun.star.lang.XMultiServiceFactory; -import com.sun.star.uno.Exception; +// import com.sun.star.uno.Exception; import com.sun.star.uno.UnoRuntime; import com.sun.star.uno.XComponentContext; import helper.FileTools; @@ -40,13 +40,24 @@ import java.io.IOException; import java.net.URI; import java.net.URISyntaxException; -public abstract class TestCase extends complexlib.ComplexTestCase +// ---------- junit imports ----------------- +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; +import org.openoffice.test.OfficeConnection; +import static org.junit.Assert.*; +// ------------------------------------------ + + +public abstract class TestCase { // -------------------------------------------------------------------------------------------------------- - protected final XMultiServiceFactory getORB() - { - return (XMultiServiceFactory)param.getMSF(); - } +// protected final XMultiServiceFactory getORB() +// { +// return (XMultiServiceFactory)param.getMSF(); +// } // -------------------------------------------------------------------------------------------------------- protected final XComponentContext getComponentContext() @@ -54,13 +65,13 @@ public abstract class TestCase extends complexlib.ComplexTestCase XComponentContext context = null; try { - final XPropertySet orbProps = UnoRuntime.queryInterface( XPropertySet.class, getORB() ); + final XPropertySet orbProps = UnoRuntime.queryInterface( XPropertySet.class, getMSF() ); context = UnoRuntime.queryInterface( XComponentContext.class, orbProps.getPropertyValue( "DefaultContext" ) ); } catch ( Exception ex ) { - failed( "could not retrieve the ComponentContext" ); + fail( "could not retrieve the ComponentContext" ); } return context; } @@ -83,9 +94,11 @@ public abstract class TestCase extends complexlib.ComplexTestCase */ protected final String createTempFileURL() throws IOException { - final File documentFile = java.io.File.createTempFile( getTestObjectName(), ".odb" ).getAbsoluteFile(); + final File documentFile = java.io.File.createTempFile( "dbaccess_test", ".odb" ).getAbsoluteFile(); if ( documentFile.exists() ) + { documentFile.delete(); + } return FileHelper.getOOoCompatibleFileURL( documentFile.toURI().toURL().toString() ); } @@ -111,16 +124,40 @@ public abstract class TestCase extends complexlib.ComplexTestCase protected final XModel loadDocument( final String _docURL ) throws Exception { final XComponentLoader loader = UnoRuntime.queryInterface( XComponentLoader.class, - getORB().createInstance( "com.sun.star.frame.Desktop" ) ); + getMSF().createInstance( "com.sun.star.frame.Desktop" ) ); return UnoRuntime.queryInterface( XModel.class, loader.loadComponentFromURL( _docURL, "_blank", 0, new PropertyValue[] {} ) ); } // -------------------------------------------------------------------------------------------------------- - protected void assureException( Object _object, Class _unoInterfaceClass, String _methodName, Object[] _methodArgs, - Class _expectedExceptionClass ) +// protected void assureException( Object _object, Class _unoInterfaceClass, String _methodName, Object[] _methodArgs, +// Class _expectedExceptionClass ) +// { +// assureException( UnoRuntime.queryInterface( _unoInterfaceClass, _object ), _methodName, +// _methodArgs, _expectedExceptionClass ); +// } + + + + protected XMultiServiceFactory getMSF() + { + final XMultiServiceFactory xMSF1 = UnoRuntime.queryInterface(XMultiServiceFactory.class, connection.getComponentContext().getServiceManager()); + return xMSF1; + } + + // setup and close connections + @BeforeClass public static void setUpConnection() throws Exception { + System.out.println("setUpConnection()"); + connection.setUp(); + } + + @AfterClass public static void tearDownConnection() + throws InterruptedException, com.sun.star.uno.Exception { - assureException( UnoRuntime.queryInterface( _unoInterfaceClass, _object ), _methodName, - _methodArgs, _expectedExceptionClass ); + System.out.println("tearDownConnection()"); + connection.tearDown(); } + + private static final OfficeConnection connection = new OfficeConnection(); + } diff --git a/dbaccess/qa/complex/dbaccess/UISettings.java b/dbaccess/qa/complex/dbaccess/UISettings.java index 6ae8fa5f0..4e49f2778 100644 --- a/dbaccess/qa/complex/dbaccess/UISettings.java +++ b/dbaccess/qa/complex/dbaccess/UISettings.java @@ -32,37 +32,45 @@ import com.sun.star.beans.XPropertySet; import com.sun.star.container.XNameAccess; import com.sun.star.form.runtime.XFormController; import com.sun.star.frame.XController; -import com.sun.star.frame.XModel; import com.sun.star.sdb.application.DatabaseObject; -import com.sun.star.sdb.application.XDatabaseDocumentUI; import com.sun.star.uno.UnoRuntime; import com.sun.star.util.XCloseable; import connectivity.tools.CRMDatabase; +// ---------- junit imports ----------------- +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; +import org.openoffice.test.OfficeConnection; +import static org.junit.Assert.*; +// ------------------------------------------ + public class UISettings extends TestCase { // -------------------------------------------------------------------------------------------------------- - public String[] getTestMethodNames() - { - return new String[] { - "checkTableFormattingPersistence", - "checkTransparentQueryColumnSettings" - }; - } - - // -------------------------------------------------------------------------------------------------------- - public String getTestObjectName() - { - return "UISettings"; - } +// public String[] getTestMethodNames() +// { +// return new String[] { +// "checkTableFormattingPersistence", +// "checkTransparentQueryColumnSettings" +// }; +// } +// +// // -------------------------------------------------------------------------------------------------------- +// public String getTestObjectName() +// { +// return "UISettings"; +// } // -------------------------------------------------------------------------------------------------------- /** verifies that aliases for inner queries work as expected */ - public void checkTableFormattingPersistence() throws java.lang.Exception + @Test public void checkTableFormattingPersistence() throws java.lang.Exception { // create, load, and connect a DB doc - CRMDatabase database = new CRMDatabase( getORB(), true ); + CRMDatabase database = new CRMDatabase( getMSF(), true ); // display a table XFormController tableViewController = UnoRuntime.queryInterface( XFormController.class, @@ -89,7 +97,7 @@ public class UISettings extends TestCase // stay alive, and subsequent requests to load the doc will just reuse it, without really loading it. docURL = copyToTempFile( docURL ); loadDocument( docURL ); - database = new CRMDatabase( getORB(), docURL ); + database = new CRMDatabase( getMSF(), docURL ); // display the table, again tableViewController = UnoRuntime.queryInterface( XFormController.class, @@ -98,9 +106,9 @@ public class UISettings extends TestCase tableViewController.getCurrentControl().getModel() ); // verify the properties - assureEquals( "wrong font name", "Andale Sans UI", (String)tableControlModel.getPropertyValue( "FontName" ) ); - assureEquals( "wrong font height", (float)20, ((Float)tableControlModel.getPropertyValue( "FontHeight" )).floatValue() ); - assureEquals( "wrong font slant", FontSlant.ITALIC, (FontSlant)tableControlModel.getPropertyValue( "FontSlant" ) ); + assertEquals( "wrong font name", "Andale Sans UI", (String)tableControlModel.getPropertyValue( "FontName" ) ); + assertEquals( "wrong font height", (float)20, ((Float)tableControlModel.getPropertyValue( "FontHeight" )).floatValue() ); + assertEquals( "wrong font slant", FontSlant.ITALIC, (FontSlant)tableControlModel.getPropertyValue( "FontSlant" ) ); // close the doc database.saveAndClose(); @@ -111,10 +119,10 @@ public class UISettings extends TestCase * settings * @throws java.lang.Exception */ - public void checkTransparentQueryColumnSettings() throws java.lang.Exception + @Test public void checkTransparentQueryColumnSettings() throws java.lang.Exception { // create, load, and connect a DB doc - CRMDatabase database = new CRMDatabase( getORB(), true ); + CRMDatabase database = new CRMDatabase( getMSF(), true ); // display a table XController tableView = database.loadSubComponent( DatabaseObject.TABLE, "customers" ); @@ -125,7 +133,7 @@ public class UISettings extends TestCase // change the formatting of a table column XPropertySet idColumn = UnoRuntime.queryInterface( XPropertySet.class, tableControlModel.getByName( "ID" ) ); - assure( "precondition not met: column already centered", + assertTrue( "precondition not met: column already centered", ((Short)idColumn.getPropertyValue( "Align" )).shortValue() != TextAlign.CENTER ); idColumn.setPropertyValue( "Align", TextAlign.CENTER ); @@ -143,7 +151,7 @@ public class UISettings extends TestCase queryViewController.getCurrentControl().getModel() ); idColumn = UnoRuntime.queryInterface( XPropertySet.class, tableControlModel.getByName( "ID" ) ); - assure( "table column alignment was not propagated to the query column", + assertTrue( "table column alignment was not propagated to the query column", ((Short)idColumn.getPropertyValue( "Align" )).shortValue() == TextAlign.CENTER ); // save close the database document diff --git a/dbaccess/qa/complex/dbaccess/makefile.mk b/dbaccess/qa/complex/dbaccess/makefile.mk index 56a24c029..4a3e0426f 100755 --- a/dbaccess/qa/complex/dbaccess/makefile.mk +++ b/dbaccess/qa/complex/dbaccess/makefile.mk @@ -25,54 +25,109 @@ # #************************************************************************* -PRJ = ..$/..$/.. -TARGET = DbaComplexTests -PRJNAME = $(TARGET) -PACKAGE = complex$/dbaccess - -# --- Settings ----------------------------------------------------- -.INCLUDE: settings.mk - -.IF "$(SOLAR_JAVA)" == "" -all: - @echo "Java not available. Build skipped" - -.INCLUDE : target.mk +.IF "$(OOO_SUBSEQUENT_TESTS)" == "" +nothing .PHONY: .ELSE -#----- compile .java files ----------------------------------------- - -JARFILES = ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar OOoRunner.jar ConnectivityTools.jar -JAVAFILES := $(shell @$(FIND) ./*.java) -JAVACLASSFILES = $(foreach,i,$(JAVAFILES) $(CLASSDIR)$/$(PACKAGE)$/$(i:b).class) - -#----- make a jar from compiled files ------------------------------ - -MAXLINELENGTH = 100000 - -JARCLASSDIRS = $(PACKAGE) -JARTARGET = $(TARGET).jar -JARCOMPRESS = TRUE - -RUNNER_ARGS = -cp "$(CLASSPATH)$(PATH_SEPERATOR)$(SOLARBINDIR)$/OOoRunner.jar" org.openoffice.Runner -TestBase java_complex +PRJ = ../../.. +PRJNAME = dbaccess +TARGET = qa_complex_dbaccess + +.IF "$(OOO_JUNIT_JAR)" != "" +PACKAGE = complex/dbaccess + +# here store only Files which contain a @Test +JAVATESTFILES = \ + ApplicationController.java \ + Beamer.java \ + CRMBasedTestCase.java \ + CopyTableWizard.java \ + DataSource.java \ + DatabaseDocument.java \ + Parser.java \ + PropertyBag.java \ + Query.java \ + QueryInQuery.java \ + RowSet.java \ + SingleSelectQueryComposer.java \ + UISettings.java \ + TestCase.java + +# put here all other files +JAVAFILES = $(JAVATESTFILES) \ + CopyTableInterActionHandler.java \ + DatabaseApplication.java \ + FileHelper.java \ + RowSetEventListener.java + + +JARFILES = OOoRunner.jar ridl.jar test.jar unoil.jar ConnectivityTools.jar +EXTRAJARFILES = $(OOO_JUNIT_JAR) + +# Sample how to debug +# JAVAIFLAGS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=9003,suspend=y + +.END -RUNNER_CALL = $(AUGMENT_LIBRARY_PATH) java - -# --- Targets ------------------------------------------------------ - -.IF "$(depend)" == "" -ALL : ALLTAR -.ELSE -ALL: ALLDEP -.ENDIF - -.INCLUDE : target.mk +.INCLUDE: settings.mk +.INCLUDE: target.mk +.INCLUDE: installationtest.mk +ALLTAR : javatest -run: $(CLASSDIR)$/$(JARTARGET) - +$(RUNNER_CALL) $(RUNNER_ARGS) -sce dbaccess.sce +.END -run_%: $(CLASSDIR)$/$(JARTARGET) - +$(RUNNER_CALL) $(RUNNER_ARGS) -o complex.dbaccess.$(@:s/run_//) -.ENDIF # "$(SOLAR_JAVA)" == "" +# +# +# PRJ = ..$/..$/.. +# TARGET = DbaComplexTests +# PRJNAME = $(TARGET) +# PACKAGE = complex$/dbaccess +# +# # --- Settings ----------------------------------------------------- +# .INCLUDE: settings.mk +# +# .IF "$(SOLAR_JAVA)" == "" +# all: +# @echo "Java not available. Build skipped" +# +# .INCLUDE : target.mk +# .ELSE +# +# #----- compile .java files ----------------------------------------- +# +# JARFILES = ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar OOoRunner.jar ConnectivityTools.jar +# JAVAFILES := $(shell @$(FIND) ./*.java) +# JAVACLASSFILES = $(foreach,i,$(JAVAFILES) $(CLASSDIR)$/$(PACKAGE)$/$(i:b).class) +# +# #----- make a jar from compiled files ------------------------------ +# +# MAXLINELENGTH = 100000 +# +# JARCLASSDIRS = $(PACKAGE) +# JARTARGET = $(TARGET).jar +# JARCOMPRESS = TRUE +# +# RUNNER_ARGS = -cp "$(CLASSPATH)$(PATH_SEPERATOR)$(SOLARBINDIR)$/OOoRunner.jar" org.openoffice.Runner -TestBase java_complex +# +# RUNNER_CALL = $(AUGMENT_LIBRARY_PATH) java +# +# # --- Targets ------------------------------------------------------ +# +# .IF "$(depend)" == "" +# ALL : ALLTAR +# .ELSE +# ALL: ALLDEP +# .ENDIF +# +# .INCLUDE : target.mk +# +# +# run: $(CLASSDIR)$/$(JARTARGET) +# +$(RUNNER_CALL) $(RUNNER_ARGS) -sce dbaccess.sce +# +# run_%: $(CLASSDIR)$/$(JARTARGET) +# +$(RUNNER_CALL) $(RUNNER_ARGS) -o complex.dbaccess.$(@:s/run_//) +# +# .ENDIF # "$(SOLAR_JAVA)" == "" diff --git a/dbaccess/source/core/api/CRowSetColumn.cxx b/dbaccess/source/core/api/CRowSetColumn.cxx index 444169cf9..f44de46f5 100644 --- a/dbaccess/source/core/api/CRowSetColumn.cxx +++ b/dbaccess/source/core/api/CRowSetColumn.cxx @@ -55,7 +55,10 @@ ORowSetColumn::ORowSetColumn( const Reference < XResultSetMetaData >& _xMetaData ::cppu::IPropertyArrayHelper* ORowSetColumn::createArrayHelper( ) const { - BEGIN_PROPERTY_SEQUENCE(21) + const sal_Int32 nDerivedProperties = 21; + Sequence< Property> aDerivedProperties( nDerivedProperties ); + Property* pDesc = aDerivedProperties.getArray(); + sal_Int32 nPos = 0; DECL_PROP1( CATALOGNAME, ::rtl::OUString, READONLY ); DECL_PROP1( DISPLAYSIZE, sal_Int32, READONLY ); @@ -78,13 +81,12 @@ ORowSetColumn::ORowSetColumn( const Reference < XResultSetMetaData >& _xMetaData DECL_PROP1( TYPE, sal_Int32, READONLY ); DECL_PROP1( TYPENAME, ::rtl::OUString, READONLY ); DECL_PROP2( VALUE, Any, READONLY, BOUND ); - - END_PROPERTY_SEQUENCE() + OSL_ENSURE( nPos == nDerivedProperties, "ORowSetColumn::createArrayHelper: inconsistency!" ); Sequence< Property > aRegisteredProperties; describeProperties( aRegisteredProperties ); - return new ::cppu::OPropertyArrayHelper( ::comphelper::concatSequences( aDescriptor, aRegisteredProperties ), sal_False ); + return new ::cppu::OPropertyArrayHelper( ::comphelper::concatSequences( aDerivedProperties, aRegisteredProperties ), sal_False ); } ::cppu::IPropertyArrayHelper& ORowSetColumn::getInfoHelper() @@ -98,6 +100,6 @@ void SAL_CALL ORowSetColumn::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle, if ( nHandle != PROPERTY_ID_VALUE ) ORowSetDataColumn::setFastPropertyValue_NoBroadcast( nHandle, rValue ); } - } // namespace dbaccess + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/core/api/CRowSetColumn.hxx b/dbaccess/source/core/api/CRowSetColumn.hxx index f2c84a3b2..f16a046e5 100644 --- a/dbaccess/source/core/api/CRowSetColumn.hxx +++ b/dbaccess/source/core/api/CRowSetColumn.hxx @@ -38,7 +38,7 @@ namespace dbaccess class ORowSetColumn; class ORowSetColumn :public ORowSetDataColumn ,public ::comphelper::OPropertyArrayUsageHelper< ORowSetColumn > - + { public: ORowSetColumn( const ::com::sun::star::uno::Reference < ::com::sun::star::sdbc::XResultSetMetaData >& _xMetaData, @@ -57,5 +57,4 @@ namespace dbaccess } #endif // DBACCESS_CORE_API_CROWSETCOLUMN_HXX - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/core/api/CRowSetDataColumn.cxx b/dbaccess/source/core/api/CRowSetDataColumn.cxx index 9e6bfe87d..8d7c8723c 100644 --- a/dbaccess/source/core/api/CRowSetDataColumn.cxx +++ b/dbaccess/source/core/api/CRowSetDataColumn.cxx @@ -77,7 +77,10 @@ ORowSetDataColumn::~ORowSetDataColumn() // comphelper::OPropertyArrayUsageHelper ::cppu::IPropertyArrayHelper* ORowSetDataColumn::createArrayHelper( ) const { - BEGIN_PROPERTY_SEQUENCE(21) + const sal_Int32 nDerivedProperties = 21; + Sequence< Property> aDerivedProperties( nDerivedProperties ); + Property* pDesc = aDerivedProperties.getArray(); + sal_Int32 nPos = 0; DECL_PROP1( CATALOGNAME, ::rtl::OUString, READONLY ); DECL_PROP1( DISPLAYSIZE, sal_Int32, READONLY ); @@ -100,13 +103,12 @@ ORowSetDataColumn::~ORowSetDataColumn() DECL_PROP1( TYPE, sal_Int32, READONLY ); DECL_PROP1( TYPENAME, ::rtl::OUString, READONLY ); DECL_PROP1( VALUE, Any, BOUND ); - - END_PROPERTY_SEQUENCE() + OSL_ENSURE( nPos == nDerivedProperties, "ORowSetDataColumn::createArrayHelper: inconsistency!" ); Sequence< Property > aRegisteredProperties; describeProperties( aRegisteredProperties ); - return new ::cppu::OPropertyArrayHelper( ::comphelper::concatSequences( aDescriptor, aRegisteredProperties ), sal_False ); + return new ::cppu::OPropertyArrayHelper( ::comphelper::concatSequences( aDerivedProperties, aRegisteredProperties ), sal_False ); } // cppu::OPropertySetHelper diff --git a/dbaccess/source/core/api/CacheSet.cxx b/dbaccess/source/core/api/CacheSet.cxx index 6521f944c..ac3c610d5 100644 --- a/dbaccess/source/core/api/CacheSet.cxx +++ b/dbaccess/source/core/api/CacheSet.cxx @@ -89,7 +89,7 @@ OCacheSet::OCacheSet() return sQuote; } -void OCacheSet::construct( const Reference< XResultSet>& _xDriverSet,const ::rtl::OUString& /*i_sRowSetFilter*/) +void OCacheSet::construct( const Reference< XResultSet>& _xDriverSet,const ::rtl::OUString& /*i_sRowSetFilter*/) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCacheSet::construct" ); OSL_ENSURE(_xDriverSet.is(),"Invalid resultSet"); @@ -211,7 +211,7 @@ void SAL_CALL OCacheSet::insertRow( const ORowSetRow& _rInsertRow,const connecti } void OCacheSet::fillParameters( const ORowSetRow& _rRow - ,const connectivity::OSQLTable& _xTable + ,const connectivity::OSQLTable& _xTable ,::rtl::OUStringBuffer& _sCondition ,::rtl::OUStringBuffer& _sParameter ,::std::list< sal_Int32>& _rOrgValues) @@ -698,3 +698,4 @@ void OCacheSet::fillMissingValues(ORowSetValueVector::Vector& /*io_aRow*/) const { } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ + diff --git a/dbaccess/source/core/api/KeySet.cxx b/dbaccess/source/core/api/KeySet.cxx index 966ec2280..4644b9e69 100644 --- a/dbaccess/source/core/api/KeySet.cxx +++ b/dbaccess/source/core/api/KeySet.cxx @@ -219,7 +219,7 @@ void OKeySet::findTableColumnsMatching_throw( const Any& i_aTable, } ::rtl::OUStringBuffer OKeySet::createKeyFilter() { - static ::rtl::OUString aAnd(RTL_CONSTASCII_USTRINGPARAM(" AND ")); + static ::rtl::OUString aAnd = ::rtl::OUString::createFromAscii(" AND "); const ::rtl::OUString aQuote = getIdentifierQuoteString(); ::rtl::OUStringBuffer aFilter; static ::rtl::OUString s_sDot(RTL_CONSTASCII_USTRINGPARAM(".")); @@ -582,10 +582,11 @@ void SAL_CALL OKeySet::updateRow(const ORowSetRow& _rInsertRow ,const ORowSetRow ::dbtools::throwSQLException( DBACORE_RESSTRING( RID_STR_NO_CONDITION_FOR_PK ), SQL_GENERAL_ERROR, m_xConnection ); // now create end execute the prepared statement + ::rtl::OUString sEmpty; executeUpdate(_rInsertRow ,_rOrginalRow,aSql.makeStringAndClear(),sEmpty,aIndexColumnPositions); } - +// ----------------------------------------------------------------------------- void OKeySet::executeUpdate(const ORowSetRow& _rInsertRow ,const ORowSetRow& _rOrginalRow,const ::rtl::OUString& i_sSQL,const ::rtl::OUString& i_sTableName,const ::std::vector<sal_Int32>& _aIndexColumnPositions) { // now create end execute the prepared statement @@ -856,7 +857,7 @@ void OKeySet::tryRefetch(const ORowSetRow& _rInsertRow,bool bRefetch) connectivity::ORowVector< ORowSetValue >::Vector::const_iterator aParaEnd; OUpdatedParameter::iterator aUpdateFind = m_aUpdatedParameter.find(m_aKeyIter->first); if ( aUpdateFind == m_aUpdatedParameter.end() ) - { + { aParaIter = m_aParameterValueForCache.get().begin(); aParaEnd = m_aParameterValueForCache.get().end(); } @@ -865,7 +866,7 @@ void OKeySet::tryRefetch(const ORowSetRow& _rInsertRow,bool bRefetch) aParaIter = aUpdateFind->second.get().begin(); aParaEnd = aUpdateFind->second.get().end(); } - + for(++aParaIter;aParaIter != aParaEnd;++aParaIter,++nPos) { ::dbtools::setObjectWithInfo( xParameter, nPos, aParaIter->makeAny(), aParaIter->getTypeKind() ); @@ -1612,11 +1613,11 @@ void getColumnPositions(const Reference<XNameAccess>& _rxQueryColumns, SelectColumnDescription aColDesc( nPos, nType,nScale,nNullable != sdbc::ColumnValue::NO_NULLS, sColumnDefault ); aColDesc.sRealName = sRealName; aColDesc.sTableName = sTableName; - o_rColumnNames[sName.makeStringAndClear()] = aColDesc; + o_rColumnNames[sName.makeStringAndClear()] = aColDesc; } else o_rColumnNames[sRealName] = SelectColumnDescription( nPos, nType,nScale,nNullable != sdbc::ColumnValue::NO_NULLS, sColumnDefault ); - + break; } } @@ -1645,4 +1646,6 @@ void OKeySet::impl_convertValue_throw(const ORowSetRow& _rInsertRow,const Select break; } } + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ + diff --git a/dbaccess/source/core/api/KeySet.hxx b/dbaccess/source/core/api/KeySet.hxx index a439fb22e..1a7c0e7d5 100644 --- a/dbaccess/source/core/api/KeySet.hxx +++ b/dbaccess/source/core/api/KeySet.hxx @@ -33,6 +33,7 @@ #include <cppuhelper/implbase1.hxx> #include <memory> +#include <memory> #include <map> #include <com/sun/star/lang/XUnoTunnel.hpp> diff --git a/dbaccess/source/core/api/OptimisticSet.cxx b/dbaccess/source/core/api/OptimisticSet.cxx index d007cdd77..dd8ca5825 100644 --- a/dbaccess/source/core/api/OptimisticSet.cxx +++ b/dbaccess/source/core/api/OptimisticSet.cxx @@ -1,4 +1,3 @@ - /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * diff --git a/dbaccess/source/core/api/RowSet.cxx b/dbaccess/source/core/api/RowSet.cxx index f12afb9f6..5807f684c 100644 --- a/dbaccess/source/core/api/RowSet.cxx +++ b/dbaccess/source/core/api/RowSet.cxx @@ -136,7 +136,6 @@ extern "C" void SAL_CALL createRegistryInfo_ORowSet() namespace dbaccess { - Reference< XInterface > ORowSet_CreateInstance(const Reference< XMultiServiceFactory >& _rxFactory) { return *(new ORowSet(_rxFactory)); @@ -909,7 +908,7 @@ void SAL_CALL ORowSet::insertRow( ) throw(SQLException, RuntimeException) // - rowChanged notifyAllListenersRowChanged(aGuard,aEvt); - + if ( !aBookmarks.empty() ) { RowsChangeEvent aUpEvt(*this,RowChangeAction::UPDATE,aBookmarks.size(),Sequence<Any>(&(*aBookmarks.begin()),aBookmarks.size())); @@ -961,7 +960,7 @@ void SAL_CALL ORowSet::updateRow( ) throw(SQLException, RuntimeException) ::std::vector< Any > aBookmarks; m_pCache->updateRow(m_aCurrentRow.operator ->(),aBookmarks); if ( !aBookmarks.empty() ) - aEvt.Bookmarks = Sequence<Any>(&(*aBookmarks.begin()),aBookmarks.size()); + aEvt.Bookmarks = Sequence<Any>(&(*aBookmarks.begin()),aBookmarks.size()); aEvt.Rows += aBookmarks.size(); m_aBookmark = m_pCache->getBookmark(); m_aCurrentRow = m_pCache->m_aMatrixIter; @@ -1925,6 +1924,8 @@ void ORowSet::execute_NoApprove_NoNewConn(ResettableMutexGuard& _rClearForNotifi if(!xColumn.is()) { // no column found so we could look at the position i + //bReFetchName = sal_True; + //sColumnLabel = ::rtl::OUString(); Reference<XIndexAccess> xIndexAccess(m_xColumns,UNO_QUERY); if(xIndexAccess.is() && i <= xIndexAccess->getCount()) { @@ -2633,7 +2634,6 @@ void SAL_CALL ORowSet::clearWarnings( ) throw (SQLException, RuntimeException) { m_aWarnings.clearWarnings(); } - void ORowSet::doCancelModification( ) { if ( isModification() ) diff --git a/dbaccess/source/core/api/RowSetBase.cxx b/dbaccess/source/core/api/RowSetBase.cxx index 492302f15..d48070249 100644 --- a/dbaccess/source/core/api/RowSetBase.cxx +++ b/dbaccess/source/core/api/RowSetBase.cxx @@ -1290,7 +1290,7 @@ void ORowSetBase::firePropertyChange(const ORowSetRow& _rOldRow) } DBG_TRACE2("DBACCESS ORowSetBase::firePropertyChange() Clone = %i ID = %i\n",m_bClone,osl_getThreadIdentifier(NULL)); } - +// ------------------------------------------------------------------------- void ORowSetBase::firePropertyChange(sal_Int32 _nPos,const ::connectivity::ORowSetValue& _rOldValue) { OSL_ENSURE(_nPos < (sal_Int32)m_aDataColumns.size(),"nPos is invalid!"); @@ -1502,7 +1502,7 @@ ORowSetNotifier::ORowSetNotifier( ORowSetBase* _pRowSet ) if ( m_pRowSet->isModification( ORowSetBase::GrantNotifierAccess() ) ) m_pRowSet->doCancelModification( ORowSetBase::GrantNotifierAccess() ); } - +// ----------------------------------------------------------------------------- ORowSetNotifier::ORowSetNotifier( ORowSetBase* _pRowSet,const ORowSetValueVector::Vector& i_aRow ) :m_pImpl(new ORowSetNotifierImpl) ,m_pRowSet( _pRowSet ) diff --git a/dbaccess/source/core/api/RowSetCache.cxx b/dbaccess/source/core/api/RowSetCache.cxx index f795ce75c..5dad2030e 100644 --- a/dbaccess/source/core/api/RowSetCache.cxx +++ b/dbaccess/source/core/api/RowSetCache.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -42,6 +42,7 @@ #include "core_resource.hxx" #include "dbastrings.hrc" +/** === begin UNO includes === **/ #include <com/sun/star/sdbc/ColumnValue.hpp> #include <com/sun/star/sdbc/ResultSetConcurrency.hpp> #include <com/sun/star/sdbcx/CompareBookmark.hpp> @@ -50,6 +51,7 @@ #include <com/sun/star/sdbcx/XColumnsSupplier.hpp> #include <com/sun/star/sdbcx/XKeysSupplier.hpp> #include <com/sun/star/sdbcx/XTablesSupplier.hpp> +/** === end UNO includes === **/ #include <comphelper/extract.hxx> #include <comphelper/property.hxx> @@ -1267,7 +1269,7 @@ void ORowSetCache::updateRow( ORowSetMatrix::iterator& _rUpdateRow,::std::vector m_pCacheSet->updateRow(*_rUpdateRow,*m_aMatrixIter,m_aUpdateTable); // refetch the whole row (*m_aMatrixIter) = NULL; - + if ( moveToBookmark(aBookmark) ) { // update the cached values @@ -1611,12 +1613,11 @@ sal_Bool ORowSetCache::fill(ORowSetMatrix::iterator& _aIter,const ORowSetMatrix: } return _bCheck; } - bool ORowSetCache::isResultSetChanged() const { return m_pCacheSet->isResultSetChanged(); } - +// ----------------------------------------------------------------------------- void ORowSetCache::reset(const Reference< XResultSet>& _xDriverSet) { m_xMetaData.set(Reference< XResultSetMetaDataSupplier >(_xDriverSet,UNO_QUERY)->getMetaData()); @@ -1626,7 +1627,7 @@ void ORowSetCache::reset(const Reference< XResultSet>& _xDriverSet) m_nRowCount = 0; reFillMatrix(m_nStartPos+1,m_nEndPos+1); } - +// ----------------------------------------------------------------------------- void ORowSetCache::impl_updateRowFromCache_throw(ORowSetValueVector::Vector& io_aRow ,::std::vector<sal_Int32>& o_ChangedColumns) { @@ -1640,7 +1641,7 @@ void ORowSetCache::impl_updateRowFromCache_throw(ORowSetValueVector::Vector& io_ break; } } - + if ( aIter == m_pMatrix->end() ) { m_pCacheSet->fillMissingValues(io_aRow); diff --git a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx index 8af1be229..2632fefbd 100644 --- a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx +++ b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx @@ -1591,6 +1591,7 @@ void OSingleSelectQueryComposer::setConditionByColumn( const Reference< XPropert aSQL.append( ::dbtools::quoteName( aQuote, aName ) ); } + if ( aValue.hasValue() ) { if( !m_xTypeConverter.is() ) diff --git a/dbaccess/source/core/api/datasettings.cxx b/dbaccess/source/core/api/datasettings.cxx index 085f99ecf..0eb657366 100644 --- a/dbaccess/source/core/api/datasettings.cxx +++ b/dbaccess/source/core/api/datasettings.cxx @@ -44,6 +44,7 @@ #include <com/sun/star/awt/FontWidth.hpp> + using namespace ::com::sun::star::uno; using namespace ::com::sun::star::awt; using namespace ::com::sun::star::lang; diff --git a/dbaccess/source/core/api/definitioncolumn.cxx b/dbaccess/source/core/api/definitioncolumn.cxx index c0db66370..ab27049e4 100644 --- a/dbaccess/source/core/api/definitioncolumn.cxx +++ b/dbaccess/source/core/api/definitioncolumn.cxx @@ -90,6 +90,7 @@ void OTableColumnDescriptor::impl_registerProperties() OColumnSettings::registerProperties( *this ); } +//-------------------------------------------------------------------------- IMPLEMENT_GET_IMPLEMENTATION_ID( OTableColumnDescriptor ) // ::com::sun::star::lang::XServiceInfo @@ -142,6 +143,7 @@ void SAL_CALL OTableColumnDescriptor::setParent( const Reference< XInterface >& //============================================================ DBG_NAME(OTableColumn); +// ------------------------------------------------------------------------- OTableColumn::OTableColumn( const ::rtl::OUString& _rName ) :OTableColumnDescriptor( false /* do not act as descriptor */ ) { @@ -156,16 +158,19 @@ OTableColumn::~OTableColumn() IMPLEMENT_GET_IMPLEMENTATION_ID( OTableColumn ) +//------------------------------------------------------------------------------ rtl::OUString OTableColumn::getImplementationName( ) throw (RuntimeException) { return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.sdb.OTableColumn")); } +//------------------------------------------------------------------------------ ::cppu::IPropertyArrayHelper& SAL_CALL OTableColumn::getInfoHelper() { return *OTableColumn_PBase::getArrayHelper(); } +//------------------------------------------------------------------------------ ::cppu::IPropertyArrayHelper* OTableColumn::createArrayHelper( ) const { return OTableColumnDescriptor::createArrayHelper(); @@ -176,6 +181,7 @@ rtl::OUString OTableColumn::getImplementationName( ) throw (RuntimeException) // ========================================================================= DBG_NAME( OQueryColumn ); +// ------------------------------------------------------------------------- OQueryColumn::OQueryColumn( const Reference< XPropertySet >& _rxParserColumn, const Reference< XConnection >& _rxConnection,const ::rtl::OUString i_sLabel ) :OTableColumnDescriptor( false /* do not act as descriptor */ ) ,m_sLabel(i_sLabel) @@ -282,6 +288,7 @@ Reference< XPropertySet > OQueryColumn::impl_determineOriginalTableColumn( const IMPLEMENT_GET_IMPLEMENTATION_ID( OQueryColumn ) +//-------------------------------------------------------------------------- ::rtl::OUString SAL_CALL OQueryColumn::getImplementationName( ) throw(RuntimeException) { return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "org.openoffice.comp.dbaccess.OQueryColumn" ) ); @@ -297,6 +304,7 @@ IMPLEMENT_GET_IMPLEMENTATION_ID( OQueryColumn ) return OTableColumnDescriptor::createArrayHelper(); } +//-------------------------------------------------------------------------- void SAL_CALL OQueryColumn::getFastPropertyValue( Any& _rValue, sal_Int32 _nHandle ) const { OTableColumnDescriptor::getFastPropertyValue( _rValue, _nHandle ); @@ -369,6 +377,7 @@ OColumnWrapper::~OColumnWrapper() return sPropName; } +//------------------------------------------------------------------------------ void OColumnWrapper::getFastPropertyValue( Any& rValue, sal_Int32 nHandle ) const { // derived classes are free to either use the OPropertyContainer(Helper) mechanisms for properties, @@ -437,6 +446,7 @@ OTableColumnDescriptorWrapper::OTableColumnDescriptorWrapper( const Reference< X } // com::sun::star::lang::XTypeProvider +//-------------------------------------------------------------------------- IMPLEMENT_GET_IMPLEMENTATION_ID( OTableColumnDescriptorWrapper ) // ::com::sun::star::lang::XServiceInfo diff --git a/dbaccess/source/core/api/querycomposer.cxx b/dbaccess/source/core/api/querycomposer.cxx index 9bf2e3400..5cd5502bc 100644 --- a/dbaccess/source/core/api/querycomposer.cxx +++ b/dbaccess/source/core/api/querycomposer.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -50,6 +50,7 @@ #include <unotools/syslocale.hxx> #include <com/sun/star/container/XChild.hpp> #include <com/sun/star/sdb/SQLFilterOperator.hpp> +#include <com/sun/star/sdb/SQLFilterOperator.hpp> #include "querycomposer.hxx" #include "HelperCollections.hxx" #include "composertools.hxx" diff --git a/dbaccess/source/core/dataaccess/connection.cxx b/dbaccess/source/core/dataaccess/connection.cxx index f5fdd7590..3a753d4d9 100644 --- a/dbaccess/source/core/dataaccess/connection.cxx +++ b/dbaccess/source/core/dataaccess/connection.cxx @@ -576,6 +576,7 @@ void OConnection::impl_fillTableFilter() } } +// ----------------------------------------------------------------------------- void OConnection::refresh(const Reference< XNameAccess >& _rToBeRefreshed) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "OConnection::refresh" ); diff --git a/dbaccess/source/core/dataaccess/databasecontext.cxx b/dbaccess/source/core/dataaccess/databasecontext.cxx index 7b6e9acec..6b1e3c267 100644 --- a/dbaccess/source/core/dataaccess/databasecontext.cxx +++ b/dbaccess/source/core/dataaccess/databasecontext.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -109,7 +109,6 @@ extern "C" void SAL_CALL createRegistryInfo_ODatabaseContext() namespace dbaccess { - typedef ::cppu::WeakImplHelper1 < XTerminateListener > DatabaseDocumentLoader_Base; class DatabaseDocumentLoader : public DatabaseDocumentLoader_Base @@ -544,46 +543,55 @@ void ODatabaseContext::revokeObject(const rtl::OUString& _rName) throw( Exceptio m_aContainerListeners.notifyEach( &XContainerListener::elementRemoved, aEvent ); } +//------------------------------------------------------------------------------ ::sal_Bool SAL_CALL ODatabaseContext::hasRegisteredDatabase( const ::rtl::OUString& _Name ) throw (IllegalArgumentException, RuntimeException) { return m_xDatabaseRegistrations->hasRegisteredDatabase( _Name ); } +//------------------------------------------------------------------------------ Sequence< ::rtl::OUString > SAL_CALL ODatabaseContext::getRegistrationNames() throw (RuntimeException) { return m_xDatabaseRegistrations->getRegistrationNames(); } +//------------------------------------------------------------------------------ ::rtl::OUString SAL_CALL ODatabaseContext::getDatabaseLocation( const ::rtl::OUString& _Name ) throw (IllegalArgumentException, NoSuchElementException, RuntimeException) { return m_xDatabaseRegistrations->getDatabaseLocation( _Name ); } +//------------------------------------------------------------------------------ void SAL_CALL ODatabaseContext::registerDatabaseLocation( const ::rtl::OUString& _Name, const ::rtl::OUString& _Location ) throw (IllegalArgumentException, ElementExistException, RuntimeException) { m_xDatabaseRegistrations->registerDatabaseLocation( _Name, _Location ); } +//------------------------------------------------------------------------------ void SAL_CALL ODatabaseContext::revokeDatabaseLocation( const ::rtl::OUString& _Name ) throw (IllegalArgumentException, NoSuchElementException, IllegalAccessException, RuntimeException) { m_xDatabaseRegistrations->revokeDatabaseLocation( _Name ); } +//------------------------------------------------------------------------------ void SAL_CALL ODatabaseContext::changeDatabaseLocation( const ::rtl::OUString& _Name, const ::rtl::OUString& _NewLocation ) throw (IllegalArgumentException, NoSuchElementException, IllegalAccessException, RuntimeException) { m_xDatabaseRegistrations->changeDatabaseLocation( _Name, _NewLocation ); } +//------------------------------------------------------------------------------ ::sal_Bool SAL_CALL ODatabaseContext::isDatabaseRegistrationReadOnly( const ::rtl::OUString& _Name ) throw (IllegalArgumentException, NoSuchElementException, RuntimeException) { return m_xDatabaseRegistrations->isDatabaseRegistrationReadOnly( _Name ); } +//------------------------------------------------------------------------------ void SAL_CALL ODatabaseContext::addDatabaseRegistrationsListener( const Reference< XDatabaseRegistrationsListener >& _Listener ) throw (RuntimeException) { m_xDatabaseRegistrations->addDatabaseRegistrationsListener( _Listener ); } +//------------------------------------------------------------------------------ void SAL_CALL ODatabaseContext::removeDatabaseRegistrationsListener( const Reference< XDatabaseRegistrationsListener >& _Listener ) throw (RuntimeException) { m_xDatabaseRegistrations->removeDatabaseRegistrationsListener( _Listener ); diff --git a/dbaccess/source/core/dataaccess/databasedocument.cxx b/dbaccess/source/core/dataaccess/databasedocument.cxx index 7a7e6c7be..a19eec46f 100644 --- a/dbaccess/source/core/dataaccess/databasedocument.cxx +++ b/dbaccess/source/core/dataaccess/databasedocument.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/dbaccess/source/core/dataaccess/datasource.cxx b/dbaccess/source/core/dataaccess/datasource.cxx index c866902b9..be1932ee8 100644..100755 --- a/dbaccess/source/core/dataaccess/datasource.cxx +++ b/dbaccess/source/core/dataaccess/datasource.cxx @@ -1413,6 +1413,5 @@ Reference< XInterface > ODatabaseSource::getThis() const RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "ODatabaseSource::getThis" ); return *const_cast< ODatabaseSource* >( this ); } - } // namespace dbaccess /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/core/inc/core_resource.hrc b/dbaccess/source/core/inc/core_resource.hrc index 77745302a..c4e3bb14f 100644 --- a/dbaccess/source/core/inc/core_resource.hrc +++ b/dbaccess/source/core/inc/core_resource.hrc @@ -107,4 +107,26 @@ #define RID_NO_SUCH_DATA_SOURCE ( RID_CORE_STRINGS_START + 67 ) +#define RID_STR_NO_DELETE_BEFORE_AFTER ( RID_CORE_STRINGS_START + 49 ) +#define RID_STR_NO_DELETE_INSERT_ROW ( RID_CORE_STRINGS_START + 50 ) +#define RID_STR_RESULT_IS_READONLY ( RID_CORE_STRINGS_START + 51 ) +#define RID_STR_NO_DELETE_PRIVILEGE ( RID_CORE_STRINGS_START + 52 ) +#define RID_STR_ROW_ALREADY_DELETED ( RID_CORE_STRINGS_START + 53 ) +#define RID_STR_UPDATE_FAILED ( RID_CORE_STRINGS_START + 54 ) + +#define RID_STR_INVALID_INDEX ( RID_CORE_STRINGS_START + 55 ) +#define RID_STR_NO_INSERT_PRIVILEGE ( RID_CORE_STRINGS_START + 56 ) +#define RID_STR_INTERNAL_ERROR ( RID_CORE_STRINGS_START + 57 ) +#define RID_STR_EXPRESSION1 ( RID_CORE_STRINGS_START + 58 ) +#define RID_STR_NO_SQL_COMMAND ( RID_CORE_STRINGS_START + 59 ) +#define RID_STR_INVALID_CURSOR_STATE ( RID_CORE_STRINGS_START + 60 ) +#define RID_STR_CURSOR_BEFORE_OR_AFTER ( RID_CORE_STRINGS_START + 61 ) +#define RID_STR_NO_BOOKMARK_BEFORE_OR_AFTER ( RID_CORE_STRINGS_START + 62 ) +#define RID_STR_NO_BOOKMARK_DELETED ( RID_CORE_STRINGS_START + 63 ) +#define RID_STR_NO_EMBEDDING ( RID_CORE_STRINGS_START + 64 ) +#define RID_STR_CONNECTION_REQUEST ( RID_CORE_STRINGS_START + 65 ) +#define RID_STR_MISSING_EXTENSION ( RID_CORE_STRINGS_START + 66 ) + +#define RID_NO_SUCH_DATA_SOURCE ( RID_CORE_STRINGS_START + 67 ) + #endif // _DBA_CORE_RESOURCE_HRC_ diff --git a/dbaccess/source/core/misc/services.cxx b/dbaccess/source/core/misc/services.cxx index d22684395..7b33c2a0a 100644 --- a/dbaccess/source/core/misc/services.cxx +++ b/dbaccess/source/core/misc/services.cxx @@ -95,28 +95,6 @@ extern "C" OOO_DLLPUBLIC_DBA void SAL_CALL component_getImplementationEnvironmen } //--------------------------------------------------------------------------------------- -extern "C" OOO_DLLPUBLIC_DBA sal_Bool SAL_CALL component_writeInfo( - void* pServiceManager, - void* pRegistryKey - ) -{ - if (pRegistryKey) - try - { - return ::dba::DbaModule::getInstance().writeComponentInfos( - static_cast< XMultiServiceFactory* >( pServiceManager ), - static_cast< XRegistryKey* >( pRegistryKey ) ) - && cppu::component_writeInfoHelper(pServiceManager, pRegistryKey, dba::entries); - } - catch (InvalidRegistryException& ) - { - OSL_ENSURE( false, "DBA::component_writeInfo : could not create a registry key ! ## InvalidRegistryException !" ); - } - - return sal_False; -} - -//--------------------------------------------------------------------------------------- extern "C" OOO_DLLPUBLIC_DBA void* SAL_CALL component_getFactory( const sal_Char* pImplementationName, void* pServiceManager, diff --git a/dbaccess/source/core/resource/strings.src b/dbaccess/source/core/resource/strings.src index c431f2cd2..89f9373b3 100644 --- a/dbaccess/source/core/resource/strings.src +++ b/dbaccess/source/core/resource/strings.src @@ -272,7 +272,6 @@ String RID_NO_SUCH_DATA_SOURCE { Text [ en-US ] = "Error accessing data source '$name$':\n$error$"; }; - String RID_STR_NO_SUB_FOLDER { Text [ en-US ] = "There exists no folder named \"$folder$\"."; diff --git a/dbaccess/source/ext/adabas/Acomponentmodule.cxx b/dbaccess/source/ext/adabas/Acomponentmodule.cxx index a1d147e58..dae67418d 100644 --- a/dbaccess/source/ext/adabas/Acomponentmodule.cxx +++ b/dbaccess/source/ext/adabas/Acomponentmodule.cxx @@ -239,54 +239,6 @@ namespace COMPMOD_NAMESPACE } //-------------------------------------------------------------------------- - sal_Bool OModule::writeComponentInfos( - const Reference< XMultiServiceFactory >& /*_rxServiceManager*/, - const Reference< XRegistryKey >& _rxRootKey) - { - OSL_ENSURE(_rxRootKey.is(), "OModule::writeComponentInfos : invalid argument !"); - - if (!s_pImplementationNames) - { - OSL_ASSERT("OModule::writeComponentInfos : have no class infos ! Are you sure called this method at the right time ?"); - return sal_True; - } - OSL_ENSURE(s_pImplementationNames && s_pSupportedServices && s_pCreationFunctionPointers && s_pFactoryFunctionPointers, - "OModule::writeComponentInfos : inconsistent state (the pointers) !"); - OSL_ENSURE( (s_pImplementationNames->getLength() == s_pSupportedServices->getLength()) - && (s_pImplementationNames->getLength() == s_pCreationFunctionPointers->getLength()) - && (s_pImplementationNames->getLength() == s_pFactoryFunctionPointers->getLength()), - "OModule::writeComponentInfos : inconsistent state !"); - - sal_Int32 nLen = s_pImplementationNames->getLength(); - const ::rtl::OUString* pImplName = s_pImplementationNames->getConstArray(); - const Sequence< ::rtl::OUString >* pServices = s_pSupportedServices->getConstArray(); - - ::rtl::OUString sRootKey("/", 1, RTL_TEXTENCODING_ASCII_US); - for (sal_Int32 i=0; i<nLen; ++i, ++pImplName, ++pServices) - { - ::rtl::OUString aMainKeyName(sRootKey); - aMainKeyName += *pImplName; - aMainKeyName += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES")); - - try - { - Reference< XRegistryKey > xNewKey( _rxRootKey->createKey(aMainKeyName) ); - - const ::rtl::OUString* pService = pServices->getConstArray(); - for (sal_Int32 j=0; j<pServices->getLength(); ++j, ++pService) - xNewKey->createKey(*pService); - } - catch(Exception&) - { - OSL_ASSERT("OModule::writeComponentInfos : something went wrong while creating the keys !"); - return sal_False; - } - } - - return sal_True; - } - - //-------------------------------------------------------------------------- Reference< XInterface > OModule::getComponentFactory( const ::rtl::OUString& _rImplementationName, const Reference< XMultiServiceFactory >& _rxServiceManager) diff --git a/dbaccess/source/ext/adabas/Acomponentmodule.hxx b/dbaccess/source/ext/adabas/Acomponentmodule.hxx index d0c93c5b0..e3a7dd684 100644 --- a/dbaccess/source/ext/adabas/Acomponentmodule.hxx +++ b/dbaccess/source/ext/adabas/Acomponentmodule.hxx @@ -122,21 +122,6 @@ typedef ::com::sun::star::uno::Reference< ::com::sun::star::lang::XSingleService static void revokeComponent( const ::rtl::OUString& _rImplementationName); - /** write the registration information of all known components - <p>writes the registration information of all components which are currently registered into the - specified registry.<p/> - <p>Usually used from within component_writeInfo.<p/> - @param _rxServiceManager - the service manager - @param _rRootKey - the registry key under which the information will be stored - @return - sal_True if the registration of all implementations was successfull, sal_False otherwise - */ - static sal_Bool writeComponentInfos( - const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxServiceManager, - const ::com::sun::star::uno::Reference< ::com::sun::star::registry::XRegistryKey >& _rRootKey); - /** creates a Factory for the component with the given implementation name. <p>Usually used from within component_getFactory.<p/> @param _rxServiceManager diff --git a/dbaccess/source/ext/adabas/Aservices.cxx b/dbaccess/source/ext/adabas/Aservices.cxx index b530783cc..09ed34f6e 100644 --- a/dbaccess/source/ext/adabas/Aservices.cxx +++ b/dbaccess/source/ext/adabas/Aservices.cxx @@ -69,27 +69,6 @@ component_getImplementationEnvironment( } //--------------------------------------------------------------------------------------- -extern "C" SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo( - void* pServiceManager, - void* pRegistryKey - ) -{ - if (pRegistryKey) - try - { - return OModule::writeComponentInfos( - static_cast<XMultiServiceFactory*>(pServiceManager), - static_cast<XRegistryKey*>(pRegistryKey)); - } - catch (InvalidRegistryException& ) - { - OSL_ASSERT("DBA::component_writeInfo : could not create a registry key ! ## InvalidRegistryException !"); - } - - return sal_False; -} - -//--------------------------------------------------------------------------------------- extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( const sal_Char* pImplementationName, void* pServiceManager, diff --git a/dbaccess/source/ext/adabas/adabasui.component b/dbaccess/source/ext/adabas/adabasui.component new file mode 100644 index 000000000..e547a0cff --- /dev/null +++ b/dbaccess/source/ext/adabas/adabasui.component @@ -0,0 +1,34 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!--********************************************************************** +* +* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +* +* Copyright 2000, 2010 Oracle and/or its affiliates. +* +* OpenOffice.org - a multi-platform office productivity suite +* +* This file is part of OpenOffice.org. +* +* OpenOffice.org is free software: you can redistribute it and/or modify +* it under the terms of the GNU Lesser General Public License version 3 +* only, as published by the Free Software Foundation. +* +* OpenOffice.org is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU Lesser General Public License version 3 for more details +* (a copy is included in the LICENSE file that accompanied this code). +* +* You should have received a copy of the GNU Lesser General Public License +* version 3 along with OpenOffice.org. If not, see +* <http://www.openoffice.org/license.html> +* for a copy of the LGPLv3 License. +* +**********************************************************************--> + +<component loader="com.sun.star.loader.SharedLibrary" + xmlns="http://openoffice.org/2010/uno-components"> + <implementation name="org.openoffice.comp.adabasui.AdabasCreateDialog"> + <service name="com.sun.star.sdb.AdabasCreationDialog"/> + </implementation> +</component> diff --git a/dbaccess/source/ext/adabas/adabasui.dxp b/dbaccess/source/ext/adabas/adabasui.dxp index db9c0a52f..926e49f5f 100644 --- a/dbaccess/source/ext/adabas/adabasui.dxp +++ b/dbaccess/source/ext/adabas/adabasui.dxp @@ -1,4 +1,3 @@ component_getImplementationEnvironment -component_writeInfo component_getFactory diff --git a/dbaccess/source/ext/adabas/exports.dxp b/dbaccess/source/ext/adabas/exports.dxp index 9630d7e06..f0e1c6993 100644 --- a/dbaccess/source/ext/adabas/exports.dxp +++ b/dbaccess/source/ext/adabas/exports.dxp @@ -1,3 +1,2 @@ component_getImplementationEnvironment -component_writeInfo component_getFactory diff --git a/dbaccess/source/ext/adabas/makefile.mk b/dbaccess/source/ext/adabas/makefile.mk index e23310ac9..8dbbe7abc 100644 --- a/dbaccess/source/ext/adabas/makefile.mk +++ b/dbaccess/source/ext/adabas/makefile.mk @@ -91,3 +91,10 @@ RESLIB1SRSFILES=$(RES1FILELIST) .INCLUDE : target.mk +ALLTAR : $(MISC)/adabasui.component + +$(MISC)/adabasui.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + adabasui.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt adabasui.component diff --git a/dbaccess/source/ext/macromigration/dbmm.component b/dbaccess/source/ext/macromigration/dbmm.component new file mode 100644 index 000000000..a74e94510 --- /dev/null +++ b/dbaccess/source/ext/macromigration/dbmm.component @@ -0,0 +1,34 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!--********************************************************************** +* +* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +* +* Copyright 2000, 2010 Oracle and/or its affiliates. +* +* OpenOffice.org - a multi-platform office productivity suite +* +* This file is part of OpenOffice.org. +* +* OpenOffice.org is free software: you can redistribute it and/or modify +* it under the terms of the GNU Lesser General Public License version 3 +* only, as published by the Free Software Foundation. +* +* OpenOffice.org is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU Lesser General Public License version 3 for more details +* (a copy is included in the LICENSE file that accompanied this code). +* +* You should have received a copy of the GNU Lesser General Public License +* version 3 along with OpenOffice.org. If not, see +* <http://www.openoffice.org/license.html> +* for a copy of the LGPLv3 License. +* +**********************************************************************--> + +<component loader="com.sun.star.loader.SharedLibrary" + xmlns="http://openoffice.org/2010/uno-components"> + <implementation name="com.sun.star.comp.dbaccess.macromigration.MacroMigrationDialogService"> + <service name="com.sun.star.sdb.application.MacroMigrationWizard"/> + </implementation> +</component> diff --git a/dbaccess/source/ext/macromigration/macromigration.src b/dbaccess/source/ext/macromigration/macromigration.src index b00ce0392..efff61aa6 100644 --- a/dbaccess/source/ext/macromigration/macromigration.src +++ b/dbaccess/source/ext/macromigration/macromigration.src @@ -31,6 +31,7 @@ // ----------------------------------------------------------------------------- ModalDialog DLG_MACRO_MIGRATION { + HelpID = "dbaccess:ModalDialog:DLG_MACRO_MIGRATION"; OutputSize = TRUE ; Moveable = TRUE; Closeable = TRUE ; @@ -65,6 +66,7 @@ ModalDialog DLG_MACRO_MIGRATION TabPage TP_PREPARE { + HelpID = "dbaccess:TabPage:TP_PREPARE"; Pos = MAP_APPFONT( 40, 130 ); Size = MAP_APPFONT( TAB_PAGE_WIDTH, TAB_PAGE_HEIGHT ); @@ -115,6 +117,7 @@ TabPage TP_PREPARE TabPage TP_SAVE_DBDOC_AS { + HelpID = "dbaccess:TabPage:TP_SAVE_DBDOC_AS"; Pos = MAP_APPFONT( 40, 130 ); Size = MAP_APPFONT( TAB_PAGE_WIDTH, TAB_PAGE_HEIGHT ); @@ -152,6 +155,7 @@ TabPage TP_SAVE_DBDOC_AS ComboBox ED_SAVE_AS_LOCATION { + HelpID = "dbaccess:ComboBox:TP_SAVE_DBDOC_AS:ED_SAVE_AS_LOCATION"; Pos = MAP_APPFONT( TAB_PAGE_CONTENT_MARGIN + 60 + SPACING_RELATED, CONTENT_POS_X + 5 * FIXED_TEXT_HEIGHT + SPACING_UNRELATED ); Size = MAP_APPFONT( TAB_PAGE_WIDTH - ( TAB_PAGE_CONTENT_MARGIN + 60 + SPACING_RELATED ) - TAB_PAGE_CONTENT_MARGIN, @@ -163,6 +167,7 @@ TabPage TP_SAVE_DBDOC_AS PushButton PB_BROWSE_SAVE_AS_LOCATION { + HelpID = "dbaccess:PushButton:TP_SAVE_DBDOC_AS:PB_BROWSE_SAVE_AS_LOCATION"; Pos = MAP_APPFONT( TAB_PAGE_WIDTH - BUTTON_WIDTH - TAB_PAGE_CONTENT_MARGIN, CONTENT_POS_X + 5 * FIXED_TEXT_HEIGHT + SPACING_UNRELATED + INPUT_HEIGHT + SPACING_RELATED ); Size = MAP_APPFONT( BUTTON_WIDTH, BUTTON_HEIGHT ); @@ -189,6 +194,7 @@ TabPage TP_SAVE_DBDOC_AS TabPage TP_MIGRATE { + HelpID = "dbaccess:TabPage:TP_MIGRATE"; Pos = MAP_APPFONT( 40, 130 ); Size = MAP_APPFONT( TAB_PAGE_WIDTH, TAB_PAGE_HEIGHT ); @@ -302,6 +308,7 @@ TabPage TP_MIGRATE TabPage TP_SUMMARY { + HelpID = "dbaccess:TabPage:TP_SUMMARY"; Pos = MAP_APPFONT( 40, 130 ); Size = MAP_APPFONT( TAB_PAGE_WIDTH, TAB_PAGE_HEIGHT ); @@ -325,6 +332,7 @@ TabPage TP_SUMMARY MultiLineEdit ED_CHANGES { + HelpID = "dbaccess:MultiLineEdit:TP_SUMMARY:ED_CHANGES"; Pos = MAP_APPFONT( TAB_PAGE_CONTENT_MARGIN, CONTENT_POS_X + FIXED_TEXT_HEIGHT + SPACING_RELATED ); Size = MAP_APPFONT( TAB_PAGE_WIDTH - 2 * TAB_PAGE_CONTENT_MARGIN, TAB_PAGE_HEIGHT - ( CONTENT_POS_X + FIXED_TEXT_HEIGHT + SPACING_RELATED ) - TAB_PAGE_CONTENT_MARGIN ); @@ -444,12 +452,10 @@ String STR_INVALID_NUMBER_ARGS { Text [ en-US ] = "Invalid number of initialization arguments. Expected 1."; }; - String STR_NO_DATABASE { - Text [ en-US ] = "No database document found in the initializatin arguments."; + Text [ en-US ] = "No database document found in the initialization arguments."; }; - String STR_NOT_READONLY { Text [ en-US ] = "Not applicable to read-only documents."; diff --git a/dbaccess/source/ext/macromigration/makefile.mk b/dbaccess/source/ext/macromigration/makefile.mk index 41898091c..b71330f17 100644 --- a/dbaccess/source/ext/macromigration/makefile.mk +++ b/dbaccess/source/ext/macromigration/makefile.mk @@ -99,3 +99,11 @@ RESLIB1SRSFILES=$(RES1FILELIST) .INCLUDE : target.mk + +ALLTAR : $(MISC)/dbmm.component + +$(MISC)/dbmm.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + dbmm.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt dbmm.component diff --git a/dbaccess/source/ext/macromigration/migrationlog.cxx b/dbaccess/source/ext/macromigration/migrationlog.cxx index c9e917dbf..0965b93ec 100644 --- a/dbaccess/source/ext/macromigration/migrationlog.cxx +++ b/dbaccess/source/ext/macromigration/migrationlog.cxx @@ -373,7 +373,7 @@ namespace dbmm break; case ERR_NEW_STYLE_REPORT: - pAsciiErrorDescription = "#doc# could not be processed, since you don't have the Sun Report Builder (TM) extension installed."; + pAsciiErrorDescription = "#doc# could not be processed, since you don't have the Oracle Report Builder (TM) extension installed."; aAsciiParameterNames.push_back( "#doc#" ); break; diff --git a/dbaccess/source/filter/migration/cfgservices.cxx b/dbaccess/source/filter/migration/cfgservices.cxx index a2591ff70..bf3c0f6d6 100644 --- a/dbaccess/source/filter/migration/cfgservices.cxx +++ b/dbaccess/source/filter/migration/cfgservices.cxx @@ -69,27 +69,6 @@ extern "C" void SAL_CALL component_getImplementationEnvironment( } //--------------------------------------------------------------------------------------- -extern "C" sal_Bool SAL_CALL component_writeInfo( - void* pServiceManager, - void* pRegistryKey - ) -{ - if (pRegistryKey) - try - { - return ::dbacfg::OModuleRegistration::writeComponentInfos( - static_cast<XMultiServiceFactory*>(pServiceManager), - static_cast<XRegistryKey*>(pRegistryKey)); - } - catch (InvalidRegistryException& ) - { - OSL_ENSURE(sal_False, "DBA::component_writeInfo : could not create a registry key ! ## InvalidRegistryException !"); - } - - return sal_False; -} - -//--------------------------------------------------------------------------------------- extern "C" void* SAL_CALL component_getFactory( const sal_Char* pImplementationName, void* pServiceManager, diff --git a/dbaccess/source/filter/migration/dbacfg.component b/dbaccess/source/filter/migration/dbacfg.component new file mode 100644 index 000000000..65e92d0f5 --- /dev/null +++ b/dbaccess/source/filter/migration/dbacfg.component @@ -0,0 +1,34 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!--********************************************************************** +* +* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +* +* Copyright 2000, 2010 Oracle and/or its affiliates. +* +* OpenOffice.org - a multi-platform office productivity suite +* +* This file is part of OpenOffice.org. +* +* OpenOffice.org is free software: you can redistribute it and/or modify +* it under the terms of the GNU Lesser General Public License version 3 +* only, as published by the Free Software Foundation. +* +* OpenOffice.org is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU Lesser General Public License version 3 for more details +* (a copy is included in the LICENSE file that accompanied this code). +* +* You should have received a copy of the GNU Lesser General Public License +* version 3 along with OpenOffice.org. If not, see +* <http://www.openoffice.org/license.html> +* for a copy of the LGPLv3 License. +* +**********************************************************************--> + +<component loader="com.sun.star.loader.SharedLibrary" + xmlns="http://openoffice.org/2010/uno-components"> + <implementation name="com.sun.star.comp.sdb.DataSourceMigration"> + <service name="com.sun.star.sdb.DataSourceMigration"/> + </implementation> +</component> diff --git a/dbaccess/source/filter/migration/makefile.mk b/dbaccess/source/filter/migration/makefile.mk index 9d4b95035..1fde72a06 100644 --- a/dbaccess/source/filter/migration/makefile.mk +++ b/dbaccess/source/filter/migration/makefile.mk @@ -71,3 +71,11 @@ DEF1NAME=$(SHL1TARGET) # --- Targets ---------------------------------- .INCLUDE : target.mk + +ALLTAR : $(MISC)/dbacfg.component + +$(MISC)/dbacfg.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + dbacfg.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt dbacfg.component diff --git a/dbaccess/source/filter/xml/dbaxml.component b/dbaccess/source/filter/xml/dbaxml.component new file mode 100644 index 000000000..23b3a5c1a --- /dev/null +++ b/dbaccess/source/filter/xml/dbaxml.component @@ -0,0 +1,49 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!--********************************************************************** +* +* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +* +* Copyright 2000, 2010 Oracle and/or its affiliates. +* +* OpenOffice.org - a multi-platform office productivity suite +* +* This file is part of OpenOffice.org. +* +* OpenOffice.org is free software: you can redistribute it and/or modify +* it under the terms of the GNU Lesser General Public License version 3 +* only, as published by the Free Software Foundation. +* +* OpenOffice.org is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU Lesser General Public License version 3 for more details +* (a copy is included in the LICENSE file that accompanied this code). +* +* You should have received a copy of the GNU Lesser General Public License +* version 3 along with OpenOffice.org. If not, see +* <http://www.openoffice.org/license.html> +* for a copy of the LGPLv3 License. +* +**********************************************************************--> + +<component loader="com.sun.star.loader.SharedLibrary" + xmlns="http://openoffice.org/2010/uno-components"> + <implementation name="com.sun.star.comp.sdb.DBExportFilter"> + <service name="com.sun.star.document.ExportFilter"/> + </implementation> + <implementation name="com.sun.star.comp.sdb.DBFilter"> + <service name="com.sun.star.document.ImportFilter"/> + </implementation> + <implementation name="com.sun.star.comp.sdb.XMLFullExporter"> + <service name="com.sun.star.document.ExportFilter"/> + </implementation> + <implementation name="com.sun.star.comp.sdb.XMLSettingsExporter"> + <service name="com.sun.star.document.ExportFilter"/> + </implementation> + <implementation name="org.openoffice.comp.dbflt.DBContentLoader2"> + <service name="com.sun.star.frame.FrameLoader"/> + </implementation> + <implementation name="org.openoffice.comp.dbflt.DBTypeDetection"> + <service name="com.sun.star.document.ExtendedTypeDetection"/> + </implementation> +</component> diff --git a/dbaccess/source/filter/xml/makefile.mk b/dbaccess/source/filter/xml/makefile.mk index 3f3b02195..33ff074b8 100644 --- a/dbaccess/source/filter/xml/makefile.mk +++ b/dbaccess/source/filter/xml/makefile.mk @@ -111,3 +111,11 @@ DEF1NAME=$(SHL1TARGET) # --- Targets ---------------------------------- .INCLUDE : target.mk + +ALLTAR : $(MISC)/dbaxml.component + +$(MISC)/dbaxml.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + dbaxml.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt dbaxml.component diff --git a/dbaccess/source/filter/xml/xmlColumn.cxx b/dbaccess/source/filter/xml/xmlColumn.cxx index e2beb266a..78da1cf6e 100644 --- a/dbaccess/source/filter/xml/xmlColumn.cxx +++ b/dbaccess/source/filter/xml/xmlColumn.cxx @@ -101,6 +101,7 @@ OXMLColumn::OXMLColumn( ODBFilter& rImport case XML_TOK_COLUMN_DEFAULT_VALUE: if ( sValue.getLength() && sType.getLength() ) m_aDefaultValue <<= sValue; + // SvXMLUnitConverter::convertAny(m_aDefaultValue,sType,sValue); break; case XML_TOK_COLUMN_VISIBLE: m_bHidden = sValue.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("false")); diff --git a/dbaccess/source/filter/xml/xmlservices.cxx b/dbaccess/source/filter/xml/xmlservices.cxx index 8836532b9..76ddf139e 100644 --- a/dbaccess/source/filter/xml/xmlservices.cxx +++ b/dbaccess/source/filter/xml/xmlservices.cxx @@ -79,28 +79,6 @@ extern "C" void SAL_CALL component_getImplementationEnvironment( } //--------------------------------------------------------------------------------------- -extern "C" sal_Bool SAL_CALL component_writeInfo( - void* pServiceManager, - void* pRegistryKey - ) -{ - if (pRegistryKey) - try - { - writeDBLoaderInfo2(pRegistryKey); - return ::dbaxml::OModuleRegistration::writeComponentInfos( - static_cast<XMultiServiceFactory*>(pServiceManager), - static_cast<XRegistryKey*>(pRegistryKey)); - } - catch (InvalidRegistryException& ) - { - OSL_ENSURE(sal_False, "DBA::component_writeInfo : could not create a registry key ! ## InvalidRegistryException !"); - } - - return sal_False; -} - -//--------------------------------------------------------------------------------------- extern "C" void* SAL_CALL component_getFactory( const sal_Char* pImplementationName, void* pServiceManager, diff --git a/dbaccess/source/inc/registrationhelper.hxx b/dbaccess/source/inc/registrationhelper.hxx index f53e7da95..343e0ef71 100644 --- a/dbaccess/source/inc/registrationhelper.hxx +++ b/dbaccess/source/inc/registrationhelper.hxx @@ -74,16 +74,6 @@ public: static void revokeComponent( const ::rtl::OUString& _rImplementationName); - /** writes the registration information of all components which are currently registered into the specified registry. - Usually used from within component_writeInfo. - @param _rxServiceManager the service manager - @param _rRootKey the registry key under which the information will be stored - @return sal_True if the registration of all implementations was successfull, sal_False otherwise - */ - static sal_Bool writeComponentInfos( - const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxServiceManager, - const ::com::sun::star::uno::Reference< ::com::sun::star::registry::XRegistryKey >& _rRootKey); - /** creates a Factory for the component with the given implementation name. Usually used from within component_getFactory. @param _rxServiceManager a pointer to an XMultiServiceFactory interface as got in component_getFactory @param _pImplementationName the implementation name of the component diff --git a/dbaccess/source/sdbtools/misc/sdbt_services.cxx b/dbaccess/source/sdbtools/misc/sdbt_services.cxx index 06bfebaf2..9767bd190 100644 --- a/dbaccess/source/sdbtools/misc/sdbt_services.cxx +++ b/dbaccess/source/sdbtools/misc/sdbt_services.cxx @@ -65,27 +65,6 @@ extern "C" void SAL_CALL component_getImplementationEnvironment( } //--------------------------------------------------------------------------------------- -extern "C" sal_Bool SAL_CALL component_writeInfo( - void* pServiceManager, - void* pRegistryKey - ) -{ - if (pRegistryKey) - try - { - return ::sdbtools::SdbtModule::getInstance().writeComponentInfos( - static_cast<XMultiServiceFactory*>(pServiceManager), - static_cast<XRegistryKey*>(pRegistryKey)); - } - catch (const InvalidRegistryException& ) - { - OSL_ASSERT("sdbt::component_writeInfo: could not create a registry key (InvalidRegistryException) !"); - } - - return sal_False; -} - -//--------------------------------------------------------------------------------------- extern "C" void* SAL_CALL component_getFactory( const sal_Char* pImplementationName, void* pServiceManager, diff --git a/dbaccess/source/shared/registrationhelper.cxx b/dbaccess/source/shared/registrationhelper.cxx index 67717440c..289ea3b55 100644 --- a/dbaccess/source/shared/registrationhelper.cxx +++ b/dbaccess/source/shared/registrationhelper.cxx @@ -117,54 +117,6 @@ void OModuleRegistration::revokeComponent(const ::rtl::OUString& _rImplementatio } //-------------------------------------------------------------------------- -sal_Bool OModuleRegistration::writeComponentInfos( - const uno::Reference< lang::XMultiServiceFactory >& /*_rxServiceManager*/, - const uno::Reference< registry::XRegistryKey >& _rxRootKey) -{ - OSL_ENSURE(_rxRootKey.is(), "OModuleRegistration::writeComponentInfos : invalid argument !"); - - if (!s_pImplementationNames) - { - OSL_ENSURE(sal_False, "OModuleRegistration::writeComponentInfos : have no class infos ! Are you sure called this method at the right time ?"); - return sal_True; - } - OSL_ENSURE(s_pImplementationNames && s_pSupportedServices && s_pCreationFunctionPointers && s_pFactoryFunctionPointers, - "OModuleRegistration::writeComponentInfos : inconsistent state (the pointers) !"); - OSL_ENSURE( (s_pImplementationNames->getLength() == s_pSupportedServices->getLength()) - && (s_pImplementationNames->getLength() == s_pCreationFunctionPointers->getLength()) - && (s_pImplementationNames->getLength() == s_pFactoryFunctionPointers->getLength()), - "OModuleRegistration::writeComponentInfos : inconsistent state !"); - - sal_Int32 nLen = s_pImplementationNames->getLength(); - const ::rtl::OUString* pImplName = s_pImplementationNames->getConstArray(); - const uno::Sequence< ::rtl::OUString >* pServices = s_pSupportedServices->getConstArray(); - - ::rtl::OUString sRootKey("/", 1, RTL_TEXTENCODING_ASCII_US); - for (sal_Int32 i=0; i<nLen; ++i, ++pImplName, ++pServices) - { - ::rtl::OUString aMainKeyName(sRootKey); - aMainKeyName += *pImplName; - aMainKeyName += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES")); - - try - { - uno::Reference< registry::XRegistryKey > xNewKey( _rxRootKey->createKey(aMainKeyName) ); - - const ::rtl::OUString* pService = pServices->getConstArray(); - for (sal_Int32 j=0; j<pServices->getLength(); ++j, ++pService) - xNewKey->createKey(*pService); - } - catch(uno::Exception const&) - { - OSL_ENSURE(sal_False, "OModuleRegistration::writeComponentInfos : something went wrong while creating the keys !"); - return sal_False; - } - } - - return sal_True; -} - -//-------------------------------------------------------------------------- uno::Reference< uno::XInterface > OModuleRegistration::getComponentFactory( const ::rtl::OUString& _rImplementationName, const uno::Reference< lang::XMultiServiceFactory >& _rxServiceManager) diff --git a/dbaccess/source/ui/app/AppDetailPageHelper.cxx b/dbaccess/source/ui/app/AppDetailPageHelper.cxx index df0987676..b7a40aac5 100644 --- a/dbaccess/source/ui/app/AppDetailPageHelper.cxx +++ b/dbaccess/source/ui/app/AppDetailPageHelper.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -664,21 +664,22 @@ void OAppDetailPageHelper::createPage(ElementType _eType,const Reference< XNameA { OSL_ENSURE(E_TABLE != _eType,"E_TABLE isn't allowed."); - USHORT nHelpId = 0, nImageId = 0; + USHORT nImageId = 0; + rtl::OString sHelpId; ImageProvider aImageProvider; Image aFolderImage; switch( _eType ) { case E_FORM: - nHelpId = HID_APP_FORM_TREE; + sHelpId = HID_APP_FORM_TREE; aFolderImage = aImageProvider.getFolderImage( DatabaseObject::FORM ); break; case E_REPORT: - nHelpId = HID_APP_REPORT_TREE; + sHelpId = HID_APP_REPORT_TREE; aFolderImage = aImageProvider.getFolderImage( DatabaseObject::REPORT ); break; case E_QUERY: - nHelpId = HID_APP_QUERY_TREE; + sHelpId = HID_APP_QUERY_TREE; aFolderImage = aImageProvider.getFolderImage( DatabaseObject::QUERY ); break; default: @@ -688,7 +689,7 @@ void OAppDetailPageHelper::createPage(ElementType _eType,const Reference< XNameA if ( !m_pLists[_eType] ) { - m_pLists[_eType] = createSimpleTree( nHelpId, aFolderImage ); + m_pLists[_eType] = createSimpleTree( sHelpId, aFolderImage ); } if ( m_pLists[_eType] ) @@ -782,10 +783,10 @@ void OAppDetailPageHelper::fillNames( const Reference< XNameAccess >& _xContaine } } // ----------------------------------------------------------------------------- -DBTreeListBox* OAppDetailPageHelper::createSimpleTree( ULONG _nHelpId, const Image& _rImage ) +DBTreeListBox* OAppDetailPageHelper::createSimpleTree( const rtl::OString& _sHelpId, const Image& _rImage) { DBTreeListBox* pTreeView = new DBTreeListBox(this,getBorderWin().getView()->getORB(),WB_HASLINES | WB_SORT | WB_HASBUTTONS | WB_HSCROLL |WB_HASBUTTONSATROOT | WB_TABSTOP); - pTreeView->SetHelpId(_nHelpId); + pTreeView->SetHelpId( _sHelpId ); return createTree( pTreeView, _rImage ); } @@ -794,7 +795,7 @@ DBTreeListBox* OAppDetailPageHelper::createTree( DBTreeListBox* _pTreeView, cons { WaitObject aWaitCursor(this); - _pTreeView->SetWindowBits(WB_HASLINES | WB_SORT | WB_HASBUTTONS | WB_HSCROLL |WB_HASBUTTONSATROOT | WB_TABSTOP); + _pTreeView->SetStyle(_pTreeView->GetStyle() | WB_HASLINES | WB_SORT | WB_HASBUTTONS | WB_HSCROLL |WB_HASBUTTONSATROOT | WB_TABSTOP); _pTreeView->GetModel()->SetSortMode(SortAscending); _pTreeView->EnableCheckButton( NULL ); // do not show any buttons _pTreeView->SetSelectionMode(MULTIPLE_SELECTION); diff --git a/dbaccess/source/ui/app/AppDetailPageHelper.hxx b/dbaccess/source/ui/app/AppDetailPageHelper.hxx index f52dc7b10..aa3991d52 100644 --- a/dbaccess/source/ui/app/AppDetailPageHelper.hxx +++ b/dbaccess/source/ui/app/AppDetailPageHelper.hxx @@ -160,7 +160,7 @@ namespace dbaui @return The new tree. */ - DBTreeListBox* createSimpleTree( ULONG _nHelpId, const Image& _rImage ); + DBTreeListBox* createSimpleTree( const rtl::OString& _sHelpId, const Image& _rImage); DECL_LINK( OnEntryDoubleClick, SvTreeListBox* ); DECL_LINK( OnEntrySelChange, void* ); diff --git a/dbaccess/source/ui/app/AppDetailView.cxx b/dbaccess/source/ui/app/AppDetailView.cxx index 4623aaa99..1d2f60691 100644 --- a/dbaccess/source/ui/app/AppDetailView.cxx +++ b/dbaccess/source/ui/app/AppDetailView.cxx @@ -148,7 +148,7 @@ void OCreationList::SelectSearchEntry( const void* _pEntry ) } // ----------------------------------------------------------------------------- -void OCreationList::ExecuteSearchEntry( const void* _pEntry ) +void OCreationList::ExecuteSearchEntry( const void* _pEntry ) const { SvLBoxEntry* pEntry = const_cast< SvLBoxEntry* >( static_cast< const SvLBoxEntry* >( _pEntry ) ); DBG_ASSERT( pEntry, "OCreationList::ExecuteSearchEntry: invalid entry!" ); diff --git a/dbaccess/source/ui/app/AppDetailView.hxx b/dbaccess/source/ui/app/AppDetailView.hxx index fd984c86f..10a625cba 100644 --- a/dbaccess/source/ui/app/AppDetailView.hxx +++ b/dbaccess/source/ui/app/AppDetailView.hxx @@ -86,7 +86,7 @@ namespace dbaui // IMnemonicEntryList virtual void SelectSearchEntry( const void* _pEntry ); - virtual void ExecuteSearchEntry( const void* _pEntry ); + virtual void ExecuteSearchEntry( const void* _pEntry ) const; private: void onSelected( SvLBoxEntry* _pEntry ) const; diff --git a/dbaccess/source/ui/app/app.src b/dbaccess/source/ui/app/app.src index 7480e22b2..a545633ab 100644 --- a/dbaccess/source/ui/app/app.src +++ b/dbaccess/source/ui/app/app.src @@ -111,14 +111,12 @@ Menu RID_MENU_APP_NEW MenuItem { Identifier = SID_APP_NEW_FORM; - HelpId = SID_APP_NEW_FORM; Command = ".uno:DBNewForm"; Text [ en-US ] = "Form..." ; }; MenuItem { Identifier = SID_APP_NEW_REPORT; - HelpId = SID_APP_NEW_REPORT; Command = ".uno:DBNewReport"; Text [ en-US ] = "Report..." ; }; @@ -154,7 +152,6 @@ Menu RID_MENU_APP_NEW MenuItem { Identifier = SID_DB_NEW_VIEW_SQL; - HelpId = SID_DB_NEW_VIEW_SQL; Command = ".uno:DBNewViewSQL"; Text [ en-US ] = "View (Simple)..." ; }; @@ -177,7 +174,6 @@ Menu RID_MENU_APP_EDIT MenuItem { Identifier = SID_DB_APP_PASTE_SPECIAL; - HelpID = SID_DB_APP_PASTE_SPECIAL ; Text[ en-US ] = "Paste Special..."; Command = ".uno:PasteSpecial"; }; @@ -188,42 +184,36 @@ Menu RID_MENU_APP_EDIT MenuItem { Identifier = SID_DB_APP_DELETE; - HelpID = SID_DB_APP_DELETE ; Text[ en-US ] = "Delete"; Command = ".uno:DBDelete"; }; MenuItem { Identifier = SID_DB_APP_RENAME; - HelpID = SID_DB_APP_RENAME ; Text[ en-US ] = "Rename"; Command = ".uno:DBRename"; }; MenuItem { Identifier = SID_DB_APP_EDIT; - HelpID = SID_DB_APP_EDIT ; Text[ en-US ] = "Edit"; Command = ".uno:DBEdit"; }; MenuItem { Identifier = SID_DB_APP_EDIT_SQL_VIEW; - HelpID = SID_DB_APP_EDIT_SQL_VIEW ; Text [ en-US ] = "Edit in SQL View..."; Command = ".uno:DBEditSqlView"; }; MenuItem { Identifier = SID_DB_APP_OPEN; - HelpID = SID_DB_APP_OPEN ; Text[ en-US ] = "Open"; Command = ".uno:DBOpen"; }; MenuItem { Identifier = SID_DB_APP_CONVERTTOVIEW; - HelpID = SID_DB_APP_CONVERTTOVIEW ; Text[ en-US ] = "Create as View"; Command = ".uno:DBConvertToView"; }; @@ -236,14 +226,12 @@ Menu RID_MENU_APP_EDIT MenuItem { Identifier = SID_APP_NEW_REPORT_PRE_SEL; - HelpId = SID_APP_NEW_REPORT_PRE_SEL; Command = ".uno:DBNewReportWithPreSelection"; Text [ en-US ] = "Report..." ; }; MenuItem { Identifier = SID_REPORT_CREATE_REPWIZ_PRE_SEL ; - HelpID = HID_DOCUMENT_CREATE_REPWIZ ; Text[ en-US ] = "Report Wizard..."; Command = ".uno:DBNewReportAutoPilotWithPreSelection"; @@ -255,7 +243,6 @@ Menu RID_MENU_APP_EDIT MenuItem { Identifier = SID_SELECTALL; - HelpID = SID_SELECTALL ; Text[ en-US ] = "Select All"; Command = ".uno:SelectAll"; }; @@ -274,21 +261,18 @@ Menu RID_MENU_APP_EDIT MenuItem { Identifier = SID_DB_APP_DSPROPS; - HelpID = SID_DB_APP_DSPROPS ; Text[ en-US ] = "Properties"; Command = ".uno:DBDSProperties"; }; MenuItem { Identifier = SID_DB_APP_DSCONNECTION_TYPE; - HelpID = SID_DB_APP_DSCONNECTION_TYPE ; Text[ en-US ] = "Connection Type"; Command = ".uno:DBDSConnectionType"; }; MenuItem { Identifier = SID_DB_APP_DSADVANCED_SETTINGS; - HelpID = SID_DB_APP_DSADVANCED_SETTINGS ; Text[ en-US ] = "Advanced Settings"; Command = ".uno:DBDSAdvancedSettings"; }; @@ -410,7 +394,6 @@ Menu RID_MENU_APP_PREVIEW MenuItem { Identifier = SID_DB_APP_DISABLE_PREVIEW; - HelpId = SID_DB_APP_DISABLE_PREVIEW; Text[ en-US ] = "None"; Command = ".uno:DBDisablePreview"; Checkable = TRUE; @@ -420,7 +403,6 @@ Menu RID_MENU_APP_PREVIEW MenuItem { Identifier = SID_DB_APP_VIEW_DOCINFO_PREVIEW; - HelpId = SID_DB_APP_VIEW_DOCINFO_PREVIEW; Text[ en-US ] = "Document Information"; Command = ".uno:DBShowDocInfoPreview"; Checkable = TRUE; @@ -430,7 +412,6 @@ Menu RID_MENU_APP_PREVIEW MenuItem { Identifier = SID_DB_APP_VIEW_DOC_PREVIEW; - HelpId = SID_DB_APP_VIEW_DOC_PREVIEW; Text[ en-US ] = "Document"; Command = ".uno:DBShowDocPreview"; Checkable = TRUE; @@ -485,12 +466,10 @@ String RID_STR_EMBEDDED_DATABASE { Text [ en-US ] = "Embedded database"; }; - String RID_STR_NO_DIFF_CAT { Text [ en-US ] = "You cannot select different categories."; }; - String RID_STR_UNSUPPORTED_OBJECT_TYPE { Text [ en-US ] = "Unsupported object type found ($type$)."; diff --git a/dbaccess/source/ui/browser/genericcontroller.cxx b/dbaccess/source/ui/browser/genericcontroller.cxx index b0a6a2e3d..8e4db12ff 100644 --- a/dbaccess/source/ui/browser/genericcontroller.cxx +++ b/dbaccess/source/ui/browser/genericcontroller.cxx @@ -1319,9 +1319,9 @@ void OGenericUnoController::openHelpAgent(rtl::OUString const& _suHelpStringURL openHelpAgent( aURL ); } -void OGenericUnoController::openHelpAgent(sal_Int32 _nHelpId) +void OGenericUnoController::openHelpAgent(const rtl::OString& _sHelpId) { - openHelpAgent( createHelpAgentURL( lcl_getModuleHelpModuleName( getFrame() ), _nHelpId ) ); + openHelpAgent( createHelpAgentURL( lcl_getModuleHelpModuleName( getFrame() ), _sHelpId ) ); } void OGenericUnoController::openHelpAgent( const URL& _rURL ) diff --git a/dbaccess/source/ui/browser/sbabrw.src b/dbaccess/source/ui/browser/sbabrw.src index 2a748cc01..9feb8ba73 100644 --- a/dbaccess/source/ui/browser/sbabrw.src +++ b/dbaccess/source/ui/browser/sbabrw.src @@ -42,14 +42,14 @@ QueryBox QUERY_BRW_SAVEMODIFIED { Buttons = WB_YES_NO_CANCEL ; DefButton = WB_DEF_YES ; - /* ### ACHTUNG: Neuer Text in Resource? Soll der geänderte Datensatz gespeichert werden? : Soll der geänderte Datensatz gespeichert werden? */ + /* ### ACHTUNG: Neuer Text in Resource? Soll der ge�nderte Datensatz gespeichert werden? : Soll der ge�nderte Datensatz gespeichert werden? */ Message [ en-US ] = "The current record has been changed.\nDo you want to save the changes?" ; }; QueryBox QUERY_BRW_DELETE_ROWS { Buttons = WB_YES_NO ; - /* ### ACHTUNG: Neuer Text in Resource? Sollen die selektierten Daten gelöscht werden? : Sollen die selektierten Daten gel÷scht werden? */ + /* ### ACHTUNG: Neuer Text in Resource? Sollen die selektierten Daten gel�scht werden? : Sollen die selektierten Daten gel�scht werden? */ Message [ en-US ] = "Do you want to delete the selected data?" ; }; @@ -190,14 +190,12 @@ Menu RID_MENU_REFRESH_DATA MenuItem { MID_SBA_QRY_REFRESH - HelpId = SID_FM_REFRESH ; Command = ".uno:Refresh"; }; MenuItem { Identifier = ID_BROWSER_REFRESH_REBUILD; Command = ".uno:DBRebuildData"; - HelpId = HID_BROWSER_REFRESH_REBUILDVIEW; Text [ en-US ] = "Rebuild"; }; }; diff --git a/dbaccess/source/ui/browser/unodatbr.cxx b/dbaccess/source/ui/browser/unodatbr.cxx index ff04d82ad..cf80d714b 100644 --- a/dbaccess/source/ui/browser/unodatbr.cxx +++ b/dbaccess/source/ui/browser/unodatbr.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -368,7 +368,7 @@ sal_Bool SbaTableQueryBrowser::Construct(Window* pParent) xDatabaseRegistrations->addDatabaseRegistrationsListener( this ); // the collator for the string compares - m_xCollator = Reference< XCollator >( getORB()->createInstance(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.i18n.Collator")) ), UNO_QUERY_THROW ); + m_xCollator = Reference< XCollator >( getORB()->createInstance(::rtl::OUString::createFromAscii( "com.sun.star.i18n.Collator" ) ), UNO_QUERY_THROW ); m_xCollator->loadDefaultCollator( Application::GetSettings().GetLocale(), 0 ); } catch(Exception&) @@ -2083,6 +2083,8 @@ SvLBoxEntry* SbaTableQueryBrowser::implAppendEntry( SvLBoxEntry* _pParent, const m_pTreeView->getListBox().SetCollapsedEntryBmp( pNewEntry, aImage ); return pNewEntry; + + return pNewEntry; } //------------------------------------------------------------------------------ @@ -3763,7 +3765,6 @@ void SAL_CALL SbaTableQueryBrowser::changedDatabaseLocation( const DatabaseRegis implAddDatasource( _Event.Name, SharedConnection() ); } - // ......................................................................... } // namespace dbaui // ......................................................................... diff --git a/dbaccess/source/ui/control/FieldDescControl.cxx b/dbaccess/source/ui/control/FieldDescControl.cxx index f85af16ec..fffbf564a 100644 --- a/dbaccess/source/ui/control/FieldDescControl.cxx +++ b/dbaccess/source/ui/control/FieldDescControl.cxx @@ -1068,9 +1068,9 @@ void OFieldDescControl::ActivateAggregate( EControlType eType ) } } // ----------------------------------------------------------------------------- -void OFieldDescControl::InitializeControl(Control* _pControl,ULONG _nHelpId,bool _bAddChangeHandler) +void OFieldDescControl::InitializeControl(Control* _pControl,const ::rtl::OString& _sHelpId,bool _bAddChangeHandler) { - _pControl->SetHelpId(_nHelpId); + _pControl->SetHelpId(_sHelpId); if ( _bAddChangeHandler ) ((OPropListBoxCtrl*)_pControl)->SetSelectHdl(LINK(this,OFieldDescControl,ChangeHdl)); @@ -1087,7 +1087,7 @@ FixedText* OFieldDescControl::CreateText(USHORT _nTextRes) return pFixedText; } // ----------------------------------------------------------------------------- -OPropNumericEditCtrl* OFieldDescControl::CreateNumericControl(USHORT _nHelpStr,short _nProperty,ULONG _nHelpId) +OPropNumericEditCtrl* OFieldDescControl::CreateNumericControl(USHORT _nHelpStr,short _nProperty,const rtl::OString& _sHelpId) { OPropNumericEditCtrl* pControl = new OPropNumericEditCtrl( this, _nHelpStr, _nProperty, WB_BORDER ); pControl->SetDecimalDigits(0); @@ -1095,7 +1095,7 @@ OPropNumericEditCtrl* OFieldDescControl::CreateNumericControl(USHORT _nHelpStr,s pControl->SetMax(0x7FFFFFFF); // soll draussen geaendert werden, wenn noetig pControl->SetStrictFormat(TRUE); - InitializeControl(pControl,_nHelpId,false); + InitializeControl(pControl,_sHelpId,false); return pControl; } diff --git a/dbaccess/source/ui/control/RelationControl.cxx b/dbaccess/source/ui/control/RelationControl.cxx index 85e7cb2f8..9dd3734b3 100644 --- a/dbaccess/source/ui/control/RelationControl.cxx +++ b/dbaccess/source/ui/control/RelationControl.cxx @@ -305,18 +305,18 @@ namespace dbaui { DBG_CHKTHIS(ORelationControl,NULL); - ULONG nHelpId = HID_RELATIONDIALOG_LEFTFIELDCELL; + rtl::OString sHelpId( HID_RELATIONDIALOG_LEFTFIELDCELL ); Reference< XPropertySet> xDef; switch ( getColumnIdent(nColumnId) ) { case SOURCE_COLUMN: xDef = m_xSourceDef; - nHelpId = HID_RELATIONDIALOG_LEFTFIELDCELL; + sHelpId = HID_RELATIONDIALOG_LEFTFIELDCELL; break; case DEST_COLUMN: xDef = m_xDestDef; - nHelpId = HID_RELATIONDIALOG_RIGHTFIELDCELL; + sHelpId = HID_RELATIONDIALOG_RIGHTFIELDCELL; break; default: // ????????? @@ -334,7 +334,7 @@ namespace dbaui m_pListCell->SelectEntry( sName ); } - m_pListCell->SetHelpId(nHelpId); + m_pListCell->SetHelpId(sHelpId); } } diff --git a/dbaccess/source/ui/control/dbtreelistbox.cxx b/dbaccess/source/ui/control/dbtreelistbox.cxx index 5f7bad9a4..5e29eda20 100644 --- a/dbaccess/source/ui/control/dbtreelistbox.cxx +++ b/dbaccess/source/ui/control/dbtreelistbox.cxx @@ -109,6 +109,8 @@ void DBTreeListBox::init() SetNodeDefaultImages( ); EnableContextMenuHandling(); + + SetStyle( GetStyle() | WB_QUICK_SEARCH ); } //------------------------------------------------------------------------ DBTreeListBox::~DBTreeListBox() diff --git a/dbaccess/source/ui/control/opendoccontrols.cxx b/dbaccess/source/ui/control/opendoccontrols.cxx index f8c03ee45..c050b2608 100644 --- a/dbaccess/source/ui/control/opendoccontrols.cxx +++ b/dbaccess/source/ui/control/opendoccontrols.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/dbaccess/source/ui/control/toolboxcontroller.cxx b/dbaccess/source/ui/control/toolboxcontroller.cxx index 685faf364..7b2bfaefe 100644 --- a/dbaccess/source/ui/control/toolboxcontroller.cxx +++ b/dbaccess/source/ui/control/toolboxcontroller.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/dbaccess/source/ui/dlg/AdabasStat.src b/dbaccess/source/ui/dlg/AdabasStat.src index 939b736e9..bb083ade5 100644 --- a/dbaccess/source/ui/dlg/AdabasStat.src +++ b/dbaccess/source/ui/dlg/AdabasStat.src @@ -37,6 +37,7 @@ ModalDialog DLG_ADABASSTAT { + HelpID = "dbaccess:ModalDialog:DLG_ADABASSTAT"; OutputSize = TRUE ; Moveable = TRUE ; Closeable = TRUE ; @@ -59,6 +60,7 @@ ModalDialog DLG_ADABASSTAT Edit ET_SYSDEVSPACE { + HelpID = "dbaccess:Edit:DLG_ADABASSTAT:ET_SYSDEVSPACE"; Border = TRUE ; Pos = MAP_APPFONT ( 120 , 14 ) ; Size = MAP_APPFONT ( 128 , 12 ) ; @@ -75,6 +77,7 @@ ModalDialog DLG_ADABASSTAT Edit ET_TRANSACTIONLOG { + HelpID = "dbaccess:Edit:DLG_ADABASSTAT:ET_TRANSACTIONLOG"; Border = TRUE ; Pos = MAP_APPFONT ( 120 , 31 ) ; Size = MAP_APPFONT ( 128 , 12 ) ; @@ -91,6 +94,7 @@ ModalDialog DLG_ADABASSTAT ListBox LB_DATADEVS { + HelpID = "dbaccess:ListBox:DLG_ADABASSTAT:LB_DATADEVS"; Border = TRUE ; Pos = MAP_APPFONT ( 120 , 48 ) ; Size = MAP_APPFONT ( 128 , 42 ) ; @@ -115,6 +119,7 @@ ModalDialog DLG_ADABASSTAT Edit ET_SIZE { + HelpID = "dbaccess:Edit:DLG_ADABASSTAT:ET_SIZE"; Border = TRUE ; Pos = MAP_APPFONT ( 120 , 109 ) ; Size = MAP_APPFONT ( 60 , 12 ) ; @@ -131,6 +136,7 @@ ModalDialog DLG_ADABASSTAT Edit ET_FREESIZE { + HelpID = "dbaccess:Edit:DLG_ADABASSTAT:ET_FREESIZE"; Border = TRUE ; Pos = MAP_APPFONT ( 120 , 126 ) ; Size = MAP_APPFONT ( 60 , 12 ) ; @@ -147,6 +153,7 @@ ModalDialog DLG_ADABASSTAT NumericField ET_MEMORYUSING { + HelpID = "dbaccess:NumericField:DLG_ADABASSTAT:ET_MEMORYUSING"; Border = TRUE ; Pos = MAP_APPFONT ( 120 , 144 ) ; Size = MAP_APPFONT ( 60 , 12 ) ; diff --git a/dbaccess/source/ui/dlg/AutoControls_tmpl.hrc b/dbaccess/source/ui/dlg/AutoControls_tmpl.hrc index 5ec09c3ae..3d837e2e4 100644 --- a/dbaccess/source/ui/dlg/AutoControls_tmpl.hrc +++ b/dbaccess/source/ui/dlg/AutoControls_tmpl.hrc @@ -126,7 +126,7 @@ // ------------------------------------------------------------------------------------------------- -#define AUTO_BROWSECONTROLGROUP( AUTO_X, AUTO_Y, AUTOPAGE_X, AUTO_HID) \ +#define AUTO_BROWSECONTROLGROUP( AUTO_X, AUTO_Y, AUTOPAGE_X, AUTO_HID, AUTO_HID2) \ FixedText FT_AUTOBROWSEURL { \ Pos = MAP_APPFONT ( AUTO_X , AUTO_Y ) ; \ Size = MAP_APPFONT ( AUTOPAGE_X - AUTO_X - 6 , FIXEDTEXT_HEIGHT ) ; \ @@ -147,7 +147,7 @@ { \ Pos = MAP_APPFONT ( AUTOPAGE_X - BUTTON_WIDTH - 6 , AUTO_Y + FIXEDTEXT_HEIGHT + 2 ) ; \ Size = MAP_APPFONT ( BUTTON_WIDTH , BUTTON_HEIGHT ) ; \ - HelpId = (AUTO_HID + 1); \ + HelpId = AUTO_HID2; \ TabStop = TRUE ; \ Text[ en-US ] = "Browse"; \ }; @@ -214,7 +214,9 @@ // -------------------------------------------------------------------------------------------------- - +// MBA: the HID set in the FixText can't make any sense; in case this macro was called from within the +// AUTOHELP_JDBCCONTROLGROUP, the FixText would have got the same HID as an EditField from the +// also called AUTO_JDBCDRIVERCLASSGROUP macro; thus I conclude that we can remove the HID from the FixedText #define AUTO_PORTCONTROLGROUP(AUTO_Y, AUTO_HID) \ FixedText FT_AUTOPORTNUMBER \ { \ @@ -235,7 +237,6 @@ \ FixedText FT_AUTOPORTNUMBERDEFAULT \ { \ - HelpId = AUTO_HID + 1 ; \ Pos = MAP_APPFONT (EDIT_X + 22 + UNRELATED_CONTROLS, AUTO_Y +2) ; \ Size = MAP_APPFONT ( WIZARD_PAGE_X - EDIT_X - 22 - UNRELATED_CONTROLS , FIXEDTEXT_HEIGHT ) ; \ Text[ en-US ] = "" ; \ @@ -445,9 +446,9 @@ // -------------------------------------------------------------------------------------------------- -#define AUTO_HELP_BROWSECONTROLGROUP(AUTO_LINECOUNT, AUTO_HID) \ +#define AUTO_HELP_BROWSECONTROLGROUP(AUTO_LINECOUNT, AUTO_HID, AUTO_HID2) \ AUTO_WIZARDHELPTEXT(AUTO_LINECOUNT) \ - AUTO_BROWSECONTROLGROUP(START_X, INIT_Y + AUTO_LINECOUNT * FIXEDTEXT_HEIGHT + 2, WIZARD_PAGE_X, AUTO_HID) + AUTO_BROWSECONTROLGROUP(START_X, INIT_Y + AUTO_LINECOUNT * FIXEDTEXT_HEIGHT + 2, WIZARD_PAGE_X, AUTO_HID, AUTO_HID2) // -------------------------------------------------------------------------------------------------- @@ -455,7 +456,7 @@ // -------------------------------------------------------------------------------------------------- -#define AUTO_JDBCDRIVERCLASSGROUP(AUTO_Y, AUTO_HID) \ +#define AUTO_JDBCDRIVERCLASSGROUP(AUTO_Y, AUTO_HID, AUTO_HID2) \ \ FixedText FT_AUTOJDBCDRIVERCLASS \ { \ @@ -479,7 +480,7 @@ Pos = MAP_APPFONT ( WIZARD_PAGE_X - BUTTON_WIDTH - UNRELATED_CONTROLS , AUTO_Y + FIXEDTEXT_HEIGHT + 2) ; \ Size = MAP_APPFONT ( BUTTON_WIDTH , BUTTON_HEIGHT ) ; \ Size = MAP_APPFONT (50, 14); \ - HelpId = AUTO_HID + 1; \ + HelpId = AUTO_HID2; \ Text[ en-US ] = "Test class" ; \ }; @@ -502,13 +503,13 @@ }; -#define AUTOHELP_JDBCCONTROLGROUP( AUTO_HID ) \ +#define AUTOHELP_JDBCCONTROLGROUP( AUTO_HID, AUTO_HID2, AUTO_HID3, AUTO_HID4, AUTO_HID5 ) \ AUTO_WIZARDHELPTEXT( 6 ) \ AUTO_NAMECONTROLGROUP( INIT_Y + 6 * FIXEDTEXT_HEIGHT + 2, AUTO_HID ) \ - AUTO_HOSTCONTROLGROUP(96, AUTO_HID + 1) \ - AUTO_PORTCONTROLGROUP(113, AUTO_HID + 2 ) \ + AUTO_HOSTCONTROLGROUP(96, AUTO_HID2) \ + AUTO_PORTCONTROLGROUP(113, AUTO_HID3 ) \ AUTO_SOCKETCONTROLGROUP(129) \ - AUTO_JDBCDRIVERCLASSGROUP(146, AUTO_HID + 3) + AUTO_JDBCDRIVERCLASSGROUP(146, AUTO_HID4, AUTO_HID5) // -------------------------------------------------------------------------------------------------- diff --git a/dbaccess/source/ui/dlg/CollectionView.cxx b/dbaccess/source/ui/dlg/CollectionView.cxx index 2b8ab81e8..40d395995 100644 --- a/dbaccess/source/ui/dlg/CollectionView.cxx +++ b/dbaccess/source/ui/dlg/CollectionView.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/dbaccess/source/ui/dlg/CollectionView.src b/dbaccess/source/ui/dlg/CollectionView.src index fb9d9c68d..bdb50859a 100644 --- a/dbaccess/source/ui/dlg/CollectionView.src +++ b/dbaccess/source/ui/dlg/CollectionView.src @@ -62,6 +62,7 @@ ModalDialog DLG_COLLECTION_VIEW }; ImageButton BTN_EXPLORERFILE_NEWFOLDER { + HelpID = "dbaccess:ImageButton:DLG_COLLECTION_VIEW:BTN_EXPLORERFILE_NEWFOLDER"; TabStop = FALSE ; Pos = MAP_APPFONT ( WIN_X - UNRELATED_CONTROLS - RELATED_CONTROLS - 2*IMG_SIZE, UNRELATED_CONTROLS ) ; Size = MAP_APPFONT ( IMG_SIZE , IMG_SIZE ) ; @@ -69,6 +70,7 @@ ModalDialog DLG_COLLECTION_VIEW }; ImageButton BTN_EXPLORERFILE_UP { + HelpID = "dbaccess:ImageButton:DLG_COLLECTION_VIEW:BTN_EXPLORERFILE_UP"; TabStop = TRUE ; Pos = MAP_APPFONT ( WIN_X - UNRELATED_CONTROLS - IMG_SIZE, UNRELATED_CONTROLS ) ; Size = MAP_APPFONT ( IMG_SIZE , IMG_SIZE ) ; @@ -91,6 +93,7 @@ ModalDialog DLG_COLLECTION_VIEW }; Edit ED_EXPLORERFILE_FILENAME { + HelpID = "dbaccess:Edit:DLG_COLLECTION_VIEW:ED_EXPLORERFILE_FILENAME"; Pos = MAP_APPFONT ( RELATED_CONTROLS + UNRELATED_CONTROLS + 50 , WIN_Y - 3*UNRELATED_CONTROLS - BUTTON_HEIGHT - FIXEDLINE_HEIGHT - EDIT_HEIGHT) ; Size = MAP_APPFONT ( WIN_X - RELATED_CONTROLS - 2*UNRELATED_CONTROLS - 50 , EDIT_HEIGHT ) ; Border = TRUE ; @@ -105,6 +108,7 @@ ModalDialog DLG_COLLECTION_VIEW PushButton BTN_EXPLORERFILE_SAVE { + HelpID = "dbaccess:PushButton:DLG_COLLECTION_VIEW:BTN_EXPLORERFILE_SAVE"; Pos = MAP_APPFONT ( WIN_X - 2*UNRELATED_CONTROLS - RELATED_CONTROLS - 150, WIN_Y - UNRELATED_CONTROLS - BUTTON_HEIGHT ) ; Size = MAP_APPFONT ( 50 , BUTTON_HEIGHT ) ; DefButton = TRUE ; diff --git a/dbaccess/source/ui/dlg/ConnectionHelper.cxx b/dbaccess/source/ui/dlg/ConnectionHelper.cxx index b1d0971a8..81dd14c27 100644 --- a/dbaccess/source/ui/dlg/ConnectionHelper.cxx +++ b/dbaccess/source/ui/dlg/ConnectionHelper.cxx @@ -69,7 +69,7 @@ #include <tools/urlobj.hxx> #include <tools/diagnose_ex.h> #include <sfx2/docfilt.hxx> -#if !defined(WINDOWS_VISTA_PSDK) && (defined(WIN) || defined(WNT)) +#if !defined(WINDOWS_VISTA_PSDK) && defined(WNT) #define _ADO_DATALINK_BROWSE_ #endif diff --git a/dbaccess/source/ui/dlg/ConnectionPage.cxx b/dbaccess/source/ui/dlg/ConnectionPage.cxx index 7293cce9b..b60c13f79 100644 --- a/dbaccess/source/ui/dlg/ConnectionPage.cxx +++ b/dbaccess/source/ui/dlg/ConnectionPage.cxx @@ -72,7 +72,7 @@ #include <tools/urlobj.hxx> #include <sfx2/docfilt.hxx> #include "dsnItem.hxx" -#if defined(WIN) || defined(WNT) +#if defined(WNT) #define _ADO_DATALINK_BROWSE_ #endif @@ -135,6 +135,8 @@ namespace dbaui m_aTestJavaDriver.SetClickHdl(LINK(this,OConnectionTabPage,OnTestJavaClickHdl)); FreeResource(); + + LayoutHelper::fitSizeRightAligned( m_aTestConnection ); } // ----------------------------------------------------------------------- diff --git a/dbaccess/source/ui/dlg/ConnectionPage.src b/dbaccess/source/ui/dlg/ConnectionPage.src index 61515a258..63c400b0a 100644 --- a/dbaccess/source/ui/dlg/ConnectionPage.src +++ b/dbaccess/source/ui/dlg/ConnectionPage.src @@ -42,6 +42,7 @@ //......................................................................... TabPage PAGE_CONNECTION { + HelpID = "dbaccess:TabPage:PAGE_CONNECTION"; SVLook = TRUE ; Pos = MAP_APPFONT ( 0 , 0 ) ; Size = MAP_APPFONT ( PAGE_X , PAGE_Y ) ; @@ -54,7 +55,7 @@ TabPage PAGE_CONNECTION Text[ en-US ] = "General"; }; - AUTO_BROWSECONTROLGROUP( 6, UNRELATED_CONTROLS + FIXEDTEXT_HEIGHT + RELATED_CONTROLS, PAGE_X, HID_DSADMIN_URL_GENERAL) + AUTO_BROWSECONTROLGROUP( 6, UNRELATED_CONTROLS + FIXEDTEXT_HEIGHT + RELATED_CONTROLS, PAGE_X, HID_DSADMIN_URL_GENERAL, HID_DSADMIN_BROWSECONN) FixedText FT_NO_ADDITIONAL_SETTINGS { @@ -88,6 +89,7 @@ TabPage PAGE_CONNECTION Edit ET_USERNAME { + HelpID = "dbaccess:Edit:PAGE_CONNECTION:ET_USERNAME"; Border = TRUE ; Pos = MAP_APPFONT ( 90 , 3*UNRELATED_CONTROLS + 4*FIXEDTEXT_HEIGHT + 2*RELATED_CONTROLS -1 ) ; Size = MAP_APPFONT ( 105 , EDIT_HEIGHT ) ; @@ -96,6 +98,7 @@ TabPage PAGE_CONNECTION CheckBox CB_PASSWORD_REQUIRED { + HelpID = "dbaccess:CheckBox:PAGE_CONNECTION:CB_PASSWORD_REQUIRED"; Pos = MAP_APPFONT ( 90 , 4*UNRELATED_CONTROLS + 5*FIXEDTEXT_HEIGHT + 2*RELATED_CONTROLS ) ; Size = MAP_APPFONT ( 105 , CHECKBOX_HEIGHT ) ; Text [ en-US ] = "Password required"; @@ -128,6 +131,7 @@ TabPage PAGE_CONNECTION PushButton PB_TESTDRIVERCLASS { + HelpID = "dbaccess:PushButton:PAGE_CONNECTION:PB_TESTDRIVERCLASS"; TabStop = TRUE ; Pos = MAP_APPFONT ( PAGE_X - BUTTON_WIDTH - UNRELATED_CONTROLS , 5*UNRELATED_CONTROLS + 6*FIXEDTEXT_HEIGHT + 3*RELATED_CONTROLS + CHECKBOX_HEIGHT -2 ) ; Size = MAP_APPFONT ( BUTTON_WIDTH , BUTTON_HEIGHT ) ; @@ -136,6 +140,7 @@ TabPage PAGE_CONNECTION PushButton PB_TESTCONNECTION { + HelpID = "dbaccess:PushButton:PAGE_CONNECTION:PB_TESTCONNECTION"; Pos = MAP_APPFONT ( PAGE_X - 75 - UNRELATED_CONTROLS, PAGE_Y - BUTTON_HEIGHT - UNRELATED_CONTROLS) ; Size = MAP_APPFONT ( 75 , BUTTON_HEIGHT ) ; TabStop = TRUE ; diff --git a/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx b/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx index 2bc095442..60723e872 100644 --- a/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx +++ b/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx @@ -791,6 +791,8 @@ DBG_NAME(OAuthentificationPageSetup) m_aCBPasswordRequired.SetClickHdl(getControlModifiedLink()); m_aPBTestConnection.SetClickHdl(LINK(this,OGenericAdministrationPage,OnTestConnectionClickHdl)); FreeResource(); + + LayoutHelper::fitSizeRightAligned( m_aPBTestConnection ); } diff --git a/dbaccess/source/ui/dlg/DbAdminImpl.cxx b/dbaccess/source/ui/dlg/DbAdminImpl.cxx index 23d805355..23d805355 100644..100755 --- a/dbaccess/source/ui/dlg/DbAdminImpl.cxx +++ b/dbaccess/source/ui/dlg/DbAdminImpl.cxx diff --git a/dbaccess/source/ui/dlg/ExtensionNotPresent.hrc b/dbaccess/source/ui/dlg/ExtensionNotPresent.hrc deleted file mode 100644 index 17b4d148f..000000000 --- a/dbaccess/source/ui/dlg/ExtensionNotPresent.hrc +++ /dev/null @@ -1,47 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#ifndef DBU_EXTENSIONNOTPRESENT_HRC -#define DBU_EXTENSIONNOTPRESENT_HRC - -#define FT_TEXT (1) -#define FI_WARNING (2) -#define PB_DOWNLOAD (10) -#define PB_CANCEL (11) - -#define FIXEDTEXT_HEIGHT 8 -#define CELL_PADDING 8 -#define BUTTON_HEIGHT 14 -#define BUTTON_WIDTH 55 -#define BROWSER_HEIGHT 75 -#define LEFT_PADDING 32 /* size for the icon */ -#define RIGHT_PADDING 16 -#define DLG_WIDTH ( 250 ) -#define ACTION_LINE_START (CELL_PADDING + ( 3 * FIXEDTEXT_HEIGHT ) + 2 * CELL_PADDING + 1 ) -#define DLG_HEIGHT (ACTION_LINE_START + BUTTON_HEIGHT + CELL_PADDING) - - -#endif /* DBU_EXTENSIONNOTPRESENT_HRC */ diff --git a/dbaccess/source/ui/dlg/RelationDlg.src b/dbaccess/source/ui/dlg/RelationDlg.src index 908cbab62..90602e37c 100644 --- a/dbaccess/source/ui/dlg/RelationDlg.src +++ b/dbaccess/source/ui/dlg/RelationDlg.src @@ -35,6 +35,7 @@ ModalDialog DLG_REL_PROPERTIES { + HelpID = "dbaccess:ModalDialog:DLG_REL_PROPERTIES"; OutputSize = TRUE ; SVLook = TRUE ; Size = MAP_APPFONT ( 186 , 205 ) ; diff --git a/dbaccess/source/ui/dlg/TablesSingleDlg.cxx b/dbaccess/source/ui/dlg/TablesSingleDlg.cxx index ebdc2519b..4726c9de2 100644 --- a/dbaccess/source/ui/dlg/TablesSingleDlg.cxx +++ b/dbaccess/source/ui/dlg/TablesSingleDlg.cxx @@ -31,13 +31,14 @@ #include "TablesSingleDlg.hxx" #include "DbAdminImpl.hxx" -#include "dbaccess_helpid.hrc" #include "tablespage.hxx" #include <vcl/msgbox.hxx> #include "dsitems.hxx" #include "propertysetitem.hxx" +#include "dbu_dlg.hrc" + //......................................................................... namespace dbaui { @@ -56,7 +57,7 @@ OTableSubscriptionDialog::OTableSubscriptionDialog(Window* pParent ,SfxItemSet* _pItems ,const Reference< XMultiServiceFactory >& _rxORB ,const ::com::sun::star::uno::Any& _aDataSourceName) - :SfxSingleTabDialog(pParent,UID_DLG_TABLE_FILTER,_pItems) + :SfxSingleTabDialog(pParent,DLG_TABLE_FILTER,_pItems) ,m_pImpl( new ODbDataSourceAdministrationHelper( _rxORB, pParent, this ) ) ,m_bStopExecution(sal_False) ,m_pOutSet(_pItems) diff --git a/dbaccess/source/ui/dlg/UserAdmin.src b/dbaccess/source/ui/dlg/UserAdmin.src index a92a894ee..cd7364e34 100644 --- a/dbaccess/source/ui/dlg/UserAdmin.src +++ b/dbaccess/source/ui/dlg/UserAdmin.src @@ -157,6 +157,7 @@ ModalDialog DLG_PASSWORD }; Edit ED_OLDPASSWORD { + HelpID = "dbaccess:Edit:DLG_PASSWORD:ED_OLDPASSWORD"; Border = TRUE ; Pos = MAP_APPFONT ( 12 + FT_SIZE_X , 16 ) ; Size = MAP_APPFONT ( EDIT_SIZE_X , 12 ) ; @@ -171,6 +172,7 @@ ModalDialog DLG_PASSWORD }; Edit ED_PASSWORD { + HelpID = "dbaccess:Edit:DLG_PASSWORD:ED_PASSWORD"; Border = TRUE ; Pos = MAP_APPFONT ( 12 + FT_SIZE_X , 34 ) ; Size = MAP_APPFONT ( EDIT_SIZE_X , 12 ) ; @@ -184,6 +186,7 @@ ModalDialog DLG_PASSWORD }; Edit ED_PASSWORD_REPEAT { + HelpID = "dbaccess:Edit:DLG_PASSWORD:ED_PASSWORD_REPEAT"; Border = TRUE ; Pos = MAP_APPFONT ( 12 + FT_SIZE_X , 51 ) ; Size = MAP_APPFONT ( EDIT_SIZE_X , 12 ) ; diff --git a/dbaccess/source/ui/dlg/UserAdminDlg.src b/dbaccess/source/ui/dlg/UserAdminDlg.src index 5509820d1..5b07b4309 100644 --- a/dbaccess/source/ui/dlg/UserAdminDlg.src +++ b/dbaccess/source/ui/dlg/UserAdminDlg.src @@ -48,7 +48,6 @@ TabDialog DLG_DATABASE_USERADMIN { OutputSize = TRUE ; HelpId = HID_DSADMIN_TABCONTROL; - SingleLine=TRUE; }; String STR_PAGETITLE_USERADMIN { diff --git a/dbaccess/source/ui/dlg/admincontrols.cxx b/dbaccess/source/ui/dlg/admincontrols.cxx index 5213bda4c..5213bda4c 100644..100755 --- a/dbaccess/source/ui/dlg/admincontrols.cxx +++ b/dbaccess/source/ui/dlg/admincontrols.cxx diff --git a/dbaccess/source/ui/dlg/adminpages.cxx b/dbaccess/source/ui/dlg/adminpages.cxx index 83484c92d..60b1f40d9 100644 --- a/dbaccess/source/ui/dlg/adminpages.cxx +++ b/dbaccess/source/ui/dlg/adminpages.cxx @@ -314,7 +314,6 @@ namespace dbaui SetControlFontWeight(m_pFT_HeaderText); } - //========================================================================= //= LayoutHelper //========================================================================= @@ -332,6 +331,24 @@ namespace dbaui _rControl.SetPosPixel( aControlPos ); } + //------------------------------------------------------------------------- + void LayoutHelper::fitSizeRightAligned( PushButton& io_button ) + { + const Point aOldPos = io_button.GetPosPixel(); + const Size aOldSize = io_button.GetSizePixel(); + const Size aMinSize( io_button.CalcMinimumSize() ); + if ( aMinSize.Width() > aOldSize.Width() ) + { + io_button.SetPosSizePixel( + aOldPos.X() + aOldSize.Width() - aMinSize.Width(), + 0, + aMinSize.Width(), + 0, + WINDOW_POSSIZE_X | WINDOW_POSSIZE_WIDTH + ); + } + } + //......................................................................... } // namespace dbaui //......................................................................... diff --git a/dbaccess/source/ui/dlg/adminpages.hxx b/dbaccess/source/ui/dlg/adminpages.hxx index 32cfc4d94..7e3f45126 100644 --- a/dbaccess/source/ui/dlg/adminpages.hxx +++ b/dbaccess/source/ui/dlg/adminpages.hxx @@ -277,6 +277,10 @@ namespace dbaui const ControlRelation _eRelation, const long _nIndentAppFont ); + /** fits the button size to be large enough to contain the buttons text + */ + static void fitSizeRightAligned( PushButton& io_button ); + // why is CalcMinimumSize not a virtual method of ::Window? }; //......................................................................... diff --git a/dbaccess/source/ui/dlg/adodatalinks.cxx b/dbaccess/source/ui/dlg/adodatalinks.cxx index 21f806db6..5595d4110 100644 --- a/dbaccess/source/ui/dlg/adodatalinks.cxx +++ b/dbaccess/source/ui/dlg/adodatalinks.cxx @@ -30,7 +30,7 @@ #include "precompiled_dbaccess.hxx" -#if defined(WIN) || defined(WNT) +#if defined(WNT) #if defined _MSC_VER #pragma warning(push, 1) #pragma warning(disable: 4917) diff --git a/dbaccess/source/ui/dlg/adtabdlg.cxx b/dbaccess/source/ui/dlg/adtabdlg.cxx index 08616e60e..fd0b4b750 100644 --- a/dbaccess/source/ui/dlg/adtabdlg.cxx +++ b/dbaccess/source/ui/dlg/adtabdlg.cxx @@ -375,7 +375,7 @@ OAddTableDlg::OAddTableDlg( Window* pParent, IAddTableDialogContext& _rContext ) ////////////////////////////////////////////////////////////////////// m_aTableList.EnableInplaceEditing( FALSE ); - m_aTableList.SetWindowBits(WB_BORDER | WB_HASLINES |WB_HASBUTTONS | WB_HASBUTTONSATROOT | WB_HASLINESATROOT | WB_SORT | WB_HSCROLL ); + m_aTableList.SetStyle(m_aTableList.GetStyle() | WB_BORDER | WB_HASLINES |WB_HASBUTTONS | WB_HASBUTTONSATROOT | WB_HASLINESATROOT | WB_SORT | WB_HSCROLL ); m_aTableList.EnableCheckButton( NULL ); // do not show any buttons m_aTableList.SetSelectionMode( SINGLE_SELECTION ); m_aTableList.notifyHiContrastChanged(); diff --git a/dbaccess/source/ui/dlg/adtabdlg.src b/dbaccess/source/ui/dlg/adtabdlg.src index ecff324d7..deb914dd8 100644 --- a/dbaccess/source/ui/dlg/adtabdlg.src +++ b/dbaccess/source/ui/dlg/adtabdlg.src @@ -38,7 +38,7 @@ ModelessDialog DLG_JOIN_TABADD { OutputSize = TRUE ; SVLook = TRUE ; - HelpID = DLG_JOIN_TABADD ; + HelpID = HID_DLG_JOIN_TABADD ; Size = MAP_APPFONT ( 178 , 147 ) ; Moveable = TRUE ; Closeable = TRUE ; @@ -46,6 +46,7 @@ ModelessDialog DLG_JOIN_TABADD RadioButton RB_CASE_TABLES { + HelpID = "dbaccess:RadioButton:DLG_JOIN_TABADD:RB_CASE_TABLES"; Pos = MAP_APPFONT( 6, 6 ); Size = MAP_APPFONT( 50, 8 ); Text [ en-US ] = "Tables"; @@ -53,6 +54,7 @@ ModelessDialog DLG_JOIN_TABADD RadioButton RB_CASE_QUERIES { + HelpID = "dbaccess:RadioButton:DLG_JOIN_TABADD:RB_CASE_QUERIES"; Pos = MAP_APPFONT( 62, 6 ); Size = MAP_APPFONT( 50, 8 ); Text [ en-US ] = "Queries"; @@ -70,6 +72,7 @@ ModelessDialog DLG_JOIN_TABADD PushButton PB_ADDTABLE { + HelpID = "dbaccess:PushButton:DLG_JOIN_TABADD:PB_ADDTABLE"; Pos = MAP_APPFONT ( 123 , 6 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text [ en-US ] = "~Add" ; diff --git a/dbaccess/source/ui/dlg/advancedsettings.src b/dbaccess/source/ui/dlg/advancedsettings.src index a4eb47133..50162f1cc 100644 --- a/dbaccess/source/ui/dlg/advancedsettings.src +++ b/dbaccess/source/ui/dlg/advancedsettings.src @@ -253,6 +253,7 @@ TabPage PAGE_GENERATED_VALUES { + HelpID = "dbaccess:TabPage:PAGE_GENERATED_VALUES"; SVLook = TRUE ; Pos = MAP_APPFONT ( 0 , 0 ) ; Size = MAP_APPFONT ( ADVANCED_PAGE_X , ADVANCED_PAGE_Y ) ; @@ -311,6 +312,7 @@ TabPage PAGE_GENERATED_VALUES TabPage PAGE_ADVANCED_SETTINGS_SPECIAL { + HelpID = "dbaccess:TabPage:PAGE_ADVANCED_SETTINGS_SPECIAL"; SVLook = TRUE ; Pos = MAP_APPFONT ( 0 , 0 ) ; Size = MAP_APPFONT ( ADVANCED_PAGE_X , ADVANCED_PAGE_Y ) ; @@ -349,7 +351,6 @@ TabDialog DLG_DATABASE_ADVANCED { OutputSize = TRUE ; HelpId = HID_DSADMIN_TABCONTROL; - SingleLine=TRUE; }; String STR_GENERATED_VALUE diff --git a/dbaccess/source/ui/dlg/dbadmin.src b/dbaccess/source/ui/dlg/dbadmin.src index 5a956eb27..0cadd0578 100644 --- a/dbaccess/source/ui/dlg/dbadmin.src +++ b/dbaccess/source/ui/dlg/dbadmin.src @@ -112,7 +112,6 @@ TabDialog DLG_DATABASE_ADMINISTRATION { OutputSize = TRUE ; HelpId = HID_DSADMIN_TABCONTROL; - SingleLine=TRUE; }; //......................................................................... @@ -146,7 +145,6 @@ ModalDialog DLG_DATABASE_TYPE_CHANGE { OutputSize = TRUE ; HelpId = HID_DSADMIN_TABCONTROL; - SingleLine=TRUE; }; Text [ en-US ] = "Database properties" ; }; @@ -195,6 +193,7 @@ TabPage PAGE_GENERAL RadioButton RB_OPENEXISTINGDOC { + HelpID = "dbaccess:RadioButton:PAGE_GENERAL:RB_OPENEXISTINGDOC"; Pos = MAP_APPFONT (START_X + 6 , 97 ); Size = MAP_APPFONT ( 206 , 8 ) ; Text [ en-US ] = "Open an existing database ~file" ; @@ -209,6 +208,7 @@ TabPage PAGE_GENERAL ListBox LB_DOCUMENTLIST { + HelpID = "dbaccess:ListBox:PAGE_GENERAL:LB_DOCUMENTLIST"; Pos = MAP_APPFONT( START_X + INDENTED_X + INDENT_BELOW_RADIO, 121 ); Size = MAP_APPFONT( 120, 14 ); DropDown = TRUE; @@ -217,6 +217,7 @@ TabPage PAGE_GENERAL PushButton PB_OPENDOCUMENT { + HelpID = "dbaccess:PushButton:PAGE_GENERAL:PB_OPENDOCUMENT"; Pos = MAP_APPFONT( START_X + INDENTED_X + INDENT_BELOW_RADIO, 139 ); Size = MAP_APPFONT( 50, 16 ); OutputSize = TRUE; @@ -418,6 +419,7 @@ TabPage PAGE_ADABAS }; Edit ET_HOSTNAME { + HelpID = "dbaccess:Edit:PAGE_ADABAS:ET_HOSTNAME"; TabStop = TRUE ; Border = TRUE ; @@ -433,6 +435,7 @@ TabPage PAGE_ADABAS }; NumericField NF_CACHE_SIZE { + HelpID = "dbaccess:NumericField:PAGE_ADABAS:NF_CACHE_SIZE"; Pos = MAP_APPFONT ( EDIT_X , 2*UNRELATED_CONTROLS + RELATED_CONTROLS + 2*FIXEDTEXT_HEIGHT -1 ) ; Size = MAP_APPFONT ( 40 , EDIT_HEIGHT ) ; Border = TRUE ; @@ -450,6 +453,7 @@ TabPage PAGE_ADABAS }; NumericField NF_DATA_INCREMENT { + HelpID = "dbaccess:NumericField:PAGE_ADABAS:NF_DATA_INCREMENT"; Pos = MAP_APPFONT ( EDIT_X , 3*UNRELATED_CONTROLS + RELATED_CONTROLS + 3*FIXEDTEXT_HEIGHT -1 ) ; Size = MAP_APPFONT ( 40 , EDIT_HEIGHT ) ; Border = TRUE ; @@ -472,6 +476,7 @@ TabPage PAGE_ADABAS }; Edit ET_CTRLUSERNAME { + HelpID = "dbaccess:Edit:PAGE_ADABAS:ET_CTRLUSERNAME"; Border = TRUE ; Pos = MAP_APPFONT ( EDIT_X , 4*UNRELATED_CONTROLS + 2*RELATED_CONTROLS + 5*FIXEDTEXT_HEIGHT-1 ) ; Size = MAP_APPFONT ( 105 , EDIT_HEIGHT ) ; @@ -485,6 +490,7 @@ TabPage PAGE_ADABAS }; Edit ET_CTRLPASSWORD { + HelpID = "dbaccess:Edit:PAGE_ADABAS:ET_CTRLPASSWORD"; Border = TRUE ; Pos = MAP_APPFONT ( EDIT_X , 5*UNRELATED_CONTROLS + 2*RELATED_CONTROLS + 6*FIXEDTEXT_HEIGHT-1 ) ; Size = MAP_APPFONT ( 105 , EDIT_HEIGHT) ; @@ -494,6 +500,7 @@ TabPage PAGE_ADABAS CheckBox CB_SHUTDB { + HelpID = "dbaccess:CheckBox:PAGE_ADABAS:CB_SHUTDB"; Pos = MAP_APPFONT ( 6 , 6*UNRELATED_CONTROLS + 2*RELATED_CONTROLS + 7*FIXEDTEXT_HEIGHT ) ; Size = MAP_APPFONT ( 248 , CHECKBOX_HEIGHT ) ; Text[ en-US ] = "~Shut down service when closing %PRODUCTNAME"; @@ -501,6 +508,7 @@ TabPage PAGE_ADABAS PushButton PB_STAT { + HelpID = "dbaccess:PushButton:PAGE_ADABAS:PB_STAT"; Pos = MAP_APPFONT ( PAGE_X - BUTTON_WIDTH - UNRELATED_CONTROLS, PAGE_Y - BUTTON_HEIGHT - UNRELATED_CONTROLS ) ; Size = MAP_APPFONT ( BUTTON_WIDTH , BUTTON_HEIGHT ) ; Text[ en-US ] = "E~xtended..."; @@ -516,6 +524,7 @@ TabPage PAGE_ADABAS TabPage PAGE_MYSQL_ODBC { + HelpID = "dbaccess:TabPage:PAGE_MYSQL_ODBC"; SVLook = TRUE ; Pos = MAP_APPFONT ( 0 , 0 ) ; Size = MAP_APPFONT ( PAGE_X , PAGE_Y ) ; @@ -526,6 +535,7 @@ TabPage PAGE_MYSQL_ODBC TabPage PAGE_MYSQL_JDBC { + HelpID = "dbaccess:TabPage:PAGE_MYSQL_JDBC"; SVLook = TRUE ; Pos = MAP_APPFONT ( 0 , 0 ) ; Size = MAP_APPFONT ( PAGE_X , PAGE_Y ) ; @@ -544,6 +554,7 @@ TabPage PAGE_MYSQL_JDBC }; Edit ET_JDBCDRIVERCLASS { + HelpID = "dbaccess:Edit:PAGE_MYSQL_JDBC:ET_JDBCDRIVERCLASS"; Pos = MAP_APPFONT ( EDIT_X, 4*UNRELATED_CONTROLS + RELATED_CONTROLS + 3*FIXEDTEXT_HEIGHT -1 + EDIT_HEIGHT) ; Size = MAP_APPFONT ( 97 , EDIT_HEIGHT ) ; @@ -552,6 +563,7 @@ TabPage PAGE_MYSQL_JDBC }; PushButton PB_TESTDRIVERCLASS { + HelpID = "dbaccess:PushButton:PAGE_MYSQL_JDBC:PB_TESTDRIVERCLASS"; TabStop = TRUE ; Pos = MAP_APPFONT ( PAGE_X - BUTTON_WIDTH - UNRELATED_CONTROLS , 4*UNRELATED_CONTROLS + RELATED_CONTROLS + 3*FIXEDTEXT_HEIGHT -2 + EDIT_HEIGHT) ; Size = MAP_APPFONT ( BUTTON_WIDTH , BUTTON_HEIGHT ) ; @@ -563,6 +575,7 @@ TabPage PAGE_MYSQL_JDBC TabPage PAGE_MYSQL_NATIVE { + HelpID = "dbaccess:TabPage:PAGE_MYSQL_NATIVE"; SVLook = TRUE ; Pos = MAP_APPFONT ( 0 , 0 ) ; Size = MAP_APPFONT ( PAGE_X , PAGE_Y ) ; @@ -584,6 +597,7 @@ TabPage PAGE_MYSQL_NATIVE }; Edit ET_USERNAME { + HelpID = "dbaccess:Edit:PAGE_MYSQL_NATIVE:ET_USERNAME"; Border = TRUE ; Pos = MAP_APPFONT ( EDIT_X, 4*UNRELATED_CONTROLS + 4*RELATED_CONTROLS + 4*FIXEDTEXT_HEIGHT + 3*EDIT_HEIGHT - 1 ) ; Size = MAP_APPFONT ( 105 , EDIT_HEIGHT ) ; @@ -591,6 +605,7 @@ TabPage PAGE_MYSQL_NATIVE }; CheckBox CB_PASSWORD_REQUIRED { + HelpID = "dbaccess:CheckBox:PAGE_MYSQL_NATIVE:CB_PASSWORD_REQUIRED"; Pos = MAP_APPFONT ( EDIT_X, 4*UNRELATED_CONTROLS + 5*RELATED_CONTROLS + 4*FIXEDTEXT_HEIGHT + 4*EDIT_HEIGHT ) ; Size = MAP_APPFONT ( 105, CHECKBOX_HEIGHT ) ; Text [ en-US ] = "Password required"; @@ -601,6 +616,7 @@ TabPage PAGE_MYSQL_NATIVE TabPage PAGE_ORACLE_JDBC { + HelpID = "dbaccess:TabPage:PAGE_ORACLE_JDBC"; SVLook = TRUE ; Pos = MAP_APPFONT ( 0 , 0 ) ; Size = MAP_APPFONT ( PAGE_X , PAGE_Y ) ; @@ -620,6 +636,7 @@ TabPage PAGE_ORACLE_JDBC }; Edit ET_JDBCDRIVERCLASS { + HelpID = "dbaccess:Edit:PAGE_ORACLE_JDBC:ET_JDBCDRIVERCLASS"; Pos = MAP_APPFONT ( EDIT_X, 4*UNRELATED_CONTROLS + RELATED_CONTROLS + 3*FIXEDTEXT_HEIGHT + EDIT_HEIGHT + ( FIXEDTEXT_HEIGHT - EDIT_HEIGHT ) / 2 ) ; Size = MAP_APPFONT ( 97 , EDIT_HEIGHT ) ; @@ -628,6 +645,7 @@ TabPage PAGE_ORACLE_JDBC }; PushButton PB_TESTDRIVERCLASS { + HelpID = "dbaccess:PushButton:PAGE_ORACLE_JDBC:PB_TESTDRIVERCLASS"; TabStop = TRUE ; Pos = MAP_APPFONT ( PAGE_X - BUTTON_WIDTH - UNRELATED_CONTROLS, 4*UNRELATED_CONTROLS + RELATED_CONTROLS + 3*FIXEDTEXT_HEIGHT + EDIT_HEIGHT + ( FIXEDTEXT_HEIGHT - BUTTON_HEIGHT ) / 2 ) ; @@ -743,6 +761,7 @@ TabPage PAGE_USERDRIVER }; Edit ET_HOSTNAME { + HelpID = "dbaccess:Edit:PAGE_USERDRIVER:ET_HOSTNAME"; TabStop = TRUE ; Border = TRUE ; Pos = MAP_APPFONT ( EDIT_X , UNRELATED_CONTROLS -1 ) ; @@ -758,6 +777,7 @@ TabPage PAGE_USERDRIVER NumericField NF_PORTNUMBER { + HelpID = "dbaccess:NumericField:PAGE_USERDRIVER:NF_PORTNUMBER"; TabStop = TRUE ; Border = TRUE ; NoThousandSep = TRUE; @@ -774,6 +794,7 @@ TabPage PAGE_USERDRIVER }; Edit ET_OPTIONS { + HelpID = "dbaccess:Edit:PAGE_USERDRIVER:ET_OPTIONS"; Border = TRUE ; TabStop = TRUE ; }; diff --git a/dbaccess/source/ui/dlg/dbadmin2.src b/dbaccess/source/ui/dlg/dbadmin2.src index 5d6ce5494..c7afa2119 100644 --- a/dbaccess/source/ui/dlg/dbadmin2.src +++ b/dbaccess/source/ui/dlg/dbadmin2.src @@ -52,11 +52,6 @@ String STR_ENTER_CONNECTION_PASSWORD Text [ en-US ] = "A password is needed to connect to the data source \"$name$\"."; }; -String STR_QUERY_DROP_ALL -{ - Text[ en-US ] = "Do you want to delete all selected items?"; -}; - String STR_ASK_FOR_DIRECTORY_CREATION { Text [ en-US ] = "The directory\n\n$path$\n\ndoes not exist. Should it be created?"; @@ -67,45 +62,10 @@ String STR_COULD_NOT_CREATE_DIRECTORY Text [ en-US ] = "The directory $name$ could not be created."; }; -String STR_ADDRESSBOOK_SYSTEM -{ - Text[ en-US ] = "Windows address book"; -}; - -String STR_ADDRESSBOOK_OUTLOOK -{ - Text[ en-US ] = "MS Outlook"; -}; - -String STR_ADDRESSBOOK_MOZILLA -{ - Text[ en-US ] = "Mozilla address book"; -}; - -String STR_ADDRESSBOOK_THUNDERBIRD -{ - Text[ en-US ] = "Thunderbird address book"; -}; -String STR_ADDRESSBOOK_EVOLUTION -{ - Text[ en-US ] = "Evolution address book"; -}; -String STR_ADDRESSBOOK_LDAP -{ - Text[ en-US ] = "LDAP address book"; -}; -String STR_HINT_READONLY_CONNECTION -{ - Text [ en-US ] = "(Connection is read-only)"; -}; -String STR_HINT_CONNECTION_NOT_CAPABLE -{ - Text [ en-US ] = "(Not supported by this connection)"; -}; #define EDIT_SIZE_X 50 #define FT_SIZE_X 90 @@ -114,6 +74,7 @@ String STR_HINT_CONNECTION_NOT_CAPABLE ModalDialog DLG_DOMAINPASSWORD { + HelpID = "dbaccess:ModalDialog:DLG_DOMAINPASSWORD"; Border = TRUE ; Moveable = TRUE ; OutputSize = TRUE ; @@ -130,6 +91,7 @@ ModalDialog DLG_DOMAINPASSWORD Edit ET_PASSWORD { + HelpID = "dbaccess:Edit:DLG_DOMAINPASSWORD:ET_PASSWORD"; Border = TRUE ; Pos = MAP_APPFONT ( 12 + FT_SIZE_X , 16 ) ; Size = MAP_APPFONT ( EDIT_SIZE_X , 12 ) ; diff --git a/dbaccess/source/ui/dlg/dbadminsetup.src b/dbaccess/source/ui/dlg/dbadminsetup.src index f1351216d..f8f8dac62 100644 --- a/dbaccess/source/ui/dlg/dbadminsetup.src +++ b/dbaccess/source/ui/dlg/dbadminsetup.src @@ -56,7 +56,6 @@ ModalDialog DLG_DATABASE_WIZARD { OutputSize = TRUE ; HelpId = HID_DSADMIN_TABCONTROL; - SingleLine=TRUE; }; String STR_DBWIZARDTITLE @@ -150,6 +149,7 @@ String STR_DATABASEDEFAULTNAME TabPage PAGE_DBWIZARD_MYSQL_INTRO { + HelpID = "dbaccess:TabPage:PAGE_DBWIZARD_MYSQL_INTRO"; SVLook = TRUE ; Pos = MAP_APPFONT ( 0 , 0 ) ; Size = MAP_APPFONT ( WIZARD_PAGE_X , WIZARD_PAGE_Y ) ; @@ -195,6 +195,7 @@ TabPage PAGE_DBWIZARD_MYSQL_INTRO }; RadioButton RB_CONNECTVIANATIVE { + HelpID = "dbaccess:RadioButton:PAGE_DBWIZARD_MYSQL_INTRO:RB_CONNECTVIANATIVE"; Pos = MAP_APPFONT (START_X + 6 , 115 ) ; Size = MAP_APPFONT ( 205 , 9 ) ; Text[ en-US ] = "Connect directly" ; @@ -206,6 +207,7 @@ TabPage PAGE_DBWIZARD_MYSQL_INTRO TabPage PAGE_DBWIZARD_AUTHENTIFICATION { + HelpID = "dbaccess:TabPage:PAGE_DBWIZARD_AUTHENTIFICATION"; SVLook = TRUE ; Pos = MAP_APPFONT ( 0 , 0 ) ; Size = MAP_APPFONT ( WIZARD_PAGE_X , WIZARD_PAGE_Y ) ; @@ -262,6 +264,7 @@ TabPage PAGE_DBWIZARD_AUTHENTIFICATION TabPage PAGE_DBWIZARD_FINAL { + HelpID = "dbaccess:TabPage:PAGE_DBWIZARD_FINAL"; SVLook = TRUE ; Pos = MAP_APPFONT ( 0 , 0 ) ; Size = MAP_APPFONT ( WIZARD_PAGE_X , WIZARD_PAGE_Y ) ; @@ -335,6 +338,7 @@ TabPage PAGE_DBWIZARD_FINAL TabPage PAGE_DBWIZARD_MYSQL_JDBC { + HelpID = "dbaccess:TabPage:PAGE_DBWIZARD_MYSQL_JDBC"; SVLook = TRUE ; Pos = MAP_APPFONT ( 0 , 0 ) ; Size = MAP_APPFONT ( WIZARD_PAGE_X , WIZARD_PAGE_Y ) ; @@ -361,11 +365,12 @@ TabPage PAGE_DBWIZARD_MYSQL_JDBC Text[ en-US ] = "Default: 3306"; }; - AUTOHELP_JDBCCONTROLGROUP(HID_PAGE_DBWIZARD_JDBC_ET_MYSQLDBNAME) + AUTOHELP_JDBCCONTROLGROUP(HID_PAGE_DBWIZARD_JDBC_ET_MYSQLDBNAME,HID_PAGE_DBWIZARD_JDBC_ET_MYSQLHOSTSERVER,HID_PAGE_DBWIZARD_JDBC_ET_MYSQLPORT,HID_PAGE_DBWIZARD_JDBC_ET_MYSQLCLASS,HID_PAGE_DBWIZARD_JDBC_PB_TESTMYSQLCLASS) }; TabPage PAGE_DBWIZARD_MYSQL_NATIVE { + HelpID = "dbaccess:TabPage:PAGE_DBWIZARD_MYSQL_NATIVE"; SVLook = TRUE ; Pos = MAP_APPFONT ( 0, 0 ) ; Size = MAP_APPFONT ( WIZARD_PAGE_X , WIZARD_PAGE_Y ) ; @@ -391,6 +396,7 @@ TabPage PAGE_DBWIZARD_MYSQL_NATIVE TabPage PAGE_DBWIZARD_DBASE { + HelpID = "dbaccess:TabPage:PAGE_DBWIZARD_DBASE"; SVLook = TRUE ; Pos = MAP_APPFONT ( 0 , 0 ) ; Size = MAP_APPFONT ( WIZARD_PAGE_X , WIZARD_PAGE_Y ) ; @@ -406,11 +412,12 @@ TabPage PAGE_DBWIZARD_DBASE Text[ en-US ] = "Select the folder where the dBASE files are stored." ; }; - AUTO_HELP_BROWSECONTROLGROUP( 3, HID_PAGE_DBWIZARD_DBASE_ET_DBASELOCATION) + AUTO_HELP_BROWSECONTROLGROUP( 3, HID_PAGE_DBWIZARD_DBASE_ET_DBASELOCATION,HID_PAGE_DBWIZARD_DBASE_PB_DBASELOCATION) }; TabPage PAGE_DBWIZARD_TEXT { + HelpID = "dbaccess:TabPage:PAGE_DBWIZARD_TEXT"; String STR_TEXT_HEADERTEXT { Text[ en-US ] = "Set up a connection to text files" ; @@ -425,12 +432,13 @@ TabPage PAGE_DBWIZARD_TEXT Text[ en-US ] = "Path to text files"; }; - AUTO_HELP_BROWSECONTROLGROUP(3, HID_PAGE_DBWIZARD_TEXT_ET_LOCATIONTEXTFILE) + AUTO_HELP_BROWSECONTROLGROUP(3, HID_PAGE_DBWIZARD_TEXT_ET_LOCATIONTEXTFILE,HID_PAGE_DBWIZARD_TEXT_PB_LOCATIONTEXTFILE) AUTO_SEPARATORCONTROLGROUP(82, WIZARD_PAGE_X) }; TabPage PAGE_DBWIZARD_MSACCESS { + HelpID = "dbaccess:TabPage:PAGE_DBWIZARD_MSACCESS"; SVLook = TRUE ; Pos = MAP_APPFONT ( 0 , 0 ) ; Size = MAP_APPFONT ( WIZARD_PAGE_X , WIZARD_PAGE_Y ) ; @@ -446,11 +454,12 @@ TabPage PAGE_DBWIZARD_MSACCESS Text[ en-US ] = "Please select the Microsoft Access file you want to access."; }; - AUTO_HELP_BROWSECONTROLGROUP(3, HID_PAGE_DBWIZARD_MSACCESS_ET_MSACCESSLOCATION) + AUTO_HELP_BROWSECONTROLGROUP(3, HID_PAGE_DBWIZARD_MSACCESS_ET_MSACCESSLOCATION, HID_PAGE_DBWIZARD_MSACCESS_PB_MSACCESSLOCATION) }; TabPage PAGE_DBWIZARD_LDAP { + HelpID = "dbaccess:TabPage:PAGE_DBWIZARD_LDAP"; SVLook = TRUE ; Pos = MAP_APPFONT ( 0 , 0 ) ; Size = MAP_APPFONT ( WIZARD_PAGE_X , WIZARD_PAGE_Y ) ; @@ -490,6 +499,7 @@ TabPage PAGE_DBWIZARD_LDAP TabPage PAGE_DBWIZARD_ADABAS { + HelpID = "dbaccess:TabPage:PAGE_DBWIZARD_ADABAS"; SVLook = TRUE ; Pos = MAP_APPFONT ( 0 , 0 ) ; Size = MAP_APPFONT ( WIZARD_PAGE_X , WIZARD_PAGE_Y ) ; @@ -504,11 +514,12 @@ TabPage PAGE_DBWIZARD_ADABAS Text[ en-US ] = "Enter the name of the Adabas D database you want to connect to.\nClick 'Browse...' to select an Adabas D database that is already registered in %PRODUCTNAME." ; }; - AUTO_HELP_BROWSECONTROLGROUP(4, HID_PAGE_DBWIZARD_ADABAS_ET_ADABASNAME) + AUTO_HELP_BROWSECONTROLGROUP(4, HID_PAGE_DBWIZARD_ADABAS_ET_ADABASNAME, HID_PAGE_DBWIZARD_ADABAS_PB_ADABASNAME) }; TabPage PAGE_DBWIZARD_ADO { + HelpID = "dbaccess:TabPage:PAGE_DBWIZARD_ADO"; SVLook = TRUE ; Pos = MAP_APPFONT ( 0 , 0 ) ; Size = MAP_APPFONT ( WIZARD_PAGE_X , WIZARD_PAGE_Y ) ; @@ -523,12 +534,13 @@ TabPage PAGE_DBWIZARD_ADO Text[ en-US ] = "Please enter the URL of the ADO data source you want to connect to.\nClick 'Browse' to configure provider-specific settings.\nPlease contact your system administrator if you are unsure about the following settings." ; }; - AUTO_HELP_BROWSECONTROLGROUP(5, HID_PAGE_DBWIZARD_ADO_ET_ADOURL) + AUTO_HELP_BROWSECONTROLGROUP(5, HID_PAGE_DBWIZARD_ADO_ET_ADOURL, HID_PAGE_DBWIZARD_ADO_PB_ADOURL) }; TabPage PAGE_DBWIZARD_ODBC { + HelpID = "dbaccess:TabPage:PAGE_DBWIZARD_ODBC"; SVLook = TRUE ; Pos = MAP_APPFONT ( 0 , 0 ) ; Size = MAP_APPFONT ( WIZARD_PAGE_X , WIZARD_PAGE_Y ) ; @@ -543,21 +555,23 @@ TabPage PAGE_DBWIZARD_ODBC Text[ en-US ] = "Enter the name of the ODBC database you want to connect to.\nClick 'Browse...' to select an ODBC database that is already registered in %PRODUCTNAME.\nPlease contact your system administrator if you are unsure about the following settings." ; }; - AUTO_HELP_BROWSECONTROLGROUP(6, HID_PAGE_DBWIZARD_ODBC_ET_NAMEOFODBCDATASOURCE) + AUTO_HELP_BROWSECONTROLGROUP(6, HID_PAGE_DBWIZARD_ODBC_ET_NAMEOFODBCDATASOURCE, HID_PAGE_DBWIZARD_ODBC_PB_NAMEOFODBCDATASOURCE) }; TabPage PAGE_DBWIZARD_USERDEFINED { + HelpID = "dbaccess:TabPage:PAGE_DBWIZARD_USERDEFINED"; SVLook = TRUE ; Pos = MAP_APPFONT ( 0 , 0 ) ; Size = MAP_APPFONT ( WIZARD_PAGE_X , WIZARD_PAGE_Y ) ; Hide = TRUE ; - AUTO_HELP_BROWSECONTROLGROUP(6, HID_PAGE_DBWIZARD_USERDEFINED_ET_BROWSE) + AUTO_HELP_BROWSECONTROLGROUP(6, HID_PAGE_DBWIZARD_USERDEFINED_ET_BROWSE, HID_PAGE_DBWIZARD_USERDEFINED_BROWSE) }; TabPage PAGE_DBWIZARD_JDBC { + HelpID = "dbaccess:TabPage:PAGE_DBWIZARD_JDBC"; SVLook = TRUE ; Pos = MAP_APPFONT ( 0 , 0 ) ; Size = MAP_APPFONT ( WIZARD_PAGE_X , WIZARD_PAGE_Y ) ; @@ -572,14 +586,15 @@ TabPage PAGE_DBWIZARD_JDBC Text[ en-US ] = "Please enter the required information to connect to a JDBC database.\nPlease contact your system administrator if you are unsure about the following settings." ; }; - AUTO_HELP_BROWSECONTROLGROUP(4, HID_PAGE_DBWIZARD_JDBC_ET_JDBCURL) - AUTO_JDBCDRIVERCLASSGROUP(119, HID_PAGE_DBWIZARD_JDBC_ET_JDBCCLASS) + AUTO_HELP_BROWSECONTROLGROUP(4, HID_PAGE_DBWIZARD_JDBC_ET_JDBCURL, HID_PAGE_DBWIZARD_JDBC_PB_JDBCURL) + AUTO_JDBCDRIVERCLASSGROUP(119, HID_PAGE_DBWIZARD_JDBC_ET_JDBCCLASS, HID_PAGE_DBWIZARD_JDBC_PB_TESTJDBCCLASS) }; TabPage PAGE_DBWIZARD_ORACLE { + HelpID = "dbaccess:TabPage:PAGE_DBWIZARD_ORACLE"; SVLook = TRUE ; Pos = MAP_APPFONT ( 0 , 0 ) ; Size = MAP_APPFONT ( WIZARD_PAGE_X , WIZARD_PAGE_Y ) ; @@ -603,12 +618,13 @@ TabPage PAGE_DBWIZARD_ORACLE Text[ en-US ] = "Please enter the required information to connect to an Oracle database.Note that a JDBC Driver Class must be installed on your system and registered with %PRODUCTNAME.\nPlease contact your system administrator if you are unsure about the following settings." ; }; - AUTOHELP_JDBCCONTROLGROUP(HID_PAGE_DBWIZARD_ORACLE_ET_ORACLEDBNAME) + AUTOHELP_JDBCCONTROLGROUP(HID_PAGE_DBWIZARD_ORACLE_ET_ORACLEDBNAME,HID_PAGE_DBWIZARD_ORACLE_ET_ORACLEHOSTSERVER,HID_PAGE_DBWIZARD_ORACLE_ET_ORACLEPORT,HID_PAGE_DBWIZARD_ORACLE_ET_ORACLECLASS,HID_PAGE_DBWIZARD_ORACLE_PB_TESTORACLECLASS) }; TabPage PAGE_DBWIZARD_SPREADSHEET { + HelpID = "dbaccess:TabPage:PAGE_DBWIZARD_SPREADSHEET"; SVLook = TRUE ; Pos = MAP_APPFONT ( 0 , 0 ) ; Size = MAP_APPFONT ( WIZARD_PAGE_X , WIZARD_PAGE_Y ) ; @@ -623,7 +639,7 @@ TabPage PAGE_DBWIZARD_SPREADSHEET Text[ en-US ] = "Click 'Browse...' to select a %PRODUCTNAME spreadsheet or Microsoft Excel workbook.\n%PRODUCTNAME will open this file in read-only mode." ; }; - AUTO_HELP_BROWSECONTROLGROUP(3, HID_PAGE_DBWIZARD_SPREADSHEET_ET_SPREADSHEETPATH ) + AUTO_HELP_BROWSECONTROLGROUP(3, HID_PAGE_DBWIZARD_SPREADSHEET_ET_SPREADSHEETPATH,HID_PAGE_DBWIZARD_SPREADSHEET_PB_SPREADSHEETPATH ) String STR_SPREADSHEETPATH{ Text[ en-US ] = "~Location and file name" ; diff --git a/dbaccess/source/ui/dlg/dbfindex.cxx b/dbaccess/source/ui/dlg/dbfindex.cxx index 0b0b88c91..a22e81535 100644 --- a/dbaccess/source/ui/dlg/dbfindex.cxx +++ b/dbaccess/source/ui/dlg/dbfindex.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/dbaccess/source/ui/dlg/dbfindex.src b/dbaccess/source/ui/dlg/dbfindex.src index 47c72d114..c6a03ff9b 100644 --- a/dbaccess/source/ui/dlg/dbfindex.src +++ b/dbaccess/source/ui/dlg/dbfindex.src @@ -37,6 +37,7 @@ ModalDialog DLG_DBASE_INDEXES { + HelpID = "dbaccess:ModalDialog:DLG_DBASE_INDEXES"; OutputSize = TRUE ; SVLook = TRUE ; Size = MAP_APPFONT ( WIN_X , WIN_Y ) ; @@ -69,6 +70,7 @@ ModalDialog DLG_DBASE_INDEXES }; ComboBox CB_TABLES { + HelpID = "dbaccess:ComboBox:DLG_DBASE_INDEXES:CB_TABLES"; Border = TRUE ; SVLook = TRUE ; Pos = MAP_APPFONT ( 62 , 5 ) ; @@ -90,6 +92,7 @@ ModalDialog DLG_DBASE_INDEXES }; ListBox LB_TABLEINDEXES { + HelpID = "dbaccess:ListBox:DLG_DBASE_INDEXES:LB_TABLEINDEXES"; Border = TRUE ; SVLook = TRUE ; Pos = MAP_APPFONT ( 12 , 44 ) ; @@ -104,6 +107,7 @@ ModalDialog DLG_DBASE_INDEXES }; ListBox LB_FREEINDEXES { + HelpID = "dbaccess:ListBox:DLG_DBASE_INDEXES:LB_FREEINDEXES"; Border = TRUE ; SVLook = TRUE ; Pos = MAP_APPFONT ( 120 , 44 ) ; @@ -112,6 +116,7 @@ ModalDialog DLG_DBASE_INDEXES }; ImageButton IB_ADD { + HelpID = "dbaccess:ImageButton:DLG_DBASE_INDEXES:IB_ADD"; Pos = MAP_APPFONT ( 94 , 60 ) ; Size = MAP_APPFONT ( 20 , 14 ) ; TabStop = TRUE ; @@ -131,6 +136,7 @@ ModalDialog DLG_DBASE_INDEXES }; ImageButton IB_ADDALL { + HelpID = "dbaccess:ImageButton:DLG_DBASE_INDEXES:IB_ADDALL"; Pos = MAP_APPFONT ( 94 , 77 ) ; Size = MAP_APPFONT ( 20 , 14 ) ; TabStop = TRUE ; @@ -150,6 +156,7 @@ ModalDialog DLG_DBASE_INDEXES }; ImageButton IB_REMOVE { + HelpID = "dbaccess:ImageButton:DLG_DBASE_INDEXES:IB_REMOVE"; Pos = MAP_APPFONT ( 94 , 98 ) ; Size = MAP_APPFONT ( 20 , 14 ) ; TabStop = TRUE ; @@ -169,6 +176,7 @@ ModalDialog DLG_DBASE_INDEXES }; ImageButton IB_REMOVEALL { + HelpID = "dbaccess:ImageButton:DLG_DBASE_INDEXES:IB_REMOVEALL"; Pos = MAP_APPFONT ( 94, 114 ) ; Size = MAP_APPFONT ( 20 , 14 ) ; TabStop = TRUE ; diff --git a/dbaccess/source/ui/dlg/directsql.src b/dbaccess/source/ui/dlg/directsql.src index f81201c41..c5beb0a0c 100644 --- a/dbaccess/source/ui/dlg/directsql.src +++ b/dbaccess/source/ui/dlg/directsql.src @@ -40,6 +40,7 @@ ModalDialog DLG_DIRECTSQL { + HelpID = "dbaccess:ModalDialog:DLG_DIRECTSQL"; OutputSize = TRUE ; Moveable = TRUE ; Closeable = TRUE ; @@ -60,6 +61,7 @@ ModalDialog DLG_DIRECTSQL }; MultiLineEdit ME_SQL { + HelpID = "dbaccess:MultiLineEdit:DLG_DIRECTSQL:ME_SQL"; Pos = MAP_APPFONT( 7, 26 ); Size = MAP_APPFONT( WINDOW_SIZE_X - 14, 80 ); SVLook = TRUE; @@ -69,6 +71,7 @@ ModalDialog DLG_DIRECTSQL }; PushButton PB_EXECUTE { + HelpID = "dbaccess:PushButton:DLG_DIRECTSQL:PB_EXECUTE"; Pos = MAP_APPFONT( WINDOW_SIZE_X - BUTTON_SIZE_X - 7, 109 ); Size = MAP_APPFONT( BUTTON_SIZE_X, BUTTON_SIZE_Y ); Text [ en-US ] = "Execute"; @@ -82,6 +85,7 @@ ModalDialog DLG_DIRECTSQL }; ListBox LB_HISTORY { + HelpID = "dbaccess:ListBox:DLG_DIRECTSQL:LB_HISTORY"; Pos = MAP_APPFONT( 7, 121 + BUTTON_SIZE_Y + 3 ); Size = MAP_APPFONT( WINDOW_SIZE_X - 14, 14 ); SvLook = TRUE; @@ -96,6 +100,7 @@ ModalDialog DLG_DIRECTSQL }; MultiLineEdit ME_STATUS { + HelpID = "dbaccess:MultiLineEdit:DLG_DIRECTSQL:ME_STATUS"; Pos = MAP_APPFONT( 7, 153 + BUTTON_SIZE_Y ); Size = MAP_APPFONT( WINDOW_SIZE_X - 14, 41 ); Border = TRUE; @@ -114,6 +119,7 @@ ModalDialog DLG_DIRECTSQL }; PushButton PB_CLOSE { + HelpID = "dbaccess:PushButton:DLG_DIRECTSQL:PB_CLOSE"; Pos = MAP_APPFONT( WINDOW_SIZE_X - 7 - BUTTON_SIZE_X, 207 + BUTTON_SIZE_Y ); Size = MAP_APPFONT( BUTTON_SIZE_X, BUTTON_SIZE_Y ); Text [ en-US ] = "Close"; diff --git a/dbaccess/source/ui/dlg/dlgsave.src b/dbaccess/source/ui/dlg/dlgsave.src index 20688a784..6276093df 100644 --- a/dbaccess/source/ui/dlg/dlgsave.src +++ b/dbaccess/source/ui/dlg/dlgsave.src @@ -61,6 +61,7 @@ ModalDialog DLG_SAVE_AS }; ComboBox ET_CATALOG { + HelpID = "dbaccess:ComboBox:DLG_SAVE_AS:ET_CATALOG"; Border = TRUE ; Pos = MAP_APPFONT ( 77 , 25 ) ; Size = MAP_APPFONT ( 89 , 12 ) ; @@ -77,6 +78,7 @@ ModalDialog DLG_SAVE_AS }; ComboBox ET_SCHEMA { + HelpID = "dbaccess:ComboBox:DLG_SAVE_AS:ET_SCHEMA"; Border = TRUE ; Pos = MAP_APPFONT ( 77 , 42 ) ; Size = MAP_APPFONT ( 89 , 12 ) ; @@ -92,6 +94,7 @@ ModalDialog DLG_SAVE_AS }; Edit ET_TITLE { + HelpID = "dbaccess:Edit:DLG_SAVE_AS:ET_TITLE"; Border = TRUE ; Pos = MAP_APPFONT ( 77 , 59 ) ; Size = MAP_APPFONT ( 89 , 12 ) ; diff --git a/dbaccess/source/ui/dlg/dlgsize.src b/dbaccess/source/ui/dlg/dlgsize.src index 875ee79b9..453d755da 100644 --- a/dbaccess/source/ui/dlg/dlgsize.src +++ b/dbaccess/source/ui/dlg/dlgsize.src @@ -56,6 +56,7 @@ ModalDialog DLG_ROWHEIGHT }; MetricField MF_VALUE { + HelpID = "dbaccess:MetricField:DLG_ROWHEIGHT:MF_VALUE"; Border = TRUE ; Pos = MAP_APPFONT ( 36 , 6 ) ; Size = MAP_APPFONT ( 63 , 12 ) ; @@ -69,6 +70,7 @@ ModalDialog DLG_ROWHEIGHT }; CheckBox CB_STANDARD { + HelpID = "dbaccess:CheckBox:DLG_ROWHEIGHT:CB_STANDARD"; Pos = MAP_APPFONT ( 36 , 25 ) ; Size = MAP_APPFONT ( 62 , 12 ) ; TabStop = TRUE ; @@ -111,6 +113,7 @@ ModalDialog DLG_COLWIDTH }; MetricField MF_VALUE { + HelpID = "dbaccess:MetricField:DLG_COLWIDTH:MF_VALUE"; Border = TRUE ; Pos = MAP_APPFONT ( 36 , 6 ) ; Size = MAP_APPFONT ( 63 , 12 ) ; @@ -124,6 +127,7 @@ ModalDialog DLG_COLWIDTH }; CheckBox CB_STANDARD { + HelpID = "dbaccess:CheckBox:DLG_COLWIDTH:CB_STANDARD"; Pos = MAP_APPFONT ( 36 , 25 ) ; Size = MAP_APPFONT ( 62 , 12 ) ; TabStop = TRUE ; diff --git a/dbaccess/source/ui/dlg/dsselect.src b/dbaccess/source/ui/dlg/dsselect.src index 8c59a26d1..d6a885555 100644 --- a/dbaccess/source/ui/dlg/dsselect.src +++ b/dbaccess/source/ui/dlg/dsselect.src @@ -35,6 +35,7 @@ ModalDialog DLG_DATASOURCE_SELECTION { + HelpID = "dbaccess:ModalDialog:DLG_DATASOURCE_SELECTION"; OutputSize = TRUE ; Moveable = TRUE ; Closeable = TRUE ; @@ -50,6 +51,7 @@ ModalDialog DLG_DATASOURCE_SELECTION }; ListBox LB_DATASOURCE { + HelpID = "dbaccess:ListBox:DLG_DATASOURCE_SELECTION:LB_DATASOURCE"; Border = TRUE ; Pos = MAP_APPFONT ( 6 , 19 ) ; Size = MAP_APPFONT ( 154 , 94 ) ; @@ -79,6 +81,7 @@ ModalDialog DLG_DATASOURCE_SELECTION }; PushButton PB_MANAGE { + HelpID = "dbaccess:PushButton:DLG_DATASOURCE_SELECTION:PB_MANAGE"; Pos = MAP_APPFONT ( 166 , 99 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; TabStop = TRUE ; @@ -88,6 +91,7 @@ ModalDialog DLG_DATASOURCE_SELECTION }; PushButton PB_CREATE { + HelpID = "dbaccess:PushButton:DLG_DATASOURCE_SELECTION:PB_CREATE"; Pos = MAP_APPFONT ( 166 , 99 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; TabStop = TRUE ; diff --git a/dbaccess/source/ui/dlg/indexdialog.src b/dbaccess/source/ui/dlg/indexdialog.src index 0d8aa0884..d77706f5e 100644 --- a/dbaccess/source/ui/dlg/indexdialog.src +++ b/dbaccess/source/ui/dlg/indexdialog.src @@ -47,6 +47,7 @@ ModalDialog DLG_INDEXDESIGN { + HelpID = "dbaccess:ModalDialog:DLG_INDEXDESIGN"; OutputSize = TRUE ; SVLook = TRUE ; Size = MAP_APPFONT ( DIALOG_SIZE_X , DIALOG_SIZE_Y ) ; @@ -131,6 +132,7 @@ ModalDialog DLG_INDEXDESIGN }; CheckBox CB_UNIQUE { + HelpID = "dbaccess:CheckBox:DLG_INDEXDESIGN:CB_UNIQUE"; Pos = MAP_APPFONT ( LIST_WIDTH + 16, 34 ) ; Size = MAP_APPFONT ( DIALOG_SIZE_X - LIST_WIDTH - 22, 8 ) ; SVLook = TRUE; @@ -153,6 +155,7 @@ ModalDialog DLG_INDEXDESIGN }; PushButton PB_CLOSE { + HelpID = "dbaccess:PushButton:DLG_INDEXDESIGN:PB_CLOSE"; Pos = MAP_APPFONT ( DIALOG_SIZE_X - BUTTON_SIZE_X - 6 - BUTTON_SIZE_X - 6, DIALOG_SIZE_Y - BUTTON_SIZE_Y - 6 ) ; Size = MAP_APPFONT ( BUTTON_SIZE_X, BUTTON_SIZE_Y ); SVLook = TRUE; diff --git a/dbaccess/source/ui/dlg/makefile.mk b/dbaccess/source/ui/dlg/makefile.mk index 4f0058a03..8fa615d28 100644 --- a/dbaccess/source/ui/dlg/makefile.mk +++ b/dbaccess/source/ui/dlg/makefile.mk @@ -137,8 +137,6 @@ SLOFILES+= $(SLO)$/adodatalinks.obj .ENDIF # --- Targets ---------------------------------- -#LOCALIZE_ME=AutoControls_tmpl.hrc - .INCLUDE : target.mk $(SLO)$/ConnectionHelper.obj : $(LOCALIZE_ME_DEST) diff --git a/dbaccess/source/ui/dlg/odbcconfig.cxx b/dbaccess/source/ui/dlg/odbcconfig.cxx index b4115cac3..e6a86588b 100644 --- a/dbaccess/source/ui/dlg/odbcconfig.cxx +++ b/dbaccess/source/ui/dlg/odbcconfig.cxx @@ -55,7 +55,7 @@ #ifdef HAVE_ODBC_SUPPORT -#if defined(WIN) || defined(OS2) +#if defined(OS2) #define ODBC_LIBRARY "ODBC.DLL" #define ODBC_UI_LIBRARY "ODBCINST.DLL" #endif @@ -77,7 +77,7 @@ // just to go with calling convention of windows // so don't touch this -#if defined(WIN) || defined(WNT) +#if defined(WNT) #define SQL_API __stdcall // At least under some circumstances, the below #include <odbc/sqlext.h> re- // defines SQL_API to an empty string, leading to a compiler warning on MSC; to @@ -87,7 +87,7 @@ #pragma warning(push) #pragma warning(disable: 4005) #endif -#endif // defined(WIN) || defined(WNT) +#endif // defined(WNT) #if defined(OS2) #define ALLREADY_HAVE_OS2_TYPES @@ -100,13 +100,13 @@ #include <odbc/sqlext.h> #endif -#if defined(WIN) || defined(WNT) +#if defined(WNT) #if defined _MSC_VER #pragma warning(pop) #endif #undef SQL_API #define SQL_API __stdcall -#endif // defined(WIN) || defined(WNT) +#endif // defined(WNT) // from here on you can do what you want to #if defined(OS2) diff --git a/dbaccess/source/ui/dlg/odbcconfig.hxx b/dbaccess/source/ui/dlg/odbcconfig.hxx index e66e0bf21..624338ea1 100644 --- a/dbaccess/source/ui/dlg/odbcconfig.hxx +++ b/dbaccess/source/ui/dlg/odbcconfig.hxx @@ -31,11 +31,11 @@ #include "commontypes.hxx" -#if defined(WIN) || defined(WNT) || defined (UNX) || defined (OS2) +#if defined(WNT) || defined (UNX) || defined (OS2) #define HAVE_ODBC_SUPPORT #endif -#if ( defined(WIN) || defined(WNT) || defined (OS2) ) && defined(HAVE_ODBC_SUPPORT) +#if ( defined(WNT) || defined (OS2) ) && defined(HAVE_ODBC_SUPPORT) #define HAVE_ODBC_ADMINISTRATION #endif diff --git a/dbaccess/source/ui/dlg/paramdialog.src b/dbaccess/source/ui/dlg/paramdialog.src index 10affc622..5840ae57b 100644 --- a/dbaccess/source/ui/dlg/paramdialog.src +++ b/dbaccess/source/ui/dlg/paramdialog.src @@ -37,6 +37,7 @@ ModalDialog DLG_PARAMETERS { + HelpID = "dbaccess:ModalDialog:DLG_PARAMETERS"; OutputSize = TRUE ; SVLook = TRUE ; Size = MAP_APPFONT ( 6 + LIST_WIDTH + 3 + 6 + BUTTON_WIDTH + 6, 98 ) ; @@ -51,6 +52,7 @@ ModalDialog DLG_PARAMETERS }; ListBox LB_ALLPARAMS { + HelpID = "dbaccess:ListBox:DLG_PARAMETERS:LB_ALLPARAMS"; Pos = MAP_APPFONT ( 7 , 12 ) ; Size = MAP_APPFONT ( LIST_WIDTH , LIST_HEIGHT ) ; Border = TRUE; @@ -64,6 +66,7 @@ ModalDialog DLG_PARAMETERS }; Edit ET_PARAM { + HelpID = "dbaccess:Edit:DLG_PARAMETERS:ET_PARAM"; Border = TRUE ; Pos = MAP_APPFONT ( 7 , 12 + LIST_HEIGHT + 4 + 8 + 3 ) ; Size = MAP_APPFONT ( LIST_WIDTH , 12 ) ; @@ -71,6 +74,7 @@ ModalDialog DLG_PARAMETERS }; PushButton BT_TRAVELNEXT { + HelpID = "dbaccess:PushButton:DLG_PARAMETERS:BT_TRAVELNEXT"; Pos = MAP_APPFONT ( 4 + 3 + LIST_WIDTH + 3 + 6 , 12 + LIST_HEIGHT + 4 + 8 + 3 + ( 12 - BUTTON_HEIGHT ) / 2) ; Size = MAP_APPFONT ( BUTTON_WIDTH , BUTTON_HEIGHT ) ; TabStop = TRUE ; diff --git a/dbaccess/source/ui/dlg/queryfilter.src b/dbaccess/source/ui/dlg/queryfilter.src index 600193208..d7dc79d31 100644 --- a/dbaccess/source/ui/dlg/queryfilter.src +++ b/dbaccess/source/ui/dlg/queryfilter.src @@ -44,6 +44,7 @@ ModalDialog DLG_FILTERCRIT HelpId = HID_DLG_FILTERCRIT ; ListBox LB_WHEREFIELD1 { + HelpID = "dbaccess:ListBox:DLG_FILTERCRIT:LB_WHEREFIELD1"; Border = TRUE ; Pos = MAP_APPFONT ( 60 , 25 ) ; Size = MAP_APPFONT ( 60 , 90 ) ; @@ -52,6 +53,7 @@ ModalDialog DLG_FILTERCRIT }; ListBox LB_WHERECOMP1 { + HelpID = "dbaccess:ListBox:DLG_FILTERCRIT:LB_WHERECOMP1"; Border = TRUE ; Pos = MAP_APPFONT ( 124 , 25 ) ; Size = MAP_APPFONT ( 49 , 72 ) ; @@ -62,6 +64,7 @@ ModalDialog DLG_FILTERCRIT }; Edit ET_WHEREVALUE1 { + HelpID = "dbaccess:Edit:DLG_FILTERCRIT:ET_WHEREVALUE1"; Border = TRUE ; Pos = MAP_APPFONT ( 177 , 25 ) ; Size = MAP_APPFONT ( 60 , 12 ) ; @@ -69,6 +72,7 @@ ModalDialog DLG_FILTERCRIT }; ListBox LB_WHERECOND2 { + HelpID = "dbaccess:ListBox:DLG_FILTERCRIT:LB_WHERECOND2"; Border = TRUE ; Pos = MAP_APPFONT ( 15 , 41 ) ; Size = MAP_APPFONT ( 41 , 36 ) ; @@ -83,6 +87,7 @@ ModalDialog DLG_FILTERCRIT }; ListBox LB_WHEREFIELD2 { + HelpID = "dbaccess:ListBox:DLG_FILTERCRIT:LB_WHEREFIELD2"; Border = TRUE ; Pos = MAP_APPFONT ( 60 , 41 ) ; Size = MAP_APPFONT ( 60 , 90 ) ; @@ -91,6 +96,7 @@ ModalDialog DLG_FILTERCRIT }; ListBox LB_WHERECOMP2 { + HelpID = "dbaccess:ListBox:DLG_FILTERCRIT:LB_WHERECOMP2"; Border = TRUE ; Pos = MAP_APPFONT ( 124 , 41 ) ; Size = MAP_APPFONT ( 49 , 72 ) ; @@ -101,6 +107,7 @@ ModalDialog DLG_FILTERCRIT }; Edit ET_WHEREVALUE2 { + HelpID = "dbaccess:Edit:DLG_FILTERCRIT:ET_WHEREVALUE2"; Border = TRUE ; Pos = MAP_APPFONT ( 177 , 41 ) ; Size = MAP_APPFONT ( 60 , 12 ) ; @@ -108,6 +115,7 @@ ModalDialog DLG_FILTERCRIT }; ListBox LB_WHERECOND3 { + HelpID = "dbaccess:ListBox:DLG_FILTERCRIT:LB_WHERECOND3"; Border = TRUE ; Pos = MAP_APPFONT ( 15 , 57 ) ; Size = MAP_APPFONT ( 41 , 36 ) ; @@ -122,6 +130,7 @@ ModalDialog DLG_FILTERCRIT }; ListBox LB_WHEREFIELD3 { + HelpID = "dbaccess:ListBox:DLG_FILTERCRIT:LB_WHEREFIELD3"; Border = TRUE ; Pos = MAP_APPFONT ( 60 , 57 ) ; Size = MAP_APPFONT ( 60 , 90 ) ; @@ -130,6 +139,7 @@ ModalDialog DLG_FILTERCRIT }; ListBox LB_WHERECOMP3 { + HelpID = "dbaccess:ListBox:DLG_FILTERCRIT:LB_WHERECOMP3"; Border = TRUE ; Pos = MAP_APPFONT ( 124 , 57 ) ; Size = MAP_APPFONT ( 49 , 72 ) ; @@ -140,6 +150,7 @@ ModalDialog DLG_FILTERCRIT }; Edit ET_WHEREVALUE3 { + HelpID = "dbaccess:Edit:DLG_FILTERCRIT:ET_WHEREVALUE3"; Border = TRUE ; Pos = MAP_APPFONT ( 177 , 57 ) ; Size = MAP_APPFONT ( 60 , 12 ) ; @@ -170,7 +181,7 @@ ModalDialog DLG_FILTERCRIT { Pos = MAP_APPFONT ( 15 , 14 ) ; Size = MAP_APPFONT ( 40 , 8 ) ; - /* ### ACHTUNG: Neuer Text in Resource? Verknüpfung : Verkn³pfung */ + /* ### ACHTUNG: Neuer Text in Resource? Verkn�pfung : Verkn�pfung */ Center = TRUE ; Text [ en-US ] = "Operator" ; }; diff --git a/dbaccess/source/ui/dlg/queryorder.src b/dbaccess/source/ui/dlg/queryorder.src index fe7504225..271d0541c 100644 --- a/dbaccess/source/ui/dlg/queryorder.src +++ b/dbaccess/source/ui/dlg/queryorder.src @@ -42,6 +42,7 @@ ModalDialog DLG_ORDERCRIT Closeable = TRUE ; ListBox LB_ORDERFIELD1 { + HelpID = "dbaccess:ListBox:DLG_ORDERCRIT:LB_ORDERFIELD1"; Border = TRUE ; Pos = MAP_APPFONT ( 59 , 25 ) ; Size = MAP_APPFONT ( 60 , 72 ) ; @@ -51,6 +52,7 @@ ModalDialog DLG_ORDERCRIT }; ListBox LB_ORDERVALUE1 { + HelpID = "dbaccess:ListBox:DLG_ORDERCRIT:LB_ORDERVALUE1"; Border = TRUE ; Pos = MAP_APPFONT ( 123 , 25 ) ; Size = MAP_APPFONT ( 60 , 36 ) ; @@ -65,6 +67,7 @@ ModalDialog DLG_ORDERCRIT }; ListBox LB_ORDERFIELD2 { + HelpID = "dbaccess:ListBox:DLG_ORDERCRIT:LB_ORDERFIELD2"; Border = TRUE ; Pos = MAP_APPFONT ( 59 , 41 ) ; Size = MAP_APPFONT ( 60 , 72 ) ; @@ -74,6 +77,7 @@ ModalDialog DLG_ORDERCRIT }; ListBox LB_ORDERVALUE2 { + HelpID = "dbaccess:ListBox:DLG_ORDERCRIT:LB_ORDERVALUE2"; Border = TRUE ; Pos = MAP_APPFONT ( 123 , 41 ) ; Size = MAP_APPFONT ( 60 , 36 ) ; @@ -88,6 +92,7 @@ ModalDialog DLG_ORDERCRIT }; ListBox LB_ORDERFIELD3 { + HelpID = "dbaccess:ListBox:DLG_ORDERCRIT:LB_ORDERFIELD3"; Border = TRUE ; Pos = MAP_APPFONT ( 59 , 57 ) ; Size = MAP_APPFONT ( 60 , 72 ) ; @@ -97,6 +102,7 @@ ModalDialog DLG_ORDERCRIT }; ListBox LB_ORDERVALUE3 { + HelpID = "dbaccess:ListBox:DLG_ORDERCRIT:LB_ORDERVALUE3"; Border = TRUE ; Pos = MAP_APPFONT ( 123 , 57 ) ; Size = MAP_APPFONT ( 60 , 36 ) ; @@ -133,7 +139,7 @@ ModalDialog DLG_ORDERCRIT { Pos = MAP_APPFONT ( 12 , 14 ) ; Size = MAP_APPFONT ( 46 , 8 ) ; - /* ### ACHTUNG: Neuer Text in Resource? Verknüpfung : Verkn³pfung */ + /* ### ACHTUNG: Neuer Text in Resource? Verkn�pfung : Verkn�pfung */ Text [ en-US ] = "Operator" ; }; FixedText FT_ORDERDIR diff --git a/dbaccess/source/ui/dlg/sqlmessage.cxx b/dbaccess/source/ui/dlg/sqlmessage.cxx index 22bb46041..57f3fcbe3 100644 --- a/dbaccess/source/ui/dlg/sqlmessage.cxx +++ b/dbaccess/source/ui/dlg/sqlmessage.cxx @@ -46,6 +46,8 @@ #include "UITools.hxx" #include "moduledbu.hxx" +#include <tools/urlobj.hxx> + #define BUTTONID_MORE BUTTONID_RETRY + 1 #define DIALOG_WIDTH 220 @@ -355,7 +357,7 @@ OExceptionChainDialog::OExceptionChainDialog( Window* pParent, const ExceptionDi m_aExceptionList.SetSelectionMode(SINGLE_SELECTION); m_aExceptionList.SetDragDropMode(0); m_aExceptionList.EnableInplaceEditing(sal_False); - m_aExceptionList.SetWindowBits(WB_HASLINES | WB_HASBUTTONS | WB_HASBUTTONSATROOT | WB_HSCROLL); + m_aExceptionList.SetStyle(m_aExceptionList.GetStyle() | WB_HASLINES | WB_HASBUTTONS | WB_HASBUTTONSATROOT | WB_HSCROLL); m_aExceptionList.SetSelectHdl(LINK(this, OExceptionChainDialog, OnExceptionSelected)); m_aExceptionList.SetNodeDefaultImages( ); @@ -644,11 +646,14 @@ void OSQLMessageBox::impl_createStandardButtons( WinBits _nStyle ) { lcl_addButton( *this, BUTTON_HELP, false ); - SmartId aHelpId( m_sHelpURL ); - if ( m_sHelpURL.indexOfAsciiL( "HID:", 4 ) == 0 ) - aHelpId = SmartId( m_sHelpURL.copy( 4 ).toInt32() ); + rtl::OUString aTmp; + INetURLObject aHID( m_sHelpURL ); + if ( aHID.GetProtocol() == INET_PROT_HID ) + aTmp = aHID.GetURLPath(); + else + aTmp = m_sHelpURL; - SetSmartHelpId( aHelpId ); + SetHelpId( rtl::OUStringToOString( aTmp, RTL_TEXTENCODING_UTF8 ) ); } } diff --git a/dbaccess/source/ui/dlg/sqlmessage.src b/dbaccess/source/ui/dlg/sqlmessage.src index 979fdd370..94b2e394d 100644 --- a/dbaccess/source/ui/dlg/sqlmessage.src +++ b/dbaccess/source/ui/dlg/sqlmessage.src @@ -56,6 +56,7 @@ Image BMP_EXCEPTION_INFO ModalDialog DLG_SQLEXCEPTIONCHAIN { + HelpID = "dbaccess:ModalDialog:DLG_SQLEXCEPTIONCHAIN"; Moveable = TRUE ; Closeable = TRUE ; OutputSize = TRUE ; diff --git a/dbaccess/source/ui/dlg/tablespage.cxx b/dbaccess/source/ui/dlg/tablespage.cxx index 99857a2c8..92b610b3d 100644 --- a/dbaccess/source/ui/dlg/tablespage.cxx +++ b/dbaccess/source/ui/dlg/tablespage.cxx @@ -101,7 +101,7 @@ DBG_NAME(OTableSubscriptionPage) m_aTablesList.SetSelectionMode( MULTIPLE_SELECTION ); m_aTablesList.SetDragDropMode( 0 ); m_aTablesList.EnableInplaceEditing( sal_False ); - m_aTablesList.SetWindowBits(WB_BORDER | WB_HASLINES | WB_HASLINESATROOT | WB_SORT | WB_HASBUTTONS | WB_HSCROLL |WB_HASBUTTONSATROOT); + m_aTablesList.SetStyle(m_aTablesList.GetStyle() | WB_BORDER | WB_HASLINES | WB_HASLINESATROOT | WB_SORT | WB_HASBUTTONS | WB_HSCROLL |WB_HASBUTTONSATROOT); m_aTablesList.Clear(); diff --git a/dbaccess/source/ui/dlg/textconnectionsettings.src b/dbaccess/source/ui/dlg/textconnectionsettings.src index cca76e7f6..b34a05607 100644 --- a/dbaccess/source/ui/dlg/textconnectionsettings.src +++ b/dbaccess/source/ui/dlg/textconnectionsettings.src @@ -34,6 +34,7 @@ ModalDialog DLG_TEXT_CONNECTION_SETTINGS { + HelpID = "dbaccess:ModalDialog:DLG_TEXT_CONNECTION_SETTINGS"; Size = MAP_APPFONT( DIALOG_WIDTH, DIALOG_HEIGHT ); OutputSize = TRUE ; diff --git a/dbaccess/source/ui/inc/FieldDescControl.hxx b/dbaccess/source/ui/inc/FieldDescControl.hxx index d6677b141..4f3a568f5 100644 --- a/dbaccess/source/ui/inc/FieldDescControl.hxx +++ b/dbaccess/source/ui/inc/FieldDescControl.hxx @@ -150,9 +150,9 @@ namespace dbaui sal_Bool isTextFormat(const OFieldDescription* _pFieldDescr,sal_uInt32& _nFormatKey) const; void Contruct(); - OPropNumericEditCtrl* CreateNumericControl(USHORT _nHelpStr,short _nProperty,ULONG _nHelpId); + OPropNumericEditCtrl* CreateNumericControl(USHORT _nHelpStr,short _nProperty,const rtl::OString& _sHelpId); FixedText* CreateText(USHORT _nTextRes); - void InitializeControl(Control* _pControl,ULONG _nHelpId,bool _bAddChangeHandler); + void InitializeControl(Control* _pControl,const rtl::OString& _sHelpId,bool _bAddChangeHandler); protected: inline void setRightAligned() { m_bRightAligned = true; } diff --git a/dbaccess/source/ui/inc/TableFieldDescription.hxx b/dbaccess/source/ui/inc/TableFieldDescription.hxx index 1438d5bda..cacbc81ce 100644 --- a/dbaccess/source/ui/inc/TableFieldDescription.hxx +++ b/dbaccess/source/ui/inc/TableFieldDescription.hxx @@ -44,6 +44,11 @@ namespace comphelper class NamedValueCollection; } +namespace comphelper +{ + class NamedValueCollection; +} + class Window; namespace dbaui { diff --git a/dbaccess/source/ui/inc/UITools.hxx b/dbaccess/source/ui/inc/UITools.hxx index 3b573f1f8..096d11ad1 100644 --- a/dbaccess/source/ui/inc/UITools.hxx +++ b/dbaccess/source/ui/inc/UITools.hxx @@ -318,7 +318,7 @@ namespace dbaui @return The URL for the help agent to dispatch. */ - ::com::sun::star::util::URL createHelpAgentURL(const ::rtl::OUString& _sModuleName,const sal_Int32 _nHelpId); + ::com::sun::star::util::URL createHelpAgentURL(const ::rtl::OUString& _sModuleName,const rtl::OString& _rHelpId); /** set the evaluation flag at the number formatter @param _rxFormatter diff --git a/dbaccess/source/ui/inc/dbu_dlg.hrc b/dbaccess/source/ui/inc/dbu_dlg.hrc index f403caafd..1335a6c10 100644 --- a/dbaccess/source/ui/inc/dbu_dlg.hrc +++ b/dbaccess/source/ui/inc/dbu_dlg.hrc @@ -64,24 +64,24 @@ #define STR_ADABAS_ERROR_SYSTEMTABLES RID_STR_DLG_START + 6 #define STR_ERROR_PASSWORDS_NOT_IDENTICAL RID_STR_DLG_START + 7 #define STR_INDEXDESIGN_DOUBLE_COLUMN_NAME RID_STR_DLG_START + 8 -#define STR_DATASOURCE_DEFAULTNAME RID_STR_DLG_START + 9 -#define STR_ERR_EMPTY_DSN_NAME RID_STR_DLG_START + 10 + // FREE + // FREE #define STR_ERR_USE_CONNECT_TO RID_STR_DLG_START + 11 #define STR_ALREADYEXISTOVERWRITE RID_STR_DLG_START + 12 -#define STR_QUERY_DROP_ALL RID_STR_DLG_START + 13 + // FREE #define STR_INDEX_NAME_ALREADY_USED RID_STR_DLG_START + 14 #define STR_ASK_FOR_DIRECTORY_CREATION RID_STR_DLG_START + 15 #define STR_COULD_NOT_CREATE_DIRECTORY RID_STR_DLG_START + 16 -#define STR_ADDRESSBOOK_SYSTEM RID_STR_DLG_START + 17 -#define STR_ADDRESSBOOK_MOZILLA RID_STR_DLG_START + 18 -#define STR_ADDRESSBOOK_EVOLUTION RID_STR_DLG_START + 19 // FREE -#define STR_ADDRESSBOOK_LDAP RID_STR_DLG_START + 21 -#define STR_ADDRESSBOOK_OUTLOOK RID_STR_DLG_START + 22 + // FREE + // FREE + // FREE + // FREE + // FREE #define STR_COMMAND_EXECUTED_SUCCESSFULLY RID_STR_DLG_START + 23 #define STR_DIRECTSQL_CONNECTIONLOST RID_STR_DLG_START + 24 -#define STR_HINT_READONLY_CONNECTION RID_STR_DLG_START + 25 -#define STR_HINT_CONNECTION_NOT_CAPABLE RID_STR_DLG_START + 26 + // FREE + // FREE #define STR_USERADMIN_NOT_AVAILABLE RID_STR_DLG_START + 27 #define STR_TAB_INDEX_SORTORDER RID_STR_DLG_START + 28 #define STR_TAB_INDEX_FIELD RID_STR_DLG_START + 29 @@ -110,7 +110,7 @@ #define STR_NO_ADABASE_DATASOURCES RID_STR_DLG_START + 55 #define STR_NO_ADDITIONAL_SETTINGS RID_STR_DLG_START + 56 #define STR_HOSTNAME RID_STR_DLG_START + 57 -#define STR_ADDRESSBOOK_THUNDERBIRD RID_STR_DLG_START + 58 + // FREE #define STR_MOZILLA_PROFILE_NAME RID_STR_DLG_START + 59 #define STR_THUNDERBIRD_PROFILE_NAME RID_STR_DLG_START + 60 #define STR_EXPLAN_STRINGCONVERSION_ERROR RID_STR_DLG_START + 61 diff --git a/dbaccess/source/ui/inc/dbu_resource.hrc b/dbaccess/source/ui/inc/dbu_resource.hrc index b1b542c03..5881a4f29 100644 --- a/dbaccess/source/ui/inc/dbu_resource.hrc +++ b/dbaccess/source/ui/inc/dbu_resource.hrc @@ -118,7 +118,7 @@ #define DLG_DATABASE_WIZARD RID_DIALOG_START + 29 #define RID_EXTENSION_NOT_PRESENT_DLG RID_DIALOG_START + 30 #define DLG_TEXT_CONNECTION_SETTINGS RID_DIALOG_START + 31 - +#define DLG_TABLE_FILTER RID_DIALOG_START + 32 //======================================================================== // tab pages diff --git a/dbaccess/source/ui/misc/UITools.cxx b/dbaccess/source/ui/misc/UITools.cxx index d58751330..861682eda 100644 --- a/dbaccess/source/ui/misc/UITools.cxx +++ b/dbaccess/source/ui/misc/UITools.cxx @@ -1306,13 +1306,13 @@ namespace } // annonymous // ......................................................................... // ----------------------------------------------------------------------------- -::com::sun::star::util::URL createHelpAgentURL(const ::rtl::OUString& _sModuleName,const sal_Int32 _nHelpId) +::com::sun::star::util::URL createHelpAgentURL(const ::rtl::OUString& _sModuleName, const rtl::OString& sHelpId) { ::com::sun::star::util::URL aURL; aURL.Complete = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "vnd.sun.star.help://" ) ); aURL.Complete += _sModuleName; aURL.Complete += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/" ) ); - aURL.Complete += ::rtl::OUString::valueOf(_nHelpId); + aURL.Complete += ::rtl::OUString(sHelpId, sHelpId.getLength(), RTL_TEXTENCODING_UTF8); ::rtl::OUString sAnchor; ::rtl::OUString sTempURL = aURL.Complete; diff --git a/dbaccess/source/ui/misc/WTypeSelect.cxx b/dbaccess/source/ui/misc/WTypeSelect.cxx index de188edc4..9094982c6 100644 --- a/dbaccess/source/ui/misc/WTypeSelect.cxx +++ b/dbaccess/source/ui/misc/WTypeSelect.cxx @@ -43,6 +43,8 @@ #include "sqlmessage.hxx" #include "FieldControls.hxx" +#include "dbaccess_slotid.hrc" + using namespace ::dbaui; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::beans; diff --git a/dbaccess/source/ui/misc/WizardPages.src b/dbaccess/source/ui/misc/WizardPages.src index 39e7fbe06..9910a99d9 100644 --- a/dbaccess/source/ui/misc/WizardPages.src +++ b/dbaccess/source/ui/misc/WizardPages.src @@ -35,6 +35,7 @@ #include "dbaccess_helpid.hrc" #endif +#include "dbaccess_slotid.hrc" #define WINDOW_SIZE_X 276 #define WINDOW_SIZE_Y 185 @@ -67,6 +68,7 @@ String STR_WIZ_NAME_MATCHING_TITEL ModalDialog WIZ_RTFCOPYTABLE { + HelpID = "dbaccess:ModalDialog:WIZ_RTFCOPYTABLE"; Text [ en-US ] = "Copy RTF Table" ; @@ -90,12 +92,14 @@ ModalDialog WIZ_RTFCOPYTABLE }; PushButton PB_PREV { + HelpID = "dbaccess:PushButton:WIZ_RTFCOPYTABLE:PB_PREV"; TabStop = TRUE ; Size = MAP_APPFONT ( BUTTON_SIZE_X , BUTTON_SIZE_Y ) ; Text [ en-US ] = "< ~Back"; }; PushButton PB_NEXT { + HelpID = "dbaccess:PushButton:WIZ_RTFCOPYTABLE:PB_NEXT"; TabStop = TRUE ; Size = MAP_APPFONT ( BUTTON_SIZE_X , BUTTON_SIZE_Y ) ; Text [ en-US ] = "~Next>"; @@ -128,6 +132,7 @@ TabPage TAB_WIZ_COLUMN_SELECT }; MultiListBox LB_ORG_COLUMN_NAMES { + HelpID = "dbaccess:MultiListBox:TAB_WIZ_COLUMN_SELECT:LB_ORG_COLUMN_NAMES"; Border = TRUE ; Pos = MAP_APPFONT ( WINDOW_BORDER_X , WINDOW_BORDER_Y ) ; Size = MAP_APPFONT ( 95 , WINDOW_SIZE_Y - 23 ) ; @@ -140,6 +145,7 @@ TabPage TAB_WIZ_COLUMN_SELECT }; ImageButton IB_COLUMN_RH { + HelpID = "dbaccess:ImageButton:TAB_WIZ_COLUMN_SELECT:IB_COLUMN_RH"; Pos = MAP_APPFONT ( WINDOW_BORDER_X + 116 , WINDOW_BORDER_Y + 25 ) ; Size = MAP_APPFONT ( 20 , 14 ) ; TabStop = TRUE ; @@ -159,6 +165,7 @@ TabPage TAB_WIZ_COLUMN_SELECT }; ImageButton IB_COLUMNS_RH { + HelpID = "dbaccess:ImageButton:TAB_WIZ_COLUMN_SELECT:IB_COLUMNS_RH"; Pos = MAP_APPFONT ( WINDOW_BORDER_X + 116 , WINDOW_BORDER_Y + 45 ) ; Size = MAP_APPFONT ( 20 , 14 ) ; TabStop = TRUE; @@ -179,6 +186,7 @@ TabPage TAB_WIZ_COLUMN_SELECT }; ImageButton IB_COLUMN_LH { + HelpID = "dbaccess:ImageButton:TAB_WIZ_COLUMN_SELECT:IB_COLUMN_LH"; Pos = MAP_APPFONT ( WINDOW_BORDER_X + 116 , WINDOW_BORDER_Y + 65) ; Size = MAP_APPFONT ( 20 , 14 ) ; TabStop = TRUE ; @@ -198,6 +206,7 @@ TabPage TAB_WIZ_COLUMN_SELECT }; ImageButton IB_COLUMNS_LH { + HelpID = "dbaccess:ImageButton:TAB_WIZ_COLUMN_SELECT:IB_COLUMNS_LH"; Pos = MAP_APPFONT ( WINDOW_BORDER_X + 116 , WINDOW_BORDER_Y + 85) ; Size = MAP_APPFONT ( 20 , 14 ) ; TabStop = TRUE ; @@ -218,6 +227,7 @@ TabPage TAB_WIZ_COLUMN_SELECT MultiListBox LB_NEW_COLUMN_NAMES { + HelpID = "dbaccess:MultiListBox:TAB_WIZ_COLUMN_SELECT:LB_NEW_COLUMN_NAMES"; Border = TRUE ; Pos = MAP_APPFONT ( WINDOW_BORDER_X + 157, WINDOW_BORDER_Y) ; Size = MAP_APPFONT ( 95 , WINDOW_SIZE_Y - 23 ) ; @@ -243,6 +253,7 @@ TabPage TAB_WIZ_TYPE_SELECT MultiListBox LB_NEW_COLUMN_NAMES { + HelpID = "dbaccess:MultiListBox:TAB_WIZ_TYPE_SELECT:LB_NEW_COLUMN_NAMES"; Border = TRUE ; Pos = MAP_APPFONT ( 6 , 6 ) ; Size = MAP_APPFONT ( 87 , WINDOW_SIZE_Y - 12 ) ; @@ -262,6 +273,7 @@ TabPage TAB_WIZ_TYPE_SELECT TabPage CONTROL_CONTAINER { + HelpID = "dbaccess:TabPage:CONTROL_CONTAINER"; Pos = MAP_APPFONT ( 102 , WINDOW_BORDER_Y ) ; Size = MAP_APPFONT ( WINDOW_SIZE_X - 111, WINDOW_SIZE_Y - WINDOW_BORDER_Y - 67 ); SVLook = TRUE; @@ -284,6 +296,7 @@ TabPage TAB_WIZ_TYPE_SELECT NumericField ET_AUTO { + HelpID = "dbaccess:NumericField:TAB_WIZ_TYPE_SELECT:ET_AUTO"; Border = TRUE ; Pos = MAP_APPFONT ( 151 , WINDOW_SIZE_Y - WINDOW_BORDER_Y - 29) ; Size = MAP_APPFONT ( 40 , 12 ) ; @@ -292,6 +305,7 @@ TabPage TAB_WIZ_TYPE_SELECT PushButton PB_AUTO { + HelpID = "dbaccess:PushButton:TAB_WIZ_TYPE_SELECT:PB_AUTO"; Pos = MAP_APPFONT ( WINDOW_SIZE_X - 62 , WINDOW_SIZE_Y - WINDOW_BORDER_Y - 30 ) ; Size = MAP_APPFONT ( BUTTON_SIZE_X , BUTTON_SIZE_Y ) ; TabStop = TRUE ; @@ -306,7 +320,7 @@ Menu RID_SBA_RTF_PKEYPOPUP MenuItem { Identifier = SID_TABLEDESIGN_TABED_PRIMARYKEY ; - HelpID = SID_TABLEDESIGN_TABED_PRIMARYKEY ; + HelpID = HID_TABLEDESIGN_TABED_PRIMARYKEY ; Checkable = TRUE ; Text [ en-US ] = "Primary Key" ; }; @@ -318,6 +332,7 @@ Menu RID_SBA_RTF_PKEYPOPUP //================================================================== TabPage TAB_WIZ_NAME_MATCHING { + HelpID = "dbaccess:TabPage:TAB_WIZ_NAME_MATCHING"; SVLook = TRUE ; Size = MAP_APPFONT ( WINDOW_SIZE_X , WINDOW_SIZE_Y ) ; @@ -359,6 +374,7 @@ TabPage TAB_WIZ_NAME_MATCHING ImageButton IB_COLUMN_UP { + HelpID = "dbaccess:ImageButton:TAB_WIZ_NAME_MATCHING:IB_COLUMN_UP"; Pos = MAP_APPFONT ( 19 , 45 ) ; Size = MAP_APPFONT ( 14 , 14 ) ; TabStop = TRUE; @@ -379,6 +395,7 @@ TabPage TAB_WIZ_NAME_MATCHING }; ImageButton IB_COLUMN_DOWN { + HelpID = "dbaccess:ImageButton:TAB_WIZ_NAME_MATCHING:IB_COLUMN_DOWN"; Pos = MAP_APPFONT ( 19 , 63 ) ; Size = MAP_APPFONT ( 14 , 14 ) ; TabStop = TRUE; @@ -398,6 +415,7 @@ TabPage TAB_WIZ_NAME_MATCHING }; ImageButton IB_COLUMN_UP_RIGHT { + HelpID = "dbaccess:ImageButton:TAB_WIZ_NAME_MATCHING:IB_COLUMN_UP_RIGHT"; Pos = MAP_APPFONT ( WINDOW_SIZE_X - 33, 45 ) ; Size = MAP_APPFONT ( 14 , 14 ) ; TabStop = TRUE; @@ -418,6 +436,7 @@ TabPage TAB_WIZ_NAME_MATCHING }; ImageButton IB_COLUMN_DOWN_RIGHT { + HelpID = "dbaccess:ImageButton:TAB_WIZ_NAME_MATCHING:IB_COLUMN_DOWN_RIGHT"; Pos = MAP_APPFONT ( WINDOW_SIZE_X - 33, 63) ; Size = MAP_APPFONT ( 14 , 14 ) ; TabStop = TRUE ; @@ -438,6 +457,7 @@ TabPage TAB_WIZ_NAME_MATCHING PushButton PB_ALL { + HelpID = "dbaccess:PushButton:TAB_WIZ_NAME_MATCHING:PB_ALL"; Pos = MAP_APPFONT ( 6, 83) ; Size = MAP_APPFONT ( 40 , 14 ) ; TabStop = TRUE ; @@ -446,6 +466,7 @@ TabPage TAB_WIZ_NAME_MATCHING PushButton PB_NONE { + HelpID = "dbaccess:PushButton:TAB_WIZ_NAME_MATCHING:PB_NONE"; Pos = MAP_APPFONT ( 6, 103) ; Size = MAP_APPFONT ( 40 , 14 ) ; TabStop = TRUE ; @@ -485,12 +506,14 @@ TabPage TAB_WIZ_COPYTABLE }; RadioButton RB_DEFDATA { + HelpID = "dbaccess:RadioButton:TAB_WIZ_COPYTABLE:RB_DEFDATA"; Pos = MAP_APPFONT ( 12 , 35 ) ; Size = MAP_APPFONT ( 73 , 10 ) ; Text [ en-US ] = "De~finition and data" ; }; RadioButton RB_DEF { + HelpID = "dbaccess:RadioButton:TAB_WIZ_COPYTABLE:RB_DEF"; Pos = MAP_APPFONT ( 12, 49 ) ; Size = MAP_APPFONT ( 73 , 10 ) ; Text [ en-US ] = "Def~inition" ; @@ -498,6 +521,7 @@ TabPage TAB_WIZ_COPYTABLE RadioButton RB_VIEW { + HelpID = "dbaccess:RadioButton:TAB_WIZ_COPYTABLE:RB_VIEW"; Pos = MAP_APPFONT ( 12, 63 ) ; Size = MAP_APPFONT ( 73 , 10 ) ; Text [ en-US ] = "A~s table view"; @@ -505,6 +529,7 @@ TabPage TAB_WIZ_COPYTABLE RadioButton RB_APPENDDATA { + HelpID = "dbaccess:RadioButton:TAB_WIZ_COPYTABLE:RB_APPENDDATA"; Pos = MAP_APPFONT ( 12, 77 ) ; Size = MAP_APPFONT ( 73 , 10 ) ; Text [ en-US ] = "Append ~data" ; @@ -512,6 +537,7 @@ TabPage TAB_WIZ_COPYTABLE CheckBox CB_USEHEADERLINE { + HelpID = "dbaccess:CheckBox:TAB_WIZ_COPYTABLE:CB_USEHEADERLINE"; Pos = MAP_APPFONT ( 12, 93 ) ; Size = MAP_APPFONT ( WINDOW_SIZE_X - 18, 10 ) ; Text [ en-US ] = "Use first ~line as column names" ; @@ -519,6 +545,7 @@ TabPage TAB_WIZ_COPYTABLE CheckBox CB_PRIMARY_COLUMN { + HelpID = "dbaccess:CheckBox:TAB_WIZ_COPYTABLE:CB_PRIMARY_COLUMN"; Pos = MAP_APPFONT ( 12, 107 ) ; Size = MAP_APPFONT ( 90 , 10 ) ; Text [ en-US ] = "Crea~te primary key"; @@ -532,6 +559,7 @@ TabPage TAB_WIZ_COPYTABLE Edit ET_KEYNAME { + HelpID = "dbaccess:Edit:TAB_WIZ_COPYTABLE:ET_KEYNAME"; Pos = MAP_APPFONT ( 80, 120 ) ; Size = MAP_APPFONT ( 65 , 12 ) ; TabStop = TRUE ; diff --git a/dbaccess/source/ui/misc/dbumiscres.src b/dbaccess/source/ui/misc/dbumiscres.src index ae5979c0a..974b36e68 100644 --- a/dbaccess/source/ui/misc/dbumiscres.src +++ b/dbaccess/source/ui/misc/dbumiscres.src @@ -96,5 +96,5 @@ String STR_NAMED_OBJECT_ALREADY_EXISTS String RID_STR_EXTENSION_NOT_PRESENT { // #i96130# use hard coded name - Text [ en-US ] = "The report, \"$file$\", requires the extension Sun Report Builder."; + Text [ en-US ] = "The report, \"$file$\", requires the extension Oracle Report Builder."; }; diff --git a/dbaccess/source/ui/misc/uiservices.cxx b/dbaccess/source/ui/misc/uiservices.cxx index e014d6e8e..dfba568a1 100644 --- a/dbaccess/source/ui/misc/uiservices.cxx +++ b/dbaccess/source/ui/misc/uiservices.cxx @@ -118,28 +118,6 @@ extern "C" DBACCESS_DLLPUBLIC void SAL_CALL component_getImplementationEnvironme } //--------------------------------------------------------------------------------------- -extern "C" DBACCESS_DLLPUBLIC sal_Bool SAL_CALL component_writeInfo( - void* pServiceManager, - void* pRegistryKey - ) -{ - if (pRegistryKey) - try - { - writeDBLoaderInfo(pRegistryKey); - return ::dbaui::OModuleRegistration::writeComponentInfos( - static_cast<XMultiServiceFactory*>(pServiceManager), - static_cast<XRegistryKey*>(pRegistryKey)); - } - catch (InvalidRegistryException& ) - { - OSL_ENSURE(sal_False, "DBA::component_writeInfo : could not create a registry key ! ## InvalidRegistryException !"); - } - - return sal_False; -} - -//--------------------------------------------------------------------------------------- extern "C" DBACCESS_DLLPUBLIC void* SAL_CALL component_getFactory( const sal_Char* pImplementationName, void* pServiceManager, diff --git a/dbaccess/source/ui/querydesign/QueryDesignView.cxx b/dbaccess/source/ui/querydesign/QueryDesignView.cxx index ab8975065..4e04790ad 100644 --- a/dbaccess/source/ui/querydesign/QueryDesignView.cxx +++ b/dbaccess/source/ui/querydesign/QueryDesignView.cxx @@ -549,7 +549,7 @@ namespace else if (SQL_ISRULEOR2(pNode,search_condition,boolean_term) && // AND/OR-Verknuepfung: pNode->count() == 3) { - // nur AND Verknüpfung zulassen + // nur AND Verkn�pfung zulassen if (!SQL_ISTOKEN(pNode->getChild(1),AND)) eErrorCode = eIllegalJoinCondition; else if ( eOk == (eErrorCode = InsertJoinConnection(_pView,pNode->getChild(0), _eJoinType,pLeftTable,pRightTable)) ) @@ -840,7 +840,7 @@ namespace } } } - // nur einmal für jedes Feld + // nur einmal f�r jedes Feld else if ( !i && pEntryField->isCondition() ) { if (!aWhereStr.getLength()) // noch keine Kriterien @@ -1864,7 +1864,7 @@ namespace if ( !checkJoinConditions(_pView,pNode->getChild(0)) || !checkJoinConditions(_pView,pRightTableRef)) return sal_False; - // named column join wird später vieleicht noch implementiert + // named column join wird sp�ter vieleicht noch implementiert // SQL_ISRULE(pNode->getChild(4),named_columns_join) EJoinType eJoinType = INNER_JOIN; bool bNatural = false; @@ -2136,7 +2136,7 @@ namespace return eNoSelectStatement; ::connectivity::OSQLParseNode* pParseTree = pNode->getChild(2); // selection - sal_Bool bFirstField = sal_True; // bei der Initialisierung muß auf alle Faelle das erste Feld neu aktiviert werden + sal_Bool bFirstField = sal_True; // bei der Initialisierung mu� auf alle Faelle das erste Feld neu aktiviert werden SqlParseError eErrorCode = eOk; @@ -2194,6 +2194,11 @@ namespace _pView->getLocale(), static_cast<sal_Char>(_pView->getDecimalSeparator().toChar()), &rController.getParser().getContext()); + //pColumnRef->parseNodeToStr( aColumns, + // xConnection, + // &rController.getParser().getContext(), + // sal_True, + // sal_True); // quote is to true because we need quoted elements inside the function sal_Int32 nFunctionType = FKT_NONE; ::connectivity::OSQLParseNode* pParamRef = NULL; @@ -3211,6 +3216,7 @@ void OQueryDesignView::fillFunctionInfo( const ::connectivity::OSQLParseNode* p aInfo->SetField(sFieldName); aInfo->SetTabWindow(NULL); } + // ----------------------------------------------------------------------------- /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx index e0993e972..08a5e38ac 100644 --- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx +++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx @@ -217,7 +217,7 @@ void OSelectionBrowseBox::initialize() m_aFunctionStrings += String(RTL_CONSTASCII_USTRINGPARAM(";")); m_aFunctionStrings += sGroup; - // Diese Funktionen stehen nur unter CORE zur Verfügung + // Diese Funktionen stehen nur unter CORE zur Verf�gung if ( lcl_SupportsCoreSQLGrammar(xConnection) ) { xub_StrLen nCount = m_aFunctionStrings.GetTokenCount(); @@ -1068,7 +1068,7 @@ sal_Bool OSelectionBrowseBox::SaveModified() { strOldCellContents = pEntry->GetFunction(); sal_uInt16 nPos = m_pFunctionCell->GetSelectEntryPos(); - // Diese Funktionen stehen nur unter CORE zur Verfügung + // Diese Funktionen stehen nur unter CORE zur Verf�gung String sFunctionName = m_pFunctionCell->GetEntry(nPos); String sGroupFunctionName = m_aFunctionStrings.GetToken(m_aFunctionStrings.GetTokenCount()-1); sal_Bool bGroupBy = sal_False; @@ -1352,7 +1352,7 @@ void OSelectionBrowseBox::RemoveField(sal_uInt16 nColumnId ) //------------------------------------------------------------------------------ void OSelectionBrowseBox::adjustSelectionMode( sal_Bool _bClickedOntoHeader, sal_Bool _bClickedOntoHandleCol ) { - // wenn ein Header selectiert wird, muß die selection angezeigt werden, sonst nicht) + // wenn ein Header selectiert wird, mu� die selection angezeigt werden, sonst nicht) if ( _bClickedOntoHeader ) { if (0 == GetSelectColumnCount() ) @@ -2648,7 +2648,7 @@ void OSelectionBrowseBox::enableControl(const OTableFieldDescRef& _rEntry,Window _pControl->EnableInput(bEnable); } // ----------------------------------------------------------------------------- -void OSelectionBrowseBox::setTextCellContext(const OTableFieldDescRef& _rEntry,const String& _sText,ULONG _nHelpId) +void OSelectionBrowseBox::setTextCellContext(const OTableFieldDescRef& _rEntry,const String& _sText,const rtl::OString& _sHelpId) { m_pTextCell->SetText(_sText); m_pTextCell->ClearModifyFlag(); @@ -2657,10 +2657,10 @@ void OSelectionBrowseBox::setTextCellContext(const OTableFieldDescRef& _rEntry,c enableControl(_rEntry,m_pTextCell); - if (m_pTextCell->GetHelpId() != _nHelpId) + if (m_pTextCell->GetHelpId() != _sHelpId) // da TextCell in verschiedenen Kontexten verwendet wird, muss ich den gecachten HelpText loeschen m_pTextCell->SetHelpText(String()); - m_pTextCell->SetHelpId(_nHelpId); + m_pTextCell->SetHelpId(_sHelpId); } // ----------------------------------------------------------------------------- void OSelectionBrowseBox::invalidateUndoRedo() @@ -2754,7 +2754,7 @@ void OSelectionBrowseBox::setFunctionCell(OTableFieldDescRef& _pEntry) Reference< XConnection> xConnection = static_cast<OQueryController&>(getDesignView()->getController()).getConnection(); if ( xConnection.is() ) { - // Diese Funktionen stehen nur unter CORE zur Verfügung + // Diese Funktionen stehen nur unter CORE zur Verf�gung if ( lcl_SupportsCoreSQLGrammar(xConnection) ) { // if we have an asterix, no other function than count is allowed diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx b/dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx index 6b01ccb6c..a6c23cf14 100644 --- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx +++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx @@ -245,7 +245,7 @@ namespace dbaui void appendUndoAction(const String& _rOldValue,const String& _rNewValue,sal_Int32 _nRow); OTableFields& getFields() const; void enableControl(const OTableFieldDescRef& _rEntry,Window* _pControl); - void setTextCellContext(const OTableFieldDescRef& _rEntry,const String& _sText,ULONG _nHelpId); + void setTextCellContext(const OTableFieldDescRef& _rEntry,const String& _sText,const rtl::OString& _sHelpId); void invalidateUndoRedo(); OTableFieldDescRef getEntry(OTableFields::size_type _nPos); diff --git a/dbaccess/source/ui/querydesign/querydlg.src b/dbaccess/source/ui/querydesign/querydlg.src index 0da839f7b..6a10478d1 100644 --- a/dbaccess/source/ui/querydesign/querydlg.src +++ b/dbaccess/source/ui/querydesign/querydlg.src @@ -82,6 +82,7 @@ ModalDialog DLG_QRY_JOIN }; CheckBox CB_NATURAL { + HelpID = "dbaccess:CheckBox:DLG_QRY_JOIN:CB_NATURAL"; Pos = MAP_APPFONT ( 101 , 31 ) ; Size = MAP_APPFONT ( 89 , 8 ) ; diff --git a/dbaccess/source/ui/tabledesign/TEditControl.cxx b/dbaccess/source/ui/tabledesign/TEditControl.cxx index 4f4dedb21..7c1587ad8 100644 --- a/dbaccess/source/ui/tabledesign/TEditControl.cxx +++ b/dbaccess/source/ui/tabledesign/TEditControl.cxx @@ -55,6 +55,9 @@ #include "FieldDescControl.hxx" #include "TableFieldControl.hxx" #include "dsntypes.hxx" +#include "dsntypes.hxx" + +#include "dbaccess_slotid.hrc" using namespace ::dbaui; using namespace ::comphelper; @@ -1527,7 +1530,7 @@ sal_Bool OTableEditorCtrl::IsPrimaryKeyAllowed( long /*nRow*/ ) Reference<XPropertySet> xTable = rController.getTable(); ////////////////////////////////////////////////////////////// // Key darf nicht veraendert werden - // Dies gilt jedoch nur, wenn die Tabelle nicht neu ist und keine ::com::sun::star::sdbcx::View. Ansonsten wird kein DROP ausgeführt + // Dies gilt jedoch nur, wenn die Tabelle nicht neu ist und keine ::com::sun::star::sdbcx::View. Ansonsten wird kein DROP ausgef�hrt if(xTable.is() && ::comphelper::getString(xTable->getPropertyValue(PROPERTY_TYPE)) == ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("VIEW"))) return sal_False; @@ -1549,7 +1552,7 @@ sal_Bool OTableEditorCtrl::IsPrimaryKeyAllowed( long /*nRow*/ ) { ////////////////////////////////////////////////////////////// // Wenn Feldtyp Memo oder Image, kein PrimKey - // oder wenn Spalten nicht gedroped werden können und das Required Flag ist nicht gesetzt + // oder wenn Spalten nicht gedroped werden k�nnen und das Required Flag ist nicht gesetzt // oder wenn eine ::com::sun::star::sdbcx::View vorhanden ist und das Required Flag nicht gesetzt ist TOTypeInfoSP pTypeInfo = pFieldDescr->getTypeInfo(); if( pTypeInfo->nSearchType == ColumnSearch::NONE diff --git a/dbaccess/source/ui/tabledesign/TableController.cxx b/dbaccess/source/ui/tabledesign/TableController.cxx index 9e3805ceb..0e0549ec6 100644 --- a/dbaccess/source/ui/tabledesign/TableController.cxx +++ b/dbaccess/source/ui/tabledesign/TableController.cxx @@ -1594,6 +1594,14 @@ sal_Int32 OTableController::getFirstEmptyRowPosition() nRet = m_vRowList.size(); m_vRowList.push_back( pTabEdRow); } + if ( nRet == -1 ) + { + bool bReadRow = !isAddAllowed(); + ::boost::shared_ptr<OTableRow> pTabEdRow(new OTableRow()); + pTabEdRow->SetReadOnly(bReadRow); + nRet = m_vRowList.size(); + m_vRowList.push_back( pTabEdRow); + } return nRet; } // ----------------------------------------------------------------------------- diff --git a/dbaccess/source/ui/tabledesign/table.src b/dbaccess/source/ui/tabledesign/table.src index bffb9404d..3dd3d0b59 100644 --- a/dbaccess/source/ui/tabledesign/table.src +++ b/dbaccess/source/ui/tabledesign/table.src @@ -111,17 +111,14 @@ String STR_TAB_FIELD_LENGTH { Text [ en-US ] = "Field length" ; }; - String STR_TAB_HELP_TEXT { Text [ en-US ] = "Description" ; }; - String STR_COLUMN_DESCRIPTION { Text [ en-US ] = "Column Description" ; }; - String STR_TAB_FIELD_NULLABLE { Text [ en-US ] = "Input required" ; @@ -171,38 +168,38 @@ Menu RID_TABLEDESIGNROWPOPUPMENU { ItemList = { - MenuItem - { - ITEM_EDIT_CUT - }; - MenuItem - { - ITEM_EDIT_COPY - }; - MenuItem - { - ITEM_EDIT_PASTE - }; - MenuItem - { - ITEM_EDIT_DELETE - }; - MenuItem - { - Identifier = SID_TABLEDESIGN_INSERTROWS ; - HelpID = SID_TABLEDESIGN_INSERTROWS ; - Text [ en-US ] = "Insert Rows" ; - }; - MenuItem - { - Separator = TRUE ; + MenuItem + { + ITEM_EDIT_CUT + }; + MenuItem + { + ITEM_EDIT_COPY + }; + MenuItem + { + ITEM_EDIT_PASTE + }; + MenuItem + { + ITEM_EDIT_DELETE + }; + MenuItem + { + Identifier = SID_TABLEDESIGN_INSERTROWS ; + HelpID = HID_TABLEDESIGN_INSERTROWS ; + Text [ en-US ] = "Insert Rows" ; }; - MenuItem - { - Identifier = SID_TABLEDESIGN_TABED_PRIMARYKEY ; - HelpID = SID_TABLEDESIGN_TABED_PRIMARYKEY ; - Checkable = TRUE ; - Text [ en-US ] = "Primary Key" ; + MenuItem + { + Separator = TRUE ; + }; + MenuItem + { + Identifier = SID_TABLEDESIGN_TABED_PRIMARYKEY ; + HelpID = HID_TABLEDESIGN_TABED_PRIMARYKEY ; + Checkable = TRUE ; + Text [ en-US ] = "Primary Key" ; }; }; }; diff --git a/dbaccess/source/ui/uno/copytablewizard.src b/dbaccess/source/ui/uno/copytablewizard.src index a0dd16eab..fc6d00804 100644 --- a/dbaccess/source/ui/uno/copytablewizard.src +++ b/dbaccess/source/ui/uno/copytablewizard.src @@ -66,17 +66,14 @@ String STR_CTW_ERROR_DURING_INITIALIZATION { Text [ en-US ] = "An error occurred during initialization."; }; - String STR_CTW_ERROR_UNSUPPORTED_SETTING { Text [ en-US ] = "Unsupported setting in the copy source descriptor: $name$."; }; - String STR_CTW_ERROR_NO_QUERY { Text [ en-US ] = "To copy a query, your connection must be able to provide queries."; }; - String STR_CTW_ERROR_INVALID_INTERACTIONHANDLER { Text [ en-US ] = "The given interaction handler is invalid."; diff --git a/dbaccess/source/ui/uno/dbinteraction.cxx b/dbaccess/source/ui/uno/dbinteraction.cxx index f0fbb2d03..f0fbb2d03 100644..100755 --- a/dbaccess/source/ui/uno/dbinteraction.cxx +++ b/dbaccess/source/ui/uno/dbinteraction.cxx diff --git a/dbaccess/util/dba.component b/dbaccess/util/dba.component new file mode 100644 index 000000000..b25768dbf --- /dev/null +++ b/dbaccess/util/dba.component @@ -0,0 +1,63 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!--********************************************************************** +* +* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +* +* Copyright 2000, 2010 Oracle and/or its affiliates. +* +* OpenOffice.org - a multi-platform office productivity suite +* +* This file is part of OpenOffice.org. +* +* OpenOffice.org is free software: you can redistribute it and/or modify +* it under the terms of the GNU Lesser General Public License version 3 +* only, as published by the Free Software Foundation. +* +* OpenOffice.org is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU Lesser General Public License version 3 for more details +* (a copy is included in the LICENSE file that accompanied this code). +* +* You should have received a copy of the GNU Lesser General Public License +* version 3 along with OpenOffice.org. If not, see +* <http://www.openoffice.org/license.html> +* for a copy of the LGPLv3 License. +* +**********************************************************************--> + +<component loader="com.sun.star.loader.SharedLibrary" + xmlns="http://openoffice.org/2010/uno-components"> + <implementation name="com.sun.star.comp.chart2.data.DatabaseDataProvider"> + <service name="com.sun.star.chart2.data.DatabaseDataProvider"/> + </implementation> + <implementation name="com.sun.star.comp.dba.DataAccessDescriptorFactory"> + <service name="com.sun.star.sdb.DataAccessDescriptorFactory"/> + <singleton name="com.sun.star.sdb.DataAccessDescriptorFactory"/> + </implementation> + <implementation name="com.sun.star.comp.dba.OCommandDefinition"> + <service name="com.sun.star.sdb.CommandDefinition"/> + <service name="com.sun.star.sdb.QueryDefinition"/> + </implementation> + <implementation name="com.sun.star.comp.dba.OComponentDefinition"> + <service name="com.sun.star.sdb.TableDefinition"/> + </implementation> + <implementation name="com.sun.star.comp.dba.ODatabaseContext"> + <service name="com.sun.star.sdb.DatabaseContext"/> + </implementation> + <implementation name="com.sun.star.comp.dba.ODatabaseDocument"> + <service name="com.sun.star.document.OfficeDocument"/> + <service name="com.sun.star.sdb.OfficeDatabaseDocument"/> + </implementation> + <implementation name="com.sun.star.comp.dba.ODatabaseSource"> + <service name="com.sun.star.sdb.DataSource"/> + <service name="com.sun.star.sdb.DocumentDataSource"/> + </implementation> + <implementation name="com.sun.star.comp.dba.ORowSet"> + <service name="com.sun.star.sdb.ResultSet"/> + <service name="com.sun.star.sdb.RowSet"/> + <service name="com.sun.star.sdbc.ResultSet"/> + <service name="com.sun.star.sdbc.RowSet"/> + <service name="com.sun.star.sdbcx.ResultSet"/> + </implementation> +</component> diff --git a/dbaccess/util/dbu.component b/dbaccess/util/dbu.component new file mode 100644 index 000000000..ce0dc45cf --- /dev/null +++ b/dbaccess/util/dbu.component @@ -0,0 +1,116 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!--********************************************************************** +* +* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +* +* Copyright 2000, 2010 Oracle and/or its affiliates. +* +* OpenOffice.org - a multi-platform office productivity suite +* +* This file is part of OpenOffice.org. +* +* OpenOffice.org is free software: you can redistribute it and/or modify +* it under the terms of the GNU Lesser General Public License version 3 +* only, as published by the Free Software Foundation. +* +* OpenOffice.org is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU Lesser General Public License version 3 for more details +* (a copy is included in the LICENSE file that accompanied this code). +* +* You should have received a copy of the GNU Lesser General Public License +* version 3 along with OpenOffice.org. If not, see +* <http://www.openoffice.org/license.html> +* for a copy of the LGPLv3 License. +* +**********************************************************************--> + +<component loader="com.sun.star.loader.SharedLibrary" + xmlns="http://openoffice.org/2010/uno-components"> + <implementation name="com.sun.star.comp.dbaccess.DatabaseInteractionHandler"> + <service name="com.sun.star.sdb.DatabaseInteractionHandler"/> + </implementation> + <implementation name="com.sun.star.comp.dbaccess.LegacyInteractionHandler"> + <service name="com.sun.star.sdb.InteractionHandler"/> + </implementation> + <implementation + name="com.sun.star.comp.dbaccess.OTextConnectionSettingsDialog"> + <service name="com.sun.star.sdb.TextConnectionSettings"/> + </implementation> + <implementation name="com.sun.star.comp.dbu.OColumnControl"> + <service name="com.sun.star.sdb.ColumnDescriptorControl"/> + </implementation> + <implementation name="com.sun.star.comp.dbu.OColumnControlModel"> + <service name="com.sun.star.sdb.ColumnDescriptorControlModel"/> + </implementation> + <implementation name="com.sun.star.comp.dbu.SbaXGridControl"> + <service name="com.sun.star.form.control.GridControl"/> + <service name="com.sun.star.form.control.InteractionGridControl"/> + </implementation> + <implementation name="com.sun.star.comp.sdb.DirectSQLDialog"> + <service name="org.openoffice.comp.dbu.DirectSqlDialog"/> + </implementation> + <implementation name="com.sun.star.sdb.ApplicationStatusbarController"> + <service name="com.sun.star.frame.StatusbarController"/> + </implementation> + <implementation name="com.sun.star.sdb.ApplicationToolboxController"> + <service name="com.sun.star.frame.ToolboxController"/> + </implementation> + <implementation name="com.sun.star.uno.comp.sdb.RowsetFilterDialog"> + <service name="com.sun.star.sdb.FilterDialog"/> + </implementation> + <implementation name="com.sun.star.uno.comp.sdb.RowsetOrderDialog"> + <service name="com.sun.star.sdb.OrderDialog"/> + </implementation> + <implementation name="org.openoffice.comp.dbu.CopyTableWizard"> + <service name="com.sun.star.sdb.application.CopyTableWizard"/> + </implementation> + <implementation name="org.openoffice.comp.dbu.DBContentLoader"> + <service name="com.sun.star.frame.FrameLoader"/> + <service name="com.sun.star.sdb.ContentLoader"/> + </implementation> + <implementation name="org.openoffice.comp.dbu.OAdvancedSettingsDialog"> + <service name="com.sun.star.sdb.AdvancedDatabaseSettingsDialog"/> + </implementation> + <implementation name="org.openoffice.comp.dbu.OApplicationController"> + <service name="com.sun.star.sdb.application.DefaultViewController"/> + </implementation> + <implementation name="org.openoffice.comp.dbu.ODBTypeWizDialog"> + <service name="com.sun.star.sdb.DataSourceTypeChangeDialog"/> + </implementation> + <implementation name="org.openoffice.comp.dbu.ODBTypeWizDialogSetup"> + <service name="com.sun.star.sdb.DatabaseWizardDialog"/> + </implementation> + <implementation + name="org.openoffice.comp.dbu.ODatasourceAdministrationDialog"> + <service name="com.sun.star.sdb.DatasourceAdministrationDialog"/> + </implementation> + <implementation name="org.openoffice.comp.dbu.ODatasourceBrowser"> + <service name="com.sun.star.sdb.DataSourceBrowser"/> + </implementation> + <implementation name="org.openoffice.comp.dbu.OFormGridView"> + <service name="com.sun.star.sdb.FormGridView"/> + </implementation> + <implementation name="org.openoffice.comp.dbu.OQueryDesign"> + <service name="com.sun.star.sdb.QueryDesign"/> + </implementation> + <implementation name="org.openoffice.comp.dbu.ORelationDesign"> + <service name="com.sun.star.sdb.RelationDesign"/> + </implementation> + <implementation name="org.openoffice.comp.dbu.OSQLMessageDialog"> + <service name="com.sun.star.sdb.ErrorMessageDialog"/> + </implementation> + <implementation name="org.openoffice.comp.dbu.OTableDesign"> + <service name="com.sun.star.sdb.TableDesign"/> + </implementation> + <implementation name="org.openoffice.comp.dbu.OTableFilterDialog"> + <service name="com.sun.star.sdb.TableFilterDialog"/> + </implementation> + <implementation name="org.openoffice.comp.dbu.OUserSettingsDialog"> + <service name="com.sun.star.sdb.UserAdministrationDialog"/> + </implementation> + <implementation name="org.openoffice.comp.dbu.OViewDesign"> + <service name="com.sun.star.sdb.ViewDesign"/> + </implementation> +</component> diff --git a/dbaccess/util/hidother.src b/dbaccess/util/hidother.src index e929d63d0..1fe5b6ca2 100644 --- a/dbaccess/util/hidother.src +++ b/dbaccess/util/hidother.src @@ -26,10 +26,6 @@ ************************************************************************/ #include "../inc/dbaccess_helpid.hrc" -#include "../inc/dbaccess_slotid.hrc" -#ifndef _SBASLTID_HRC -#include <svx/svxids.hrc> -#endif hidspecial HID_DLG_FILTERCRIT { HelpId = HID_DLG_FILTERCRIT; }; hidspecial HID_DLG_ORDERCRIT { HelpId = HID_DLG_ORDERCRIT; }; @@ -148,8 +144,11 @@ hidspecial HID_TABDESIGN_TYPECELL { HelpId = HID_TABDESIGN_TYPECELL; }; hidspecial HID_TABDESIGN_COMMENTCELL { HelpId = HID_TABDESIGN_COMMENTCELL; }; hidspecial HID_TABDESIGN_HELPTEXT { HelpId = HID_TABDESIGN_HELPTEXT; }; +/* hidspecial SID_TABLEDESIGN_INSERTROWS { HelpId = SID_TABLEDESIGN_INSERTROWS; }; hidspecial SID_TABLEDESIGN_TABED_PRIMARYKEY { HelpId = SID_TABLEDESIGN_TABED_PRIMARYKEY; }; +*/ + hidspecial HID_TLB_TABLEDESIGN { HelpId = HID_TLB_TABLEDESIGN; }; hidspecial HID_TAB_DESIGN_HELP_TEXT_FRAME { HelpId = HID_TAB_DESIGN_HELP_TEXT_FRAME; }; hidspecial HID_TABLE_DESIGN_TABPAGE_GENERAL { HelpId = HID_TABLE_DESIGN_TABPAGE_GENERAL; }; @@ -169,7 +168,6 @@ hidspecial HID_BROWSER_TABLE_CREATE_DESIGN { HelpId = HID_BROWSER_TABLE_CREAT hidspecial HID_BROWSER_TABLE_EDIT { HelpId = HID_BROWSER_TABLE_EDIT; }; hidspecial HID_BROWSER_TABLE_DELETE { HelpId = HID_BROWSER_TABLE_DELETE; }; hidspecial HID_SQLERROR_EXCHAIN_ERRORS { HelpId = HID_SQLERROR_EXCHAIN_ERRORS; }; -hidspecial HID_DBACCESS_START { HelpId = HID_DBACCESS_START; }; hidspecial HID_SQLERROR_EXCHAIN_TEXT { HelpId = HID_SQLERROR_EXCHAIN_TEXT; }; hidspecial HID_TAB_WIZ_COLUMN_SELECT { HelpId = HID_TAB_WIZ_COLUMN_SELECT; }; hidspecial HID_TAB_WIZ_TYPE_SELECT { HelpId = HID_TAB_WIZ_TYPE_SELECT; }; @@ -254,11 +252,13 @@ hidspecial HID_DLG_REL_CASC_UPD_DEFAULT { HelpId = HID_DLG_REL_CASC_UPD_DEFA hidspecial HID_BROWSER_SAVE_RECORD { HelpId = HID_BROWSER_SAVE_RECORD ; }; hidspecial HID_BROWSER_UNDO_RECORD { HelpId = HID_BROWSER_UNDO_RECORD ; }; +/* // missing pre processor for helpids so we have to include them here hidspecial SID_RELATION_ADD_RELATION { HelpId = SID_RELATION_ADD_RELATION ; }; hidspecial SID_FM_NATIVESQL { HelpId = SID_FM_NATIVESQL ; }; hidspecial SID_FM_ADDTABLE { HelpId = SID_FM_ADDTABLE ; }; hidspecial SID_FM_EXECUTE { HelpId = SID_FM_EXECUTE ; }; +*/ hidspecial HID_DSADMIN_SQL92CHECK { HelpId = HID_DSADMIN_SQL92CHECK ; }; hidspecial HID_DSADMIN_AUTOINCREMENTVALUE { HelpId = HID_DSADMIN_AUTOINCREMENTVALUE ; }; @@ -301,7 +301,6 @@ hidspecial UID_APP_VIEW_VERT_SPLIT { HelpId = UID_APP_VIEW_VERT_SPLIT ; }; hidspecial UID_APP_VIEW_BORDER_WIN { HelpId = UID_APP_VIEW_BORDER_WIN ; }; hidspecial HID_APP_CREATION_LIST { HelpId = HID_APP_CREATION_LIST ; }; hidspecial UID_APP_SWAP_VIEW { HelpId = UID_APP_SWAP_VIEW ; }; -hidspecial UID_DLG_TABLE_FILTER { HelpId = UID_DLG_TABLE_FILTER ; }; hidspecial HID_APP_SWAP_ICONCONTROL { HelpId = HID_APP_SWAP_ICONCONTROL ; }; hidspecial HID_DSADMIN_APPENDTABLEALIAS { HelpId = HID_DSADMIN_APPENDTABLEALIAS ; }; @@ -350,13 +349,13 @@ hidspecial HID_PAGE_DBWIZARD_GENERAL_RB_GETEXISTINGDATABASE { HelpId = HID_PAG hidspecial HID_PAGE_DBWIZARD_DBASE_ET_DBASELOCATION { HelpId = HID_PAGE_DBWIZARD_DBASE_ET_DBASELOCATION ; }; hidspecial HID_PAGE_DBWIZARD_DBASE_PB_DBASELOCATION { HelpId = HID_PAGE_DBWIZARD_DBASE_PB_DBASELOCATION ; }; +/* hidspecial SID_INDEXDESIGN { HelpId = SID_INDEXDESIGN; }; hidspecial SID_DOCUMENT_DATA_SOURCE { HelpId = SID_DOCUMENT_DATA_SOURCE; }; hidspecial SID_DB_NEW { HelpId = SID_DB_NEW; }; hidspecial SID_DB_APP_DISABLE_PREVIEW { HelpId = SID_DB_APP_DISABLE_PREVIEW; }; hidspecial SID_DB_APP_DSCONNECTION_TYPE { HelpId = SID_DB_APP_DSCONNECTION_TYPE; }; hidspecial SID_DB_APP_DSADVANCED_SETTINGS { HelpId = SID_DB_APP_DSADVANCED_SETTINGS; }; - hidspecial SID_DB_APP_VIEW_DOCINFO_PREVIEW { HelpId = SID_DB_APP_VIEW_DOCINFO_PREVIEW; }; hidspecial SID_DB_APP_VIEW_DOC_PREVIEW { HelpId = SID_DB_APP_VIEW_DOC_PREVIEW; }; hidspecial SID_DB_APP_VIEW_TABLES { HelpId = SID_DB_APP_VIEW_TABLES; }; @@ -369,38 +368,31 @@ hidspecial SID_DB_APP_TABLEFILTER { HelpId = SID_DB_APP_TABLEFILTER; }; hidspecial SID_DB_APP_CLOSECONNECTION { HelpId = SID_DB_APP_CLOSECONNECTION; }; hidspecial SID_DB_APP_DSPROPS { HelpId = SID_DB_APP_DSPROPS; }; hidspecial SID_DB_APP_DBADMIN { HelpId = SID_DB_APP_DBADMIN; }; - hidspecial SID_DB_APP_CONVERTTOVIEW { HelpId = SID_DB_APP_CONVERTTOVIEW; }; hidspecial SID_DB_APP_REFRESH_TABLES { HelpId = SID_DB_APP_REFRESH_TABLES; }; hidspecial SID_DB_APP_VIEW_REPORTS { HelpId = SID_DB_APP_VIEW_REPORTS; }; hidspecial SID_DB_APP_DSEXPORT { HelpId = SID_DB_APP_DSEXPORT; }; - hidspecial SID_DB_APP_TABLE_DELETE { HelpId = SID_DB_APP_TABLE_DELETE; }; hidspecial SID_DB_APP_TABLE_RENAME { HelpId = SID_DB_APP_TABLE_RENAME; }; hidspecial SID_DB_APP_TABLE_EDIT { HelpId = SID_DB_APP_TABLE_EDIT; }; hidspecial SID_DB_APP_TABLE_OPEN { HelpId = SID_DB_APP_TABLE_OPEN; }; - hidspecial SID_DB_APP_QUERY_DELETE { HelpId = SID_DB_APP_QUERY_DELETE; }; hidspecial SID_DB_APP_QUERY_RENAME { HelpId = SID_DB_APP_QUERY_RENAME; }; hidspecial SID_DB_APP_QUERY_EDIT { HelpId = SID_DB_APP_QUERY_EDIT; }; hidspecial SID_DB_APP_QUERY_OPEN { HelpId = SID_DB_APP_QUERY_OPEN; }; - hidspecial SID_DB_APP_FORM_DELETE { HelpId = SID_DB_APP_FORM_DELETE; }; hidspecial SID_DB_APP_FORM_RENAME { HelpId = SID_DB_APP_FORM_RENAME; }; hidspecial SID_DB_APP_FORM_EDIT { HelpId = SID_DB_APP_FORM_EDIT; }; hidspecial SID_DB_APP_FORM_OPEN { HelpId = SID_DB_APP_FORM_OPEN; }; - hidspecial SID_DB_APP_REPORT_DELETE { HelpId = SID_DB_APP_REPORT_DELETE; }; hidspecial SID_DB_APP_REPORT_RENAME { HelpId = SID_DB_APP_REPORT_RENAME; }; hidspecial SID_DB_APP_REPORT_EDIT { HelpId = SID_DB_APP_REPORT_EDIT; }; hidspecial SID_DB_APP_REPORT_OPEN { HelpId = SID_DB_APP_REPORT_OPEN; }; - hidspecial SID_DB_APP_DELETE { HelpId = SID_DB_APP_DELETE; }; hidspecial SID_DB_APP_RENAME { HelpId = SID_DB_APP_RENAME; }; hidspecial SID_DB_APP_EDIT { HelpId = SID_DB_APP_EDIT; }; hidspecial SID_DB_APP_EDIT_SQL_VIEW { HelpId = SID_DB_APP_EDIT_SQL_VIEW; }; hidspecial SID_DB_APP_OPEN { HelpId = SID_DB_APP_OPEN; }; - hidspecial SID_BROWSER_CLEAR_QUERY { HelpId = SID_BROWSER_CLEAR_QUERY; }; hidspecial SID_RELATION_ADD_RELATION { HelpId = SID_RELATION_ADD_RELATION; }; hidspecial SID_QUERY_VIEW_FUNCTIONS { HelpId = SID_QUERY_VIEW_FUNCTIONS; }; @@ -410,58 +402,47 @@ hidspecial SID_QUERY_DISTINCT_VALUES { HelpId = SID_QUERY_DISTINCT_VALUES; }; hidspecial SID_FORM_CREATE_REPWIZ_PRE_SEL { HelpId = SID_FORM_CREATE_REPWIZ_PRE_SEL; }; hidspecial SID_REPORT_CREATE_REPWIZ_PRE_SEL { HelpId = SID_REPORT_CREATE_REPWIZ_PRE_SEL; }; hidspecial SID_APP_NEW_REPORT_PRE_SEL { HelpId = SID_APP_NEW_REPORT_PRE_SEL; }; - hidspecial SID_APP_NEW_FOLDER { HelpId = SID_APP_NEW_FOLDER; }; hidspecial SID_APP_NEW_FORM { HelpId = SID_APP_NEW_FORM; }; hidspecial SID_DB_APP_PASTE_SPECIAL { HelpId = SID_DB_APP_PASTE_SPECIAL; }; hidspecial SID_DB_QUERY_PREVIEW { HelpId = SID_DB_QUERY_PREVIEW; }; - hidspecial SID_DB_APP_STATUS_TYPE { HelpId = SID_DB_APP_STATUS_TYPE; }; hidspecial SID_DB_APP_STATUS_DBNAME { HelpId = SID_DB_APP_STATUS_DBNAME; }; hidspecial SID_DB_APP_STATUS_USERNAME { HelpId = SID_DB_APP_STATUS_USERNAME; }; hidspecial SID_DB_APP_STATUS_HOSTNAME { HelpId = SID_DB_APP_STATUS_HOSTNAME; }; - hidspecial SID_DB_APP_SENDREPORTASMAIL { HelpId = SID_DB_APP_SENDREPORTASMAIL; }; hidspecial SID_DB_APP_SENDREPORTTOWRITER { HelpId = SID_DB_APP_SENDREPORTTOWRITER; }; hidspecial SID_DB_NEW_VIEW_SQL { HelpId = SID_DB_NEW_VIEW_SQL; }; +*/ hidspecial HID_PAGE_DBWIZARD_TEXT_ET_LOCATIONTEXTFILE { HelpId = HID_PAGE_DBWIZARD_TEXT_ET_LOCATIONTEXTFILE ; }; hidspecial HID_PAGE_DBWIZARD_TEXT_PB_LOCATIONTEXTFILE { HelpId = HID_PAGE_DBWIZARD_TEXT_PB_LOCATIONTEXTFILE ; }; - hidspecial HID_PAGE_DBWIZARD_TEXT_RB_ACCESSTXTFILES { HelpId = HID_PAGE_DBWIZARD_TEXT_RB_ACCESSTXTFILES ; }; hidspecial HID_PAGE_DBWIZARD_TEXT_RB_ACCESSCSVFILES { HelpId = HID_PAGE_DBWIZARD_TEXT_RB_ACCESSCSVFILES ; }; hidspecial HID_PAGE_DBWIZARD_TEXT_RB_ACCESSOTHERFILES { HelpId = HID_PAGE_DBWIZARD_TEXT_RB_ACCESSOTHERFILES ; }; hidspecial HID_PAGE_DBWIZARD_TEXT_ET_OWNEXTENSION { HelpId = HID_PAGE_DBWIZARD_TEXT_ET_OWNEXTENSION ; }; - hidspecial HID_PAGE_DBWIZARD_TEXT_CB_FIELDSEPARATOR { HelpId = HID_PAGE_DBWIZARD_TEXT_CB_FIELDSEPARATOR ; }; hidspecial HID_PAGE_DBWIZARD_TEXT_CB_TEXTSEPARATOR { HelpId = HID_PAGE_DBWIZARD_TEXT_CB_TEXTSEPARATOR ; }; hidspecial HID_PAGE_DBWIZARD_TEXT_CB_DECIMALSEPARATOR { HelpId = HID_PAGE_DBWIZARD_TEXT_CB_DECIMALSEPARATOR ; }; hidspecial HID_PAGE_DBWIZARD_TEXT_CB_THOUSANDSSEPARATOR { HelpId = HID_PAGE_DBWIZARD_TEXT_CB_THOUSANDSSEPARATOR ; }; - hidspecial HID_PAGE_DBWIZARD_MSACCESS_ET_MSACCESSLOCATION { HelpId = HID_PAGE_DBWIZARD_MSACCESS_ET_MSACCESSLOCATION ; }; hidspecial HID_PAGE_DBWIZARD_MSACCESS_PB_MSACCESSLOCATION { HelpId = HID_PAGE_DBWIZARD_MSACCESS_PB_MSACCESSLOCATION ; }; - hidspecial HID_PAGE_DBWIZARD_LDAP_ET_HOSTSERVER { HelpId = HID_PAGE_DBWIZARD_LDAP_ET_HOSTSERVER ; }; hidspecial HID_PAGE_DBWIZARD_LDAP_ET_BASEDN { HelpId = HID_PAGE_DBWIZARD_LDAP_ET_BASEDN ; }; hidspecial HID_PAGE_DBWIZARD_LDAP_ET_PORTNUMBER { HelpId = HID_PAGE_DBWIZARD_LDAP_ET_PORTNUMBER ; }; hidspecial HID_PAGE_DBWIZARD_LDAP_CB_USESSL { HelpId = HID_PAGE_DBWIZARD_LDAP_CB_USESSL ; }; hidspecial HID_PAGE_DBWIZARD_LDAP_PB_TESTLDAPCONNECTION { HelpId = HID_PAGE_DBWIZARD_LDAP_PB_TESTLDAPCONNECTION ; }; - hidspecial HID_PAGE_DBWIZARD_ADABAS_ET_ADABASNAME { HelpId = HID_PAGE_DBWIZARD_ADABAS_ET_ADABASNAME ; }; hidspecial HID_PAGE_DBWIZARD_ADABAS_PB_ADABASNAME { HelpId = HID_PAGE_DBWIZARD_ADABAS_PB_ADABASNAME ; }; - hidspecial HID_PAGE_DBWIZARD_MYSQL_RB_CONNECTVIAODBC { HelpId = HID_PAGE_DBWIZARD_MYSQL_RB_CONNECTVIAODBC ; }; hidspecial HID_PAGE_DBWIZARD_MYSQL_RB_CONNECTVIAJDBC { HelpId = HID_PAGE_DBWIZARD_MYSQL_RB_CONNECTVIAJDBC ; }; - hidspecial HID_PAGE_DBWIZARD_ORACLE_ET_ORACLEDBNAME { HelpId = HID_PAGE_DBWIZARD_ORACLE_ET_ORACLEDBNAME ; }; hidspecial HID_PAGE_DBWIZARD_ORACLE_ET_ORACLEHOSTSERVER { HelpId = HID_PAGE_DBWIZARD_ORACLE_ET_ORACLEHOSTSERVER ; }; hidspecial HID_PAGE_DBWIZARD_ORACLE_ET_ORACLEPORT { HelpId = HID_PAGE_DBWIZARD_ORACLE_ET_ORACLEPORT ; }; hidspecial HID_PAGE_DBWIZARD_ORACLE_ET_ORACLECLASS { HelpId = HID_PAGE_DBWIZARD_ORACLE_ET_ORACLECLASS ; }; hidspecial HID_PAGE_DBWIZARD_ORACLE_PB_TESTORACLECLASS { HelpId = HID_PAGE_DBWIZARD_ORACLE_PB_TESTORACLECLASS ; }; - hidspecial HID_PAGE_DBWIZARD_JDBC_ET_JDBCURL { HelpId = HID_PAGE_DBWIZARD_JDBC_ET_JDBCURL ; }; hidspecial HID_PAGE_DBWIZARD_JDBC_PB_JDBCURL { HelpId = HID_PAGE_DBWIZARD_JDBC_PB_JDBCURL ; }; - hidspecial HID_PAGE_DBWIZARD_JDBC_ET_MYSQLDBNAME { HelpId = HID_PAGE_DBWIZARD_JDBC_ET_MYSQLDBNAME ; }; hidspecial HID_PAGE_DBWIZARD_JDBC_ET_MYSQLHOSTSERVER { HelpId = HID_PAGE_DBWIZARD_JDBC_ET_MYSQLHOSTSERVER ; }; hidspecial HID_PAGE_DBWIZARD_JDBC_ET_MYSQLPORT { HelpId = HID_PAGE_DBWIZARD_JDBC_ET_MYSQLPORT ; }; @@ -487,7 +468,11 @@ hidspecial HID_PAGE_DBWIZARD_FINAL_CB_STARTTABLEWIZARD { HelpId = HID_PAGE hidspecial HID_PAGE_DBWIZARD_FINAL_CB_OPENAFTERWARDS { HelpId = HID_PAGE_DBWIZARD_FINAL_CB_OPENAFTERWARDS ; }; hidspecial HID_DSADMIN_USESSL_LDAP { HelpId = HID_DSADMIN_USESSL_LDAP ; }; hidspecial HID_DSADMIN_DOSLINEENDS { HelpId = HID_DSADMIN_DOSLINEENDS ; }; + +/* hidspecial SID_DB_QUERY_PREVIEW { HelpId = SID_DB_QUERY_PREVIEW ; }; +*/ + hidspecial HID_PAGE_DBWIZARD_USERDEFINED_ET_BROWSE { HelpId = HID_PAGE_DBWIZARD_USERDEFINED_ET_BROWSE ; }; hidspecial HID_PAGE_DBWIZARD_USERDEFINED_BROWSE { HelpId = HID_PAGE_DBWIZARD_USERDEFINED_BROWSE ; }; hidspecial HID_DLG_DATABASE_WIZARD { HelpId = HID_DLG_DATABASE_WIZARD ; }; diff --git a/dbaccess/util/makefile.mk b/dbaccess/util/makefile.mk index ee38f8141..3202f0ba5 100644 --- a/dbaccess/util/makefile.mk +++ b/dbaccess/util/makefile.mk @@ -240,3 +240,23 @@ $(MISC)$/$(SHL1TARGET).flt: makefile.mk .ENDIF .ENDIF + +ALLTAR : $(MISC)/dba.component $(MISC)/dbu.component $(MISC)/sdbt.component + +$(MISC)/dba.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + dba.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt dba.component + +$(MISC)/dbu.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + dbu.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL2TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt dbu.component + +$(MISC)/sdbt.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + sdbt.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL3TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt sdbt.component diff --git a/dbaccess/util/sdbt.component b/dbaccess/util/sdbt.component new file mode 100644 index 000000000..0038c0cad --- /dev/null +++ b/dbaccess/util/sdbt.component @@ -0,0 +1,34 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!--********************************************************************** +* +* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +* +* Copyright 2000, 2010 Oracle and/or its affiliates. +* +* OpenOffice.org - a multi-platform office productivity suite +* +* This file is part of OpenOffice.org. +* +* OpenOffice.org is free software: you can redistribute it and/or modify +* it under the terms of the GNU Lesser General Public License version 3 +* only, as published by the Free Software Foundation. +* +* OpenOffice.org is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU Lesser General Public License version 3 for more details +* (a copy is included in the LICENSE file that accompanied this code). +* +* You should have received a copy of the GNU Lesser General Public License +* version 3 along with OpenOffice.org. If not, see +* <http://www.openoffice.org/license.html> +* for a copy of the LGPLv3 License. +* +**********************************************************************--> + +<component loader="com.sun.star.loader.SharedLibrary" + xmlns="http://openoffice.org/2010/uno-components"> + <implementation name="com.sun.star.comp.dbaccess.ConnectionTools"> + <service name="com.sun.star.sdb.tools.ConnectionTools"/> + </implementation> +</component> diff --git a/reportdesign/inc/helpids.hrc b/reportdesign/inc/helpids.hrc index 5e048c34b..31e4bfa02 100644 --- a/reportdesign/inc/helpids.hrc +++ b/reportdesign/inc/helpids.hrc @@ -27,104 +27,96 @@ #ifndef RTPUI_REPORTDESIGN_HELPID_HRC #define RTPUI_REPORTDESIGN_HELPID_HRC -#ifndef _SOLAR_HRC -#include <svl/solar.hrc> // HID_RPT_DBACCESS_START -#endif +#define UID_RPT_PROP_FORMULA "REPORTDESIGN_UID_RPT_PROP_FORMULA" +#define UID_RPT_RPT_PROP_DLG_FONT_TYPE "REPORTDESIGN_UID_RPT_RPT_PROP_DLG_FONT_TYPE" +#define UID_RPT_RPT_PROP_DLG_AREA "REPORTDESIGN_UID_RPT_RPT_PROP_DLG_AREA" +#define UID_RPT_PROP_CHARTTYPE_DLG "REPORTDESIGN_UID_RPT_PROP_CHARTTYPE_DLG" +#define UID_RPT_PROP_DLG_LINKFIELDS "REPORTDESIGN_UID_RPT_PROP_DLG_LINKFIELDS" -#define UID_RPT_RPT_APP_VIEW (HID_RPT_START + 0) -#define UID_RPT_SCROLLWINDOW (HID_RPT_START + 1) -#define UID_RPT_REPORTWINDOW (HID_RPT_START + 2) -#define HID_RPT_HORZ_RULER (HID_RPT_START + 3) -#define UID_RPT_SECTIONSWINDOW (HID_RPT_START + 4) -#define UID_RPT_VIEWSWINDOW (HID_RPT_START + 5) -#define HID_RPT_ENDMARKER (HID_RPT_START + 6) -#define HID_RPT_SPLITTER (HID_RPT_START + 7) -#define HID_REPORTSECTION (HID_RPT_START + 8) -#define HID_RPT_HORZ_SCROLLBAR (HID_RPT_START + 9) -#define HID_RPT_VERT_SCROLLBAR (HID_RPT_START + 10) -#define HID_RPT_STARTMARKER (HID_RPT_START + 11) -#define HID_RPT_FIELDEXPRESSION (HID_RPT_START + 12) -#define HID_RPT_SORTORDER (HID_RPT_START + 13) -#define HID_RPT_GROUPSBRW (HID_RPT_START + 14) -#define HID_RPT_GROUPSSORTING_DLG (HID_RPT_START + 15) -#define HID_RPT_PAGENUMBERS_DLG (HID_RPT_START + 16) -#define HID_RPT_DATETIME_DLG (HID_RPT_START + 17) -#define HID_RPT_CONDFORMAT_DLG (HID_RPT_START + 18) -#define HID_RPT_CONDFORMAT_TB (HID_RPT_START + 19) -#define HID_RPT_CRTL_FORMAT_PREVIEW (HID_RPT_START + 20) -#define HID_RPT_COND_DLG (HID_RPT_START + 21) -#define HID_RPT_POPUP_COLOR_CTRL (HID_RPT_START + 22) -#define HID_RPT_POPUP_COLOR (HID_RPT_START + 23) -#define HID_RPT_FIELD_SEL (HID_RPT_START + 24) -#define HID_RPT_FIELD_SEL_WIN (HID_RPT_START + 25) -#define HID_RPT_PROPDLG_TAB_GENERAL (HID_RPT_START + 26) -#define HID_RPT_PROPDLG_TAB_DATA (HID_RPT_START + 27) +#define UID_RPT_RPT_APP_VIEW "REPORTDESIGN_UID_RPT_RPT_APP_VIEW" +#define UID_RPT_SCROLLWINDOW "REPORTDESIGN_UID_RPT_SCROLLWINDOW" +#define UID_RPT_REPORTWINDOW "REPORTDESIGN_UID_RPT_REPORTWINDOW" +#define HID_RPT_HORZ_RULER "REPORTDESIGN_HID_RPT_HORZ_RULER" +#define UID_RPT_SECTIONSWINDOW "REPORTDESIGN_UID_RPT_SECTIONSWINDOW" +#define UID_RPT_VIEWSWINDOW "REPORTDESIGN_UID_RPT_VIEWSWINDOW" +#define HID_RPT_ENDMARKER "REPORTDESIGN_HID_RPT_ENDMARKER" +#define HID_RPT_SPLITTER "REPORTDESIGN_HID_RPT_SPLITTER" +#define HID_REPORTSECTION "REPORTDESIGN_HID_REPORTSECTION" +#define HID_RPT_HORZ_SCROLLBAR "REPORTDESIGN_HID_RPT_HORZ_SCROLLBAR" +#define HID_RPT_VERT_SCROLLBAR "REPORTDESIGN_HID_RPT_VERT_SCROLLBAR" +#define HID_RPT_STARTMARKER "REPORTDESIGN_HID_RPT_STARTMARKER" +#define HID_RPT_FIELDEXPRESSION "REPORTDESIGN_HID_RPT_FIELDEXPRESSION" +#define HID_RPT_SORTORDER "REPORTDESIGN_HID_RPT_SORTORDER" +#define HID_RPT_GROUPSBRW "REPORTDESIGN_HID_RPT_GROUPSBRW" +#define HID_RPT_GROUPSSORTING_DLG "REPORTDESIGN_HID_RPT_GROUPSSORTING_DLG" +#define HID_RPT_PAGENUMBERS_DLG "REPORTDESIGN_HID_RPT_PAGENUMBERS_DLG" +#define HID_RPT_DATETIME_DLG "REPORTDESIGN_HID_RPT_DATETIME_DLG" +#define HID_RPT_CONDFORMAT_DLG "REPORTDESIGN_HID_RPT_CONDFORMAT_DLG" +#define HID_RPT_CONDFORMAT_TB "REPORTDESIGN_HID_RPT_CONDFORMAT_TB" +#define HID_RPT_CRTL_FORMAT_PREVIEW "REPORTDESIGN_HID_RPT_CRTL_FORMAT_PREVIEW" +#define HID_RPT_COND_DLG "REPORTDESIGN_HID_RPT_COND_DLG" +#define HID_RPT_POPUP_COLOR_CTRL "REPORTDESIGN_HID_RPT_POPUP_COLOR_CTRL" +#define HID_RPT_POPUP_COLOR "REPORTDESIGN_HID_RPT_POPUP_COLOR" +#define HID_RPT_FIELD_SEL "REPORTDESIGN_HID_RPT_FIELD_SEL" +#define HID_RPT_FIELD_SEL_WIN "REPORTDESIGN_HID_RPT_FIELD_SEL_WIN" +#define HID_RPT_PROPDLG_TAB_GENERAL "REPORTDESIGN_HID_RPT_PROPDLG_TAB_GENERAL" +#define HID_RPT_PROPDLG_TAB_DATA "REPORTDESIGN_HID_RPT_PROPDLG_TAB_DATA" -#define HID_RPT_PROP_FORCENEWPAGE (HID_RPT_START + 28) -#define HID_RPT_PROP_NEWROWORCOL (HID_RPT_START + 29) -#define HID_RPT_PROP_KEEPTOGETHER (HID_RPT_START + 30) -#define HID_RPT_PROP_CANGROW (HID_RPT_START + 31) -#define HID_RPT_PROP_CANSHRINK (HID_RPT_START + 32) -#define HID_RPT_PROP_REPEATSECTION (HID_RPT_START + 33) -#define HID_RPT_PROP_FORMULALIST (HID_RPT_START + 34) -#define HID_RPT_PROP_SCOPE (HID_RPT_START + 35) -#define HID_RPT_PROP_TYPE (HID_RPT_START + 36) -#define HID_RPT_PROP_MASTERFIELDS (HID_RPT_START + 37) -#define HID_RPT_PROP_DETAILFIELDS (HID_RPT_START + 38) -#define HID_RPT_PROP_AREA (HID_RPT_START + 39) -#define UID_RPT_RPT_PROP_DLG_AREA (HID_RPT_START + 40) -#define HID_RPT_PROP_MIMETYPE (HID_RPT_START + 41) +#define HID_RPT_PROP_FORCENEWPAGE "REPORTDESIGN_HID_RPT_PROP_FORCENEWPAGE" +#define HID_RPT_PROP_NEWROWORCOL "REPORTDESIGN_HID_RPT_PROP_NEWROWORCOL" +#define HID_RPT_PROP_KEEPTOGETHER "REPORTDESIGN_HID_RPT_PROP_KEEPTOGETHER" +#define HID_RPT_PROP_CANGROW "REPORTDESIGN_HID_RPT_PROP_CANGROW" +#define HID_RPT_PROP_CANSHRINK "REPORTDESIGN_HID_RPT_PROP_CANSHRINK" +#define HID_RPT_PROP_REPEATSECTION "REPORTDESIGN_HID_RPT_PROP_REPEATSECTION" +#define HID_RPT_PROP_FORMULALIST "REPORTDESIGN_HID_RPT_PROP_FORMULALIST" +#define HID_RPT_PROP_SCOPE "REPORTDESIGN_HID_RPT_PROP_SCOPE" +#define HID_RPT_PROP_TYPE "REPORTDESIGN_HID_RPT_PROP_TYPE" +#define HID_RPT_PROP_MASTERFIELDS "REPORTDESIGN_HID_RPT_PROP_MASTERFIELDS" +#define HID_RPT_PROP_DETAILFIELDS "REPORTDESIGN_HID_RPT_PROP_DETAILFIELDS" +#define HID_RPT_PROP_AREA "REPORTDESIGN_HID_RPT_PROP_AREA" +#define HID_RPT_PROP_MIMETYPE "REPORTDESIGN_HID_RPT_PROP_MIMETYPE" // free // free -#define HID_RPT_PROP_PRINTREPEATEDVALUES (HID_RPT_START + 44) -#define HID_RPT_PROP_CONDITIONALPRINTEXPRESSION (HID_RPT_START + 45) -#define HID_RPT_PROP_VERTICALALIGN (HID_RPT_START + 46) -#define HID_RPT_PROP_STARTNEWCOLUMN (HID_RPT_START + 47) -#define HID_RPT_PROP_STARTNEWPAGE (HID_RPT_START + 48) -#define HID_RPT_PROP_RESETPAGENUMBER (HID_RPT_START + 49) -#define HID_RPT_PROP_PARAADJUST (HID_RPT_START + 50) -#define HID_RPT_PROP_MINHEIGHTNEWPAGE (HID_RPT_START + 51) -#define HID_RPT_PROP_PRINTWHENGROUPCHANGE (HID_RPT_START + 52) -#define HID_RPT_PROP_CHARTTYPE (HID_RPT_START + 53) +#define HID_RPT_PROP_PRINTREPEATEDVALUES "REPORTDESIGN_HID_RPT_PROP_PRINTREPEATEDVALUES" +#define HID_RPT_PROP_CONDITIONALPRINTEXPRESSION "REPORTDESIGN_HID_RPT_PROP_CONDITIONALPRINTEXPRESSION" +#define HID_RPT_PROP_VERTICALALIGN "REPORTDESIGN_HID_RPT_PROP_VERTICALALIGN" +#define HID_RPT_PROP_STARTNEWCOLUMN "REPORTDESIGN_HID_RPT_PROP_STARTNEWCOLUMN" +#define HID_RPT_PROP_STARTNEWPAGE "REPORTDESIGN_HID_RPT_PROP_STARTNEWPAGE" +#define HID_RPT_PROP_RESETPAGENUMBER "REPORTDESIGN_HID_RPT_PROP_RESETPAGENUMBER" +#define HID_RPT_PROP_PARAADJUST "REPORTDESIGN_HID_RPT_PROP_PARAADJUST" +#define HID_RPT_PROP_MINHEIGHTNEWPAGE "REPORTDESIGN_HID_RPT_PROP_MINHEIGHTNEWPAGE" +#define HID_RPT_PROP_PRINTWHENGROUPCHANGE "REPORTDESIGN_HID_RPT_PROP_PRINTWHENGROUPCHANGE" +#define HID_RPT_PROP_CHARTTYPE "REPORTDESIGN_HID_RPT_PROP_CHARTTYPE" // free // free -#define HID_RPT_PROP_VISIBLE (HID_RPT_START + 55) -#define HID_RPT_PROP_GROUPKEEPTOGETHER (HID_RPT_START + 56) -#define HID_RPT_PROP_PAGEHEADEROPTION (HID_RPT_START + 57) -#define HID_RPT_PROP_PAGEFOOTEROPTION (HID_RPT_START + 58) -#define UID_RPT_PROP_DLG_LINE_STYLE (HID_RPT_START + 59) -#define HID_RPT_PROP_PREVIEW_COUNT (HID_RPT_START + 60) -#define HID_RPT_PROP_DATAFIELD (HID_RPT_START + 61) -#define HID_RPT_PROP_BACKCOLOR (HID_RPT_START + 62) -#define HID_RPT_PROP_RPT_POSITIONX (HID_RPT_START + 63) -#define HID_RPT_PROP_RPT_POSITIONY (HID_RPT_START + 64) -#define HID_RPT_PROP_RPT_WIDTH (HID_RPT_START + 65) -#define HID_RPT_PROP_RPT_HEIGHT (HID_RPT_START + 66) -#define HID_RPT_START_TITLE (HID_RPT_START + 67) -#define HID_RPT_START_IMAGE (HID_RPT_START + 68) -#define HID_RPT_PROP_DEEPTRAVERSING (HID_RPT_START + 69) -#define HID_RPT_PROP_PREEVALUATED (HID_RPT_START + 70) -#define HID_RPT_NAVIGATOR_DLG (HID_RPT_START + 71) -#define HID_REPORT_NAVIGATOR_TREE (HID_RPT_START + 72) -#define HID_RPT_PROP_FORMULA (HID_RPT_START + 73) -#define HID_RPT_PROP_INITIALFORMULA (HID_RPT_START + 74) -#define HID_RPT_PROP_RPT_FONT (HID_RPT_START + 75) -#define UID_RPT_RPT_PROP_DLG_FONT_TYPE (HID_RPT_START + 76) -#define HID_RPT_PROP_PRESERVEIRI (HID_RPT_START + 77) -#define HID_RPT_PROP_BACKTRANSPARENT (HID_RPT_START + 78) -#define HID_RPT_PROP_CONTROLBACKGROUNDTRANSPARENT (HID_RPT_START + 79) -#define UID_RPT_PROP_CHARTTYPE_DLG (HID_RPT_START + 80) -#define UID_RPT_PROP_DLG_LINKFIELDS (HID_RPT_START + 81) -#define UID_RPT_PROP_FORMULA (HID_RPT_START + 82) +#define HID_RPT_PROP_VISIBLE "REPORTDESIGN_HID_RPT_PROP_VISIBLE" +#define HID_RPT_PROP_GROUPKEEPTOGETHER "REPORTDESIGN_HID_RPT_PROP_GROUPKEEPTOGETHER" +#define HID_RPT_PROP_PAGEHEADEROPTION "REPORTDESIGN_HID_RPT_PROP_PAGEHEADEROPTION" +#define HID_RPT_PROP_PAGEFOOTEROPTION "REPORTDESIGN_HID_RPT_PROP_PAGEFOOTEROPTION" +#define UID_RPT_PROP_DLG_LINE_STYLE "REPORTDESIGN_UID_RPT_PROP_DLG_LINE_STYLE" +#define HID_RPT_PROP_PREVIEW_COUNT "REPORTDESIGN_HID_RPT_PROP_PREVIEW_COUNT" +#define HID_RPT_PROP_DATAFIELD "REPORTDESIGN_HID_RPT_PROP_DATAFIELD" +#define HID_RPT_PROP_BACKCOLOR "REPORTDESIGN_HID_RPT_PROP_BACKCOLOR" +#define HID_RPT_PROP_RPT_POSITIONX "REPORTDESIGN_HID_RPT_PROP_RPT_POSITIONX" +#define HID_RPT_PROP_RPT_POSITIONY "REPORTDESIGN_HID_RPT_PROP_RPT_POSITIONY" +#define HID_RPT_PROP_RPT_WIDTH "REPORTDESIGN_HID_RPT_PROP_RPT_WIDTH" +#define HID_RPT_PROP_RPT_HEIGHT "REPORTDESIGN_HID_RPT_PROP_RPT_HEIGHT" +#define HID_RPT_START_TITLE "REPORTDESIGN_HID_RPT_START_TITLE" +#define HID_RPT_START_IMAGE "REPORTDESIGN_HID_RPT_START_IMAGE" +#define HID_RPT_PROP_DEEPTRAVERSING "REPORTDESIGN_HID_RPT_PROP_DEEPTRAVERSING" +#define HID_RPT_PROP_PREEVALUATED "REPORTDESIGN_HID_RPT_PROP_PREEVALUATED" +#define HID_RPT_NAVIGATOR_DLG "REPORTDESIGN_HID_RPT_NAVIGATOR_DLG" +#define HID_REPORT_NAVIGATOR_TREE "REPORTDESIGN_HID_REPORT_NAVIGATOR_TREE" +#define HID_RPT_PROP_FORMULA "REPORTDESIGN_HID_RPT_PROP_FORMULA" +#define HID_RPT_PROP_INITIALFORMULA "REPORTDESIGN_HID_RPT_PROP_INITIALFORMULA" +#define HID_RPT_PROP_RPT_FONT "REPORTDESIGN_HID_RPT_PROP_RPT_FONT" +#define HID_RPT_PROP_PRESERVEIRI "REPORTDESIGN_HID_RPT_PROP_PRESERVEIRI" +#define HID_RPT_PROP_BACKTRANSPARENT "REPORTDESIGN_HID_RPT_PROP_BACKTRANSPARENT" +#define HID_RPT_PROP_CONTROLBACKGROUNDTRANSPARENT "REPORTDESIGN_HID_RPT_PROP_CONTROLBACKGROUNDTRANSPARENT" -#define HID_RPT_GROUPSORT_MOVE_UP (HID_RPT_START + 82) -#define HID_RPT_GROUPSORT_MOVE_DOWN (HID_RPT_START + 83) -#define HID_RPT_GROUPSORT_DELETE (HID_RPT_START + 84) - -#if UID_RPT_PROP_FORMULA > HID_RPT_END -#error Help-Id Ueberlauf in #file, #line -#endif -// don't forget to update the file util/hidother.src +#define HID_RPT_GROUPSORT_MOVE_UP "REPORTDESIGN_HID_RPT_GROUPSORT_MOVE_UP" +#define HID_RPT_GROUPSORT_MOVE_DOWN "REPORTDESIGN_HID_RPT_GROUPSORT_MOVE_DOWN" +#define HID_RPT_GROUPSORT_DELETE "REPORTDESIGN_HID_RPT_GROUPSORT_DELETE" #endif //RTPUI_REPORTDESIGN_HELPID_HRC diff --git a/reportdesign/prj/build.lst b/reportdesign/prj/build.lst index 781eb91ec..d4e26e51a 100644 --- a/reportdesign/prj/build.lst +++ b/reportdesign/prj/build.lst @@ -1,4 +1,4 @@ -rd reportdesign : l10n BOOST:boost comphelper dbaccess formula NULL +rd reportdesign : l10n BOOST:boost comphelper dbaccess formula LIBXSLT:libxslt NULL rd reportdesign usr1 - all rd_mkout NULL rd reportdesign\inc nmake - all rd_inc NULL rd reportdesign\source\core\api nmake - all rd_api rd_inc NULL @@ -13,3 +13,6 @@ rd reportdesign\source\ui\inspection nmake rd reportdesign\source\filter\xml nmake - all rd_filter_xml rd_inc NULL rd reportdesign\util nmake - all rd_util rd_api rd_res rd_shared rd_uimisc rd_uidlg rd_uireport rd_uiinspection rd_sdr rd_misc rd_filter_xml NULL +# has problems in m78, in m83 also +# rd reportdesign\qa\complex\reportdesign nmake - all rd_qa_complex NULL + diff --git a/reportdesign/prj/d.lst b/reportdesign/prj/d.lst index b531c0eed..d7cc5fad6 100644 --- a/reportdesign/prj/d.lst +++ b/reportdesign/prj/d.lst @@ -19,3 +19,6 @@ dos: sh -c "if test %OS% = MACOSX; then create-bundle %_DEST%\lib%_EXT%\*.dylib; ..\uiconfig\dbreport\statusbar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\dbreport\statusbar\*.xml ..\uiconfig\dbreport\toolbar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\dbreport\toolbar\*.xml +..\%__SRC%\misc\rpt.component %_DEST%\xml%_EXT%\rpt.component +..\%__SRC%\misc\rptui.component %_DEST%\xml%_EXT%\rptui.component +..\%__SRC%\misc\rptxml.component %_DEST%\xml%_EXT%\rptxml.component diff --git a/reportdesign/qa/complex/reportdesign/FileURL.java b/reportdesign/qa/complex/reportdesign/FileURL.java new file mode 100644 index 000000000..3d93f756a --- /dev/null +++ b/reportdesign/qa/complex/reportdesign/FileURL.java @@ -0,0 +1,62 @@ +/* + * ************************************************************************ + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + * ************************************************************************ + */ + +package complex.reportdesign; + +import java.io.File; +import java.net.URI; +import java.net.URISyntaxException; + +/** + * + * @author ll93751 + */ +public class FileURL +{ + String m_sFileURL; + + public FileURL(String _sFileURL) + { + m_sFileURL = _sFileURL; + } + public boolean exists() + { + try + { + final URI aURI = new URI(m_sFileURL); + final File aFile = new File(aURI); + return aFile.exists(); + } + catch (URISyntaxException ex) + { + System.out.println("Error: URI is wrong. '" + m_sFileURL + "': " + ex.getMessage()); + } + return false; + } +} diff --git a/reportdesign/qa/complex/ReportDesignerTest.java b/reportdesign/qa/complex/reportdesign/ReportDesignerTest.java index a827406c9..5238edf92 100644 --- a/reportdesign/qa/complex/ReportDesignerTest.java +++ b/reportdesign/qa/complex/reportdesign/ReportDesignerTest.java @@ -25,7 +25,7 @@ * ************************************************************************/ -package complex; +package complex.reportdesign; import java.io.File; import java.util.ArrayList; @@ -47,21 +47,28 @@ import com.sun.star.uno.UnoRuntime; import com.sun.star.uno.XInterface; import com.sun.star.util.XCloseable; -import complexlib.ComplexTestCase; -import util.utils; +// import complexlib.ComplexTestCase; +// import util.utils; import helper.OfficeProvider; import helper.URLHelper; -import helper.OfficeWatcher; +// import helper.OfficeWatcher; import convwatch.DB; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; +import org.openoffice.test.OfficeConnection; +import static org.junit.Assert.*; class PropertySetHelper { XPropertySet m_xPropertySet; public PropertySetHelper(Object _aObj) { - m_xPropertySet = (XPropertySet)UnoRuntime.queryInterface(XPropertySet.class, _aObj); + m_xPropertySet = UnoRuntime.queryInterface(XPropertySet.class, _aObj); } /** @@ -129,57 +136,73 @@ class PropertyHelper } } -public class ReportDesignerTest extends ComplexTestCase { +public class ReportDesignerTest +{ String mTestDocumentPath; - public String[] getTestMethodNames() - { - return new String[] {"firsttest"}; - } - - private void checkIfOfficeExists(String _sOfficePathWithTrash) - { - String sOfficePath = ""; - int nIndex = _sOfficePathWithTrash.indexOf("soffice.exe"); - if (nIndex > 0) - { - sOfficePath = _sOfficePathWithTrash.substring(0, nIndex + 11); - } - else - { - nIndex = _sOfficePathWithTrash.indexOf("soffice"); - if (nIndex > 0) - { - sOfficePath = _sOfficePathWithTrash.substring(0, nIndex + 7); - } - } - - log.println(sOfficePath); - File sOffice = new File(sOfficePath); - if (! sOffice.exists()) - { - log.println("ERROR: There exists no office installation at given path: '" + sOfficePath + "'"); - System.exit(0); - } - } +// public String[] getTestMethodNames() +// { +// return new String[] {"firsttest"}; +// } + + @Before public void before() + { + System.out.println("before"); + // String tempdir = System.getProperty("java.io.tmpdir"); + // + int dummy = 0; + // m_xXMultiServiceFactory = getMSF(); + } + @After public void after() + { + System.out.println("after"); + } + +// private void checkIfOfficeExists(String _sOfficePathWithTrash) +// { +// String sOfficePath = ""; +// int nIndex = _sOfficePathWithTrash.indexOf("soffice.exe"); +// if (nIndex > 0) +// { +// sOfficePath = _sOfficePathWithTrash.substring(0, nIndex + 11); +// } +// else +// { +// nIndex = _sOfficePathWithTrash.indexOf("soffice"); +// if (nIndex > 0) +// { +// sOfficePath = _sOfficePathWithTrash.substring(0, nIndex + 7); +// } +// } +// +// System.out.println(sOfficePath); +// File sOffice = new File(sOfficePath); +// if (! sOffice.exists()) +// { +// System.out.println("ERROR: There exists no office installation at given path: '" + sOfficePath + "'"); +// System.exit(0); +// } +// } - private static XDesktop m_xDesktop = null; - public static XDesktop getXDesktop() + + private XDesktop m_xDesktop = null; + public XDesktop getXDesktop() { if (m_xDesktop == null) { try { - XInterface xInterface = (XInterface) m_xXMultiServiceFactory.createInstance( "com.sun.star.frame.Desktop" ); - m_xDesktop = (XDesktop) UnoRuntime.queryInterface(XDesktop.class, xInterface); + XInterface xInterface = (XInterface) getMSF().createInstance( "com.sun.star.frame.Desktop" ); + m_xDesktop = UnoRuntime.queryInterface(XDesktop.class, xInterface); + assertNotNull("Can't get XDesktop", m_xDesktop); } catch (com.sun.star.uno.Exception e) { - log.println("ERROR: uno.Exception caught"); - log.println("Message: " + e.getMessage()); + System.out.println("ERROR: uno.Exception caught"); + System.out.println("Message: " + e.getMessage()); } } return m_xDesktop; @@ -203,26 +226,27 @@ public class ReportDesignerTest extends ComplexTestCase { private OfficeProvider m_aProvider = null; - private static XMultiServiceFactory m_xXMultiServiceFactory = null; - private void startOffice() - { - param.put("TimeOut", new Integer(300000)); - System.out.println("TimeOut: " + param.getInt("TimeOut")); - System.out.println("ThreadTimeOut: " + param.getInt("ThreadTimeOut")); - - m_aProvider = new OfficeProvider(); - m_xXMultiServiceFactory = (XMultiServiceFactory) m_aProvider.getManager(param); - param.put("ServiceFactory", m_xXMultiServiceFactory); - } - - private void stopOffice() - { - if (m_aProvider != null) - { - m_aProvider.closeExistingOffice(param, true); - m_aProvider = null; - } - } +// private void startOffice() +// { +// // int tempTime = param.getInt("SingleTimeOut"); +// param.put("TimeOut", new Integer(300000)); +// System.out.println("TimeOut: " + param.getInt("TimeOut")); +// System.out.println("ThreadTimeOut: " + param.getInt("ThreadTimeOut")); +// +// // OfficeProvider aProvider = null; +// m_aProvider = new OfficeProvider(); +// m_xXMultiServiceFactory = (XMultiServiceFactory) m_aProvider.getManager(param); +// param.put("ServiceFactory", m_xXMultiServiceFactory); +// } +// +// private void stopOffice() +// { +// if (m_aProvider != null) +// { +// m_aProvider.closeExistingOffice(param, true); +// m_aProvider = null; +// } +// } private String m_sMailAddress = null; private String m_sUPDMinor; @@ -231,103 +255,104 @@ public class ReportDesignerTest extends ComplexTestCase { private static final int WRITER = 1; private static final int CALC = 2; - public void firsttest() + @Test public void firsttest() { - convwatch.GlobalLogWriter.set(log); - try - { + // convwatch.GlobalLogWriter.set(log); - // -------------------- preconditions, try to find an office -------------------- - - String sAppExecutionCommand = (String) param.get("AppExecutionCommand"); + // -------------------- preconditions, try to find an office -------------------- - String sUser = System.getProperty("user.name"); - log.println("user.name='" + sUser + "'"); - - String sVCSID = System.getProperty("VCSID"); - log.println("VCSID='" + sVCSID + "'"); - m_sMailAddress = sVCSID + "@openoffice.org"; - log.println("Assumed mail address: " + m_sMailAddress); - - m_sUPDMinor = System.getProperty("UPDMINOR"); - m_sCWS_WORK_STAMP = System.getProperty("CWS_WORK_STAMP"); - log.println("Current CWS: " + m_sCWS_WORK_STAMP); - log.println("Current MWS: " + m_sUPDMinor); - - sAppExecutionCommand = sAppExecutionCommand.replaceAll( "\\$\\{USERNAME\\}", sUser); - log.println("sAppExecutionCommand='" + sAppExecutionCommand + "'"); - - checkIfOfficeExists(sAppExecutionCommand); - param.put("AppExecutionCommand", new String(sAppExecutionCommand)); - - // --------------------------- Start the given Office --------------------------- - - startOffice(); - - // ------------------------------ Start a test run ------------------------------ - - String sCurrentDirectory = System.getProperty("user.dir"); - log.println("Current Dir: " + sCurrentDirectory); - - String sWriterDocument = sCurrentDirectory + "/" + "RPTWriterTests.odb"; - startTestForFile(sWriterDocument, WRITER); +// String sAppExecutionCommand = (String) param.get("AppExecutionCommand"); - String sCalcDocument = sCurrentDirectory + "/" + "RPTCalcTests.odb"; - startTestForFile(sCalcDocument, CALC); - } - catch (AssureException e) - { - stopOffice(); - throw new AssureException(e.getMessage()); - } - + String sUser = System.getProperty("user.name"); + System.out.println("user.name='" + sUser + "'"); + + String sVCSID = System.getProperty("VCSID"); + System.out.println("VCSID='" + sVCSID + "'"); + m_sMailAddress = sVCSID + "@openoffice.org"; + System.out.println("Assumed mail address: " + m_sMailAddress); + + m_sUPDMinor = System.getProperty("UPDMINOR"); + m_sCWS_WORK_STAMP = System.getProperty("CWS_WORK_STAMP"); + System.out.println("Current CWS: " + m_sCWS_WORK_STAMP); + System.out.println("Current MWS: " + m_sUPDMinor); + +// sAppExecutionCommand = sAppExecutionCommand.replaceAll( "\\$\\{USERNAME\\}", sUser); +// System.out.println("sAppExecutionCommand='" + sAppExecutionCommand + "'"); +// +// checkIfOfficeExists(sAppExecutionCommand); +// param.put("AppExecutionCommand", new String(sAppExecutionCommand)); + + // --------------------------- Start the given Office --------------------------- + +// startOffice(); + + // ------------------------------ Start a test run ------------------------------ + +// String sCurrentDirectory = System.getProperty("user.dir"); +// System.out.println("Current Dir: " + sCurrentDirectory); +// + String sWriterDocument = TestDocument.getUrl("RPTWriterTests.odb"); + startTestForFile(sWriterDocument, WRITER); + + String sCalcDocument = TestDocument.getUrl("RPTCalcTests.odb"); + startTestForFile(sCalcDocument, CALC); +// catch (AssureException e) +// { +// stopOffice(); +// throw new AssureException(e.getMessage()); +// } +// // ------------------------------ Office shutdown ------------------------------ - stopOffice(); +// stopOffice(); } // ----------------------------------------------------------------------------- private void startTestForFile(String _sDocument, int _nType) { - File aFile = new File(_sDocument); - assure("Test File doesn't '" + _sDocument + "'exist.", aFile.exists()); + FileURL aFileURL = new FileURL(_sDocument); + assertTrue("Test File doesn't '" + _sDocument + "'exist.", aFileURL.exists()); - String sFileURL = URLHelper.getFileURLFromSystemPath(_sDocument); - log.println("File URL: " + sFileURL); + String sFileURL = _sDocument; // URLHelper.getFileURLFromSystemPath(_sDocument); + System.out.println("File URL: " + sFileURL); XComponent xDocComponent = loadComponent(sFileURL, getXDesktop(), null); - log.println("Load done"); + System.out.println("Load done"); + assertNotNull("Can't load document ", xDocComponent); + try { - XInterface x = (XInterface)m_xXMultiServiceFactory.createInstance("com.sun.star.sdb.DatabaseContext"); - assure("can't create instance of com.sun.star.sdb.DatabaseContext", x != null); - log.println("createInstance com.sun.star.sdb.DatabaseContext done"); + XInterface x = (XInterface)getMSF().createInstance("com.sun.star.sdb.DatabaseContext"); + assertNotNull("can't create instance of com.sun.star.sdb.DatabaseContext", x); + System.out.println("createInstance com.sun.star.sdb.DatabaseContext done"); - XNameAccess xNameAccess = (XNameAccess) UnoRuntime.queryInterface(XNameAccess.class, x); + XNameAccess xNameAccess = UnoRuntime.queryInterface(XNameAccess.class, x); showElements(xNameAccess); Object aObj = xNameAccess.getByName(sFileURL); - XDocumentDataSource xDataSource = (XDocumentDataSource)UnoRuntime.queryInterface(XDocumentDataSource.class, aObj); + XDocumentDataSource xDataSource = UnoRuntime.queryInterface(XDocumentDataSource.class, aObj); XOfficeDatabaseDocument xOfficeDBDoc = xDataSource.getDatabaseDocument(); - assure("can't access DatabaseDocument", xOfficeDBDoc != null); + assertNotNull("can't access DatabaseDocument", xOfficeDBDoc); - XModel xDBSource = (XModel)UnoRuntime.queryInterface(XModel.class, xOfficeDBDoc); + XModel xDBSource = UnoRuntime.queryInterface(XModel.class, xOfficeDBDoc); Object aController = xDBSource.getCurrentController(); - assure("Controller of xOfficeDatabaseDocument is empty!", aController != null); + assertNotNull("Controller of xOfficeDatabaseDocument is empty!", aController); - XDatabaseDocumentUI aDBDocUI = (XDatabaseDocumentUI)UnoRuntime.queryInterface(XDatabaseDocumentUI.class, aController); - boolean isConnect = aDBDocUI.connect(); + XDatabaseDocumentUI aDBDocUI = UnoRuntime.queryInterface(XDatabaseDocumentUI.class, aController); + /* boolean isConnect = */ +// TODO: throws an exception in DEV300m78 + aDBDocUI.connect(); Object aActiveConnectionObj = aDBDocUI.getActiveConnection(); - assure("ActiveConnection is empty", aActiveConnectionObj != null); + assertNotNull("ActiveConnection is empty", aActiveConnectionObj); - XReportDocumentsSupplier xSupplier = (XReportDocumentsSupplier)UnoRuntime.queryInterface(XReportDocumentsSupplier.class, xOfficeDBDoc); + XReportDocumentsSupplier xSupplier = UnoRuntime.queryInterface(XReportDocumentsSupplier.class, xOfficeDBDoc); xNameAccess = xSupplier.getReportDocuments(); - assure("xOfficeDatabaseDocument returns no Report Document", xNameAccess != null); + assertNotNull("xOfficeDatabaseDocument returns no Report Document", xNameAccess); showElements(xNameAccess); - ArrayList aPropertyList = new ArrayList(); + ArrayList<PropertyValue> aPropertyList = new ArrayList<PropertyValue>(); PropertyValue aActiveConnection = new PropertyValue(); aActiveConnection.Name = "ActiveConnection"; @@ -339,7 +364,7 @@ public class ReportDesignerTest extends ComplexTestCase { } catch(com.sun.star.uno.Exception e) { - log.println("ERROR: Exception caught"); + fail("ERROR: Exception caught" + e.getMessage()); } // Close the document @@ -355,8 +380,8 @@ public class ReportDesignerTest extends ComplexTestCase { private void createDBEntry(int _nType) { // try to connect the database - String sDBConnection = (String)param.get( convwatch.PropertyName.DB_CONNECTION_STRING ); - log.println("DBConnection: " + sDBConnection); + String sDBConnection = ""; // (String)param.get( convwatch.PropertyName.DB_CONNECTION_STRING ); + System.out.println("DBConnection: " + sDBConnection); DB.init(sDBConnection); String sDestinationVersion = m_sCWS_WORK_STAMP; if (sDestinationVersion.length() == 0) @@ -370,10 +395,10 @@ public class ReportDesignerTest extends ComplexTestCase { String sSpecial = ""; String sFixRefSubDirectory = "ReportDesign_qa_complex_" + getFileFormat(_nType); - DB.insertinto_documentcompare(sFixRefSubDirectory, "", "fixref", - sDestinationVersion, sDestinationName, sDestinationCreatorType, - sDocumentPoolDir, sDocumentPoolName, m_sMailAddress, - sSpecial); +// DB.insertinto_documentcompare(sFixRefSubDirectory, "", "fixref", +// sDestinationVersion, sDestinationName, sDestinationCreatorType, +// sDocumentPoolDir, sDocumentPoolName, m_sMailAddress, +// sSpecial); } private void loadAndStoreReports(XNameAccess _xNameAccess, ArrayList _aPropertyList, int _nType) @@ -427,7 +452,7 @@ public class ReportDesignerTest extends ComplexTestCase { private String getOutputPath(int _nType) { - String sOutputPath = (String)param.get( convwatch.PropertyName.DOC_COMPARATOR_OUTPUT_PATH ); + String sOutputPath = util.utils.getOfficeTemp/*Dir*/(getMSF());// (String)param.get( convwatch.PropertyName.DOC_COMPARATOR_OUTPUT_PATH ); if (!sOutputPath.endsWith("/") || // construct the output file name !sOutputPath.endsWith("\\")) @@ -462,7 +487,7 @@ public class ReportDesignerTest extends ComplexTestCase { String sOutputURL = URLHelper.getFileURLFromSystemPath(sOutputPath); - ArrayList aPropertyList = new ArrayList(); // set some properties for storeAsURL + ArrayList<PropertyValue> aPropertyList = new ArrayList<PropertyValue>(); // set some properties for storeAsURL PropertyValue aFileFormat = new PropertyValue(); aFileFormat.Name = "FilterName"; @@ -475,19 +500,19 @@ public class ReportDesignerTest extends ComplexTestCase { aPropertyList.add(aOverwrite); // store the document in an other directory - XStorable aStorable = (XStorable) UnoRuntime.queryInterface( XStorable.class, _xComponent); + XStorable aStorable = UnoRuntime.queryInterface(XStorable.class, _xComponent); if (aStorable != null) { - log.println("store document as URL: '" + sOutputURL + "'"); + System.out.println("store document as URL: '" + sOutputURL + "'"); try { aStorable.storeAsURL(sOutputURL, PropertyHelper.createPropertyValueArrayFormArrayList(aPropertyList)); } catch (com.sun.star.io.IOException e) { - log.println("ERROR: Exception caught"); - log.println("Can't write document URL: '" + sOutputURL + "'"); - log.println("Message: " + e.getMessage()); + System.out.println("ERROR: Exception caught"); + System.out.println("Can't write document URL: '" + sOutputURL + "'"); + System.out.println("Message: " + e.getMessage()); } } } @@ -495,25 +520,25 @@ public class ReportDesignerTest extends ComplexTestCase { private XComponent loadComponent(String _sName, Object _xComponent, ArrayList _aPropertyList) { XComponent xDocComponent = null; - XComponentLoader xComponentLoader = (XComponentLoader) UnoRuntime.queryInterface( XComponentLoader.class, _xComponent ); + XComponentLoader xComponentLoader = UnoRuntime.queryInterface(XComponentLoader.class, _xComponent); try { PropertyValue[] aLoadProperties = PropertyHelper.createPropertyValueArrayFormArrayList(_aPropertyList); - log.println("Load component: '" + _sName + "'"); + System.out.println("Load component: '" + _sName + "'"); xDocComponent = xComponentLoader.loadComponentFromURL(_sName, "_blank", 0, aLoadProperties); } catch (com.sun.star.io.IOException e) { - log.println("ERROR: Exception caught"); - log.println("Can't load document '" + _sName + "'"); - log.println("Message: " + e.getMessage()); + System.out.println("ERROR: Exception caught"); + System.out.println("Can't load document '" + _sName + "'"); + System.out.println("Message: " + e.getMessage()); } catch (com.sun.star.lang.IllegalArgumentException e) { - log.println("ERROR: Exception caught"); - log.println("Illegal Arguments given to loadComponentFromURL."); - log.println("Message: " + e.getMessage()); + System.out.println("ERROR: Exception caught"); + System.out.println("Illegal Arguments given to loadComponentFromURL."); + System.out.println("Message: " + e.getMessage()); } return xDocComponent; } @@ -521,17 +546,39 @@ public class ReportDesignerTest extends ComplexTestCase { private void closeComponent(XComponent _xDoc) { // Close the document - XCloseable xCloseable = (XCloseable) UnoRuntime.queryInterface(XCloseable.class, _xDoc); + XCloseable xCloseable = UnoRuntime.queryInterface(XCloseable.class, _xDoc); try { xCloseable.close(true); } catch (com.sun.star.util.CloseVetoException e) { - log.println("ERROR: CloseVetoException caught"); - log.println("CloseVetoException occurred Can't close document."); - log.println("Message: " + e.getMessage()); + System.out.println("ERROR: CloseVetoException caught"); + System.out.println("CloseVetoException occured Can't close document."); + System.out.println("Message: " + e.getMessage()); } } + + + private XMultiServiceFactory getMSF() + { + final XMultiServiceFactory xMSF1 = UnoRuntime.queryInterface(XMultiServiceFactory.class, connection.getComponentContext().getServiceManager()); + return xMSF1; + } + + // setup and close connections + @BeforeClass public static void setUpConnection() throws Exception { + System.out.println("setUpConnection()"); + connection.setUp(); + } + + @AfterClass public static void tearDownConnection() + throws InterruptedException, com.sun.star.uno.Exception + { + System.out.println("tearDownConnection()"); + connection.tearDown(); + } + + private static final OfficeConnection connection = new OfficeConnection(); } diff --git a/reportdesign/qa/complex/reportdesign/TestDocument.java b/reportdesign/qa/complex/reportdesign/TestDocument.java new file mode 100644 index 000000000..abaecebff --- /dev/null +++ b/reportdesign/qa/complex/reportdesign/TestDocument.java @@ -0,0 +1,41 @@ +/************************************************************************* +* +* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +* +* Copyright 2000, 2010 Oracle and/or its affiliates. +* +* OpenOffice.org - a multi-platform office productivity suite +* +* This file is part of OpenOffice.org. +* +* OpenOffice.org is free software: you can redistribute it and/or modify +* it under the terms of the GNU Lesser General Public License version 3 +* only, as published by the Free Software Foundation. +* +* OpenOffice.org is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU Lesser General Public License version 3 for more details +* (a copy is included in the LICENSE file that accompanied this code). +* +* You should have received a copy of the GNU Lesser General Public License +* version 3 along with OpenOffice.org. If not, see +* <http://www.openoffice.org/license.html> +* for a copy of the LGPLv3 License. +* +************************************************************************/ + +package complex.reportdesign; + +import java.io.File; +import org.openoffice.test.OfficeFileUrl; + +final class TestDocument +{ + public static String getUrl(String name) + { + return OfficeFileUrl.getAbsolute(new File("test_documents", name)); + } + + private TestDocument() {} +} diff --git a/reportdesign/qa/complex/makefile.mk b/reportdesign/qa/complex/reportdesign/makefile.mk index 9d1b7667c..4174eb02c 100755 --- a/reportdesign/qa/complex/makefile.mk +++ b/reportdesign/qa/complex/reportdesign/makefile.mk @@ -25,34 +25,38 @@ # #************************************************************************* -PRJ=..$/.. +.IF "$(OOO_SUBSEQUENT_TESTS)" == "" +nothing .PHONY: +.ELSE +PRJ = ../../.. PRJNAME = reportdesign -PACKAGE = complex -TARGET = rptdesigntest +TARGET = qa_complex_reportdesign -# --- Settings ----------------------------------------------------- +.IF "$(OOO_JUNIT_JAR)" != "" +PACKAGE = complex/reportdesign -.INCLUDE : settings.mk +# here store only Files which contain a @Test +JAVATESTFILES = \ + ReportDesignerTest.java -# --- Files -------------------------------------------------------- +# put here all other files +JAVAFILES = $(JAVATESTFILES) \ + TestDocument.java \ + FileURL.java -JARFILES = ridl.jar jurt.jar unoil.jar juh.jar OOoRunner.jar +JARFILES = OOoRunner.jar ridl.jar test.jar unoil.jar +EXTRAJARFILES = $(OOO_JUNIT_JAR) -JAVAFILES = ReportDesignerTest.java +# Sample how to debug +# JAVAIFLAGS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=9003,suspend=y -# --- Targets ------------------------------------------------------ +.END -.INCLUDE : target.mk +.INCLUDE: settings.mk +.INCLUDE: target.mk +.INCLUDE: installationtest.mk -# JAVADEBUG=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=8502,suspend=y -JAVADEBUG= +ALLTAR : javatest -MYSQL_CONNECTOR=$(PWD)$/mysql-connector-java-5.0.6-bin.jar -CLASSPATH!:=$(CLASSPATH)$(PATH_SEPERATOR)$(MYSQL_CONNECTOR) - -run: ALLTAR - $(PERL) mysql-connector-exists.pl $(MYSQL_CONNECTOR) -# @echo $(CLASSPATH) -# @echo $(VCSID) - @java $(JAVADEBUG) -cp $(CLASSPATH) -DVCSID=$(VCSID) -DCWS_WORK_STAMP=$(CWS_WORK_STAMP) -DUPDMINOR=$(UPDMINOR) org.openoffice.Runner -ini runner.props +.END diff --git a/reportdesign/qa/complex/mysql-connector-exists.pl b/reportdesign/qa/complex/reportdesign/mysql-connector-exists.pl index 6eefe2bb0..6eefe2bb0 100644 --- a/reportdesign/qa/complex/mysql-connector-exists.pl +++ b/reportdesign/qa/complex/reportdesign/mysql-connector-exists.pl diff --git a/reportdesign/qa/complex/runner.props b/reportdesign/qa/complex/reportdesign/runner.props index d894366ce..d894366ce 100755 --- a/reportdesign/qa/complex/runner.props +++ b/reportdesign/qa/complex/reportdesign/runner.props diff --git a/reportdesign/qa/complex/RPTCalcTests.odb b/reportdesign/qa/complex/reportdesign/test_documents/RPTCalcTests.odb Binary files differindex 0e91d633d..0e91d633d 100755 --- a/reportdesign/qa/complex/RPTCalcTests.odb +++ b/reportdesign/qa/complex/reportdesign/test_documents/RPTCalcTests.odb diff --git a/reportdesign/qa/complex/RPTWriterTests.odb b/reportdesign/qa/complex/reportdesign/test_documents/RPTWriterTests.odb Binary files differindex 86228f457..7099b1abf 100755 --- a/reportdesign/qa/complex/RPTWriterTests.odb +++ b/reportdesign/qa/complex/reportdesign/test_documents/RPTWriterTests.odb diff --git a/reportdesign/source/core/api/services.cxx b/reportdesign/source/core/api/services.cxx index 9c500fa9c..21375491f 100644 --- a/reportdesign/source/core/api/services.cxx +++ b/reportdesign/source/core/api/services.cxx @@ -91,12 +91,6 @@ SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( *envTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; } -SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo( - void * serviceManager, void * registryKey) -{ - return cppu::component_writeInfoHelper( - serviceManager, registryKey, entries); -} } // extern "C" /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/reportdesign/source/core/sdr/UndoEnv.cxx b/reportdesign/source/core/sdr/UndoEnv.cxx index 67ef2500a..0dd4e24a2 100644 --- a/reportdesign/source/core/sdr/UndoEnv.cxx +++ b/reportdesign/source/core/sdr/UndoEnv.cxx @@ -45,12 +45,15 @@ #include <com/sun/star/container/XNameContainer.hpp> #include <com/sun/star/beans/PropertyAttribute.hpp> #include <com/sun/star/util/XModifyBroadcaster.hpp> +#include <com/sun/star/beans/XIntrospectionAccess.hpp> +#include <com/sun/star/beans/XIntrospection.hpp> /** === end UNO includes === **/ #include <connectivity/dbtools.hxx> #include <svl/smplhint.hxx> #include <tools/diagnose_ex.h> #include <comphelper/stl_types.hxx> +#include <comphelper/componentcontext.hxx> #include <vcl/svapp.hxx> #include <dbaccess/singledoccontroller.hxx> #include <svx/unoshape.hxx> @@ -70,8 +73,36 @@ namespace rptui //---------------------------------------------------------------------------- -DECLARE_STL_USTRINGACCESS_MAP(bool, AllProperties); -DECLARE_STL_STDKEY_MAP(uno::Reference< beans::XPropertySet >, AllProperties, PropertySetInfoCache); +struct PropertyInfo +{ + bool bIsReadonlyOrTransient; + + PropertyInfo() + :bIsReadonlyOrTransient( false ) + { + } + + PropertyInfo( const bool i_bIsTransientOrReadOnly ) + :bIsReadonlyOrTransient( i_bIsTransientOrReadOnly ) + { + } +}; + +typedef ::std::hash_map< ::rtl::OUString, PropertyInfo, ::rtl::OUStringHash > PropertiesInfo; + +struct ObjectInfo +{ + PropertiesInfo aProperties; + Reference< XPropertySet > xPropertyIntrospection; + + ObjectInfo() + :aProperties() + ,xPropertyIntrospection() + { + } +}; + +typedef ::std::map< Reference< XPropertySet >, ObjectInfo, ::comphelper::OInterfaceCompare< XPropertySet > > PropertySetInfoCache; // ----------------------------------------------------------------------------- @@ -86,6 +117,7 @@ public: ConditionUpdater m_aConditionUpdater; ::osl::Mutex m_aMutex; ::std::vector< uno::Reference< container::XChild> > m_aSections; + Reference< XIntrospection > m_xIntrospection; oslInterlockedCount m_nLocks; sal_Bool m_bReadOnly; sal_Bool m_bIsUndo; @@ -155,7 +187,7 @@ void OXUndoEnvironment::Clear(const Accessor& /*_r*/) { uno::Reference<beans::XPropertySet> xProp(aIter->first,uno::UNO_QUERY); xProp->getPropertySetInfo(); - int nlen = aIter->second.size(); + int nlen = aIter->second.aProperties.size(); nlen = nlen; } #endif @@ -240,29 +272,73 @@ void SAL_CALL OXUndoEnvironment::propertyChange( const PropertyChangeEvent& _rEv int nlen = m_pImpl->m_aPropertySetCache.size(); nlen = nlen; #endif - PropertySetInfoCache::iterator aSetPos = m_pImpl->m_aPropertySetCache.find(xSet); - if (aSetPos == m_pImpl->m_aPropertySetCache.end()) + PropertySetInfoCache::iterator objectPos = m_pImpl->m_aPropertySetCache.find(xSet); + if (objectPos == m_pImpl->m_aPropertySetCache.end()) { - AllProperties aNewEntry; - aSetPos = m_pImpl->m_aPropertySetCache.insert(PropertySetInfoCache::value_type(xSet,aNewEntry)).first; - DBG_ASSERT(aSetPos != m_pImpl->m_aPropertySetCache.end(), "OXUndoEnvironment::propertyChange : just inserted it ... why it's not there ?"); + objectPos = m_pImpl->m_aPropertySetCache.insert( PropertySetInfoCache::value_type( + xSet, ObjectInfo() + ) ).first; + DBG_ASSERT(objectPos != m_pImpl->m_aPropertySetCache.end(), "OXUndoEnvironment::propertyChange : just inserted it ... why it's not there ?"); } - if ( aSetPos == m_pImpl->m_aPropertySetCache.end() ) + if ( objectPos == m_pImpl->m_aPropertySetCache.end() ) return; // now we have access to the cached info about the set // let's see what we know about the property - AllProperties& rPropInfos = aSetPos->second; - AllPropertiesIterator aPropertyPos = rPropInfos.find( _rEvent.PropertyName ); - if (aPropertyPos == rPropInfos.end()) + ObjectInfo& rObjectInfo = objectPos->second; + PropertiesInfo::iterator aPropertyPos = rObjectInfo.aProperties.find( _rEvent.PropertyName ); + if ( aPropertyPos == rObjectInfo.aProperties.end() ) { // nothing 'til now ... have to change this .... // the attributes - INT32 nAttributes = xSet->getPropertySetInfo()->getPropertyByName( _rEvent.PropertyName ).Attributes; - bool bTransReadOnly = ((nAttributes & PropertyAttribute::READONLY) != 0) || ((nAttributes & PropertyAttribute::TRANSIENT) != 0); + Reference< XPropertySetInfo > xPSI( xSet->getPropertySetInfo(), UNO_SET_THROW ); + INT32 nPropertyAttributes = 0; + try + { + if ( xPSI->hasPropertyByName( _rEvent.PropertyName ) ) + { + nPropertyAttributes = xPSI->getPropertyByName( _rEvent.PropertyName ).Attributes; + } + else + { + // it's perfectly valid for a component to notify a change in a property which it doesn't have - as long + // as it has an attribute with this name + if ( !rObjectInfo.xPropertyIntrospection.is() ) + { + if ( !m_pImpl->m_xIntrospection.is() ) + { + ::comphelper::ComponentContext aContext( m_pImpl->m_rModel.getController()->getORB() ); + OSL_VERIFY( aContext.createComponent( "com.sun.star.beans.Introspection", m_pImpl->m_xIntrospection ) ); + } + if ( m_pImpl->m_xIntrospection.is() ) + { + Reference< XIntrospectionAccess > xIntrospection( + m_pImpl->m_xIntrospection->inspect( makeAny( _rEvent.Source ) ), + UNO_SET_THROW + ); + rObjectInfo.xPropertyIntrospection.set( xIntrospection->queryAdapter( XPropertySet::static_type() ), UNO_QUERY_THROW ); + } + } + if ( rObjectInfo.xPropertyIntrospection.is() ) + { + xPSI.set( rObjectInfo.xPropertyIntrospection->getPropertySetInfo(), UNO_SET_THROW ); + nPropertyAttributes = xPSI->getPropertyByName( _rEvent.PropertyName ).Attributes; + } + } + } + catch( const Exception& ) + { + DBG_UNHANDLED_EXCEPTION(); + } + const bool bTransReadOnly = + ( ( nPropertyAttributes & PropertyAttribute::READONLY ) != 0 ) + || ( ( nPropertyAttributes & PropertyAttribute::TRANSIENT ) != 0 ); // insert the new entry - aPropertyPos = rPropInfos.insert( AllProperties::value_type( _rEvent.PropertyName, bTransReadOnly ) ).first; - DBG_ASSERT(aPropertyPos != rPropInfos.end(), "OXUndoEnvironment::propertyChange : just inserted it ... why it's not there ?"); + aPropertyPos = rObjectInfo.aProperties.insert( PropertiesInfo::value_type( + _rEvent.PropertyName, + PropertyInfo( bTransReadOnly ) + ) ).first; + DBG_ASSERT(aPropertyPos != rObjectInfo.aProperties.end(), "OXUndoEnvironment::propertyChange : just inserted it ... why it's not there ?"); } implSetModified(); @@ -271,7 +347,7 @@ void SAL_CALL OXUndoEnvironment::propertyChange( const PropertyChangeEvent& _rEv // and are able to decide wether or not we need an undo action // no UNDO for transient/readonly properties - if ( aPropertyPos->second ) + if ( aPropertyPos->second.bIsReadonlyOrTransient ) return; // give components with sub responsibilities a chance diff --git a/reportdesign/source/filter/xml/xmlGroup.cxx b/reportdesign/source/filter/xml/xmlGroup.cxx index f56239dbd..70c90f983 100644 --- a/reportdesign/source/filter/xml/xmlGroup.cxx +++ b/reportdesign/source/filter/xml/xmlGroup.cxx @@ -154,6 +154,11 @@ OXMLGroup::OXMLGroup( ORptFilter& _rImport { nGroupOn = report::GroupOn::QUARTAL; } + else if ( sCompleteFormula.matchIgnoreAsciiCase(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("rpt:INT((MONTH")),0) + && sCompleteFormula.endsWithIgnoreAsciiCaseAsciiL("-1)/3)+1",8) ) + { + nGroupOn = report::GroupOn::QUARTAL; + } else if ( sFormula ==::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("rpt:WEEK"))) nGroupOn = report::GroupOn::WEEK; else if ( sFormula ==::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("rpt:DAY"))) diff --git a/reportdesign/source/filter/xml/xmlservices.cxx b/reportdesign/source/filter/xml/xmlservices.cxx index cf5d75300..c87c8873a 100644 --- a/reportdesign/source/filter/xml/xmlservices.cxx +++ b/reportdesign/source/filter/xml/xmlservices.cxx @@ -94,11 +94,5 @@ extern "C" void SAL_CALL component_getImplementationEnvironment( *envTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; } -extern "C" sal_Bool SAL_CALL component_writeInfo( - void * serviceManager, void * registryKey) -{ - return cppu::component_writeInfoHelper( - serviceManager, registryKey, entries); -} -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
\ No newline at end of file diff --git a/reportdesign/source/ui/dlg/Condition.cxx b/reportdesign/source/ui/dlg/Condition.cxx index b05321fca..ac2c9140b 100644 --- a/reportdesign/source/ui/dlg/Condition.cxx +++ b/reportdesign/source/ui/dlg/Condition.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/reportdesign/source/ui/dlg/DateTime.src b/reportdesign/source/ui/dlg/DateTime.src index 4d5fb9958..227aad173 100644 --- a/reportdesign/source/ui/dlg/DateTime.src +++ b/reportdesign/source/ui/dlg/DateTime.src @@ -47,6 +47,7 @@ ModalDialog RID_DATETIME_DLG CheckBox CB_DATE { + HelpID = "reportdesign:CheckBox:RID_DATETIME_DLG:CB_DATE"; Pos = MAP_APPFONT ( UNRELATED_CONTROLS , RELATED_CONTROLS /* + UNRELATED_CONTROLS + FIXEDTEXT_HEIGHT */) ; Size = MAP_APPFONT ( PAGE_WIDTH - 2*UNRELATED_CONTROLS, FIXEDTEXT_HEIGHT ) ; Check = TRUE; @@ -62,6 +63,7 @@ ModalDialog RID_DATETIME_DLG ListBox LB_DATE_TYPE { + HelpID = "reportdesign:ListBox:RID_DATETIME_DLG:LB_DATE_TYPE"; Pos = MAP_APPFONT ( 2 * UNRELATED_CONTROLS + BUTTON_WIDTH, RELATED_CONTROLS + UNRELATED_CONTROLS + CHECKBOX_HEIGHT) ; Size = MAP_APPFONT( PAGE_WIDTH - 3*UNRELATED_CONTROLS - BUTTON_WIDTH, 60 ); Border = TRUE; @@ -78,6 +80,7 @@ ModalDialog RID_DATETIME_DLG CheckBox CB_TIME { + HelpID = "reportdesign:CheckBox:RID_DATETIME_DLG:CB_TIME"; Pos = MAP_APPFONT ( UNRELATED_CONTROLS, RELATED_CONTROLS + 3*UNRELATED_CONTROLS + CHECKBOX_HEIGHT + LISTBOX_HEIGHT) ; Size = MAP_APPFONT ( PAGE_WIDTH - 2*UNRELATED_CONTROLS, FIXEDTEXT_HEIGHT ) ; Check = TRUE; @@ -93,6 +96,7 @@ ModalDialog RID_DATETIME_DLG ListBox LB_TIME_TYPE { + HelpID = "reportdesign:ListBox:RID_DATETIME_DLG:LB_TIME_TYPE"; Pos = MAP_APPFONT ( 2 * UNRELATED_CONTROLS + BUTTON_WIDTH, RELATED_CONTROLS + 4*UNRELATED_CONTROLS + 2*CHECKBOX_HEIGHT + LISTBOX_HEIGHT) ; Size = MAP_APPFONT( PAGE_WIDTH - 3*UNRELATED_CONTROLS - BUTTON_WIDTH, 60 ); Border = TRUE; diff --git a/reportdesign/source/ui/dlg/Formula.cxx b/reportdesign/source/ui/dlg/Formula.cxx index 7dcd550d7..1fcfc2df5 100644 --- a/reportdesign/source/ui/dlg/Formula.cxx +++ b/reportdesign/source/ui/dlg/Formula.cxx @@ -100,7 +100,7 @@ FormulaDialog::~FormulaDialog() { if ( m_pAddField ) { - SvtViewOptions aDlgOpt( E_WINDOW, String::CreateFromInt32( HID_RPT_FIELD_SEL_WIN ) ); + SvtViewOptions aDlgOpt( E_WINDOW, String::CreateFromAscii( HID_RPT_FIELD_SEL_WIN ) ); aDlgOpt.SetWindowState( ::rtl::OUString::createFromAscii( m_pAddField->GetWindowState((WINDOWSTATE_MASK_X | WINDOWSTATE_MASK_Y | WINDOWSTATE_MASK_STATE | WINDOWSTATE_MASK_MINIMIZED)).GetBuffer() ) ); ::std::auto_ptr<Window> aTemp2(m_pAddField); @@ -210,7 +210,7 @@ void FormulaDialog::ToggleCollapsed( RefEdit* _pEdit, RefButton* _pButton) { m_pAddField = new OAddFieldWindow(this,m_xRowSet); m_pAddField->SetCreateHdl(LINK( this, FormulaDialog, OnClickHdl ) ); - SvtViewOptions aDlgOpt( E_WINDOW, String::CreateFromInt32( HID_RPT_FIELD_SEL_WIN ) ); + SvtViewOptions aDlgOpt( E_WINDOW, String::CreateFromAscii( HID_RPT_FIELD_SEL_WIN ) ); if ( aDlgOpt.Exists() ) { m_pAddField->SetWindowState( ByteString( aDlgOpt.GetWindowState().getStr(), RTL_TEXTENCODING_ASCII_US ) ); diff --git a/reportdesign/source/ui/dlg/GroupsSorting.src b/reportdesign/source/ui/dlg/GroupsSorting.src index 159a45701..3cb470933 100644 --- a/reportdesign/source/ui/dlg/GroupsSorting.src +++ b/reportdesign/source/ui/dlg/GroupsSorting.src @@ -120,6 +120,7 @@ FloatingWindow RID_GROUPS_SORTING ListBox LST_ORDER { + HelpID = "reportdesign:ListBox:RID_GROUPS_SORTING:LST_ORDER"; Border = TRUE; Pos = MAP_APPFONT(2*UNRELATED_CONTROLS + FIXEDTEXT_WIDTH, 4*UNRELATED_CONTROLS + BROWSER_HEIGHT + BUTTON_HEIGHT + FIXEDTEXT_HEIGHT - 1 ); Size = MAP_APPFONT( LISTBOX_WIDTH, 60 ); @@ -146,6 +147,7 @@ FloatingWindow RID_GROUPS_SORTING ListBox LST_HEADERLST { + HelpID = "reportdesign:ListBox:RID_GROUPS_SORTING:LST_HEADERLST"; Border = TRUE; Hide = TRUE; Pos = MAP_APPFONT( 2*UNRELATED_CONTROLS + FIXEDTEXT_WIDTH, 5*UNRELATED_CONTROLS + BROWSER_HEIGHT + BUTTON_HEIGHT + 2*FIXEDTEXT_HEIGHT -1); @@ -171,6 +173,7 @@ FloatingWindow RID_GROUPS_SORTING ListBox LST_FOOTERLST { + HelpID = "reportdesign:ListBox:RID_GROUPS_SORTING:LST_FOOTERLST"; Border = TRUE; Hide = TRUE; Pos = MAP_APPFONT( 2*UNRELATED_CONTROLS + FIXEDTEXT_WIDTH, 6*UNRELATED_CONTROLS + BROWSER_HEIGHT + BUTTON_HEIGHT + 3*FIXEDTEXT_HEIGHT -1); @@ -196,6 +199,7 @@ FloatingWindow RID_GROUPS_SORTING ListBox LST_GROUPONLST { + HelpID = "reportdesign:ListBox:RID_GROUPS_SORTING:LST_GROUPONLST"; Border = TRUE; Hide = TRUE; Pos = MAP_APPFONT( 2*UNRELATED_CONTROLS + FIXEDTEXT_WIDTH, 7*UNRELATED_CONTROLS + BROWSER_HEIGHT + BUTTON_HEIGHT + 4*FIXEDTEXT_HEIGHT -1); @@ -219,6 +223,7 @@ FloatingWindow RID_GROUPS_SORTING NumericField ED_GROUPINTERVALLST { + HelpID = "reportdesign:NumericField:RID_GROUPS_SORTING:ED_GROUPINTERVALLST"; Border = TRUE; Hide = TRUE; Pos = MAP_APPFONT(2*UNRELATED_CONTROLS + FIXEDTEXT_WIDTH , 8*UNRELATED_CONTROLS + BROWSER_HEIGHT + BUTTON_HEIGHT + 5*FIXEDTEXT_HEIGHT -1); @@ -235,6 +240,7 @@ FloatingWindow RID_GROUPS_SORTING }; ListBox LST_KEEPTOGETHERLST { + HelpID = "reportdesign:ListBox:RID_GROUPS_SORTING:LST_KEEPTOGETHERLST"; Border = TRUE; Hide = TRUE; Pos = MAP_APPFONT(2*UNRELATED_CONTROLS + FIXEDTEXT_WIDTH , 9*UNRELATED_CONTROLS + BROWSER_HEIGHT + BUTTON_HEIGHT + 6*FIXEDTEXT_HEIGHT -1); diff --git a/reportdesign/source/ui/dlg/Navigator.cxx b/reportdesign/source/ui/dlg/Navigator.cxx index 10db39347..8f56b5fc4 100644 --- a/reportdesign/source/ui/dlg/Navigator.cxx +++ b/reportdesign/source/ui/dlg/Navigator.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/reportdesign/source/ui/dlg/Navigator.src b/reportdesign/source/ui/dlg/Navigator.src index a97f6f1fc..1c1af073b 100644 --- a/reportdesign/source/ui/dlg/Navigator.src +++ b/reportdesign/source/ui/dlg/Navigator.src @@ -103,7 +103,6 @@ Menu RID_MENU_NAVIGATOR MenuItem { Identifier = SID_SORTINGANDGROUPING; - HelpId = SID_SORTINGANDGROUPING ; Command = ".uno:DbSortingAndGrouping"; Text [ en-US ] = "Sorting and Grouping..."; }; @@ -114,7 +113,6 @@ Menu RID_MENU_NAVIGATOR MenuItem { Identifier = SID_PAGEHEADERFOOTER; - HelpId = SID_PAGEHEADERFOOTER ; Command = ".uno:PageHeaderFooter"; Checkable = TRUE; Text [ en-US ] = "Page Header/Footer..."; @@ -122,7 +120,6 @@ Menu RID_MENU_NAVIGATOR MenuItem { Identifier = SID_REPORTHEADERFOOTER; - HelpId = SID_REPORTHEADERFOOTER ; Command = ".uno:ReportHeaderFooter"; Checkable = TRUE; Text [ en-US ] = "Report Header/Footer..."; @@ -134,7 +131,6 @@ Menu RID_MENU_NAVIGATOR MenuItem { Identifier = SID_RPT_NEW_FUNCTION; - HelpId = SID_RPT_NEW_FUNCTION; Command = ".uno:NewFunction"; Text [ en-US ] = "New Function"; }; @@ -145,7 +141,6 @@ Menu RID_MENU_NAVIGATOR MenuItem { Identifier = SID_SHOW_PROPERTYBROWSER; - HelpId = SID_SHOW_PROPERTYBROWSER ; Command = ".uno:FormProperties"; Text [ en-US ] = "Properties..."; }; diff --git a/reportdesign/source/ui/dlg/PageNumber.src b/reportdesign/source/ui/dlg/PageNumber.src index 751bb7c54..58d8c4a04 100644 --- a/reportdesign/source/ui/dlg/PageNumber.src +++ b/reportdesign/source/ui/dlg/PageNumber.src @@ -54,6 +54,7 @@ ModalDialog RID_PAGENUMBERS RadioButton RB_PAGE_N { + HelpID = "reportdesign:RadioButton:RID_PAGENUMBERS:RB_PAGE_N"; Pos = MAP_APPFONT ( UNRELATED_CONTROLS + RELATED_CONTROLS, 2*RELATED_CONTROLS + FIXEDTEXT_HEIGHT) ; Size = MAP_APPFONT ( PAGE_WIDTH - 2*RELATED_CONTROLS , FIXEDTEXT_HEIGHT ) ; Group = TRUE; @@ -62,6 +63,7 @@ ModalDialog RID_PAGENUMBERS }; RadioButton RB_PAGE_N_OF_M { + HelpID = "reportdesign:RadioButton:RID_PAGENUMBERS:RB_PAGE_N_OF_M"; Pos = MAP_APPFONT ( UNRELATED_CONTROLS + RELATED_CONTROLS, 3*RELATED_CONTROLS + 2*FIXEDTEXT_HEIGHT) ; Size = MAP_APPFONT ( PAGE_WIDTH - 2*RELATED_CONTROLS , FIXEDTEXT_HEIGHT ) ; Text [ en-US ] = "Page N of M"; @@ -76,6 +78,7 @@ ModalDialog RID_PAGENUMBERS RadioButton RB_PAGE_TOPPAGE { + HelpID = "reportdesign:RadioButton:RID_PAGENUMBERS:RB_PAGE_TOPPAGE"; Pos = MAP_APPFONT ( UNRELATED_CONTROLS + RELATED_CONTROLS, 4*RELATED_CONTROLS + UNRELATED_CONTROLS + 4*FIXEDTEXT_HEIGHT) ; Size = MAP_APPFONT ( PAGE_WIDTH - 2*RELATED_CONTROLS , FIXEDTEXT_HEIGHT ) ; Group = TRUE; @@ -84,6 +87,7 @@ ModalDialog RID_PAGENUMBERS }; RadioButton RB_PAGE_BOTTOMPAGE { + HelpID = "reportdesign:RadioButton:RID_PAGENUMBERS:RB_PAGE_BOTTOMPAGE"; Pos = MAP_APPFONT ( UNRELATED_CONTROLS + RELATED_CONTROLS, 5*RELATED_CONTROLS + UNRELATED_CONTROLS + 5*FIXEDTEXT_HEIGHT) ; Size = MAP_APPFONT ( PAGE_WIDTH - 2*RELATED_CONTROLS , FIXEDTEXT_HEIGHT ) ; Text [ en-US ] = "Bottom of Page (Footer)"; @@ -104,6 +108,7 @@ ModalDialog RID_PAGENUMBERS }; ListBox LST_ALIGNMENT { + HelpID = "reportdesign:ListBox:RID_PAGENUMBERS:LST_ALIGNMENT"; Border = TRUE; Pos = MAP_APPFONT( 2*UNRELATED_CONTROLS + FIXEDTEXT_WIDTH , 6*RELATED_CONTROLS + 2*UNRELATED_CONTROLS + 7*FIXEDTEXT_HEIGHT -1); Size = MAP_APPFONT( LISTBOX_WIDTH, 60 ); @@ -121,6 +126,7 @@ ModalDialog RID_PAGENUMBERS }; CheckBox CB_SHOWNUMBERONFIRSTPAGE { + HelpID = "reportdesign:CheckBox:RID_PAGENUMBERS:CB_SHOWNUMBERONFIRSTPAGE"; Pos = MAP_APPFONT ( UNRELATED_CONTROLS , 6*RELATED_CONTROLS + 3*UNRELATED_CONTROLS + 8*FIXEDTEXT_HEIGHT) ; Size = MAP_APPFONT ( PAGE_WIDTH - 2*RELATED_CONTROLS , FIXEDTEXT_HEIGHT ) ; Check = TRUE; diff --git a/reportdesign/source/ui/inc/ColumnInfo.hxx b/reportdesign/source/ui/inc/ColumnInfo.hxx index 3a3cfa9a1..b418c23b4 100644 --- a/reportdesign/source/ui/inc/ColumnInfo.hxx +++ b/reportdesign/source/ui/inc/ColumnInfo.hxx @@ -3,7 +3,7 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * diff --git a/reportdesign/source/ui/inc/DesignView.hxx b/reportdesign/source/ui/inc/DesignView.hxx index c355a6c46..be8ed2e2a 100644 --- a/reportdesign/source/ui/inc/DesignView.hxx +++ b/reportdesign/source/ui/inc/DesignView.hxx @@ -158,6 +158,8 @@ namespace rptui */ void alignMarkedObjects(sal_Int32 _nControlModification, bool _bAlignAtSection, bool bBoundRects = false); +#if 0 +#endif /** All objects will be marked. */ void SelectAll(const sal_uInt16 _nObjectType); diff --git a/reportdesign/source/ui/inc/FunctionHelper.hxx b/reportdesign/source/ui/inc/FunctionHelper.hxx index 207977fc4..a26488ebf 100644 --- a/reportdesign/source/ui/inc/FunctionHelper.hxx +++ b/reportdesign/source/ui/inc/FunctionHelper.hxx @@ -82,7 +82,7 @@ public: virtual void fillVisibleArgumentMapping(::std::vector<USHORT>& _rArguments) const ; virtual void initArgumentInfo() const; virtual ::rtl::OUString getSignature() const ; - virtual long getHelpId() const ; + virtual rtl::OString getHelpId() const ; virtual sal_uInt32 getParameterCount() const ; virtual ::rtl::OUString getParameterName(sal_uInt32 _nPos) const ; virtual ::rtl::OUString getParameterDescription(sal_uInt32 _nPos) const ; diff --git a/reportdesign/source/ui/inc/GroupsSorting.hxx b/reportdesign/source/ui/inc/GroupsSorting.hxx index eb86794d0..f0650b932 100644 --- a/reportdesign/source/ui/inc/GroupsSorting.hxx +++ b/reportdesign/source/ui/inc/GroupsSorting.hxx @@ -33,7 +33,7 @@ #include <vcl/lstbox.hxx> #include <vcl/edit.hxx> #include <vcl/field.hxx> -#include <vcl/imagebtn.hxx> +#include <vcl/button.hxx> #include <vcl/toolbox.hxx> #include <com/sun/star/report/XGroups.hpp> #include <com/sun/star/report/XGroup.hpp> diff --git a/reportdesign/source/ui/inc/metadata.hxx b/reportdesign/source/ui/inc/metadata.hxx index 84d9d8c79..1b41edae7 100644 --- a/reportdesign/source/ui/inc/metadata.hxx +++ b/reportdesign/source/ui/inc/metadata.hxx @@ -63,7 +63,7 @@ namespace rptui // IPropertyInfoService sal_Int32 getPropertyId(const String& _rName) const; String getPropertyTranslation(sal_Int32 _nId) const; - sal_Int32 getPropertyHelpId(sal_Int32 _nId) const; + rtl::OString getPropertyHelpId(sal_Int32 _nId) const; sal_uInt32 getPropertyUIFlags(sal_Int32 _nId) const; static void getExcludeProperties(::std::vector< com::sun::star::beans::Property >& _rExcludeProperties,const ::com::sun::star::uno::Reference< ::com::sun::star::inspection::XPropertyHandler >& _xFormComponentHandler); @@ -86,7 +86,7 @@ namespace rptui class HelpIdUrl { public: - static ::rtl::OUString getHelpURL( sal_uInt32 _nHelpId ); + static ::rtl::OUString getHelpURL( const rtl::OString& _sHelpId ); }; //======================================================================== diff --git a/reportdesign/source/ui/inspection/DataProviderHandler.cxx b/reportdesign/source/ui/inspection/DataProviderHandler.cxx index b8475fb45..0ed59b0bb 100644 --- a/reportdesign/source/ui/inspection/DataProviderHandler.cxx +++ b/reportdesign/source/ui/inspection/DataProviderHandler.cxx @@ -52,7 +52,7 @@ #include <com/sun/star/inspection/XNumericControl.hpp> #include <com/sun/star/container/XNameContainer.hpp> #include <com/sun/star/util/MeasureUnit.hpp> -#include <vcl/fldunit.hxx> +#include <tools/fldunit.hxx> #include "metadata.hxx" #include <vcl/svapp.hxx> #include <osl/mutex.hxx> @@ -279,7 +279,7 @@ inspection::LineDescriptor SAL_CALL DataProviderHandler::describePropertyLine(co switch(nId) { case PROPERTY_ID_CHARTTYPE: - aOut.PrimaryButtonId = UID_RPT_PROP_CHARTTYPE_DLG; + aOut.PrimaryButtonId = rtl::OUString::createFromAscii(UID_RPT_PROP_CHARTTYPE_DLG); aOut.Control = _xControlFactory->createPropertyControl(inspection::PropertyControlType::TextField , sal_True); aOut.HasPrimaryButton = sal_True; break; @@ -289,7 +289,7 @@ inspection::LineDescriptor SAL_CALL DataProviderHandler::describePropertyLine(co case PROPERTY_ID_MASTERFIELDS: case PROPERTY_ID_DETAILFIELDS: aOut.Control = _xControlFactory->createPropertyControl(inspection::PropertyControlType::StringListField , sal_False); - aOut.PrimaryButtonId = UID_RPT_PROP_DLG_LINKFIELDS; + aOut.PrimaryButtonId = rtl::OUString::createFromAscii(UID_RPT_PROP_DLG_LINKFIELDS); aOut.HasPrimaryButton = sal_True; break; default: diff --git a/reportdesign/source/ui/inspection/DefaultInspection.cxx b/reportdesign/source/ui/inspection/DefaultInspection.cxx index b82f11071..8691f940d 100644 --- a/reportdesign/source/ui/inspection/DefaultInspection.cxx +++ b/reportdesign/source/ui/inspection/DefaultInspection.cxx @@ -38,17 +38,20 @@ #include <rtl/ustrbuf.hxx> #include <tools/debug.hxx> #include "metadata.hxx" +#include <tools/urlobj.hxx> //........................................................................ namespace rptui { //........................................................................ //------------------------------------------------------------------------ - ::rtl::OUString HelpIdUrl::getHelpURL( sal_uInt32 _nHelpId ) + ::rtl::OUString HelpIdUrl::getHelpURL( const rtl::OString& sHelpId ) { ::rtl::OUStringBuffer aBuffer; - aBuffer.appendAscii( "HID:" ); - aBuffer.append( (sal_Int32)_nHelpId ); + ::rtl::OUString aTmp( sHelpId, sHelpId.getLength(), RTL_TEXTENCODING_UTF8 ); + DBG_ASSERT( INetURLObject( aTmp ).GetProtocol() == INET_PROT_NOT_VALID, "Wrong HelpId!" ); + aBuffer.appendAscii( INET_HID_SCHEME ); + aBuffer.append( aTmp.getStr() ); return aBuffer.makeStringAndClear(); } @@ -232,7 +235,7 @@ namespace rptui { const sal_Char* programmaticName; USHORT uiNameResId; - sal_uInt32 helpId; + rtl::OString helpId; } aCategories[] = { { "General", RID_STR_PROPPAGE_DEFAULT, HID_RPT_PROPDLG_TAB_GENERAL }, { "Data", RID_STR_PROPPAGE_DATA, HID_RPT_PROPDLG_TAB_DATA }, diff --git a/reportdesign/source/ui/inspection/GeometryHandler.cxx b/reportdesign/source/ui/inspection/GeometryHandler.cxx index cc3583823..fbb1858ff 100644 --- a/reportdesign/source/ui/inspection/GeometryHandler.cxx +++ b/reportdesign/source/ui/inspection/GeometryHandler.cxx @@ -67,7 +67,7 @@ #include <vcl/msgbox.hxx> #include <vcl/waitobj.hxx> -#include <vcl/fldunit.hxx> +#include <tools/fldunit.hxx> #include <vcl/stdtext.hxx> #include "ModuleHelper.hxx" @@ -777,12 +777,12 @@ inspection::LineDescriptor SAL_CALL GeometryHandler::describePropertyLine(const break; case PROPERTY_ID_INITIALFORMULA: case PROPERTY_ID_FORMULA: - aOut.PrimaryButtonId = UID_RPT_PROP_FORMULA; + aOut.PrimaryButtonId = rtl::OUString::createFromAscii(UID_RPT_PROP_FORMULA); aOut.HasPrimaryButton = sal_True; aOut.Control = _xControlFactory->createPropertyControl(inspection::PropertyControlType::MultiLineTextField , sal_False); break; case PROPERTY_ID_CONDITIONALPRINTEXPRESSION: - aOut.PrimaryButtonId = UID_RPT_PROP_FORMULA; + aOut.PrimaryButtonId = rtl::OUString::createFromAscii(UID_RPT_PROP_FORMULA); aOut.HasPrimaryButton = sal_True; aOut.Control = _xControlFactory->createPropertyControl(inspection::PropertyControlType::MultiLineTextField , sal_False); break; @@ -797,7 +797,7 @@ inspection::LineDescriptor SAL_CALL GeometryHandler::describePropertyLine(const if ( m_nDataFieldType == DATA_OR_FORMULA ) { - aOut.PrimaryButtonId = UID_RPT_PROP_FORMULA; + aOut.PrimaryButtonId = rtl::OUString::createFromAscii(UID_RPT_PROP_FORMULA); aOut.HasPrimaryButton = sal_True; } @@ -824,12 +824,12 @@ inspection::LineDescriptor SAL_CALL GeometryHandler::describePropertyLine(const aOut.Control = _xControlFactory->createPropertyControl( inspection::PropertyControlType::ColorListBox, sal_False ); break; case PROPERTY_ID_FONT: - aOut.PrimaryButtonId = UID_RPT_RPT_PROP_DLG_FONT_TYPE; + aOut.PrimaryButtonId = rtl::OUString::createFromAscii(UID_RPT_RPT_PROP_DLG_FONT_TYPE); aOut.Control = _xControlFactory->createPropertyControl( inspection::PropertyControlType::TextField, sal_True ); aOut.HasPrimaryButton = sal_True; break; case PROPERTY_ID_AREA: - aOut.PrimaryButtonId = UID_RPT_RPT_PROP_DLG_AREA; + aOut.PrimaryButtonId = rtl::OUString::createFromAscii(UID_RPT_RPT_PROP_DLG_AREA); aOut.Control = _xControlFactory->createPropertyControl( inspection::PropertyControlType::TextField, sal_True ); aOut.HasPrimaryButton = sal_True; break; diff --git a/reportdesign/source/ui/inspection/ReportComponentHandler.cxx b/reportdesign/source/ui/inspection/ReportComponentHandler.cxx index c923879bc..555e3695b 100644 --- a/reportdesign/source/ui/inspection/ReportComponentHandler.cxx +++ b/reportdesign/source/ui/inspection/ReportComponentHandler.cxx @@ -39,7 +39,7 @@ #include <com/sun/star/inspection/XNumericControl.hpp> #include <com/sun/star/container/XNameContainer.hpp> #include <com/sun/star/util/MeasureUnit.hpp> -#include <vcl/fldunit.hxx> +#include <tools/fldunit.hxx> #include "metadata.hxx" //........................................................................ diff --git a/reportdesign/source/ui/inspection/metadata.cxx b/reportdesign/source/ui/inspection/metadata.cxx index bc866d9c1..0ba404942 100644 --- a/reportdesign/source/ui/inspection/metadata.cxx +++ b/reportdesign/source/ui/inspection/metadata.cxx @@ -53,7 +53,7 @@ namespace rptui { String sName; String sTranslation; - sal_uInt32 nHelpId; + rtl::OString sHelpId; sal_Int32 nId; sal_uInt16 nPos; sal_uInt32 nUIFlags; @@ -63,16 +63,16 @@ namespace rptui sal_Int32 _nId, const String& aTranslation, sal_uInt16 nPosId, - sal_uInt32 nHelpId, + const rtl::OString& _sHelpId, sal_uInt32 _nUIFlags); }; //------------------------------------------------------------------------ OPropertyInfoImpl::OPropertyInfoImpl(const ::rtl::OUString& _rName, sal_Int32 _nId, - const String& aString, sal_uInt16 nP, sal_uInt32 nHid, sal_uInt32 _nUIFlags) + const String& aString, sal_uInt16 nP, const rtl::OString& sHid, sal_uInt32 _nUIFlags) :sName(_rName) ,sTranslation(aString) - ,nHelpId(nHid) + ,sHelpId(sHid) ,nId(_nId) ,nPos(nP) ,nUIFlags(_nUIFlags) @@ -194,10 +194,10 @@ namespace rptui } //------------------------------------------------------------------------ - sal_Int32 OPropertyInfoService::getPropertyHelpId(sal_Int32 _nId) const + rtl::OString OPropertyInfoService::getPropertyHelpId(sal_Int32 _nId) const { const OPropertyInfoImpl* pInfo = getPropertyInfo(_nId); - return (pInfo) ? pInfo->nHelpId : 0; + return (pInfo) ? pInfo->sHelpId : rtl::OString(); } //------------------------------------------------------------------------ @@ -213,7 +213,7 @@ namespace rptui // intialisierung if(!s_pPropertyInfos) getPropertyInfo(); - OPropertyInfoImpl aSearch(_rName, 0L, String(), 0, 0, 0); + OPropertyInfoImpl aSearch(_rName, 0L, String(), 0, "", 0); const OPropertyInfoImpl* pPropInfo = ::std::lower_bound( s_pPropertyInfos, s_pPropertyInfos + s_nCount, aSearch, PropertyInfoLessByName() ); diff --git a/reportdesign/source/ui/misc/FunctionHelper.cxx b/reportdesign/source/ui/misc/FunctionHelper.cxx index b1535d600..7b1fe067b 100644 --- a/reportdesign/source/ui/misc/FunctionHelper.cxx +++ b/reportdesign/source/ui/misc/FunctionHelper.cxx @@ -217,9 +217,9 @@ void FunctionDescription::initArgumentInfo() const return m_xFunctionDescription->getSignature(); } // ----------------------------------------------------------------------------- -long FunctionDescription::getHelpId() const +rtl::OString FunctionDescription::getHelpId() const { - return 0; + return rtl::OString(); } // ----------------------------------------------------------------------------- sal_uInt32 FunctionDescription::getParameterCount() const diff --git a/reportdesign/source/ui/misc/rptuiservices.cxx b/reportdesign/source/ui/misc/rptuiservices.cxx index 444ae268e..4d40808cd 100644 --- a/reportdesign/source/ui/misc/rptuiservices.cxx +++ b/reportdesign/source/ui/misc/rptuiservices.cxx @@ -82,11 +82,5 @@ extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnviron *envTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; } -extern "C" SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo( - void * serviceManager, void * registryKey) -{ - return cppu::component_writeInfoHelper( - serviceManager, registryKey, entries); -} -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
\ No newline at end of file diff --git a/reportdesign/source/ui/report/DesignView.cxx b/reportdesign/source/ui/report/DesignView.cxx index 968154d27..bc9056e14 100644 --- a/reportdesign/source/ui/report/DesignView.cxx +++ b/reportdesign/source/ui/report/DesignView.cxx @@ -201,7 +201,7 @@ ODesignView::~ODesignView() } if ( m_pAddField ) { - SvtViewOptions aDlgOpt( E_WINDOW, String::CreateFromInt32( UID_RPT_RPT_APP_VIEW ) ); + SvtViewOptions aDlgOpt( E_WINDOW, String::CreateFromAscii( UID_RPT_RPT_APP_VIEW ) ); aDlgOpt.SetWindowState( ::rtl::OUString::createFromAscii( m_pAddField->GetWindowState(WINDOWSTATE_MASK_ALL).GetBuffer() ) ); notifySystemWindow(this,m_pAddField,::comphelper::mem_fun(&TaskPaneList::RemoveWindow)); ::std::auto_ptr<Window> aTemp2(m_pAddField); @@ -591,7 +591,7 @@ void ODesignView::toggleAddField() uno::Reference < beans::XPropertySet > xSet(rReportController.getRowSet(),uno::UNO_QUERY); m_pAddField = new OAddFieldWindow(this,xSet); m_pAddField->SetCreateHdl(LINK( &rReportController, OReportController, OnCreateHdl ) ); - SvtViewOptions aDlgOpt( E_WINDOW, String::CreateFromInt32( UID_RPT_RPT_APP_VIEW ) ); + SvtViewOptions aDlgOpt( E_WINDOW, String::CreateFromAscii( UID_RPT_RPT_APP_VIEW ) ); if ( aDlgOpt.Exists() ) m_pAddField->SetWindowState( ByteString( aDlgOpt.GetWindowState().getStr(), RTL_TEXTENCODING_ASCII_US ) ); m_pAddField->Update(); @@ -662,6 +662,8 @@ void ODesignView::alignMarkedObjects(sal_Int32 _nControlModification,bool _bAlig { m_aScrollWindow.alignMarkedObjects(_nControlModification, _bAlignAtSection,bBoundRects); } +#if 0 +#endif //------------------------------------------------------------------------------ sal_Bool ODesignView::handleKeyEvent(const KeyEvent& _rEvent) { diff --git a/reportdesign/source/ui/report/ReportController.cxx b/reportdesign/source/ui/report/ReportController.cxx index 6ebc2deba..cb659700b 100644 --- a/reportdesign/source/ui/report/ReportController.cxx +++ b/reportdesign/source/ui/report/ReportController.cxx @@ -981,37 +981,7 @@ void OReportController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue > { SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( getMutex() ); - if ( !getView() ) - { - switch(_nId) - { - case SID_RULER: - OSL_ENSURE(aArgs.getLength() == 1,"Invalid length!"); - aArgs[0].Value >>= m_bShowRuler; - break; - case SID_HELPLINES_MOVE: - OSL_ENSURE(aArgs.getLength() == 1,"Invalid length!"); - aArgs[0].Value >>= m_bHelplinesMove; - break; - case SID_GRID_VISIBLE: - OSL_ENSURE(aArgs.getLength() == 1,"Invalid length!"); - aArgs[0].Value >>= m_bGridVisible; - break; - case SID_SHOW_PROPERTYBROWSER: - OSL_ENSURE(aArgs.getLength() == 1,"Invalid length!"); - aArgs[0].Value >>= m_bShowProperties; - break; - case SID_PROPERTYBROWSER_LAST_PAGE: - OSL_ENSURE(aArgs.getLength() == 1,"Invalid length!"); - aArgs[0].Value >>= m_sLastActivePage; - break; - case SID_SPLIT_POSITION: - OSL_ENSURE(aArgs.getLength() == 1,"Invalid length!"); - aArgs[0].Value >>= m_nSplitPos; - break; - } - return; // return without execution - } + sal_Bool bForceBroadcast = sal_False; switch(_nId) { @@ -1670,6 +1640,7 @@ short OReportController::saveModified() { return RET_NO; } + // ----------------------------------------------------------------------------- void OReportController::impl_initialize( ) { @@ -1766,7 +1737,7 @@ void OReportController::impl_initialize( ) } catch(const SQLException&) { - OSL_ENSURE(sal_False, "OReportController::initialize: caught an exception!"); + DBG_UNHANDLED_EXCEPTION(); } } // ----------------------------------------------------------------------------- @@ -2713,35 +2684,38 @@ void OReportController::shrinkSection(USHORT _nUndoStrId, uno::Reference<report: uno::Any SAL_CALL OReportController::getViewData(void) throw( uno::RuntimeException ) { ::osl::MutexGuard aGuard( getMutex() ); - typedef ::std::pair< ::rtl::OUString,sal_uInt16> TStringIntPair; - const TStringIntPair pViewDataList[] = + + sal_Int32 nCommandIDs[] = { - TStringIntPair(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("GridVisible")), SID_GRID_VISIBLE) - ,TStringIntPair(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("GridUse")), SID_GRID_USE) - ,TStringIntPair(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("HelplinesMove")), SID_HELPLINES_MOVE) - ,TStringIntPair(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ShowRuler")), SID_RULER) - ,TStringIntPair(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ControlProperties")), SID_SHOW_PROPERTYBROWSER) - ,TStringIntPair(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("LastPropertyBrowserPage")),SID_PROPERTYBROWSER_LAST_PAGE) - ,TStringIntPair(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SplitPosition")), SID_SPLIT_POSITION) + SID_GRID_VISIBLE, + SID_GRID_USE, + SID_HELPLINES_MOVE, + SID_RULER, + SID_SHOW_PROPERTYBROWSER, + SID_PROPERTYBROWSER_LAST_PAGE, + SID_SPLIT_POSITION }; - uno::Sequence<beans::PropertyValue> aCommandProps(SAL_N_ELEMENTS(pViewDataList)); - beans::PropertyValue* pIter = aCommandProps.getArray(); - beans::PropertyValue* pEnd = pIter + aCommandProps.getLength(); - for (sal_Int32 i = 0; pIter != pEnd; ++pIter,++i) + ::comphelper::NamedValueCollection aCommandProperties; + for ( size_t i=0; i < sizeof( nCommandIDs ) / sizeof( nCommandIDs[0] ); ++i ) { - FeatureState aFeatureState = GetState(pViewDataList[i].second); - pIter->Name = pViewDataList[i].first; + const FeatureState aFeatureState = GetState( nCommandIDs[i] ); + + ::rtl::OUString sCommandURL( getURLForId( nCommandIDs[i] ).Main ); + OSL_ENSURE( sCommandURL.indexOfAsciiL( ".uno:", 5 ) == 0, "OReportController::getViewData: illegal command URL!" ); + sCommandURL = sCommandURL.copy( 5 ); + + Any aCommandState; if ( !!aFeatureState.bChecked ) - pIter->Value <<= (*aFeatureState.bChecked) ? sal_True : sal_False; + aCommandState <<= (*aFeatureState.bChecked) ? sal_True : sal_False; else if ( aFeatureState.aValue.hasValue() ) - pIter->Value = aFeatureState.aValue; + aCommandState = aFeatureState.aValue; + aCommandProperties.put( sCommandURL, aCommandState ); } - uno::Sequence<beans::PropertyValue> aProps(1); - aProps[0].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CommandProperties")); - aProps[0].Value <<= aCommandProps; + ::comphelper::NamedValueCollection aViewData; + aViewData.put( "CommandProperties", aCommandProperties.getPropertyValues() ); if ( getDesignView() ) { @@ -2758,68 +2732,83 @@ uno::Any SAL_CALL OReportController::getViewData(void) throw( uno::RuntimeExcept pCollapsedIter->Name = PROPERTY_SECTION + ::rtl::OUString::valueOf(i); pCollapsedIter->Value <<= static_cast<sal_Int32>(*aIter); } - const sal_Int32 nCount = aProps.getLength(); - aProps.realloc( nCount + 1 ); - aProps[nCount].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CollapsedSections")); - aProps[nCount].Value <<= aCollapsedSections; + + aViewData.put( "CollapsedSections", aCollapsedSections ); } ::boost::shared_ptr<OSectionWindow> pSectionWindow = getDesignView()->getMarkedSection(); if ( pSectionWindow.get() ) { - const sal_Int32 nCount = aProps.getLength(); - aProps.realloc( nCount + 1 ); - aProps[nCount].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MarkedSection")); - aProps[nCount].Value <<= (sal_Int32)pSectionWindow->getReportSection().getPage()->GetPageNum(); + aViewData.put( "MarkedSection", (sal_Int32)pSectionWindow->getReportSection().getPage()->GetPageNum() ); } } - const sal_Int32 nCount = aProps.getLength(); - aProps.realloc( nCount + 1 ); - aProps[nCount].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ZoomFactor")); - aProps[nCount].Value <<= m_nZoomValue; - return uno::makeAny(aProps); + + aViewData.put( "ZoomFactor", m_nZoomValue ); + return uno::makeAny( aViewData.getPropertyValues() ); } // ----------------------------------------------------------------------------- -void SAL_CALL OReportController::restoreViewData(const uno::Any& Data) throw( uno::RuntimeException ) +void SAL_CALL OReportController::restoreViewData(const uno::Any& i_data) throw( uno::RuntimeException ) { ::osl::MutexGuard aGuard( getMutex() ); - uno::Sequence<beans::PropertyValue> aProps; - if ( Data >>= aProps ) + + try { - const beans::PropertyValue* pPropsIter = aProps.getConstArray(); - const beans::PropertyValue* pPropsEnd = pPropsIter + aProps.getLength(); - for (sal_Int32 i = 0; pPropsIter != pPropsEnd; ++pPropsIter,++i) + const ::comphelper::NamedValueCollection aViewData( i_data ); + + m_aCollapsedSections = aViewData.getOrDefault( "CollapsedSections", m_aCollapsedSections ); + m_nPageNum = aViewData.getOrDefault( "MarkedSection", m_nPageNum ); + m_nZoomValue = aViewData.getOrDefault( "ZoomFactor", m_nZoomValue ); + // TODO: setting those 3 members is not enough - in theory, restoreViewData can be called when the + // view is fully alive, so we need to reflect those 3 values in the view. + // (At the moment, the method is called only during construction phase) + + + ::comphelper::NamedValueCollection aCommandProperties( aViewData.get( "CommandProperties" ) ); + const ::std::vector< ::rtl::OUString > aCommandNames( aCommandProperties.getNames() ); + + for ( ::std::vector< ::rtl::OUString >::const_iterator commandName = aCommandNames.begin(); + commandName != aCommandNames.end(); + ++commandName + ) { - if ( pPropsIter->Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("CommandProperties")) ) + const Any& rCommandValue = aCommandProperties.get( *commandName ); + if ( !rCommandValue.hasValue() ) + continue; + + if ( getView() ) { util::URL aCommand; - uno::Sequence< beans::PropertyValue> aArgs(1); - beans::PropertyValue* pArg = aArgs.getArray(); - pArg->Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Value")); - uno::Sequence< beans::PropertyValue> aCommandProps; - if ( pPropsIter->Value >>= aCommandProps ) - { - const beans::PropertyValue* pIter = aCommandProps.getConstArray(); - const beans::PropertyValue* pEnd = pIter + aCommandProps.getLength(); - for (; pIter != pEnd; ++pIter) - { - pArg->Value = pIter->Value; - if ( pArg->Value.hasValue() ) - { - aCommand.Complete = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:")) + pIter->Name; - executeUnChecked(aCommand,aArgs); - } - } - } + aCommand.Complete = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:" ) ) + *commandName; + + Sequence< PropertyValue > aCommandArgs(1); + aCommandArgs[0].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Value" ) ); + aCommandArgs[0].Value = rCommandValue; + + executeUnChecked( aCommand, aCommandArgs ); + } + else + { + if ( commandName->equalsAscii( "ShowRuler" ) ) + OSL_VERIFY( rCommandValue >>= m_bShowRuler ); + else if ( commandName->equalsAscii( "HelplinesMove" ) ) + OSL_VERIFY( rCommandValue >>= m_bHelplinesMove ); + else if ( commandName->equalsAscii( "GridVisible" ) ) + OSL_VERIFY( rCommandValue >>= m_bGridVisible ); + else if ( commandName->equalsAscii( "GridUse" ) ) + OSL_VERIFY( rCommandValue >>= m_bGridUse ); + else if ( commandName->equalsAscii( "ControlProperties" ) ) + OSL_VERIFY( rCommandValue >>= m_bShowProperties ); + else if ( commandName->equalsAscii( "LastPropertyBrowserPage" ) ) + OSL_VERIFY( rCommandValue >>= m_sLastActivePage ); + else if ( commandName->equalsAscii( "SplitPosition" ) ) + OSL_VERIFY( rCommandValue >>= m_nSplitPos ); } - else if ( pPropsIter->Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("CollapsedSections")) ) - pPropsIter->Value >>= m_aCollapsedSections; - else if ( pPropsIter->Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("MarkedSection")) ) - pPropsIter->Value >>= m_nPageNum; - else if ( pPropsIter->Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("ZoomFactor")) ) - pPropsIter->Value >>= m_nZoomValue; } } + catch ( const IllegalArgumentException& e ) + { + DBG_UNHANDLED_EXCEPTION(); + } } // ----------------------------------------------------------------------------- void OReportController::updateFloater() diff --git a/reportdesign/source/ui/report/ViewsWindow.cxx b/reportdesign/source/ui/report/ViewsWindow.cxx index d4ccfeb06..28efc4f9c 100644 --- a/reportdesign/source/ui/report/ViewsWindow.cxx +++ b/reportdesign/source/ui/report/ViewsWindow.cxx @@ -329,7 +329,7 @@ void OViewsWindow::removeSection(USHORT _nPosition) TSectionsMap::iterator aNew = getIteratorAtPos(_nPosition == 0 ? _nPosition+1: _nPosition - 1); m_pParent->getReportView()->UpdatePropertyBrowserDelayed((*aNew)->getReportSection().getSectionView()); - + m_aSections.erase(aPos); Resize(); } diff --git a/reportdesign/source/ui/report/report.src b/reportdesign/source/ui/report/report.src index 52f5fe402..c4c64b83d 100644 --- a/reportdesign/source/ui/report/report.src +++ b/reportdesign/source/ui/report/report.src @@ -32,7 +32,7 @@ #ifndef _SBASLTID_HRC #include <svx/svxids.hrc> #endif - +#include "helpids.hrc" // Dialog Controls --------------------------------------------------------------- @@ -286,7 +286,6 @@ Menu RID_MENU_REPORT MenuItem { Identifier = SID_SORTINGANDGROUPING; - HelpId = SID_SORTINGANDGROUPING ; Command = ".uno:DbSortingAndGrouping"; Text [ en-US ] = "Sorting and Grouping..."; }; @@ -297,14 +296,12 @@ Menu RID_MENU_REPORT MenuItem { Identifier = SID_ATTR_CHAR_COLOR_BACKGROUND; - HelpId = SID_ATTR_CHAR_COLOR_BACKGROUND ; Command = ".uno:DBBackgroundColor"; Text [ en-US ] = "Background Color..."; }; MenuItem { Identifier = SID_RULER; - HelpId = SID_RULER ; Command = ".uno:ShowRuler"; Checkable = TRUE; Text [ en-US ] = "Ruler..."; @@ -312,7 +309,6 @@ Menu RID_MENU_REPORT MenuItem { Identifier = SID_GRID_VISIBLE; - HelpId = SID_GRID_VISIBLE ; Command = ".uno:GridVisible"; Checkable = TRUE; Text [ en-US ] = "Grid..."; @@ -324,14 +320,12 @@ Menu RID_MENU_REPORT MenuItem { Identifier = SID_PAGEHEADERFOOTER; - HelpId = SID_PAGEHEADERFOOTER ; Command = ".uno:PageHeaderFooter"; Checkable = TRUE; }; MenuItem { Identifier = SID_REPORTHEADERFOOTER; - HelpId = SID_REPORTHEADERFOOTER ; Command = ".uno:ReportHeaderFooter"; Checkable = TRUE; }; @@ -342,7 +336,6 @@ Menu RID_MENU_REPORT MenuItem { Identifier = SID_ARRANGEMENU ; - HelpID = SID_ARRANGEMENU ; Command = ".uno:ArrangeMenu" ; Text [ en-US ] = "~Arrange" ; SubMenu = Menu @@ -356,13 +349,13 @@ Menu RID_MENU_REPORT MenuItem { Identifier = SID_FRAME_UP ; - HelpID = SID_FRAME_UP ; + HelpId = ".uno:ObjectForwardOne"; Text [ en-US ] = "Bring ~Forward" ; }; MenuItem { Identifier = SID_FRAME_DOWN ; - HelpID = SID_FRAME_DOWN ; + HelpId = ".uno:ObjectBackOne"; Text [ en-US ] = "Send Back~ward" ; }; MenuItem @@ -431,7 +424,6 @@ Menu RID_MENU_REPORT { Identifier = SID_OBJECT_RESIZING ; Command = ".uno:ObjectResize" ; - HelpID = SID_OBJECT_RESIZING ; Text [ en-US ] = "~Object Resizing" ; Text [ x-comment ] = " "; SubMenu = Menu @@ -442,7 +434,6 @@ Menu RID_MENU_REPORT { Identifier = SID_OBJECT_SMALLESTWIDTH ; Command = ".uno:SmallestWidth" ; - HelpID = SID_OBJECT_SMALLESTWIDTH ; Text [ en-US ] = "~Fit to smallest width" ; Text [ x-comment ] = " "; }; @@ -450,7 +441,6 @@ Menu RID_MENU_REPORT { Identifier = SID_OBJECT_GREATESTWIDTH ; Command = ".uno:GreatestWidth" ; - HelpID = SID_OBJECT_GREATESTWIDTH ; Text [ en-US ] = "~Fit to greatest width" ; Text [ x-comment ] = " "; }; @@ -462,7 +452,6 @@ Menu RID_MENU_REPORT { Identifier = SID_OBJECT_SMALLESTHEIGHT ; Command = ".uno:SmallestHeight" ; - HelpID = SID_OBJECT_SMALLESTHEIGHT ; Text [ en-US ] = "~Fit to smallest height" ; Text [ x-comment ] = " "; }; @@ -470,7 +459,6 @@ Menu RID_MENU_REPORT { Identifier = SID_OBJECT_GREATESTHEIGHT ; Command = ".uno:GreatestHeight" ; - HelpID = SID_OBJECT_GREATESTHEIGHT ; Text [ en-US ] = "~Fit to greatest height" ; Text [ x-comment ] = " "; }; @@ -486,7 +474,6 @@ Menu RID_MENU_REPORT { Identifier = SID_SECTION_SHRINK_MENU ; Command = ".uno:SectionShrinkMenu" ; - HelpID = SID_SECTION_SHRINK_MENU ; Text [ en-US ] = "Section" ; Text [ x-comment ] = " "; SubMenu = Menu @@ -497,7 +484,6 @@ Menu RID_MENU_REPORT { Identifier = SID_SECTION_SHRINK ; Command = ".uno:SectionShrink" ; - HelpID = SID_SECTION_SHRINK ; Text [ en-US ] = "Shrink" ; Text [ x-comment ] = " "; }; @@ -505,7 +491,6 @@ Menu RID_MENU_REPORT { Identifier = SID_SECTION_SHRINK_TOP ; Command = ".uno:SectionShrinkTop" ; - HelpID = SID_SECTION_SHRINK_TOP ; Text [ en-US ] = "Shrink from top" ; Text [ x-comment ] = " "; }; @@ -513,7 +498,6 @@ Menu RID_MENU_REPORT { Identifier = SID_SECTION_SHRINK_BOTTOM ; Command = ".uno:SectionShrinkBottom" ; - HelpID = SID_SECTION_SHRINK_BOTTOM ; Text [ en-US ] = "Shrink from bottom" ; Text [ x-comment ] = " "; }; @@ -527,7 +511,6 @@ Menu RID_MENU_REPORT MenuItem { Identifier = SID_DISTRIBUTION; - HelpId = SID_DISTRIBUTION ; Command = ".uno:Distribution"; Text [ en-US ] = "Distribution..." ; }; @@ -538,7 +521,6 @@ Menu RID_MENU_REPORT MenuItem { Identifier = SID_SHOW_PROPERTYBROWSER; - HelpId = SID_SHOW_PROPERTYBROWSER ; Command = ".uno:FormProperties"; Text [ en-US ] = "Properties..."; }; diff --git a/reportdesign/util/hidother.src b/reportdesign/util/hidother.src index 398f247c8..bd757e60d 100644 --- a/reportdesign/util/hidother.src +++ b/reportdesign/util/hidother.src @@ -26,11 +26,6 @@ ************************************************************************/ #include "../inc/helpids.hrc" -#include "../inc/rptui_slotid.hrc" - -#ifndef _SBASLTID_HRC -#include <svx/svxids.hrc> -#endif hidspecial UID_RPT_RPT_APP_VIEW { HelpId = UID_RPT_RPT_APP_VIEW ; }; hidspecial UID_RPT_SCROLLWINDOW { HelpId = UID_RPT_SCROLLWINDOW ; }; @@ -45,6 +40,7 @@ hidspecial HID_RPT_HORZ_SCROLLBAR { HelpId = HID_RPT_HORZ_SCROLLBAR ; }; hidspecial HID_RPT_VERT_SCROLLBAR { HelpId = HID_RPT_VERT_SCROLLBAR ; }; hidspecial HID_RPT_STARTMARKER { HelpId = HID_RPT_STARTMARKER ; }; +/* hidspecial SID_RPT_SHOWREPORTEXPLORER { HelpId = SID_RPT_SHOWREPORTEXPLORER ; }; hidspecial SID_PAGEHEADERFOOTER { HelpId = SID_PAGEHEADERFOOTER ; }; hidspecial SID_REPORTHEADERFOOTER { HelpId = SID_REPORTHEADERFOOTER ; }; @@ -54,6 +50,9 @@ hidspecial SID_CONDITIONALFORMATTING { HelpId = SID_CONDITIONALFORMATTING ; hidspecial SID_PAGEDIALOG { HelpId = SID_PAGEDIALOG ; }; hidspecial SID_SETCONTROLDEFAULTS { HelpId = SID_SETCONTROLDEFAULTS ; }; hidspecial SID_INSERTBREAK { HelpId = SID_INSERTBREAK ; }; +hidspecial SID_ESCAPE { HelpId = SID_ESCAPE ; }; +*/ + hidspecial HID_RPT_FIELDEXPRESSION { HelpId = HID_RPT_FIELDEXPRESSION ; }; hidspecial HID_RPT_SORTORDER { HelpId = HID_RPT_SORTORDER ; }; hidspecial HID_RPT_GROUPSBRW { HelpId = HID_RPT_GROUPSBRW ; }; @@ -65,7 +64,6 @@ hidspecial HID_RPT_CRTL_FORMAT_PREVIEW { HelpId = HID_RPT_CRTL_FORMAT_PREV hidspecial HID_RPT_COND_DLG { HelpId = HID_RPT_COND_DLG ; }; hidspecial HID_RPT_POPUP_COLOR_CTRL { HelpId = HID_RPT_POPUP_COLOR_CTRL ; }; hidspecial HID_RPT_POPUP_COLOR { HelpId = HID_RPT_POPUP_COLOR ; }; -hidspecial SID_ESCAPE { HelpId = SID_ESCAPE ; }; hidspecial HID_RPT_PROPDLG_TAB_GENERAL { HelpId = HID_RPT_PROPDLG_TAB_GENERAL ; }; hidspecial HID_RPT_PROPDLG_TAB_DATA { HelpId = HID_RPT_PROPDLG_TAB_DATA ; }; @@ -93,15 +91,18 @@ hidspecial HID_RPT_PROP_RPT_WIDTH { HelpId = HID_RPT_PROP_RPT_WIDTH; }; hidspecial HID_RPT_PROP_RPT_HEIGHT { HelpId = HID_RPT_PROP_RPT_HEIGHT; }; hidspecial HID_RPT_START_TITLE { HelpId = HID_RPT_START_TITLE; }; hidspecial HID_RPT_START_IMAGE { HelpId = HID_RPT_START_IMAGE; }; -hidspecial SID_EXECUTE_REPORT { HelpId = SID_EXECUTE_REPORT; }; +/* +hidspecial SID_EXECUTE_REPORT { HelpId = SID_EXECUTE_REPORT; }; hidspecial SID_RPT_TEXTDOCUMENT { HelpId = SID_RPT_TEXTDOCUMENT; }; hidspecial SID_RPT_SPREADSHEET { HelpId = SID_RPT_SPREADSHEET; }; +hidspecial SID_RPT_NEW_FUNCTION { HelpId = SID_RPT_NEW_FUNCTION; }; +*/ + hidspecial HID_RPT_PROP_DEEPTRAVERSING { HelpId = HID_RPT_PROP_DEEPTRAVERSING; }; hidspecial HID_RPT_PROP_PREEVALUATED { HelpId = HID_RPT_PROP_PREEVALUATED; }; hidspecial HID_RPT_NAVIGATOR_DLG { HelpId = HID_RPT_NAVIGATOR_DLG; }; hidspecial HID_REPORT_NAVIGATOR_TREE { HelpId = HID_REPORT_NAVIGATOR_TREE; }; -hidspecial SID_RPT_NEW_FUNCTION { HelpId = SID_RPT_NEW_FUNCTION; }; hidspecial HID_RPT_PROP_FORMULA { HelpId = HID_RPT_PROP_FORMULA; }; hidspecial HID_RPT_PROP_INITIALFORMULA { HelpId = HID_RPT_PROP_INITIALFORMULA; };x hidspecial HID_RPT_PROP_DATAFIELD { HelpId = HID_RPT_PROP_DATAFIELD; }; @@ -110,14 +111,17 @@ hidspecial UID_RPT_RPT_PROP_DLG_FONT_TYPE { HelpId = UID_RPT_RPT_PROP_DLG_FONT_T hidspecial HID_RPT_PROP_BACKCOLOR { HelpId = HID_RPT_PROP_BACKCOLOR; }; hidspecial HID_RPT_PROP_PRESERVEIRI { HelpId = HID_RPT_PROP_PRESERVEIRI; }; +/* hidspecial SID_OBJECT_SMALLESTWIDTH { HelpId = SID_OBJECT_SMALLESTWIDTH; }; hidspecial SID_OBJECT_SMALLESTHEIGHT { HelpId = SID_OBJECT_SMALLESTHEIGHT; }; hidspecial SID_OBJECT_GREATESTWIDTH { HelpId = SID_OBJECT_GREATESTWIDTH; }; hidspecial SID_OBJECT_GREATESTHEIGHT { HelpId = SID_OBJECT_GREATESTHEIGHT; }; +*/ hidspecial HID_RPT_PROP_BACKTRANSPARENT { HelpId = HID_RPT_PROP_BACKTRANSPARENT; }; hidspecial HID_RPT_PROP_CONTROLBACKGROUNDTRANSPARENT { HelpId = HID_RPT_PROP_CONTROLBACKGROUNDTRANSPARENT; }; +/* hidspecial SID_ARRANGEMENU { HelpId = SID_ARRANGEMENU; }; hidspecial SID_SELECTALL_IN_SECTION { HelpId = SID_SELECTALL_IN_SECTION; }; hidspecial SID_SECTION_ALIGN { HelpId = SID_SECTION_ALIGN; }; @@ -129,10 +133,10 @@ hidspecial SID_SECTION_ALIGN_MIDDLE { HelpId = SID_SECTION_ALIGN_MIDDLE; }; hidspecial SID_SECTION_ALIGN_DOWN { HelpId = SID_SECTION_ALIGN_DOWN; }; hidspecial SID_NEXT_MARK { HelpId = SID_NEXT_MARK; }; hidspecial SID_PREV_MARK { HelpId = SID_PREV_MARK; }; - hidspecial SID_SECTION_SHRINK { HelpId = SID_SECTION_SHRINK; }; hidspecial SID_SECTION_SHRINK_TOP { HelpId = SID_SECTION_SHRINK_TOP; }; hidspecial SID_SECTION_SHRINK_BOTTOM { HelpId = SID_SECTION_SHRINK_BOTTOM; }; +*/ hidspecial UID_RPT_PROP_CHARTTYPE_DLG { HelpId = UID_RPT_PROP_CHARTTYPE_DLG; }; hidspecial HID_RPT_PROP_CHARTTYPE { HelpId = HID_RPT_PROP_CHARTTYPE; }; diff --git a/reportdesign/util/makefile.mk b/reportdesign/util/makefile.mk index fd6a31699..dc58db3f6 100644 --- a/reportdesign/util/makefile.mk +++ b/reportdesign/util/makefile.mk @@ -230,3 +230,23 @@ DEF3NAME=$(SHL3TARGET) .INCLUDE : target.mk + +ALLTAR : $(MISC)/rpt.component $(MISC)/rptui.component $(MISC)/rptxml.component + +$(MISC)/rpt.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + rpt.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt rpt.component + +$(MISC)/rptui.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + rptui.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL2TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt rptui.component + +$(MISC)/rptxml.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + rptxml.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL3TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt rptxml.component diff --git a/reportdesign/util/rpt.component b/reportdesign/util/rpt.component new file mode 100644 index 000000000..ef5b2cc4c --- /dev/null +++ b/reportdesign/util/rpt.component @@ -0,0 +1,58 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!--********************************************************************** +* +* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +* +* Copyright 2000, 2010 Oracle and/or its affiliates. +* +* OpenOffice.org - a multi-platform office productivity suite +* +* This file is part of OpenOffice.org. +* +* OpenOffice.org is free software: you can redistribute it and/or modify +* it under the terms of the GNU Lesser General Public License version 3 +* only, as published by the Free Software Foundation. +* +* OpenOffice.org is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU Lesser General Public License version 3 for more details +* (a copy is included in the LICENSE file that accompanied this code). +* +* You should have received a copy of the GNU Lesser General Public License +* version 3 along with OpenOffice.org. If not, see +* <http://www.openoffice.org/license.html> +* for a copy of the LGPLv3 License. +* +**********************************************************************--> + +<component loader="com.sun.star.loader.SharedLibrary" + xmlns="http://openoffice.org/2010/uno-components"> + <implementation name="com.sun.star.comp.report.OFixedLine"> + <service name="com.sun.star.report.FixedLine"/> + </implementation> + <implementation name="com.sun.star.comp.report.OFixedText"> + <service name="com.sun.star.report.FixedText"/> + </implementation> + <implementation name="com.sun.star.comp.report.OFormatCondition"> + <service name="com.sun.star.report.FormatCondition"/> + </implementation> + <implementation name="com.sun.star.comp.report.OFormattedField"> + <service name="com.sun.star.report.FormattedField"/> + </implementation> + <implementation name="com.sun.star.comp.report.OFunction"> + <service name="com.sun.star.report.Function"/> + </implementation> + <implementation name="com.sun.star.comp.report.OImageControl"> + <service name="com.sun.star.report.ImageControl"/> + </implementation> + <implementation name="com.sun.star.comp.report.OReportDefinition"> + <service name="com.sun.star.report.ReportDefinition"/> + </implementation> + <implementation name="com.sun.star.comp.report.OReportEngineJFree"> + <service name="com.sun.star.report.ReportEngine"/> + </implementation> + <implementation name="com.sun.star.comp.report.Shape"> + <service name="com.sun.star.report.Shape"/> + </implementation> +</component> diff --git a/reportdesign/util/rptui.component b/reportdesign/util/rptui.component new file mode 100644 index 000000000..593f06d0b --- /dev/null +++ b/reportdesign/util/rptui.component @@ -0,0 +1,52 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!--********************************************************************** +* +* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +* +* Copyright 2000, 2010 Oracle and/or its affiliates. +* +* OpenOffice.org - a multi-platform office productivity suite +* +* This file is part of OpenOffice.org. +* +* OpenOffice.org is free software: you can redistribute it and/or modify +* it under the terms of the GNU Lesser General Public License version 3 +* only, as published by the Free Software Foundation. +* +* OpenOffice.org is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU Lesser General Public License version 3 for more details +* (a copy is included in the LICENSE file that accompanied this code). +* +* You should have received a copy of the GNU Lesser General Public License +* version 3 along with OpenOffice.org. If not, see +* <http://www.openoffice.org/license.html> +* for a copy of the LGPLv3 License. +* +**********************************************************************--> + +<component loader="com.sun.star.loader.SharedLibrary" + xmlns="http://openoffice.org/2010/uno-components"> + <implementation name="com.sun.star.comp.report.DataProviderHandler"> + <service name="com.sun.star.report.inspection.DataProviderHandler"/> + </implementation> + <implementation name="com.sun.star.comp.report.DefaultComponentInspectorModel"> + <service name="com.sun.star.report.inspection.DefaultComponentInspectorModel"/> + </implementation> + <implementation name="com.sun.star.comp.report.GeometryHandler"> + <service name="com.sun.star.report.inspection.GeometryHandler"/> + </implementation> + <implementation name="com.sun.star.comp.report.ReportComponentHandler"> + <service name="com.sun.star.report.inspection.ReportComponentHandler"/> + </implementation> + <implementation name="com.sun.star.report.comp.ReportDesign"> + <service name="com.sun.star.sdb.ReportDesign"/> + </implementation> + <implementation name="com.sun.star.report.comp.ReportToolboxController"> + <service name="com.sun.star.report.ReportToolboxController"/> + </implementation> + <implementation name="com.sun.star.report.comp.StatusbarController"> + <service name="com.sun.star.frame.StatusbarController"/> + </implementation> +</component> diff --git a/reportdesign/util/rptxml.component b/reportdesign/util/rptxml.component new file mode 100644 index 000000000..8a0021ecd --- /dev/null +++ b/reportdesign/util/rptxml.component @@ -0,0 +1,73 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!--********************************************************************** +* +* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +* +* Copyright 2000, 2010 Oracle and/or its affiliates. +* +* OpenOffice.org - a multi-platform office productivity suite +* +* This file is part of OpenOffice.org. +* +* OpenOffice.org is free software: you can redistribute it and/or modify +* it under the terms of the GNU Lesser General Public License version 3 +* only, as published by the Free Software Foundation. +* +* OpenOffice.org is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU Lesser General Public License version 3 for more details +* (a copy is included in the LICENSE file that accompanied this code). +* +* You should have received a copy of the GNU Lesser General Public License +* version 3 along with OpenOffice.org. If not, see +* <http://www.openoffice.org/license.html> +* for a copy of the LGPLv3 License. +* +**********************************************************************--> + +<component loader="com.sun.star.loader.SharedLibrary" + xmlns="http://openoffice.org/2010/uno-components"> + <implementation name="com.sun.star.comp.Report.XMLOasisContentImporter"> + <service name="com.sun.star.comp.document.ImportFilter"/> + </implementation> + <implementation name="com.sun.star.comp.Report.XMLOasisMetaImporter"> + <service name="com.sun.star.comp.document.ImportFilter"/> + </implementation> + <implementation name="com.sun.star.comp.Report.XMLOasisSettingsImporter"> + <service name="com.sun.star.comp.document.ImportFilter"/> + </implementation> + <implementation name="com.sun.star.comp.Report.XMLOasisStylesImporter"> + <service name="com.sun.star.comp.document.ImportFilter"/> + </implementation> + <implementation name="com.sun.star.comp.report.ExportDocumentHandler"> + <service name="com.sun.star.report.ExportDocumentHandler"/> + </implementation> + <implementation name="com.sun.star.comp.report.ExportFilter"> + <service name="com.sun.star.document.ExportFilter"/> + </implementation> + <implementation name="com.sun.star.comp.report.ImportDocumentHandler"> + <service name="com.sun.star.report.ImportDocumentHandler"/> + </implementation> + <implementation name="com.sun.star.comp.report.OReportFilter"> + <service name="com.sun.star.comp.document.ImportFilter"/> + </implementation> + <implementation name="com.sun.star.comp.report.ORptTypeDetection"> + <service name="com.sun.star.document.ExtendedTypeDetection"/> + </implementation> + <implementation name="com.sun.star.comp.report.XMLContentExporter"> + <service name="com.sun.star.document.ExportFilter"/> + </implementation> + <implementation name="com.sun.star.comp.report.XMLFullExporter"> + <service name="com.sun.star.document.ExportFilter"/> + </implementation> + <implementation name="com.sun.star.comp.report.XMLMetaExporter"> + <service name="com.sun.star.document.ExportFilter"/> + </implementation> + <implementation name="com.sun.star.comp.report.XMLSettingsExporter"> + <service name="com.sun.star.document.ExportFilter"/> + </implementation> + <implementation name="com.sun.star.comp.report.XMLStylesExporter"> + <service name="com.sun.star.document.ExportFilter"/> + </implementation> +</component> |